window: Remove search mode

This commit is contained in:
Georges Basile Stavracas Neto
2019-05-04 12:05:39 -03:00
parent bb8d5b92ce
commit d5fbce1385
4 changed files with 1 additions and 28 deletions
-2
View File
@@ -203,8 +203,6 @@ gcal_application_launch_search (GSimpleAction *search,
GVariant *parameter,
gpointer app)
{
GcalApplication *self = GCAL_APPLICATION (app);
gcal_window_set_search_mode (GCAL_WINDOW (self->window), TRUE);
}
static void
+1 -4
View File
@@ -278,10 +278,7 @@ launch_search_cb (GcalShellSearchProvider *self,
terms_joined = g_strjoinv (" ", terms);
window = (GcalWindow *) gtk_application_get_active_window (GTK_APPLICATION (application));
if (window)
{
gcal_window_set_search_mode (window, TRUE);
gcal_window_set_search_query (window, terms_joined);
}
gcal_window_set_search_query (window, terms_joined);
GCAL_RETURN (TRUE);
}
-19
View File
@@ -131,7 +131,6 @@ struct _GcalWindow
/* states */
gboolean new_event_mode;
gboolean search_mode;
NewEventData *event_creation_data;
@@ -1200,24 +1199,6 @@ gcal_window_new_with_date (GcalApplication *app,
NULL);
}
/**
* gcal_window_set_search_mode:
* @self: a #GcalWindow
* @enabled: whether the search mode is enabled or not
*
* Sets whether #GcalWindow is in search mode. This is used by
* #GcalShellSearchProvider to respond to the user clicking on
* GNOME Calendar icon at the search.
*/
void
gcal_window_set_search_mode (GcalWindow *self,
gboolean enabled)
{
g_return_if_fail (GCAL_IS_WINDOW (self));
self->search_mode = enabled;
}
/**
* gcal_window_set_search_query:
* @self: a #GcalWindow
-3
View File
@@ -35,9 +35,6 @@ G_DECLARE_FINAL_TYPE (GcalWindow, gcal_window, GCAL, WINDOW, GtkApplicationWindo
GtkWidget* gcal_window_new_with_date (GcalApplication *app,
GDateTime *date);
void gcal_window_set_search_mode (GcalWindow *self,
gboolean enabled);
void gcal_window_set_search_query (GcalWindow *self,
const gchar *query);