[Xfce4-commits] [apps/xfce4-terminal] 01/01: Add Help button to Set Title dialog

noreply at xfce.org noreply at xfce.org
Sat Jan 7 10:37:02 CET 2017


This is an automated email from the git hooks/post-receive script.

f2404 pushed a commit to branch master
in repository apps/xfce4-terminal.

commit 00d75597944bd1dcd66473956ff2705575c1d6b2
Author: Igor <f2404 at yandex.ru>
Date:   Sat Jan 7 12:36:56 2017 +0300

    Add Help button to Set Title dialog
---
 terminal/terminal-window.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/terminal/terminal-window.c b/terminal/terminal-window.c
index 743858b..df8fc21 100644
--- a/terminal/terminal-window.c
+++ b/terminal/terminal-window.c
@@ -1854,7 +1854,13 @@ title_dialog_response (GtkWidget      *dialog,
                        gint            response,
                        TerminalWindow *window)
 {
-  if (response == GTK_RESPONSE_CLOSE)
+  /* check if we should open the user manual */
+  if (response == GTK_RESPONSE_HELP)
+    {
+      /* open the "Set Title" paragraph in the "Usage" section */
+      xfce_dialog_show_help (GTK_WINDOW (dialog), "terminal", "usage#to_change_the_terminal_title", NULL);
+    }
+  else
     title_dialog_close (dialog, window);
 }
 
@@ -1894,6 +1900,8 @@ terminal_window_action_set_title (GtkAction      *action,
       /* set window height to minimum to fix huge size under wayland */
       gtk_window_set_default_size (GTK_WINDOW (window->priv->title_dialog), -1, 1);
 
+      button = xfce_gtk_button_new_mixed ("help-browser", _("_Help"));
+      gtk_dialog_add_action_widget (GTK_DIALOG (window->priv->title_dialog), button, GTK_RESPONSE_HELP);
       button = xfce_gtk_button_new_mixed ("window-close", _("_Close"));
       gtk_widget_set_can_default (button, TRUE);
       gtk_dialog_add_action_widget (GTK_DIALOG (window->priv->title_dialog), button, GTK_RESPONSE_CLOSE);

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


More information about the Xfce4-commits mailing list