[Xfce4-commits] [panel-plugins/xfce4-clipman-plugin] 31/37: Replace close button with copy/paste
noreply at xfce.org
noreply at xfce.org
Mon Mar 23 23:30:26 CET 2020
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository panel-plugins/xfce4-clipman-plugin.
commit 9b3338bd1cd328f1e56bebfcd6f958b52c567a10
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Sun Mar 22 10:54:41 2020 +0100
Replace close button with copy/paste
---
panel-plugin/xfce4-clipman-history.c | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/panel-plugin/xfce4-clipman-history.c b/panel-plugin/xfce4-clipman-history.c
index 981ef81..c814c2d 100644
--- a/panel-plugin/xfce4-clipman-history.c
+++ b/panel-plugin/xfce4-clipman-history.c
@@ -349,6 +349,8 @@ clipman_history_dialog_init (MyPlugin *plugin)
GtkWidget *box;
GtkWidget *button;
GtkWidget *icon;
+ const gchar *button_text;
+ guint paste_on_activate;
dialog = xfce_titled_dialog_new ();
gtk_window_set_application (GTK_WINDOW (dialog), GTK_APPLICATION (plugin->app));
@@ -374,14 +376,24 @@ clipman_history_dialog_init (MyPlugin *plugin)
icon = gtk_image_new_from_icon_name ("preferences-system", GTK_ICON_SIZE_BUTTON);
gtk_button_set_image (GTK_BUTTON (button), icon);
+ g_object_get (G_OBJECT (plugin->menu), "paste-on-activate", &paste_on_activate, NULL);
+ if (paste_on_activate > 0)
+ {
+ icon = gtk_image_new_from_icon_name ("edit-paste-symbolic", GTK_ICON_SIZE_BUTTON);
+ button_text = g_strdup_printf (_("_Paste"));
+ }
+ else
+ {
+ icon = gtk_image_new_from_icon_name ("edit-copy-symbolic", GTK_ICON_SIZE_BUTTON);
+ button_text = g_strdup_printf (_("_Copy"));
+ }
#if LIBXFCE4UI_CHECK_VERSION (4,15,0)
- button = xfce_titled_dialog_add_button (XFCE_TITLED_DIALOG (dialog), _("_Close"), GTK_RESPONSE_CLOSE);
- xfce_titled_dialog_set_default_response (XFCE_TITLED_DIALOG (dialog), GTK_RESPONSE_CLOSE);
+ button = xfce_titled_dialog_add_button (XFCE_TITLED_DIALOG (dialog), button_text, GTK_RESPONSE_APPLY);
+ xfce_titled_dialog_set_default_response (XFCE_TITLED_DIALOG (dialog), GTK_RESPONSE_APPLY);
#else
- button = gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Close"), GTK_RESPONSE_CLOSE);
- gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE);
+ button = gtk_dialog_add_button (GTK_DIALOG (dialog), button_text, GTK_RESPONSE_APPLY);
+ gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_APPLY);
#endif
- icon = gtk_image_new_from_icon_name ("window-close-symbolic", GTK_ICON_SIZE_BUTTON);
gtk_button_set_image (GTK_BUTTON (button), icon);
box = clipman_history_treeview_init (plugin);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list