From e91db1e5a1c13a703dd7035b9b2383f2e3820fca Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Sat, 16 Mar 2002 02:19:47 +0000 Subject: Updated to use new EPopupMenu API. 2002-03-15 Jeffrey Stedfast * gui/e-day-view.c: Updated to use new EPopupMenu API. * gui/e-week-view.c: Updated to use new EPopupMenu API. * gui/e-calendar-table.c: Updated to use new EPopupMenu API. svn path=/trunk/; revision=16184 --- calendar/gui/dialogs/meeting-page.c | 13 ++++++---- calendar/gui/e-calendar-table.c | 26 ++++++++++---------- calendar/gui/e-day-view.c | 38 ++++++++++++++--------------- calendar/gui/e-week-view.c | 48 ++++++++++++++++++------------------- 4 files changed, 64 insertions(+), 61 deletions(-) (limited to 'calendar/gui') diff --git a/calendar/gui/dialogs/meeting-page.c b/calendar/gui/dialogs/meeting-page.c index 7333380195..9358b40c8b 100644 --- a/calendar/gui/dialogs/meeting-page.c +++ b/calendar/gui/dialogs/meeting-page.c @@ -698,14 +698,14 @@ enum { static EPopupMenu context_menu[] = { #if 0 - { N_("_Delegate To..."), NULL, - GTK_SIGNAL_FUNC (popup_delegate_cb),NULL, CAN_DELEGATE }, + { N_("_Delegate To..."), NULL, + GTK_SIGNAL_FUNC (popup_delegate_cb), NULL, NULL, CAN_DELEGATE }, E_POPUP_SEPARATOR, #endif - { N_("_Delete"), GNOME_STOCK_MENU_TRASH, - GTK_SIGNAL_FUNC (popup_delete_cb), NULL, CAN_DELETE }, + { N_("_Delete"), NULL, + GTK_SIGNAL_FUNC (popup_delete_cb), NULL, NULL, CAN_DELETE }, E_POPUP_TERMINATOR }; @@ -723,7 +723,10 @@ right_click_cb (ETable *etable, gint row, gint col, GdkEvent *event, gpointer da view_row = e_table_model_to_view_row (etable, row); priv->row = e_meeting_model_etable_view_to_model_row (etable, priv->model, view_row); - + + /* FIXME: if you enable Delegate, then change index to '1' */ + context_menu[0].pixmap = gnome_stock_new_with_icon (GNOME_STOCK_MENU_TRASH); + menu = e_popup_menu_create (context_menu, enable_mask, hide_mask, data); e_auto_kill_popup_menu_on_hide (menu); diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c index e3bbe7673e..62f4d426c9 100644 --- a/calendar/gui/e-calendar-table.c +++ b/calendar/gui/e-calendar-table.c @@ -958,29 +958,29 @@ enum { static EPopupMenu tasks_popup_menu [] = { { N_("_Open"), NULL, - e_calendar_table_on_open_task, NULL, MASK_SINGLE }, - { "", NULL, NULL, NULL, MASK_SINGLE }, - + e_calendar_table_on_open_task, NULL, NULL, MASK_SINGLE }, + E_POPUP_SEPARATOR, + { N_("C_ut"), NULL, - e_calendar_table_on_cut, NULL, 0 }, + e_calendar_table_on_cut, NULL, NULL, 0 }, { N_("_Copy"), NULL, - e_calendar_table_on_copy, NULL, 0 }, + e_calendar_table_on_copy, NULL, NULL, 0 }, { N_("_Paste"), NULL, - e_calendar_table_on_paste, NULL, 0 }, - - { "", NULL, NULL, NULL, 0 }, + e_calendar_table_on_paste, NULL, NULL, 0 }, + E_POPUP_SEPARATOR, + { N_("_Mark as Complete"), NULL, - mark_as_complete_cb, NULL, MASK_SINGLE }, + mark_as_complete_cb, NULL, NULL, MASK_SINGLE }, { N_("_Delete this Task"), NULL, - delete_cb, NULL, MASK_SINGLE }, + delete_cb, NULL, NULL, MASK_SINGLE }, { N_("_Mark Tasks as Complete"), NULL, - mark_as_complete_cb, NULL, MASK_MULTIPLE }, + mark_as_complete_cb, NULL, NULL, MASK_MULTIPLE }, { N_("_Delete Selected Tasks"), NULL, - delete_cb, NULL, MASK_MULTIPLE }, + delete_cb, NULL, NULL, MASK_MULTIPLE }, - { NULL, NULL, NULL, NULL, 0 } + E_POPUP_TERMINATOR }; static gint diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index 986096bdfc..cde934845a 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -3523,55 +3523,55 @@ enum { static EPopupMenu main_items [] = { { N_("New _Appointment"), NULL, - e_day_view_on_new_appointment, NULL, 0 }, + e_day_view_on_new_appointment, NULL, NULL, 0 }, { N_("New All Day _Event"), NULL, - e_day_view_on_new_event, NULL, 0 }, + e_day_view_on_new_event, NULL, NULL, 0 }, - { "", NULL, NULL, NULL, 0 }, + E_POPUP_SEPARATOR, { N_("_Paste"), NULL, - e_day_view_on_paste, NULL, 0 }, + e_day_view_on_paste, NULL, NULL, 0 }, - { "", NULL, NULL, NULL, 0 }, + E_POPUP_SEPARATOR, { N_("Go to _Today"), NULL, - e_day_view_on_goto_today, NULL, 0 }, + e_day_view_on_goto_today, NULL, NULL, 0 }, { N_("_Go to Date..."), NULL, - e_day_view_on_goto_date, NULL, 0 }, + e_day_view_on_goto_date, NULL, NULL, 0 }, - { NULL, NULL, NULL, NULL, 0 } + E_POPUP_TERMINATOR }; static EPopupMenu child_items [] = { { N_("_Open"), NULL, - e_day_view_on_edit_appointment, NULL, MASK_EDITABLE | MASK_EDITING }, + e_day_view_on_edit_appointment, NULL, NULL, MASK_EDITABLE | MASK_EDITING }, { N_("_Delete this Appointment"), NULL, - e_day_view_on_delete_appointment, NULL, MASK_EDITABLE | MASK_SINGLE | MASK_EDITING }, + e_day_view_on_delete_appointment, NULL, NULL, MASK_EDITABLE | MASK_SINGLE | MASK_EDITING }, /* Only show this separator if one of the above is shown. */ - { "", NULL, NULL, NULL, MASK_EDITABLE | MASK_EDITING }, + { "", NULL, NULL, NULL, NULL, MASK_EDITABLE | MASK_EDITING }, { N_("C_ut"), NULL, - e_day_view_on_cut, NULL, MASK_EDITABLE | MASK_EDITING }, + e_day_view_on_cut, NULL, NULL, MASK_EDITABLE | MASK_EDITING }, { N_("_Copy"), NULL, - e_day_view_on_copy, NULL, 0 }, + e_day_view_on_copy, NULL, NULL, 0 }, { N_("_Paste"), NULL, - e_day_view_on_paste, NULL, 0 }, + e_day_view_on_paste, NULL, NULL, 0 }, /* * The following are only shown if this is a recurring event */ - { "", NULL, NULL, NULL, MASK_RECURRING | MASK_EDITING }, + { "", NULL, NULL, NULL, NULL, MASK_RECURRING | MASK_EDITING }, { N_("Make this Occurrence _Movable"), NULL, - e_day_view_on_unrecur_appointment, NULL, MASK_RECURRING | MASK_EDITING }, + e_day_view_on_unrecur_appointment, NULL, NULL, MASK_RECURRING | MASK_EDITING }, { N_("Delete this _Occurrence"), NULL, - e_day_view_on_delete_occurrence, NULL, MASK_RECURRING | MASK_EDITING }, + e_day_view_on_delete_occurrence, NULL, NULL, MASK_RECURRING | MASK_EDITING }, { N_("Delete _All Occurrences"), NULL, - e_day_view_on_delete_appointment, NULL, MASK_RECURRING | MASK_EDITING }, + e_day_view_on_delete_appointment, NULL, NULL, MASK_RECURRING | MASK_EDITING }, - { NULL, NULL, NULL, NULL, 0 } + E_POPUP_TERMINATOR }; static void diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 85434e2099..8e687eae53 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -3411,60 +3411,60 @@ enum { static EPopupMenu main_items [] = { { N_("New _Appointment..."), NULL, - e_week_view_on_new_appointment, NULL, 0 }, + e_week_view_on_new_appointment, NULL, NULL, 0 }, { N_("New All Day _Event"), NULL, - e_week_view_on_new_event, NULL, 0 }, + e_week_view_on_new_event, NULL, NULL, 0 }, - { "", NULL, NULL, NULL, 0 }, + E_POPUP_SEPARATOR, { N_("_Paste"), NULL, - e_week_view_on_paste, NULL, 0 }, - - { "", NULL, NULL, NULL, 0 }, + e_week_view_on_paste, NULL, NULL, 0 }, + E_POPUP_SEPARATOR, + { N_("Go to _Today"), NULL, - e_week_view_on_goto_today, NULL, 0 }, + e_week_view_on_goto_today, NULL, NULL, 0 }, { N_("_Go to Date..."), NULL, - e_week_view_on_goto_date, NULL, 0 }, - { NULL, NULL, NULL, NULL, 0 } + e_week_view_on_goto_date, NULL, NULL, 0 }, + + E_POPUP_TERMINATOR }; static EPopupMenu child_items [] = { { N_("_Open"), NULL, - e_week_view_on_edit_appointment, NULL, MASK_EDITABLE | MASK_EDITING }, + e_week_view_on_edit_appointment, NULL, NULL, MASK_EDITABLE | MASK_EDITING }, { N_("_Delete this Appointment"), NULL, - e_week_view_on_delete_appointment, NULL, MASK_EDITABLE | MASK_SINGLE | MASK_EDITING }, + e_week_view_on_delete_appointment, NULL, NULL, MASK_EDITABLE | MASK_SINGLE | MASK_EDITING }, /* Only show this separator if one of the above is shown. */ - { "", NULL, NULL, NULL, MASK_EDITABLE | MASK_EDITING }, - + { "", NULL, NULL, NULL, NULL, MASK_EDITABLE | MASK_EDITING }, { N_("C_ut"), NULL, - e_week_view_on_cut, NULL, MASK_EDITING | MASK_EDITABLE }, + e_week_view_on_cut, NULL, NULL, MASK_EDITING | MASK_EDITABLE }, { N_("_Copy"), NULL, - e_week_view_on_copy, NULL, MASK_EDITING | MASK_EDITABLE }, + e_week_view_on_copy, NULL, NULL, MASK_EDITING | MASK_EDITABLE }, { N_("_Paste"), NULL, - e_week_view_on_paste, NULL, 0 }, + e_week_view_on_paste, NULL, NULL, 0 }, - { "", NULL, NULL, NULL, 0}, + E_POPUP_SEPARATOR, { N_("New _Appointment..."), NULL, - e_week_view_on_new_appointment, NULL, 0 }, + e_week_view_on_new_appointment, NULL, NULL, 0 }, - { "", NULL, NULL, NULL, MASK_SINGLE }, + { "", NULL, NULL, NULL, NULL, MASK_SINGLE }, /* * The following are only shown if this is a recurring event */ - { "", NULL, NULL, NULL, MASK_SINGLE}, + { "", NULL, NULL, NULL, NULL, MASK_SINGLE }, { N_("Make this Occurrence _Movable"), NULL, - e_week_view_on_unrecur_appointment, NULL, MASK_RECURRING | MASK_EDITING }, + e_week_view_on_unrecur_appointment, NULL, NULL, MASK_RECURRING | MASK_EDITING }, { N_("Delete this _Occurrence"), NULL, - e_week_view_on_delete_occurrence, NULL, MASK_RECURRING | MASK_EDITING }, + e_week_view_on_delete_occurrence, NULL, NULL, MASK_RECURRING | MASK_EDITING }, { N_("Delete _All Occurrences"), NULL, - e_week_view_on_delete_appointment, NULL, MASK_RECURRING | MASK_EDITING }, + e_week_view_on_delete_appointment, NULL, NULL, MASK_RECURRING | MASK_EDITING }, - { NULL, NULL, NULL, NULL, 0 } + E_POPUP_TERMINATOR }; void -- cgit