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

« back to all changes in this revision

Viewing changes to gnome-panel/applet-signaler.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher, Sebastien Bacher, Jeremy Bicha
  • Date: 2011-05-30 11:04:49 UTC
  • mfrom: (1.13.10 upstream) (2.2.5 experimental)
  • Revision ID: james.westby@ubuntu.com-20110530110449-hinl17kxkcefjw6x
Tags: 1:3.0.2-0ubuntu1
[ Sebastien Bacher ]
* New upstream version
* debian/control.in:
  - the new libgweather version is in oneiric, use it
  - drop the python and python-gconf depends, 
    they were added for gnome-panel-add which is still using gconf and buggy
* debian/gnome-panel-data.install:
  - don't install the apport hook, it's only getting gconf datas which 
    doesn't work since gnome-panel uses gsettings
* debian/patches/90_build_fixes.patch:
  - restore build fix from git not applied in the new serie
* debian/patches/01_panel_submenus.patch:
  - don't take that Debian diff, the .menus use the upstream naming in Ubuntu
* debian/patches/06_no_resize_grip.patch:
  - dropped, the issue is fixed in the new version
* debian/patches/50_fix-potfiles.patch:
  - dropped, the issue is fixed in the new version
* debian/watch:
  - track unstable series as well

Drop those delta, since gnome-panel is not the default Ubuntu session now we
can go back to an experience closer to the upstream one: 
* debian/control.in:
  - drop the indicators recommends, unity-2d is the ubuntu fallback session
    so we can get back to use an upstream config for gnome-panel and reduce
    the delta we carry
* debian/patches/04_default_panel_config.patch:
  - don't modify the upstream layout
* debian/patches/05_no_session_delay.patch:
  - no need to tweak the upstream session to optimize it
* debian/patches/16_compiz_workspace_switcher.patch:
  - go back to the upstream switcher behaviour    
* debian/patches/25_dynamic_fusa_detection.patch:
  - not needed since we use the upstream layout, could be ported if someone
    is wanting to do the work though
* debian/patches/30_disable-initial-animation.patch, debian/rules:
  - drop the --disable-initial-animation, that was some login optimization
    but since it's not the default desktop you should go back to the 
    upstream behaviour

[ Jeremy Bicha ]   
* New upstream version
* Merge from Debian experimental, remaining Ubuntu changes:
* debian/control:
  - Recommends gnome-settings-daemon which has the timezone polkit service
* debian/rules:
  - Update translations template.
* debian/gnome-panel-data.install:
  - Install apport hook
  - Install the "About Ubuntu" menu item.
* debian/patches/01_layout.patch:
  - Disabled, Help & About Ubuntu don't fit as well in Gnome Panel 3
* debian/patches/01_panel_submenus.patch.
  - Dropped
* debian/patches/03_dnd_places_link.patch:
  - Disabled, when using Drag'n'Drop from Places menu, install a link launcher
    (.desktop file) instead of copying the entire directory.
* debian/patches/17_about-ubuntu-translation.patch:
  - List ubuntu-about.desktop for translation.
* debian/patches/40_unset_menuproxy.patch:
  - Make sure gnome-panel and the applets don't pick up menu proxies.
* debian/patches/50_fix-potfiles.patch
  - Fix i18n
* debian/patches/85_disable_shutdown_on_ltsp.patch:
  - Suppress the shutdown option in the panel if LTSP_CLIENT is set.
* debian/patches/71_change_bookmark_submenu_limit_value.patch
  - Dropped, picked up by Debian
* debian/patches/18_lockdown_lock_editor.patch:
* debian/patches/90_git_wnck_show_realize.patch:
* debian/patches/90_fix_linking_DSO_link.patch:
* debian/patches/91_gir_annotations.patch
* debian/patches/92_git_calendar_day.patch
* debian/patches/92_git_fix_applets_in_multiscreen.patch:
  - Dropped, applied upstream
* debian/watch:
  - watch unstable versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Fast User Switch Applet: status-manager.c
3
 
 * 
4
 
 * Copyright (C) 2008 Canonical, Ltd.
5
 
 * Authors:
6
 
 *   Ted Gould <ted@canonical.com>
7
 
 *
8
 
 * This program is free software; you can redistribute it and/or modify
9
 
 * it under the terms of the GNU General Public License as published by
10
 
 * the Free Software Foundation; either version 2 of the License, or
11
 
 * (at your option) any later version.
12
 
 *
13
 
 * This program is distributed in the hope that it will be useful,
14
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 
 * GNU General Public License for more details.
17
 
 *
18
 
 * You should have received a copy of the GNU General Public License
19
 
 * along with this program; if not, write to the Free Software
20
 
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21
 
 */
22
 
 
23
 
#include "applet-signaler.h"
24
 
 
25
 
