[Xfce4-commits] [panel-plugins/xfce4-clipman-plugin] 22/37: Add help button

noreply at xfce.org noreply at xfce.org
Mon Mar 23 23:30:17 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 62ed5a3e1129a34b72f4881ea523559196fdb8c5
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Sat Mar 21 00:24:27 2020 +0100

    Add help button
---
 panel-plugin/xfce4-clipman-history.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/panel-plugin/xfce4-clipman-history.c b/panel-plugin/xfce4-clipman-history.c
index a410113..c16267b 100644
--- a/panel-plugin/xfce4-clipman-history.c
+++ b/panel-plugin/xfce4-clipman-history.c
@@ -277,7 +277,9 @@ clipman_history_dialog_response (GtkWidget *dialog,
                                  gint       response_id,
                                  MyPlugin  *plugin)
 {
-  if (response_id == GTK_RESPONSE_CLOSE)
+  if (response_id == GTK_RESPONSE_HELP)
+        xfce_dialog_show_help (GTK_WINDOW (dialog), "clipman", NULL, NULL);
+  else
     clipman_history_dialog_finalize (plugin, dialog);
 }
 
@@ -317,6 +319,14 @@ clipman_history_dialog_init (MyPlugin *plugin)
   icon = gtk_image_new_from_icon_name ("window-close-symbolic", GTK_ICON_SIZE_BUTTON);
   gtk_button_set_image (GTK_BUTTON (button), icon);
 
+#if LIBXFCE4UI_CHECK_VERSION (4,15,0)
+  button = xfce_titled_dialog_add_button (XFCE_TITLED_DIALOG (dialog), _("_Help"), GTK_RESPONSE_HELP);
+#else
+  button = gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Help"), GTK_RESPONSE_HELP);
+#endif
+  icon = gtk_image_new_from_icon_name ("help-browser", GTK_ICON_SIZE_BUTTON);
+  gtk_button_set_image (GTK_BUTTON (button), icon);
+
   box = clipman_history_treeview_init (plugin);
   gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), box);
   gtk_widget_show_all (box);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list