Merge lp:~attente/gtk/gtk2-no-menu-proxy into lp:~ubuntu-desktop/gtk/ubuntu
- gtk2-no-menu-proxy
- Merge into ubuntu
Proposed by
William Hua
Status: | Merged |
---|---|
Merge reported by: | Sebastien Bacher |
Merged at revision: | not available |
Proposed branch: | lp:~attente/gtk/gtk2-no-menu-proxy |
Merge into: | lp:~ubuntu-desktop/gtk/ubuntu |
Diff against target: |
1602 lines (+0/-1566) 4 files modified
debian/patches/012_ubuntu-set-grab-add.patch (+0/-47) debian/patches/043_ubuntu_menu_proxy.patch (+0/-1406) debian/patches/072_indicator_menu_update.patch (+0/-110) debian/patches/series (+0/-3) |
To merge this branch: | bzr merge lp:~attente/gtk/gtk2-no-menu-proxy |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Desktop | Pending | ||
Review via email: mp+151619@code.launchpad.net |
Commit message
Description of the change
Remove the menu proxy patch, set grab add patch, and indicator menu update patch.
We shouldn't need these any more since the menu proxy is replaced by unity-gtk-module, set grab add hasn't been used in a while, and support for gtk 2 indicators is gone.
To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === removed file 'debian/patches/012_ubuntu-set-grab-add.patch' | |||
2 | --- debian/patches/012_ubuntu-set-grab-add.patch 2012-09-04 06:18:43 +0000 | |||
3 | +++ debian/patches/012_ubuntu-set-grab-add.patch 1970-01-01 00:00:00 +0000 | |||
4 | @@ -1,47 +0,0 @@ | |||
5 | 1 | === modified file 'gtk/gtk.symbols' | ||
6 | 2 | Index: gtk+-2.24.12/gtk/gtk.symbols | ||
7 | 3 | =================================================================== | ||
8 | 4 | --- gtk+-2.24.12.orig/gtk/gtk.symbols 2011-10-18 11:35:29.000000000 +1300 | ||
9 | 5 | +++ gtk+-2.24.12/gtk/gtk.symbols 2012-09-04 16:42:40.382564335 +1200 | ||
10 | 6 | @@ -5323,6 +5323,7 @@ | ||
11 | 7 | gtk_widget_get_realized | ||
12 | 8 | gtk_widget_set_mapped | ||
13 | 9 | gtk_widget_get_mapped | ||
14 | 10 | +ubuntu_gtk_widget_set_has_grab | ||
15 | 11 | #endif | ||
16 | 12 | #endif | ||
17 | 13 | |||
18 | 14 | Index: gtk+-2.24.12/gtk/gtkwidget.c | ||
19 | 15 | =================================================================== | ||
20 | 16 | --- gtk+-2.24.12.orig/gtk/gtkwidget.c 2012-09-04 06:28:02.000000000 +1200 | ||
21 | 17 | +++ gtk+-2.24.12/gtk/gtkwidget.c 2012-09-04 16:42:40.382564335 +1200 | ||
22 | 18 | @@ -11449,5 +11449,15 @@ | ||
23 | 19 | return res; | ||
24 | 20 | } | ||
25 | 21 | |||
26 | 22 | +void | ||
27 | 23 | +ubuntu_gtk_widget_set_has_grab (GtkWidget *widget, | ||
28 | 24 | + gboolean has_grab) | ||
29 | 25 | +{ | ||
30 | 26 | + if (has_grab) | ||
31 | 27 | + GTK_OBJECT_FLAGS (widget) |= GTK_HAS_GRAB; | ||
32 | 28 | + else | ||
33 | 29 | + GTK_OBJECT_FLAGS (widget) &= ~(GTK_HAS_GRAB); | ||
34 | 30 | +} | ||
35 | 31 | + | ||
36 | 32 | #define __GTK_WIDGET_C__ | ||
37 | 33 | #include "gtkaliasdef.c" | ||
38 | 34 | Index: gtk+-2.24.12/gtk/gtkwidget.h | ||
39 | 35 | =================================================================== | ||
40 | 36 | --- gtk+-2.24.12.orig/gtk/gtkwidget.h 2011-08-16 14:30:52.000000000 +1200 | ||
41 | 37 | +++ gtk+-2.24.12/gtk/gtkwidget.h 2012-09-04 16:42:40.382564335 +1200 | ||
42 | 38 | @@ -1346,6 +1346,9 @@ | ||
43 | 39 | GtkWidget *toplevel, | ||
44 | 40 | gpointer user_data); | ||
45 | 41 | |||
46 | 42 | +void ubuntu_gtk_widget_set_has_grab (GtkWidget *widget, | ||
47 | 43 | + gboolean has_grab); | ||
48 | 44 | + | ||
49 | 45 | G_END_DECLS | ||
50 | 46 | |||
51 | 47 | #endif /* __GTK_WIDGET_H__ */ | ||
52 | 48 | 0 | ||
53 | === removed file 'debian/patches/043_ubuntu_menu_proxy.patch' | |||
54 | --- debian/patches/043_ubuntu_menu_proxy.patch 2013-02-25 03:55:42 +0000 | |||
55 | +++ debian/patches/043_ubuntu_menu_proxy.patch 1970-01-01 00:00:00 +0000 | |||
56 | @@ -1,1406 +0,0 @@ | |||
57 | 1 | ## Description: add some description | ||
58 | 2 | ## Origin/Author: add some origin or author | ||
59 | 3 | ## Bug: bug URL | ||
60 | 4 | Description: Add GtkMenuProxy support for remoting menus. | ||
61 | 5 | |||
62 | 6 | Index: gtk+2.0-2.24.8/gtk/Makefile.am | ||
63 | 7 | =================================================================== | ||
64 | 8 | --- gtk+2.0-2.24.8.orig/gtk/Makefile.am 2012-01-12 10:59:30.064850584 +0100 | ||
65 | 9 | +++ gtk+2.0-2.24.8/gtk/Makefile.am 2012-01-12 10:59:31.952859946 +0100 | ||
66 | 10 | @@ -246,6 +246,8 @@ | ||
67 | 11 | gtkmenu.h \ | ||
68 | 12 | gtkmenubar.h \ | ||
69 | 13 | gtkmenuitem.h \ | ||
70 | 14 | + ubuntumenuproxy.h \ | ||
71 | 15 | + ubuntumenuproxymodule.h \ | ||
72 | 16 | gtkmenushell.h \ | ||
73 | 17 | gtkmenutoolbutton.h \ | ||
74 | 18 | gtkmessagedialog.h \ | ||
75 | 19 | @@ -516,6 +518,8 @@ | ||
76 | 20 | gtkmenu.c \ | ||
77 | 21 | gtkmenubar.c \ | ||
78 | 22 | gtkmenuitem.c \ | ||
79 | 23 | + ubuntumenuproxy.c \ | ||
80 | 24 | + ubuntumenuproxymodule.c \ | ||
81 | 25 | gtkmenushell.c \ | ||
82 | 26 | gtkmenutoolbutton.c \ | ||
83 | 27 | gtkmessagedialog.c \ | ||
84 | 28 | Index: gtk+2.0-2.24.8/gtk/gtk.h | ||
85 | 29 | =================================================================== | ||
86 | 30 | --- gtk+2.0-2.24.8.orig/gtk/gtk.h 2012-01-12 10:59:29.888849711 +0100 | ||
87 | 31 | +++ gtk+2.0-2.24.8/gtk/gtk.h 2012-01-12 10:59:31.956859969 +0100 | ||
88 | 32 | @@ -65,6 +65,8 @@ | ||
89 | 33 | #include <gtk/gtkcellview.h> | ||
90 | 34 | #include <gtk/gtkcheckbutton.h> | ||
91 | 35 | #include <gtk/gtkcheckmenuitem.h> | ||
92 | 36 | +#include <gtk/ubuntumenuproxy.h> | ||
93 | 37 | +#include <gtk/ubuntumenuproxymodule.h> | ||
94 | 38 | #include <gtk/gtkclipboard.h> | ||
95 | 39 | #include <gtk/gtkcolorbutton.h> | ||
96 | 40 | #include <gtk/gtkcolorsel.h> | ||
97 | 41 | Index: gtk+2.0-2.24.8/gtk/gtk.symbols | ||
98 | 42 | =================================================================== | ||
99 | 43 | --- gtk+2.0-2.24.8.orig/gtk/gtk.symbols 2012-01-12 10:59:31.808859232 +0100 | ||
100 | 44 | +++ gtk+2.0-2.24.8/gtk/gtk.symbols 2012-01-12 10:59:31.956859969 +0100 | ||
101 | 45 | @@ -2600,6 +2600,21 @@ | ||
102 | 46 | #endif | ||
103 | 47 | #endif | ||
104 | 48 | |||
105 | 49 | +#if IN_HEADER(__UBUNTU_MENU_PROXY_H__) | ||
106 | 50 | +#if IN_FILE(__UBUNTU_MENU_PROXY_C__) | ||
107 | 51 | +ubuntu_menu_proxy_get_type G_GNUC_CONST | ||
108 | 52 | +ubuntu_menu_proxy_get | ||
109 | 53 | +ubuntu_menu_proxy_insert | ||
110 | 54 | +#endif | ||
111 | 55 | +#endif | ||
112 | 56 | + | ||
113 | 57 | +#if IN_HEADER(__UBUNTU_MENU_PROXY_MODULE_H__) | ||
114 | 58 | +#if IN_FILE(__UBUNTU_MENU_PROXY_MODULE_C__) | ||
115 | 59 | +ubuntu_menu_proxy_module_get_type | ||
116 | 60 | +ubuntu_menu_proxy_module_get | ||
117 | 61 | +#endif | ||
118 | 62 | +#endif | ||
119 | 63 | + | ||
120 | 64 | #if IN_HEADER(__GTK_MENU_SHELL_H__) | ||
121 | 65 | #if IN_FILE(__GTK_MENU_SHELL_C__) | ||
122 | 66 | gtk_menu_shell_activate_item | ||
123 | 67 | @@ -2614,6 +2629,7 @@ | ||
124 | 68 | gtk_menu_shell_select_item | ||
125 | 69 | gtk_menu_shell_set_take_focus | ||
126 | 70 | gtk_menu_shell_get_take_focus | ||
127 | 71 | +ubuntu_gtk_menu_shell_activate_mnemonic | ||
128 | 72 | #endif | ||
129 | 73 | #endif | ||
130 | 74 | |||
131 | 75 | Index: gtk+2.0-2.24.8/gtk/gtkmenubar.c | ||
132 | 76 | =================================================================== | ||
133 | 77 | --- gtk+2.0-2.24.8.orig/gtk/gtkmenubar.c 2012-01-12 10:59:29.968850108 +0100 | ||
134 | 78 | +++ gtk+2.0-2.24.8/gtk/gtkmenubar.c 2012-01-12 11:03:59.838188316 +0100 | ||
135 | 79 | @@ -107,7 +107,7 @@ | ||
136 | 80 | widget_class->size_allocate = gtk_menu_bar_size_allocate; | ||
137 | 81 | widget_class->expose_event = gtk_menu_bar_expose; | ||
138 | 82 | widget_class->hierarchy_changed = gtk_menu_bar_hierarchy_changed; | ||
139 | 83 | - | ||
140 | 84 | + | ||
141 | 85 | menu_shell_class->submenu_placement = GTK_TOP_BOTTOM; | ||
142 | 86 | menu_shell_class->get_popup_delay = gtk_menu_bar_get_popup_delay; | ||
143 | 87 | menu_shell_class->move_current = gtk_menu_bar_move_current; | ||
144 | 88 | @@ -218,8 +218,26 @@ | ||
145 | 89 | } | ||
146 | 90 | |||
147 | 91 | static void | ||
148 | 92 | +local_notify (GtkWidget *widget, | ||
149 | 93 | + GParamSpec *pspec, | ||
150 | 94 | + gpointer user_data) | ||
151 | 95 | +{ | ||
152 | 96 | + gboolean local; | ||
153 | 97 | + | ||
154 | 98 | + g_object_get (widget, | ||
155 | 99 | + "ubuntu-local", &local, | ||
156 | 100 | + NULL); | ||
157 | 101 | + | ||
158 | 102 | + gtk_widget_queue_resize (widget); | ||
159 | 103 | +} | ||
160 | 104 | + | ||
161 | 105 | +static void | ||
162 | 106 | gtk_menu_bar_init (GtkMenuBar *object) | ||
163 | 107 | { | ||
164 | 108 | + g_signal_connect (object, | ||
165 | 109 | + "notify::ubuntu-local", | ||
166 | 110 | + G_CALLBACK (local_notify), | ||
167 | 111 | + NULL); | ||
168 | 112 | } | ||
169 | 113 | |||
170 | 114 | GtkWidget* | ||
171 | 115 | @@ -284,13 +302,22 @@ | ||
172 | 116 | gint nchildren; | ||
173 | 117 | GtkRequisition child_requisition; | ||
174 | 118 | gint ipadding; | ||
175 | 119 | + gboolean local = FALSE; | ||
176 | 120 | |||
177 | 121 | g_return_if_fail (GTK_IS_MENU_BAR (widget)); | ||
178 | 122 | g_return_if_fail (requisition != NULL); | ||
179 | 123 | |||
180 | 124 | requisition->width = 0; | ||
181 | 125 | requisition->height = 0; | ||
182 | 126 | - | ||
183 | 127 | + | ||
184 | 128 | + g_object_get (widget, | ||
185 | 129 | + "ubuntu-local", | ||
186 | 130 | + &local, | ||
187 | 131 | + NULL); | ||
188 | 132 | + | ||
189 | 133 | + if (!local) | ||
190 | 134 | + return; | ||
191 | 135 | + | ||
192 | 136 | if (gtk_widget_get_visible (widget)) | ||
193 | 137 | { | ||
194 | 138 | menu_bar = GTK_MENU_BAR (widget); | ||
195 | 139 | @@ -367,6 +394,7 @@ | ||
196 | 140 | GtkTextDirection direction; | ||
197 | 141 | gint ltr_x, ltr_y; | ||
198 | 142 | gint ipadding; | ||
199 | 143 | + gboolean local = FALSE; | ||
200 | 144 | |||
201 | 145 | g_return_if_fail (GTK_IS_MENU_BAR (widget)); | ||
202 | 146 | g_return_if_fail (allocation != NULL); | ||
203 | 147 | @@ -377,6 +405,32 @@ | ||
204 | 148 | |||
205 | 149 | direction = gtk_widget_get_direction (widget); | ||
206 | 150 | |||
207 | 151 | + g_object_get (widget, | ||
208 | 152 | + "ubuntu-local", | ||
209 | 153 | + &local, | ||
210 | 154 | + NULL); | ||
211 | 155 | + | ||
212 | 156 | + if (!local) | ||
213 | 157 | + { | ||
214 | 158 | + GtkAllocation zero = { 0, 0, 0, 0 }; | ||
215 | 159 | + GdkWindow *window; | ||
216 | 160 | + | ||
217 | 161 | + /* We manually assign an empty allocation to the menubar to | ||
218 | 162 | + * prevent the container from attempting to draw it at all. | ||
219 | 163 | + */ | ||
220 | 164 | + gtk_widget_set_allocation (widget, &zero); | ||
221 | 165 | + | ||
222 | 166 | + /* Then we move the GdkWindow belonging to the menubar outside of | ||
223 | 167 | + * the clipping rectangle of the parent window so that we can't | ||
224 | 168 | + * see it. | ||
225 | 169 | + */ | ||
226 | 170 | + window = gtk_widget_get_window (widget); | ||
227 | 171 | + if (window != NULL) | ||
228 | 172 | + gdk_window_move_resize (window, -1, -1, 1, 1); | ||
229 | 173 | + | ||
230 | 174 | + return; | ||
231 | 175 | + } | ||
232 | 176 | + | ||
233 | 177 | widget->allocation = *allocation; | ||
234 | 178 | if (gtk_widget_get_realized (widget)) | ||
235 | 179 | gdk_window_move_resize (widget->window, | ||
236 | 180 | @@ -626,8 +680,15 @@ | ||
237 | 181 | GtkMenuShell *menu_shell = GTK_MENU_SHELL (menubars->data); | ||
238 | 182 | |||
239 | 183 | _gtk_menu_shell_set_keyboard_mode (menu_shell, TRUE); | ||
240 | 184 | - _gtk_menu_shell_activate (menu_shell); | ||
241 | 185 | - gtk_menu_shell_select_first (menu_shell, FALSE); | ||
242 | 186 | + if (ubuntu_gtk_menu_shell_activate_first (GTK_MENU_SHELL (menu_shell), FALSE)) | ||
243 | 187 | + { | ||
244 | 188 | + //g_print ("send activate to remote!\n"); | ||
245 | 189 | + } | ||
246 | 190 | + else | ||
247 | 191 | + { | ||
248 | 192 | + _gtk_menu_shell_activate (menu_shell); | ||
249 | 193 | + gtk_menu_shell_select_first (menu_shell, FALSE); | ||
250 | 194 | + } | ||
251 | 195 | |||
252 | 196 | g_list_free (menubars); | ||
253 | 197 | |||
254 | 198 | Index: gtk+2.0-2.24.8/gtk/gtkmenushell.c | ||
255 | 199 | =================================================================== | ||
256 | 200 | --- gtk+2.0-2.24.8.orig/gtk/gtkmenushell.c 2012-01-12 10:59:29.932849927 +0100 | ||
257 | 201 | +++ gtk+2.0-2.24.8/gtk/gtkmenushell.c 2012-01-12 10:59:31.960859983 +0100 | ||
258 | 202 | @@ -37,6 +37,7 @@ | ||
259 | 203 | #include "gtkmenubar.h" | ||
260 | 204 | #include "gtkmenuitem.h" | ||
261 | 205 | #include "gtkmenushell.h" | ||
262 | 206 | +#include "ubuntumenuproxy.h" | ||
263 | 207 | #include "gtkmnemonichash.h" | ||
264 | 208 | #include "gtktearoffmenuitem.h" | ||
265 | 209 | #include "gtkwindow.h" | ||
266 | 210 | @@ -64,7 +65,8 @@ | ||
267 | 211 | |||
268 | 212 | enum { | ||
269 | 213 | PROP_0, | ||
270 | 214 | - PROP_TAKE_FOCUS | ||
271 | 215 | + PROP_TAKE_FOCUS, | ||
272 | 216 | + PROP_LOCAL | ||
273 | 217 | }; | ||
274 | 218 | |||
275 | 219 | /* Terminology: | ||
276 | 220 | @@ -135,6 +137,9 @@ | ||
277 | 221 | GtkMnemonicHash *mnemonic_hash; | ||
278 | 222 | GtkKeyHash *key_hash; | ||
279 | 223 | |||
280 | 224 | + UbuntuMenuProxy *proxy; | ||
281 | 225 | + gboolean local; | ||
282 | 226 | + | ||
283 | 227 | guint take_focus : 1; | ||
284 | 228 | guint activated_submenu : 1; | ||
285 | 229 | /* This flag is a crutch to keep mnemonics in the same menu | ||
286 | 230 | @@ -381,6 +386,14 @@ | ||
287 | 231 | TRUE, | ||
288 | 232 | GTK_PARAM_READWRITE)); | ||
289 | 233 | |||
290 | 234 | + g_object_class_install_property (object_class, | ||
291 | 235 | + PROP_LOCAL, | ||
292 | 236 | + g_param_spec_boolean ("ubuntu-local", | ||
293 | 237 | + P_("Local menu"), | ||
294 | 238 | + P_("Determines whether the menu is local"), | ||
295 | 239 | + FALSE, | ||
296 | 240 | + GTK_PARAM_READWRITE)); | ||
297 | 241 | + | ||
298 | 242 | g_type_class_add_private (object_class, sizeof (GtkMenuShellPrivate)); | ||
299 | 243 | } | ||
300 | 244 | |||
301 | 245 | @@ -391,6 +404,14 @@ | ||
302 | 246 | } | ||
303 | 247 | |||
304 | 248 | static void | ||
305 | 249 | +show_local_notify (UbuntuMenuProxy *proxy, | ||
306 | 250 | + GParamSpec *pspec, | ||
307 | 251 | + GtkMenuShell *shell) | ||
308 | 252 | +{ | ||
309 | 253 | + g_object_notify (shell, "ubuntu-local"); | ||
310 | 254 | +} | ||
311 | 255 | + | ||
312 | 256 | +static void | ||
313 | 257 | gtk_menu_shell_init (GtkMenuShell *menu_shell) | ||
314 | 258 | { | ||
315 | 259 | GtkMenuShellPrivate *priv = GTK_MENU_SHELL_GET_PRIVATE (menu_shell); | ||
316 | 260 | @@ -408,6 +429,13 @@ | ||
317 | 261 | priv->key_hash = NULL; | ||
318 | 262 | priv->take_focus = TRUE; | ||
319 | 263 | priv->activated_submenu = FALSE; | ||
320 | 264 | + priv->proxy = ubuntu_menu_proxy_get (); | ||
321 | 265 | + priv->local = FALSE; | ||
322 | 266 | + | ||
323 | 267 | + if (priv->proxy != NULL) | ||
324 | 268 | + g_signal_connect (priv->proxy, "notify::show-local", | ||
325 | 269 | + G_CALLBACK (show_local_notify), | ||
326 | 270 | + menu_shell); | ||
327 | 271 | } | ||
328 | 272 | |||
329 | 273 | static void | ||
330 | 274 | @@ -417,12 +445,16 @@ | ||
331 | 275 | GParamSpec *pspec) | ||
332 | 276 | { | ||
333 | 277 | GtkMenuShell *menu_shell = GTK_MENU_SHELL (object); | ||
334 | 278 | + GtkMenuShellPrivate *priv = GTK_MENU_SHELL_GET_PRIVATE (object); | ||
335 | 279 | |||
336 | 280 | switch (prop_id) | ||
337 | 281 | { | ||
338 | 282 | case PROP_TAKE_FOCUS: | ||
339 | 283 | gtk_menu_shell_set_take_focus (menu_shell, g_value_get_boolean (value)); | ||
340 | 284 | break; | ||
341 | 285 | + case PROP_LOCAL: | ||
342 | 286 | + priv->local = g_value_get_boolean (value); | ||
343 | 287 | + break; | ||
344 | 288 | default: | ||
345 | 289 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); | ||
346 | 290 | break; | ||
347 | 291 | @@ -436,12 +468,23 @@ | ||
348 | 292 | GParamSpec *pspec) | ||
349 | 293 | { | ||
350 | 294 | GtkMenuShell *menu_shell = GTK_MENU_SHELL (object); | ||
351 | 295 | + GtkMenuShellPrivate *priv = GTK_MENU_SHELL_GET_PRIVATE (menu_shell); | ||
352 | 296 | + gboolean local; | ||
353 | 297 | |||
354 | 298 | switch (prop_id) | ||
355 | 299 | { | ||
356 | 300 | case PROP_TAKE_FOCUS: | ||
357 | 301 | g_value_set_boolean (value, gtk_menu_shell_get_take_focus (menu_shell)); | ||
358 | 302 | break; | ||
359 | 303 | + case PROP_LOCAL: | ||
360 | 304 | + if (priv->proxy == NULL || ubuntu_menu_proxy_show_local (priv->proxy)) { | ||
361 | 305 | + local = TRUE; | ||
362 | 306 | + } else { | ||
363 | 307 | + local = priv->local; | ||
364 | 308 | + } | ||
365 | 309 | + | ||
366 | 310 | + g_value_set_boolean (value, local); | ||
367 | 311 | + break; | ||
368 | 312 | default: | ||
369 | 313 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); | ||
370 | 314 | break; | ||
371 | 315 | @@ -454,6 +497,13 @@ | ||
372 | 316 | GtkMenuShell *menu_shell = GTK_MENU_SHELL (object); | ||
373 | 317 | GtkMenuShellPrivate *priv = GTK_MENU_SHELL_GET_PRIVATE (menu_shell); | ||
374 | 318 | |||
375 | 319 | + if (priv->proxy != NULL) | ||
376 | 320 | + { | ||
377 | 321 | + g_signal_handlers_disconnect_by_func (priv->proxy, | ||
378 | 322 | + show_local_notify, | ||
379 | 323 | + menu_shell); | ||
380 | 324 | + } | ||
381 | 325 | + | ||
382 | 326 | if (priv->mnemonic_hash) | ||
383 | 327 | _gtk_mnemonic_hash_free (priv->mnemonic_hash); | ||
384 | 328 | if (priv->key_hash) | ||
385 | 329 | @@ -483,10 +533,21 @@ | ||
386 | 330 | GtkWidget *child, | ||
387 | 331 | gint position) | ||
388 | 332 | { | ||
389 | 333 | + GtkMenuShellPrivate *priv; | ||
390 | 334 | + | ||
391 | 335 | g_return_if_fail (GTK_IS_MENU_SHELL (menu_shell)); | ||
392 | 336 | g_return_if_fail (GTK_IS_MENU_ITEM (child)); | ||
393 | 337 | |||
394 | 338 | + priv = GTK_MENU_SHELL_GET_PRIVATE (menu_shell); | ||
395 | 339 | + | ||
396 | 340 | g_signal_emit (menu_shell, menu_shell_signals[INSERT], 0, child, position); | ||
397 | 341 | + | ||
398 | 342 | + /* insert to proxy */ | ||
399 | 343 | + if (priv->proxy != NULL) | ||
400 | 344 | + ubuntu_menu_proxy_insert (priv->proxy, | ||
401 | 345 | + GTK_WIDGET (menu_shell), | ||
402 | 346 | + child, | ||
403 | 347 | + position); | ||
404 | 348 | } | ||
405 | 349 | |||
406 | 350 | static void | ||
407 | 351 | @@ -1815,5 +1875,52 @@ | ||
408 | 352 | } | ||
409 | 353 | } | ||
410 | 354 | |||
411 | 355 | +gboolean | ||
412 | 356 | +ubuntu_gtk_menu_shell_activate_mnemonic (GtkMenuShell *shell, GtkWidget *item) | ||
413 | 357 | +{ | ||
414 | 358 | + GtkMenuShellPrivate *priv; | ||
415 | 359 | + | ||
416 | 360 | + g_return_val_if_fail (GTK_IS_MENU_SHELL (shell), FALSE); | ||
417 | 361 | + | ||
418 | 362 | + priv = GTK_MENU_SHELL_GET_PRIVATE (shell); | ||
419 | 363 | + | ||
420 | 364 | + if (priv->proxy && !ubuntu_menu_proxy_show_local (priv->proxy)) | ||
421 | 365 | + { | ||
422 | 366 | + ubuntu_menu_proxy_activate_menu (priv->proxy, | ||
423 | 367 | + item); | ||
424 | 368 | + | ||
425 | 369 | + return TRUE; | ||
426 | 370 | + } | ||
427 | 371 | + | ||
428 | 372 | + return FALSE; | ||
429 | 373 | +} | ||
430 | 374 | + | ||
431 | 375 | +gboolean | ||
432 | 376 | +ubuntu_gtk_menu_shell_activate_first (GtkMenuShell *menu_shell, | ||
433 | 377 | + gboolean search_sensitive) | ||
434 | 378 | +{ | ||
435 | 379 | + GtkWidget *to_select = NULL; | ||
436 | 380 | + GList *tmp_list; | ||
437 | 381 | + | ||
438 | 382 | + tmp_list = menu_shell->children; | ||
439 | 383 | + while (tmp_list) | ||
440 | 384 | + { | ||
441 | 385 | + GtkWidget *child = tmp_list->data; | ||
442 | 386 | + | ||
443 | 387 | + if ((!search_sensitive && gtk_widget_get_visible (child)) || | ||
444 | 388 | + _gtk_menu_item_is_selectable (child)) | ||
445 | 389 | + { | ||
446 | 390 | + to_select = child; | ||
447 | 391 | + if (!GTK_IS_TEAROFF_MENU_ITEM (child)) | ||
448 | 392 | + break; | ||
449 | 393 | + } | ||
450 | 394 | + | ||
451 | 395 | + tmp_list = tmp_list->next; | ||
452 | 396 | + } | ||
453 | 397 | + | ||
454 | 398 | + return to_select && | ||
455 | 399 | + ubuntu_gtk_menu_shell_activate_mnemonic(menu_shell, to_select); | ||
456 | 400 | +} | ||
457 | 401 | + | ||
458 | 402 | #define __GTK_MENU_SHELL_C__ | ||
459 | 403 | #include "gtkaliasdef.c" | ||
460 | 404 | Index: gtk+2.0-2.24.8/gtk/tests/Makefile.am | ||
461 | 405 | =================================================================== | ||
462 | 406 | --- gtk+2.0-2.24.8.orig/gtk/tests/Makefile.am 2012-01-12 10:59:30.004850284 +0100 | ||
463 | 407 | +++ gtk+2.0-2.24.8/gtk/tests/Makefile.am 2012-01-12 10:59:31.960859983 +0100 | ||
464 | 408 | @@ -45,6 +45,10 @@ | ||
465 | 409 | recentmanager_SOURCES = recentmanager.c | ||
466 | 410 | recentmanager_LDADD = $(progs_ldadd) | ||
467 | 411 | |||
468 | 412 | +TEST_PROGS += menuproxy | ||
469 | 413 | +menuproxy_SOURCES = menuproxy.c | ||
470 | 414 | +menuproxy_LDADD = $(progs_ldadd) | ||
471 | 415 | + | ||
472 | 416 | TEST_PROGS += floating | ||
473 | 417 | floating_SOURCES = floating.c | ||
474 | 418 | floating_LDADD = $(progs_ldadd) | ||
475 | 419 | Index: gtk+2.0-2.24.8/gtk/tests/menuproxy.c | ||
476 | 420 | =================================================================== | ||
477 | 421 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
478 | 422 | +++ gtk+2.0-2.24.8/gtk/tests/menuproxy.c 2012-01-12 10:59:31.960859983 +0100 | ||
479 | 423 | @@ -0,0 +1,278 @@ | ||
480 | 424 | +/* | ||
481 | 425 | + * Copyright (C) 2009 Canonical, Ltd. | ||
482 | 426 | + * | ||
483 | 427 | + * This library is free software; you can redistribute it and/or | ||
484 | 428 | + * modify it under the terms of the GNU Lesser General Public | ||
485 | 429 | + * License as published by the Free Software Foundation; either | ||
486 | 430 | + * version 2 of the License, or (at your option) any later version. | ||
487 | 431 | + * | ||
488 | 432 | + * This library is distributed in the hope that it will be useful, | ||
489 | 433 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
490 | 434 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
491 | 435 | + * Lesser General Public License for more details. | ||
492 | 436 | + * | ||
493 | 437 | + * You should have received a copy of the GNU Lesser General Public | ||
494 | 438 | + * License along with this library; if not, write to the | ||
495 | 439 | + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
496 | 440 | + * Boston, MA 02111-1307, USA. | ||
497 | 441 | + * | ||
498 | 442 | + * Authors: Cody Russell <bratsche@gnome.org> | ||
499 | 443 | + */ | ||
500 | 444 | + | ||
501 | 445 | +#undef GTK_DISABLE_DEPRECATED | ||
502 | 446 | +#include "../gtk/gtk.h" | ||
503 | 447 | + | ||
504 | 448 | +typedef struct _TestProxy TestProxy; | ||
505 | 449 | +typedef struct _TestProxyClass TestProxyClass; | ||
506 | 450 | + | ||
507 | 451 | +//static GType test_proxy_type_id = 0; | ||
508 | 452 | +//static TestProxyClass *test_proxy_parent_class = NULL; | ||
509 | 453 | + | ||
510 | 454 | +#define TEST_TYPE_PROXY (test_proxy_type_id) | ||
511 | 455 | +#define TEST_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TEST_TYPE_PROXY, TestProxy)) | ||
512 | 456 | +#define TEST_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), TEST_TYPE_PROXY, TestProxyClass)) | ||
513 | 457 | +#define TEST_IS_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TEST_TYPE_PROXY)) | ||
514 | 458 | + | ||
515 | 459 | +struct _TestProxy | ||
516 | 460 | +{ | ||
517 | 461 | + UbuntuMenuProxy parent_object; | ||
518 | 462 | +}; | ||
519 | 463 | + | ||
520 | 464 | +struct _TestProxyClass | ||
521 | 465 | +{ | ||
522 | 466 | + UbuntuMenuProxyClass parent_class; | ||
523 | 467 | +}; | ||
524 | 468 | + | ||
525 | 469 | +static void test_proxy_insert (UbuntuMenuProxy *proxy, | ||
526 | 470 | + GtkWidget *child, | ||
527 | 471 | + guint position); | ||
528 | 472 | + | ||
529 | 473 | +G_DEFINE_DYNAMIC_TYPE(TestProxy, test_proxy, UBUNTU_TYPE_MENU_PROXY) | ||
530 | 474 | + | ||
531 | 475 | +static void | ||
532 | 476 | +test_proxy_init (TestProxy *proxy) | ||
533 | 477 | +{ | ||
534 | 478 | +} | ||
535 | 479 | + | ||
536 | 480 | +static void | ||
537 | 481 | +test_proxy_class_init (TestProxyClass *class) | ||
538 | 482 | +{ | ||
539 | 483 | + UbuntuMenuProxyClass *proxy_class = UBUNTU_MENU_PROXY_CLASS (class); | ||
540 | 484 | + | ||
541 | 485 | + test_proxy_parent_class = g_type_class_peek_parent (class); | ||
542 | 486 | + | ||
543 | 487 | + proxy_class->insert = test_proxy_insert; | ||
544 | 488 | +} | ||
545 | 489 | + | ||
546 | 490 | +static void | ||
547 | 491 | +test_proxy_class_finalize (TestProxyClass *class) | ||
548 | 492 | +{ | ||
549 | 493 | +} | ||
550 | 494 | + | ||
551 | 495 | +static void | ||
552 | 496 | +test_proxy_insert (UbuntuMenuProxy *proxy, | ||
553 | 497 | + GtkWidget *child, | ||
554 | 498 | + guint position) | ||
555 | 499 | +{ | ||
556 | 500 | +} | ||
557 | 501 | + | ||
558 | 502 | +/* ---------------------------------------------------- */ | ||
559 | 503 | + | ||
560 | 504 | +#define TEST_TYPE_MODULE (test_module_get_type ()) | ||
561 | 505 | +#define TEST_MODULE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TEST_TYPE_MODULE, TestModule)) | ||
562 | 506 | +#define TEST_MODULE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), TEST_TYPE_MODULE, TestModuleClass)) | ||
563 | 507 | +#define TEST_IS_MODULE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TEST_TYPE_MODULE)) | ||
564 | 508 | +#define TEST_IS_MODULE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TEST_TYPE_MODULE)) | ||
565 | 509 | +#define TEST_MODULE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TEST_TYPE_MODULE, TestModuleClass)) | ||
566 | 510 | + | ||
567 | 511 | + | ||
568 | 512 | +typedef struct _TestModule TestModule; | ||
569 | 513 | +typedef struct _TestModuleClass TestModuleClass; | ||
570 | 514 | + | ||
571 | 515 | +struct _TestModule | ||
572 | 516 | +{ | ||
573 | 517 | + GTypeModule parent_instance; | ||
574 | 518 | +}; | ||
575 | 519 | + | ||
576 | 520 | +struct _TestModuleClass | ||
577 | 521 | +{ | ||
578 | 522 | + GTypeModuleClass parent_class; | ||
579 | 523 | +}; | ||
580 | 524 | + | ||
581 | 525 | +static gboolean | ||
582 | 526 | +test_module_load (GTypeModule *module) | ||
583 | 527 | +{ | ||
584 | 528 | + g_print ("registering type...\n"); | ||
585 | 529 | + g_print (" type_id = %d\n", test_proxy_type_id); | ||
586 | 530 | + | ||
587 | 531 | + test_proxy_register_type (G_TYPE_MODULE (module)); | ||
588 | 532 | + | ||
589 | 533 | + //test_proxy_get_type (G_TYPE_MODULE (module)); | ||
590 | 534 | + | ||
591 | 535 | + g_print (" type_id = %d\n", test_proxy_type_id); | ||
592 | 536 | + | ||
593 | 537 | + return TRUE; | ||
594 | 538 | +} | ||
595 | 539 | + | ||
596 | 540 | +static void | ||
597 | 541 | +test_module_unload (GTypeModule *module) | ||
598 | 542 | +{ | ||
599 | 543 | +} | ||
600 | 544 | + | ||
601 | 545 | +static void | ||
602 | 546 | +test_module_class_init (TestModuleClass *class) | ||
603 | 547 | +{ | ||
604 | 548 | + GTypeModuleClass *type_module_class = G_TYPE_MODULE_CLASS (class); | ||
605 | 549 | + | ||
606 | 550 | + type_module_class->load = test_module_load; | ||
607 | 551 | + type_module_class->unload = test_module_unload; | ||
608 | 552 | +} | ||
609 | 553 | + | ||
610 | 554 | +static void | ||
611 | 555 | +test_module_init (TestModule *module) | ||
612 | 556 | +{ | ||
613 | 557 | +} | ||
614 | 558 | + | ||
615 | 559 | +G_DEFINE_TYPE (TestModule, test_module, G_TYPE_TYPE_MODULE); | ||
616 | 560 | + | ||
617 | 561 | +TestModule * | ||
618 | 562 | +test_module_new (void) | ||
619 | 563 | +{ | ||
620 | 564 | + TestModule *module = g_object_new (TEST_TYPE_MODULE, | ||
621 | 565 | + NULL); | ||
622 | 566 | + | ||
623 | 567 | + g_print ("test_module_new(): %p\n", module); | ||
624 | 568 | + | ||
625 | 569 | + return module; | ||
626 | 570 | +} | ||
627 | 571 | + | ||
628 | 572 | + | ||
629 | 573 | +/* ---------------------------------------------------- */ | ||
630 | 574 | + | ||
631 | 575 | +static void | ||
632 | 576 | +non_null_proxy_test (void) | ||
633 | 577 | +{ | ||
634 | 578 | + UbuntuMenuProxyModule *module; | ||
635 | 579 | + | ||
636 | 580 | + /* prevent the module loader from finding a proxy module */ | ||
637 | 581 | + g_unsetenv ("UBUNTU_MENUPROXY"); | ||
638 | 582 | + | ||
639 | 583 | + module = ubuntu_menu_proxy_module_get (); | ||
640 | 584 | + test_proxy_register_type (G_TYPE_MODULE (module)); | ||
641 | 585 | + //test_proxy_get_type (G_TYPE_MODULE (module)); | ||
642 | 586 | + | ||
643 | 587 | + GtkWidget *widget = g_object_new (GTK_TYPE_MENU_BAR, NULL); | ||
644 | 588 | + g_object_ref_sink (widget); | ||
645 | 589 | + | ||
646 | 590 | + g_assert (GTK_IS_MENU_BAR (widget)); | ||
647 | 591 | + //g_assert (GTK_MENU_SHELL (widget)->proxy != NULL); | ||
648 | 592 | + | ||
649 | 593 | + g_object_unref (widget); | ||
650 | 594 | +} | ||
651 | 595 | + | ||
652 | 596 | +static void | ||
653 | 597 | +null_proxy_test (void) | ||
654 | 598 | +{ | ||
655 | 599 | + GtkWidget *widget = g_object_new (GTK_TYPE_MENU_BAR, NULL); | ||
656 | 600 | + g_object_ref_sink (widget); | ||
657 | 601 | + | ||
658 | 602 | + g_assert (GTK_IS_MENU_BAR (widget)); | ||
659 | 603 | + | ||
660 | 604 | + //g_assert (GTK_MENU_SHELL (widget)->proxy == NULL); | ||
661 | 605 | + | ||
662 | 606 | + g_object_unref (widget); | ||
663 | 607 | +} | ||
664 | 608 | + | ||
665 | 609 | +static gboolean inserted_called = FALSE; | ||
666 | 610 | + | ||
667 | 611 | +static void | ||
668 | 612 | +inserted_cb (UbuntuMenuProxy *proxy, | ||
669 | 613 | + GtkWidget *child, | ||
670 | 614 | + guint position, | ||
671 | 615 | + gpointer data) | ||
672 | 616 | +{ | ||
673 | 617 | + g_return_if_fail (UBUNTU_IS_MENU_PROXY (proxy)); | ||
674 | 618 | + g_return_if_fail (GTK_IS_WIDGET (child)); | ||
675 | 619 | + inserted_called = TRUE; | ||
676 | 620 | +} | ||
677 | 621 | + | ||
678 | 622 | +static void | ||
679 | 623 | +menubar_signals_proxy_test (void) | ||
680 | 624 | +{ | ||
681 | 625 | + GtkWidget *widget = NULL; | ||
682 | 626 | + GtkWidget *menuitem = NULL; | ||
683 | 627 | + UbuntuMenuProxy *proxy; | ||
684 | 628 | + | ||
685 | 629 | + //ubuntu_menu_proxy_register_type (test_proxy_get_type ()); | ||
686 | 630 | + | ||
687 | 631 | + widget = g_object_new (GTK_TYPE_MENU_BAR, NULL); | ||
688 | 632 | + g_object_ref_sink (widget); | ||
689 | 633 | + | ||
690 | 634 | + g_assert (GTK_IS_MENU_BAR (widget)); | ||
691 | 635 | + //g_assert (GTK_MENU_SHELL (widget)->proxy != NULL); | ||
692 | 636 | + | ||
693 | 637 | + /* | ||
694 | 638 | + proxy = GTK_MENU_SHELL (widget)->proxy; | ||
695 | 639 | + | ||
696 | 640 | + g_signal_connect (proxy, | ||
697 | 641 | + "inserted", G_CALLBACK (inserted_cb), | ||
698 | 642 | + NULL); | ||
699 | 643 | + */ | ||
700 | 644 | + | ||
701 | 645 | + // insert menuitem | ||
702 | 646 | + menuitem = gtk_menu_item_new_with_label ("Test Item"); | ||
703 | 647 | + gtk_menu_shell_append (GTK_MENU_SHELL (widget), | ||
704 | 648 | + menuitem); | ||
705 | 649 | + | ||
706 | 650 | + g_assert (inserted_called == TRUE); | ||
707 | 651 | + | ||
708 | 652 | + g_object_unref (widget); | ||
709 | 653 | +} | ||
710 | 654 | + | ||
711 | 655 | +static void | ||
712 | 656 | +proxy_type_exists_test (void) | ||
713 | 657 | +{ | ||
714 | 658 | +#if 0 | ||
715 | 659 | + UbuntuMenuProxyModule *module; | ||
716 | 660 | + | ||
717 | 661 | + g_unsetenv ("GTK_MENUPROXY"); | ||
718 | 662 | + | ||
719 | 663 | + module = ubuntu_menu_proxy_module_get (); | ||
720 | 664 | + test_proxy_get_type (G_TYPE_MODULE (module)); | ||
721 | 665 | +#endif | ||
722 | 666 | + | ||
723 | 667 | + g_assert (ubuntu_menu_proxy_get_type () != 0); | ||
724 | 668 | +} | ||
725 | 669 | + | ||
726 | 670 | +static void | ||
727 | 671 | +can_instantiate_test (void) | ||
728 | 672 | +{ | ||
729 | 673 | + TestModule *module = test_module_new (); | ||
730 | 674 | + | ||
731 | 675 | + g_type_module_use (G_TYPE_MODULE (module)); | ||
732 | 676 | + | ||
733 | 677 | + UbuntuMenuProxy *proxy = ubuntu_menu_proxy_get (); | ||
734 | 678 | + | ||
735 | 679 | + g_assert (proxy != NULL); | ||
736 | 680 | + | ||
737 | 681 | + g_object_ref_sink (proxy); | ||
738 | 682 | + | ||
739 | 683 | + g_assert (TEST_IS_PROXY (proxy)); | ||
740 | 684 | + g_assert (UBUNTU_IS_MENU_PROXY (proxy)); | ||
741 | 685 | + | ||
742 | 686 | + g_object_unref (proxy); | ||
743 | 687 | +} | ||
744 | 688 | + | ||
745 | 689 | +int | ||
746 | 690 | +main (int argc, char *argv[]) | ||
747 | 691 | +{ | ||
748 | 692 | + gtk_test_init (&argc, &argv); | ||
749 | 693 | + | ||
750 | 694 | + g_test_add_func ("/proxy/null-proxy", null_proxy_test); | ||
751 | 695 | + g_test_add_func ("/proxy/type-exists", proxy_type_exists_test); | ||
752 | 696 | + g_test_add_func ("/proxy/can-instantiate", can_instantiate_test); | ||
753 | 697 | + g_test_add_func ("/proxy/non-null-proxy", non_null_proxy_test); | ||
754 | 698 | + g_test_add_func ("/proxy/menubar-signals-proxy", menubar_signals_proxy_test); | ||
755 | 699 | + | ||
756 | 700 | + return g_test_run(); | ||
757 | 701 | +} | ||
758 | 702 | Index: gtk+2.0-2.24.8/gtk/ubuntumenuproxy.c | ||
759 | 703 | =================================================================== | ||
760 | 704 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
761 | 705 | +++ gtk+2.0-2.24.8/gtk/ubuntumenuproxy.c 2012-01-12 10:59:31.960859983 +0100 | ||
762 | 706 | @@ -0,0 +1,249 @@ | ||
763 | 707 | +/* | ||
764 | 708 | + * Copyright (C) 2010 Canonical, Ltd. | ||
765 | 709 | + * | ||
766 | 710 | + * This library is free software; you can redistribute it and/or | ||
767 | 711 | + * modify it under the terms of the GNU Lesser General Public | ||
768 | 712 | + * License as published by the Free Software Foundation; either | ||
769 | 713 | + * version 2 of the License, or (at your option) any later version. | ||
770 | 714 | + * | ||
771 | 715 | + * This library is distributed in the hope that it will be useful, | ||
772 | 716 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
773 | 717 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
774 | 718 | + * Lesser General Public License for more details. | ||
775 | 719 | + * | ||
776 | 720 | + * You should have received a copy of the GNU Lesser General Public | ||
777 | 721 | + * License along with this library; if not, write to the | ||
778 | 722 | + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
779 | 723 | + * Boston, MA 02111-1307, USA. | ||
780 | 724 | + * | ||
781 | 725 | + * Authors: Cody Russell <bratsche@gnome.org> | ||
782 | 726 | + */ | ||
783 | 727 | + | ||
784 | 728 | +#include "config.h" | ||
785 | 729 | +#include "gtkintl.h" | ||
786 | 730 | +#include "gtkmarshalers.h" | ||
787 | 731 | +#include "ubuntumenuproxy.h" | ||
788 | 732 | +#include "ubuntumenuproxymodule.h" | ||
789 | 733 | +#include "gtkmodules.h" | ||
790 | 734 | +#include "gtkprivate.h" | ||
791 | 735 | +#include "gtkalias.h" | ||
792 | 736 | + | ||
793 | 737 | +enum { | ||
794 | 738 | + PROP_0, | ||
795 | 739 | + PROP_SHOW_LOCAL | ||
796 | 740 | +}; | ||
797 | 741 | + | ||
798 | 742 | +enum { | ||
799 | 743 | + INSERTED, | ||
800 | 744 | + LOCAL_NOTIFY, | ||
801 | 745 | + ACTIVATE_MENU, | ||
802 | 746 | + LAST_SIGNAL | ||
803 | 747 | +}; | ||
804 | 748 | + | ||
805 | 749 | +#define UBUNTU_MENU_PROXY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UBUNTU_TYPE_MENU_PROXY, UbuntuMenuProxyPrivate)) | ||
806 | 750 | + | ||
807 | 751 | +typedef struct _UbuntuMenuProxyPrivate UbuntuMenuProxyPrivate; | ||
808 | 752 | + | ||
809 | 753 | +struct _UbuntuMenuProxyPrivate | ||
810 | 754 | +{ | ||
811 | 755 | + gboolean show_local; | ||
812 | 756 | +}; | ||
813 | 757 | + | ||
814 | 758 | +static guint menu_proxy_signals[LAST_SIGNAL] = { 0 }; | ||
815 | 759 | +static GObjectClass *parent_class = NULL; | ||
816 | 760 | +static UbuntuMenuProxy *proxy_singleton = NULL; | ||
817 | 761 | + | ||
818 | 762 | +static void ubuntu_menu_proxy_real_insert (UbuntuMenuProxy *proxy, | ||
819 | 763 | + GtkWidget *parent, | ||
820 | 764 | + GtkWidget *child, | ||
821 | 765 | + guint position); | ||
822 | 766 | +static gboolean ubuntu_menu_proxy_real_show_local (UbuntuMenuProxy *proxy); | ||
823 | 767 | + | ||
824 | 768 | + | ||
825 | 769 | + | ||
826 | 770 | +/* --------------------------------------------------------- */ | ||
827 | 771 | + | ||
828 | 772 | +G_DEFINE_TYPE (UbuntuMenuProxy, ubuntu_menu_proxy, G_TYPE_OBJECT) | ||
829 | 773 | + | ||
830 | 774 | +static GObject * | ||
831 | 775 | +ubuntu_menu_proxy_constructor (GType type, | ||
832 | 776 | + guint n_params, | ||
833 | 777 | + GObjectConstructParam *params) | ||
834 | 778 | +{ | ||
835 | 779 | + GObject *object; | ||
836 | 780 | + | ||
837 | 781 | + if (proxy_singleton != NULL) | ||
838 | 782 | + { | ||
839 | 783 | + object = g_object_ref (proxy_singleton); | ||
840 | 784 | + } | ||
841 | 785 | + else | ||
842 | 786 | + { | ||
843 | 787 | + object = G_OBJECT_CLASS (ubuntu_menu_proxy_parent_class)->constructor (type, | ||
844 | 788 | + n_params, | ||
845 | 789 | + params); | ||
846 | 790 | + | ||
847 | 791 | + proxy_singleton = UBUNTU_MENU_PROXY (object); | ||
848 | 792 | + g_object_add_weak_pointer (object, (gpointer) &proxy_singleton); | ||
849 | 793 | + } | ||
850 | 794 | + | ||
851 | 795 | + return object; | ||
852 | 796 | +} | ||
853 | 797 | + | ||
854 | 798 | +static void | ||
855 | 799 | +ubuntu_menu_proxy_init (UbuntuMenuProxy *proxy) | ||
856 | 800 | +{ | ||
857 | 801 | +} | ||
858 | 802 | + | ||
859 | 803 | +static void | ||
860 | 804 | +ubuntu_menu_proxy_get_property (GObject *object, | ||
861 | 805 | + guint prop_id, | ||
862 | 806 | + GValue *value, | ||
863 | 807 | + GParamSpec *pspec) | ||
864 | 808 | +{ | ||
865 | 809 | + UbuntuMenuProxyPrivate *priv = UBUNTU_MENU_PROXY_GET_PRIVATE (object); | ||
866 | 810 | + | ||
867 | 811 | + switch (prop_id) | ||
868 | 812 | + { | ||
869 | 813 | + case PROP_SHOW_LOCAL: | ||
870 | 814 | + g_value_set_boolean (value, priv->show_local); | ||
871 | 815 | + break; | ||
872 | 816 | + | ||
873 | 817 | + default: | ||
874 | 818 | + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); | ||
875 | 819 | + break; | ||
876 | 820 | + } | ||
877 | 821 | +} | ||
878 | 822 | + | ||
879 | 823 | +static void | ||
880 | 824 | +ubuntu_menu_proxy_set_property (GObject *object, | ||
881 | 825 | + guint prop_id, | ||
882 | 826 | + const GValue *value, | ||
883 | 827 | + GParamSpec *pspec) | ||
884 | 828 | +{ | ||
885 | 829 | + UbuntuMenuProxyPrivate *priv = UBUNTU_MENU_PROXY_GET_PRIVATE (object); | ||
886 | 830 | + | ||
887 | 831 | + switch (prop_id) | ||
888 | 832 | + { | ||
889 | 833 | + case PROP_SHOW_LOCAL: | ||
890 | 834 | + priv->show_local = g_value_get_boolean (value); | ||
891 | 835 | + g_signal_emit (object, menu_proxy_signals[LOCAL_NOTIFY], 0, priv->show_local); | ||
892 | 836 | + break; | ||
893 | 837 | + | ||
894 | 838 | + default: | ||
895 | 839 | + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); | ||
896 | 840 | + break; | ||
897 | 841 | + } | ||
898 | 842 | +} | ||
899 | 843 | + | ||
900 | 844 | +static void | ||
901 | 845 | +ubuntu_menu_proxy_class_init (UbuntuMenuProxyClass *class) | ||
902 | 846 | +{ | ||
903 | 847 | + GObjectClass *object_class = G_OBJECT_CLASS (class); | ||
904 | 848 | + | ||
905 | 849 | + parent_class = g_type_class_peek_parent (class); | ||
906 | 850 | + | ||
907 | 851 | + object_class->get_property = ubuntu_menu_proxy_get_property; | ||
908 | 852 | + object_class->set_property = ubuntu_menu_proxy_set_property; | ||
909 | 853 | + | ||
910 | 854 | + g_object_class_install_property (object_class, | ||
911 | 855 | + PROP_SHOW_LOCAL, | ||
912 | 856 | + g_param_spec_boolean ("show-local", | ||
913 | 857 | + P_("Show the local menu"), | ||
914 | 858 | + P_("Whether the menu is displayed locally"), | ||
915 | 859 | + FALSE, | ||
916 | 860 | + GTK_PARAM_READWRITE)); | ||
917 | 861 | + | ||
918 | 862 | + menu_proxy_signals[INSERTED] = | ||
919 | 863 | + g_signal_new (I_("inserted"), | ||
920 | 864 | + G_TYPE_FROM_CLASS (class), | ||
921 | 865 | + G_SIGNAL_RUN_LAST, | ||
922 | 866 | + G_STRUCT_OFFSET (UbuntuMenuProxyClass, inserted), | ||
923 | 867 | + NULL, NULL, | ||
924 | 868 | + _gtk_marshal_VOID__OBJECT_UINT, | ||
925 | 869 | + G_TYPE_NONE, 2, | ||
926 | 870 | + GTK_TYPE_WIDGET, G_TYPE_UINT); | ||
927 | 871 | + | ||
928 | 872 | + menu_proxy_signals[LOCAL_NOTIFY] = | ||
929 | 873 | + g_signal_new (I_("local-notify"), | ||
930 | 874 | + G_TYPE_FROM_CLASS (class), | ||
931 | 875 | + G_SIGNAL_RUN_LAST, | ||
932 | 876 | + NULL, | ||
933 | 877 | + NULL, NULL, | ||
934 | 878 | + _gtk_marshal_VOID__BOOLEAN, | ||
935 | 879 | + G_TYPE_NONE, 1, | ||
936 | 880 | + G_TYPE_BOOLEAN); | ||
937 | 881 | + | ||
938 | 882 | + menu_proxy_signals[ACTIVATE_MENU] = | ||
939 | 883 | + g_signal_new (I_("activate-menu"), | ||
940 | 884 | + G_TYPE_FROM_CLASS (class), | ||
941 | 885 | + G_SIGNAL_RUN_LAST, | ||
942 | 886 | + NULL, | ||
943 | 887 | + NULL, NULL, | ||
944 | 888 | + _gtk_marshal_VOID__OBJECT, | ||
945 | 889 | + G_TYPE_NONE, 1, | ||
946 | 890 | + G_TYPE_OBJECT); | ||
947 | 891 | + | ||
948 | 892 | + class->insert = ubuntu_menu_proxy_real_insert; | ||
949 | 893 | + class->show_local = ubuntu_menu_proxy_real_show_local; | ||
950 | 894 | + | ||
951 | 895 | + object_class->constructor = ubuntu_menu_proxy_constructor; | ||
952 | 896 | + | ||
953 | 897 | + g_type_class_add_private (object_class, sizeof (UbuntuMenuProxyPrivate)); | ||
954 | 898 | +} | ||
955 | 899 | + | ||
956 | 900 | +UbuntuMenuProxy * | ||
957 | 901 | +ubuntu_menu_proxy_get (void) | ||
958 | 902 | +{ | ||
959 | 903 | + if (!proxy_singleton) | ||
960 | 904 | + { | ||
961 | 905 | + ubuntu_menu_proxy_module_get (); | ||
962 | 906 | + } | ||
963 | 907 | + | ||
964 | 908 | + return proxy_singleton; | ||
965 | 909 | +} | ||
966 | 910 | + | ||
967 | 911 | +static void | ||
968 | 912 | +ubuntu_menu_proxy_real_insert (UbuntuMenuProxy *proxy, | ||
969 | 913 | + GtkWidget *parent, | ||
970 | 914 | + GtkWidget *child, | ||
971 | 915 | + guint position) | ||
972 | 916 | +{ | ||
973 | 917 | +} | ||
974 | 918 | + | ||
975 | 919 | +static gboolean | ||
976 | 920 | +ubuntu_menu_proxy_real_show_local (UbuntuMenuProxy *proxy) | ||
977 | 921 | +{ | ||
978 | 922 | + return TRUE; | ||
979 | 923 | +} | ||
980 | 924 | + | ||
981 | 925 | +void | ||
982 | 926 | +ubuntu_menu_proxy_insert (UbuntuMenuProxy *proxy, | ||
983 | 927 | + GtkWidget *parent, | ||
984 | 928 | + GtkWidget *child, | ||
985 | 929 | + guint position) | ||
986 | 930 | +{ | ||
987 | 931 | + g_return_if_fail (UBUNTU_IS_MENU_PROXY (proxy)); | ||
988 | 932 | + | ||
989 | 933 | + UBUNTU_MENU_PROXY_GET_CLASS (proxy)->insert (proxy, | ||
990 | 934 | + parent, | ||
991 | 935 | + child, | ||
992 | 936 | + position); | ||
993 | 937 | +} | ||
994 | 938 | + | ||
995 | 939 | +gboolean | ||
996 | 940 | +ubuntu_menu_proxy_show_local (UbuntuMenuProxy *proxy) | ||
997 | 941 | +{ | ||
998 | 942 | + g_return_val_if_fail (UBUNTU_IS_MENU_PROXY (proxy), TRUE); | ||
999 | 943 | + | ||
1000 | 944 | + return UBUNTU_MENU_PROXY_GET_CLASS (proxy)->show_local (proxy); | ||
1001 | 945 | +} | ||
1002 | 946 | + | ||
1003 | 947 | +void | ||
1004 | 948 | +ubuntu_menu_proxy_activate_menu (UbuntuMenuProxy *proxy, | ||
1005 | 949 | + GtkWidget *widget) | ||
1006 | 950 | +{ | ||
1007 | 951 | + g_signal_emit (proxy, menu_proxy_signals[ACTIVATE_MENU], 0, widget); | ||
1008 | 952 | +} | ||
1009 | 953 | + | ||
1010 | 954 | +#define __UBUNTU_MENU_PROXY_C__ | ||
1011 | 955 | +#include "gtkaliasdef.c" | ||
1012 | 956 | Index: gtk+2.0-2.24.8/gtk/ubuntumenuproxy.h | ||
1013 | 957 | =================================================================== | ||
1014 | 958 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
1015 | 959 | +++ gtk+2.0-2.24.8/gtk/ubuntumenuproxy.h 2012-01-12 10:59:31.960859983 +0100 | ||
1016 | 960 | @@ -0,0 +1,74 @@ | ||
1017 | 961 | +/* | ||
1018 | 962 | + * Copyright (C) 2010 Canonical, Ltd. | ||
1019 | 963 | + * | ||
1020 | 964 | + * This library is free software; you can redistribute it and/or | ||
1021 | 965 | + * modify it under the terms of the GNU Lesser General Public | ||
1022 | 966 | + * License as published by the Free Software Foundation; either | ||
1023 | 967 | + * version 2 of the License, or (at your option) any later version. | ||
1024 | 968 | + * | ||
1025 | 969 | + * This library is distributed in the hope that it will be useful, | ||
1026 | 970 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1027 | 971 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
1028 | 972 | + * Lesser General Public License for more details. | ||
1029 | 973 | + * | ||
1030 | 974 | + * You should have received a copy of the GNU Lesser General Public | ||
1031 | 975 | + * License along with this library; if not, write to the | ||
1032 | 976 | + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
1033 | 977 | + * Boston, MA 02111-1307, USA. | ||
1034 | 978 | + * | ||
1035 | 979 | + * Authors: Cody Russell <bratsche@gnome.org> | ||
1036 | 980 | + */ | ||
1037 | 981 | + | ||
1038 | 982 | +#if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) | ||
1039 | 983 | +#error "Only <gtk/gtk.h> can be included directly." | ||
1040 | 984 | +#endif | ||
1041 | 985 | + | ||
1042 | 986 | +#ifndef __UBUNTU_MENU_PROXY_H__ | ||
1043 | 987 | +#define __UBUNTU_MENU_PROXY_H__ | ||
1044 | 988 | + | ||
1045 | 989 | +#include <gtk/gtkwidget.h> | ||
1046 | 990 | +#include <gtk/gtktypeutils.h> | ||
1047 | 991 | + | ||
1048 | 992 | +G_BEGIN_DECLS | ||
1049 | 993 | + | ||
1050 | 994 | +#define UBUNTU_TYPE_MENU_PROXY (ubuntu_menu_proxy_get_type ()) | ||
1051 | 995 | +#define UBUNTU_MENU_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UBUNTU_TYPE_MENU_PROXY, UbuntuMenuProxy)) | ||
1052 | 996 | +#define UBUNTU_MENU_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), UBUNTU_TYPE_MENU_PROXY, UbuntuMenuProxyClass)) | ||
1053 | 997 | +#define UBUNTU_IS_MENU_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), UBUNTU_TYPE_MENU_PROXY)) | ||
1054 | 998 | +#define UBUNTU_IS_MENU_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), UBUNTU_TYPE_MENU_PROXY)) | ||
1055 | 999 | +#define UBUNTU_MENU_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), UBUNTU_TYPE_MENU_PROXY, UbuntuMenuProxyClass)) | ||
1056 | 1000 | + | ||
1057 | 1001 | + | ||
1058 | 1002 | +typedef struct _UbuntuMenuProxy UbuntuMenuProxy; | ||
1059 | 1003 | +typedef struct _UbuntuMenuProxyClass UbuntuMenuProxyClass; | ||
1060 | 1004 | + | ||
1061 | 1005 | +struct _UbuntuMenuProxy | ||
1062 | 1006 | +{ | ||
1063 | 1007 | + GObject parent_object; | ||
1064 | 1008 | +}; | ||
1065 | 1009 | + | ||
1066 | 1010 | +struct _UbuntuMenuProxyClass | ||
1067 | 1011 | +{ | ||
1068 | 1012 | + GObjectClass parent_class; | ||
1069 | 1013 | + | ||
1070 | 1014 | + /* vtable */ | ||
1071 | 1015 | + void (* insert) (UbuntuMenuProxy *proxy, GtkWidget *parent, GtkWidget *child, guint position); | ||
1072 | 1016 | + gboolean (* show_local) (UbuntuMenuProxy *proxy); | ||
1073 | 1017 | + | ||
1074 | 1018 | + /* signals */ | ||
1075 | 1019 | + void (* inserted) (UbuntuMenuProxy *proxy, GtkWidget *child); | ||
1076 | 1020 | +}; | ||
1077 | 1021 | + | ||
1078 | 1022 | +GType ubuntu_menu_proxy_get_type (void) G_GNUC_CONST; | ||
1079 | 1023 | +UbuntuMenuProxy* ubuntu_menu_proxy_get (void); | ||
1080 | 1024 | +void ubuntu_menu_proxy_insert (UbuntuMenuProxy *proxy, | ||
1081 | 1025 | + GtkWidget *parent, | ||
1082 | 1026 | + GtkWidget *child, | ||
1083 | 1027 | + guint position); | ||
1084 | 1028 | +gboolean ubuntu_menu_proxy_show_local (UbuntuMenuProxy *proxy); | ||
1085 | 1029 | +void ubuntu_menu_proxy_activate_menu (UbuntuMenuProxy *proxy, | ||
1086 | 1030 | + GtkWidget *widget); | ||
1087 | 1031 | + | ||
1088 | 1032 | +G_END_DECLS | ||
1089 | 1033 | + | ||
1090 | 1034 | +#endif /* __UBUNTU_MENU_PROXY_H__ */ | ||
1091 | 1035 | Index: gtk+2.0-2.24.8/gtk/ubuntumenuproxymodule.c | ||
1092 | 1036 | =================================================================== | ||
1093 | 1037 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
1094 | 1038 | +++ gtk+2.0-2.24.8/gtk/ubuntumenuproxymodule.c 2012-01-12 10:59:31.964860005 +0100 | ||
1095 | 1039 | @@ -0,0 +1,212 @@ | ||
1096 | 1040 | +/* | ||
1097 | 1041 | + * Copyright (C) 2010 Canonical, Ltd. | ||
1098 | 1042 | + * | ||
1099 | 1043 | + * This library is free software; you can redistribute it and/or | ||
1100 | 1044 | + * modify it under the terms of the GNU Lesser General Public | ||
1101 | 1045 | + * License as published by the Free Software Foundation; either | ||
1102 | 1046 | + * version 2 of the License, or (at your option) any later version. | ||
1103 | 1047 | + * | ||
1104 | 1048 | + * This library is distributed in the hope that it will be useful, | ||
1105 | 1049 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1106 | 1050 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
1107 | 1051 | + * Lesser General Public License for more details. | ||
1108 | 1052 | + * | ||
1109 | 1053 | + * You should have received a copy of the GNU Lesser General Public | ||
1110 | 1054 | + * License along with this library; if not, write to the | ||
1111 | 1055 | + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
1112 | 1056 | + * Boston, MA 02111-1307, USA. | ||
1113 | 1057 | + * | ||
1114 | 1058 | + * Authors: Cody Russell <bratsche@gnome.org> | ||
1115 | 1059 | + */ | ||
1116 | 1060 | + | ||
1117 | 1061 | +#include "config.h" | ||
1118 | 1062 | +#include "gtkintl.h" | ||
1119 | 1063 | +#include "ubuntumenuproxy.h" | ||
1120 | 1064 | +#include "ubuntumenuproxymodule.h" | ||
1121 | 1065 | +#include "gtkmodules.h" | ||
1122 | 1066 | +#include "gtkalias.h" | ||
1123 | 1067 | + | ||
1124 | 1068 | +enum { | ||
1125 | 1069 | + PROP_0, | ||
1126 | 1070 | + PROP_MODULENAME | ||
1127 | 1071 | +}; | ||
1128 | 1072 | + | ||
1129 | 1073 | +static GObject *ubuntu_menu_proxy_module_constructor (GType type, | ||
1130 | 1074 | + guint n_params, | ||
1131 | 1075 | + GObjectConstructParam *params); | ||
1132 | 1076 | +static void ubuntu_menu_proxy_module_finalize (GObject *object); | ||
1133 | 1077 | +static gboolean ubuntu_menu_proxy_module_real_load (GTypeModule *gmodule); | ||
1134 | 1078 | +static void ubuntu_menu_proxy_module_real_unload (GTypeModule *gmodule); | ||
1135 | 1079 | + | ||
1136 | 1080 | + | ||
1137 | 1081 | +G_DEFINE_TYPE (UbuntuMenuProxyModule, ubuntu_menu_proxy_module, G_TYPE_TYPE_MODULE); | ||
1138 | 1082 | + | ||
1139 | 1083 | +static UbuntuMenuProxyModule *proxy_module_singleton = NULL; | ||
1140 | 1084 | + | ||
1141 | 1085 | +static void | ||
1142 | 1086 | +ubuntu_menu_proxy_module_class_init (UbuntuMenuProxyModuleClass *class) | ||
1143 | 1087 | +{ | ||
1144 | 1088 | + GObjectClass *object_class = G_OBJECT_CLASS (class); | ||
1145 | 1089 | + GTypeModuleClass *type_module_class = G_TYPE_MODULE_CLASS (class); | ||
1146 | 1090 | + | ||
1147 | 1091 | + object_class->finalize = ubuntu_menu_proxy_module_finalize; | ||
1148 | 1092 | + | ||
1149 | 1093 | + type_module_class->load = ubuntu_menu_proxy_module_real_load; | ||
1150 | 1094 | + type_module_class->unload = ubuntu_menu_proxy_module_real_unload; | ||
1151 | 1095 | +} | ||
1152 | 1096 | + | ||
1153 | 1097 | +static void | ||
1154 | 1098 | +ubuntu_menu_proxy_module_init (UbuntuMenuProxyModule *module) | ||
1155 | 1099 | +{ | ||
1156 | 1100 | + module->name = g_strdup (g_getenv ("UBUNTU_MENUPROXY")); | ||
1157 | 1101 | + module->library = NULL; | ||
1158 | 1102 | + module->load = NULL; | ||
1159 | 1103 | + module->unload = NULL; | ||
1160 | 1104 | +} | ||
1161 | 1105 | + | ||
1162 | 1106 | +static void | ||
1163 | 1107 | +ubuntu_menu_proxy_module_finalize (GObject *object) | ||
1164 | 1108 | +{ | ||
1165 | 1109 | + UbuntuMenuProxyModule *module = UBUNTU_MENU_PROXY_MODULE (object); | ||
1166 | 1110 | + | ||
1167 | 1111 | + if (module->name != NULL) | ||
1168 | 1112 | + { | ||
1169 | 1113 | + g_free (module->name); | ||
1170 | 1114 | + } | ||
1171 | 1115 | + | ||
1172 | 1116 | + G_OBJECT_CLASS (ubuntu_menu_proxy_module_parent_class)->finalize (object); | ||
1173 | 1117 | +} | ||
1174 | 1118 | + | ||
1175 | 1119 | +static gboolean | ||
1176 | 1120 | +ubuntu_menu_proxy_module_real_load (GTypeModule *gmodule) | ||
1177 | 1121 | +{ | ||
1178 | 1122 | + UbuntuMenuProxyModule *module = UBUNTU_MENU_PROXY_MODULE (gmodule); | ||
1179 | 1123 | + gchar *path; | ||
1180 | 1124 | + | ||
1181 | 1125 | + if (proxy_module_singleton != NULL) | ||
1182 | 1126 | + return TRUE; | ||
1183 | 1127 | + | ||
1184 | 1128 | + if (!module->name) | ||
1185 | 1129 | + { | ||
1186 | 1130 | + g_warning ("Module path not set"); | ||
1187 | 1131 | + return FALSE; | ||
1188 | 1132 | + } | ||
1189 | 1133 | + | ||
1190 | 1134 | + path = _gtk_find_module (module->name, "menuproxies"); | ||
1191 | 1135 | + | ||
1192 | 1136 | + module->library = g_module_open (path, 0); | ||
1193 | 1137 | + | ||
1194 | 1138 | + if (!module->library) | ||
1195 | 1139 | + { | ||
1196 | 1140 | + g_printerr ("%s\n", g_module_error ()); | ||
1197 | 1141 | + return FALSE; | ||
1198 | 1142 | + } | ||
1199 | 1143 | + | ||
1200 | 1144 | + /* Make sure that the loaded library contains the required methods */ | ||
1201 | 1145 | + if (!g_module_symbol (module->library, | ||
1202 | 1146 | + "menu_proxy_module_load", | ||
1203 | 1147 | + (gpointer *) &module->load) || | ||
1204 | 1148 | + !g_module_symbol (module->library, | ||
1205 | 1149 | + "menu_proxy_module_unload", | ||
1206 | 1150 | + (gpointer *) &module->unload)) | ||
1207 | 1151 | + { | ||
1208 | 1152 | + g_printerr ("%s\n", g_module_error ()); | ||
1209 | 1153 | + g_module_close (module->library); | ||
1210 | 1154 | + | ||
1211 | 1155 | + return FALSE; | ||
1212 | 1156 | + } | ||
1213 | 1157 | + | ||
1214 | 1158 | + /* Initialize the loaded module */ | ||
1215 | 1159 | + module->load (module); | ||
1216 | 1160 | + | ||
1217 | 1161 | + return TRUE; | ||
1218 | 1162 | +} | ||
1219 | 1163 | + | ||
1220 | 1164 | +static void | ||
1221 | 1165 | +ubuntu_menu_proxy_module_real_unload (GTypeModule *gmodule) | ||
1222 | 1166 | +{ | ||
1223 | 1167 | + UbuntuMenuProxyModule *module = UBUNTU_MENU_PROXY_MODULE (gmodule); | ||
1224 | 1168 | + | ||
1225 | 1169 | + module->unload (module); | ||
1226 | 1170 | + | ||
1227 | 1171 | + g_module_close (module->library); | ||
1228 | 1172 | + module->library = NULL; | ||
1229 | 1173 | + | ||
1230 | 1174 | + module->load = NULL; | ||
1231 | 1175 | + module->unload = NULL; | ||
1232 | 1176 | +} | ||
1233 | 1177 | + | ||
1234 | 1178 | +static gboolean | ||
1235 | 1179 | +is_valid_module_name (const gchar *name) | ||
1236 | 1180 | +{ | ||
1237 | 1181 | +#if !defined(G_OS_WIN32) && !defined(G_WITH_CYGWIN) | ||
1238 | 1182 | + return g_str_has_prefix (name, "lib") && g_str_has_suffix (name, ".so"); | ||
1239 | 1183 | +#else | ||
1240 | 1184 | + return g_str_has_suffix (name, ".dll"); | ||
1241 | 1185 | +#endif | ||
1242 | 1186 | +} | ||
1243 | 1187 | + | ||
1244 | 1188 | +static void | ||
1245 | 1189 | +setup_instance (UbuntuMenuProxyModule *module) | ||
1246 | 1190 | +{ | ||
1247 | 1191 | + GType *proxy_types; | ||
1248 | 1192 | + guint n_proxies; | ||
1249 | 1193 | + | ||
1250 | 1194 | + proxy_types = g_type_children (UBUNTU_TYPE_MENU_PROXY, | ||
1251 | 1195 | + &n_proxies); | ||
1252 | 1196 | + | ||
1253 | 1197 | + if (n_proxies > 1) | ||
1254 | 1198 | + { | ||
1255 | 1199 | + g_warning ("There are %d child types of UbuntuMenuProxy, should be 0 or 1.\n", | ||
1256 | 1200 | + n_proxies); | ||
1257 | 1201 | + } | ||
1258 | 1202 | + else if (n_proxies == 1) | ||
1259 | 1203 | + { | ||
1260 | 1204 | + g_object_new (proxy_types[0], NULL); | ||
1261 | 1205 | + } | ||
1262 | 1206 | +} | ||
1263 | 1207 | + | ||
1264 | 1208 | +UbuntuMenuProxyModule * | ||
1265 | 1209 | +ubuntu_menu_proxy_module_get (void) | ||
1266 | 1210 | +{ | ||
1267 | 1211 | + if (!proxy_module_singleton) | ||
1268 | 1212 | + { | ||
1269 | 1213 | + UbuntuMenuProxyModule *module = NULL; | ||
1270 | 1214 | + const gchar *module_name; | ||
1271 | 1215 | + | ||
1272 | 1216 | + module_name = g_getenv ("UBUNTU_MENUPROXY"); | ||
1273 | 1217 | + | ||
1274 | 1218 | + if (module_name != NULL) | ||
1275 | 1219 | + { | ||
1276 | 1220 | + if (is_valid_module_name (module_name)) | ||
1277 | 1221 | + { | ||
1278 | 1222 | + gchar *path = _gtk_find_module (module_name, "menuproxies"); | ||
1279 | 1223 | + | ||
1280 | 1224 | + module = g_object_new (UBUNTU_TYPE_MENU_PROXY_MODULE, | ||
1281 | 1225 | + NULL); | ||
1282 | 1226 | + | ||
1283 | 1227 | + if (!g_type_module_use (G_TYPE_MODULE (module))) | ||
1284 | 1228 | + { | ||
1285 | 1229 | + g_warning ("Failed to load type module: %s\n", path); | ||
1286 | 1230 | + | ||
1287 | 1231 | + g_object_unref (module); | ||
1288 | 1232 | + g_free (path); | ||
1289 | 1233 | + | ||
1290 | 1234 | + return NULL; | ||
1291 | 1235 | + } | ||
1292 | 1236 | + | ||
1293 | 1237 | + setup_instance (module); | ||
1294 | 1238 | + | ||
1295 | 1239 | + g_free (path); | ||
1296 | 1240 | + g_type_module_unuse (G_TYPE_MODULE (module)); | ||
1297 | 1241 | + } | ||
1298 | 1242 | + | ||
1299 | 1243 | + proxy_module_singleton = module; | ||
1300 | 1244 | + } | ||
1301 | 1245 | + } | ||
1302 | 1246 | + | ||
1303 | 1247 | + return proxy_module_singleton; | ||
1304 | 1248 | +} | ||
1305 | 1249 | + | ||
1306 | 1250 | +#define __UBUNTU_MENU_PROXY_MODULE_C__ | ||
1307 | 1251 | +#include "gtkaliasdef.c" | ||
1308 | 1252 | Index: gtk+2.0-2.24.8/gtk/ubuntumenuproxymodule.h | ||
1309 | 1253 | =================================================================== | ||
1310 | 1254 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
1311 | 1255 | +++ gtk+2.0-2.24.8/gtk/ubuntumenuproxymodule.h 2012-01-12 10:59:31.964860005 +0100 | ||
1312 | 1256 | @@ -0,0 +1,69 @@ | ||
1313 | 1257 | +/* | ||
1314 | 1258 | + * Copyright (C) 2010 Canonical, Ltd. | ||
1315 | 1259 | + * | ||
1316 | 1260 | + * This library is free software; you can redistribute it and/or | ||
1317 | 1261 | + * modify it under the terms of the GNU Lesser General Public | ||
1318 | 1262 | + * License as published by the Free Software Foundation; either | ||
1319 | 1263 | + * version 2 of the License, or (at your option) any later version. | ||
1320 | 1264 | + * | ||
1321 | 1265 | + * This library is distributed in the hope that it will be useful, | ||
1322 | 1266 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1323 | 1267 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
1324 | 1268 | + * Lesser General Public License for more details. | ||
1325 | 1269 | + * | ||
1326 | 1270 | + * You should have received a copy of the GNU Lesser General Public | ||
1327 | 1271 | + * License along with this library; if not, write to the | ||
1328 | 1272 | + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
1329 | 1273 | + * Boston, MA 02111-1307, USA. | ||
1330 | 1274 | + * | ||
1331 | 1275 | + * Authors: Cody Russell <bratsche@gnome.org> | ||
1332 | 1276 | + */ | ||
1333 | 1277 | + | ||
1334 | 1278 | +#if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) | ||
1335 | 1279 | +#error "Only <gtk/gtk.h> can be included directly." | ||
1336 | 1280 | +#endif | ||
1337 | 1281 | + | ||
1338 | 1282 | +#ifndef __UBUNTU_MENU_PROXY_MODULE_H__ | ||
1339 | 1283 | +#define __UBUNTU_MENU_PROXY_MODULE_H__ | ||
1340 | 1284 | + | ||
1341 | 1285 | +#include <glib-object.h> | ||
1342 | 1286 | +#include <gmodule.h> | ||
1343 | 1287 | + | ||
1344 | 1288 | +G_BEGIN_DECLS | ||
1345 | 1289 | + | ||
1346 | 1290 | +#define UBUNTU_TYPE_MENU_PROXY_MODULE (ubuntu_menu_proxy_module_get_type ()) | ||
1347 | 1291 | +#define UBUNTU_MENU_PROXY_MODULE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UBUNTU_TYPE_MENU_PROXY_MODULE, UbuntuMenuProxyModule)) | ||
1348 | 1292 | +#define UBUNTU_MENU_PROXY_MODULE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), UBUNTU_TYPE_MENU_PROXY_MODULE, UbuntuMenuProxyModuleClass)) | ||
1349 | 1293 | +#define UBUNTU_IS_MENU_MODULE_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), UBUNTU_TYPE_MENU_PROXY_MODULE)) | ||
1350 | 1294 | +#define UBUNTU_IS_MENU_PROXY_MODULE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), UBUNTU_TYPE_MENU_PROXY_MODULE)) | ||
1351 | 1295 | +#define UBUNTU_MENU_PROXY_MODULE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), UBUNTU_TYPE_MENU_PROXY_MODULE, UbuntuMenuProxyModuleClass)) | ||
1352 | 1296 | + | ||
1353 | 1297 | +typedef struct _UbuntuMenuProxyModule UbuntuMenuProxyModule; | ||
1354 | 1298 | +typedef struct _UbuntuMenuProxyModuleClass UbuntuMenuProxyModuleClass; | ||
1355 | 1299 | +typedef struct _UbuntuMenuProxyModulePrivate UbuntuMenuProxyModulePrivate; | ||
1356 | 1300 | + | ||
1357 | 1301 | +struct _UbuntuMenuProxyModule | ||
1358 | 1302 | +{ | ||
1359 | 1303 | + GTypeModule parent_instance; | ||
1360 | 1304 | + | ||
1361 | 1305 | + UbuntuMenuProxyModulePrivate *priv; | ||
1362 | 1306 | + | ||
1363 | 1307 | + GModule *library; | ||
1364 | 1308 | + gchar *name; | ||
1365 | 1309 | + | ||
1366 | 1310 | + void (* load) (UbuntuMenuProxyModule *module); | ||
1367 | 1311 | + void (* unload) (UbuntuMenuProxyModule *module); | ||
1368 | 1312 | +}; | ||
1369 | 1313 | + | ||
1370 | 1314 | +struct _UbuntuMenuProxyModuleClass | ||
1371 | 1315 | +{ | ||
1372 | 1316 | + GTypeModuleClass parent_class; | ||
1373 | 1317 | +}; | ||
1374 | 1318 | + | ||
1375 | 1319 | +GType ubuntu_menu_proxy_module_get_type (void) G_GNUC_CONST; | ||
1376 | 1320 | + | ||
1377 | 1321 | +UbuntuMenuProxyModule *ubuntu_menu_proxy_module_get (void); | ||
1378 | 1322 | + | ||
1379 | 1323 | +G_END_DECLS | ||
1380 | 1324 | + | ||
1381 | 1325 | +#endif /* __UBUNTU_MENU_PROXY_MODULE_H__ */ | ||
1382 | 1326 | Index: gtk+2.0-2.24.8/gtk/gtkwindow.c | ||
1383 | 1327 | =================================================================== | ||
1384 | 1328 | --- gtk+2.0-2.24.8.orig/gtk/gtkwindow.c 2012-01-12 10:59:29.868849616 +0100 | ||
1385 | 1329 | +++ gtk+2.0-2.24.8/gtk/gtkwindow.c 2012-01-12 10:59:31.968860029 +0100 | ||
1386 | 1330 | @@ -94,7 +94,8 @@ | ||
1387 | 1331 | PROP_GRAVITY, | ||
1388 | 1332 | PROP_TRANSIENT_FOR, | ||
1389 | 1333 | PROP_OPACITY, | ||
1390 | 1334 | - | ||
1391 | 1335 | + PROP_NO_PROXY, | ||
1392 | 1336 | + | ||
1393 | 1337 | /* Readonly properties */ | ||
1394 | 1338 | PROP_IS_ACTIVE, | ||
1395 | 1339 | PROP_HAS_TOPLEVEL_FOCUS, | ||
1396 | 1340 | @@ -195,6 +196,8 @@ | ||
1397 | 1341 | |||
1398 | 1342 | gdouble opacity; | ||
1399 | 1343 | |||
1400 | 1344 | + gboolean no_proxy; | ||
1401 | 1345 | + | ||
1402 | 1346 | gchar *startup_id; | ||
1403 | 1347 | }; | ||
1404 | 1348 | |||
1405 | 1349 | @@ -502,6 +505,14 @@ | ||
1406 | 1350 | NULL, | ||
1407 | 1351 | GTK_PARAM_READWRITE)); | ||
1408 | 1352 | |||
1409 | 1353 | + g_object_class_install_property (object_class, | ||
1410 | 1354 | + PROP_NO_PROXY, | ||
1411 | 1355 | + g_param_spec_boolean ("ubuntu-no-proxy", | ||
1412 | 1356 | + P_("Disable menu proxies for this window"), | ||
1413 | 1357 | + P_("Disable menu proxies for this window"), | ||
1414 | 1358 | + FALSE, | ||
1415 | 1359 | + GTK_PARAM_READWRITE)); | ||
1416 | 1360 | + | ||
1417 | 1361 | /** | ||
1418 | 1362 | * GtkWindow:startup-id: | ||
1419 | 1363 | * | ||
1420 | 1364 | @@ -1084,6 +1095,9 @@ | ||
1421 | 1365 | case PROP_MNEMONICS_VISIBLE: | ||
1422 | 1366 | gtk_window_set_mnemonics_visible (window, g_value_get_boolean (value)); | ||
1423 | 1367 | break; | ||
1424 | 1368 | + case PROP_NO_PROXY: | ||
1425 | 1369 | + priv->no_proxy = g_value_get_boolean (value); | ||
1426 | 1370 | + break; | ||
1427 | 1371 | default: | ||
1428 | 1372 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); | ||
1429 | 1373 | break; | ||
1430 | 1374 | @@ -1202,6 +1216,9 @@ | ||
1431 | 1375 | case PROP_MNEMONICS_VISIBLE: | ||
1432 | 1376 | g_value_set_boolean (value, priv->mnemonics_visible); | ||
1433 | 1377 | break; | ||
1434 | 1378 | + case PROP_NO_PROXY: | ||
1435 | 1379 | + g_value_set_boolean (value, priv->no_proxy); | ||
1436 | 1380 | + break; | ||
1437 | 1381 | default: | ||
1438 | 1382 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); | ||
1439 | 1383 | break; | ||
1440 | 1384 | Index: gtk+2.0-2.24.8/gtk/gtkmenuitem.c | ||
1441 | 1385 | =================================================================== | ||
1442 | 1386 | --- gtk+2.0-2.24.8.orig/gtk/gtkmenuitem.c 2012-01-12 10:59:29.848849513 +0100 | ||
1443 | 1387 | +++ gtk+2.0-2.24.8/gtk/gtkmenuitem.c 2012-01-12 10:59:31.968860029 +0100 | ||
1444 | 1388 | @@ -1395,7 +1395,17 @@ | ||
1445 | 1389 | widget); | ||
1446 | 1390 | } | ||
1447 | 1391 | else | ||
1448 | 1392 | - g_signal_emit (widget, menu_item_signals[ACTIVATE_ITEM], 0); | ||
1449 | 1393 | + { | ||
1450 | 1394 | + if (GTK_IS_MENU_BAR (widget->parent) && | ||
1451 | 1395 | + ubuntu_gtk_menu_shell_activate_mnemonic (GTK_MENU_SHELL (widget->parent), widget)) | ||
1452 | 1396 | + { | ||
1453 | 1397 | + //g_print ("send activate to remote!\n"); | ||
1454 | 1398 | + } | ||
1455 | 1399 | + else | ||
1456 | 1400 | + { | ||
1457 | 1401 | + g_signal_emit (widget, menu_item_signals[ACTIVATE_ITEM], 0); | ||
1458 | 1402 | + } | ||
1459 | 1403 | + } | ||
1460 | 1404 | |||
1461 | 1405 | return TRUE; | ||
1462 | 1406 | } | ||
1463 | 1407 | 0 | ||
1464 | === removed file 'debian/patches/072_indicator_menu_update.patch' | |||
1465 | --- debian/patches/072_indicator_menu_update.patch 2012-09-04 06:18:43 +0000 | |||
1466 | +++ debian/patches/072_indicator_menu_update.patch 1970-01-01 00:00:00 +0000 | |||
1467 | @@ -1,110 +0,0 @@ | |||
1468 | 1 | ## Description: Adding two signals that are needed for Application Indicator to | ||
1469 | 2 | ## keep up-to-date with changed GtkMenu(Item)s. | ||
1470 | 3 | ## Origin/Author: Cody Russell <bratsche@gnome.org>, | ||
1471 | 4 | ## Sense Hofstede <sense@ubuntu.com> | ||
1472 | 5 | ## Bug: unknown and https://launchpad.net/bug/608219 | ||
1473 | 6 | Index: gtk+-2.24.12/gtk/gtkcontainer.c | ||
1474 | 7 | =================================================================== | ||
1475 | 8 | --- gtk+-2.24.12.orig/gtk/gtkcontainer.c 2011-08-16 14:30:52.000000000 +1200 | ||
1476 | 9 | +++ gtk+-2.24.12/gtk/gtkcontainer.c 2012-09-04 16:42:52.074563931 +1200 | ||
1477 | 10 | @@ -48,6 +48,8 @@ | ||
1478 | 11 | REMOVE, | ||
1479 | 12 | CHECK_RESIZE, | ||
1480 | 13 | SET_FOCUS_CHILD, | ||
1481 | 14 | + CHILD_ADDED, | ||
1482 | 15 | + CHILD_REMOVED, | ||
1483 | 16 | LAST_SIGNAL | ||
1484 | 17 | }; | ||
1485 | 18 | |||
1486 | 19 | @@ -291,6 +293,24 @@ | ||
1487 | 20 | _gtk_marshal_VOID__OBJECT, | ||
1488 | 21 | G_TYPE_NONE, 1, | ||
1489 | 22 | GTK_TYPE_WIDGET); | ||
1490 | 23 | + container_signals[CHILD_ADDED] = | ||
1491 | 24 | + g_signal_new (I_("child-added"), | ||
1492 | 25 | + G_OBJECT_CLASS_TYPE (object_class), | ||
1493 | 26 | + G_SIGNAL_RUN_LAST, | ||
1494 | 27 | + 0, | ||
1495 | 28 | + NULL, NULL, | ||
1496 | 29 | + _gtk_marshal_VOID__OBJECT, | ||
1497 | 30 | + G_TYPE_NONE, 1, | ||
1498 | 31 | + GTK_TYPE_WIDGET); | ||
1499 | 32 | + container_signals[CHILD_REMOVED] = | ||
1500 | 33 | + g_signal_new (I_("child-removed"), | ||
1501 | 34 | + G_OBJECT_CLASS_TYPE (object_class), | ||
1502 | 35 | + G_SIGNAL_RUN_LAST, | ||
1503 | 36 | + 0, | ||
1504 | 37 | + NULL, NULL, | ||
1505 | 38 | + _gtk_marshal_VOID__OBJECT, | ||
1506 | 39 | + G_TYPE_NONE, 1, | ||
1507 | 40 | + GTK_TYPE_WIDGET); | ||
1508 | 41 | } | ||
1509 | 42 | |||
1510 | 43 | static void | ||
1511 | 44 | Index: gtk+-2.24.12/gtk/gtkmenushell.c | ||
1512 | 45 | =================================================================== | ||
1513 | 46 | --- gtk+-2.24.12.orig/gtk/gtkmenushell.c 2012-09-04 16:42:47.162564101 +1200 | ||
1514 | 47 | +++ gtk+-2.24.12/gtk/gtkmenushell.c 2012-09-04 16:42:52.074563931 +1200 | ||
1515 | 48 | @@ -559,6 +559,8 @@ | ||
1516 | 49 | GTK_WIDGET (menu_shell), | ||
1517 | 50 | child, | ||
1518 | 51 | position); | ||
1519 | 52 | + | ||
1520 | 53 | + g_signal_emit_by_name (menu_shell, "child-added", child); | ||
1521 | 54 | } | ||
1522 | 55 | |||
1523 | 56 | static void | ||
1524 | 57 | Index: gtk+-2.24.12/gtk/gtkmenuitem.c | ||
1525 | 58 | =================================================================== | ||
1526 | 59 | --- gtk+-2.24.12.orig/gtk/gtkmenuitem.c 2012-09-04 16:42:45.278564166 +1200 | ||
1527 | 60 | +++ gtk+-2.24.12/gtk/gtkmenuitem.c 2012-09-04 16:42:52.074563931 +1200 | ||
1528 | 61 | @@ -52,6 +52,8 @@ | ||
1529 | 62 | ACTIVATE_ITEM, | ||
1530 | 63 | TOGGLE_SIZE_REQUEST, | ||
1531 | 64 | TOGGLE_SIZE_ALLOCATE, | ||
1532 | 65 | + SUBMENU_ADDED, | ||
1533 | 66 | + SUBMENU_REMOVED, | ||
1534 | 67 | LAST_SIGNAL | ||
1535 | 68 | }; | ||
1536 | 69 | |||
1537 | 70 | @@ -244,6 +246,25 @@ | ||
1538 | 71 | G_TYPE_NONE, 1, | ||
1539 | 72 | G_TYPE_INT); | ||
1540 | 73 | |||
1541 | 74 | + menu_item_signals[SUBMENU_ADDED] = | ||
1542 | 75 | + g_signal_new (I_("submenu-added"), | ||
1543 | 76 | + G_OBJECT_CLASS_TYPE (gobject_class), | ||
1544 | 77 | + G_SIGNAL_RUN_FIRST, | ||
1545 | 78 | + 0, | ||
1546 | 79 | + NULL, NULL, | ||
1547 | 80 | + _gtk_marshal_VOID__OBJECT, | ||
1548 | 81 | + G_TYPE_NONE, 1, | ||
1549 | 82 | + GTK_TYPE_WIDGET); | ||
1550 | 83 | + | ||
1551 | 84 | + menu_item_signals[SUBMENU_REMOVED] = | ||
1552 | 85 | + g_signal_new (I_("submenu-removed"), | ||
1553 | 86 | + G_OBJECT_CLASS_TYPE (gobject_class), | ||
1554 | 87 | + G_SIGNAL_RUN_FIRST, | ||
1555 | 88 | + 0, | ||
1556 | 89 | + NULL, NULL, | ||
1557 | 90 | + _gtk_marshal_VOID__VOID, | ||
1558 | 91 | + G_TYPE_NONE, 0); | ||
1559 | 92 | + | ||
1560 | 93 | /** | ||
1561 | 94 | * GtkMenuItem:right-justified: | ||
1562 | 95 | * | ||
1563 | 96 | @@ -791,6 +812,14 @@ | ||
1564 | 97 | if (GTK_WIDGET (menu_item)->parent) | ||
1565 | 98 | gtk_widget_queue_resize (GTK_WIDGET (menu_item)); | ||
1566 | 99 | |||
1567 | 100 | + if(submenu == NULL) | ||
1568 | 101 | + { | ||
1569 | 102 | + g_signal_emit_by_name (menu_item, "submenu-removed"); | ||
1570 | 103 | + } | ||
1571 | 104 | + else | ||
1572 | 105 | + { | ||
1573 | 106 | + g_signal_emit_by_name (menu_item, "submenu-added", GTK_WIDGET(submenu)); | ||
1574 | 107 | + } | ||
1575 | 108 | g_object_notify (G_OBJECT (menu_item), "submenu"); | ||
1576 | 109 | } | ||
1577 | 110 | } | ||
1578 | 111 | 0 | ||
1579 | === modified file 'debian/patches/series' | |||
1580 | --- debian/patches/series 2013-02-25 01:18:07 +0000 | |||
1581 | +++ debian/patches/series 2013-03-04 21:20:34 +0000 | |||
1582 | @@ -4,12 +4,10 @@ | |||
1583 | 4 | 004_gtk+-ximian-gtk2-filesel-navbutton-5.patch | 4 | 004_gtk+-ximian-gtk2-filesel-navbutton-5.patch |
1584 | 5 | 005_support_disabling_x11_extensions.patch | 5 | 005_support_disabling_x11_extensions.patch |
1585 | 6 | 011_immodule-cache-dir.patch | 6 | 011_immodule-cache-dir.patch |
1586 | 7 | 012_ubuntu-set-grab-add.patch | ||
1587 | 8 | 015_default-fallback-icon-theme.patch | 7 | 015_default-fallback-icon-theme.patch |
1588 | 9 | 022_disable-viqr-im-for-vi-locale.patch | 8 | 022_disable-viqr-im-for-vi-locale.patch |
1589 | 10 | 041_ia32-libs.patch | 9 | 041_ia32-libs.patch |
1590 | 11 | 042_treeview_single-focus.patch | 10 | 042_treeview_single-focus.patch |
1591 | 12 | 043_ubuntu_menu_proxy.patch | ||
1592 | 13 | 044_tracker_fts.patch | 11 | 044_tracker_fts.patch |
1593 | 14 | 060_ignore-random-icons.patch | 12 | 060_ignore-random-icons.patch |
1594 | 15 | 061_use_pdf_as_default_printing_standard.patch | 13 | 061_use_pdf_as_default_printing_standard.patch |
1595 | @@ -17,7 +15,6 @@ | |||
1596 | 17 | 063_treeview_almost_fixed.patch | 15 | 063_treeview_almost_fixed.patch |
1597 | 18 | 065_gir_set_packages.patch | 16 | 065_gir_set_packages.patch |
1598 | 19 | 071_no_offscreen_widgets_grabbing.patch | 17 | 071_no_offscreen_widgets_grabbing.patch |
1599 | 20 | 072_indicator_menu_update.patch | ||
1600 | 21 | 090_logging_file_saves.patch | 18 | 090_logging_file_saves.patch |
1601 | 22 | 092_default_to_xdg_document_dir.patch | 19 | 092_default_to_xdg_document_dir.patch |
1602 | 23 | 093_gtk3_gtkimage_fallbacks_use.patch | 20 | 093_gtk3_gtkimage_fallbacks_use.patch |
Thanks William, we finally got that merged in the packaging trunk, it's going to go to the ubuntu-desktop ppa for some testing before archive upload still though