aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-week-view.c
diff options
context:
space:
mode:
authorBolian Yin <bolian.yin@sun.com>2003-06-19 10:41:49 +0800
committerBolian Yin <byin@src.gnome.org>2003-06-19 10:41:49 +0800
commit1998629bf7362303a2a1b7b961a95f07ddd01df5 (patch)
treefd1e484af5d7ace2f5daa23b24b83f6385e901a7 /calendar/gui/e-week-view.c
parent243441287ff8b44896fe5d8bc26b81a8fad9eeb2 (diff)
downloadgsoc2013-evolution-1998629bf7362303a2a1b7b961a95f07ddd01df5.tar
gsoc2013-evolution-1998629bf7362303a2a1b7b961a95f07ddd01df5.tar.gz
gsoc2013-evolution-1998629bf7362303a2a1b7b961a95f07ddd01df5.tar.bz2
gsoc2013-evolution-1998629bf7362303a2a1b7b961a95f07ddd01df5.tar.lz
gsoc2013-evolution-1998629bf7362303a2a1b7b961a95f07ddd01df5.tar.xz
gsoc2013-evolution-1998629bf7362303a2a1b7b961a95f07ddd01df5.tar.zst
gsoc2013-evolution-1998629bf7362303a2a1b7b961a95f07ddd01df5.zip
Fixes #44682, Shift+F10 to active popup menu on day/week view
2003-06-10 Bolian Yin <bolian.yin@sun.com> Fixes #44682, Shift+F10 to active popup menu on day/week view * gui/e-day-view.c (e_day_view_key_press, e_day_view_do_key_press): When the key press is not handled, give keybindings the chance. (e_day_view_popup_menu, e_day_view_show_popup_menu, e_day_view_on_event_right_click ): popup menu will be activated from both keyboard and mouse. * gui/e-week-view.c (e_week_view_key_press, e_week_view_do_key_press): When the key press is not handled, give keybindings the chance. (e_week_view_popup_menu): popup menu can be activated from keyboard svn path=/trunk/; revision=21473
Diffstat (limited to 'calendar/gui/e-week-view.c')
-rw-r--r--calendar/gui/e-week-view.c33
1 files changed, 28 insertions, 5 deletions
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index fc63e83f24..8a459d506e 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -174,7 +174,11 @@ static gboolean e_week_view_on_text_item_event (GnomeCanvasItem *item,
static gboolean e_week_view_on_jump_button_event (GnomeCanvasItem *item,
GdkEvent *event,
EWeekView *week_view);
-static gint e_week_view_key_press (GtkWidget *widget, GdkEventKey *event);
+static gboolean e_week_view_key_press (GtkWidget *widget, GdkEventKey *event);
+static gboolean e_week_view_do_key_press (GtkWidget *widget,
+ GdkEventKey *event);
+static gboolean e_week_view_popup_menu (GtkWidget *widget);
+
static void e_week_view_on_new_appointment (GtkWidget *widget,
gpointer data);
static void e_week_view_on_new_event (GtkWidget *widget,
@@ -238,7 +242,6 @@ static void e_week_view_queue_layout (EWeekView *week_view);
static void e_week_view_cancel_layout (EWeekView *week_view);
static gboolean e_week_view_layout_timeout_cb (gpointer data);
-
static GtkTableClass *parent_class;
static GdkAtom clipboard_atom = GDK_NONE;
@@ -273,6 +276,7 @@ e_week_view_class_init (EWeekViewClass *class)
widget_class->focus_in_event = e_week_view_focus_in;
widget_class->focus_out_event = e_week_view_focus_out;
widget_class->key_press_event = e_week_view_key_press;
+ widget_class->popup_menu = e_week_view_popup_menu;
widget_class->expose_event = e_week_view_expose_event;
class->selection_changed = NULL;
@@ -3430,9 +3434,8 @@ e_week_view_is_one_day_event (EWeekView *week_view,
return FALSE;
}
-
-static gint
-e_week_view_key_press (GtkWidget *widget, GdkEventKey *event)
+static gboolean
+e_week_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
{
EWeekView *week_view;
CalComponent *comp;
@@ -3521,6 +3524,18 @@ e_week_view_key_press (GtkWidget *widget, GdkEventKey *event)
return TRUE;
}
+static gboolean
+e_week_view_key_press (GtkWidget *widget, GdkEventKey *event)
+{
+ gboolean handled = FALSE;
+ handled = e_week_view_do_key_press (widget, event);
+
+ /* if not handled, try key bindings */
+ if (!handled)
+ handled = GTK_WIDGET_CLASS (parent_class)->key_press_event (widget, event);
+ return handled;
+}
+
enum {
/*
* This is used to "flag" events that can not be editted
@@ -3692,6 +3707,14 @@ e_week_view_show_popup_menu (EWeekView *week_view,
e_popup_menu (popup, (GdkEvent *) bevent);
}
+static gboolean
+e_week_view_popup_menu (GtkWidget *widget)
+{
+ EWeekView *week_view = E_WEEK_VIEW (widget);
+ e_week_view_show_popup_menu (week_view, NULL,
+ week_view->editing_event_num);
+ return TRUE;
+}
static void
e_week_view_on_new_appointment (GtkWidget *widget, gpointer data)