diff options
author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2006-12-29 20:22:28 +0000 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2006-12-29 20:22:28 +0000 |
commit | b803a43e033df3d040e1c6d67c57dba55812615c (patch) | |
tree | b0840e64e0058173096dab8a41fbffae68826bfd /hardinfo2/shell.c | |
parent | 01757fbbd7a18fa6b07a090eb675ea19fd5ac322 (diff) |
Add image saving (only for benchmark results!).
Diffstat (limited to 'hardinfo2/shell.c')
-rw-r--r-- | hardinfo2/shell.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/hardinfo2/shell.c b/hardinfo2/shell.c index e39cee40..b776cbfb 100644 --- a/hardinfo2/shell.c +++ b/hardinfo2/shell.c @@ -511,6 +511,7 @@ void shell_init(GSList * modules) shell_action_set_enabled("RefreshAction", FALSE); shell_action_set_enabled("CopyAction", FALSE); + shell_action_set_enabled("SaveGraphAction", FALSE); shell_action_set_active("SidePaneAction", TRUE); shell_action_set_active("ToolbarAction", TRUE); } @@ -632,6 +633,9 @@ static void set_view_type(ShellViewType viewtype) /* turn off the rules hint */ gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(shell->info->view), FALSE); + /* turn off the save graphic action */ + shell_action_set_enabled("SaveGraphAction", FALSE); + if (viewtype == shell->view_type) return; @@ -659,6 +663,7 @@ static void set_view_type(ShellViewType viewtype) shell->loadgraph->height - 16); break; case SHELL_VIEW_PROGRESS: + shell_action_set_enabled("SaveGraphAction", TRUE); gtk_tree_view_column_set_visible(shell->info->col_progress, TRUE); gtk_tree_view_column_set_visible(shell->info->col_value, FALSE); gtk_widget_hide(shell->notebook); @@ -903,15 +908,15 @@ module_selected_show_info(ShellModuleEntry * entry, gboolean reload) gint i; gsize ngroups; + /* reset the view type to normal */ + set_view_type(SHELL_VIEW_NORMAL); + if (entry->func) { key_data = entry->func(entry->number); } else { key_data = g_strdup("[Error]\n" "Invalid module="); } - /* reset the view type to normal */ - set_view_type(SHELL_VIEW_NORMAL); - /* recreate the iter hash table only if we're not reloading the module section */ if (!reload) { if (update_tbl != NULL) { |