91
91
static gpointer garbage_applet_parent_class = NULL;
93
93
#define not_used APPLETSDIR
94
GType garbage_applet_get_type (void);
95
GType garbage_prefs_get_type (void);
94
GType garbage_applet_get_type (void) G_GNUC_CONST;
95
GType garbage_prefs_get_type (void) G_GNUC_CONST;
96
96
#define GARBAGE_APPLET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_GARBAGE_APPLET, GarbageAppletPrivate))
98
98
GARBAGE_APPLET_DUMMY_PROPERTY,
99
99
GARBAGE_APPLET_SHOW_COUNT,
100
100
GARBAGE_APPLET_CONFIRM_EMPTY
102
GarbageApplet* garbage_applet_new (const char* canonical_name, const char* uid, gint panel_id);
103
GarbageApplet* garbage_applet_construct (GType object_type, const char* canonical_name, const char* uid, gint panel_id);
102
104
static void garbage_applet_on_prop_changed (GarbageApplet* self, GParamSpec* pspec);
103
105
static void _garbage_applet_on_prop_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
104
106
static void garbage_applet_render_applet_icon (GarbageApplet* self);
105
GarbageApplet* garbage_applet_new (const char* canonical_name, const char* uid, gint panel_id);
106
GarbageApplet* garbage_applet_construct (GType object_type, const char* canonical_name, const char* uid, gint panel_id);
107
static gboolean garbage_applet_on_map_event (GarbageApplet* self, GdkEvent* evt);
107
108
static gboolean garbage_applet_on_drag_motion (GarbageApplet* self, GdkDragContext* context, gint x, gint y, guint time);
108
109
static gboolean _garbage_applet_on_drag_motion_gtk_widget_drag_motion (GtkWidget* _sender, GdkDragContext* context, gint x, gint y, guint time_, gpointer self);
109
110
static void garbage_applet_on_drag_leave (GarbageApplet* self, GdkDragContext* context, guint time);
110
111
static void _garbage_applet_on_drag_leave_gtk_widget_drag_leave (GtkWidget* _sender, GdkDragContext* context, guint time_, gpointer self);
111
112
static void garbage_applet_on_drag_data_received (GarbageApplet* self, GdkDragContext* context, gint x, gint y, GtkSelectionData* data, guint info, guint time);
112
113
static void _garbage_applet_on_drag_data_received_gtk_widget_drag_data_received (GtkWidget* _sender, GdkDragContext* context, gint x, gint y, GtkSelectionData* selection_data, guint info, guint time_, gpointer self);
113
static gboolean garbage_applet_on_map_event (GarbageApplet* self, GdkEvent* evt);
114
114
static void garbage_applet_show_error_message (GarbageApplet* self, const char* msg);
115
115
gboolean garbage_applet_get_show_count (GarbageApplet* self);
116
116
static void garbage_applet_on_clicked (GarbageApplet* self);
117
static void garbage_applet_on_context_menu_popup (GarbageApplet* self, GdkEventButton* evt);
117
118
static void garbage_applet_on_menu_empty_activate (GarbageApplet* self);
118
119
static void _garbage_applet_on_menu_empty_activate_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
119
120
static void garbage_applet_on_menu_prefs_activate (GarbageApplet* self);
120
121
static void _garbage_applet_on_menu_prefs_activate_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
121
static void garbage_applet_on_context_menu_popup (GarbageApplet* self, GdkEventButton* evt);
122
122
gboolean garbage_applet_get_confirm_empty (GarbageApplet* self);
123
123
GarbagePrefs* garbage_prefs_new (GarbageApplet* applet);
124
124
GarbagePrefs* garbage_prefs_construct (GType object_type, GarbageApplet* applet);
154
154
GarbageApplet* garbage_applet_construct (GType object_type, const char* canonical_name, const char* uid, gint panel_id) {
155
GError * _inner_error_;
156
GParameter * __params;
157
GParameter * __params_it;
158
155
GarbageApplet * self;
160
157
DesktopAgnosticConfigClient* _tmp1_;
161
158
DesktopAgnosticConfigClient* _tmp2_;
159
GError * _inner_error_ = NULL;
162
160
g_return_val_if_fail (canonical_name != NULL, NULL);
163
161
g_return_val_if_fail (uid != NULL, NULL);
164
_inner_error_ = NULL;
165
__params = g_new0 (GParameter, 3);
166
__params_it = __params;
167
__params_it->name = "canonical-name";
168
g_value_init (&__params_it->value, G_TYPE_STRING);
169
g_value_set_string (&__params_it->value, canonical_name);
171
__params_it->name = "uid";
172
g_value_init (&__params_it->value, G_TYPE_STRING);
173
g_value_set_string (&__params_it->value, uid);
175
__params_it->name = "panel-id";
176
g_value_init (&__params_it->value, G_TYPE_INT);
177
g_value_set_int (&__params_it->value, panel_id);
179
self = g_object_newv (object_type, __params_it - __params, __params);
162
self = (GarbageApplet*) g_object_new (object_type, "canonical-name", canonical_name, "uid", uid, "panel-id", panel_id, NULL);
180
163
g_object_set ((GObject*) (_tmp0_ = awn_applet_simple_get_icon ((AwnAppletSimple*) self), AWN_IS_THEMED_ICON (_tmp0_) ? ((AwnThemedIcon*) _tmp0_) : NULL), "drag-and-drop", FALSE, NULL);
181
164
_tmp1_ = awn_config_get_default_for_applet ((AwnApplet*) self, &_inner_error_);
182
165
if (_inner_error_ != NULL) {
441
420
about_item = (_tmp4_ = _g_object_ref0 (awn_applet_create_about_item_simple ((AwnApplet*) self, "Copyright © 2009 Mark Lee <avant-wn@lazymalevolence.com>", AWN_APPLET_LICENSE_GPLV2, VERSION)), _g_object_unref0 (about_item), _tmp4_);
442
421
gtk_widget_show (about_item);
443
422
gtk_menu_shell_append ((GtkMenuShell*) self->priv->menu, (GtkWidget*) (_tmp5_ = about_item, GTK_IS_MENU_ITEM (_tmp5_) ? ((GtkMenuItem*) _tmp5_) : NULL));
423
_g_object_unref0 (about_item);
444
424
_g_object_unref0 (prefs_item);
445
_g_object_unref0 (about_item);
447
426
ctx_menu = GTK_MENU (self->priv->menu);
448
427
gtk_menu_set_screen (ctx_menu, NULL);