diff options
author | Seth Alves <alves@src.gnome.org> | 2000-05-16 00:51:36 +0800 |
---|---|---|
committer | Seth Alves <alves@src.gnome.org> | 2000-05-16 00:51:36 +0800 |
commit | 98317c656590737ced646d6fb4bd65e527c7e178 (patch) | |
tree | ea05e418a95b8ee4b5e8b27e6f4c0b11bf7bc2dd | |
parent | 71902b570c3e5ce5e6629b8353d3d404119e289b (diff) | |
download | gsoc2013-evolution-98317c656590737ced646d6fb4bd65e527c7e178.tar gsoc2013-evolution-98317c656590737ced646d6fb4bd65e527c7e178.tar.gz gsoc2013-evolution-98317c656590737ced646d6fb4bd65e527c7e178.tar.bz2 gsoc2013-evolution-98317c656590737ced646d6fb4bd65e527c7e178.tar.lz gsoc2013-evolution-98317c656590737ced646d6fb4bd65e527c7e178.tar.xz gsoc2013-evolution-98317c656590737ced646d6fb4bd65e527c7e178.tar.zst gsoc2013-evolution-98317c656590737ced646d6fb4bd65e527c7e178.zip |
gladeified replacement for eventedit.c
* gui/event-editor.[ch]: gladeified replacement for eventedit.c
* gui/event-editor-utils.[ch]: utilities used by event-editor.c
* gui/event-editor-dialog.glade: glade file used by event-editor.c
svn path=/trunk/; revision=3046
-rw-r--r-- | calendar/gui/Makefile.am | 22 | ||||
-rw-r--r-- | calendar/gui/e-day-view.c | 4 | ||||
-rw-r--r-- | calendar/gui/event-editor-dialog.glade | 1943 | ||||
-rw-r--r-- | calendar/gui/event-editor-utils.c | 228 | ||||
-rw-r--r-- | calendar/gui/event-editor-utils.h | 22 | ||||
-rw-r--r-- | calendar/gui/event-editor.c | 438 | ||||
-rw-r--r-- | calendar/gui/event-editor.h | 41 | ||||
-rw-r--r-- | calendar/gui/eventedit.c | 3 | ||||
-rw-r--r-- | calendar/gui/evolution-calendar-control.c | 8 | ||||
-rw-r--r-- | calendar/gui/prop.c | 8 |
10 files changed, 2709 insertions, 8 deletions
diff --git a/calendar/gui/Makefile.am b/calendar/gui/Makefile.am index cffe6aaa22..3d13df9148 100644 --- a/calendar/gui/Makefile.am +++ b/calendar/gui/Makefile.am @@ -6,6 +6,10 @@ help_base = $(datadir)/gnome/help/cal # calendar-pilot-sync #endif + +CPPFLAGS = \ + -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" + INCLUDES = \ -DG_LOG_DOMAIN=\"calendar-gui\" \ -I$(top_srcdir) \ @@ -15,6 +19,7 @@ INCLUDES = \ $(BONOBO_VFS_GNOME_CFLAGS) \ $(GNOME_CONDUIT_INCLUDEDIR) \ $(PISOCK_INCLUDEDIR) \ + -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" LINK_FLAGS = \ @@ -27,6 +32,9 @@ LINK_FLAGS = \ $(top_builddir)/libversit/libversit.la \ $(top_builddir)/libical/src/libical/libical.la +gladedir = $(datadir)/evolution/glade +glade_DATA = event-editor-dialog.glade + bin_PROGRAMS = evolution-calendar evolution_calendar_SOURCES = \ @@ -48,8 +56,8 @@ evolution_calendar_SOURCES = \ e-week-view-titles-item.h \ e-week-view.c \ e-week-view.h \ - eventedit.c \ - eventedit.h \ + event-editor-utils.c \ + event-editor-utils.h \ getdate.y \ gncal-todo.c \ gncal-todo.h \ @@ -70,8 +78,18 @@ evolution_calendar_SOURCES = \ year-view.h \ calendar-commands.c \ calendar-commands.h \ + event-editor.c \ + event-editor.h \ evolution-calendar-control.c +# eventedit.c \ +# eventedit.h \ + + + + + + evolution_calendar_LDADD = \ $(EXTRA_GNOME_LIBS) \ $(BONOBO_HTML_GNOME_LIBS) \ diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index 15b0ea805f..e21a492c71 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -2318,7 +2318,7 @@ e_day_view_on_new_appointment (GtkWidget *widget, gpointer data) &ico->dtend); event_editor = event_editor_new (day_view->calendar, ico); ical_object_unref (ico); - gtk_widget_show (event_editor); + //gtk_widget_show (event_editor); } @@ -2342,7 +2342,7 @@ e_day_view_on_edit_appointment (GtkWidget *widget, gpointer data) event_editor = event_editor_new (day_view->calendar, ico); ical_object_unref (ico); - gtk_widget_show (event_editor); + //gtk_widget_show (event_editor); } diff --git a/calendar/gui/event-editor-dialog.glade b/calendar/gui/event-editor-dialog.glade new file mode 100644 index 0000000000..72bb7bbd98 --- /dev/null +++ b/calendar/gui/event-editor-dialog.glade @@ -0,0 +1,1943 @@ +<?xml version="1.0"?> +<GTK-Interface> + +<project> + <name>event-editor-dialog</name> + <program_name>event-editor-dialog</program_name> + <directory></directory> + <source_directory>.</source_directory> + <pixmaps_directory>pixmaps</pixmaps_directory> + <language>C</language> + <gnome_support>True</gnome_support> + <gettext_support>True</gettext_support> + <output_main_file>False</output_main_file> + <output_support_files>False</output_support_files> + <output_build_files>False</output_build_files> + <output_translatable_strings>True</output_translatable_strings> + <translatable_strings_file>event-editor-strings</translatable_strings_file> +</project> + +<widget> + <class>GnomeDialog</class> + <name>event-editor-dialog</name> + <title>Edit appointment</title> + <type>GTK_WINDOW_DIALOG</type> + <position>GTK_WIN_POS_NONE</position> + <modal>False</modal> + <allow_shrink>False</allow_shrink> + <allow_grow>False</allow_grow> + <auto_shrink>False</auto_shrink> + <auto_close>False</auto_close> + <hide_on_close>False</hide_on_close> + + <widget> + <class>GtkVBox</class> + <child_name>GnomeDialog:vbox</child_name> + <name>dialog-vbox1</name> + <homogeneous>False</homogeneous> + <spacing>8</spacing> + <child> + <padding>4</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkHButtonBox</class> + <child_name>GnomeDialog:action_area</child_name> + <name>dialog-action_area1</name> + <layout_style>GTK_BUTTONBOX_END</layout_style> + <spacing>8</spacing> + <child_min_width>85</child_min_width> + <child_min_height>27</child_min_height> + <child_ipad_x>7</child_ipad_x> + <child_ipad_y>0</child_ipad_y> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + <pack>GTK_PACK_END</pack> + </child> + + <widget> + <class>GtkButton</class> + <name>button1</name> + <can_default>True</can_default> + <can_focus>True</can_focus> + <stock_button>GNOME_STOCK_BUTTON_OK</stock_button> + </widget> + + <widget> + <class>GtkButton</class> + <name>button2</name> + <can_default>True</can_default> + <can_focus>True</can_focus> + <stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button> + </widget> + + <widget> + <class>GtkButton</class> + <name>button3</name> + <can_default>True</can_default> + <can_focus>True</can_focus> + <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button> + </widget> + </widget> + + <widget> + <class>GtkNotebook</class> + <name>notebook2</name> + <can_focus>True</can_focus> + <show_tabs>True</show_tabs> + <show_border>True</show_border> + <tab_pos>GTK_POS_TOP</tab_pos> + <scrollable>False</scrollable> + <tab_hborder>2</tab_hborder> + <tab_vborder>2</tab_vborder> + <popup_enable>False</popup_enable> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkVBox</class> + <name>vbox2</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + + <widget> + <class>GtkHBox</class> + <name>hbox4</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkLabel</class> + <name>label13</name> + <label>Owner: </label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkEntry</class> + <name>general-owner</name> + <can_focus>True</can_focus> + <editable>True</editable> + <text_visible>True</text_visible> + <text_max_length>0</text_max_length> + <text></text> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + </widget> + </widget> + + <widget> + <class>GtkHBox</class> + <name>hbox5</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + + <widget> + <class>GtkLabel</class> + <name>label14</name> + <label>Summary:</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + </widget> + + <widget> + <class>GtkScrolledWindow</class> + <name>scrolledwindow1</name> + <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy> + <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy> + <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy> + <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + + <widget> + <class>GtkText</class> + <name>general-summary</name> + <can_focus>True</can_focus> + <editable>True</editable> + <text></text> + </widget> + </widget> + + <widget> + <class>GtkFrame</class> + <name>frame4</name> + <label>Time</label> + <label_xalign>0</label_xalign> + <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkTable</class> + <name>table3</name> + <rows>2</rows> + <columns>3</columns> + <homogeneous>False</homogeneous> + <row_spacing>0</row_spacing> + <column_spacing>0</column_spacing> + + <widget> + <class>GtkLabel</class> + <name>label15</name> + <label>Start time: </label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <left_attach>0</left_attach> + <right_attach>1</right_attach> + <top_attach>0</top_attach> + <bottom_attach>1</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>False</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>GtkLabel</class> + <name>label16</name> + <label>End time: </label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <left_attach>0</left_attach> + <right_attach>1</right_attach> + <top_attach>1</top_attach> + <bottom_attach>2</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>False</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>Custom</class> + <name>start-time</name> + <creation_function>make_date_edit</creation_function> + <string1></string1> + <string2></string2> + <int1>0</int1> + <int2>0</int2> + <last_modification_time>Fri, 12 May 2000 16:49:54 GMT</last_modification_time> + <child> + <left_attach>1</left_attach> + <right_attach>2</right_attach> + <top_attach>0</top_attach> + <bottom_attach>1</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>True</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>True</yfill> + </child> + </widget> + + <widget> + <class>Custom</class> + <name>end-time</name> + <creation_function>make_date_edit</creation_function> + <int1>0</int1> + <int2>0</int2> + <last_modification_time>Fri, 12 May 2000 16:50:00 GMT</last_modification_time> + <child> + <left_attach>1</left_attach> + <right_attach>2</right_attach> + <top_attach>1</top_attach> + <bottom_attach>2</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>True</yfill> + </child> + </widget> + + <widget> + <class>GtkCheckButton</class> + <name>all-day-event</name> + <can_focus>True</can_focus> + <label>All day event</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <child> + <left_attach>2</left_attach> + <right_attach>3</right_attach> + <top_attach>0</top_attach> + <bottom_attach>1</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>False</xfill> + <yfill>False</yfill> + </child> + </widget> + </widget> + </widget> + + <widget> + <class>GtkFrame</class> + <name>frame6</name> + <label>Alarms</label> + <label_xalign>0</label_xalign> + <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkTable</class> + <name>table4</name> + <rows>4</rows> + <columns>5</columns> + <homogeneous>False</homogeneous> + <row_spacing>0</row_spacing> + <column_spacing>0</column_spacing> + + <widget> + <class>GtkSpinButton</class> + <name>alarm-display-amount</name> + <can_focus>True</can_focus> + <climb_rate>1</climb_rate> + <digits>0</digits> + <numeric>True</numeric> + <update_policy>GTK_UPDATE_ALWAYS</update_policy> + <snap>False</snap> + <wrap>False</wrap> + <value>0</value> + <lower>0</lower> + <upper>100</upper> + <step>1</step> + <page>10</page> + <page_size>10</page_size> + <child> + <left_attach>1</left_attach> + <right_attach>2</right_attach> + <top_attach>0</top_attach> + <bottom_attach>1</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>True</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>GtkSpinButton</class> + <name>alarm-audio-amount</name> + <can_focus>True</can_focus> + <climb_rate>1</climb_rate> + <digits>0</digits> + <numeric>False</numeric> + <update_policy>GTK_UPDATE_ALWAYS</update_policy> + <snap>False</snap> + <wrap>False</wrap> + <value>0</value> + <lower>0</lower> + <upper>100</upper> + <step>1</step> + <page>10</page> + <page_size>10</page_size> + <child> + <left_attach>1</left_attach> + <right_attach>2</right_attach> + <top_attach>1</top_attach> + <bottom_attach>2</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>True</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>GtkSpinButton</class> + <name>alarm-program-amount</name> + <can_focus>True</can_focus> + <climb_rate>1</climb_rate> + <digits>0</digits> + <numeric>False</numeric> + <update_policy>GTK_UPDATE_ALWAYS</update_policy> + <snap>False</snap> + <wrap>False</wrap> + <value>0</value> + <lower>0</lower> + <upper>100</upper> + <step>1</step> + <page>10</page> + <page_size>10</page_size> + <child> + <left_attach>1</left_attach> + <right_attach>2</right_attach> + <top_attach>2</top_attach> + <bottom_attach>3</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>True</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>GtkSpinButton</class> + <name>alarm-mail-amount</name> + <can_focus>True</can_focus> + <climb_rate>1</climb_rate> + <digits>0</digits> + <numeric>False</numeric> + <update_policy>GTK_UPDATE_ALWAYS</update_policy> + <snap>False</snap> + <wrap>False</wrap> + <value>0</value> + <lower>0</lower> + <upper>100</upper> + <step>1</step> + <page>10</page> + <page_size>10</page_size> + <child> + <left_attach>1</left_attach> + <right_attach>2</right_attach> + <top_attach>3</top_attach> + <bottom_attach>4</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>True</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>GtkOptionMenu</class> + <name>alarm-display-unit</name> + <can_focus>True</can_focus> + <items>Minutes +Hours +Days +</items> + <initial_choice>0</initial_choice> + <child> + <left_attach>2</left_attach> + <right_attach>3</right_attach> + <top_attach>0</top_attach> + <bottom_attach>1</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>False</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>GtkOptionMenu</class> + <name>alarm-audio-unit</name> + <can_focus>True</can_focus> + <items>Minutes +Hours +Days +</items> + <initial_choice>0</initial_choice> + <child> + <left_attach>2</left_attach> + <right_attach>3</right_attach> + <top_attach>1</top_attach> + <bottom_attach>2</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>False</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>GtkOptionMenu</class> + <name>alarm-program-unit</name> + <can_focus>True</can_focus> + <items>Minutes +Hours +Days +</items> + <initial_choice>0</initial_choice> + <child> + <left_attach>2</left_attach> + <right_attach>3</right_attach> + <top_attach>2</top_attach> + <bottom_attach>3</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>False</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>GtkOptionMenu</class> + <name>alarm-mail-unit</name> + <can_focus>True</can_focus> + <items>Minutes +Hours +Days +</items> + <initial_choice>0</initial_choice> + <child> + <left_attach>2</left_attach> + <right_attach>3</right_attach> + <top_attach>3</top_attach> + <bottom_attach>4</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>False</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>GtkEntry</class> + <name>mail-to</name> + <can_focus>True</can_focus> + <editable>True</editable> + <text_visible>True</text_visible> + <text_max_length>0</text_max_length> + <text></text> + <child> + <left_attach>4</left_attach> + <right_attach>5</right_attach> + <top_attach>3</top_attach> + <bottom_attach>4</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>True</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>GnomeFileEntry</class> + <name>fileentry1</name> + <max_saved>10</max_saved> + <directory>False</directory> + <modal>False</modal> + <child> + <left_attach>4</left_attach> + <right_attach>5</right_attach> + <top_attach>2</top_attach> + <bottom_attach>3</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>True</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + + <widget> + <class>GtkEntry</class> + <child_name>GnomeEntry:entry</child_name> + <name>run-program</name> + <can_focus>True</can_focus> + <editable>True</editable> + <text_visible>True</text_visible> + <text_max_length>0</text_max_length> + <text></text> + </widget> + </widget> + + <widget> + <class>GtkCheckButton</class> + <name>alarm-display</name> + <can_focus>True</can_focus> + <label>Display</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <child> + <left_attach>0</left_attach> + <right_attach>1</right_attach> + <top_attach>0</top_attach> + <bottom_attach>1</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>GtkCheckButton</class> + <name>alarm-audio</name> + <can_focus>True</can_focus> + <label>Audio</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <child> + <left_attach>0</left_attach> + <right_attach>1</right_attach> + <top_attach>1</top_attach> + <bottom_attach>2</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>GtkCheckButton</class> + <name>alarm-program</name> + <can_focus>True</can_focus> + <label>Program</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <child> + <left_attach>0</left_attach> + <right_attach>1</right_attach> + <top_attach>2</top_attach> + <bottom_attach>3</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>GtkCheckButton</class> + <name>alarm-mail</name> + <can_focus>True</can_focus> + <label>Mail</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <child> + <left_attach>0</left_attach> + <right_attach>1</right_attach> + <top_attach>3</top_attach> + <bottom_attach>4</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>GtkLabel</class> + <name>label18</name> + <label>Mail to</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <left_attach>3</left_attach> + <right_attach>4</right_attach> + <top_attach>3</top_attach> + <bottom_attach>4</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>GtkLabel</class> + <name>label17</name> + <label>Run program</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <left_attach>3</left_attach> + <right_attach>4</right_attach> + <top_attach>2</top_attach> + <bottom_attach>3</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + </widget> + </widget> + </widget> + + <widget> + <class>GtkFrame</class> + <name>frame5</name> + <label>Classification</label> + <label_xalign>0</label_xalign> + <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkHBox</class> + <name>hbox6</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + + <widget> + <class>GtkRadioButton</class> + <name>classification-public</name> + <can_focus>True</can_focus> + <label>Public</label> + <active>True</active> + <draw_indicator>True</draw_indicator> + <group>classification_radio_group</group> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkRadioButton</class> + <name>classification-private</name> + <can_focus>True</can_focus> + <label>Private</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <group>classification_radio_group</group> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkRadioButton</class> + <name>classification-confidential</name> + <can_focus>True</can_focus> + <label>Confidential</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <group>classification_radio_group</group> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + </widget> + </widget> + </widget> + + <widget> + <class>GtkLabel</class> + <child_name>Notebook:tab</child_name> + <name>label11</name> + <label>General</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + </widget> + + <widget> + <class>GtkVBox</class> + <name>vbox3</name> + <border_width>4</border_width> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + + <widget> + <class>GtkFrame</class> + <name>frame8</name> + <label>Recurrence rule</label> + <label_xalign>0</label_xalign> + <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkHBox</class> + <name>hbox7</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + + <widget> + <class>GtkVBox</class> + <name>vbox4</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + + <widget> + <class>GtkRadioButton</class> + <name>recurrence-rule-none</name> + <can_focus>True</can_focus> + <label>None</label> + <active>True</active> + <draw_indicator>True</draw_indicator> + <group>recurrence_rule_group</group> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkRadioButton</class> + <name>recurrence-rule-daily</name> + <can_focus>True</can_focus> + <label>Daily</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <group>recurrence_rule_group</group> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkRadioButton</class> + <name>recurrence-rule-weekly</name> + <can_focus>True</can_focus> + <label>Weekly</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <group>recurrence_rule_group</group> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkRadioButton</class> + <name>recurrence-rule-monthly</name> + <can_focus>True</can_focus> + <label>Monthly</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <group>recurrence_rule_group</group> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkRadioButton</class> + <name>recurrence-rule-yearly</name> + <can_focus>True</can_focus> + <label>Yearly</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <group>recurrence_rule_group</group> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + </widget> + + <widget> + <class>GtkVSeparator</class> + <name>vseparator1</name> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + </child> + </widget> + + <widget> + <class>GtkNotebook</class> + <name>recurrence-rule-notebook</name> + <can_focus>True</can_focus> + <show_tabs>True</show_tabs> + <show_border>True</show_border> + <tab_pos>GTK_POS_TOP</tab_pos> + <scrollable>False</scrollable> + <tab_hborder>2</tab_hborder> + <tab_vborder>2</tab_vborder> + <popup_enable>False</popup_enable> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>Placeholder</class> + </widget> + + <widget> + <class>GtkLabel</class> + <child_name>Notebook:tab</child_name> + <name>label23</name> + <label>label23</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + </widget> + + <widget> + <class>GtkAlignment</class> + <name>alignment1</name> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xscale>1</xscale> + <yscale>1</yscale> + + <widget> + <class>GtkVBox</class> + <name>vbox7</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + + <widget> + <class>GtkHBox</class> + <name>hbox13</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkLabel</class> + <name>label31</name> + <label>Every </label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkSpinButton</class> + <name>recurrence-rule-daily-days</name> + <can_focus>True</can_focus> + <climb_rate>1</climb_rate> + <digits>0</digits> + <numeric>False</numeric> + <update_policy>GTK_UPDATE_ALWAYS</update_policy> + <snap>False</snap> + <wrap>False</wrap> + <value>1</value> + <lower>0</lower> + <upper>100</upper> + <step>1</step> + <page>10</page> + <page_size>10</page_size> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + </child> + </widget> + + <widget> + <class>GtkLabel</class> + <name>label32</name> + <label>day(s)</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + </widget> + </widget> + </widget> + + <widget> + <class>GtkLabel</class> + <child_name>Notebook:tab</child_name> + <name>label24</name> + <label>label24</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + </widget> + + <widget> + <class>GtkVBox</class> + <name>vbox8</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + + <widget> + <class>GtkHBox</class> + <name>hbox14</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkLabel</class> + <name>label33</name> + <label>Every </label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkSpinButton</class> + <name>recurrence-rule-weekly-weeks</name> + <can_focus>True</can_focus> + <climb_rate>1</climb_rate> + <digits>0</digits> + <numeric>False</numeric> + <update_policy>GTK_UPDATE_ALWAYS</update_policy> + <snap>False</snap> + <wrap>False</wrap> + <value>1</value> + <lower>0</lower> + <upper>100</upper> + <step>1</step> + <page>10</page> + <page_size>10</page_size> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + </child> + </widget> + + <widget> + <class>GtkLabel</class> + <name>label34</name> + <label>week(s)</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + </widget> + + <widget> + <class>GtkHBox</class> + <name>hbox15</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkCheckButton</class> + <name>recurrence-rule-weekly-mon</name> + <can_focus>True</can_focus> + <label>Mon</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkCheckButton</class> + <name>recurrence-rule-weekly-tue</name> + <can_focus>True</can_focus> + <label>Tue</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkCheckButton</class> + <name>recurrence-rule-weekly-wed</name> + <can_focus>True</can_focus> + <label>Wed</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkCheckButton</class> + <name>recurrence-rule-weekly-thu</name> + <can_focus>True</can_focus> + <label>Thu</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkCheckButton</class> + <name>recurrence-rule-weekly-fri</name> + <can_focus>True</can_focus> + <label>Fri</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkCheckButton</class> + <name>recurrence-rule-weekly-sat</name> + <can_focus>True</can_focus> + <label>Sat</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkCheckButton</class> + <name>recurrence-rule-weekly-sun</name> + <can_focus>True</can_focus> + <label>Sun</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + </widget> + </widget> + + <widget> + <class>GtkLabel</class> + <child_name>Notebook:tab</child_name> + <name>label25</name> + <label>label25</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + </widget> + + <widget> + <class>GtkHBox</class> + <name>hbox16</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + + <widget> + <class>GtkVBox</class> + <name>vbox9</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkVBox</class> + <name>vbox10</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkHBox</class> + <name>hbox17</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkRadioButton</class> + <name>recurrence-rule-monthly-on-day</name> + <can_focus>True</can_focus> + <label>Recur on the</label> + <active>True</active> + <draw_indicator>True</draw_indicator> + <group>recurrence_rule_monthly_group</group> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkSpinButton</class> + <name>recurrence-rule-monthly-day</name> + <can_focus>True</can_focus> + <climb_rate>1</climb_rate> + <digits>0</digits> + <numeric>False</numeric> + <update_policy>GTK_UPDATE_ALWAYS</update_policy> + <snap>False</snap> + <wrap>False</wrap> + <value>1</value> + <lower>0</lower> + <upper>100</upper> + <step>1</step> + <page>10</page> + <page_size>10</page_size> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + </child> + </widget> + + <widget> + <class>GtkLabel</class> + <name>label35</name> + <label>th day of the month</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + </widget> + + <widget> + <class>GtkHBox</class> + <name>hbox18</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + + <widget> + <class>GtkRadioButton</class> + <name>recurrence-rule-monthly-weekday</name> + <can_focus>True</can_focus> + <label>Recur on the</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <group>recurrence_rule_monthly_group</group> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkOptionMenu</class> + <name>recurrence-rule-monthly-week</name> + <can_focus>True</can_focus> + <items>1st +2nd +3rd +4th +5th +</items> + <initial_choice>0</initial_choice> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkOptionMenu</class> + <name>recurrence-rule-monthly-day</name> + <can_focus>True</can_focus> + <items>Monday +Tuesday +Wednesday +Thursday +Friday +Saturday +Sunday +</items> + <initial_choice>0</initial_choice> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + </widget> + </widget> + + <widget> + <class>Placeholder</class> + </widget> + </widget> + + <widget> + <class>GtkHBox</class> + <name>hbox19</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkLabel</class> + <name>label36</name> + <label>Every</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkSpinButton</class> + <name>recurrence-rule-monthly-every-n-months</name> + <can_focus>True</can_focus> + <climb_rate>1</climb_rate> + <digits>0</digits> + <numeric>False</numeric> + <update_policy>GTK_UPDATE_ALWAYS</update_policy> + <snap>False</snap> + <wrap>False</wrap> + <value>1</value> + <lower>1</lower> + <upper>100</upper> + <step>1</step> + <page>10</page> + <page_size>10</page_size> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + </child> + </widget> + + <widget> + <class>GtkLabel</class> + <name>label37</name> + <label>month(s)</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + </widget> + </widget> + + <widget> + <class>GtkLabel</class> + <child_name>Notebook:tab</child_name> + <name>label26</name> + <label>label26</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + </widget> + + <widget> + <class>GtkVBox</class> + <name>vbox11</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + + <widget> + <class>GtkHBox</class> + <name>hbox20</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkLabel</class> + <name>label38</name> + <label>Every </label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkSpinButton</class> + <name>recurrence-rule-yearly-every-n-years</name> + <can_focus>True</can_focus> + <climb_rate>1</climb_rate> + <digits>0</digits> + <numeric>False</numeric> + <update_policy>GTK_UPDATE_ALWAYS</update_policy> + <snap>False</snap> + <wrap>False</wrap> + <value>1</value> + <lower>0</lower> + <upper>100</upper> + <step>1</step> + <page>10</page> + <page_size>10</page_size> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + </child> + </widget> + + <widget> + <class>GtkLabel</class> + <name>label39</name> + <label>year(s)</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + </widget> + </widget> + + <widget> + <class>GtkLabel</class> + <child_name>Notebook:tab</child_name> + <name>label27</name> + <label>label27</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + </widget> + </widget> + </widget> + </widget> + + <widget> + <class>GtkHBox</class> + <name>hbox8</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkFrame</class> + <name>frame9</name> + <label>Ending date</label> + <label_xalign>0</label_xalign> + <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkVBox</class> + <name>vbox5</name> + <homogeneous>True</homogeneous> + <spacing>0</spacing> + + <widget> + <class>GtkRadioButton</class> + <name>recurrence-ending-date-repeat-forever</name> + <can_focus>True</can_focus> + <label>Repeat forever</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <group>recurrence_ending_date</group> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkHBox</class> + <name>hbox12</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkRadioButton</class> + <name>recurrence-ending-date-end-on</name> + <can_focus>True</can_focus> + <label>End on </label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <group>recurrence_ending_date</group> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>Custom</class> + <name>recurrence-ending-date-end-on-date</name> + <width>100</width> + <creation_function>make_date_edit</creation_function> + <int1>0</int1> + <int2>0</int2> + <last_modification_time>Sat, 13 May 2000 18:02:55 GMT</last_modification_time> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + </widget> + </widget> + + <widget> + <class>GtkHBox</class> + <name>hbox10</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkRadioButton</class> + <name>recurrence-ending-date-end-after</name> + <can_focus>True</can_focus> + <label>End after</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <group>recurrence_ending_date</group> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkSpinButton</class> + <name>recurrence-ending-date-end-after-count</name> + <can_focus>True</can_focus> + <climb_rate>1</climb_rate> + <digits>0</digits> + <numeric>False</numeric> + <update_policy>GTK_UPDATE_ALWAYS</update_policy> + <snap>False</snap> + <wrap>False</wrap> + <value>2</value> + <lower>0</lower> + <upper>100</upper> + <step>1</step> + <page>10</page> + <page_size>10</page_size> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + </child> + </widget> + + <widget> + <class>GtkLabel</class> + <name>label28</name> + <label>occurrence(s)</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + </widget> + </widget> + </widget> + + <widget> + <class>GtkFrame</class> + <name>frame10</name> + <label>Exceptions</label> + <label_xalign>0</label_xalign> + <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkHBox</class> + <name>hbox11</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + + <widget> + <class>GtkVBox</class> + <name>vbox6</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>Custom</class> + <name>recurrence-exceptions-date</name> + <creation_function>make_date_edit</creation_function> + <int1>0</int1> + <int2>0</int2> + <last_modification_time>Sat, 13 May 2000 18:04:39 GMT</last_modification_time> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + </widget> + + <widget> + <class>GtkButton</class> + <name>recurrence-exceptions-add</name> + <can_focus>True</can_focus> + <label>Add exception</label> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkButton</class> + <name>recurrence-exceptions-change</name> + <can_focus>True</can_focus> + <label>Change selected</label> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkButton</class> + <name>recurrence-exceptions-delete</name> + <can_focus>True</can_focus> + <label>Delete selected</label> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + </widget> + + <widget> + <class>GtkList</class> + <name>recurrence-exceptions-list</name> + <width>40</width> + <selection_mode>GTK_SELECTION_SINGLE</selection_mode> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + </widget> + </widget> + </widget> + </widget> + </widget> + + <widget> + <class>GtkLabel</class> + <child_name>Notebook:tab</child_name> + <name>label12</name> + <label>Recurrence</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + </widget> + </widget> + </widget> +</widget> + +</GTK-Interface> diff --git a/calendar/gui/event-editor-utils.c b/calendar/gui/event-editor-utils.c new file mode 100644 index 0000000000..8361a493c5 --- /dev/null +++ b/calendar/gui/event-editor-utils.c @@ -0,0 +1,228 @@ +#include <config.h> +#include <gnome.h> +#include <glade/glade.h> +#include <gui/event-editor-utils.h> + + +/***************/ +/*** storing ***/ +/***************/ + +void +store_to_editable (GladeXML *gui, char *widget_name, gchar *content) +{ + GtkWidget *widget = glade_xml_get_widget (gui, widget_name); + GtkEditable *editable = GTK_EDITABLE (widget); + int position = 0; + + if (! content) + return; + + gtk_editable_delete_text (editable, 0, -1); + gtk_editable_insert_text (editable, content, + strlen (content), &position); +} + + +void +store_to_toggle (GladeXML *gui, char *widget_name, gboolean content) +{ + GtkWidget *widget = glade_xml_get_widget (gui, widget_name); + GtkToggleButton *toggle = GTK_TOGGLE_BUTTON (widget); + gtk_toggle_button_set_active (toggle, content); +} + + +void +store_to_spin (GladeXML *gui, char *widget_name, gint content) +{ + GtkWidget *widget; + GtkSpinButton *spin; + + widget = glade_xml_get_widget (gui, widget_name); + spin = GTK_SPIN_BUTTON (widget); + gtk_spin_button_set_value (spin, (gfloat) content); +} + + +void +store_to_alarm_unit (GladeXML *gui, char *widget_name, enum AlarmUnit content) +{ + GtkWidget *widget; + GtkOptionMenu *option; + + widget = glade_xml_get_widget (gui, widget_name); + option = GTK_OPTION_MENU (widget); + + switch (content) { + case ALARM_MINUTES: + gtk_option_menu_set_history (option, 0); break; + case ALARM_HOURS: + gtk_option_menu_set_history (option, 1); break; + case ALARM_DAYS: + gtk_option_menu_set_history (option, 2); break; + } +} + + +void +store_to_option (GladeXML *gui, char *widget_name, gint content) +{ + GtkWidget *widget; + GtkOptionMenu *option; + + widget = glade_xml_get_widget (gui, widget_name); + option = GTK_OPTION_MENU (widget); + + gtk_option_menu_set_history (option, content); +} + + +void +store_to_gnome_dateedit (GladeXML *gui, char *widget_name, time_t content) +{ + GtkWidget *widget; + GnomeDateEdit *gde; + + widget = glade_xml_get_widget (gui, widget_name); + gde = GNOME_DATE_EDIT (widget); + gnome_date_edit_set_time (gde, content); +} + + + +/******************/ +/*** extracting ***/ +/******************/ + + +gchar *extract_from_editable (GladeXML *gui, char *widget_name) +{ + GtkWidget *widget; + GtkEditable *editable; + gchar *content; + + widget = glade_xml_get_widget (gui, widget_name); + editable = GTK_EDITABLE (widget); + content = gtk_editable_get_chars (editable, 0, -1); + return content; +} + + +gboolean extract_from_toggle (GladeXML *gui, char *widget_name) +{ + GtkWidget *widget; + GtkToggleButton *toggle; + gboolean content; + + widget = glade_xml_get_widget (gui, widget_name); + toggle = GTK_TOGGLE_BUTTON (widget); + content = gtk_toggle_button_get_active (toggle); + return content; +} + + +gint extract_from_spin (GladeXML *gui, char *widget_name) +{ + GtkWidget *widget; + GtkSpinButton *spin; + gint content; + + widget = glade_xml_get_widget (gui, widget_name); + spin = GTK_SPIN_BUTTON (widget); + content = gtk_spin_button_get_value_as_int (spin); + return content; +} + + +#if 0 +char *extract_from_option (GladeXML *gui, char *widget_name) +{ + GtkWidget *widget; + GtkOptionMenu *option; + GtkWidget *picked; + GtkMenu *menu; + GtkMenuItem *menu_item; + //GList *children; + GtkLabel *label; + char *content = NULL; + + widget = glade_xml_get_widget (gui, widget_name); + option = GTK_OPTION_MENU (widget); + picked = gtk_option_menu_get_menu (option); + menu = GTK_MENU (picked); + menu_item = GTK_MENU_ITEM (gtk_menu_get_active (menu)); + label = GTK_LABEL (GTK_BIN (menu_item)->child); + gtk_label_get (label, &content); + + return content; +} +#endif /* 0 */ + + +#if 0 +enum AlarmUnit +extract_from_alarm_unit (GladeXML *gui, char *widget_name) +{ + GtkWidget *option; + enum AlarmUnit u; + + option = glade_xml_get_widget (gui, widget_name); + u = (enum AlarmUnit) gtk_object_get_data (GTK_OBJECT (option), "unit"); + return u; +} +#endif /* 0 */ + + +enum AlarmUnit +extract_from_alarm_unit (GladeXML *gui, char *widget_name) +{ + GtkWidget *widget; + GtkOptionMenu *option; + GtkMenu *menu; + GtkMenuShell *menu_shell; + GtkMenuItem *menu_item; + enum AlarmUnit content; + + widget = glade_xml_get_widget (gui, widget_name); + option = GTK_OPTION_MENU (widget); + menu = GTK_MENU (gtk_option_menu_get_menu (option)); + menu_shell = GTK_MENU_SHELL (menu); + menu_item = GTK_MENU_ITEM (gtk_menu_get_active (menu)); + + content = g_list_index (menu_shell->children, (gpointer) menu_item); + return (content >= 0) ? content : ALARM_MINUTES; +} + + +guint +extract_from_option (GladeXML *gui, char *widget_name) +{ + GtkWidget *widget; + GtkOptionMenu *option; + GtkMenu *menu; + GtkMenuShell *menu_shell; + GtkMenuItem *menu_item; + enum AlarmUnit content; + + widget = glade_xml_get_widget (gui, widget_name); + option = GTK_OPTION_MENU (widget); + menu = GTK_MENU (gtk_option_menu_get_menu (option)); + menu_shell = GTK_MENU_SHELL (menu); + menu_item = GTK_MENU_ITEM (gtk_menu_get_active (menu)); + + content = g_list_index (menu_shell->children, (gpointer) menu_item); + return (content >= 0) ? content : 0; +} + + +time_t extract_from_gnome_dateedit (GladeXML *gui, char *widget_name) +{ + GtkWidget *de; + time_t t; + + de = glade_xml_get_widget (gui, widget_name); + t = gnome_date_edit_get_date (GNOME_DATE_EDIT (de)); + return t; +} + diff --git a/calendar/gui/event-editor-utils.h b/calendar/gui/event-editor-utils.h new file mode 100644 index 0000000000..61631028db --- /dev/null +++ b/calendar/gui/event-editor-utils.h @@ -0,0 +1,22 @@ + + +#include "gnome-cal.h" +#include <glade/glade.h> +//#include <cal-util/timeutil.h> + +void store_to_editable (GladeXML *gui, char *widget_name, gchar *content); +void store_to_toggle (GladeXML *gui, char *widget_name, gboolean content); +void store_to_spin (GladeXML *gui, char *widget_name, gint content); +void store_to_alarm_unit (GladeXML *gui, char *widget_name, + enum AlarmUnit content); +void store_to_option (GladeXML *gui, char *widget_name, gint content); +void store_to_gnome_dateedit (GladeXML *gui, char *widget_name, + time_t content); + + +gchar *extract_from_editable (GladeXML *gui, char *widget_name); +gboolean extract_from_toggle (GladeXML *gui, char *widget_name); +gint extract_from_spin (GladeXML *gui, char *widget_name); +enum AlarmUnit extract_from_alarm_unit (GladeXML *gui, char *widget_name); +guint extract_from_option (GladeXML *gui, char *widget_name); +time_t extract_from_gnome_dateedit (GladeXML *gui, char *widget_name); diff --git a/calendar/gui/event-editor.c b/calendar/gui/event-editor.c new file mode 100644 index 0000000000..50d6c8a346 --- /dev/null +++ b/calendar/gui/event-editor.c @@ -0,0 +1,438 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ + +#include <config.h> +#include <gnome.h> +#include <cal-util/timeutil.h> +#include <gui/event-editor-utils.h> +#include <gui/event-editor.h> + +typedef struct { + GladeXML *gui; + GtkWidget *dialog; + GnomeCalendar *gnome_cal; + iCalObject *ical; +} EventEditorDialog; + + +extern int day_begin, day_end; +extern char *user_name; +extern int am_pm_flag; +extern int week_starts_on_monday; + + +static void +fill_in_dialog_from_ical (EventEditorDialog *dialog) +{ + iCalObject *ical = dialog->ical; + GladeXML *gui = dialog->gui; + + store_to_editable (gui, "general-owner", + dialog->ical->organizer->addr ? + dialog->ical->organizer->addr : _("?")); + + store_to_editable (gui, "general-summary", ical->summary); + + /* start and end time */ + store_to_gnome_dateedit (gui, "start-time", ical->dtstart); + store_to_gnome_dateedit (gui, "end-time", ical->dtend); + + /* all day event checkbox */ + if (get_time_t_hour (ical->dtstart) <= day_begin && + get_time_t_hour (ical->dtend) >= day_end) + store_to_toggle (gui, "all-day-event", TRUE); + else + store_to_toggle (gui, "all-day-event", FALSE); + + /* alarms */ + store_to_toggle (gui, "alarm-display", ical->dalarm.enabled); + store_to_toggle (gui, "alarm-program", ical->palarm.enabled); + store_to_toggle (gui, "alarm-audio", ical->aalarm.enabled); + store_to_toggle (gui, "alarm-mail", ical->malarm.enabled); + + /* alarm counts */ + store_to_spin (gui, "alarm-display-amount", ical->dalarm.count); + store_to_spin (gui, "alarm-audio-amount", ical->aalarm.count); + store_to_spin (gui, "alarm-program-amount", ical->palarm.count); + store_to_spin (gui, "alarm-mail-amount", ical->malarm.count); + + store_to_alarm_unit (gui, "alarm-display-unit", ical->dalarm.units); + store_to_alarm_unit (gui, "alarm-audio-unit", ical->aalarm.units); + store_to_alarm_unit (gui, "alarm-program-unit", ical->palarm.units); + store_to_alarm_unit (gui, "alarm-mail-unit", ical->malarm.units); + + store_to_editable (gui, "run-program", ical->palarm.data); + store_to_editable (gui, "mail-to", ical->malarm.data); + + /* classification */ + if (strcmp (ical->class, "PUBLIC") == 0) + store_to_toggle (gui, "classification-public", TRUE); + if (strcmp (ical->class, "PRIVATE") == 0) + store_to_toggle (gui, "classification-private", TRUE); + if (strcmp (ical->class, "CONFIDENTIAL") == 0) + store_to_toggle (gui, "classification-confidential", TRUE); + + /* recurrence rules */ + + if (! ical->recur) + return; + + switch (ical->recur->type) { + case RECUR_DAILY: + store_to_toggle (gui, "recurrence-rule-daily", TRUE); + store_to_spin (gui, "recurrence-rule-daily-days", ical->recur->interval); + break; + case RECUR_WEEKLY: + store_to_toggle (gui, "recurrence-rule-weekly", TRUE); + store_to_spin (gui, "recurrence-rule-weekly-weeks", ical->recur->interval); + if (ical->recur->weekday & (1 << 0)) + store_to_toggle (gui, "recurrence-rule-weekly-sun", TRUE); + if (ical->recur->weekday & (1 << 1)) + store_to_toggle (gui, "recurrence-rule-weekly-mon", TRUE); + if (ical->recur->weekday & (1 << 2)) + store_to_toggle (gui, "recurrence-rule-weekly-tue", TRUE); + if (ical->recur->weekday & (1 << 3)) + store_to_toggle (gui, "recurrence-rule-weekly-wed", TRUE); + if (ical->recur->weekday & (1 << 4)) + store_to_toggle (gui, "recurrence-rule-weekly-thu", TRUE); + if (ical->recur->weekday & (1 << 5)) + store_to_toggle (gui, "recurrence-rule-weekly-fri", TRUE); + if (ical->recur->weekday & (1 << 6)) + store_to_toggle (gui, "recurrence-rule-weekly-sat", TRUE); + break; + case RECUR_MONTHLY_BY_DAY: + store_to_toggle (gui, "recurrence-rule-monthly", TRUE); + store_to_toggle (gui, "recurrence-rule-monthly-on-day", TRUE); + store_to_spin (gui, "recurrence-rule-monthly-day", ical->recur->u.month_day); + store_to_spin (gui, "recurrence-rule-monthly-every-n-months", ical->recur->interval); + break; + case RECUR_MONTHLY_BY_POS: + store_to_toggle (gui, "recurrence-rule-monthly", TRUE); + store_to_toggle (gui, "recurrence-rule-monthly-weekday", TRUE); + store_to_option (gui, "recurrence-rule-monthly-week", ical->recur->u.month_pos); + store_to_option (gui, "recurrence-rule-monthly-day", ical->recur->weekday); + store_to_spin (gui, "recurrence-rule-monthly-every-n-months", ical->recur->interval); + break; + case RECUR_YEARLY_BY_DAY: + case RECUR_YEARLY_BY_MONTH: + store_to_toggle (gui, "recurrence-rule-yearly", TRUE); + store_to_spin (gui, "recurrence-rule-yearly-every-n-years", ical->recur->interval); + break; + } + + /* recurrence ending date */ + if (ical->recur->duration != 0) { + store_to_toggle (gui, "recurrence-ending-date-end-after", TRUE); + store_to_spin (gui, "recurrence-ending-date-end-after-count", ical->recur->duration); + } + else if (ical->recur->enddate != 0) { + store_to_toggle (gui, "recurrence-ending-date-end-on", TRUE); + /* Shorten by one day, as we store end-on date a day ahead */ + store_to_gnome_dateedit (gui, "recurrence-ending-date-end-on-date", ical->recur->enddate - 86400); + } + /* else repeat forever */ +} + + +static void +fill_in_dialog_from_defaults (EventEditorDialog *dialog) +{ + time_t now = time (NULL); + time_t soon = time_add_minutes (now, 30); + + store_to_editable (dialog->gui, "general-owner", "?"); + + /* start and end time */ + store_to_gnome_dateedit (dialog->gui, "start-time", now); + store_to_gnome_dateedit (dialog->gui, "end-time", soon); +} + + +static void +dialog_to_ical (EventEditorDialog *dialog) +{ + iCalObject *ical = dialog->ical; + gboolean all_day_event; + GladeXML *gui = dialog->gui; + + /* general event information */ + + if (ical->summary) + g_free (ical->summary); + ical->summary = extract_from_editable (gui, "general-summary"); + + ical->dtstart = extract_from_gnome_dateedit (gui, "start-time"); + ical->dtend = extract_from_gnome_dateedit (gui, "end-time"); + + all_day_event = extract_from_toggle (gui, "all-day-event"); + + ical->dalarm.enabled = extract_from_toggle (gui, "alarm-display"); + ical->aalarm.enabled = extract_from_toggle (gui, "alarm-program"); + ical->palarm.enabled = extract_from_toggle (gui, "alarm-audio"); + ical->malarm.enabled = extract_from_toggle (gui, "alarm-mail"); + + ical->dalarm.count = extract_from_spin (gui, "alarm-display-amount"); + ical->aalarm.count = extract_from_spin (gui, "alarm-audio-amount"); + ical->palarm.count = extract_from_spin (gui, "alarm-program-amount"); + ical->malarm.count = extract_from_spin (gui, "alarm-mail-amount"); + + ical->dalarm.units = extract_from_alarm_unit (gui, "alarm-display-unit"); + ical->aalarm.units = extract_from_alarm_unit (gui, "alarm-audio-unit"); + ical->palarm.units = extract_from_alarm_unit (gui, "alarm-program-unit"); + ical->malarm.units = extract_from_alarm_unit (gui, "alarm-mail-unit"); + + ical->palarm.data = g_strdup (extract_from_editable (gui, "run-program")); + ical->malarm.data = g_strdup (extract_from_editable (gui, "mail-to")); + + if (extract_from_toggle (gui, "classification-public")) + ical->class = g_strdup ("PUBLIC"); + else if (extract_from_toggle (gui, "classification-private")) + ical->class = g_strdup ("PRIVATE"); + else /* "classification-confidential" */ + ical->class = g_strdup ("CONFIDENTIAL"); + + + /* recurrence information */ + + if (extract_from_toggle (gui, "recurrence-rule-none")) + return; /* done */ + if (!ical->recur) + ical->recur = g_new0 (Recurrence, 1); + + if (extract_from_toggle (gui, "recurrence-rule-daily")) { + ical->recur->type = RECUR_DAILY; + ical->recur->interval = extract_from_spin (gui, "recurrence-rule-daily-days"); + } + if (extract_from_toggle (gui, "recurrence-rule-weekly")) { + ical->recur->type = RECUR_WEEKLY; + ical->recur->interval = extract_from_spin (gui, "recurrence-rule-weekly-weeks"); + ical->recur->weekday = 0; + + if (extract_from_toggle (gui, "recurrence-rule-weekly-sun")) + ical->recur->weekday |= 1 << 0; + if (extract_from_toggle (gui, "recurrence-rule-weekly-mon")) + ical->recur->weekday |= 1 << 1; + if (extract_from_toggle (gui, "recurrence-rule-weekly-tue")) + ical->recur->weekday |= 1 << 2; + if (extract_from_toggle (gui, "recurrence-rule-weekly-wed")) + ical->recur->weekday |= 1 << 3; + if (extract_from_toggle (gui, "recurrence-rule-weekly-thu")) + ical->recur->weekday |= 1 << 4; + if (extract_from_toggle (gui, "recurrence-rule-weekly-fri")) + ical->recur->weekday |= 1 << 5; + if (extract_from_toggle (gui, "recurrence-rule-weekly-sat")) + ical->recur->weekday |= 1 << 6; + } + if (extract_from_toggle (gui, "recurrence-rule-monthly")) { + if (extract_from_toggle (gui, "recurrence-rule-monthly-on-day")) { + /* by day of in the month (ex: the 5th) */ + ical->recur->type = RECUR_MONTHLY_BY_DAY; + ical->recur->u.month_day = extract_from_spin (gui, "recurrence-rule-monthly-day"); + + } + else { /* "recurrence-rule-monthly-weekday" is TRUE */ + /* by position on the calender (ex: 2nd monday) */ + ical->recur->type = RECUR_MONTHLY_BY_POS; + ical->recur->u.month_pos = extract_from_option (gui, "recurrence-rule-monthly-week"); + ical->recur->weekday = extract_from_option (gui, "recurrence-rule-monthly-day"); + } + ical->recur->interval = extract_from_spin (gui, "recurrence-rule-monthly-every-n-months"); + } + if (extract_from_toggle (gui, "recurrence-rule-yearly")) { + ical->recur->type = RECUR_YEARLY_BY_DAY; + ical->recur->interval = extract_from_spin (gui, "recurrence-rule-yearly-every-n-years"); + /* FIXME: need to specify anything else? I am assuming the code will look at the dtstart + * to figure out when to recur. - Federico + */ + } + + /* recurrence ending date */ + if (extract_from_toggle (gui, "recurrence-ending-date-repeat-forever")) { + ical->recur->_enddate = 0; + ical->recur->enddate = 0; + ical->recur->duration = 0; + } + if (extract_from_toggle (gui, "recurrence-ending-date-end-on")) { + /* Also here, to ensure that the event is used, we add 86400 secs to get + get next day, in accordance to the RFC */ + ical->recur->_enddate = extract_from_gnome_dateedit (gui, "recurrence-ending-date-end-on-date") + 86400; + ical->recur->enddate = ical->recur->_enddate; + ical->recur->duration = 0; + } + if (extract_from_toggle (gui, "recurrence-ending-date-end-after")) { + ical->recur->duration = extract_from_spin (gui, "recurrence-ending-date-end-after-count"); + ical_object_compute_end (ical); + } +} + + +static void +ee_ok (GtkWidget *widget, EventEditorDialog *dialog) +{ + dialog_to_ical (dialog); + + if (dialog->ical->new) + gnome_calendar_add_object (dialog->gnome_cal, dialog->ical); + else + gnome_calendar_object_changed (dialog->gnome_cal, + dialog->ical, + CHANGE_ALL); + dialog->ical->new = 0; +} + + +static void +ee_cancel (GtkWidget *widget, EventEditorDialog *dialog) +{ + if (dialog->ical) { + ical_object_unref (dialog->ical); + dialog->ical = NULL; + } +} + + +static void +recurrence_toggled (GtkWidget *radio, EventEditorDialog *dialog) +{ + GtkWidget *recurrence_rule_notebook = glade_xml_get_widget (dialog->gui, "recurrence-rule-notebook"); + + GtkWidget *recurrence_rule_none = glade_xml_get_widget (dialog->gui, "recurrence-rule-none"); + GtkWidget *recurrence_rule_daily = glade_xml_get_widget (dialog->gui, "recurrence-rule-daily"); + GtkWidget *recurrence_rule_weekly = glade_xml_get_widget (dialog->gui, "recurrence-rule-weekly"); + GtkWidget *recurrence_rule_monthly = glade_xml_get_widget (dialog->gui, "recurrence-rule-monthly"); + GtkWidget *recurrence_rule_yearly = glade_xml_get_widget (dialog->gui, "recurrence-rule-yearly"); + + if (radio == recurrence_rule_none) + gtk_notebook_set_page (GTK_NOTEBOOK (recurrence_rule_notebook), 0); + if (radio == recurrence_rule_daily) + gtk_notebook_set_page (GTK_NOTEBOOK (recurrence_rule_notebook), 1); + if (radio == recurrence_rule_weekly) + gtk_notebook_set_page (GTK_NOTEBOOK (recurrence_rule_notebook), 2); + if (radio == recurrence_rule_monthly) + gtk_notebook_set_page (GTK_NOTEBOOK (recurrence_rule_notebook), 3); + if (radio == recurrence_rule_yearly) + gtk_notebook_set_page (GTK_NOTEBOOK (recurrence_rule_notebook), 4); +} + + + +GtkWidget *event_editor_new (GnomeCalendar *gcal, iCalObject *ical) +{ + EventEditorDialog *dialog = g_new0 (EventEditorDialog, 1); + + dialog->ical = ical; + dialog->gnome_cal = gcal; + + printf ("glade_xml_new (%s, NULL)\n", + EVOLUTION_GLADEDIR "/event-editor-dialog.glade"); + + dialog->gui = glade_xml_new (EVOLUTION_GLADEDIR + "/event-editor-dialog.glade", + NULL); + + dialog->dialog = glade_xml_get_widget (dialog->gui, + "event-editor-dialog"); + + gnome_dialog_button_connect (GNOME_DIALOG (dialog->dialog), + 0, GTK_SIGNAL_FUNC(ee_ok), dialog); + gnome_dialog_button_connect (GNOME_DIALOG (dialog->dialog), + 1, GTK_SIGNAL_FUNC(ee_cancel), dialog); + + + { + GtkWidget *recurrence_rule_none = glade_xml_get_widget (dialog->gui, "recurrence-rule-none"); + GtkWidget *recurrence_rule_daily = glade_xml_get_widget (dialog->gui, "recurrence-rule-daily"); + GtkWidget *recurrence_rule_weekly = glade_xml_get_widget (dialog->gui, "recurrence-rule-weekly"); + GtkWidget *recurrence_rule_monthly = glade_xml_get_widget (dialog->gui, "recurrence-rule-monthly"); + GtkWidget *recurrence_rule_yearly = glade_xml_get_widget (dialog->gui, "recurrence-rule-yearly"); + + gtk_signal_connect (GTK_OBJECT (recurrence_rule_none), "toggled", + GTK_SIGNAL_FUNC (recurrence_toggled), dialog); + gtk_signal_connect (GTK_OBJECT (recurrence_rule_daily), "toggled", + GTK_SIGNAL_FUNC (recurrence_toggled), dialog); + gtk_signal_connect (GTK_OBJECT (recurrence_rule_weekly), "toggled", + GTK_SIGNAL_FUNC (recurrence_toggled), dialog); + gtk_signal_connect (GTK_OBJECT (recurrence_rule_monthly), "toggled", + GTK_SIGNAL_FUNC (recurrence_toggled), dialog); + gtk_signal_connect (GTK_OBJECT (recurrence_rule_yearly), "toggled", + GTK_SIGNAL_FUNC (recurrence_toggled), dialog); + + } + + + + if (ical->new) + fill_in_dialog_from_defaults (dialog); + else + fill_in_dialog_from_ical (dialog); + + + gnome_dialog_run (GNOME_DIALOG(dialog->dialog)); + + gnome_dialog_close (GNOME_DIALOG(dialog->dialog)); + + return dialog->dialog; +} + + +void event_editor_new_whole_day (GnomeCalendar *owner, time_t day) +{ +} + + + +GtkWidget *make_date_edit (void) +{ + return date_edit_new (time (NULL), TRUE); +} + + +GtkWidget *date_edit_new (time_t the_time, int show_time) +{ + return gnome_date_edit_new_flags (the_time, + ((show_time ? GNOME_DATE_EDIT_SHOW_TIME : 0) + | (am_pm_flag ? 0 : GNOME_DATE_EDIT_24_HR) + | (week_starts_on_monday + ? GNOME_DATE_EDIT_WEEK_STARTS_ON_MONDAY + : 0))); +} + + + +GtkWidget * +make_spin_button (int val, int low, int high) +{ + GtkAdjustment *adj; + GtkWidget *spin; + + adj = GTK_ADJUSTMENT (gtk_adjustment_new (val, low, high, 1, 10, 10)); + spin = gtk_spin_button_new (adj, 0.5, 0); + gtk_widget_set_usize (spin, 60, 0); + + return spin; +} + + +/* todo + + build some of the recur stuff by hand to take into account + the start-on-monday preference? + + make the alarm controls insensitive until you enable them + + get reading and storing of all_day_event to work + + if you set the start time and it is after the end time, change + the end time + + get the apply button to work right + + make the properties stuff unglobal + + figure out why alarm units aren't sticking between edits + + extract from and store to the ending date in the recurrence rule stuff + + finish the recurrence rule exceptions + + */ + diff --git a/calendar/gui/event-editor.h b/calendar/gui/event-editor.h new file mode 100644 index 0000000000..3cd00e9604 --- /dev/null +++ b/calendar/gui/event-editor.h @@ -0,0 +1,41 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ + +#ifndef __EVENT_EDITOR_DIALOG_H__ +#define __EVENT_EDITOR_DIALOG_H__ + +#include "gnome-cal.h" +#include <glade/glade.h> +#include <libgnomeui/gnome-dialog.h> + +typedef struct { + + /* The associated ical object */ + iCalObject *ical; + + /* The calendar owner of this event */ + GnomeCalendar *gnome_cal; + + /* + char *description; + char *host; + int port; + char *rootdn; + */ +} EventEditor; + + +GtkWidget *event_editor_new (GnomeCalendar *owner, iCalObject *ico); + +/* 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. + */ +void event_editor_new_whole_day (GnomeCalendar *owner, time_t day); + +GtkWidget *make_date_edit (void); +GtkWidget *date_edit_new (time_t the_time, int show_time); + +GtkWidget *make_spin_button (int val, int low, int high); + + + +#endif /* __EVENT_EDITOR_DIALOG_H__ */ diff --git a/calendar/gui/eventedit.c b/calendar/gui/eventedit.c index f6b14aa67f..517f2f83c8 100644 --- a/calendar/gui/eventedit.c +++ b/calendar/gui/eventedit.c @@ -1537,6 +1537,8 @@ event_editor_new (GnomeCalendar *gcal, iCalObject *ical) ee->ical = ical; ee->gnome_cal = gcal; event_editor_init_widgets (ee); + + gtk_widget_show (retval); return retval; } @@ -1571,5 +1573,4 @@ event_editor_new_whole_day (GnomeCalendar *owner, time_t day) /* Launch the event editor */ ee = event_editor_new (owner, ico); - gtk_widget_show (ee); } diff --git a/calendar/gui/evolution-calendar-control.c b/calendar/gui/evolution-calendar-control.c index ac0801bcc8..904e146c7c 100644 --- a/calendar/gui/evolution-calendar-control.c +++ b/calendar/gui/evolution-calendar-control.c @@ -4,6 +4,7 @@ #include <gnome.h> #include <bonobo.h> #include <bonobo/bonobo-control.h> +#include <glade/glade.h> #ifdef USING_OAF #include <liboaf/liboaf.h> @@ -61,6 +62,8 @@ init_bonobo (int *argc, char **argv) if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) g_error (_("Could not initialize Bonobo")); + + glade_gnome_init (); } @@ -71,7 +74,7 @@ get_prop (BonoboPropertyBag *bag, guint arg_id, gpointer user_data) { - GnomeCalendar *gcal = user_data; + /*GnomeCalendar *gcal = user_data;*/ switch (arg_id) { @@ -184,6 +187,9 @@ main (int argc, char **argv) init_calendar (); //g_log_set_always_fatal ((GLogLevelFlags) 0xFFFF); + g_log_set_always_fatal (G_LOG_LEVEL_ERROR | + G_LOG_LEVEL_CRITICAL | + G_LOG_LEVEL_WARNING); CORBA_exception_init (&ev); diff --git a/calendar/gui/prop.c b/calendar/gui/prop.c index c5169a05bd..6bf56c7c57 100644 --- a/calendar/gui/prop.c +++ b/calendar/gui/prop.c @@ -841,7 +841,9 @@ create_alarm_page (void) gtk_table_set_row_spacings (GTK_TABLE (default_table), 4); gtk_table_set_col_spacings (GTK_TABLE (default_table), 4); gtk_container_add (GTK_CONTAINER (default_frame), default_table); - + +#warning "FIX ME" + /* ee_create_ae (GTK_TABLE (default_table), _("Display"), &alarm_defaults [ALARM_DISPLAY], ALARM_DISPLAY, 1, FALSE, prop_changed); @@ -854,12 +856,14 @@ create_alarm_page (void) ee_create_ae (GTK_TABLE (default_table), _("Mail"), &alarm_defaults [ALARM_MAIL], ALARM_MAIL, 4, FALSE, prop_changed); + */ } static void prop_store_alarm_default_values (CalendarAlarm* alarm) { - ee_store_alarm (alarm, alarm->type); +#warning "FIX ME" + // ee_store_alarm (alarm, alarm->type); switch (alarm->type) { case ALARM_DISPLAY: |