~ubuntu-branches/ubuntu/oneiric/gnome-panel/oneiric

« back to all changes in this revision

Viewing changes to debian/patches/25_dynamic_fusa_detection.patch

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-03-30 11:59:32 UTC
  • mfrom: (1.13.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20100330115932-j94o334zoki5sbkb
Tags: 1:2.30.0-0ubuntu1
* New upstream version
* debian/patches/25_dynamic_fusa_detection.patch:
  - update by Cody Russell to try to fix a crasher in the change
    (lp: #448084)
* debian/patches/70_relibtoolize.patch: 
  - new version update

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Index: gnome-panel-2.29.92.1/gnome-panel/applet.c
2
 
===================================================================
3
 
--- gnome-panel-2.29.92.1.orig/gnome-panel/applet.c     2010-03-04 17:17:30.000000000 +0100
4
 
+++ gnome-panel-2.29.92.1/gnome-panel/applet.c  2010-03-19 14:48:19.000000000 +0100
5
 
@@ -34,6 +34,7 @@
6
 
 #include "panel-globals.h"
7
 
 #include "panel-properties-dialog.h"
8
 
 #include "panel-lockdown.h"
9
 
+#include "applet-signaler.h"
10
 
 
11
 
 #define SMALL_ICON_SIZE 20
12
 
 
13
 
@@ -734,6 +735,7 @@
14
 
        info->widget = NULL;
15
 
 
16
 
        registered_applets = g_slist_remove (registered_applets, info);
17
 
+       panel_applet_signaler_remove_applet(info);
18
 
 
19
 
        queued_position_saves =
20
 
                g_slist_remove (queued_position_saves, info);
21
 
@@ -1184,6 +1186,26 @@
22
 
        return info->id;
23
 
 }
24
 
 
25
 
+/** \brief  Get the Bonobo IID of the Applet
26
 
+       \param  info  The AppletInfo struct representing the applet
27
 
+       \return  Either the IID of the applet or NULL if the applet does
28
 
+                not have an IID.
29
 
+*/
30
 
+const char *
31
 
+panel_applet_get_iid (AppletInfo *info)
32
 
+{
33
 
+       if (!info)
34
 
+               return NULL;
35
 
+       if (info->type != PANEL_OBJECT_BONOBO)
36
 
+               return NULL;
37
 
+
38
 
+       PanelAppletFrame * frame = PANEL_APPLET_FRAME(info->data);
39
 
+       if (frame == NULL)
40
 
+               return NULL;  /* This should never happen, but just in case */
41
 
+
42
 
+       return panel_applet_frame_get_iid(frame);
43
 
+}
44
 
+
45
 
 const char *
46
 
 panel_applet_get_id_by_widget (GtkWidget *applet_widget)
47
 
 {
48
 
@@ -1207,6 +1229,9 @@
49
 
 {
50
 
        GSList *l;
51
 
 
52
 
+       if (id == NULL)
53
 
+               return NULL;
54
 
+
55
 
        for (l = registered_applets; l; l = l->next) {
56
 
                AppletInfo *info = l->data;
57
 
 
58
 
@@ -1217,6 +1242,33 @@
59
 
        return NULL;
60
 
 }
61
 
 
62
 
+/** \brief  Will find an applet by looking for it's IID
63
 
+       \param  iid  The IID to look for in an applet
64
 
+       \return Either the AppletInfo structure representing the applet or
65
 
+               NULL if an applet with that IID can not be found.
66
 
+*/
67
 
+AppletInfo *
68
 
+panel_applet_get_by_iid (const char *iid)
69
 
+{
70
 
+       GSList *l;
71
 
+
72
 
+       if (iid == NULL)
73
 
+               return NULL;
74
 
+
75
 
+       for (l = registered_applets; l; l = l->next) {
76
 
+               AppletInfo *info = l->data;
77
 
+               const char *applet_iid = panel_applet_get_iid(info);
78
 
+
79
 
+               if (applet_iid == NULL)
80
 
+                       continue;
81
 
+
82
 
+               if (!strcmp (applet_iid, iid))
83
 
+                       return info;
84
 
+       }
85
 
+
86
 
+       return NULL;
87
 
+}
88
 
+
89
 
 GSList *
90
 
 panel_applet_list_applets (void)
91
 
 {
92
 
@@ -1352,6 +1404,7 @@
93
 
        else
94
 
                gtk_widget_child_focus (applet, GTK_DIR_TAB_FORWARD);
95
 
 
96
 
+       panel_applet_signaler_add_applet(info);
97
 
        return info;
98
 
 }
99
 
 
100
 
Index: gnome-panel-2.29.92.1/gnome-panel/applet.h
101
 
===================================================================
102
 
--- gnome-panel-2.29.92.1.orig/gnome-panel/applet.h     2010-01-27 16:28:13.000000000 +0100
103
 
+++ gnome-panel-2.29.92.1/gnome-panel/applet.h  2010-03-19 14:48:19.000000000 +0100
104
 
@@ -56,8 +56,10 @@
105
 
 void panel_applet_stop_loading (const char *id);
106
 
 
107
 
 const char *panel_applet_get_id           (AppletInfo      *info);
108
 
+const char *panel_applet_get_iid          (AppletInfo      *info);
109
 
 const char *panel_applet_get_id_by_widget (GtkWidget       *widget);
110
 
 AppletInfo *panel_applet_get_by_id        (const char      *id);
111
 
+AppletInfo *panel_applet_get_by_iid       (const char      *iid);
112
 
 AppletInfo *panel_applet_get_by_type      (PanelObjectType  object_type, GdkScreen *screen);
113
 
 
114
 
 GSList     *panel_applet_list_applets (void);
115
 
Index: gnome-panel-2.29.92.1/gnome-panel/applet-signaler.c
116
 
===================================================================
117
 
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
118
 
+++ gnome-panel-2.29.92.1/gnome-panel/applet-signaler.c 2010-03-19 14:48:55.000000000 +0100
 
1
=== modified file 'gnome-panel/Makefile.am'
 
2
--- old/gnome-panel/Makefile.am 2010-01-14 22:20:05 +0000
 
3
+++ new/gnome-panel/Makefile.am 2010-03-29 20:40:44 +0000
 
4
@@ -64,6 +64,7 @@ panel_sources =                       \
 
5
        panel-compatibility.c   \
 
6
        panel.c                 \
 
7
        applet.c                \
 
8
+       applet-signaler.c               \
 
9
        drawer.c                \
 
10
        panel-config-global.c   \
 
11
        panel-util.c            \
 
12
@@ -109,6 +110,7 @@ panel_headers =                     \
 
13
        panel-compatibility.h   \
 
14
        panel.h                 \
 
15
        applet.h                \
 
16
+       applet-signaler.h               \
 
17
        drawer.h                \
 
18
        panel-util.h            \
 
19
        panel-properties-dialog.h \
 
20
 
 
21
=== added file 'gnome-panel/applet-signaler.c'
 
22
--- old/gnome-panel/applet-signaler.c   1970-01-01 00:00:00 +0000
 
23
+++ new/gnome-panel/applet-signaler.c   2010-03-29 20:40:44 +0000
119
24
@@ -0,0 +1,133 @@
120
25
+/*
121
26
+ * Fast User Switch Applet: status-manager.c
250
155
+       return;
251
156
+}
252
157
+
253
 
Index: gnome-panel-2.29.92.1/gnome-panel/applet-signaler.h
254
 
===================================================================
255
 
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
256
 
+++ gnome-panel-2.29.92.1/gnome-panel/applet-signaler.h 2010-03-19 14:48:19.000000000 +0100
 
158
 
 
159
=== added file 'gnome-panel/applet-signaler.h'
 
160
--- old/gnome-panel/applet-signaler.h   1970-01-01 00:00:00 +0000
 
161
+++ new/gnome-panel/applet-signaler.h   2010-03-29 20:40:44 +0000
257
162
@@ -0,0 +1,52 @@
258
163
+/*
259
164
+ * Fast User Switch Applet: status-manager.c
307
212
+G_END_DECLS
308
213
+
309
214
+#endif /* APPLET_SIGNALER_H */
310
 
Index: gnome-panel-2.29.92.1/gnome-panel/Makefile.am
311
 
===================================================================
312
 
--- gnome-panel-2.29.92.1.orig/gnome-panel/Makefile.am  2010-01-14 04:26:27.000000000 +0100
313
 
+++ gnome-panel-2.29.92.1/gnome-panel/Makefile.am       2010-03-19 14:48:19.000000000 +0100
314
 
@@ -64,6 +64,7 @@
315
 
        panel-compatibility.c   \
316
 
        panel.c                 \
317
 
        applet.c                \
318
 
+       applet-signaler.c               \
319
 
        drawer.c                \
320
 
        panel-config-global.c   \
321
 
        panel-util.c            \
322
 
@@ -109,6 +110,7 @@
323
 
        panel-compatibility.h   \
324
 
        panel.h                 \
325
 
        applet.h                \
326
 
+       applet-signaler.h               \
327
 
        drawer.h                \
328
 
        panel-util.h            \
329
 
        panel-properties-dialog.h \
330
 
Index: gnome-panel-2.29.92.1/gnome-panel/panel-applet-frame.c
331
 
===================================================================
332
 
--- gnome-panel-2.29.92.1.orig/gnome-panel/panel-applet-frame.c 2010-03-04 17:39:17.000000000 +0100
333
 
+++ gnome-panel-2.29.92.1/gnome-panel/panel-applet-frame.c      2010-03-19 14:48:19.000000000 +0100
334
 
@@ -1442,3 +1442,15 @@
 
215
 
 
216
=== modified file 'gnome-panel/applet.c'
 
217
--- old/gnome-panel/applet.c    2010-03-09 14:38:51 +0000
 
218
+++ new/gnome-panel/applet.c    2010-03-29 20:40:44 +0000
 
219
@@ -34,6 +34,7 @@
 
220
 #include "panel-globals.h"
 
221
 #include "panel-properties-dialog.h"
 
222
 #include "panel-lockdown.h"
 
223
+#include "applet-signaler.h"
 
224
 
 
225
 #define SMALL_ICON_SIZE 20
 
226
 
 
227
@@ -734,6 +735,7 @@ panel_applet_destroy (GtkWidget  *widget
 
228
        info->widget = NULL;
 
229
 
 
230
        registered_applets = g_slist_remove (registered_applets, info);
 
231
+       panel_applet_signaler_remove_applet(info);
 
232
 
 
233
        queued_position_saves =
 
234
                g_slist_remove (queued_position_saves, info);
 
235
@@ -1184,6 +1186,26 @@ panel_applet_get_id (AppletInfo *info)
 
236
        return info->id;
 
237
 }
 
238
 
 
239
+/** \brief  Get the Bonobo IID of the Applet
 
240
+       \param  info  The AppletInfo struct representing the applet
 
241
+       \return  Either the IID of the applet or NULL if the applet does
 
242
+                not have an IID.
 
243
+*/
 
244
+const char *
 
245
+panel_applet_get_iid (AppletInfo *info)
 
246
+{
 
247
+       if (!info)
 
248
+               return NULL;
 
249
+       if (info->type != PANEL_OBJECT_BONOBO)
 
250
+               return NULL;
 
251
+
 
252
+       PanelAppletFrame * frame = PANEL_APPLET_FRAME(info->data);
 
253
+       if (frame == NULL)
 
254
+               return NULL;  /* This should never happen, but just in case */
 
255
+
 
256
+       return panel_applet_frame_get_iid(frame);
 
257
+}
 
258
+
 
259
 const char *
 
260
 panel_applet_get_id_by_widget (GtkWidget *applet_widget)
 
261
 {
 
262
@@ -1207,6 +1229,9 @@ panel_applet_get_by_id (const char *id)
 
263
 {
 
264
        GSList *l;
 
265
 
 
266
+       if (id == NULL)
 
267
+               return NULL;
 
268
+
 
269
        for (l = registered_applets; l; l = l->next) {
 
270
                AppletInfo *info = l->data;
 
271
 
 
272
@@ -1217,6 +1242,33 @@ panel_applet_get_by_id (const char *id)
 
273
        return NULL;
 
274
 }
 
275
 
 
276
+/** \brief  Will find an applet by looking for it's IID
 
277
+       \param  iid  The IID to look for in an applet
 
278
+       \return Either the AppletInfo structure representing the applet or
 
279
+               NULL if an applet with that IID can not be found.
 
280
+*/
 
281
+AppletInfo *
 
282
+panel_applet_get_by_iid (const char *iid)
 
283
+{
 
284
+       GSList *l;
 
285
+
 
286
+       if (iid == NULL)
 
287
+               return NULL;
 
288
+
 
289
+       for (l = registered_applets; l; l = l->next) {
 
290
+               AppletInfo *info = l->data;
 
291
+               const char *applet_iid = panel_applet_get_iid(info);
 
292
+
 
293
+               if (applet_iid == NULL)
 
294
+                       continue;
 
295
+
 
296
+               if (!strcmp (applet_iid, iid))
 
297
+                       return info;
 
298
+       }
 
299
+
 
300
+       return NULL;
 
301
+}
 
302
+
 
303
 GSList *
 
304
 panel_applet_list_applets (void)
 
305
 {
 
306
@@ -1352,6 +1404,7 @@ panel_applet_register (GtkWidget       *
 
307
        else
 
308
                gtk_widget_child_focus (applet, GTK_DIR_TAB_FORWARD);
 
309
 
 
310
+       panel_applet_signaler_add_applet(info);
 
311
        return info;
 
312
 }
 
313
 
 
314
 
 
315
=== modified file 'gnome-panel/applet.h'
 
316
--- old/gnome-panel/applet.h    2010-01-27 17:53:50 +0000
 
317
+++ new/gnome-panel/applet.h    2010-03-29 20:40:44 +0000
 
318
@@ -56,8 +56,10 @@ AppletInfo *panel_applet_register    (Gt
 
319
 void panel_applet_stop_loading (const char *id);
 
320
 
 
321
 const char *panel_applet_get_id           (AppletInfo      *info);
 
322
+const char *panel_applet_get_iid          (AppletInfo      *info);
 
323
 const char *panel_applet_get_id_by_widget (GtkWidget       *widget);
 
324
 AppletInfo *panel_applet_get_by_id        (const char      *id);
 
325
+AppletInfo *panel_applet_get_by_iid       (const char      *iid);
 
326
 AppletInfo *panel_applet_get_by_type      (PanelObjectType  object_type, GdkScreen *screen);
 
327
 
 
328
 GSList     *panel_applet_list_applets (void);
 
329
 
 
330
=== modified file 'gnome-panel/panel-applet-frame.c'
 
331
--- old/gnome-panel/panel-applet-frame.c        2010-03-09 14:38:51 +0000
 
332
+++ new/gnome-panel/panel-applet-frame.c        2010-03-29 20:40:44 +0000
 
333
@@ -1442,3 +1442,15 @@ panel_applet_frame_set_panel (PanelApple
335
334
 
336
335
        frame->priv->panel = panel;
337
336
 }
347
346
+
348
347
+       return frame->priv->iid;
349
348
+}
350
 
Index: gnome-panel-2.29.92.1/gnome-panel/panel-applet-frame.h
351
 
===================================================================
352
 
--- gnome-panel-2.29.92.1.orig/gnome-panel/panel-applet-frame.h 2009-08-11 22:39:33.000000000 +0200
353
 
+++ gnome-panel-2.29.92.1/gnome-panel/panel-applet-frame.h      2010-03-19 14:48:19.000000000 +0100
354
 
@@ -78,6 +78,8 @@
 
349
 
 
350
=== modified file 'gnome-panel/panel-applet-frame.h'
 
351
--- old/gnome-panel/panel-applet-frame.h        2009-06-22 22:26:26 +0000
 
352
+++ new/gnome-panel/panel-applet-frame.h        2010-03-29 20:40:44 +0000
 
353
@@ -78,6 +78,8 @@ void       panel_applet_frame_load_from_
355
354
 void            panel_applet_frame_set_panel (PanelAppletFrame *frame,
356
355
                                              PanelWidget      *panel);
357
356
 
360
359
 G_END_DECLS
361
360
 
362
361
 #endif /* __PANEL_APPLET_FRAME_H__ */
363
 
Index: gnome-panel-2.29.92.1/gnome-panel/panel-menu-bar.c
364
 
===================================================================
365
 
--- gnome-panel-2.29.92.1.orig/gnome-panel/panel-menu-bar.c     2010-03-19 14:48:19.000000000 +0100
366
 
+++ gnome-panel-2.29.92.1/gnome-panel/panel-menu-bar.c  2010-03-19 14:48:19.000000000 +0100
 
362
 
 
363
=== modified file 'gnome-panel/panel-menu-bar.c'
 
364
--- old/gnome-panel/panel-menu-bar.c    2010-03-09 14:38:51 +0000
 
365
+++ new/gnome-panel/panel-menu-bar.c    2010-03-29 20:46:28 +0000
367
366
@@ -47,6 +47,7 @@
368
367
 #include "panel-stock-icons.h"
369
368
 #include "panel-typebuiltins.h"
372
371
 
373
372
 G_DEFINE_TYPE (PanelMenuBar, panel_menu_bar, GTK_TYPE_MENU_BAR)
374
373
 
375
 
@@ -99,6 +100,36 @@
 
374
@@ -99,9 +100,53 @@ panel_menu_bar_hide_tooltip_and_focus (G
376
375
        return FALSE;
377
376
 }
378
377
 
406
405
+       return;
407
406
+}
408
407
+
 
408
+static void
 
409
+disconnect_signalers (PanelAppletSignaler *signaler,
 
410
+                      GtkWidget           *widget)
 
411
+{
 
412
+  g_signal_handlers_disconnect_by_func (signaler,
 
413
+                                        panel_menu_bar_set_tooltip_add,
 
414
+                                        widget);
 
415
+  g_signal_handlers_disconnect_by_func (signaler,
 
416
+                                        panel_menu_bar_set_tooltip_remove,
 
417
+                                        widget);
 
418
+}
 
419
+
409
420
 static void
410
421
 panel_menu_bar_setup_tooltip (PanelMenuBar *menubar)
411
422
 {
412
 
@@ -109,6 +140,12 @@
 
423
+        PanelAppletSignaler *signaler = panel_applet_signaler_get_default ();
 
424
+
 
425
        panel_util_set_tooltip_text (menubar->priv->applications_item,
 
426
                                     _("Browse and run installed applications"));
 
427
        panel_util_set_tooltip_text (menubar->priv->places_item,
 
428
@@ -109,6 +154,16 @@ panel_menu_bar_setup_tooltip (PanelMenuB
413
429
        panel_util_set_tooltip_text (menubar->priv->desktop_item,
414
430
                                     _("Change desktop appearance and behavior, get help, or log out"));
415
431
 
416
 
+    g_signal_connect(panel_applet_signaler_get_default(), PANEL_APPLET_SIGNALER_SIGNAL_APPLET_ADDED,
417
 
+                     G_CALLBACK(panel_menu_bar_set_tooltip_add), menubar->priv->desktop_item);
418
 
+    g_signal_connect(panel_applet_signaler_get_default(), PANEL_APPLET_SIGNALER_SIGNAL_APPLET_REMOVED,
419
 
+                     G_CALLBACK(panel_menu_bar_set_tooltip_remove), menubar->priv->desktop_item);
 
432
+        g_object_weak_ref (G_OBJECT (menubar->priv->desktop_item),
 
433
+                           (GWeakNotify) disconnect_signalers,
 
434
+                           signaler);
 
435
+
 
436
+        g_signal_connect(signaler, PANEL_APPLET_SIGNALER_SIGNAL_APPLET_ADDED,
 
437
+                         G_CALLBACK(panel_menu_bar_set_tooltip_add), menubar->priv->desktop_item);
 
438
+        g_signal_connect(signaler, PANEL_APPLET_SIGNALER_SIGNAL_APPLET_REMOVED,
 
439
+                         G_CALLBACK(panel_menu_bar_set_tooltip_remove), menubar->priv->desktop_item);
420
440
+
421
441
+
422
442
        //FIXME: this doesn't handle the right-click case. Sigh.
423
443
        /* Hide tooltip if a menu is activated */
424
444
        g_signal_connect (menubar->priv->applications_item,
425
 
Index: gnome-panel-2.29.92.1/gnome-panel/panel-menu-items.c
426
 
===================================================================
427
 
--- gnome-panel-2.29.92.1.orig/gnome-panel/panel-menu-items.c   2010-03-19 14:48:19.000000000 +0100
428
 
+++ gnome-panel-2.29.92.1/gnome-panel/panel-menu-items.c        2010-03-19 14:48:19.000000000 +0100
 
445
 
 
446
=== modified file 'gnome-panel/panel-menu-items.c'
 
447
--- old/gnome-panel/panel-menu-items.c  2010-03-09 14:38:51 +0000
 
448
+++ new/gnome-panel/panel-menu-items.c  2010-03-29 20:40:44 +0000
429
449
@@ -54,6 +54,7 @@
430
450
 #include "panel-recent.h"
431
451
 #include "panel-stock-icons.h"
434
454
 
435
455
 #define BOOKMARKS_FILENAME      ".gtk-bookmarks"
436
456
 #define DESKTOP_IS_HOME_DIR_DIR "/apps/nautilus/preferences"
437
 
@@ -1533,6 +1534,46 @@
 
457
@@ -1522,6 +1523,58 @@ panel_desktop_menu_item_set_panel (GtkWi
438
458
                                       "menu_panel", panel);
439
459
 }
440
460
 
478
498
+       return;
479
499
+}
480
500
+
 
501
+static void
 
502
+disconnect_signalers (PanelAppletSignaler *signaler,
 
503
+                      GtkWidget           *widget)
 
504
+{
 
505
+        g_signal_handlers_disconnect_by_func (signaler,
 
506
+                                              panel_menu_items_hide_on_fusa,
 
507
+                                              widget);
 
508
+        g_signal_handlers_disconnect_by_func (signaler,
 
509
+                                              panel_menu_items_show_on_fusa,
 
510
+                                              widget);
 
511
+}
 
512
+
481
513
 void
482
514
 panel_menu_items_append_lock_logout (GtkWidget *menu)
483
515
 {
484
 
@@ -1543,6 +1584,10 @@
 
516
@@ -1532,6 +1585,11 @@ panel_menu_items_append_lock_logout (Gtk
485
517
        const char *translate;
486
518
        char       *label;
487
519
        char       *tooltip;
488
520
+       GtkWidget  *separator = NULL;
489
521
+       AppletInfo *fusa = NULL;
 
522
+       PanelAppletSignaler *signaler = panel_applet_signaler_get_default ();
490
523
+
491
524
+       fusa = panel_applet_get_by_iid(FUSA_APPLET_IID);
492
525
 
493
526
        separator_inserted = FALSE;
494
527
        children = gtk_container_get_children (GTK_CONTAINER (menu));
495
 
@@ -1550,17 +1595,34 @@
 
528
@@ -1539,17 +1597,42 @@ panel_menu_items_append_lock_logout (Gtk
496
529
        if (last != NULL) {
497
530
                separator_inserted = GTK_IS_SEPARATOR (GTK_WIDGET (last->data));
498
531
        }
499
532
+       if (separator_inserted) {
500
 
+               g_signal_connect(panel_applet_signaler_get_default(), PANEL_APPLET_SIGNALER_SIGNAL_APPLET_ADDED,
501
 
+                                                G_CALLBACK(panel_menu_items_hide_on_fusa), last->data);
502
 
+               g_signal_connect(panel_applet_signaler_get_default(), PANEL_APPLET_SIGNALER_SIGNAL_APPLET_REMOVED,
503
 
+                                                G_CALLBACK(panel_menu_items_show_on_fusa), last->data);
 
533
+               g_object_weak_ref (G_OBJECT (last->data),
 
534
+                                   (GWeakNotify) disconnect_signalers,
 
535
+                                   signaler);
 
536
+
 
537
+               g_signal_connect(signaler, PANEL_APPLET_SIGNALER_SIGNAL_APPLET_ADDED,
 
538
+                                G_CALLBACK(panel_menu_items_hide_on_fusa), last->data);
 
539
+               g_signal_connect(signaler, PANEL_APPLET_SIGNALER_SIGNAL_APPLET_REMOVED,
 
540
+                                G_CALLBACK(panel_menu_items_show_on_fusa), last->data);
504
541
+               if (fusa != NULL) {
505
542
+                       gtk_widget_hide(GTK_WIDGET(last->data));
506
543
+               }
518
555
 
519
556
                        gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
520
557
+
521
 
+                       g_signal_connect(panel_applet_signaler_get_default(), PANEL_APPLET_SIGNALER_SIGNAL_APPLET_ADDED,
 
558
+                       g_object_weak_ref (G_OBJECT (item),
 
559
+                                           (GWeakNotify) disconnect_signalers,
 
560
+                                           signaler);
 
561
+
 
562
+                       g_signal_connect(signaler, PANEL_APPLET_SIGNALER_SIGNAL_APPLET_ADDED,
522
563
+                                        G_CALLBACK(panel_menu_items_hide_on_fusa), item);
523
 
+                       g_signal_connect(panel_applet_signaler_get_default(), PANEL_APPLET_SIGNALER_SIGNAL_APPLET_REMOVED,
 
564
+                       g_signal_connect(signaler, PANEL_APPLET_SIGNALER_SIGNAL_APPLET_REMOVED,
524
565
+                                        G_CALLBACK(panel_menu_items_show_on_fusa), item);
525
566
+                       if (fusa != NULL) {
526
567
+                               gtk_widget_hide(GTK_WIDGET(item));
528
569
                }
529
570
        }
530
571
 
531
 
@@ -1603,19 +1665,53 @@
 
572
@@ -1592,19 +1675,65 @@ panel_menu_items_append_lock_logout (Gtk
532
573
 
533
574
        if (item != NULL) {
534
575
                if (!separator_inserted) {
539
580
 
540
581
                gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
541
582
+
542
 
+               g_signal_connect(panel_applet_signaler_get_default(), PANEL_APPLET_SIGNALER_SIGNAL_APPLET_ADDED,
543
 
+                                                G_CALLBACK(panel_menu_items_hide_on_fusa), item);
544
 
+               g_signal_connect(panel_applet_signaler_get_default(), PANEL_APPLET_SIGNALER_SIGNAL_APPLET_REMOVED,
545
 
+                                                G_CALLBACK(panel_menu_items_show_on_fusa), item);
 
583
+               g_object_weak_ref (G_OBJECT (item),
 
584
+                                   (GWeakNotify) disconnect_signalers,
 
585
+                                   signaler);
 
586
+
 
587
+               g_signal_connect(signaler, PANEL_APPLET_SIGNALER_SIGNAL_APPLET_ADDED,
 
588
+                                G_CALLBACK(panel_menu_items_hide_on_fusa), item);
 
589
+               g_signal_connect(signaler, PANEL_APPLET_SIGNALER_SIGNAL_APPLET_REMOVED,
 
590
+                                G_CALLBACK(panel_menu_items_show_on_fusa), item);
546
591
+               if (fusa != NULL) {
547
592
+                       gtk_widget_hide(GTK_WIDGET(item));
548
593
+               }
556
601
 
557
602
                gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
558
603
+
559
 
+               g_signal_connect(panel_applet_signaler_get_default(), PANEL_APPLET_SIGNALER_SIGNAL_APPLET_ADDED,
560
 
+                                                G_CALLBACK(panel_menu_items_hide_on_fusa), item);
561
 
+               g_signal_connect(panel_applet_signaler_get_default(), PANEL_APPLET_SIGNALER_SIGNAL_APPLET_REMOVED,
562
 
+                                                G_CALLBACK(panel_menu_items_show_on_fusa), item);
 
604
+               g_object_weak_ref (G_OBJECT (item),
 
605
+                                   (GWeakNotify) disconnect_signalers,
 
606
+                                   signaler);
 
607
+
 
608
+               g_signal_connect(signaler, PANEL_APPLET_SIGNALER_SIGNAL_APPLET_ADDED,
 
609
+                                G_CALLBACK(panel_menu_items_hide_on_fusa), item);
 
610
+               g_signal_connect(signaler, PANEL_APPLET_SIGNALER_SIGNAL_APPLET_REMOVED,
 
611
+                                G_CALLBACK(panel_menu_items_show_on_fusa), item);
563
612
+               if (fusa != NULL) {
564
613
+                       gtk_widget_hide(GTK_WIDGET(item));
565
614
+               }
574
623
+        * on here as the local variable becomes a pointer to that created
575
624
+        * seperator.  Whew.  */
576
625
+       if (separator != NULL) {
577
 
+               g_signal_connect(panel_applet_signaler_get_default(), PANEL_APPLET_SIGNALER_SIGNAL_APPLET_ADDED,
578
 
+                                                G_CALLBACK(panel_menu_items_hide_on_fusa), separator);
579
 
+               g_signal_connect(panel_applet_signaler_get_default(), PANEL_APPLET_SIGNALER_SIGNAL_APPLET_REMOVED,
580
 
+                                                G_CALLBACK(panel_menu_items_show_on_fusa), separator);
 
626
+               g_object_weak_ref (G_OBJECT (separator),
 
627
+                                   (GWeakNotify) disconnect_signalers,
 
628
+                                   signaler);
 
629
+
 
630
+               g_signal_connect(signaler, PANEL_APPLET_SIGNALER_SIGNAL_APPLET_ADDED,
 
631
+                                G_CALLBACK(panel_menu_items_hide_on_fusa), separator);
 
632
+               g_signal_connect(signaler, PANEL_APPLET_SIGNALER_SIGNAL_APPLET_REMOVED,
 
633
+                                G_CALLBACK(panel_menu_items_show_on_fusa), separator);
581
634
+               if (fusa != NULL) {
582
635
+                       gtk_widget_hide(GTK_WIDGET(separator));
583
636
+               }
584
637
        }
585
638
 }
586
639
 
 
640