[gnome-photos/wip/search: 17/18] application: Implement launch_search
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/search: 17/18] application: Implement launch_search
- Date: Wed, 19 Feb 2014 18:28:13 +0000 (UTC)
commit 636e28cc4b609e67b7eec7416d6cddc60f4f1eba
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Feb 18 14:42:11 2014 +0100
application: Implement launch_search
src/photos-application.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-application.c b/src/photos-application.c
index 18fb920..eb0d88f 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -45,6 +45,7 @@
#include "photos-properties-dialog.h"
#include "photos-resources.h"
#include "photos-search-context.h"
+#include "photos-search-controller.h"
#include "photos-search-provider.h"
#include "photos-source-manager.h"
@@ -231,6 +232,22 @@ photos_application_init_app_menu (PhotosApplication *self)
static void
photos_application_launch_search (PhotosApplication *self, const gchar* const *terms, guint timestamp)
{
+ PhotosApplicationPrivate *priv = self->priv;
+ GVariant *state;
+ gchar *str;
+
+ photos_application_create_window (self);
+ photos_mode_controller_set_window_mode (priv->mode_cntrlr, PHOTOS_WINDOW_MODE_OVERVIEW);
+
+ str = g_strjoinv (" ", (gchar **) terms);
+ photos_search_controller_set_string (priv->state->srch_cntrlr, str);
+ g_free (str);
+
+ state = g_variant_new ("b", TRUE);
+ g_action_group_change_action_state (G_ACTION_GROUP (self), "search", state);
+
+ priv->activation_timestamp = timestamp;
+ g_application_activate (G_APPLICATION (self));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]