From 73334e01c47a37c4c0f9c3d3778be2a8df826ba1 Mon Sep 17 00:00:00 2001 From: hwspeedy Date: Sun, 28 Apr 2024 16:02:24 +0200 Subject: FIX Disabled non working clipboard - low value --- includes/uidefs.h | 4 ++-- shell/callbacks.c | 5 +++-- shell/menu.c | 5 +++-- shell/shell.c | 14 +++++++------- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/includes/uidefs.h b/includes/uidefs.h index 2165ea8c..42587519 100644 --- a/includes/uidefs.h +++ b/includes/uidefs.h @@ -15,7 +15,7 @@ char *uidefs_str = " " " " " " - " " + /* " "*/ SYNC_MANAGER_MENU_ITEMS \ " " " " @@ -47,7 +47,7 @@ char *uidefs_str = " " " " " " - " " + /* " "*/ " " SYNC_MANAGER_TOOL_ITEMS \ " " diff --git a/shell/callbacks.c b/shell/callbacks.c index 3b39253c..d011623a 100644 --- a/shell/callbacks.c +++ b/shell/callbacks.c @@ -258,12 +258,12 @@ void cb_refresh() shell_do_reload(TRUE); } -void cb_copy_to_clipboard() +/*void cb_copy_to_clipboard() { ShellModuleEntry *entry = shell_get_main_shell()->selected; if (entry) { - gchar *data = module_entry_function(entry); + gchar *data = module_entry_function(entry); GtkClipboard *clip = gtk_clipboard_get(gdk_atom_intern("CLIPBOARD", FALSE)); ReportContext *ctx = report_context_text_new(NULL); @@ -280,6 +280,7 @@ void cb_copy_to_clipboard() report_context_free(ctx); } } +*/ void cb_side_pane() { diff --git a/shell/menu.c b/shell/menu.c index 870a2fcb..3a5c9940 100644 --- a/shell/menu.c +++ b/shell/menu.c @@ -63,10 +63,11 @@ static GtkActionEntry entries[] = { NULL, G_CALLBACK(cb_sync_manager)}, - {"CopyAction", HI_STOCK_CLIPBOARD, + //does not work correctly and value low + /*{"CopyAction", HI_STOCK_CLIPBOARD, N_("_Copy to Clipboard"), "C", N_("Copy to clipboard"), - G_CALLBACK(cb_copy_to_clipboard)}, + G_CALLBACK(cb_copy_to_clipboard)},*/ {"RefreshAction", HI_STOCK_REFRESH, N_("_Refresh"), "F5", diff --git a/shell/shell.c b/shell/shell.c index 806e0b7c..cf1dfc4a 100644 --- a/shell/shell.c +++ b/shell/shell.c @@ -282,7 +282,7 @@ void shell_view_set_enabled(gboolean setting) gtk_widget_set_sensitive(shell->hbox, setting); shell_action_set_enabled("ViewMenuAction", setting); shell_action_set_enabled("RefreshAction", setting); - shell_action_set_enabled("CopyAction", setting); + //shell_action_set_enabled("CopyAction", setting); shell_action_set_enabled("ReportAction", setting); shell_action_set_enabled("SyncManagerAction", setting && sync_manager_count_entries() > 0); } @@ -309,7 +309,7 @@ void shell_do_reload(gboolean reload) return; shell_action_set_enabled("RefreshAction", FALSE); - shell_action_set_enabled("CopyAction", FALSE); + //shell_action_set_enabled("CopyAction", FALSE); shell_action_set_enabled("ReportAction", FALSE); shell_status_set_enabled(TRUE); @@ -320,7 +320,7 @@ void shell_do_reload(gboolean reload) params.aborting_benchmarks=0; shell_action_set_enabled("RefreshAction", TRUE); - shell_action_set_enabled("CopyAction", TRUE); + //shell_action_set_enabled("CopyAction", TRUE); shell_action_set_enabled("ReportAction", TRUE); } @@ -776,7 +776,7 @@ void shell_init(GSList * modules) create_window(); - shell_action_set_property("CopyAction", "is-important", TRUE); + //shell_action_set_property("CopyAction", "is-important", TRUE); shell_action_set_property("RefreshAction", "is-important", TRUE); shell_action_set_property("ReportAction", "is-important", TRUE); shell_action_set_property("SyncManagerAction", "is-important", TRUE); @@ -832,7 +832,7 @@ void shell_init(GSList * modules) shell_status_set_enabled(FALSE); shell_action_set_enabled("RefreshAction", FALSE); - shell_action_set_enabled("CopyAction", FALSE); + //shell_action_set_enabled("CopyAction", FALSE); shell_action_set_active("SidePaneAction", TRUE); shell_action_set_active("ToolbarAction", TRUE); @@ -2040,14 +2040,14 @@ static void module_selected(gpointer data) g_free(title); shell_action_set_enabled("RefreshAction", TRUE); - shell_action_set_enabled("CopyAction", TRUE); + //shell_action_set_enabled("CopyAction", TRUE); shell_status_update(_("Done.")); shell_status_set_enabled(FALSE); } else { shell_set_title(shell, NULL); shell_action_set_enabled("RefreshAction", FALSE); - shell_action_set_enabled("CopyAction", FALSE); + //shell_action_set_enabled("CopyAction", FALSE); gtk_tree_store_clear(GTK_TREE_STORE(shell->info_tree->model)); set_view_type(SHELL_VIEW_NORMAL, FALSE); -- cgit v1.2.3