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

« back to all changes in this revision

Viewing changes to .pc/40_unset_menuproxy.patch/libpanel-applet/panel-applet.h

  • 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:
30
30
 
31
31
G_BEGIN_DECLS
32
32
 
 
33
/**
 
34
 * PanelAppletOrient:
 
35
 * @PANEL_APPLET_ORIENT_UP: The #PanelApplet is on a horizontal panel, at the
 
36
 * bottom of the screen. It is oriented towards the top of the screen.
 
37
 * @PANEL_APPLET_ORIENT_DOWN: The #PanelApplet is on a horizontal panel, at the
 
38
 * top of the screen. It is oriented towards the bottom of the screen.
 
39
 * @PANEL_APPLET_ORIENT_LEFT: The #PanelApplet is on a vertical panel, at the
 
40
 * right of the screen. It is oriented towards the left of the screen.
 
41
 * @PANEL_APPLET_ORIENT_RIGHT: The #PanelApplet is on a vertical panel, at the
 
42
 * left of the screen. It is oriented towards the right of the screen.
 
43
 *
 
44
 * Type defining the orientation of the applet. The values may seem backward
 
45
 * (e.g. %PANEL_APPLET_ORIENT_RIGHT means the panel is on the left side), but
 
46
 * this represents the direction the applet is oriented to.
 
47
 **/
33
48
typedef enum {
34
49
        PANEL_APPLET_ORIENT_UP,
35
50
        PANEL_APPLET_ORIENT_DOWN,
37
52
        PANEL_APPLET_ORIENT_RIGHT
38
53
} PanelAppletOrient;
39
54
 
 
55
#define PANEL_APPLET_ORIENT_FIRST PANEL_APPLET_ORIENT_UP
 
56
#define PANEL_APPLET_ORIENT_LAST  PANEL_APPLET_ORIENT_RIGHT
 
57
 
40
58
#define PANEL_TYPE_APPLET         (panel_applet_get_type ())
41
59
#define PANEL_APPLET(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), PANEL_TYPE_APPLET, PanelApplet))
42
60
#define PANEL_APPLET_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), PANEL_TYPE_APPLET, PanelAppletClass))
44
62
#define PANEL_IS_APPLET_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), PANEL_TYPE_APPLET))
45
63
#define PANEL_APPLET_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PANEL_TYPE_APPLET, PanelAppletClass))
46
64
 
47
 
typedef enum {
48
 
        PANEL_NO_BACKGROUND,
49
 
        PANEL_COLOR_BACKGROUND,
50
 
        PANEL_PIXMAP_BACKGROUND
51
 
} PanelAppletBackgroundType;
52
 
 
 
65
/**
 
66
 * PanelAppletFlags:
 
67
 * @PANEL_APPLET_FLAGS_NONE: No flags set.
 
68
 * @PANEL_APPLET_EXPAND_MAJOR: On horizontal panels, the #PanelApplet will be
 
69
 * allocated as much width as possible. On vertical panels, it will be
 
70
 * allocated as much height as possible.
 
71
 * @PANEL_APPLET_EXPAND_MINOR: On horizontal panels, the #PanelApplet will be
 
72
 * allocated the full height of the panel. On vertical panels, it will be
 
73
 * allocated the full width. Most applets should set this flag in order to use
 
74
 * the full panel size and allow the applet to be Fitt's Law compliant.
 
75
 * @PANEL_APPLET_HAS_HANDLE: The panel will draw a handle for the
 
76
 * #PanelApplet. This handle will be usable to move the applet, and to open the
 
77
 * context menu of the applet.
 
78
 *
 
79
 * Flags to be used with panel_applet_get_flags()/panel_applet_set_flags(), to
 
80
 * indicate to the panel a specific behavior requested by the #PanelApplet.
 
81
 **/
53
82
typedef enum {
54
83
        PANEL_APPLET_FLAGS_NONE   = 0,
55
84
        PANEL_APPLET_EXPAND_MAJOR = 1 << 0,
57
86
        PANEL_APPLET_HAS_HANDLE   = 1 << 2
58
87
} PanelAppletFlags;
59
88
 
 
89
#define PANEL_APPLET_FLAGS_ALL (PANEL_APPLET_EXPAND_MAJOR|PANEL_APPLET_EXPAND_MINOR|PANEL_APPLET_HAS_HANDLE)
 
