181
181
UNITY_PLACES_TRASH_CONTROLLER_DUMMY_PROPERTY
183
183
#define UNITY_PLACES_TRASH_CONTROLLER_ICON "/usr/share/unity/trash.png"
184
UnityPlacesTrashController* unity_places_trash_controller_new (void);
185
UnityPlacesTrashController* unity_places_trash_controller_construct (GType object_type);
186
184
UnityLauncherScrollerChild* unity_launcher_scroller_child_new (void);
187
185
UnityLauncherScrollerChild* unity_launcher_scroller_child_construct (GType object_type);
188
186
GType unity_launcher_scroller_child_get_type (void) G_GNUC_CONST;
187
UnityPlacesTrashController* unity_places_trash_controller_new (void);
188
UnityPlacesTrashController* unity_places_trash_controller_construct (GType object_type);
189
189
static void unity_places_trash_controller_real_activate (UnityLauncherScrollerChildController* base);
190
static UnityLauncherQuicklistController* unity_places_trash_controller_real_get_menu_controller (UnityLauncherScrollerChildController* base);
191
190
UnityLauncherApplicationQuicklistController* unity_launcher_application_quicklist_controller_new (UnityLauncherScrollerChildController* scroller_child);
192
191
UnityLauncherApplicationQuicklistController* unity_launcher_application_quicklist_controller_construct (GType object_type, UnityLauncherScrollerChildController* scroller_child);
193
192
GType unity_launcher_application_quicklist_controller_get_type (void) G_GNUC_CONST;
193
static UnityLauncherQuicklistController* unity_places_trash_controller_real_get_menu_controller (UnityLauncherScrollerChildController* base);
194
194
static void unity_places_trash_controller_real_get_menu_actions (UnityLauncherScrollerChildController* base, UnityLauncherScrollerChildControllermenu_cb callback, void* callback_target);
195
static void unity_places_trash_controller_real_get_menu_navigation (UnityLauncherScrollerChildController* base, UnityLauncherScrollerChildControllermenu_cb callback, void* callback_target);
196
195
static void _lambda70_ (UnityPlacesTrashController* self);
197
196
static void __lambda70__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self);
198
static void _lambda71_ (UnityPlacesTrashController* self);
199
197
static void unity_places_trash_controller_recursively_delete_contents (UnityPlacesTrashController* self, GFile* dir, GAsyncReadyCallback _callback_, gpointer _user_data_);
200
198
static void unity_places_trash_controller_recursively_delete_contents_finish (UnityPlacesTrashController* self, GAsyncResult* _res_);
199
static void _lambda71_ (UnityPlacesTrashController* self);
201
200
static void __lambda71__dbusmenu_menuitem_item_activated (DbusmenuMenuitem* _sender, guint object, gpointer self);
201
static void unity_places_trash_controller_real_get_menu_navigation (UnityLauncherScrollerChildController* base, UnityLauncherScrollerChildControllermenu_cb callback, void* callback_target);
202
202
static void unity_places_trash_controller_recursively_delete_contents_data_free (gpointer _data);
203
203
static void unity_places_trash_controller_recursively_delete_contents_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
204
static void _g_list_free_g_object_unref (GList* self);
204
205
static gboolean unity_places_trash_controller_recursively_delete_contents_co (UnityPlacesTrashControllerRecursivelyDeleteContentsData* data);
205
static void _g_list_free_g_object_unref (GList* self);
206
206
static gboolean unity_places_trash_controller_real_can_drag (UnityLauncherScrollerChildController* base);
207
207
void unity_launcher_scroller_child_controller_set_name (UnityLauncherScrollerChildController* self, const char* value);
208
208
void unity_launcher_scroller_child_controller_load_icon_from_icon_name (UnityLauncherScrollerChildController* self, const char* icon_name);
209
UnityLauncherScrollerChild* unity_launcher_scroller_child_controller_get_child (UnityLauncherScrollerChildController* self);
210
209
GType unity_launcher_scroller_child_group_type_get_type (void) G_GNUC_CONST;
211
210
void unity_launcher_scroller_child_set_group_type (UnityLauncherScrollerChild* self, UnityLauncherScrollerChildGroupType value);
211
UnityLauncherScrollerChild* unity_launcher_scroller_child_controller_get_child (UnityLauncherScrollerChildController* self);
212
212
static GObject * unity_places_trash_controller_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
213
213
static void unity_places_trash_controller_finalize (GObject* obj);
473
476
switch (data->_state_) {
477
g_assert_not_reached ();
486
g_assert_not_reached ();
488
g_file_enumerate_children_async (data->dir, G_FILE_ATTRIBUTE_STANDARD_NAME "," G_FILE_ATTRIBUTE_STANDARD_TYPE, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, G_PRIORITY_DEFAULT, NULL, unity_places_trash_controller_recursively_delete_contents_ready, data);
491
data->e = g_file_enumerate_children_finish (data->dir, data->_res_, &data->_inner_error_);
492
if (data->_inner_error_ != NULL) {
493
goto __catch39_g_error;
497
g_file_enumerator_next_files_async (data->e, 10, G_PRIORITY_DEFAULT, NULL, unity_places_trash_controller_recursively_delete_contents_ready, data);
492
g_file_enumerate_children_async (data->dir, G_FILE_ATTRIBUTE_STANDARD_NAME "," G_FILE_ATTRIBUTE_STANDARD_TYPE, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, G_PRIORITY_DEFAULT, NULL, unity_places_trash_controller_recursively_delete_contents_ready, data);
500
data->files = g_file_enumerator_next_files_finish (data->e, data->_res_, &data->_inner_error_);
495
data->e = g_file_enumerate_children_finish (data->dir, data->_res_, &data->_inner_error_);
501
496
if (data->_inner_error_ != NULL) {
502
_g_object_unref0 (data->e);
503
497
goto __catch39_g_error;
505
if (data->files == NULL) {
506
__g_list_free_g_object_unref0 (data->files);
510
data->info_collection = data->files;
511
for (data->info_it = data->info_collection; data->info_it != NULL; data->info_it = data->info_it->next) {
512
data->info = _g_object_ref0 ((GFileInfo*) data->info_it->data);
514
data->child = g_file_get_child (data->dir, g_file_info_get_name (data->info));
515
if (g_file_info_get_file_type (data->info) == G_FILE_TYPE_DIRECTORY) {
517
unity_places_trash_controller_recursively_delete_contents (data->self, data->child, unity_places_trash_controller_recursively_delete_contents_ready, data);
520
unity_places_trash_controller_recursively_delete_contents_finish (data->self, data->_res_);
501
g_file_enumerator_next_files_async (data->e, 10, G_PRIORITY_DEFAULT, NULL, unity_places_trash_controller_recursively_delete_contents_ready, data);
504
data->files = g_file_enumerator_next_files_finish (data->e, data->_res_, &data->_inner_error_);
505
if (data->_inner_error_ != NULL) {
506
_g_object_unref0 (data->e);
507
goto __catch39_g_error;
509
if (data->files == NULL) {
510
__g_list_free_g_object_unref0 (data->files);
514
data->info_collection = data->files;
515
for (data->info_it = data->info_collection; data->info_it != NULL; data->info_it = data->info_it->next) {
516
data->info = _g_object_ref0 ((GFileInfo*) data->info_it->data);
523
g_file_delete (data->child, NULL, &data->_inner_error_);
518
data->child = g_file_get_child (data->dir, g_file_info_get_name (data->info));
519
if (g_file_info_get_file_type (data->info) == G_FILE_TYPE_DIRECTORY) {
521
unity_places_trash_controller_recursively_delete_contents (data->self, data->child, unity_places_trash_controller_recursively_delete_contents_ready, data);
524
unity_places_trash_controller_recursively_delete_contents_finish (data->self, data->_res_);
527
g_file_delete (data->child, NULL, &data->_inner_error_);
528
if (data->_inner_error_ != NULL) {
529
goto __catch40_g_error;
535
data->error_ = data->_inner_error_;
536
data->_inner_error_ = NULL;
538
g_warning ("places-trash-controller.vala:181: %s", data->_tmp1_ = g_strconcat ("Unable to delete file '", string_to_string (data->_tmp0_ = g_file_get_basename (data->child)), ": ", string_to_string (data->error_->message), NULL));
539
_g_free0 (data->_tmp1_);
540
_g_free0 (data->_tmp0_);
541
_g_error_free0 (data->error_);
524
545
if (data->_inner_error_ != NULL) {
525
goto __catch40_g_error;
531
data->error_ = data->_inner_error_;
532
data->_inner_error_ = NULL;
534
g_warning ("places-trash-controller.vala:181: %s", data->_tmp1_ = g_strconcat ("Unable to delete file '", string_to_string (data->_tmp0_ = g_file_get_basename (data->child)), ": ", string_to_string (data->error_->message), NULL));
535
_g_free0 (data->_tmp1_);
536
_g_free0 (data->_tmp0_);
537
_g_error_free0 (data->error_);
541
if (data->_inner_error_ != NULL) {
546
_g_object_unref0 (data->child);
547
_g_object_unref0 (data->info);
548
__g_list_free_g_object_unref0 (data->files);
549
_g_object_unref0 (data->e);
550
goto __catch39_g_error;
542
552
_g_object_unref0 (data->child);
543
553
_g_object_unref0 (data->info);
544
__g_list_free_g_object_unref0 (data->files);
545
_g_object_unref0 (data->e);
546
goto __catch39_g_error;
548
_g_object_unref0 (data->child);
549
_g_object_unref0 (data->info);
557
__g_list_free_g_object_unref0 (data->files);
553
__g_list_free_g_object_unref0 (data->files);
559
_g_object_unref0 (data->e);
555
_g_object_unref0 (data->e);
560
data->_error_ = data->_inner_error_;
561
data->_inner_error_ = NULL;
563
g_warning (data->_tmp3_ = g_strconcat ("Unable to read place files from directory '", string_to_string (data->_tmp2_ = g_file_get_basename (data->dir)), "': %s", NULL), data->_error_->message);
564
_g_free0 (data->_tmp3_);
565
_g_free0 (data->_tmp2_);
566
_g_error_free0 (data->_error_);
570
if (data->_inner_error_ != NULL) {
571
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, data->_inner_error_->message, g_quark_to_string (data->_inner_error_->domain), data->_inner_error_->code);
572
g_clear_error (&data->_inner_error_);
564
data->_error_ = data->_inner_error_;
565
data->_inner_error_ = NULL;
567
g_warning (data->_tmp3_ = g_strconcat ("Unable to read place files from directory '", string_to_string (data->_tmp2_ = g_file_get_basename (data->dir)), "': %s", NULL), data->_error_->message);
568
_g_free0 (data->_tmp3_);
569
_g_free0 (data->_tmp2_);
570
_g_error_free0 (data->_error_);
574
if (data->_inner_error_ != NULL) {
575
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, data->_inner_error_->message, g_quark_to_string (data->_inner_error_->domain), data->_inner_error_->code);
576
g_clear_error (&data->_inner_error_);
576
581
if (data->_state_ == 0) {