diff options
Diffstat (limited to 'hardinfo2')
| -rw-r--r-- | hardinfo2/arch/common/languages.h | 3 | ||||
| -rw-r--r-- | hardinfo2/expr.c | 2 | ||||
| -rw-r--r-- | hardinfo2/shell.c | 23 | 
3 files changed, 15 insertions, 13 deletions
| diff --git a/hardinfo2/arch/common/languages.h b/hardinfo2/arch/common/languages.h index 9e1439d1..12761976 100644 --- a/hardinfo2/arch/common/languages.h +++ b/hardinfo2/arch/common/languages.h @@ -90,6 +90,9 @@ scan_languages(OperatingSystem * os)  	    g_free(revision);  	    g_free(date);  	    g_free(codeset); +	     +	    title = source = address = email = language = territory = \ +	        revision = date = codeset = NULL;  	}      } diff --git a/hardinfo2/expr.c b/hardinfo2/expr.c index 8727a63b..2bdd5563 100644 --- a/hardinfo2/expr.c +++ b/hardinfo2/expr.c @@ -94,7 +94,7 @@ GSList *math_infix_to_postfix(GSList *infix)  	    t_sp--;  	} else if (t->type != TOKEN_OPERATOR) {  	    postfix = g_slist_append(postfix, t); -	} else if (!stack) { +	} else if (t_sp == 0) {  	    stack[++t_sp] = t;  	} else {  	    while (t_sp != 0 && priority(t->val.op) <= priority(stack[t_sp]->val.op)) diff --git a/hardinfo2/shell.c b/hardinfo2/shell.c index 1482a028..60863012 100644 --- a/hardinfo2/shell.c +++ b/hardinfo2/shell.c @@ -162,7 +162,8 @@ shell_status_pulse(void)  void  shell_status_set_percentage(gint percentage)  { -    gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(shell->progress), (float)percentage/100.0); +    gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(shell->progress), +                                  (float)percentage/100.0);      while (gtk_events_pending())  	gtk_main_iteration();  } @@ -205,7 +206,7 @@ shell_do_reload(void)  }  void -shell_status_update(const gchar * message) +shell_status_update(const gchar *message)  {      gtk_label_set_markup(GTK_LABEL(shell->status), message);      gtk_progress_bar_pulse(GTK_PROGRESS_BAR(shell->progress)); @@ -308,14 +309,11 @@ shell_tree_modules_load(ShellTree * shelltree)  		GdkPixbuf *(*shell_icon) (gint);  		const gchar *(*shell_name) (gint);  		ShellModuleEntry *entry = g_new0(ShellModuleEntry, 1); -		gpointer symbol; -		if (g_module_symbol(module->dll, "hi_icon", &symbol)) { -		    shell_icon = symbol; +		if (g_module_symbol(module->dll, "hi_icon", &(shell_icon))) {  		    entry->icon = shell_icon(i);  		} -		if (g_module_symbol(module->dll, "hi_name", &symbol)) { -		    shell_name = symbol; +		if (g_module_symbol(module->dll, "hi_name", &(shell_name))) {  		    entry->name = g_strdup(shell_name(i));  		}  		g_module_symbol(module->dll, "hi_info", @@ -331,8 +329,7 @@ shell_tree_modules_load(ShellTree * shelltree)  		module->entries = g_slist_append(module->entries, entry);  	    } -	    shelltree->modules = -		g_slist_append(shelltree->modules, module); +	    shelltree->modules = g_slist_append(shelltree->modules, module);  	} else {  	    g_free(module->name);  	    g_free(module->icon); @@ -754,9 +751,7 @@ moreinfo_handle_normal(GKeyFile * key_file, gchar * group, gchar ** keys)          value = g_key_file_get_value(key_file, group, key, NULL);  	if (g_utf8_validate(key, -1, NULL) && g_utf8_validate(value, -1, NULL)) { -		gchar *p = strchr(key, '#'); -		if (p) -		    *p = 0; +	        strend(key, '#');  	        gtk_tree_store_append(store, &child, &parent);	          	        gtk_tree_store_set(store, &child, INFO_TREE_COL_VALUE, value, @@ -915,8 +910,12 @@ module_selected(GtkTreeSelection * ts, gpointer data)  	info_selected_show_extra(NULL);	/* clears the more info store */  	gtk_tree_view_columns_autosize(GTK_TREE_VIEW(shell->info->view)); + +	/* urgh. why don't GTK do this when the model is cleared? */  	gtk_range_set_value(GTK_RANGE(GTK_SCROLLED_WINDOW(shell->info->scroll)->vscrollbar), 0.0); +	gtk_range_set_value(GTK_RANGE(GTK_SCROLLED_WINDOW(shell->info->scroll)->hscrollbar), 0.0);  	gtk_range_set_value(GTK_RANGE(GTK_SCROLLED_WINDOW(shell->moreinfo->scroll)->vscrollbar), 0.0); +	gtk_range_set_value(GTK_RANGE(GTK_SCROLLED_WINDOW(shell->moreinfo->scroll)->hscrollbar), 0.0);  	shell_status_update("Done.");  	shell_status_set_enabled(FALSE); | 
