summaryrefslogtreecommitdiff
path: root/src/searches
diff options
context:
space:
mode:
Diffstat (limited to 'src/searches')
-rw-r--r--src/searches/Branch.c10
-rw-r--r--src/searches/SavedSearchDialog.c16
-rw-r--r--src/searches/SavedSearchPage.c227
-rw-r--r--src/searches/SavedSearchPage.vala16
-rw-r--r--src/searches/SearchBoolean.c54
-rw-r--r--src/searches/Searches.c2
6 files changed, 192 insertions, 133 deletions
diff --git a/src/searches/Branch.c b/src/searches/Branch.c
index 9956e8d..c202931 100644
--- a/src/searches/Branch.c
+++ b/src/searches/Branch.c
@@ -1,4 +1,4 @@
-/* Branch.c generated by valac 0.32.1, the Vala compiler
+/* Branch.c generated by valac 0.34.4, the Vala compiler
* generated from Branch.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -1014,7 +1014,7 @@ static void searches_header_setup_context_menu (SearchesHeader* self) {
#line 75 "/home/jens/Source/shotwell/src/searches/Branch.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1017 "Branch.c"
- goto __catch73_g_error;
+ goto __catch75_g_error;
}
#line 77 "/home/jens/Source/shotwell/src/searches/Branch.vala"
_tmp2_ = self->priv->builder;
@@ -1038,8 +1038,8 @@ static void searches_header_setup_context_menu (SearchesHeader* self) {
_g_object_unref0 (model);
#line 1040 "Branch.c"
}
- goto __finally73;
- __catch73_g_error:
+ goto __finally75;
+ __catch75_g_error:
{
GError* _error_ = NULL;
GError* _tmp7_ = NULL;
@@ -1076,7 +1076,7 @@ static void searches_header_setup_context_menu (SearchesHeader* self) {
_g_error_free0 (_error_);
#line 1078 "Branch.c"
}
- __finally73:
+ __finally75:
#line 74 "/home/jens/Source/shotwell/src/searches/Branch.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 74 "/home/jens/Source/shotwell/src/searches/Branch.vala"
diff --git a/src/searches/SavedSearchDialog.c b/src/searches/SavedSearchDialog.c
index 278f4f0..91d066e 100644
--- a/src/searches/SavedSearchDialog.c
+++ b/src/searches/SavedSearchDialog.c
@@ -1,4 +1,4 @@
-/* SavedSearchDialog.c generated by valac 0.32.1, the Vala compiler
+/* SavedSearchDialog.c generated by valac 0.34.4, the Vala compiler
* generated from SavedSearchDialog.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -1779,19 +1779,19 @@ static gchar* string_chomp (const gchar* self) {
gchar* _result_ = NULL;
gchar* _tmp0_ = NULL;
const gchar* _tmp1_ = NULL;
-#line 1191 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1191 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
g_return_val_if_fail (self != NULL, NULL);
-#line 1192 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1192 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp0_ = g_strdup (self);
-#line 1192 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1192 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_result_ = _tmp0_;
-#line 1193 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1193 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp1_ = _result_;
-#line 1193 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1193 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
g_strchomp (_tmp1_);
-#line 1194 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1194 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
result = _result_;
-#line 1194 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1194 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
return result;
#line 1797 "SavedSearchDialog.c"
}
diff --git a/src/searches/SavedSearchPage.c b/src/searches/SavedSearchPage.c
index 1dc2f9b..d9e8593 100644
--- a/src/searches/SavedSearchPage.c
+++ b/src/searches/SavedSearchPage.c
@@ -1,4 +1,4 @@
-/* SavedSearchPage.c generated by valac 0.32.1, the Vala compiler
+/* SavedSearchPage.c generated by valac 0.34.4, the Vala compiler
* generated from SavedSearchPage.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -13,9 +13,9 @@
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
+#include <gio/gio.h>
#include <gee.h>
#include <gdk/gdk.h>
-#include <gio/gio.h>
#define TYPE_VIEW_MANAGER (view_manager_get_type ())
@@ -371,16 +371,6 @@ typedef struct _ConfigurationFacadeClass ConfigurationFacadeClass;
typedef struct _ConfigFacade ConfigFacade;
typedef struct _ConfigFacadeClass ConfigFacadeClass;
-#define TYPE_APP_WINDOW (app_window_get_type ())
-#define APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_APP_WINDOW, AppWindow))
-#define APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_APP_WINDOW, AppWindowClass))
-#define IS_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_APP_WINDOW))
-#define IS_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_APP_WINDOW))
-#define APP_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_APP_WINDOW, AppWindowClass))
-
-typedef struct _AppWindow AppWindow;
-typedef struct _AppWindowClass AppWindowClass;
-
#define TYPE_COMMAND_MANAGER (command_manager_get_type ())
#define COMMAND_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COMMAND_MANAGER, CommandManager))
#define COMMAND_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COMMAND_MANAGER, CommandManagerClass))
@@ -432,6 +422,16 @@ typedef struct _DeleteSavedSearchCommand DeleteSavedSearchCommand;
typedef struct _DeleteSavedSearchCommandClass DeleteSavedSearchCommandClass;
#define _command_manager_unref0(var) ((var == NULL) ? NULL : (var = (command_manager_unref (var), NULL)))
+#define TYPE_APP_WINDOW (app_window_get_type ())
+#define APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_APP_WINDOW, AppWindow))
+#define APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_APP_WINDOW, AppWindowClass))
+#define IS_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_APP_WINDOW))
+#define IS_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_APP_WINDOW))
+#define APP_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_APP_WINDOW, AppWindowClass))
+
+typedef struct _AppWindow AppWindow;
+typedef struct _AppWindowClass AppWindowClass;
+
#define TYPE_LIBRARY_WINDOW (library_window_get_type ())
#define LIBRARY_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIBRARY_WINDOW, LibraryWindow))
#define LIBRARY_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIBRARY_WINDOW, LibraryWindowClass))
@@ -508,7 +508,8 @@ struct _PageClass {
void (*ready) (Page* self);
void (*switching_to_fullscreen) (Page* self, FullscreenWindow* fsw);
void (*returning_from_fullscreen) (Page* self, FullscreenWindow* fsw);
- void (*add_actions) (Page* self);
+ void (*add_actions) (Page* self, GActionMap* map);
+ void (*remove_actions) (Page* self, GActionMap* map);
void (*init_collect_ui_filenames) (Page* self, GeeList* ui_filenames);
InjectionGroup** (*init_collect_injection_groups) (Page* self, int* result_length1);
void (*init_actions) (Page* self, gint selected_count, gint count);
@@ -783,10 +784,10 @@ static void saved_search_page_real_set_config_photos_sort (MediaPage* base, gboo
void configuration_facade_set_library_photos_sort (ConfigurationFacade* self, gboolean sort_order, gint sort_by);
static void saved_search_page_real_init_collect_ui_filenames (Page* base, GeeList* ui_filenames);
void page_init_collect_ui_filenames (Page* self, GeeList* ui_filenames);
-static void saved_search_page_real_add_actions (Page* base);
-void page_add_actions (Page* self);
-GType app_window_get_type (void) G_GNUC_CONST;
-AppWindow* app_window_get_instance (void);
+static void saved_search_page_real_add_actions (Page* base, GActionMap* map);
+void page_add_actions (Page* self, GActionMap* map);
+static void saved_search_page_real_remove_actions (Page* base, GActionMap* map);
+void page_remove_actions (Page* self, GActionMap* map);
gboolean dialogs_confirm_delete_saved_search (SavedSearch* search);
gpointer command_manager_ref (gpointer instance);
void command_manager_unref (gpointer instance);
@@ -803,6 +804,7 @@ DeleteSavedSearchCommand* delete_saved_search_command_construct (GType object_ty
GType page_command_get_type (void) G_GNUC_CONST;
GType single_data_source_command_get_type (void) G_GNUC_CONST;
GType delete_saved_search_command_get_type (void) G_GNUC_CONST;
+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);
@@ -826,7 +828,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 830 "SavedSearchPage.c"
+#line 832 "SavedSearchPage.c"
}
@@ -853,14 +855,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 857 "SavedSearchPage.c"
+#line 859 "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 864 "SavedSearchPage.c"
+#line 866 "SavedSearchPage.c"
}
@@ -884,7 +886,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 888 "SavedSearchPage.c"
+#line 890 "SavedSearchPage.c"
}
@@ -897,14 +899,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 = saved_search_manager_real_include_in_view;
-#line 901 "SavedSearchPage.c"
+#line 903 "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 908 "SavedSearchPage.c"
+#line 910 "SavedSearchPage.c"
}
@@ -916,7 +918,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 920 "SavedSearchPage.c"
+#line 922 "SavedSearchPage.c"
}
@@ -935,21 +937,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 939 "SavedSearchPage.c"
+#line 941 "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 946 "SavedSearchPage.c"
+#line 948 "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 953 "SavedSearchPage.c"
+#line 955 "SavedSearchPage.c"
}
@@ -980,7 +982,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 984 "SavedSearchPage.c"
+#line 986 "SavedSearchPage.c"
{
GeeIterator* _sources_it = NULL;
MediaCollectionRegistry* _tmp5_ = NULL;
@@ -1009,7 +1011,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 1013 "SavedSearchPage.c"
+#line 1015 "SavedSearchPage.c"
GeeIterator* _tmp11_ = NULL;
gboolean _tmp12_ = FALSE;
MediaSourceCollection* sources = NULL;
@@ -1031,7 +1033,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 1035 "SavedSearchPage.c"
+#line 1037 "SavedSearchPage.c"
}
#line 31 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_tmp13_ = _sources_it;
@@ -1063,24 +1065,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 1067 "SavedSearchPage.c"
+#line 1069 "SavedSearchPage.c"
}
#line 31 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_g_object_unref0 (_sources_it);
-#line 1071 "SavedSearchPage.c"
+#line 1073 "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 1077 "SavedSearchPage.c"
+#line 1079 "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 1084 "SavedSearchPage.c"
+#line 1086 "SavedSearchPage.c"
}
@@ -1110,13 +1112,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 1114 "SavedSearchPage.c"
+#line 1116 "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 1120 "SavedSearchPage.c"
+#line 1122 "SavedSearchPage.c"
}
}
@@ -1141,7 +1143,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 1145 "SavedSearchPage.c"
+#line 1147 "SavedSearchPage.c"
}
@@ -1161,64 +1163,111 @@ 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 1165 "SavedSearchPage.c"
+#line 1167 "SavedSearchPage.c"
}
-static void saved_search_page_real_add_actions (Page* base) {
+static void saved_search_page_real_add_actions (Page* base, GActionMap* map) {
SavedSearchPage * self;
- AppWindow* _tmp0_ = NULL;
- AppWindow* _tmp1_ = NULL;
+ GActionMap* _tmp0_ = NULL;
+ GActionMap* _tmp1_ = NULL;
#line 56 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SAVED_SEARCH_PAGE, SavedSearchPage);
+#line 56 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+ g_return_if_fail (G_IS_ACTION_MAP (map));
#line 57 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
- PAGE_CLASS (saved_search_page_parent_class)->add_actions (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COLLECTION_PAGE, CollectionPage), TYPE_PAGE, Page));
-#line 59 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
- _tmp0_ = app_window_get_instance ();
-#line 59 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
- _tmp1_ = _tmp0_;
+ _tmp0_ = map;
+#line 57 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+ PAGE_CLASS (saved_search_page_parent_class)->add_actions (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COLLECTION_PAGE, CollectionPage), TYPE_PAGE, Page), _tmp0_);
#line 59 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
- g_action_map_add_action_entries (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, g_action_map_get_type (), GActionMap), SAVED_SEARCH_PAGE_entries, G_N_ELEMENTS (SAVED_SEARCH_PAGE_entries), self);
+ _tmp1_ = map;
#line 59 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
- _g_object_unref0 (_tmp1_);
-#line 1185 "SavedSearchPage.c"
+ g_action_map_add_action_entries (_tmp1_, SAVED_SEARCH_PAGE_entries, G_N_ELEMENTS (SAVED_SEARCH_PAGE_entries), self);
+#line 1187 "SavedSearchPage.c"
+}
+
+
+static void saved_search_page_real_remove_actions (Page* base, GActionMap* map) {
+ SavedSearchPage * self;
+ GActionMap* _tmp0_ = NULL;
+#line 62 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SAVED_SEARCH_PAGE, SavedSearchPage);
+#line 62 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+ g_return_if_fail (G_IS_ACTION_MAP (map));
+#line 63 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+ _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"
+ {
+ GActionEntry* entry_collection = NULL;
+ gint entry_collection_length1 = 0;
+ gint _entry_collection_size_ = 0;
+ gint entry_it = 0;
+#line 64 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+ entry_collection = SAVED_SEARCH_PAGE_entries;
+#line 64 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+ 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"
+ GActionEntry entry = {0};
+#line 64 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+ entry = entry_collection[entry_it];
+#line 1218 "SavedSearchPage.c"
+ {
+ GActionMap* _tmp1_ = NULL;
+ GActionEntry _tmp2_ = {0};
+ const gchar* _tmp3_ = NULL;
+#line 65 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+ _tmp1_ = map;
+#line 65 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+ _tmp2_ = entry;
+#line 65 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+ _tmp3_ = _tmp2_.name;
+#line 65 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+ g_action_map_remove_action (_tmp1_, _tmp3_);
+#line 1231 "SavedSearchPage.c"
+ }
+ }
+ }
}
static void saved_search_page_on_delete_search (SavedSearchPage* self) {
SavedSearch* _tmp0_ = NULL;
gboolean _tmp1_ = FALSE;
-#line 62 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 70 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
g_return_if_fail (IS_SAVED_SEARCH_PAGE (self));
-#line 63 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 71 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_tmp0_ = self->priv->search;
-#line 63 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 71 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_tmp1_ = dialogs_confirm_delete_saved_search (_tmp0_);
-#line 63 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 71 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
if (_tmp1_) {
-#line 1200 "SavedSearchPage.c"
+#line 1249 "SavedSearchPage.c"
CommandManager* _tmp2_ = NULL;
CommandManager* _tmp3_ = NULL;
SavedSearch* _tmp4_ = NULL;
DeleteSavedSearchCommand* _tmp5_ = NULL;
DeleteSavedSearchCommand* _tmp6_ = NULL;
-#line 64 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 72 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_tmp2_ = app_window_get_command_manager ();
-#line 64 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 72 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_tmp3_ = _tmp2_;
-#line 64 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 72 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_tmp4_ = self->priv->search;
-#line 64 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 72 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_tmp5_ = delete_saved_search_command_new (_tmp4_);
-#line 64 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 72 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_tmp6_ = _tmp5_;
-#line 64 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 72 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
command_manager_execute (_tmp3_, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_COMMAND, Command));
-#line 64 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 72 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_g_object_unref0 (_tmp6_);
-#line 64 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 72 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_command_manager_unref0 (_tmp3_);
-#line 1222 "SavedSearchPage.c"
+#line 1271 "SavedSearchPage.c"
}
}
@@ -1227,19 +1276,19 @@ static void saved_search_page_on_rename_search (SavedSearchPage* self) {
LibraryWindow* _tmp0_ = NULL;
LibraryWindow* _tmp1_ = NULL;
SavedSearch* _tmp2_ = NULL;
-#line 67 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 75 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
g_return_if_fail (IS_SAVED_SEARCH_PAGE (self));
-#line 68 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 76 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_tmp0_ = library_window_get_app ();
-#line 68 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 76 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_tmp1_ = _tmp0_;
-#line 68 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 76 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_tmp2_ = self->priv->search;
-#line 68 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 76 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
library_window_rename_search_in_sidebar (_tmp1_, _tmp2_);
-#line 68 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 76 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_g_object_unref0 (_tmp1_);
-#line 1243 "SavedSearchPage.c"
+#line 1292 "SavedSearchPage.c"
}
@@ -1247,19 +1296,19 @@ static void saved_search_page_on_edit_search (SavedSearchPage* self) {
SavedSearchDialog* ssd = NULL;
SavedSearch* _tmp0_ = NULL;
SavedSearchDialog* _tmp1_ = NULL;
-#line 71 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 79 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
g_return_if_fail (IS_SAVED_SEARCH_PAGE (self));
-#line 72 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 80 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_tmp0_ = self->priv->search;
-#line 72 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 80 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_tmp1_ = saved_search_dialog_new_edit_existing (_tmp0_);
-#line 72 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 80 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
ssd = _tmp1_;
-#line 73 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 81 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
saved_search_dialog_show (ssd);
-#line 71 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 79 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_saved_search_dialog_unref0 (ssd);
-#line 1263 "SavedSearchPage.c"
+#line 1312 "SavedSearchPage.c"
}
@@ -1267,21 +1316,21 @@ static void saved_search_page_real_update_actions (Page* base, gint selected_cou
SavedSearchPage * self;
gint _tmp0_ = 0;
gint _tmp1_ = 0;
-#line 76 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 84 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SAVED_SEARCH_PAGE, SavedSearchPage);
-#line 77 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 85 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RenameSearch", TRUE);
-#line 78 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 86 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "EditSearch", TRUE);
-#line 79 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 87 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "DeleteSearch", TRUE);
-#line 81 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 89 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_tmp0_ = selected_count;
-#line 81 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#line 89 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
_tmp1_ = count;
-#line 81 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+#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 1285 "SavedSearchPage.c"
+#line 1334 "SavedSearchPage.c"
}
@@ -1299,17 +1348,19 @@ static void saved_search_page_class_init (SavedSearchPageClass * klass) {
#line 21 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
((PageClass *) klass)->add_actions = saved_search_page_real_add_actions;
#line 21 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
+ ((PageClass *) klass)->remove_actions = saved_search_page_real_remove_actions;
+#line 21 "/home/jens/Source/shotwell/src/searches/SavedSearchPage.vala"
((PageClass *) klass)->update_actions = 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 1306 "SavedSearchPage.c"
+#line 1357 "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 1313 "SavedSearchPage.c"
+#line 1364 "SavedSearchPage.c"
}
@@ -1321,7 +1372,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 1325 "SavedSearchPage.c"
+#line 1376 "SavedSearchPage.c"
}
diff --git a/src/searches/SavedSearchPage.vala b/src/searches/SavedSearchPage.vala
index c57ec7d..9267137 100644
--- a/src/searches/SavedSearchPage.vala
+++ b/src/searches/SavedSearchPage.vala
@@ -53,12 +53,20 @@ public class SavedSearchPage : CollectionPage {
{ "DeleteSearch", on_delete_search }
};
- protected override void add_actions () {
- base.add_actions ();
+ protected override void add_actions(GLib.ActionMap map) {
+ base.add_actions(map);
- AppWindow.get_instance ().add_action_entries (entries, this);
+ map.add_action_entries(entries, this);
}
-
+
+ protected override void remove_actions(GLib.ActionMap map) {
+ base.remove_actions(map);
+ foreach (var entry in entries) {
+ map.remove_action(entry.name);
+ }
+ }
+
+
private void on_delete_search() {
if (Dialogs.confirm_delete_saved_search(search))
AppWindow.get_command_manager().execute(new DeleteSavedSearchCommand(search));
diff --git a/src/searches/SearchBoolean.c b/src/searches/SearchBoolean.c
index 7da26c1..eea8d74 100644
--- a/src/searches/SearchBoolean.c
+++ b/src/searches/SearchBoolean.c
@@ -1,4 +1,4 @@
-/* SearchBoolean.c generated by valac 0.32.1, the Vala compiler
+/* SearchBoolean.c generated by valac 0.34.4, the Vala compiler
* generated from SearchBoolean.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -2305,17 +2305,17 @@ static gboolean string_contains (const gchar* self, const gchar* needle) {
gboolean result = FALSE;
const gchar* _tmp0_ = NULL;
gchar* _tmp1_ = NULL;
-#line 1376 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1376 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
g_return_val_if_fail (self != NULL, FALSE);
-#line 1376 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1376 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
g_return_val_if_fail (needle != NULL, FALSE);
-#line 1377 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1377 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp0_ = needle;
-#line 1377 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1377 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_);
-#line 1377 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1377 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
result = _tmp1_ != NULL;
-#line 1377 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1377 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
return result;
#line 2320 "SearchBoolean.c"
}
@@ -5691,7 +5691,7 @@ void saved_search_reconstitute (SavedSearch* self) {
#line 847 "/home/jens/Source/shotwell/src/searches/SearchBoolean.vala"
if (_inner_error_->domain == DATABASE_ERROR) {
#line 5684 "SearchBoolean.c"
- goto __catch74_database_error;
+ goto __catch76_database_error;
}
#line 847 "/home/jens/Source/shotwell/src/searches/SearchBoolean.vala"
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
@@ -5707,8 +5707,8 @@ void saved_search_reconstitute (SavedSearch* self) {
_tmp6_->search_id = _tmp0_;
#line 5699 "SearchBoolean.c"
}
- goto __finally74;
- __catch74_database_error:
+ goto __finally76;
+ __catch76_database_error:
{
GError* err = NULL;
GError* _tmp7_ = NULL;
@@ -5724,7 +5724,7 @@ void saved_search_reconstitute (SavedSearch* self) {
_g_error_free0 (err);
#line 5716 "SearchBoolean.c"
}
- __finally74:
+ __finally76:
#line 846 "/home/jens/Source/shotwell/src/searches/SearchBoolean.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 846 "/home/jens/Source/shotwell/src/searches/SearchBoolean.vala"
@@ -5835,7 +5835,7 @@ gboolean saved_search_rename (SavedSearch* self, const gchar* new_name) {
#line 865 "/home/jens/Source/shotwell/src/searches/SearchBoolean.vala"
if (_inner_error_->domain == DATABASE_ERROR) {
#line 5828 "SearchBoolean.c"
- goto __catch75_database_error;
+ goto __catch77_database_error;
}
#line 865 "/home/jens/Source/shotwell/src/searches/SearchBoolean.vala"
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
@@ -5846,8 +5846,8 @@ gboolean saved_search_rename (SavedSearch* self, const gchar* new_name) {
#line 5837 "SearchBoolean.c"
}
}
- goto __finally75;
- __catch75_database_error:
+ goto __finally77;
+ __catch77_database_error:
{
GError* err = NULL;
GError* _tmp12_ = NULL;
@@ -5867,7 +5867,7 @@ gboolean saved_search_rename (SavedSearch* self, const gchar* new_name) {
return result;
#line 5859 "SearchBoolean.c"
}
- __finally75:
+ __finally77:
#line 864 "/home/jens/Source/shotwell/src/searches/SearchBoolean.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 864 "/home/jens/Source/shotwell/src/searches/SearchBoolean.vala"
@@ -6041,7 +6041,7 @@ static SavedSearchTable* saved_search_table_construct (GType object_type) {
#line 900 "/home/jens/Source/shotwell/src/searches/SearchBoolean.vala"
if (_inner_error_->domain == DATABASE_ERROR) {
#line 6034 "SearchBoolean.c"
- goto __catch76_database_error;
+ goto __catch78_database_error;
}
#line 900 "/home/jens/Source/shotwell/src/searches/SearchBoolean.vala"
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
@@ -6132,8 +6132,8 @@ static SavedSearchTable* saved_search_table_construct (GType object_type) {
_g_object_unref0 (_tmp0_);
#line 6124 "SearchBoolean.c"
}
- goto __finally76;
- __catch76_database_error:
+ goto __finally78;
+ __catch78_database_error:
{
GError* err = NULL;
GError* _tmp18_ = NULL;
@@ -6149,7 +6149,7 @@ static SavedSearchTable* saved_search_table_construct (GType object_type) {
_g_error_free0 (err);
#line 6141 "SearchBoolean.c"
}
- __finally76:
+ __finally78:
#line 899 "/home/jens/Source/shotwell/src/searches/SearchBoolean.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 899 "/home/jens/Source/shotwell/src/searches/SearchBoolean.vala"
@@ -6282,7 +6282,7 @@ SavedSearch* saved_search_table_create (SavedSearchTable* self, const gchar* nam
#line 926 "/home/jens/Source/shotwell/src/searches/SearchBoolean.vala"
if (_inner_error_->domain == DATABASE_ERROR) {
#line 6275 "SearchBoolean.c"
- goto __catch77_database_error;
+ goto __catch79_database_error;
}
#line 926 "/home/jens/Source/shotwell/src/searches/SearchBoolean.vala"
_g_object_unref0 (search);
@@ -6304,8 +6304,8 @@ SavedSearch* saved_search_table_create (SavedSearchTable* self, const gchar* nam
_saved_search_row_unref0 (_tmp0_);
#line 6296 "SearchBoolean.c"
}
- goto __finally77;
- __catch77_database_error:
+ goto __finally79;
+ __catch79_database_error:
{
GError* err = NULL;
GError* _tmp9_ = NULL;
@@ -6321,7 +6321,7 @@ SavedSearch* saved_search_table_create (SavedSearchTable* self, const gchar* nam
_g_error_free0 (err);
#line 6313 "SearchBoolean.c"
}
- __finally77:
+ __finally79:
#line 925 "/home/jens/Source/shotwell/src/searches/SearchBoolean.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 925 "/home/jens/Source/shotwell/src/searches/SearchBoolean.vala"
@@ -6386,7 +6386,7 @@ void saved_search_table_remove (SavedSearchTable* self, SavedSearch* search) {
#line 940 "/home/jens/Source/shotwell/src/searches/SearchBoolean.vala"
if (_inner_error_->domain == DATABASE_ERROR) {
#line 6379 "SearchBoolean.c"
- goto __catch78_database_error;
+ goto __catch80_database_error;
}
#line 940 "/home/jens/Source/shotwell/src/searches/SearchBoolean.vala"
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
@@ -6397,8 +6397,8 @@ void saved_search_table_remove (SavedSearchTable* self, SavedSearch* search) {
#line 6388 "SearchBoolean.c"
}
}
- goto __finally78;
- __catch78_database_error:
+ goto __finally80;
+ __catch80_database_error:
{
GError* err = NULL;
GError* _tmp4_ = NULL;
@@ -6414,7 +6414,7 @@ void saved_search_table_remove (SavedSearchTable* self, SavedSearch* search) {
_g_error_free0 (err);
#line 6406 "SearchBoolean.c"
}
- __finally78:
+ __finally80:
#line 939 "/home/jens/Source/shotwell/src/searches/SearchBoolean.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 939 "/home/jens/Source/shotwell/src/searches/SearchBoolean.vala"
diff --git a/src/searches/Searches.c b/src/searches/Searches.c
index 1ab6b90..bb0f199 100644
--- a/src/searches/Searches.c
+++ b/src/searches/Searches.c
@@ -1,4 +1,4 @@
-/* Searches.c generated by valac 0.32.1, the Vala compiler
+/* Searches.c generated by valac 0.34.4, the Vala compiler
* generated from Searches.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.