aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-cal-shell-view.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2013-05-30 23:48:11 +0800
committerMilan Crha <mcrha@redhat.com>2013-05-30 23:48:11 +0800
commitef5795c3fd5186f42f54a2695db8d6c1bd46f489 (patch)
tree3834749068b9e89d634344724ccf4afab34d87c7 /modules/calendar/e-cal-shell-view.c
parent4d398331f327468488b958d6af33a47e5354a2c6 (diff)
downloadgsoc2013-evolution-ef5795c3fd5186f42f54a2695db8d6c1bd46f489.tar
gsoc2013-evolution-ef5795c3fd5186f42f54a2695db8d6c1bd46f489.tar.gz
gsoc2013-evolution-ef5795c3fd5186f42f54a2695db8d6c1bd46f489.tar.bz2
gsoc2013-evolution-ef5795c3fd5186f42f54a2695db8d6c1bd46f489.tar.lz
gsoc2013-evolution-ef5795c3fd5186f42f54a2695db8d6c1bd46f489.tar.xz
gsoc2013-evolution-ef5795c3fd5186f42f54a2695db8d6c1bd46f489.tar.zst
gsoc2013-evolution-ef5795c3fd5186f42f54a2695db8d6c1bd46f489.zip
Bug #700812 - Search in Calendar view is broken
Diffstat (limited to 'modules/calendar/e-cal-shell-view.c')
-rw-r--r--modules/calendar/e-cal-shell-view.c29
1 files changed, 26 insertions, 3 deletions
diff --git a/modules/calendar/e-cal-shell-view.c b/modules/calendar/e-cal-shell-view.c
index 312f28f8ab..dbcebf922f 100644
--- a/modules/calendar/e-cal-shell-view.c
+++ b/modules/calendar/e-cal-shell-view.c
@@ -47,6 +47,18 @@ cal_shell_view_finalize (GObject *object)
}
static void
+cal_shell_view_prepare_for_quit_cb (EShell *shell,
+ EActivity *activity,
+ ECalShellView *cal_shell_view)
+{
+ g_return_if_fail (E_IS_CAL_SHELL_VIEW (cal_shell_view));
+
+ /* stop running searches, if any; the activity tight
+ on the search prevents application to quit */
+ e_cal_shell_view_search_stop (cal_shell_view);
+}
+
+static void
cal_shell_view_add_action_button (GtkBox *box,
GtkAction *action)
{
@@ -83,6 +95,8 @@ cal_shell_view_add_action_button (GtkBox *box,
static void
cal_shell_view_constructed (GObject *object)
{
+ EShell *shell;
+ EShellView *shell_view;
EShellContent *shell_content;
EShellWindow *shell_window;
EShellSearchbar *searchbar;
@@ -91,10 +105,12 @@ cal_shell_view_constructed (GObject *object)
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
- e_cal_shell_view_private_constructed (E_CAL_SHELL_VIEW (object));
+ shell_view = E_SHELL_VIEW (object);
- shell_window = e_shell_view_get_shell_window (E_SHELL_VIEW (object));
- shell_content = e_shell_view_get_shell_content (E_SHELL_VIEW (object));
+ e_cal_shell_view_private_constructed (E_CAL_SHELL_VIEW (shell_view));
+
+ shell_window = e_shell_view_get_shell_window (shell_view);
+ shell_content = e_shell_view_get_shell_content (shell_view);
searchbar = e_cal_shell_content_get_searchbar (E_CAL_SHELL_CONTENT (shell_content));
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
@@ -106,6 +122,13 @@ cal_shell_view_constructed (GObject *object)
gtk_widget_show_all (box);
gtk_container_add (GTK_CONTAINER (e_shell_searchbar_get_search_box (searchbar)), box);
+
+ shell = e_shell_backend_get_shell (e_shell_view_get_shell_backend (shell_view));
+
+ g_signal_connect (
+ shell, "prepare-for-quit",
+ G_CALLBACK (cal_shell_view_prepare_for_quit_cb),
+ object);
}
static void