90
 
60
91
typedef struct _PanelApplet        PanelApplet;
61
92
typedef struct _PanelAppletClass   PanelAppletClass;
62
93
typedef struct _PanelAppletPrivate PanelAppletPrivate;
63
94
 
 
95
/**
 
96
 * PanelAppletFactoryCallback:
 
97
 * @applet: a newly-created #PanelApplet.
 
98
 * @iid: identifier of the requested applet type.
 
99
 * @user_data: user data.
 
100
 *
 
101
 * The type used for callbacks after. The callback will usually check that @iid
 
102
 * is a valid applet type identifier for the applet factory, and will then fill
 
103
 * @applet with widgets, connect to signals, etc.
 
104
 *
 
105
 * Returns: %TRUE if @iid is a valid applet type identifier for the applet
 
106
 * factory and if the creation of @applet was successfully completed, %FALSE
 
107
 * otherwise.
 
108
 **/
64
109
typedef gboolean (*PanelAppletFactoryCallback) (PanelApplet *applet,
65
110
                                                const gchar *iid,
66
111
                                                gpointer     user_data);
68
113
struct _PanelApplet {
69
114
        GtkEventBox          event_box;
70
115
 
 
116
        /*< private >*/
71
117
        PanelAppletPrivate  *priv;
72
118
};
73
119
 
80
126
        void (*change_size)   (PanelApplet       *applet,
81
127
                               guint              size);
82
128
 
83
 
        void (*change_background) (PanelApplet               *applet,
84
 
                                   PanelAppletBackgroundType  type,
85
 
                                   GdkColor                  *color,
86
 
                                   GdkPixmap                 *pixmap);
 
129
        void (*change_background) (PanelApplet     *applet,
 
130
                                   cairo_pattern_t *pattern);
87
131
        void (*move_focus_out_of_applet) (PanelApplet        *frame,
88
132
                                          GtkDirectionType    direction);
89
133
};
90
134
 
91
135
GType              panel_applet_get_type             (void) G_GNUC_CONST;
92
136
 
93
 
GtkWidget         *panel_applet_new                  (void);
94
 
 
95
137
PanelAppletOrient  panel_applet_get_orient           (PanelApplet *applet);
96
138
guint              panel_applet_get_size             (PanelApplet *applet);
97
 
PanelAppletBackgroundType
98
 
                   panel_applet_get_background       (PanelApplet *applet,
99
 
                                                      /* return values */
100
 
                                                      GdkColor    *color,
101
 
                                                      GdkPixmap  **pixmap);
 
139
cairo_pattern_t   *panel_applet_get_background       (PanelApplet *applet);
102
140
 
103
141
void               panel_applet_set_background_widget (PanelApplet *applet,
104
142
                                                       GtkWidget   *widget);
105
143
 
 
144
GSettings         *panel_applet_settings_new         (PanelApplet *applet,
 
145
                                                      const char  *schema);
 
146
 
106
147
gchar             *panel_applet_get_preferences_key  (PanelApplet *applet);
107
148
 
108
149
void               panel_applet_add_preferences      (PanelApplet  *applet,
109
150
                                                      const gchar  *schema_dir,
110
 
                                                      GError      **opt_error);
 
151
                                                      GError      **error);
111
152
 
112
153
PanelAppletFlags   panel_applet_get_flags            (PanelApplet      *applet);
113
154
void               panel_applet_set_flags            (PanelApplet      *applet,
131
172
                                                      GtkActionGroup     *action_group);
132
173
 
133
174
int                panel_applet_factory_main          (const gchar                *factory_id,
134
 
                                                       gboolean                    out_process,
135
175
                                                       GType                       applet_type,
136
176
                                                       PanelAppletFactoryCallback  callback,
137
177
                                                       gpointer                    data);
138
 
gboolean           _panel_applet_shlib_factory        (void);
 
