From c4fb981151237aaad3678d5e20c614855e0a0c55 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Wed, 15 Aug 2001 13:57:37 +0000 Subject: Add the user creatable items. The callback is not actually implemented 2001-08-15 Federico Mena Quintero * gui/component-factory.c (factory_fn): Add the user creatable items. The callback is not actually implemented yet; this is just to finalize the GUI. * gui/dialogs/cal-prefs-dialog.glade: Added an option to ask for confirmation when deleting items. Added underlined shortcuts (they may not all work currently). svn path=/trunk/; revision=12047 --- calendar/ChangeLog | 10 ++++ calendar/gui/calendar-component.c | 31 +++++++++++ calendar/gui/component-factory.c | 31 +++++++++++ calendar/gui/dialogs/cal-prefs-dialog.glade | 85 +++++++++++++++++++++-------- 4 files changed, 134 insertions(+), 23 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 47f1959557..019b7089ea 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,13 @@ +2001-08-15 Federico Mena Quintero + + * gui/component-factory.c (factory_fn): Add the user creatable + items. The callback is not actually implemented yet; this is just + to finalize the GUI. + + * gui/dialogs/cal-prefs-dialog.glade: Added an option to ask for + confirmation when deleting items. Added underlined shortcuts + (they may not all work currently). + 2001-08-14 Damon Chaplin * gui/dialogs/task-page.c: diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index d3c5e1d513..1e2747c546 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -44,6 +44,10 @@ /* OAFIID for the component factory */ #define COMPONENT_FACTORY_ID "OAFIID:GNOME_Evolution_Calendar_ShellComponentFactory" +/* IDs for user creatable items */ +#define CREATE_EVENT_ID "event" +#define CREATE_TASK_ID "task" + static BonoboGenericFactory *factory = NULL; char *evolution_dir; @@ -339,6 +343,16 @@ owner_unset_cb (EvolutionShellComponent *shell_component, gtk_main_quit (); } +/* Callback used when we must create a user-creatable item */ +static void +sc_user_create_new_item_cb (EvolutionShellComponent *shell_component, + const char *id, + const char *parent_folder_physical_uri, + const char *parent_folder_type) +{ + /* FIXME */ +} + #if 0 static void destroy_cb (EvolutionShellComponent *shell_component, @@ -381,6 +395,23 @@ factory_fn (BonoboGenericFactory *factory, shells = g_list_append (shells, shell_component); #endif + /* User creatable items */ + + evolution_shell_component_add_user_creatable_item (shell_component, + CREATE_EVENT_ID, + _("Create a new appointment"), + _("New _Appointment"), + 'a'); + + evolution_shell_component_add_user_creatable_item (shell_component, + CREATE_TASK_ID, + _("Create a new task"), + _("New _Task"), + 't'); + + gtk_signal_connect (GTK_OBJECT (shell_component), "user_create_new_item", + GTK_SIGNAL_FUNC (sc_user_create_new_item_cb), NULL); + return BONOBO_OBJECT (shell_component); } diff --git a/calendar/gui/component-factory.c b/calendar/gui/component-factory.c index d3c5e1d513..1e2747c546 100644 --- a/calendar/gui/component-factory.c +++ b/calendar/gui/component-factory.c @@ -44,6 +44,10 @@ /* OAFIID for the component factory */ #define COMPONENT_FACTORY_ID "OAFIID:GNOME_Evolution_Calendar_ShellComponentFactory" +/* IDs for user creatable items */ +#define CREATE_EVENT_ID "event" +#define CREATE_TASK_ID "task" + static BonoboGenericFactory *factory = NULL; char *evolution_dir; @@ -339,6 +343,16 @@ owner_unset_cb (EvolutionShellComponent *shell_component, gtk_main_quit (); } +/* Callback used when we must create a user-creatable item */ +static void +sc_user_create_new_item_cb (EvolutionShellComponent *shell_component, + const char *id, + const char *parent_folder_physical_uri, + const char *parent_folder_type) +{ + /* FIXME */ +} + #if 0 static void destroy_cb (EvolutionShellComponent *shell_component, @@ -381,6 +395,23 @@ factory_fn (BonoboGenericFactory *factory, shells = g_list_append (shells, shell_component); #endif + /* User creatable items */ + + evolution_shell_component_add_user_creatable_item (shell_component, + CREATE_EVENT_ID, + _("Create a new appointment"), + _("New _Appointment"), + 'a'); + + evolution_shell_component_add_user_creatable_item (shell_component, + CREATE_TASK_ID, + _("Create a new task"), + _("New _Task"), + 't'); + + gtk_signal_connect (GTK_OBJECT (shell_component), "user_create_new_item", + GTK_SIGNAL_FUNC (sc_user_create_new_item_cb), NULL); + return BONOBO_OBJECT (shell_component); } diff --git a/calendar/gui/dialogs/cal-prefs-dialog.glade b/calendar/gui/dialogs/cal-prefs-dialog.glade index 95585d8806..b19cbdf9b9 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.glade +++ b/calendar/gui/dialogs/cal-prefs-dialog.glade @@ -15,7 +15,7 @@ GnomeDialog cal-prefs-dialog - Calendar Preferences + Calendar and Tasks Settings GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False @@ -136,7 +136,7 @@ GtkLabel label22 - + GTK_JUSTIFY_CENTER False 0 @@ -232,7 +232,7 @@ GtkRadioButton use_12_hour True - + False True time_format_group @@ -247,7 +247,7 @@ GtkRadioButton use_24_hour True - + False True time_format_group @@ -295,7 +295,7 @@ GtkCheckButton mon_button True - + False True @@ -309,7 +309,7 @@ GtkCheckButton tue_button True - + False True @@ -323,7 +323,7 @@ GtkCheckButton wed_button True - + False True @@ -337,7 +337,7 @@ GtkCheckButton thu_button True - + False True @@ -351,7 +351,7 @@ GtkCheckButton fri_button True - + False True @@ -365,7 +365,7 @@ GtkCheckButton sat_button True - + False True @@ -379,7 +379,7 @@ GtkCheckButton sun_button True - + False True @@ -404,13 +404,14 @@ GtkLabel label16 - + GTK_JUSTIFY_CENTER False 0.5 0.5 0 0 + first_day_of_week 0 False @@ -453,7 +454,7 @@ Sunday GtkLabel label17 - + GTK_JUSTIFY_CENTER False 0.5 @@ -484,7 +485,7 @@ Sunday GtkLabel label18 - + GTK_JUSTIFY_CENTER False 0.5 @@ -520,7 +521,7 @@ Sunday GtkLabel Notebook:tab label21 - + GTK_JUSTIFY_CENTER False 0.5 @@ -550,13 +551,14 @@ Sunday GtkLabel label25 - + GTK_JUSTIFY_CENTER False 0.5 0.5 0 0 + time_divisions 0 False @@ -587,7 +589,7 @@ Sunday GtkCheckButton show_end_times True - + False True @@ -601,7 +603,7 @@ Sunday GtkCheckButton compress_weekend True - + False True @@ -615,7 +617,7 @@ Sunday GtkCheckButton dnav_show_week_no True - + False True @@ -630,7 +632,7 @@ Sunday GtkLabel Notebook:tab label7 - + GTK_JUSTIFY_CENTER False 0.5 @@ -663,13 +665,14 @@ Sunday GtkLabel label23 - + GTK_JUSTIFY_CENTER False 0 0.5 0 0 + tasks_due_today_color 0 1 @@ -689,13 +692,14 @@ Sunday GtkLabel label24 - + GTK_JUSTIFY_CENTER False 0 0.5 0 0 + tasks_overdue_color 0 1 @@ -764,7 +768,42 @@ Sunday GtkLabel Notebook:tab label11 - + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + GtkVBox + vbox11 + 4 + False + 4 + + + GtkCheckButton + checkbutton1 + True + + False + True + + 0 + False + False + + + + + + GtkLabel + Notebook:tab + label26 + GTK_JUSTIFY_CENTER False 0.5 -- cgit