diff options
author | JP Rosevear <jpr@ximian.com> | 2002-04-19 03:00:25 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2002-04-19 03:00:25 +0800 |
commit | 90710b285fcb24c3a6b7a6d78fd1746bcaff2256 (patch) | |
tree | 84bb16e4c51763463d6640d6a1bd7a94f0a88c99 | |
parent | bd6359c660895ea0765c216563957c3a2f44e112 (diff) | |
download | gsoc2013-evolution-90710b285fcb24c3a6b7a6d78fd1746bcaff2256.tar.gz gsoc2013-evolution-90710b285fcb24c3a6b7a6d78fd1746bcaff2256.tar.zst gsoc2013-evolution-90710b285fcb24c3a6b7a6d78fd1746bcaff2256.zip |
show the settings
2002-04-18 JP Rosevear <jpr@ximian.com>
* gui/e-day-view.c (e_day_view_on_settings): show the settings
* gui/e-week-view.c (e_week_view_on_settings): ditto
* gui/calendar-commands.c (control_util_show_settings): show the
settings dialog
* gui/calendar-commands.h: new proto
* gui/control-factory.c (control_factory_new_control): set the
control as object data on the calendar
svn path=/trunk/; revision=16511
-rw-r--r-- | calendar/ChangeLog | 14 | ||||
-rw-r--r-- | calendar/gui/calendar-commands.c | 25 | ||||
-rw-r--r-- | calendar/gui/calendar-commands.h | 3 | ||||
-rw-r--r-- | calendar/gui/control-factory.c | 1 | ||||
-rw-r--r-- | calendar/gui/e-day-view.c | 35 | ||||
-rw-r--r-- | calendar/gui/e-week-view.c | 18 |
6 files changed, 90 insertions, 6 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 498452ea40..9fd7b37c31 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,17 @@ +2002-04-18 JP Rosevear <jpr@ximian.com> + + * gui/e-day-view.c (e_day_view_on_settings): show the settings + + * gui/e-week-view.c (e_week_view_on_settings): ditto + + * gui/calendar-commands.c (control_util_show_settings): show the + settings dialog + + * gui/calendar-commands.h: new proto + + * gui/control-factory.c (control_factory_new_control): set the + control as object data on the calendar + 2002-04-17 Christopher James Lahey <clahey@ximian.com> * gui/e-calendar-table.c, gui/e-day-view.c, gui/e-week-view.c, diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index dcd17fe8c7..30a1654f1b 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -471,6 +471,31 @@ control_util_set_folder_bar_label (BonoboControl *control, char *label) CORBA_exception_free (&ev); } +void +control_util_show_settings (GnomeCalendar *gcal) +{ + BonoboControl *control; + GNOME_Evolution_ShellView shell_view; + CORBA_Environment ev; + + control = gtk_object_get_data (GTK_OBJECT (gcal), "control"); + if (control == NULL) + return; + + shell_view = get_shell_view_interface (control); + if (shell_view == CORBA_OBJECT_NIL) + return; + + CORBA_exception_init (&ev); + + GNOME_Evolution_ShellView_showSettings (shell_view, &ev); + + if (BONOBO_EX (&ev)) + g_message ("control_util_show_settings(): Could not show settings"); + + CORBA_exception_free (&ev); +} + /* Sensitizes the UI Component menu/toolbar calendar commands based on the * number of selected events. (This will always be 0 or 1 currently.) If enable * is FALSE, all will be disabled. Otherwise, the currently-selected number of diff --git a/calendar/gui/calendar-commands.h b/calendar/gui/calendar-commands.h index 0a20ba6c69..9ebac6eef4 100644 --- a/calendar/gui/calendar-commands.h +++ b/calendar/gui/calendar-commands.h @@ -45,4 +45,7 @@ void calendar_set_folder_bar_label (GnomeCalendar *gcal, BonoboControl *control) /* Used by calendar and tasks control to set the folder title bar label. */ void control_util_set_folder_bar_label (BonoboControl *control, char *label); +/* Used by calendar views and tasks to show the settings dialog */ +void control_util_show_settings (GnomeCalendar *gcal); + #endif /* CALENDAR_COMMANDS_H */ diff --git a/calendar/gui/control-factory.c b/calendar/gui/control-factory.c index 1d83f934af..a17790f197 100644 --- a/calendar/gui/control-factory.c +++ b/calendar/gui/control-factory.c @@ -253,6 +253,7 @@ control_factory_new_control (void) g_message ("control_factory_fn(): could not create the control!"); return NULL; } + gtk_object_set_data (GTK_OBJECT (gcal), "control", control); calendar_properties_init (gcal, control); #if 0 diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index 29d7c97393..4f73dccd55 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -355,6 +355,8 @@ static void e_day_view_on_forward (GtkWidget *widget, gpointer data); static void e_day_view_on_publish (GtkWidget *widget, gpointer data); +static void e_day_view_on_settings (GtkWidget *widget, + gpointer data); static void e_day_view_on_delete_occurrence (GtkWidget *widget, gpointer data); static void e_day_view_on_delete_appointment (GtkWidget *widget, @@ -3539,6 +3541,17 @@ enum { MASK_EDITING = 8 }; +#if 0 +static EPopupMenu view_items [] = { + E_POPUP_RADIO_ITEM (N_("Day View"), e_day_view_on_goto_date, 0, 0), + E_POPUP_RADIO_ITEM (N_("Work Week View"), e_day_view_on_goto_date, 0, 0), + E_POPUP_RADIO_ITEM (N_("Week View"), e_day_view_on_goto_date, 0, 0), + E_POPUP_RADIO_ITEM (N_("Month View"), e_day_view_on_goto_date, 0, 0), + + E_POPUP_TERMINATOR +}; +#endif + static EPopupMenu main_items [] = { E_POPUP_ITEM (N_("New _Appointment"), e_day_view_on_new_appointment, 0), @@ -3561,6 +3574,11 @@ static EPopupMenu main_items [] = { E_POPUP_SEPARATOR, +#if 0 + E_POPUP_SUBMENU (N_("Current View"), + view_items, 0), +#endif + E_POPUP_ITEM (N_("Go to _Today"), e_day_view_on_goto_today, 0), E_POPUP_ITEM (N_("_Go to Date..."), @@ -3574,15 +3592,16 @@ static EPopupMenu main_items [] = { E_POPUP_SEPARATOR, E_POPUP_ITEM (N_("_Configure..."), - e_day_view_on_paste, 0), + e_day_view_on_settings, 0), E_POPUP_TERMINATOR }; static EPopupMenu child_items [] = { + E_POPUP_ITEM (N_("_Open"), e_day_view_on_edit_appointment, MASK_EDITABLE | MASK_EDITING), - E_POPUP_ITEM (N_("_Save As..."), e_day_view_on_save_as, MASK_EDITABLE | MASK_SINGLE | MASK_EDITING), - E_POPUP_ITEM (N_("_Print..."), e_day_view_on_print_event, MASK_EDITABLE | MASK_SINGLE | MASK_EDITING), + E_POPUP_ITEM (N_("_Save As..."), e_day_view_on_save_as, MASK_EDITABLE | MASK_EDITING), + E_POPUP_ITEM (N_("_Print..."), e_day_view_on_print_event, MASK_EDITABLE | MASK_EDITING), /* Only show this separator if one of the above is shown. */ E_POPUP_SEPARATOR, @@ -3917,6 +3936,16 @@ e_day_view_on_publish (GtkWidget *widget, gpointer data) } static void +e_day_view_on_settings (GtkWidget *widget, gpointer data) +{ + EDayView *day_view; + + day_view = E_DAY_VIEW (data); + + control_util_show_settings (day_view->calendar); +} + +static void e_day_view_on_delete_occurrence (GtkWidget *widget, gpointer data) { EDayView *day_view; diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index f7eb62d56b..3ebc5f9ac0 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -198,6 +198,8 @@ static void e_week_view_on_forward (GtkWidget *widget, gpointer data); static void e_week_view_on_publish (GtkWidget *widget, gpointer data); +static void e_week_view_on_settings (GtkWidget *widget, + gpointer data); static void e_week_view_on_delete_occurrence (GtkWidget *widget, gpointer data); static void e_week_view_on_delete_appointment (GtkWidget *widget, @@ -3452,15 +3454,15 @@ static EPopupMenu main_items [] = { E_POPUP_SEPARATOR, - E_POPUP_ITEM (N_("_Configure..."), e_week_view_on_paste, 0), + E_POPUP_ITEM (N_("_Configure..."), e_week_view_on_settings, 0), E_POPUP_TERMINATOR }; static EPopupMenu child_items [] = { E_POPUP_ITEM (N_("_Open"), e_week_view_on_edit_appointment, MASK_EDITABLE | MASK_EDITING), - E_POPUP_ITEM (N_("_Save As..."), e_week_view_on_save_as, MASK_EDITABLE | MASK_SINGLE | MASK_EDITING), - E_POPUP_ITEM (N_("_Print..."), e_week_view_on_print_event, MASK_EDITABLE | MASK_SINGLE | MASK_EDITING), + E_POPUP_ITEM (N_("_Save As..."), e_week_view_on_save_as, MASK_EDITABLE | MASK_EDITING), + E_POPUP_ITEM (N_("_Print..."), e_week_view_on_print_event, MASK_EDITABLE | MASK_EDITING), /* Only show this separator if one of the above is shown. */ E_POPUP_SEPARATOR, @@ -3789,6 +3791,16 @@ e_week_view_on_publish (GtkWidget *widget, gpointer data) } static void +e_week_view_on_settings (GtkWidget *widget, gpointer data) +{ + EWeekView *week_view; + + week_view = E_WEEK_VIEW (data); + + control_util_show_settings (week_view->calendar); +} + +static void e_week_view_on_delete_occurrence (GtkWidget *widget, gpointer data) { EWeekView *week_view; |