window: Remove search mode
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user