#define PANEL_APPLET_SIGNALER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PANEL_TYPE_APPLET_SIGNALER, PanelAppletSignalerClass))
26
 
#define PANEL_IS_APPLET_SIGNALER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PANEL_TYPE_APPLET_SIGNALER))
27
 
#define PANEL_APPLET_SIGNALER_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), PANEL_TYPE_APPLET_SIGNALER, PanelAppletSignalerClass))
28
 
 
29
 
/* Signals */
30
 
enum {
31
 
        APPLET_ADDED,
32
 
        APPLET_REMOVED,
33
 
        LAST_SIGNAL
34
 
};
35
 
 
36
 
struct _PanelAppletSignaler
37
 
{
38
 
        GObject parent;
39
 
};
40
 
 
41
 
typedef struct _PanelAppletSignalerClass
42
 
{
43
 
        GObjectClass parent_class;
44
 
 
45
 
        PanelAppletSignalerFunc applet_added;
46
 
        PanelAppletSignalerFunc applet_removed;
47
 
}
48
 
PanelAppletSignalerClass;
49
 
 
50
 
guint signals[LAST_SIGNAL] = {0};
51
 
 
52
 
G_DEFINE_TYPE (PanelAppletSignaler, panel_applet_signaler, G_TYPE_OBJECT);
53
 
 
54
 
static void
55
 
panel_applet_signaler_finalize (GObject * obj)
56
 
{
57
 
        return;
58
 
}
59
 
 
60
 
static void
61
 
panel_applet_signaler_class_init (PanelAppletSignalerClass * class)
62
 
{
63
 
        GObjectClass * gobj;
64
 
        gobj = G_OBJECT_CLASS(class);
65
 
 
66
 
        gobj->finalize = panel_applet_signaler_finalize;
67
 
 
68
 
        /* Signals */
69
 
        signals[APPLET_ADDED] = g_signal_new (PANEL_APPLET_SIGNALER_SIGNAL_APPLET_ADDED,
70
 
                                     G_TYPE_FROM_CLASS(class),
71
 
                                     G_SIGNAL_RUN_LAST,
72
 
                                     G_STRUCT_OFFSET(PanelAppletSignalerClass, applet_added),
73
 
                                     NULL, NULL, /* accumulator */
74
 
                                     g_cclosure_marshal_VOID__POINTER,
75
 
                                     G_TYPE_NONE, /* Return value */
76
 
                                     1, G_TYPE_POINTER); /* Parameters */
77
 
 
78
 
        signals[APPLET_REMOVED] = g_signal_new (PANEL_APPLET_SIGNALER_SIGNAL_APPLET_REMOVED,
79
 
                                     G_TYPE_FROM_CLASS(class),
80
 
                                     G_SIGNAL_RUN_LAST,
81
 
                                     G_STRUCT_OFFSET(PanelAppletSignalerClass, applet_removed),
82
 
                                     NULL, NULL, /* accumulator */
83
 
                                     g_cclosure_marshal_VOID__POINTER,
84
 
                                     G_TYPE_NONE, /* Return value */
85
 
                                     1, G_TYPE_POINTER); /* Parameters */
86
 
 
87
 
        return;
88
 
}
89
 
 
90
 
static void
91
 
panel_applet_signaler_init (PanelAppletSignaler * pas)
92
 
{
93
 
        return;
94
 
}
95
 
 
96
 
static PanelAppletSignaler * default_signaler = NULL;
97
 
 
98
 
PanelAppletSignaler *
99
 
panel_applet_signaler_get_default (void)
100
 
{
101
 
        if (default_signaler == NULL) {
102
 
                default_signaler = g_object_new(PANEL_TYPE_APPLET_SIGNALER, NULL);
103
 
                g_object_add_weak_pointer(G_OBJECT(default_signaler),
104
 
                                          (gpointer *)&default_signaler);
105
 
        }
106
 
 
107
 
        return default_signaler;
108
 
}
109
 
 
110
 
static guint applet_count = 0;
111
 
 
112
 
void
113
 
panel_applet_signaler_add_applet (AppletInfo * applet)
114
 
{
115
 
        /* Ensure that one is created */
116
 
        PanelAppletSignaler * signaler = panel_applet_signaler_get_default();
117
 
 
118
 
        g_signal_emit(signaler, signals[APPLET_ADDED], NULL, applet);
119
 
 
120
 
        return;
121
 
}
122
 
 
123
 
void
124
 
panel_applet_signaler_remove_applet (AppletInfo * applet)
125
 
{
126
 
        /* Ensure that one is created */
127
 
        PanelAppletSignaler * signaler = panel_applet_signaler_get_default();
128
 
 
129
 
        g_signal_emit(signaler, signals[APPLET_REMOVED], NULL, applet);
130
 
 
131
 
        return;
132
 
}
133