diff options
author | Li Yuan <li.yuan@sun.com> | 2004-10-13 12:58:51 +0800 |
---|---|---|
committer | Harry Lu <haip@src.gnome.org> | 2004-10-13 12:58:51 +0800 |
commit | cc8be7047b362cc88466d7f880f3cddbe9ecd535 (patch) | |
tree | 9e52f9346d3a08792e225920868a565e82e92a76 /calendar/gui | |
parent | 894f6a90c2d22d88c45c0226c898b16ed5110a67 (diff) | |
download | gsoc2013-evolution-cc8be7047b362cc88466d7f880f3cddbe9ecd535.tar gsoc2013-evolution-cc8be7047b362cc88466d7f880f3cddbe9ecd535.tar.gz gsoc2013-evolution-cc8be7047b362cc88466d7f880f3cddbe9ecd535.tar.bz2 gsoc2013-evolution-cc8be7047b362cc88466d7f880f3cddbe9ecd535.tar.lz gsoc2013-evolution-cc8be7047b362cc88466d7f880f3cddbe9ecd535.tar.xz gsoc2013-evolution-cc8be7047b362cc88466d7f880f3cddbe9ecd535.tar.zst gsoc2013-evolution-cc8be7047b362cc88466d7f880f3cddbe9ecd535.zip |
If main_canvas has focus, do not grub it. Emit the selected_time_changed
2004-10-12 Li Yuan <li.yuan@sun.com>
* gui/e-day-view.c: (e_day_view_on_main_canvas_button_press):
* gui/e-week-view.c: (e_week_view_on_button_press):
If main_canvas has focus, do not grub it. Emit the
selected_time_changed signal after the selection day changed.
svn path=/trunk/; revision=27563
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/e-day-view.c | 3 | ||||
-rw-r--r-- | calendar/gui/e-week-view.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index 49ed340dc5..89cacdd655 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -2866,7 +2866,7 @@ e_day_view_on_main_canvas_button_press (GtkWidget *widget, return TRUE; } - if (!GTK_WIDGET_HAS_FOCUS (day_view)) + if (!GTK_WIDGET_HAS_FOCUS (day_view) && !GTK_WIDGET_HAS_FOCUS (day_view->main_canvas)) gtk_widget_grab_focus (GTK_WIDGET (day_view)); if (gdk_pointer_grab (GTK_LAYOUT (widget)->bin_window, FALSE, @@ -2874,6 +2874,7 @@ e_day_view_on_main_canvas_button_press (GtkWidget *widget, | GDK_BUTTON_RELEASE_MASK, FALSE, NULL, event->time) == 0) { e_day_view_start_selection (day_view, day, row); + g_signal_emit_by_name (day_view, "selected_time_changed"); } } else if (event->button == 3) { if (!GTK_WIDGET_HAS_FOCUS (day_view)) diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 27d9eb28c8..bd22b7f61e 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -2144,7 +2144,7 @@ e_week_view_on_button_press (GtkWidget *widget, if (event->button == 1) { /* Start the selection drag. */ - if (!GTK_WIDGET_HAS_FOCUS (week_view)) + if (!GTK_WIDGET_HAS_FOCUS (week_view) && !GTK_WIDGET_HAS_FOCUS (week_view->main_canvas)) gtk_widget_grab_focus (GTK_WIDGET (week_view)); if (gdk_pointer_grab (GTK_LAYOUT (widget)->bin_window, FALSE, @@ -2154,6 +2154,7 @@ e_week_view_on_button_press (GtkWidget *widget, week_view->selection_start_day = day; week_view->selection_end_day = day; week_view->selection_drag_pos = E_WEEK_VIEW_DRAG_END; + g_signal_emit_by_name (week_view, "selected_time_changed"); /* FIXME: Optimise? */ gtk_widget_queue_draw (week_view->main_canvas); |