summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rwxr-xr-xshell/callbacks.c46
-rw-r--r--shell/menu.c13
-rwxr-xr-xshell/shell.c9
3 files changed, 5 insertions, 63 deletions
diff --git a/shell/callbacks.c b/shell/callbacks.c
index 705f6d8a..9a5461fa 100755
--- a/shell/callbacks.c
+++ b/shell/callbacks.c
@@ -37,52 +37,6 @@ void cb_sync_manager()
sync_manager_show(shell->window);
}
-void cb_save_graphic()
-{
- Shell *shell = shell_get_main_shell();
- GtkWidget *dialog;
- gchar *filename;
-
- /* save the pixbuf to a png file */
-#if GTK_CHECK_VERSION(3, 0, 0)
- dialog = gtk_file_chooser_dialog_new(_("Save Image"),
- NULL,
- GTK_FILE_CHOOSER_ACTION_SAVE,
- "_Cancel",
- GTK_RESPONSE_CANCEL,
- "_Save",
- GTK_RESPONSE_ACCEPT, NULL);
-#else
- dialog = gtk_file_chooser_dialog_new(_("Save Image"),
- NULL,
- GTK_FILE_CHOOSER_ACTION_SAVE,
- GTK_STOCK_CANCEL,
- GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE,
- GTK_RESPONSE_ACCEPT, NULL);
-#endif
-
- filename = g_strconcat(shell->selected->name, ".png", NULL);
- gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog), filename);
- g_free(filename);
-
- if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
- filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
- gtk_widget_destroy(dialog);
-
- shell_status_update(_("Saving image..."));
-
- tree_view_save_image(filename);
-
- shell_status_update(_("Done."));
- g_free(filename);
-
- return;
- }
-
- gtk_widget_destroy(dialog);
-}
-
void cb_open_web_page()
{
open_url("http://www.hardinfo.org");
diff --git a/shell/menu.c b/shell/menu.c
index f5724d31..e966f485 100644
--- a/shell/menu.c
+++ b/shell/menu.c
@@ -53,17 +53,12 @@ static GtkActionEntry entries[] = {
N_("_Open..."), NULL,
NULL,
G_CALLBACK(cb_sync_manager)},
-
+
{"CopyAction", GTK_STOCK_COPY,
N_("_Copy to Clipboard"), "<control>C",
N_("Copy to clipboard"),
G_CALLBACK(cb_copy_to_clipboard)},
- {"SaveGraphAction", GTK_STOCK_SAVE_AS,
- N_("_Save image as..."), "<control>S",
- NULL,
- G_CALLBACK(cb_save_graphic)},
-
{"RefreshAction", GTK_STOCK_REFRESH,
N_("_Refresh"), "F5",
NULL,
@@ -130,15 +125,15 @@ void menu_init(Shell * shell)
/* Pack up our objects:
* menu_box -> window
* actions -> action_group
- * action_group -> menu_manager */
- gtk_action_group_set_translation_domain( action_group, "hardinfo" );//gettext
+ * action_group -> menu_manager */
+ gtk_action_group_set_translation_domain( action_group, "hardinfo" );//gettext
gtk_action_group_add_actions(action_group, entries,
G_N_ELEMENTS(entries), NULL);
gtk_action_group_add_toggle_actions(action_group, toggle_entries,
G_N_ELEMENTS(toggle_entries),
NULL);
gtk_ui_manager_insert_action_group(menu_manager, action_group, 0);
-
+
/* Read in the UI from our XML file */
error = NULL;
diff --git a/shell/shell.c b/shell/shell.c
index f5358911..3cc13128 100755
--- a/shell/shell.c
+++ b/shell/shell.c
@@ -284,9 +284,7 @@ void shell_view_set_enabled(gboolean setting)
shell_action_set_enabled("CopyAction", setting);
shell_action_set_enabled("ReportAction", setting);
shell_action_set_enabled("SyncManagerAction", setting && sync_manager_count_entries() > 0);
- shell_action_set_enabled("SaveGraphAction",
- setting ? shell->view_type ==
- SHELL_VIEW_PROGRESS : FALSE);
+
}
void shell_status_set_enabled(gboolean setting)
@@ -764,7 +762,6 @@ 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);
@@ -985,9 +982,6 @@ static void set_view_type(ShellViewType viewtype, gboolean reload)
/* 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);
-
close_note(NULL, NULL);
switch (viewtype) {
@@ -1043,7 +1037,6 @@ static void set_view_type(ShellViewType viewtype, gboolean reload)
/* fallthrough */
case SHELL_VIEW_PROGRESS:
gtk_widget_show(shell->info->scroll);
- shell_action_set_enabled("SaveGraphAction", TRUE);
if (!reload) {
gtk_tree_view_column_set_visible(shell->info->col_progress, TRUE);