summaryrefslogtreecommitdiff
path: root/src/searches/SavedSearchPage.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/searches/SavedSearchPage.c')
-rw-r--r--src/searches/SavedSearchPage.c79
1 files changed, 37 insertions, 42 deletions
diff --git a/src/searches/SavedSearchPage.c b/src/searches/SavedSearchPage.c
index 92f433b..57c205f 100644
--- a/src/searches/SavedSearchPage.c
+++ b/src/searches/SavedSearchPage.c
@@ -451,7 +451,6 @@ typedef struct _LibraryWindowClass LibraryWindowClass;
typedef struct _SavedSearchDialog SavedSearchDialog;
typedef struct _SavedSearchDialogClass SavedSearchDialogClass;
-#define _saved_search_dialog_unref0(var) ((var == NULL) ? NULL : (var = (saved_search_dialog_unref (var), NULL)))
struct _ViewManager {
GTypeInstance parent_instance;
@@ -808,12 +807,6 @@ GType app_window_get_type (void) G_GNUC_CONST;
GType library_window_get_type (void) G_GNUC_CONST;
LibraryWindow* library_window_get_app (void);
void library_window_rename_search_in_sidebar (LibraryWindow* self, SavedSearch* search);
-gpointer saved_search_dialog_ref (gpointer instance);
-void saved_search_dialog_unref (gpointer instance);
-GParamSpec* param_spec_saved_search_dialog (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_saved_search_dialog (GValue* value, gpointer v_object);
-void value_take_saved_search_dialog (GValue* value, gpointer v_object);
-gpointer value_get_saved_search_dialog (const GValue* value);
GType saved_search_dialog_get_type (void) G_GNUC_CONST;
SavedSearchDialog* saved_search_dialog_new_edit_existing (SavedSearch* saved_search);
SavedSearchDialog* saved_search_dialog_construct_edit_existing (GType object_type, SavedSearch* saved_search);
@@ -828,7 +821,7 @@ static const GActionEntry SAVED_SEARCH_PAGE_entries[3] = {{"RenameSearch", _save
static gpointer _g_object_ref0 (gpointer self) {
#line 12 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
return self ? g_object_ref (self) : NULL;
-#line 832 "SavedSearchPage.c"
+#line 825 "SavedSearchPage.c"
}
@@ -855,14 +848,14 @@ SavedSearchManager* saved_search_manager_construct (GType object_type, SavedSear
self->priv->search = _tmp2_;
#line 10 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
return self;
-#line 859 "SavedSearchPage.c"
+#line 852 "SavedSearchPage.c"
}
SavedSearchManager* saved_search_manager_new (SavedSearchPage* owner, SavedSearch* search) {
#line 10 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
return saved_search_manager_construct (TYPE_SAVED_SEARCH_MANAGER, owner, search);
-#line 866 "SavedSearchPage.c"
+#line 859 "SavedSearchPage.c"
}
@@ -886,7 +879,7 @@ static gboolean saved_search_manager_real_include_in_view (ViewManager* base, Da
result = _tmp2_;
#line 16 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
return result;
-#line 890 "SavedSearchPage.c"
+#line 883 "SavedSearchPage.c"
}
@@ -899,14 +892,14 @@ static void saved_search_manager_class_init (SavedSearchManagerClass * klass) {
g_type_class_add_private (klass, sizeof (SavedSearchManagerPrivate));
#line 8 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
((ViewManagerClass *) klass)->include_in_view = (gboolean (*) (ViewManager *, DataSource*)) saved_search_manager_real_include_in_view;
-#line 903 "SavedSearchPage.c"
+#line 896 "SavedSearchPage.c"
}
static void saved_search_manager_instance_init (SavedSearchManager * self) {
#line 8 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
self->priv = SAVED_SEARCH_MANAGER_GET_PRIVATE (self);
-#line 910 "SavedSearchPage.c"
+#line 903 "SavedSearchPage.c"
}
@@ -918,7 +911,7 @@ static void saved_search_manager_finalize (ViewManager * obj) {
_g_object_unref0 (self->priv->search);
#line 8 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
VIEW_MANAGER_CLASS (saved_search_manager_parent_class)->finalize (obj);
-#line 922 "SavedSearchPage.c"
+#line 915 "SavedSearchPage.c"
}
@@ -937,21 +930,21 @@ GType saved_search_manager_get_type (void) {
static void _saved_search_page_on_rename_search_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 50 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
saved_search_page_on_rename_search ((SavedSearchPage*) self);
-#line 941 "SavedSearchPage.c"
+#line 934 "SavedSearchPage.c"
}
static void _saved_search_page_on_edit_search_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 50 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
saved_search_page_on_edit_search ((SavedSearchPage*) self);
-#line 948 "SavedSearchPage.c"
+#line 941 "SavedSearchPage.c"
}
static void _saved_search_page_on_delete_search_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 50 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
saved_search_page_on_delete_search ((SavedSearchPage*) self);
-#line 955 "SavedSearchPage.c"
+#line 948 "SavedSearchPage.c"
}
@@ -982,7 +975,7 @@ SavedSearchPage* saved_search_page_construct (GType object_type, SavedSearch* se
_g_object_unref0 (self->priv->search);
#line 28 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
self->priv->search = _tmp4_;
-#line 986 "SavedSearchPage.c"
+#line 979 "SavedSearchPage.c"
{
GeeIterator* _sources_it = NULL;
MediaCollectionRegistry* _tmp5_;
@@ -1011,7 +1004,7 @@ SavedSearchPage* saved_search_page_construct (GType object_type, SavedSearch* se
_sources_it = _tmp10_;
#line 31 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
while (TRUE) {
-#line 1015 "SavedSearchPage.c"
+#line 1008 "SavedSearchPage.c"
GeeIterator* _tmp11_;
gboolean _tmp12_;
MediaSourceCollection* sources = NULL;
@@ -1033,7 +1026,7 @@ SavedSearchPage* saved_search_page_construct (GType object_type, SavedSearch* se
if (!_tmp12_) {
#line 31 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
break;
-#line 1037 "SavedSearchPage.c"
+#line 1030 "SavedSearchPage.c"
}
#line 31 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_tmp13_ = _sources_it;
@@ -1065,24 +1058,24 @@ SavedSearchPage* saved_search_page_construct (GType object_type, SavedSearch* se
_data_collection_unref0 (_tmp16_);
#line 31 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_data_collection_unref0 (sources);
-#line 1069 "SavedSearchPage.c"
+#line 1062 "SavedSearchPage.c"
}
#line 31 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_g_object_unref0 (_sources_it);
-#line 1073 "SavedSearchPage.c"
+#line 1066 "SavedSearchPage.c"
}
#line 34 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
checkerboard_page_init_page_context_menu (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_PAGE, CheckerboardPage), "SearchContextMenu");
#line 26 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
return self;
-#line 1079 "SavedSearchPage.c"
+#line 1072 "SavedSearchPage.c"
}
SavedSearchPage* saved_search_page_new (SavedSearch* search) {
#line 26 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
return saved_search_page_construct (TYPE_SAVED_SEARCH_PAGE, search);
-#line 1086 "SavedSearchPage.c"
+#line 1079 "SavedSearchPage.c"
}
@@ -1112,13 +1105,13 @@ static void saved_search_page_real_get_config_photos_sort (MediaPage* base, gboo
if (sort_order) {
#line 37 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
*sort_order = _vala_sort_order;
-#line 1116 "SavedSearchPage.c"
+#line 1109 "SavedSearchPage.c"
}
#line 37 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
if (sort_by) {
#line 37 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
*sort_by = _vala_sort_by;
-#line 1122 "SavedSearchPage.c"
+#line 1115 "SavedSearchPage.c"
}
}
@@ -1143,7 +1136,7 @@ static void saved_search_page_real_set_config_photos_sort (MediaPage* base, gboo
configuration_facade_set_library_photos_sort (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp2_, _tmp3_);
#line 42 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_g_object_unref0 (_tmp1_);
-#line 1147 "SavedSearchPage.c"
+#line 1140 "SavedSearchPage.c"
}
@@ -1163,7 +1156,7 @@ static void saved_search_page_real_init_collect_ui_filenames (Page* base, GeeLis
_tmp1_ = ui_filenames;
#line 47 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_COLLECTION, GeeCollection), "savedsearch.ui");
-#line 1167 "SavedSearchPage.c"
+#line 1160 "SavedSearchPage.c"
}
@@ -1183,7 +1176,7 @@ static void saved_search_page_real_add_actions (Page* base, GActionMap* map) {
_tmp1_ = map;
#line 59 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
g_action_map_add_action_entries (_tmp1_, SAVED_SEARCH_PAGE_entries, G_N_ELEMENTS (SAVED_SEARCH_PAGE_entries), self);
-#line 1187 "SavedSearchPage.c"
+#line 1180 "SavedSearchPage.c"
}
@@ -1198,7 +1191,7 @@ static void saved_search_page_real_remove_actions (Page* base, GActionMap* map)
_tmp0_ = map;
#line 63 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
PAGE_CLASS (saved_search_page_parent_class)->remove_actions (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COLLECTION_PAGE, CollectionPage), TYPE_PAGE, Page), _tmp0_);
-#line 1202 "SavedSearchPage.c"
+#line 1195 "SavedSearchPage.c"
{
GActionEntry* entry_collection = NULL;
gint entry_collection_length1 = 0;
@@ -1210,11 +1203,11 @@ static void saved_search_page_real_remove_actions (Page* base, GActionMap* map)
entry_collection_length1 = G_N_ELEMENTS (SAVED_SEARCH_PAGE_entries);
#line 64 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
for (entry_it = 0; entry_it < G_N_ELEMENTS (SAVED_SEARCH_PAGE_entries); entry_it = entry_it + 1) {
-#line 1214 "SavedSearchPage.c"
+#line 1207 "SavedSearchPage.c"
GActionEntry entry = {0};
#line 64 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
entry = entry_collection[entry_it];
-#line 1218 "SavedSearchPage.c"
+#line 1211 "SavedSearchPage.c"
{
GActionMap* _tmp1_;
GActionEntry _tmp2_;
@@ -1227,7 +1220,7 @@ static void saved_search_page_real_remove_actions (Page* base, GActionMap* map)
_tmp3_ = _tmp2_.name;
#line 65 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
g_action_map_remove_action (_tmp1_, _tmp3_);
-#line 1231 "SavedSearchPage.c"
+#line 1224 "SavedSearchPage.c"
}
}
}
@@ -1245,7 +1238,7 @@ static void saved_search_page_on_delete_search (SavedSearchPage* self) {
_tmp1_ = dialogs_confirm_delete_saved_search (_tmp0_);
#line 71 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
if (_tmp1_) {
-#line 1249 "SavedSearchPage.c"
+#line 1242 "SavedSearchPage.c"
CommandManager* _tmp2_;
CommandManager* _tmp3_;
SavedSearch* _tmp4_;
@@ -1267,7 +1260,7 @@ static void saved_search_page_on_delete_search (SavedSearchPage* self) {
_g_object_unref0 (_tmp6_);
#line 72 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_command_manager_unref0 (_tmp3_);
-#line 1271 "SavedSearchPage.c"
+#line 1264 "SavedSearchPage.c"
}
}
@@ -1288,7 +1281,7 @@ static void saved_search_page_on_rename_search (SavedSearchPage* self) {
library_window_rename_search_in_sidebar (_tmp1_, _tmp2_);
#line 76 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_g_object_unref0 (_tmp1_);
-#line 1292 "SavedSearchPage.c"
+#line 1285 "SavedSearchPage.c"
}
@@ -1303,12 +1296,14 @@ static void saved_search_page_on_edit_search (SavedSearchPage* self) {
#line 80 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_tmp1_ = saved_search_dialog_new_edit_existing (_tmp0_);
#line 80 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+ g_object_ref_sink (_tmp1_);
+#line 80 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
ssd = _tmp1_;
#line 81 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
saved_search_dialog_show (ssd);
#line 79 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
- _saved_search_dialog_unref0 (ssd);
-#line 1312 "SavedSearchPage.c"
+ _g_object_unref0 (ssd);
+#line 1307 "SavedSearchPage.c"
}
@@ -1330,7 +1325,7 @@ static void saved_search_page_real_update_actions (Page* base, gint selected_cou
_tmp1_ = count;
#line 89 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
PAGE_CLASS (saved_search_page_parent_class)->update_actions (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COLLECTION_PAGE, CollectionPage), TYPE_PAGE, Page), _tmp0_, _tmp1_);
-#line 1334 "SavedSearchPage.c"
+#line 1329 "SavedSearchPage.c"
}
@@ -1353,14 +1348,14 @@ static void saved_search_page_class_init (SavedSearchPageClass * klass) {
((PageClass *) klass)->update_actions = (void (*) (Page *, gint, gint)) saved_search_page_real_update_actions;
#line 21 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
G_OBJECT_CLASS (klass)->finalize = saved_search_page_finalize;
-#line 1357 "SavedSearchPage.c"
+#line 1352 "SavedSearchPage.c"
}
static void saved_search_page_instance_init (SavedSearchPage * self) {
#line 21 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
self->priv = SAVED_SEARCH_PAGE_GET_PRIVATE (self);
-#line 1364 "SavedSearchPage.c"
+#line 1359 "SavedSearchPage.c"
}
@@ -1372,7 +1367,7 @@ static void saved_search_page_finalize (GObject * obj) {
_g_object_unref0 (self->priv->search);
#line 21 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
G_OBJECT_CLASS (saved_search_page_parent_class)->finalize (obj);
-#line 1376 "SavedSearchPage.c"
+#line 1371 "SavedSearchPage.c"
}