aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/shell.c
diff options
context:
space:
mode:
authorLeandro A. F. Pereira <leandro@hardinfo.org>2009-05-03 12:24:48 -0300
committerLeandro A. F. Pereira <leandro@hardinfo.org>2009-05-03 12:24:48 -0300
commitefbc771b490d50279b3b9cacfd5f4e9ca8621a68 (patch)
treea28b95408b25c236506b5b4362cdab436591d549 /hardinfo2/shell.c
parent6553dc00fe6d10baaa3b3faaddedace625f90c5a (diff)
Change module.getModuleList(), so it also sends the module's icon filename. Stability fixes to the remote feature.
Diffstat (limited to 'hardinfo2/shell.c')
-rw-r--r--hardinfo2/shell.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/hardinfo2/shell.c b/hardinfo2/shell.c
index 3451a8f4..d06faecb 100644
--- a/hardinfo2/shell.c
+++ b/hardinfo2/shell.c
@@ -359,9 +359,18 @@ static ShellNote *note_new(void)
return note;
}
-void shell_reset_title(Shell *shell)
+void shell_set_title(Shell *shell, gchar *subtitle)
{
- gtk_window_set_title(GTK_WINDOW(shell->window), "System Information");
+ if (subtitle) {
+ gchar *tmp;
+
+ tmp = g_strdup_printf("%s - System Information", subtitle);
+ gtk_window_set_title(GTK_WINDOW(shell->window), tmp);
+
+ g_free(tmp);
+ } else {
+ gtk_window_set_title(GTK_WINDOW(shell->window), "System Information");
+ }
}
static void create_window(void)
@@ -373,7 +382,7 @@ static void create_window(void)
shell->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_icon(GTK_WINDOW(shell->window),
icon_cache_get_pixbuf("logo.png"));
- shell_reset_title(shell);
+ shell_set_title(shell, NULL);
gtk_window_set_default_size(GTK_WINDOW(shell->window), 800, 600);
g_signal_connect(G_OBJECT(shell->window), "destroy", destroy_me, NULL);
@@ -1346,15 +1355,14 @@ static void module_selected(gpointer data)
shell_status_update("Done.");
shell_status_set_enabled(FALSE);
- title = g_strdup_printf("%s - %s - System Information", shell->selected_module_name, entry->name);
- gtk_window_set_title(GTK_WINDOW(shell->window), title);
+ title = g_strdup_printf("%s - %s", shell->selected_module_name, entry->name);
+ shell_set_title(shell, title);
g_free(title);
shell_action_set_enabled("RefreshAction", TRUE);
shell_action_set_enabled("CopyAction", TRUE);
} else {
- gtk_window_set_title(GTK_WINDOW(shell->window),
- "System Information");
+ shell_set_title(shell, NULL);
shell_action_set_enabled("RefreshAction", FALSE);
shell_action_set_enabled("CopyAction", FALSE);