[Xfce4-commits] [apps/xfce4-terminal] 01/01: Do not allow Reset in Read-Only mode

noreply at xfce.org noreply at xfce.org
Fri Sep 2 14:02:29 CEST 2016


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 499197e2f7029b5bfa4dd25a9029d0550c2a1104
Author: Igor <f2404 at yandex.ru>
Date:   Fri Sep 2 15:02:23 2016 +0300

    Do not allow Reset in Read-Only mode
---
 terminal/terminal-window.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/terminal/terminal-window.c b/terminal/terminal-window.c
index 01912f8..8da3efa 100644
--- a/terminal/terminal-window.c
+++ b/terminal/terminal-window.c
@@ -1656,10 +1656,16 @@ static void
 terminal_window_action_readonly (GtkToggleAction *action,
                                  TerminalWindow  *window)
 {
+  gboolean input_enabled;
+
   terminal_return_if_fail (window->active != NULL);
 
-  terminal_screen_set_input_enabled (window->active,
-                                     !gtk_toggle_action_get_active (action));
+  input_enabled = !gtk_toggle_action_get_active (action);
+  gtk_action_set_sensitive (gtk_action_group_get_action (window->action_group, "reset"),
+                            input_enabled);
+  gtk_action_set_sensitive (gtk_action_group_get_action (window->action_group, "reset-and-clear"),
+                            input_enabled);
+  terminal_screen_set_input_enabled (window->active, input_enabled);
 }
 
 

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


More information about the Xfce4-commits mailing list