1
/* notification-area.c generated by valac, the Vala compiler
1
/* notification-area.c generated by valac 0.9.7, the Vala compiler
2
2
* generated from notification-area.vala, do not modify */
101
101
static NotificationAreaPrefs* notification_area_prefs_window = NULL;
102
102
static gpointer notification_area_parent_class = NULL;
104
GType notification_area_get_type (void);
104
GType notification_area_get_type (void) G_GNUC_CONST;
105
105
#define NOTIFICATION_AREA_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_NOTIFICATION_AREA, NotificationAreaPrivate))
107
107
NOTIFICATION_AREA_DUMMY_PROPERTY,
111
111
NOTIFICATION_AREA_BACKGROUND_COLOR,
112
112
NOTIFICATION_AREA_BORDER_COLOR
114
GType notification_area_prefs_get_type (void);
114
GType notification_area_prefs_get_type (void) G_GNUC_CONST;
115
115
#define NOTIFICATION_AREA_BORDER 2
116
NotificationArea* notification_area_new (AwnApplet* applet);
117
NotificationArea* notification_area_construct (GType object_type, AwnApplet* applet);
116
118
static void notification_area_on_icon_added (NotificationArea* self, GtkWidget* widget);
117
119
static void _notification_area_on_icon_added_egg_tray_manager_tray_icon_added (EggTrayManager* _sender, GtkWidget* object, gpointer self);
118
120
static void notification_area_on_icon_removed (NotificationArea* self, GtkWidget* widget);
119
121
static void _notification_area_on_icon_removed_egg_tray_manager_tray_icon_removed (EggTrayManager* _sender, GtkWidget* object, gpointer self);
122
static void _lambda9_ (GtkPositionType new_pos, NotificationArea* self);
120
123
static void notification_area_update_icon_sizes (NotificationArea* self);
121
124
static void notification_area_table_refresh (NotificationArea* self);
122
static void _lambda9_ (GtkPositionType new_pos, NotificationArea* self);
123
125
static void __lambda9__awn_applet_position_changed (AwnApplet* _sender, GtkPositionType position, gpointer self);
124
126
static void _lambda10_ (gint new_size, NotificationArea* self);
125
127
static void __lambda10__awn_applet_size_changed (AwnApplet* _sender, gint size, gpointer self);
128
130
static gboolean notification_area_button_press (NotificationArea* self, GdkEventButton* event);
129
131
static gboolean _notification_area_button_press_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self);
130
132
static gboolean notification_area_on_painter_expose (NotificationArea* self, GdkEvent* event, GtkBin* eb);
131
NotificationArea* notification_area_new (AwnApplet* applet);
132
NotificationArea* notification_area_construct (GType object_type, AwnApplet* applet);
133
133
static void notification_area_tray_icon_expose (GtkWidget* widget, cairo_t* cr);
134
134
NotificationAreaPrefs* notification_area_prefs_new (AwnApplet* applet);
135
135
NotificationAreaPrefs* notification_area_prefs_construct (GType object_type, AwnApplet* applet);
197
197
static gboolean _notification_area_on_applet_expose_gtk_widget_expose_event (GtkWidget* _sender, GdkEventExpose* event, gpointer self) {
198
return notification_area_on_applet_expose (self, event);
199
result = notification_area_on_applet_expose (self, event);
202
204
static gboolean _notification_area_button_press_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
203
return notification_area_button_press (self, event);
206
result = notification_area_button_press (self, event);
207
211
NotificationArea* notification_area_construct (GType object_type, AwnApplet* applet) {
208
GError * _inner_error_;
209
212
NotificationArea * self;
210
213
AwnApplet* _tmp0_;
211
214
EggTrayManager* _tmp1_;
218
221
GtkTable* _tmp7_;
219
222
DesktopAgnosticConfigClient* _tmp8_;
220
223
DesktopAgnosticConfigClient* _tmp9_;
224
GError * _inner_error_ = NULL;
221
225
g_return_val_if_fail (applet != NULL, NULL);
222
_inner_error_ = NULL;
223
226
self = (NotificationArea*) g_object_new (object_type, NULL);
224
227
self->priv->applet = (_tmp0_ = _g_object_ref0 (applet), _g_object_unref0 (self->priv->applet), _tmp0_);
225
228
self->priv->manager = (_tmp1_ = egg_tray_manager_new (), _g_object_unref0 (self->priv->manager), _tmp1_);
993
1000
gboolean workaround_gpm_bug (void) {
994
1001
gboolean result = FALSE;
995
GError * _inner_error_;
997
_inner_error_ = NULL;
1003
GError * _inner_error_ = NULL;
998
1004
command = g_strdup ("python -c \"" "import gconf;" "c = gconf.Client();" "key = '/apps/gnome-power-manager/ui/icon_policy';" "pol = c.get_string(key);" "c.set_string(key, 'always');" "c.set_string(key, pol);" "\"");
999
1005
g_spawn_command_line_async (command, &_inner_error_);
1000
1006
if (_inner_error_ != NULL) {
1023
1029
gtk_message_dialog_format_secondary_text (d, "Please remove the existing notification area" " and then restart the applet.", NULL);
1024
1030
gtk_dialog_run ((GtkDialog*) d);
1025
1031
g_error ("notification-area.vala:644: %s", msg);
1032
_g_object_unref0 (d);
1027
1033
_g_free0 (msg);
1028
_g_object_unref0 (d);
1031
1035
applet = g_object_ref_sink (awn_applet_new (canonical_name, uid, panel_id));
1032
1036
na = notification_area_new (applet);