1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
|
diff -Naur lxterminal-0.1.11.orig/src/lxterminal.c lxterminal-0.1.11/src/lxterminal.c
--- lxterminal-0.1.11.orig/src/lxterminal.c 2011-07-27 23:07:54.000000000 +0200
+++ lxterminal-0.1.11/src/lxterminal.c 2014-05-12 05:13:32.264123691 +0200
@@ -69,29 +70,29 @@
/* Menu and accelerator event handlers. */
static void terminal_initialize_switch_tab_accelerator(Term * term);
static void terminal_set_disable_alt(Term *term, gboolean disable_alt);
-static void terminal_switch_tab_accelerator(Term * term);
+static gboolean terminal_switch_tab_accelerator(Term * term);
static void terminal_new_window_activate_event(GtkAction * action, LXTerminal * terminal);
-static void terminal_new_window_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
+static gboolean terminal_new_window_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
static void terminal_new_tab_activate_event(GtkAction * action, LXTerminal * terminal);
-static void terminal_new_tab_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
+static gboolean terminal_new_tab_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
static void terminal_close_tab_activate_event(GtkAction * action, LXTerminal * terminal);
-static void terminal_close_tab_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
+static gboolean terminal_close_tab_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
static void terminal_copy_activate_event(GtkAction * action, LXTerminal * terminal);
-static void terminal_copy_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
+static gboolean terminal_copy_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
static void terminal_paste_activate_event(GtkAction * action, LXTerminal * terminal);
-static void terminal_paste_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
+static gboolean terminal_paste_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
static void terminal_name_tab_response_event(GtkWidget * dialog, gint response, LXTerminal * terminal);
static void terminal_name_tab_activate_event(GtkAction * action, LXTerminal * terminal);
-static void terminal_name_tab_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
+static gboolean terminal_name_tab_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
static void terminal_previous_tab_activate_event(GtkAction * action, LXTerminal * terminal);
-static void terminal_previous_tab_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
+static gboolean terminal_previous_tab_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
static void terminal_next_tab_activate_event(GtkAction * action, LXTerminal * terminal);
-static void terminal_next_tab_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
+static gboolean terminal_next_tab_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
static void terminal_move_tab_execute(LXTerminal * terminal, gint direction);
static void terminal_move_tab_left_activate_event(GtkAction * action, LXTerminal * terminal);
-static void terminal_move_tab_left_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
+static gboolean terminal_move_tab_left_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
static void terminal_move_tab_right_activate_event(GtkAction * action, LXTerminal * terminal);
-static void terminal_move_tab_right_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
+static gboolean terminal_move_tab_right_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
static void terminal_about_activate_event(GtkAction * action, LXTerminal * terminal);
/* Window creation, destruction, and control. */
@@ -327,11 +328,14 @@
/* Handler for accelerator <ALT> n, where n is a digit.
* Switch to the tab selected by the digit, if it exists. */
-static void terminal_switch_tab_accelerator(Term * term)
+static gboolean terminal_switch_tab_accelerator(Term * term)
{
LXTerminal * terminal = term->parent;
- if (term->index < gtk_notebook_get_n_pages(GTK_NOTEBOOK(terminal->notebook)))
+ if (term->index < gtk_notebook_get_n_pages(GTK_NOTEBOOK(terminal->notebook))) {
gtk_notebook_set_current_page(GTK_NOTEBOOK(terminal->notebook), term->index);
+ return TRUE;
+ }
+ return FALSE;
}
/* Handler for "activate" signal on File/New Window menu item.
@@ -344,9 +348,10 @@
}
/* Handler for accelerator <SHIFT><CTRL> N. Open a new window. */
-static void terminal_new_window_accelerator(LXTerminal * terminal, guint action, GtkWidget * item)
+static gboolean terminal_new_window_accelerator(LXTerminal * terminal, guint action, GtkWidget * item)
{
terminal_new_window_activate_event(NULL, terminal);
+ return TRUE;
}
/* Handler for "activate" signal on File/New Tab menu item.
@@ -405,9 +410,10 @@
}
/* Handler for accelerator <SHIFT><CTRL> T. Open a new tab. */
-static void terminal_new_tab_accelerator(LXTerminal * terminal, guint action, GtkWidget * item)
+static gboolean terminal_new_tab_accelerator(LXTerminal * terminal, guint action, GtkWidget * item)
{
terminal_new_tab_activate_event(NULL, terminal);
+ return TRUE;
}
/* Handler for "activate" signal on File/Close Tab menu item.
@@ -419,9 +425,10 @@
}
/* Handler for accelerator <SHIFT><CTRL> W. Close the current tab. */
-static void terminal_close_tab_accelerator(LXTerminal * terminal, guint action, GtkWidget * item)
+static gboolean terminal_close_tab_accelerator(LXTerminal * terminal, guint action, GtkWidget * item)
{
terminal_close_tab_activate_event(NULL, terminal);
+ return TRUE;
}
/* Handler for "activate" signal on Edit/Copy menu item.
@@ -433,9 +440,10 @@
}
/* Handler for accelerator <CTRL><SHIFT> C. Copy to the clipboard. */
-static void terminal_copy_accelerator(LXTerminal * terminal, guint action, GtkWidget * item)
+static gboolean terminal_copy_accelerator(LXTerminal * terminal, guint action, GtkWidget * item)
{
terminal_copy_activate_event(NULL, terminal);
+ return TRUE;
}
/* Handler for "activate" signal on Edit/Paste menu item.
@@ -447,9 +455,10 @@
}
/* Handler for accelerator <CTRL><SHIFT> V. Paste from the clipboard. */
-static void terminal_paste_accelerator(LXTerminal * terminal, guint action, GtkWidget * item)
+static gboolean terminal_paste_accelerator(LXTerminal * terminal, guint action, GtkWidget * item)
{
terminal_paste_activate_event(NULL, terminal);
+ return TRUE;
}
/* Handler for "response" signal on Name Tab dialog. */
@@ -521,9 +530,10 @@
}
/* Handler for accelerator <CTRL><SHIFT> R. Name the tab. */
-static void terminal_name_tab_accelerator(LXTerminal * terminal, guint action, GtkWidget * item)
+static gboolean terminal_name_tab_accelerator(LXTerminal * terminal, guint action, GtkWidget * item)
{
terminal_name_tab_activate_event(NULL, terminal);
+ return TRUE;
}
/* Handler for "activate" signal on Tabs/Previous Tab menu item.
@@ -538,10 +548,11 @@
}
/* Handler for accelerator <CTRL><PAGE UP>. Cycle through tabs in the reverse direction. */
-static void terminal_previous_tab_accelerator(LXTerminal * terminal, guint action, GtkWidget * item)
+static gboolean terminal_previous_tab_accelerator(LXTerminal * terminal, guint action, GtkWidget * item)
{
GtkAction *_action = gtk_action_group_get_action(terminal->action_group, "Tabs_PreviousTab");
gtk_action_activate(_action);
+ return TRUE;
}
/* Handler for "activate" signal on Tabs/Next Tab menu item.
@@ -556,10 +567,11 @@
}
/* Handler for accelerator <CTRL><PAGE DOWN>. Cycle through tabs in the forward direction. */
-static void terminal_next_tab_accelerator(LXTerminal * terminal, guint action, GtkWidget * item)
+static gboolean terminal_next_tab_accelerator(LXTerminal * terminal, guint action, GtkWidget * item)
{
GtkAction *_action = gtk_action_group_get_action(terminal->action_group, "Tabs_NextTab");
gtk_action_activate(_action);
+ return TRUE;
}
/* Helper for move tab left and right. */
@@ -594,9 +606,10 @@
}
/* Handler for accelerator <SHIFT><CTRL><PAGE UP>. Move the tab one position in the reverse direction. */
-static void terminal_move_tab_left_accelerator(LXTerminal * terminal, guint action, GtkWidget * item)
+static gboolean terminal_move_tab_left_accelerator(LXTerminal * terminal, guint action, GtkWidget * item)
{
terminal_move_tab_execute(terminal, -1);
+ return TRUE;
}
/* Handler for "activate" signal on Tabs/Move Tab Right menu item.
@@ -607,9 +620,10 @@
}
/* Handler for accelerator <SHIFT><CTRL><PAGE DOWN>. Move the tab one position in the forward direction. */
-static void terminal_move_tab_right_accelerator(LXTerminal * terminal, guint action, GtkWidget * item)
+static gboolean terminal_move_tab_right_accelerator(LXTerminal * terminal, guint action, GtkWidget * item)
{
terminal_move_tab_execute(terminal, 1);
+ return TRUE;
}
/* Handler for "activate" signal on Help/About menu item. */
|