From 828df57f1f940bad350aada8d90e5f860fefc611 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Thu, 1 Jun 2000 23:55:32 +0000 Subject: Change of plans. The toplevel GnomeApp is now generated with Glade instead 2000-06-01 Federico Mena Quintero * gui/event-editor-dialog.glade: Change of plans. The toplevel GnomeApp is now generated with Glade instead of being created in the program code. Otherwise we can't migrate the accelerators to the new toplevel and they won't work. * gui/event-editor.[ch]: EventEditor now derives from GtkObject. This lets us use the GnomeApp created by libglade and still have signals and stuff. * gui/event-editor.c (create_menu): Tell the UI handler that the menubar is the GnomeApp's existing one, not to create a new one. (create_toolbar): Tell the UI handler to use the GnomeApp's existing toolbar. (event_editor_focus): New function to raise/focus an event editor. * gui/gnome-cal.c (gnome_calendar_edit_object): Use event_editor_focus(). svn path=/trunk/; revision=3348 --- calendar/ChangeLog | 20 + calendar/gui/event-editor-dialog.glade | 2949 +++++++++++++++--------------- calendar/gui/event-editor-dialog.glade.h | 2 +- calendar/gui/event-editor.c | 134 +- calendar/gui/event-editor.h | 12 +- calendar/gui/gnome-cal.c | 16 +- 6 files changed, 1583 insertions(+), 1550 deletions(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index d96a698e6c..f58a8e42dd 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,23 @@ +2000-06-01 Federico Mena Quintero + + * gui/event-editor-dialog.glade: Change of plans. The toplevel + GnomeApp is now generated with Glade instead of being created in + the program code. Otherwise we can't migrate the accelerators to + the new toplevel and they won't work. + + * gui/event-editor.[ch]: EventEditor now derives from GtkObject. + This lets us use the GnomeApp created by libglade and still have + signals and stuff. + + * gui/event-editor.c (create_menu): Tell the UI handler that the + menubar is the GnomeApp's existing one, not to create a new one. + (create_toolbar): Tell the UI handler to use the GnomeApp's + existing toolbar. + (event_editor_focus): New function to raise/focus an event editor. + + * gui/gnome-cal.c (gnome_calendar_edit_object): Use + event_editor_focus(). + 2000-06-01 Ettore Perazzoli * gui/calendar-commands.c (calendar_control_activate): Put the diff --git a/calendar/gui/event-editor-dialog.glade b/calendar/gui/event-editor-dialog.glade index d7619ecd18..a86363759d 100644 --- a/calendar/gui/event-editor-dialog.glade +++ b/calendar/gui/event-editor-dialog.glade @@ -18,847 +18,763 @@ - GtkWindow + GnomeApp event-editor-dialog - window1 + event-editor-dialog GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False False True False + True - GtkNotebook - dialog-contents - True - True - True - GTK_POS_TOP - False - 2 - 2 - False + GnomeDock + GnomeApp:dock + dock2 + True + + 0 + True + True + - GtkVBox - vbox2 - False - 0 + GtkNotebook + GnomeDock:contents + dialog-contents + True + True + True + GTK_POS_TOP + False + 2 + 2 + False - GtkHBox - hbox4 + GtkVBox + vbox2 False 0 - - 0 - True - True - - GtkLabel - label13 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - general-owner - - 0 - False - False - - - - - GtkEntry - general-owner - True - True - True - 0 - - - 0 - True - True - - - - - - GtkHBox - hbox5 - False - 0 - - 0 - False - False - - - - GtkLabel - label14 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - general-summary - - 0 - False - False - - - - - GtkEntry - general-summary - True - True - True - 0 - + GtkHBox + hbox4 + False + 0 0 True True - - - - - GtkFrame - frame4 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkTable - table3 - 2 - 3 - False - 4 - 4 GtkLabel - label15 - + label13 + GTK_JUSTIFY_CENTER False 0.5 0.5 0 0 + general-owner - 0 - 1 - 0 - 1 - 0 - 0 - False - False - False - False - False - False + 0 + False + False + + + + + GtkEntry + general-owner + True + True + True + 0 + + + 0 + True + True + + + + GtkHBox + hbox5 + False + 0 + + 0 + False + False + GtkLabel - label16 - + label14 + GTK_JUSTIFY_CENTER False 0.5 0.5 0 0 + general-summary - 0 - 1 - 1 - 2 - 0 - 0 - False - False - False - False - False - False + 0 + False + False - Custom - start-time - make_date_edit_with_time - - - 0 - 0 - Tue, 16 May 2000 19:11:05 GMT + GtkEntry + general-summary + True + True + True + 0 + - 1 - 2 - 0 - 1 - 0 - 0 - True - False - False - False - True - True + 0 + True + True + + + + GtkFrame + frame4 + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + True + True + - Custom - end-time - make_date_edit_with_time - 0 - 0 - Tue, 16 May 2000 19:11:10 GMT - - 1 - 2 - 1 - 2 + GtkTable + table3 + 2 + 3 + False + 4 + 4 + + + GtkLabel + label15 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 0 0 - False - False - False - False - True - True - - + + 0 + 1 + 0 + 1 + 0 + 0 + False + False + False + False + False + False + + - - GtkCheckButton - all-day-event - True - - False - True - - 2 - 3 - 0 - 1 + + GtkLabel + label16 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 0 0 - False - False - False - False - False - False - + + 0 + 1 + 1 + 2 + 0 + 0 + False + False + False + False + False + False + + + + + Custom + start-time + make_date_edit_with_time + + + 0 + 0 + Tue, 16 May 2000 19:11:05 GMT + + 1 + 2 + 0 + 1 + 0 + 0 + True + False + False + False + True + True + + + + + Custom + end-time + make_date_edit_with_time + 0 + 0 + Tue, 16 May 2000 19:11:10 GMT + + 1 + 2 + 1 + 2 + 0 + 0 + False + False + False + False + True + True + + + + + GtkCheckButton + all-day-event + True + + False + True + + 2 + 3 + 0 + 1 + 0 + 0 + False + False + False + False + False + False + + - - - - GtkFrame - frame6 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - GtkTable - table4 - 4 - 5 - False - 4 - 4 + GtkFrame + frame6 + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + True + True + - GtkSpinButton - alarm-display-amount - True - 1 - 0 - True - GTK_UPDATE_ALWAYS - False - False - 0 - 0 - 100 - 1 - 10 - 10 - - 1 - 2 - 0 - 1 - 0 - 0 - True - False - False - False - True - False - - + GtkTable + table4 + 4 + 5 + False + 4 + 4 - - GtkSpinButton - alarm-audio-amount - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 0 - 0 - 100 - 1 - 10 - 10 - - 1 - 2 - 1 - 2 - 0 - 0 - True - False - False - False - True - False - - + + GtkSpinButton + alarm-display-amount + True + 1 + 0 + True + GTK_UPDATE_ALWAYS + False + False + 0 + 0 + 100 + 1 + 10 + 10 + + 1 + 2 + 0 + 1 + 0 + 0 + True + False + False + False + True + False + + - - GtkSpinButton - alarm-program-amount - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 0 - 0 - 100 - 1 - 10 - 10 - - 1 - 2 - 2 - 3 - 0 - 0 - True - False - False - False - True - False - - + + GtkSpinButton + alarm-audio-amount + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 0 + 0 + 100 + 1 + 10 + 10 + + 1 + 2 + 1 + 2 + 0 + 0 + True + False + False + False + True + False + + - - GtkSpinButton - alarm-mail-amount - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 0 - 0 - 100 - 1 - 10 - 10 - - 1 - 2 - 3 - 4 - 0 - 0 - True - False - False - False - True - False - - + + GtkSpinButton + alarm-program-amount + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 0 + 0 + 100 + 1 + 10 + 10 + + 1 + 2 + 2 + 3 + 0 + 0 + True + False + False + False + True + False + + - - GtkOptionMenu - alarm-display-unit - True - Minutes + + GtkSpinButton + alarm-mail-amount + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 0 + 0 + 100 + 1 + 10 + 10 + + 1 + 2 + 3 + 4 + 0 + 0 + True + False + False + False + True + False + + + + + GtkOptionMenu + alarm-display-unit + True + Minutes Hours Days - 0 - - 2 - 3 - 0 - 1 - 0 - 0 - False - False - False - False - False - False - - + 0 + + 2 + 3 + 0 + 1 + 0 + 0 + False + False + False + False + False + False + + - - GtkOptionMenu - alarm-audio-unit - True - Minutes + + GtkOptionMenu + alarm-audio-unit + True + Minutes Hours Days - 0 - - 2 - 3 - 1 - 2 - 0 - 0 - False - False - False - False - False - False - - + 0 + + 2 + 3 + 1 + 2 + 0 + 0 + False + False + False + False + False + False + + - - GtkOptionMenu - alarm-program-unit - True - Minutes + + GtkOptionMenu + alarm-program-unit + True + Minutes Hours Days - 0 - - 2 - 3 - 2 - 3 - 0 - 0 - False - False - False - False - False - False - - + 0 + + 2 + 3 + 2 + 3 + 0 + 0 + False + False + False + False + False + False + + - - GtkOptionMenu - alarm-mail-unit - True - Minutes + + GtkOptionMenu + alarm-mail-unit + True + Minutes Hours Days - 0 - - 2 - 3 - 3 - 4 - 0 - 0 - False - False - False - False - False - False - - - - - GtkEntry - alarm-mail-mail-to - True - True - True - 0 - - - 4 - 5 - 3 - 4 - 0 - 0 - True - False - False - False - True - False - - - - - GnomeFileEntry - alarm-program-run-program - 10 - False - False - - 4 - 5 - 2 - 3 - 0 - 0 - True - False - False - False - True - False - + 0 + + 2 + 3 + 3 + 4 + 0 + 0 + False + False + False + False + False + False + + GtkEntry - GnomeEntry:entry - alarm-program-run-program-entry + alarm-mail-mail-to True True True 0 + + 4 + 5 + 3 + 4 + 0 + 0 + True + False + False + False + True + False + - - - GtkCheckButton - alarm-display - True - - False - True - - 0 - 1 - 0 - 1 - 0 - 0 - False - False - False - False - True - False - - + + GnomeFileEntry + alarm-program-run-program + 10 + False + False + + 4 + 5 + 2 + 3 + 0 + 0 + True + False + False + False + True + False + - - GtkCheckButton - alarm-audio - True - - False - True - - 0 - 1 - 1 - 2 - 0 - 0 - False - False - False - False - True - False - - + + GtkEntry + GnomeEntry:entry + alarm-program-run-program-entry + True + True + True + 0 + + + - - GtkCheckButton - alarm-program - True - - False - True - - 0 - 1 - 2 - 3 - 0 - 0 - False - False - False - False - True - False - - + + GtkCheckButton + alarm-display + True + + False + True + + 0 + 1 + 0 + 1 + 0 + 0 + False + False + False + False + True + False + + - - GtkCheckButton - alarm-mail - True - - False - True - - 0 - 1 - 3 - 4 - 0 - 0 - False - False - False - False - True - False - - + + GtkCheckButton + alarm-audio + True + + False + True + + 0 + 1 + 1 + 2 + 0 + 0 + False + False + False + False + True + False + + - - GtkLabel - label18 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - alarm-mail-mail-to - - 3 - 4 - 3 - 4 + + GtkCheckButton + alarm-program + True + + False + True + + 0 + 1 + 2 + 3 + 0 + 0 + False + False + False + False + True + False + + + + + GtkCheckButton + alarm-mail + True + + False + True + + 0 + 1 + 3 + 4 + 0 + 0 + False + False + False + False + True + False + + + + + GtkLabel + label18 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 0 0 - False - False - False - False - True - False - - + alarm-mail-mail-to + + 3 + 4 + 3 + 4 + 0 + 0 + False + False + False + False + True + False + + - - GtkLabel - label17 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - alarm-program-run-program-entry - - 3 - 4 - 2 - 3 + + GtkLabel + label17 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 0 0 - False - False - False - False - True - False - - - - - - - GtkFrame - frame5 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkHBox - hbox6 - False - 4 - - - GtkRadioButton - classification-radio - True - - True - True - classification_radio_group - - 0 - False - False - - - - - GtkRadioButton - - True - - False - True - classification_radio_group - - 0 - False - False - - - - - GtkRadioButton - - True - - False - True - classification_radio_group - - 0 - False - False - + alarm-program-run-program-entry + + 3 + 4 + 2 + 3 + 0 + 0 + False + False + False + False + True + False + + - - - - - GtkLabel - Notebook:tab - label11 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkVBox - vbox3 - 4 - False - 0 - - - GtkFrame - frame8 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - False - True - - GtkHBox - hbox7 - False - 0 + GtkFrame + frame5 + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + True + True + - GtkVBox - vbox4 + GtkHBox + hbox6 False - 0 - - 0 - False - False - + 4 GtkRadioButton - recurrence-rule-none + classification-radio True - + True True - recurrence_rule_group + classification_radio_group 0 False @@ -868,12 +784,12 @@ Days GtkRadioButton - recurrence-rule-daily + True - + False True - recurrence_rule_group + classification_radio_group 0 False @@ -883,110 +799,297 @@ Days GtkRadioButton - recurrence-rule-weekly + True - + False True - recurrence_rule_group + classification_radio_group 0 False False + + + - - GtkRadioButton - recurrence-rule-monthly - True - - False - True - recurrence_rule_group - - 0 - False - False - - + + GtkLabel + Notebook:tab + label11 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + - - GtkRadioButton - recurrence-rule-yearly - True - - False - True - recurrence_rule_group + + GtkVBox + vbox3 + 4 + False + 0 + + + GtkFrame + frame8 + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + False + True + + + + GtkHBox + hbox7 + False + 0 + + + GtkVBox + vbox4 + False + 0 0 False False - - - - GtkVSeparator - vseparator1 - - 0 - False - True - - + + GtkRadioButton + recurrence-rule-none + True + + True + True + recurrence_rule_group + + 0 + False + False + + - - GtkNotebook - recurrence-rule-notebook - False - True - GTK_POS_TOP - False - 2 - 2 - False - - 0 - True - True - + + GtkRadioButton + recurrence-rule-daily + True + + False + True + recurrence_rule_group + + 0 + False + False + + - - Placeholder + + GtkRadioButton + recurrence-rule-weekly + True + + False + True + recurrence_rule_group + + 0 + False + False + + + + + GtkRadioButton + recurrence-rule-monthly + True + + False + True + recurrence_rule_group + + 0 + False + False + + + + + GtkRadioButton + recurrence-rule-yearly + True + + False + True + recurrence_rule_group + + 0 + False + False + + - GtkLabel - Notebook:tab - label23 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 + GtkVSeparator + vseparator1 + + 0 + False + True + - GtkAlignment - alignment1 - 0.5 - 0.5 - 1 - 1 + GtkNotebook + recurrence-rule-notebook + False + True + GTK_POS_TOP + False + 2 + 2 + False + + 0 + True + True + + + + Placeholder + + + + GtkLabel + Notebook:tab + label23 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + GtkAlignment + alignment1 + 0.5 + 0.5 + 1 + 1 + + + GtkVBox + vbox7 + False + 0 + + + GtkHBox + hbox13 + False + 0 + + 0 + False + True + + + + GtkLabel + label31 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkSpinButton + recurrence-rule-daily-days + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 1 + 0 + 100 + 1 + 10 + 10 + + 0 + False + True + + + + + GtkLabel + label32 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + 0 + False + False + + + + + + + + GtkLabel + Notebook:tab + label24 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + GtkVBox - vbox7 + vbox8 False 0 GtkHBox - hbox13 + hbox14 False 0 @@ -997,7 +1100,7 @@ Days GtkLabel - label31 + label33 GTK_JUSTIFY_CENTER False @@ -1014,7 +1117,7 @@ Days GtkSpinButton - recurrence-rule-daily-days + recurrence-rule-weekly-weeks True 1 0 @@ -1037,8 +1140,8 @@ Days GtkLabel - label32 - + label34 + GTK_JUSTIFY_CENTER False 0.5 @@ -1052,241 +1155,140 @@ Days - - - - - GtkLabel - Notebook:tab - label24 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkVBox - vbox8 - False - 0 - - - GtkHBox - hbox14 - False - 0 - - 0 - False - True - - GtkLabel - label33 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 + GtkHBox + hbox15 + False + 0 0 False - False + True - - - GtkSpinButton - recurrence-rule-weekly-weeks - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 1 - 0 - 100 - 1 - 10 - 10 - - 0 - False - True - - - - - GtkLabel - label34 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - - - - - - GtkHBox - hbox15 - False - 0 - - 0 - False - True - - - - GtkCheckButton - recurrence-rule-weekly-mon - True - - False - True - - 0 - False - False - - + + GtkCheckButton + recurrence-rule-weekly-mon + True + + False + True + + 0 + False + False + + - - GtkCheckButton - recurrence-rule-weekly-tue - True - - False - True - - 0 - False - False - - + + GtkCheckButton + recurrence-rule-weekly-tue + True + + False + True + + 0 + False + False + + - - GtkCheckButton - recurrence-rule-weekly-wed - True - - False - True - - 0 - False - False - - + + GtkCheckButton + recurrence-rule-weekly-wed + True + + False + True + + 0 + False + False + + - - GtkCheckButton - recurrence-rule-weekly-thu - True - - False - True - - 0 - False - False - - + + GtkCheckButton + recurrence-rule-weekly-thu + True + + False + True + + 0 + False + False + + - - GtkCheckButton - recurrence-rule-weekly-fri - True - - False - True - - 0 - False - False - - + + GtkCheckButton + recurrence-rule-weekly-fri + True + + False + True + + 0 + False + False + + - - GtkCheckButton - recurrence-rule-weekly-sat - True - - False - True - - 0 - False - False - - + + GtkCheckButton + recurrence-rule-weekly-sat + True + + False + True + + 0 + False + False + + - - GtkCheckButton - recurrence-rule-weekly-sun - True - - False - True - - 0 - False - False - + + GtkCheckButton + recurrence-rule-weekly-sun + True + + False + True + + 0 + False + False + + - - - - GtkLabel - Notebook:tab - label25 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - GtkHBox - hbox16 - False - 0 + + GtkLabel + Notebook:tab + label25 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + - GtkVBox - vbox9 + GtkHBox + hbox16 False 0 - - 0 - True - True - GtkVBox - vbox10 + vbox9 False 0 @@ -1296,8 +1298,8 @@ Days - GtkHBox - hbox17 + GtkVBox + vbox10 False 0 @@ -1307,110 +1309,121 @@ Days - GtkRadioButton - recurrence-rule-monthly-on-day - True - - True - True - recurrence_rule_monthly_group - - 0 - False - False - - - - - GtkSpinButton - recurrence-rule-monthly-day-nth - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 1 - 0 - 100 - 1 - 10 - 10 + GtkHBox + hbox17 + False + 0 0 - False + True True - - - GtkLabel - label35 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - + + GtkRadioButton + recurrence-rule-monthly-on-day + True + + True + True + recurrence_rule_monthly_group + + 0 + False + False + + + + + GtkSpinButton + recurrence-rule-monthly-day-nth + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 1 + 0 + 100 + 1 + 10 + 10 + + 0 + False + True + + + + + GtkLabel + label35 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + 0 + False + False + + - - - - GtkHBox - hbox18 - False - 0 - - 0 - False - False - - GtkRadioButton - recurrence-rule-monthly-weekday - True - - False - True - recurrence_rule_monthly_group + GtkHBox + hbox18 + False + 0 0 False False - - - GtkOptionMenu - recurrence-rule-monthly-week - True - 1st + + GtkRadioButton + recurrence-rule-monthly-weekday + True + + False + True + recurrence_rule_monthly_group + + 0 + False + False + + + + + GtkOptionMenu + recurrence-rule-monthly-week + True + 1st 2nd 3rd 4th 5th - 0 - - 0 - False - False - - - - - GtkOptionMenu - recurrence-rule-monthly-weekpos - True - Monday + 0 + + 0 + False + False + + + + + GtkOptionMenu + recurrence-rule-monthly-weekpos + True + Monday Tuesday Wednesday Thursday @@ -1418,131 +1431,301 @@ Friday Saturday Sunday - 0 - - 0 - False - False - + 0 + + 0 + False + False + + - - - Placeholder + + Placeholder + - - - - GtkHBox - hbox19 - False - 0 - - 0 - False - True - - GtkLabel - label36 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 + GtkHBox + hbox19 + False + 0 0 False - False + True + + + GtkLabel + label36 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkSpinButton + recurrence-rule-monthly-every-n-months + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 1 + 1 + 100 + 1 + 10 + 10 + + 0 + False + True + + + + + GtkLabel + label37 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + 0 + False + False + + + + + + GtkLabel + Notebook:tab + label26 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + GtkVBox + vbox11 + False + 0 - GtkSpinButton - recurrence-rule-monthly-every-n-months - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 1 - 1 - 100 - 1 - 10 - 10 + GtkHBox + hbox20 + False + 0 0 False True + + + GtkLabel + label38 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkSpinButton + recurrence-rule-yearly-every-n-years + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 1 + 0 + 100 + 1 + 10 + 10 + + 0 + False + True + + + + + GtkLabel + label39 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + 0 + False + False + + + + + + GtkLabel + Notebook:tab + label27 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + + + + GtkHBox + hbox8 + False + 0 + + 0 + False + True + + + + GtkFrame + frame9 + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + False + True + + + + GtkVBox + vbox5 + True + 0 + + + GtkRadioButton + recurrence-ending-date-repeat-forever + True + + False + True + recurrence_ending_date + + 0 + False + False + + + + + GtkHBox + hbox12 + False + 0 + + 0 + False + True + - GtkLabel - label37 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 + GtkRadioButton + recurrence-ending-date-end-on + True + + False + True + recurrence_ending_date 0 False False - - - - - GtkLabel - Notebook:tab - label26 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - GtkVBox - vbox11 - False - 0 + + Custom + recurrence-ending-date-end-on-date + 100 + make_date_edit + 0 + 0 + Sat, 13 May 2000 18:02:55 GMT + + 0 + False + True + + + GtkHBox - hbox20 + hbox10 False 0 0 - False + True True - GtkLabel - label38 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 + GtkRadioButton + recurrence-ending-date-end-after + True + + False + True + recurrence_ending_date 0 False @@ -1552,7 +1735,7 @@ Sunday GtkSpinButton - recurrence-rule-yearly-every-n-years + recurrence-ending-date-end-after-count True 1 0 @@ -1560,7 +1743,7 @@ Sunday GTK_UPDATE_ALWAYS False False - 1 + 2 0 100 1 @@ -1575,8 +1758,8 @@ Sunday GtkLabel - label39 - + label28 + GTK_JUSTIFY_CENTER False 0.5 @@ -1591,303 +1774,134 @@ Sunday - - - GtkLabel - Notebook:tab - label27 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - - - GtkHBox - hbox8 - False - 0 - - 0 - False - True - - - - GtkFrame - frame9 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - False - True - - GtkVBox - vbox5 - True - 0 - - - GtkRadioButton - recurrence-ending-date-repeat-forever - True - - False - True - recurrence_ending_date - - 0 - False - False - - + GtkFrame + frame10 + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + True + True + - GtkHBox - hbox12 + GtkVBox + vbox12 False 0 - - 0 - False - True - - - - GtkRadioButton - recurrence-ending-date-end-on - True - - False - True - recurrence_ending_date - - 0 - False - False - - Custom - recurrence-ending-date-end-on-date - 100 + recurrence-exceptions-date make_date_edit 0 0 - Sat, 13 May 2000 18:02:55 GMT - - 0 - False - True - - - - - - GtkHBox - hbox10 - False - 0 - - 0 - True - True - - - - GtkRadioButton - recurrence-ending-date-end-after - True - - False - True - recurrence_ending_date - - 0 - False - False - - - - - GtkSpinButton - recurrence-ending-date-end-after-count - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 2 - 0 - 100 - 1 - 10 - 10 + Tue, 16 May 2000 01:42:29 GMT 0 - False + True True - GtkLabel - label28 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - - - - - - - - GtkFrame - frame10 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkVBox - vbox12 - False - 0 - - - Custom - recurrence-exceptions-date - make_date_edit - 0 - 0 - Tue, 16 May 2000 01:42:29 GMT - - 0 - True - True - - - - - GtkHBox - hbox21 - False - 0 - - 0 - True - True - - - - GtkVBox - vbox13 + GtkHBox + hbox21 False 0 0 - False + True True - GtkButton - recurrence-exceptions-add - True - + GtkVBox + vbox13 + False + 0 0 False - False + True - - - GtkButton - recurrence-exceptions-change - True - - - 0 - False - False - + + GtkButton + recurrence-exceptions-add + True + + + 0 + False + False + + + + + GtkButton + recurrence-exceptions-change + True + + + 0 + False + False + + + + + GtkButton + recurrence-exceptions-delete + True + + + 0 + False + False + + - GtkButton - recurrence-exceptions-delete - True - + GtkScrolledWindow + scrolledwindow2 + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_UPDATE_CONTINUOUS + GTK_UPDATE_CONTINUOUS 0 - False - False + True + True - - - - - GtkScrolledWindow - scrolledwindow2 - GTK_POLICY_ALWAYS - GTK_POLICY_ALWAYS - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - - 0 - True - True - - - - GtkCList - recurrence-exceptions-list - True - 1 - 80 - GTK_SELECTION_SINGLE - False - GTK_SHADOW_IN - GtkLabel - CList:title - label40 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 + GtkCList + recurrence-exceptions-list + True + 1 + 80 + GTK_SELECTION_SINGLE + False + GTK_SHADOW_IN + + + GtkLabel + CList:title + label40 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + @@ -1895,21 +1909,34 @@ Sunday - - - GtkLabel - Notebook:tab - label12 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 + + GtkLabel + Notebook:tab + label12 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + GnomeAppBar + GnomeApp:appbar + appbar2 + True + True + + 0 + True + True + + diff --git a/calendar/gui/event-editor-dialog.glade.h b/calendar/gui/event-editor-dialog.glade.h index 6117bfe22f..d4712e6de6 100644 --- a/calendar/gui/event-editor-dialog.glade.h +++ b/calendar/gui/event-editor-dialog.glade.h @@ -4,7 +4,7 @@ * DO NOT compile it as part of your application. */ -gchar *s = N_("window1"); +gchar *s = N_("event-editor-dialog"); gchar *s = N_("_Owner:"); gchar *s = N_("_Summary:"); gchar *s = N_("Time"); diff --git a/calendar/gui/event-editor.c b/calendar/gui/event-editor.c index 5082db36cc..38ed9ad070 100644 --- a/calendar/gui/event-editor.c +++ b/calendar/gui/event-editor.c @@ -34,9 +34,6 @@ typedef struct { /* Glade XML data */ GladeXML *xml; - /* Calendar this editor is associated to */ - GnomeCalendar *gcal; - /* UI handler */ BonoboUIHandler *uih; @@ -47,6 +44,8 @@ typedef struct { /* Widgets from the Glade file */ + GtkWidget *app; + GtkWidget *general_owner; GtkWidget *general_summary; @@ -126,7 +125,7 @@ static void event_editor_class_init (EventEditorClass *class); static void event_editor_init (EventEditor *ee); static void event_editor_destroy (GtkObject *object); -static GnomeAppClass *parent_class; +static GtkObjectClass *parent_class; extern int day_begin, day_end; extern char *user_name; @@ -175,7 +174,7 @@ event_editor_get_type (void) (GtkClassInitFunc) NULL }; - event_editor_type = gtk_type_unique (gnome_app_get_type (), &event_editor_info); + event_editor_type = gtk_type_unique (GTK_TYPE_OBJECT, &event_editor_info); } return event_editor_type; @@ -189,7 +188,7 @@ event_editor_class_init (EventEditorClass *class) object_class = (GtkObjectClass *) class; - parent_class = gtk_type_class (gnome_app_get_type ()); + parent_class = gtk_type_class (GTK_TYPE_OBJECT); event_editor_signals[ICAL_OBJECT_RELEASED] = gtk_signal_new ("ical_object_released", @@ -235,14 +234,21 @@ event_editor_destroy (GtkObject *object) priv->ico = NULL; } + if (priv->uih) { + bonobo_object_unref (BONOBO_OBJECT (priv->uih)); + priv->uih = NULL; + } + + if (priv->app) { + gtk_widget_destroy (priv->app); + priv->app = NULL; + } + if (priv->xml) { gtk_object_unref (GTK_OBJECT (priv->xml)); priv->xml = NULL; } - bonobo_object_unref (BONOBO_OBJECT (priv->uih)); - priv->uih = NULL; - if (GTK_OBJECT_CLASS (parent_class)->destroy) (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } @@ -290,6 +296,8 @@ get_widgets (EventEditor *ee) #define GW(name) glade_xml_get_widget (priv->xml, name) + priv->app = GW ("event-editor-dialog"); + priv->general_owner = GW ("general-owner"); priv->general_summary = GW ("general-summary"); @@ -1032,49 +1040,44 @@ create_toolbar (EventEditor *ee) EventEditorPrivate *priv; BonoboUIHandlerToolbarItem *list; GnomeDockItem *dock_item; - GtkWidget *child; + GtkWidget *toolbar_child; priv = ee->priv; bonobo_ui_handler_create_toolbar (priv->uih, "Toolbar"); - list = bonobo_ui_handler_toolbar_parse_uiinfo_list_with_data (toolbar, ee); - bonobo_ui_handler_toolbar_add_list (priv->uih, "/Toolbar", list); - - /* Turn off labels as GtkToolbar sucks */ + /* Fetch the toolbar. What a pain in the ass. */ - dock_item = gnome_app_get_dock_item_by_name (GNOME_APP (ee), GNOME_APP_TOOLBAR_NAME); + dock_item = gnome_app_get_dock_item_by_name (GNOME_APP (priv->app), GNOME_APP_TOOLBAR_NAME); g_assert (dock_item != NULL); - child = gnome_dock_item_get_child (dock_item); - g_assert (child != NULL && GTK_IS_TOOLBAR (child)); + toolbar_child = gnome_dock_item_get_child (dock_item); + g_assert (toolbar_child != NULL && GTK_IS_TOOLBAR (toolbar_child)); + + /* Turn off labels as GtkToolbar sucks */ + gtk_toolbar_set_style (GTK_TOOLBAR (toolbar_child), GTK_TOOLBAR_ICONS); - gtk_toolbar_set_style (GTK_TOOLBAR (child), GTK_TOOLBAR_ICONS); + list = bonobo_ui_handler_toolbar_parse_uiinfo_list_with_data (toolbar, ee); + bonobo_ui_handler_toolbar_add_list (priv->uih, "/Toolbar", list); } /** * event_editor_construct: * @ee: An event editor. - * @gcal: Calendar that this event editor will operate on. * - * Constructs an event editor by binding it to the specified calendar and creating - * its widgets. + * Constructs an event editor by loading its Glade data. * * Return value: The same object as @ee, or NULL if the widgets could not be * created. In the latter case, the event editor will automatically be * destroyed. **/ -GtkWidget * -event_editor_construct (EventEditor *ee, GnomeCalendar *gcal) +EventEditor * +event_editor_construct (EventEditor *ee) { EventEditorPrivate *priv; - GtkWidget *toplevel; - GtkWidget *contents; g_return_val_if_fail (ee != NULL, NULL); g_return_val_if_fail (IS_EVENT_EDITOR (ee), NULL); - g_return_val_if_fail (gcal != NULL, NULL); - g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL); priv = ee->priv; @@ -1086,15 +1089,6 @@ event_editor_construct (EventEditor *ee, GnomeCalendar *gcal) goto error; } - toplevel = glade_xml_get_widget (priv->xml, "event-editor-dialog"); - contents = glade_xml_get_widget (priv->xml, "dialog-contents"); - if (!(toplevel && contents)) { - g_message ("event_editor_construct(): Could not find the contents in the XML file!"); - goto error; - } - - priv->gcal = gcal; - if (!get_widgets (ee)) { g_message ("event_editor_construct(): Could not find all widgets in the XML file!"); goto error; @@ -1102,32 +1096,24 @@ event_editor_construct (EventEditor *ee, GnomeCalendar *gcal) init_widgets (ee); - gtk_object_ref (GTK_OBJECT (contents)); - gtk_container_remove (GTK_CONTAINER (toplevel), GTK_WIDGET (contents)); - gtk_widget_destroy (GTK_WIDGET (toplevel)); - /* Construct the app */ - gnome_app_construct (GNOME_APP (ee), "event-editor", N_("Edit Appointment")); - priv->uih = bonobo_ui_handler_new (); if (!priv->uih) { g_message ("event_editor_construct(): Could not create the UI handler"); goto error; } - bonobo_ui_handler_set_app (priv->uih, GNOME_APP (ee)); + bonobo_ui_handler_set_app (priv->uih, GNOME_APP (priv->app)); create_menu (ee); create_toolbar (ee); - /* Set the contents */ + /* Show the dialog */ - gnome_app_set_contents (GNOME_APP (ee), contents); - gtk_widget_show (contents); - gtk_object_unref (GTK_OBJECT (contents)); + gtk_widget_show (priv->app); - return GTK_WIDGET (ee); + return ee; error: @@ -1137,23 +1123,19 @@ event_editor_construct (EventEditor *ee, GnomeCalendar *gcal) /** * event_editor_new: - * @gcal: Calendar that this event editor will operate on. * * Creates a new event editor dialog. * * Return value: A newly-created event editor dialog, or NULL if the event * editor could not be created. **/ -GtkWidget * -event_editor_new (GnomeCalendar *gcal) +EventEditor * +event_editor_new (void) { - GtkWidget *ee; - - g_return_val_if_fail (gcal != NULL, NULL); - g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL); + EventEditor *ee; - ee = GTK_WIDGET (gtk_type_new (TYPE_EVENT_EDITOR)); - return event_editor_construct (EVENT_EDITOR (ee), gcal); + ee = EVENT_EDITOR (gtk_type_new (TYPE_EVENT_EDITOR)); + return event_editor_construct (EVENT_EDITOR (ee)); } /** @@ -1188,29 +1170,39 @@ event_editor_set_ical_object (EventEditor *ee, iCalObject *ico) priv->ico = ical_object_duplicate (ico); title = make_title_from_ico (priv->ico); - gtk_window_set_title (GTK_WINDOW (ee), title); + gtk_window_set_title (GTK_WINDOW (priv->app), title); g_free (title); fill_widgets (ee); } -#if 0 -/* FIXME: put this logic in whatever code calls the event editor with a new - * iCalObject. - */ +/* Brings attention to a window by raising it and giving it focus */ static void -fill_in_dialog_from_defaults (EventEditorDialog *dialog) +raise_and_focus (GtkWidget *widget) { - time_t now = time (NULL); - time_t soon = time_add_minutes (now, 30); + g_assert (GTK_WIDGET_REALIZED (widget)); + gdk_window_show (widget->window); + gtk_widget_grab_focus (widget); +} - store_to_editable (dialog->gui, "general-owner", "?"); +/** + * event_editor_focus: + * @ee: An event editor. + * + * Makes sure an event editor is shown, on top of other windows, and focused. + **/ +void +event_editor_focus (EventEditor *ee) +{ + EventEditorPrivate *priv; + + g_return_if_fail (ee != NULL); + g_return_if_fail (IS_EVENT_EDITOR (ee)); - /* start and end time */ - store_to_gnome_dateedit (dialog->gui, "start-time", now); - store_to_gnome_dateedit (dialog->gui, "end-time", soon); + priv = ee->priv; + gtk_widget_show_now (priv->app); + raise_and_focus (priv->app); } -#endif static void free_exdate (iCalObject *ico) @@ -1412,6 +1404,7 @@ dialog_to_ical_object (EventEditor *ee) } } +#if 0 static void ee_ok (GtkWidget *widget, EventEditor *ee) { @@ -1441,6 +1434,7 @@ ee_cancel (GtkWidget *widget, EventEditor *ee) priv->ico = NULL; } } +#endif static void alarm_toggle (GtkWidget *toggle, EventEditor *ee) diff --git a/calendar/gui/event-editor.h b/calendar/gui/event-editor.h index 401f2142e2..a1d50a0dff 100644 --- a/calendar/gui/event-editor.h +++ b/calendar/gui/event-editor.h @@ -25,7 +25,7 @@ #define __EVENT_EDITOR_DIALOG_H__ #include -#include +#include #include "gnome-cal.h" @@ -41,14 +41,14 @@ typedef struct _EventEditor EventEditor; typedef struct _EventEditorClass EventEditorClass; struct _EventEditor { - GnomeApp app; + GtkObject object; /* Private data */ gpointer priv; }; struct _EventEditorClass { - GnomeAppClass parent_class; + GtkObjectClass parent_class; /* Notification signals */ @@ -57,12 +57,14 @@ struct _EventEditorClass { GtkType event_editor_get_type (void); -GtkWidget *event_editor_construct (EventEditor *ee, GnomeCalendar *gcal); +EventEditor *event_editor_construct (EventEditor *ee); -GtkWidget *event_editor_new (GnomeCalendar *gcal); +EventEditor *event_editor_new (void); void event_editor_set_ical_object (EventEditor *ee, iCalObject *ico); +void event_editor_focus (EventEditor *ee); + #if 0 /* Convenience function to create and show a new event editor for an * event that goes from day_begin to day_end of the specified day. diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index e1e366885f..460e0151d6 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1307,15 +1307,6 @@ gnome_calendar_set_selected_time_range (GnomeCalendar *gcal, gnome_calendar_update_gtk_calendar (gcal); } -/* Brings attention to a window by raising it and giving it focus */ -static void -raise_and_focus (GtkWidget *widget) -{ - g_assert (GTK_WIDGET_REALIZED (widget)); - gdk_window_show (widget->window); - gtk_widget_grab_focus (widget); -} - /* Callback used when an event editor finishes editing an object */ static void ical_object_released_cb (EventEditor *ee, const char *uid, gpointer data) @@ -1339,7 +1330,7 @@ ical_object_released_cb (EventEditor *ee, const char *uid, gpointer data) void gnome_calendar_edit_object (GnomeCalendar *gcal, iCalObject *ico) { - GtkWidget *ee; + EventEditor *ee; g_return_if_fail (gcal != NULL); g_return_if_fail (GNOME_IS_CALENDAR (gcal)); @@ -1348,7 +1339,7 @@ gnome_calendar_edit_object (GnomeCalendar *gcal, iCalObject *ico) ee = g_hash_table_lookup (gcal->object_editor_hash, ico->uid); if (!ee) { - ee = event_editor_new (gcal); + ee = event_editor_new (); if (!ee) { g_message ("gnome_calendar_edit_object(): Could not create the event editor"); return; @@ -1365,8 +1356,7 @@ gnome_calendar_edit_object (GnomeCalendar *gcal, iCalObject *ico) event_editor_set_ical_object (EVENT_EDITOR (ee), ico); } - gtk_widget_show_now (ee); - raise_and_focus (ee); + event_editor_focus (ee); } /* Returns the selected time range for the current view. Note that this may be -- cgit