178
 
 
179
int                panel_applet_factory_setup_in_process (const gchar               *factory_id,
 
180
                                                          GType                      applet_type,
 
181
                                                          PanelAppletFactoryCallback callback,
 
182
                                                          gpointer                   data);
139
183
 
140
184
 
141
185
/*
160
204
        } while (0)
161
205
#endif /* !defined(ENABLE_NLS) */
162
206
 
163
 
#define PANEL_APPLET_OUT_PROCESS_FACTORY(id, type, name, callback, data)        \
 
207
/**
 
208
 * PANEL_APPLET_OUT_PROCESS_FACTORY:
 
209
 * @id: identifier of an applet factory.
 
210
 * @type: GType of the applet this factory creates.
 
211
 * @callback: (scope call): callback to be called when a new applet is created.
 
212
 * @data: (closure): callback data.
 
213
 *
 
214
 * Convenience macro providing a main() function for an out-of-process applet.
 
215
 * Internally, it will call panel_applet_factory_main() to create the
 
216
 * @factory_id applet factory.
 
217
 *
 
218
 * Applet instances created by the applet factory will use @applet_type as
 
219
 * GType. Unless you subclass #PanelApplet, you should use %PANEL_TYPE_APPLET
 
220
 * as @applet_type.
 
221
 *
 
222
 * On creation of the applet instances, @callback is called to setup the
 
223
 * applet. If @callback returns %FALSE, the creation of the applet instance is
 
224
 * cancelled.
 
225
 *
 
226
 * It can only be used once, and is incompatible with the use of
 
227
 * %PANEL_APPLET_IN_PROCESS_FACTORY and panel_applet_factory_main().
 
228
 **/
 
229
#define PANEL_APPLET_OUT_PROCESS_FACTORY(id, type, callback, data)              \
164
230
int main (int argc, char *argv [])                                              \
165
231
{                                                                               \
166
232
        GOptionContext *context;                                                \
186
252
                                                                                \
187
253
        gtk_init (&argc, &argv);                                                \
188
254
                                                                                \
189
 
        retval = panel_applet_factory_main (id, TRUE, type, callback, data);    \
 
255
        retval = panel_applet_factory_main (id, type, callback, data);          \
190
256
        g_option_context_free (context);                                        \
191
257
                                                                                \
192
258
        return retval;                                                          \
193
259
}
194
260
 
195
 
#define PANEL_APPLET_IN_PROCESS_FACTORY(id, type, descr, callback, data)        \
 
261
/**
 
262
 * PANEL_APPLET_IN_PROCESS_FACTORY:
 
263
 * @id: identifier of an applet factory.
 
264
 * @type: GType of the applet this factory creates.
 
265
 * @callback: (scope call): callback to be called when a new applet is created.
 
266
 * @data: (closure): callback data.
 
267
 *
 
268
 * Convenience macro providing the symbol needed to automatically register the
 
269
 * @factory_id applet factory for an in-process applet.
 
270
 *
 
271
 * Applet instances created by the applet factory will use @applet_type as
 
272
 * GType. Unless you subclass #PanelApplet, you should use %PANEL_TYPE_APPLET
 
273
 * as @applet_type.
 
274
 *
 
275
 * On creation of the applet instances, @callback is called to setup the
 
276
 * applet. If @callback returns %FALSE, the creation of the applet instance is
 
277
 * cancelled.
 
278
 *
 
279
 * It can only be used once, and is incompatible with the use of
 
280
 * %PANEL_APPLET_OUT_PROCESS_FACTORY and panel_applet_factory_main().
 
281
 **/
 
282
#define PANEL_APPLET_IN_PROCESS_FACTORY(id, type, callback, data)               \
 
283
gboolean _panel_applet_shlib_factory (void);                                    \
196
284
G_MODULE_EXPORT gint                                                            \
197
285
_panel_applet_shlib_factory (void)                                              \
198
286
{                                                                               \
199
287
        _PANEL_APPLET_SETUP_GETTEXT (FALSE);                                    \
200
 
        return panel_applet_factory_main (id, FALSE, type, callback, data);     \
 
288
        return panel_applet_factory_setup_in_process (id, type,                 \
 
289
                                                      callback, data);          \
201
290
}
202
291
 
203
292
G_END_DECLS