diff options
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r-- | calendar/gui/dialogs/cal-prefs-dialog.c | 42 | ||||
-rw-r--r-- | calendar/gui/dialogs/cal-prefs-dialog.h | 2 | ||||
-rw-r--r-- | calendar/gui/dialogs/cal-prefs-dialog.ui | 518 | ||||
-rw-r--r-- | calendar/gui/dialogs/comp-editor-util.c | 26 | ||||
-rw-r--r-- | calendar/gui/dialogs/comp-editor-util.h | 6 | ||||
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 132 | ||||
-rw-r--r-- | calendar/gui/dialogs/comp-editor.h | 8 | ||||
-rw-r--r-- | calendar/gui/dialogs/copy-source-dialog.c | 14 | ||||
-rw-r--r-- | calendar/gui/dialogs/event-editor.c | 75 | ||||
-rw-r--r-- | calendar/gui/dialogs/event-page.c | 49 | ||||
-rw-r--r-- | calendar/gui/dialogs/event-page.h | 2 | ||||
-rw-r--r-- | calendar/gui/dialogs/memo-page.c | 1 | ||||
-rw-r--r-- | calendar/gui/dialogs/recurrence-page.c | 34 | ||||
-rw-r--r-- | calendar/gui/dialogs/schedule-page.c | 16 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-details-page.c | 1 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-editor.c | 19 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-page.c | 2 |
17 files changed, 460 insertions, 487 deletions
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c index 35b946137f..e925838e58 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.c +++ b/calendar/gui/dialogs/cal-prefs-dialog.c @@ -36,6 +36,7 @@ #include "e-util/e-datetime-format.h" #include "e-util/e-dialog-widgets.h" #include "e-util/e-util-private.h" +#include "shell/e-shell-utils.h" #include <glib/gi18n.h> #include <string.h> @@ -739,16 +740,11 @@ calendar_prefs_dialog_construct (CalendarPrefsDialog *prefs, shell_settings, "cal-compress-weekend", widget, "active"); - widget = e_builder_get_widget (prefs->builder, "dnav_show_week_no"); + widget = e_builder_get_widget (prefs->builder, "show_week_numbers"); e_mutual_binding_new ( shell_settings, "cal-show-week-numbers", widget, "active"); - widget = e_builder_get_widget (prefs->builder, "dview_show_week_no"); - e_mutual_binding_new ( - shell_settings, "cal-day-view-show-week-numbers", - widget, "active"); - prefs->month_scroll_by_week = e_builder_get_widget (prefs->builder, "month_scroll_by_week"); widget = e_builder_get_widget (prefs->builder, "tasks_due_today_color"); @@ -780,16 +776,42 @@ calendar_prefs_dialog_construct (CalendarPrefsDialog *prefs, e_mutual_binding_new ( shell_settings, "cal-free-busy-template", widget, "text"); - target = e_cal_config_target_new_prefs (ec, prefs->gconf); - e_config_set_target ((EConfig *)ec, (EConfigTarget *) target); - toplevel = e_config_create_widget ((EConfig *)ec); - gtk_container_add (GTK_CONTAINER (prefs), toplevel); /* date/time format */ table = e_builder_get_widget (prefs->builder, "datetime_format_table"); e_datetime_format_add_setup_widget (table, 0, "calendar", "table", DTFormatKindDateTime, _("Time and date:")); e_datetime_format_add_setup_widget (table, 1, "calendar", "table", DTFormatKindDate, _("Date only:")); + /* Hide senseless preferences when running in Express mode */ + e_shell_hide_widgets_for_express_mode (shell, prefs->builder, + "label_second_zone", + "hbox_second_zone", + "timezone", + "timezone_label", + "hbox_use_system_timezone", + "hbox_time_divisions", + "show_end_times", + "month_scroll_by_week", + NULL); + + /* HACK: GTK+ 2.18 and 2.20 has a GtkTable which includes row/column spacing even for empty rows/columns. + * When Evo runs in Express mode, we hide all the rows in the Time section of the calendar's General + * preferences page. However, due to that behavior in GTK+, we get a lot of extra spacing in that + * section. Since we know that in Express mode we only leave a single row visible, we'll make the + * table's row spacing equal to 0 in that case. + */ + if (e_shell_get_express_mode (shell)) { + widget = e_builder_get_widget (prefs->builder, "time"); + gtk_table_set_row_spacings (GTK_TABLE (widget), 0); + } + + /* Hook up and add the toplevel widget */ + + target = e_cal_config_target_new_prefs (ec, prefs->gconf); + e_config_set_target ((EConfig *)ec, (EConfigTarget *) target); + toplevel = e_config_create_widget ((EConfig *)ec); + gtk_container_add (GTK_CONTAINER (prefs), toplevel); + show_config (prefs); /* FIXME: weakref? */ setup_changes (prefs); diff --git a/calendar/gui/dialogs/cal-prefs-dialog.h b/calendar/gui/dialogs/cal-prefs-dialog.h index 14011d8403..1ae585a0e8 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.h +++ b/calendar/gui/dialogs/cal-prefs-dialog.h @@ -79,8 +79,6 @@ struct _CalendarPrefsDialog { GtkWidget *time_divisions; GtkWidget *show_end_times; GtkWidget *compress_weekend; - GtkWidget *dnav_show_week_no; - GtkWidget *dview_show_week_no; GtkWidget *month_scroll_by_week; GtkWidget *tasks_hide_completed; GtkWidget *tasks_hide_completed_interval; diff --git a/calendar/gui/dialogs/cal-prefs-dialog.ui b/calendar/gui/dialogs/cal-prefs-dialog.ui index d3478a2590..b94803fc43 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.ui +++ b/calendar/gui/dialogs/cal-prefs-dialog.ui @@ -1,31 +1,27 @@ <?xml version="1.0"?> <interface> + <requires lib="gtk+" version="2.16"/> + <!-- interface-requires evolution 0.0 --> + <!-- interface-naming-policy toplevel-contextual --> <object class="GtkAdjustment" id="adjustment1"> <property name="upper">9999</property> - <property name="lower">0</property> - <property name="page_increment">10</property> <property name="step_increment">1</property> - <property name="page_size">0</property> - <property name="value">0</property> + <property name="page_increment">10</property> </object> <object class="GtkAdjustment" id="adjustment2"> <property name="upper">9999</property> - <property name="lower">0</property> - <property name="page_increment">10</property> <property name="step_increment">1</property> - <property name="page_size">0</property> - <property name="value">0</property> + <property name="page_increment">10</property> </object> <object class="GtkAdjustment" id="adjustment3"> + <property name="value">1</property> <property name="upper">9999</property> - <property name="lower">0</property> - <property name="page_increment">10</property> <property name="step_increment">1</property> - <property name="page_size">0</property> - <property name="value">1</property> + <property name="page_increment">10</property> </object> <object class="GtkListStore" id="model1"> <columns> + <!-- column-name gchararray --> <column type="gchararray"/> </columns> <data> @@ -54,6 +50,7 @@ </object> <object class="GtkListStore" id="model2"> <columns> + <!-- column-name gchararray --> <column type="gchararray"/> </columns> <data> @@ -70,6 +67,7 @@ </object> <object class="GtkListStore" id="model3"> <columns> + <!-- column-name gchararray --> <column type="gchararray"/> </columns> <data> @@ -86,6 +84,7 @@ </object> <object class="GtkListStore" id="model4"> <columns> + <!-- column-name gchararray --> <column type="gchararray"/> </columns> <data> @@ -108,6 +107,7 @@ </object> <object class="GtkListStore" id="model5"> <columns> + <!-- column-name gchararray --> <column type="gchararray"/> </columns> <data> @@ -122,8 +122,6 @@ </row> </data> </object> - <!-- interface-requires gtk+ 2.16 --> - <!-- interface-naming-policy toplevel-contextual --> <object class="GtkNotebook" id="toplevel-notebook"> <property name="visible">True</property> <property name="can_focus">True</property> @@ -164,12 +162,12 @@ <child> <object class="GtkTable" id="time"> <property name="visible">True</property> - <property name="n_rows">5</property> + <property name="n_rows">4</property> <property name="n_columns">2</property> <property name="column_spacing">6</property> <property name="row_spacing">6</property> <child> - <object class="GtkLabel" id="label63"> + <object class="GtkLabel" id="label_second_zone"> <property name="visible">True</property> <property name="xalign">0</property> <property name="label" translatable="yes">Se_cond zone:</property> @@ -177,14 +175,14 @@ <property name="mnemonic_widget">day_second_zone</property> </object> <packing> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> <property name="x_options">GTK_FILL</property> - <property name="y_options"/> + <property name="y_options"></property> </packing> </child> <child> - <object class="GtkHBox" id="hbox25"> + <object class="GtkHBox" id="hbox_second_zone"> <property name="visible">True</property> <child> <object class="GtkButton" id="day_second_zone"> @@ -214,32 +212,48 @@ <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> <property name="x_options">GTK_FILL</property> <property name="y_options">GTK_FILL</property> </packing> </child> <child> - <object class="GtkLabel" id="label11"> + <object class="ETimezoneEntry" id="timezone"> + <property name="visible">True</property> + <accessibility> + <relation type="labelled-by" target="timezone_label"/> + </accessibility> + </object> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options">GTK_FILL</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="timezone_label"> <property name="visible">True</property> <property name="xalign">0</property> - <property name="label" translatable="yes">Time format:</property> + <property name="label" translatable="yes">Time _zone:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">timezone</property> </object> <packing> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> <property name="x_options">GTK_FILL</property> - <property name="y_options"/> + <property name="y_options"></property> </packing> </child> <child> - <object class="GtkHBox" id="hbox4"> + <object class="GtkHBox" id="hbox_use_system_timezone"> <property name="visible">True</property> - <property name="spacing">6</property> <child> - <object class="GtkRadioButton" id="use_12_hour"> - <property name="label" translatable="yes">_12 hour (AM/PM)</property> + <object class="GtkCheckButton" id="use-system-tz-check"> + <property name="label" translatable="yes">Use s_ystem time zone</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> @@ -248,19 +262,14 @@ </object> <packing> <property name="expand">False</property> - <property name="fill">False</property> <property name="position">0</property> </packing> </child> <child> - <object class="GtkRadioButton" id="use_24_hour"> - <property name="label" translatable="yes">_24 hour</property> + <object class="GtkLabel" id="system-tz-label"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> - <property name="group">use_12_hour</property> + <property name="xpad">5</property> + <property name="label">(system/tz)</property> </object> <packing> <property name="expand">False</property> @@ -272,62 +281,51 @@ <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options">GTK_FILL</property> - </packing> - </child> - <child> - <object class="ETimezoneEntry" id="timezone"> - <property name="visible">True</property> - <accessibility> - <relation target="timezone_label" type="labelled-by"/> - </accessibility> - </object> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> - <property name="y_options">GTK_FILL</property> + <property name="x_options">GTK_FILL</property> </packing> </child> <child> - <object class="GtkLabel" id="timezone_label"> + <object class="GtkLabel" id="label_time_format"> <property name="visible">True</property> <property name="xalign">0</property> - <property name="label" translatable="yes">Time _zone:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">timezone</property> + <property name="label" translatable="yes">Time format:</property> </object> <packing> <property name="x_options">GTK_FILL</property> - <property name="y_options"/> + <property name="y_options"></property> </packing> </child> <child> - <object class="GtkHBox" id="hbox26"> + <object class="GtkHBox" id="hbox_time_format"> <property name="visible">True</property> + <property name="spacing">6</property> <child> - <object class="GtkCheckButton" id="use-system-tz-check"> - <property name="label" translatable="yes">Use s_ystem time zone</property> + <object class="GtkRadioButton" id="use_12_hour"> + <property name="label" translatable="yes">_12 hour (AM/PM)</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> <property name="use_underline">True</property> + <property name="active">True</property> <property name="draw_indicator">True</property> </object> <packing> <property name="expand">False</property> + <property name="fill">False</property> <property name="position">0</property> </packing> </child> <child> - <object class="GtkLabel" id="system-tz-label"> + <object class="GtkRadioButton" id="use_24_hour"> + <property name="label" translatable="yes">_24 hour</property> <property name="visible">True</property> - <property name="xpad">5</property> - <property name="label">(system/tz)</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="draw_indicator">True</property> + <property name="group">use_12_hour</property> </object> <packing> <property name="expand">False</property> @@ -340,14 +338,12 @@ <property name="left_attach">1</property> <property name="right_attach">2</property> <property name="x_options">GTK_FILL</property> + <property name="y_options">GTK_FILL</property> </packing> </child> <child> <placeholder/> </child> - <child> - <placeholder/> - </child> </object> <packing> <property name="position">1</property> @@ -391,7 +387,7 @@ <child> <object class="GtkTable" id="workWeek"> <property name="visible">True</property> - <property name="n_rows">4</property> + <property name="n_rows">3</property> <property name="n_columns">2</property> <property name="column_spacing">6</property> <property name="row_spacing">6</property> @@ -399,13 +395,13 @@ <object class="GtkLabel" id="label12"> <property name="visible">True</property> <property name="xalign">0</property> - <property comments="A weekday like "Monday" follows" name="label" translatable="yes">Wee_k starts on:</property> + <property name="label" translatable="yes" comments="A weekday like "Monday" follows">Wee_k starts on:</property> <property name="use_underline">True</property> <property name="mnemonic_widget">week_start_day</property> </object> <packing> <property name="x_options">GTK_FILL</property> - <property name="y_options"/> + <property name="y_options"></property> </packing> </child> <child> @@ -418,64 +414,21 @@ <property name="top_attach">1</property> <property name="bottom_attach">2</property> <property name="x_options">GTK_FILL</property> - <property name="y_options"/> + <property name="y_options"></property> </packing> </child> <child> - <object class="GtkLabel" id="label14"> + <object class="GtkLabel" id="day_start_label"> <property name="visible">True</property> <property name="xalign">0</property> <property name="label" translatable="yes">_Day begins:</property> <property name="use_underline">True</property> - <property name="mnemonic_widget">start_of_day</property> </object> <packing> <property name="top_attach">2</property> <property name="bottom_attach">3</property> <property name="x_options">GTK_FILL</property> - <property name="y_options"/> - </packing> - </child> - <child> - <object class="GtkLabel" id="label15"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Day _ends:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">end_of_day</property> - </object> - <packing> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"/> - </packing> - </child> - <child> - <object class="EDateEdit" id="start_of_day"> - <property name="show-date">False</property> - <property name="visible">True</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="y_options">GTK_FILL</property> - </packing> - </child> - <child> - <object class="EDateEdit" id="end_of_day"> - <property name="show-date">False</property> - <property name="visible">True</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options">GTK_FILL</property> + <property name="y_options"></property> </packing> </child> <child> @@ -484,17 +437,14 @@ <property name="spacing">6</property> <child> <object class="GtkCheckButton" id="mon_button"> - <property comments="Monday" name="label" translatable="yes">_Mon</property> + <property name="label" translatable="yes" comments="Monday">_Mon</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> <property name="use_underline">True</property> <property name="draw_indicator">True</property> - <accessibility> - - </accessibility> <child internal-child="accessible"> - <object class="AtkObject" id="a11y-mon_button1"> + <object class="AtkObject" id="mon_button-atkobject"> <property name="AtkObject::accessible-name" translatable="yes">Monday</property> </object> </child> @@ -507,17 +457,14 @@ </child> <child> <object class="GtkCheckButton" id="tue_button"> - <property comments="Tuesday" name="label" translatable="yes">_Tue</property> + <property name="label" translatable="yes" comments="Tuesday">_Tue</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> <property name="use_underline">True</property> <property name="draw_indicator">True</property> - <accessibility> - - </accessibility> <child internal-child="accessible"> - <object class="AtkObject" id="a11y-tue_button1"> + <object class="AtkObject" id="tue_button-atkobject"> <property name="AtkObject::accessible-name" translatable="yes">Tuesday</property> </object> </child> @@ -530,17 +477,14 @@ </child> <child> <object class="GtkCheckButton" id="wed_button"> - <property comments="Wednesday" name="label" translatable="yes">_Wed</property> + <property name="label" translatable="yes" comments="Wednesday">_Wed</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> <property name="use_underline">True</property> <property name="draw_indicator">True</property> - <accessibility> - - </accessibility> <child internal-child="accessible"> - <object class="AtkObject" id="a11y-wed_button1"> + <object class="AtkObject" id="wed_button-atkobject"> <property name="AtkObject::accessible-name" translatable="yes">Wednesday</property> </object> </child> @@ -553,17 +497,14 @@ </child> <child> <object class="GtkCheckButton" id="thu_button"> - <property comments="Thursday" name="label" translatable="yes">T_hu</property> + <property name="label" translatable="yes" comments="Thursday">T_hu</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> <property name="use_underline">True</property> <property name="draw_indicator">True</property> - <accessibility> - - </accessibility> <child internal-child="accessible"> - <object class="AtkObject" id="a11y-thu_button1"> + <object class="AtkObject" id="thu_button-atkobject"> <property name="AtkObject::accessible-name" translatable="yes">Thursday</property> </object> </child> @@ -576,17 +517,14 @@ </child> <child> <object class="GtkCheckButton" id="fri_button"> - <property comments="Friday" name="label" translatable="yes">_Fri</property> + <property name="label" translatable="yes" comments="Friday">_Fri</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> <property name="use_underline">True</property> <property name="draw_indicator">True</property> - <accessibility> - - </accessibility> <child internal-child="accessible"> - <object class="AtkObject" id="a11y-fri_button1"> + <object class="AtkObject" id="fri_button-atkobject"> <property name="AtkObject::accessible-name" translatable="yes">Friday</property> </object> </child> @@ -599,17 +537,14 @@ </child> <child> <object class="GtkCheckButton" id="sat_button"> - <property comments="Saturday" name="label" translatable="yes">_Sat</property> + <property name="label" translatable="yes" comments="Saturday">_Sat</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> <property name="use_underline">True</property> <property name="draw_indicator">True</property> - <accessibility> - - </accessibility> <child internal-child="accessible"> - <object class="AtkObject" id="a11y-sat_button1"> + <object class="AtkObject" id="sat_button-atkobject"> <property name="AtkObject::accessible-name" translatable="yes">Saturday</property> </object> </child> @@ -622,17 +557,14 @@ </child> <child> <object class="GtkCheckButton" id="sun_button"> - <property comments="Sunday" name="label" translatable="yes">S_un</property> + <property name="label" translatable="yes" comments="Sunday">S_un</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> <property name="use_underline">True</property> <property name="draw_indicator">True</property> - <accessibility> - - </accessibility> <child internal-child="accessible"> - <object class="AtkObject" id="a11y-sun_button1"> + <object class="AtkObject" id="sun_button-atkobject"> <property name="AtkObject::accessible-name" translatable="yes">Sunday</property> </object> </child> @@ -671,6 +603,57 @@ <property name="y_options">GTK_FILL</property> </packing> </child> + <child> + <object class="GtkHBox" id="hbox13"> + <property name="visible">True</property> + <property name="spacing">12</property> + <child> + <object class="EDateEdit" id="start_of_day"> + <property name="visible">True</property> + <property name="show_date">False</property> + <property name="show_week_numbers">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="day_end_label"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Day _ends:</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="pack_type">end</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="EDateEdit" id="end_of_day"> + <property name="visible">True</property> + <property name="show_date">False</property> + <property name="show_week_numbers">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="pack_type">end</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options">GTK_FILL</property> + </packing> + </child> </object> <packing> <property name="position">1</property> @@ -736,7 +719,7 @@ <property name="spacing">4</property> <child> <object class="GtkCheckButton" id="default_reminder"> - <property comments="This is the first half of a user preference. "Show a reminder [time-period] before every appointment"" name="label" translatable="yes">Sh_ow a reminder</property> + <property name="label" translatable="yes" comments="This is the first half of a user preference. "Show a reminder [time-period] before every appointment"">Sh_ow a reminder</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> @@ -778,7 +761,7 @@ <child> <object class="GtkLabel" id="label16"> <property name="visible">True</property> - <property comments="This is the last half of a user preference. "Show a reminder [time-period] before every appointment"" name="label" translatable="yes">before every appointment</property> + <property name="label" translatable="yes" comments="This is the last half of a user preference. "Show a reminder [time-period] before every appointment"">before every appointment</property> </object> <packing> <property name="expand">False</property> @@ -797,7 +780,7 @@ <property name="spacing">4</property> <child> <object class="GtkCheckButton" id="ba_reminder"> - <property comments="This is the first half of a user preference. "Show a reminder [time-period] before every anniversary/birthday"" name="label" translatable="yes">Show a _reminder</property> + <property name="label" translatable="yes" comments="This is the first half of a user preference. "Show a reminder [time-period] before every anniversary/birthday"">Show a _reminder</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> @@ -839,7 +822,7 @@ <child> <object class="GtkLabel" id="ba_reminder_label"> <property name="visible">True</property> - <property comments="This is the last half of a user preference. "Show a reminder [time-period] before every anniversary/birthday"" name="label" translatable="yes">before every anniversary/birthday</property> + <property name="label" translatable="yes" comments="This is the last half of a user preference. "Show a reminder [time-period] before every anniversary/birthday"">before every anniversary/birthday</property> </object> <packing> <property name="expand">False</property> @@ -913,7 +896,7 @@ <property name="visible">True</property> <property name="spacing">6</property> <child> - <object class="GtkHBox" id="hbox10"> + <object class="GtkHBox" id="hbox_time_divisions"> <property name="visible">True</property> <property name="spacing">6</property> <child> @@ -980,8 +963,8 @@ </packing> </child> <child> - <object class="GtkCheckButton" id="dnav_show_week_no"> - <property name="label" translatable="yes">Show week _numbers in date navigator</property> + <object class="GtkCheckButton" id="show_week_numbers"> + <property name="label" translatable="yes">Show week _numbers</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> @@ -995,21 +978,6 @@ </packing> </child> <child> - <object class="GtkCheckButton" id="dview_show_week_no"> - <property name="label" translatable="yes">Show week n_umber in Day and Work Week View</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">4</property> - </packing> - </child> - <child> <object class="GtkCheckButton" id="month_scroll_by_week"> <property name="label" translatable="yes">Sc_roll Month View by a week</property> <property name="visible">True</property> @@ -1021,7 +989,7 @@ <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">5</property> + <property name="position">4</property> </packing> </child> </object> @@ -1069,12 +1037,9 @@ <property name="visible">True</property> <property name="spacing">6</property> <child> - <object class="GtkTable" id="table2"> + <object class="GtkHBox" id="hbox14"> <property name="visible">True</property> - <property name="n_rows">2</property> - <property name="n_columns">2</property> - <property name="column_spacing">6</property> - <property name="row_spacing">6</property> + <property name="spacing">12</property> <child> <object class="GtkLabel" id="label21"> <property name="visible">True</property> @@ -1084,57 +1049,59 @@ <property name="mnemonic_widget">tasks_due_today_color</property> </object> <packing> - <property name="x_options">GTK_FILL</property> - <property name="y_options"/> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> - <object class="GtkLabel" id="label22"> + <object class="GtkColorButton" id="tasks_due_today_color"> <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">_Overdue tasks:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">tasks_overdue_color</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="title" translatable="yes">Pick a color</property> + <property name="color">#000000000000</property> </object> <packing> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"/> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> </packing> </child> <child> - <object class="GtkColorButton" id="tasks_due_today_color"> + <object class="GtkLabel" id="label22"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="title" translatable="yes">Pick a color</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Overdue tasks:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">tasks_overdue_color</property> </object> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="x_options"/> - <property name="y_options"/> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="pack_type">end</property> + <property name="position">3</property> </packing> </child> <child> <object class="GtkColorButton" id="tasks_overdue_color"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="receives_default">False</property> + <property name="receives_default">True</property> <property name="title" translatable="yes">Pick a color</property> + <property name="color">#000000000000</property> </object> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options"/> - <property name="y_options"/> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="pack_type">end</property> + <property name="position">2</property> </packing> </child> </object> <packing> + <property name="expand">False</property> + <property name="fill">False</property> <property name="position">0</property> </packing> </child> @@ -1202,81 +1169,59 @@ <child> <object class="GtkLabel" id="label65"> <property name="visible">True</property> - <property name="label" translatable="yes">Date/Time Format</property> - <property name="use_underline">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> + <property name="label" translatable="yes">Date/Time Format</property> <attributes> <attribute name="weight" value="bold"/> </attributes> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">4</property> </packing> </child> <child> <object class="GtkHBox" id="hbox27"> <property name="visible">True</property> - <property name="homogeneous">False</property> <property name="spacing">12</property> <child> <object class="GtkLabel" id="label66"> <property name="visible">True</property> - <property name="label" translatable="yes"/> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkTable" id="datetime_format_table"> <property name="visible">True</property> - <property name="n_rows">1</property> <property name="n_columns">3</property> - <property name="homogeneous">False</property> - <property name="row_spacing">0</property> - <property name="column_spacing">0</property> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="position">1</property> </packing> </child> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="position">5</property> </packing> </child> </object> + <packing> + <property name="position">1</property> + </packing> </child> <child type="tab"> <object class="GtkLabel" id="label2"> @@ -1296,101 +1241,69 @@ <child> <object class="GtkLabel" id="label67"> <property name="visible">True</property> - <property name="label" translatable="yes">Alarms</property> - <property name="use_underline">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> + <property name="label" translatable="yes">Alarms</property> <attributes> <attribute name="weight" value="bold"/> </attributes> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> <object class="GtkAlignment" id="alignment1"> <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> <property name="left_padding">10</property> - <property name="right_padding">0</property> <child> <object class="GtkCheckButton" id="notify_with_tray"> + <property name="label" translatable="yes">Display alarms in _notification area only</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Display alarms in _notification area only</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> <property name="draw_indicator">True</property> </object> </child> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">True</property> + <property name="position">1</property> </packing> </child> <child> <object class="GtkLabel" id="label62"> <property name="visible">True</property> - <property name="label" translatable="yes">Select the calendars for alarm notification</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> + <property name="label" translatable="yes">Select the calendars for alarm notification</property> </object> <packing> - <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">2</property> </packing> </child> <child> <object class="GtkScrolledWindow" id="calendar-source-scrolled-window"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">automatic</property> - <property name="vscrollbar_policy">automatic</property> - <property name="shadow_type">in</property> - - <child><placeholder/></child> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">automatic</property> + <property name="vscrollbar_policy">automatic</property> + <property name="shadow_type">in</property> + <child> + <placeholder/> + </child> </object> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="position">3</property> </packing> </child> </object> + <packing> + <property name="position">2</property> + </packing> </child> <child type="tab"> <object class="GtkLabel" id="alarm-label"> @@ -1496,6 +1409,9 @@ </packing> </child> </object> + <packing> + <property name="position">3</property> + </packing> </child> <child type="tab"> <object class="GtkLabel" id="label3"> @@ -1508,4 +1424,10 @@ </packing> </child> </object> + <object class="GtkSizeGroup" id="day_begins_ends_sizegroup"> + <widgets> + <widget name="day_start_label"/> + <widget name="day_end_label"/> + </widgets> + </object> </interface> diff --git a/calendar/gui/dialogs/comp-editor-util.c b/calendar/gui/dialogs/comp-editor-util.c index 271ac5a8cc..cd16b46974 100644 --- a/calendar/gui/dialogs/comp-editor-util.c +++ b/calendar/gui/dialogs/comp-editor-util.c @@ -209,7 +209,6 @@ comp_editor_date_label (CompEditorPageDates *dates, GtkWidget *label) /** * comp_editor_new_date_edit: - * @shell_settings: an #EShellSettings * @show_date: Whether to show a date picker in the widget. * @show_time: Whether to show a time picker in the widget. * @make_time_insensitive: Whether the time field is made insensitive rather @@ -221,15 +220,12 @@ comp_editor_date_label (CompEditorPageDates *dates, GtkWidget *label) * Return value: A newly-created #EDateEdit widget. **/ GtkWidget * -comp_editor_new_date_edit (EShellSettings *shell_settings, - gboolean show_date, +comp_editor_new_date_edit (gboolean show_date, gboolean show_time, gboolean make_time_insensitive) { EDateEdit *dedit; - g_return_val_if_fail (E_IS_SHELL_SETTINGS (shell_settings), NULL); - dedit = E_DATE_EDIT (e_date_edit_new ()); e_date_edit_set_show_date (dedit, show_date); @@ -240,29 +236,9 @@ comp_editor_new_date_edit (EShellSettings *shell_settings, e_date_edit_set_make_time_insensitive (dedit, FALSE); #endif - comp_editor_bind_date_edit_settings (GTK_WIDGET (dedit), shell_settings); - return GTK_WIDGET (dedit); } -void -comp_editor_bind_date_edit_settings (GtkWidget *dateedit, EShellSettings *shell_settings) -{ - g_return_if_fail (dateedit != NULL); - g_return_if_fail (E_IS_DATE_EDIT (dateedit)); - - if (!shell_settings) - shell_settings = e_shell_get_shell_settings (e_shell_get_default ()); - - e_binding_new ( - shell_settings, "cal-show-week-numbers", - dateedit, "show-week-numbers"); - - e_binding_new ( - shell_settings, "cal-week-start-day", - dateedit, "week-start-day"); -} - /* Returns the current time, for EDateEdit widgets and ECalendar items in the dialogs. FIXME: Should probably use the timezone from somewhere in the component diff --git a/calendar/gui/dialogs/comp-editor-util.h b/calendar/gui/dialogs/comp-editor-util.h index 78a8bab33f..6eeb8c5410 100644 --- a/calendar/gui/dialogs/comp-editor-util.h +++ b/calendar/gui/dialogs/comp-editor-util.h @@ -26,7 +26,6 @@ #define _COMP_EDITOR_UTIL_H_ #include <gtk/gtk.h> -#include <shell/e-shell-settings.h> #include "comp-editor-page.h" #include "../e-meeting-attendee.h" @@ -35,13 +34,10 @@ void comp_editor_free_dates (CompEditorPageDates *dates); void comp_editor_date_label (CompEditorPageDates *dates, GtkWidget *label); -GtkWidget * comp_editor_new_date_edit (EShellSettings *shell_settings, - gboolean show_date, +GtkWidget * comp_editor_new_date_edit (gboolean show_date, gboolean show_time, gboolean make_time_insensitive); -void comp_editor_bind_date_edit_settings (GtkWidget *dateedit, EShellSettings *shell_settings); - struct tm comp_editor_get_current_time (GtkObject *object, gpointer data); gchar *comp_editor_strip_categories (const gchar *categories); diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 0b1701de6f..91d9f1e202 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -75,8 +75,6 @@ #define d(x) -static gboolean comp_lite = FALSE; - /* Private part of the CompEditor structure */ struct _CompEditorPrivate { @@ -173,10 +171,16 @@ static const gchar *ui = " </menu>" " </menubar>" " <toolbar name='main-toolbar'>" -" <toolitem action='save'/>" -" <toolitem action='print'/>" -" <toolitem action='close'/>" +" <toolitem action='save'/>\n" +"#if !EXPRESS\n" +" <toolitem action='print'/>\n" +"#endif\n" " <separator/>" +" <placeholder name='content'/>\n" +"#if EXPRESS\n" +" <separator expand='true'/>\n" +" <toolitem action='close'/>\n" +"#endif\n" " </toolbar>" "</ui>"; @@ -421,7 +425,7 @@ save_comp (CompEditor *editor) clone = e_cal_component_clone (priv->comp); comp_editor_copy_new_attendees (clone, priv->comp); for (l = priv->pages; l != NULL; l = l->next) { - if (!comp_editor_page_fill_component (l->data, clone)) { + if (IS_COMP_EDITOR_PAGE(l->data) && !comp_editor_page_fill_component (l->data, clone)) { g_object_unref (clone); g_hash_table_destroy (timezones); comp_editor_show_page (editor, COMP_EDITOR_PAGE (l->data)); @@ -429,7 +433,8 @@ save_comp (CompEditor *editor) } /* retrieve all timezones */ - comp_editor_page_fill_timezones (l->data, timezones); + if (IS_COMP_EDITOR_PAGE(l->data)) + comp_editor_page_fill_timezones (l->data, timezones); } /* If we are not the organizer, we don't update the sequence number */ @@ -1598,6 +1603,9 @@ comp_editor_init (CompEditor *editor) gint n_targets; GError *error = NULL; + /* FIXME Shell should be passed in. */ + shell = e_shell_get_default (); + editor->priv = priv = COMP_EDITOR_GET_PRIVATE (editor); g_object_weak_ref ( @@ -1621,9 +1629,9 @@ comp_editor_init (CompEditor *editor) priv->is_group_item = FALSE; priv->ui_manager = e_ui_manager_new (); + e_ui_manager_set_express_mode (E_UI_MANAGER (priv->ui_manager), + e_shell_get_express_mode (shell)); - if (comp_lite) - gtk_window_set_default_size ((GtkWindow *) editor, 800, 450); gtk_window_add_accel_group ( GTK_WINDOW (editor), gtk_ui_manager_get_accel_group (priv->ui_manager)); @@ -1705,7 +1713,7 @@ comp_editor_init (CompEditor *editor) action = comp_editor_get_action (editor, "save"); gtk_action_set_sensitive (action, FALSE); - gtk_ui_manager_add_ui_from_string (priv->ui_manager, ui, -1, &error); + e_ui_manager_add_ui_from_string (E_UI_MANAGER (priv->ui_manager), ui, &error); if (error != NULL) { g_warning ("%s: %s", G_STRFUNC, error->message); g_error_free (error); @@ -1721,24 +1729,25 @@ comp_editor_init (CompEditor *editor) container = widget; - widget = comp_editor_get_managed_widget (editor, "/main-menu"); - gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0); - gtk_widget_show (widget); - - if (!comp_lite) { - widget = comp_editor_get_managed_widget (editor, "/main-toolbar"); + if (!e_shell_get_express_mode (shell)) { + widget = comp_editor_get_managed_widget (editor, "/main-menu"); gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0); - gtk_widget_show (widget); + gtk_widget_set_visible (widget, !e_shell_get_meego_mode (shell)); } + widget = comp_editor_get_managed_widget (editor, "/main-toolbar"); + gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0); + gtk_widget_show (widget); + widget = e_attachment_paned_new (); gtk_container_set_border_width (GTK_CONTAINER (widget), 6); gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0); priv->attachment_view = g_object_ref (widget); gtk_widget_show (widget); - if (comp_lite) { - GtkWidget *tmp, *tmp1, *tmp_box, *cont; + if (e_shell_get_express_mode (shell)) { + /*GtkWidget *tmp, *tmp1, *tmp_box, */ + GtkWidget *cont; GtkWidget *combo; e_attachment_paned_set_expanded (E_ATTACHMENT_PANED (widget), TRUE); @@ -1749,7 +1758,7 @@ comp_editor_init (CompEditor *editor) gtk_widget_hide (combo); cont = e_attachment_paned_get_controls_container ( E_ATTACHMENT_PANED (widget)); - + /* tmp_box = gtk_hbox_new (FALSE, 0); tmp = gtk_hbox_new (FALSE, 0); tmp1 = gtk_image_new_from_stock (GTK_STOCK_SAVE, GTK_ICON_SIZE_BUTTON); @@ -1769,12 +1778,12 @@ comp_editor_init (CompEditor *editor) gtk_widget_show(tmp_box); gtk_box_pack_end (GTK_BOX (cont), tmp_box, FALSE, FALSE, 4); - + */ } container = e_attachment_paned_get_content_area ( E_ATTACHMENT_PANED (priv->attachment_view)); - if (comp_lite) { + if (e_shell_get_express_mode (shell)) { scroll = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy ((GtkScrolledWindow *)scroll, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_widget_show(scroll); @@ -1782,14 +1791,14 @@ comp_editor_init (CompEditor *editor) } widget = gtk_notebook_new (); - gtk_notebook_set_show_tabs (GTK_NOTEBOOK (widget), FALSE); - if (!comp_lite) + gtk_notebook_set_show_tabs (GTK_NOTEBOOK (widget), e_shell_get_express_mode (shell)); + if (!e_shell_get_express_mode (shell)) gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0); else gtk_scrolled_window_add_with_viewport ((GtkScrolledWindow *) scroll, widget); priv->notebook = GTK_NOTEBOOK (widget); gtk_widget_show (widget); - if (comp_lite) + if (e_shell_get_express_mode (shell)) gtk_widget_set_size_request (scroll, 300, -1); comp_editor_setup_recent_menu (editor); @@ -1831,9 +1840,8 @@ comp_editor_init (CompEditor *editor) comp_editor_bind_gconf (editor); - /* FIXME Shell should be passed in. */ - shell = e_shell_get_default (); e_shell_watch_window (shell, GTK_WINDOW (editor)); + e_shell_adapt_window_size (shell, GTK_WINDOW (editor)); } static gboolean @@ -2273,6 +2281,51 @@ page_unmapped_cb (GtkWidget *page_widget, } /** + * comp_editor_append_widget: + * @editor: A component editor + * @page: A component editor page + * @label: Label of the page. Should be NULL if add is FALSE. + * @add: Add's the page into the notebook if TRUE + * + * Appends a page to the notebook if add is TRUE else + * just adds it to the list of pages. + **/ +void +comp_editor_append_widget (CompEditor *editor, + GtkWidget *page, + const gchar *label, + gboolean add) +{ + CompEditorPrivate *priv; + GtkWidget *label_widget = NULL; + + g_return_if_fail (IS_COMP_EDITOR (editor)); + + priv = editor->priv; + + g_object_ref (page); + + if (label) + label_widget = gtk_label_new_with_mnemonic (label); + + priv->pages = g_list_append (priv->pages, page); + + if (add) + gtk_notebook_append_page (priv->notebook, page, label_widget); + + /* Listen for when the page is mapped/unmapped so we can + install/uninstall the appropriate GtkAccelGroup. + g_signal_connect ( + page, "map", + G_CALLBACK (page_mapped_cb), page); + g_signal_connect( + page, "unmap", + G_CALLBACK (page_unmapped_cb), page); + */ + +} + +/** * comp_editor_append_page: * @editor: A component editor * @page: A component editor page @@ -2563,8 +2616,10 @@ fill_widgets (CompEditor *editor) g_signal_handlers_block_by_func ( action, G_CALLBACK (action_classification_cb), editor); - for (iter = priv->pages; iter != NULL; iter = iter->next) - comp_editor_page_fill_widgets (iter->data, priv->comp); + for (iter = priv->pages; iter != NULL; iter = iter->next) { + if (IS_COMP_EDITOR_PAGE(iter->data)) + comp_editor_page_fill_widgets (iter->data, priv->comp); + } g_signal_handlers_unblock_by_func ( action, G_CALLBACK (action_classification_cb), editor); @@ -2807,8 +2862,10 @@ comp_editor_get_current_comp (CompEditor *editor, gboolean *correct) comp = e_cal_component_clone (priv->comp); comp_editor_copy_new_attendees (comp, priv->comp); if (priv->changed) { - for (l = priv->pages; l != NULL; l = l->next) - all_ok = comp_editor_page_fill_component (l->data, comp) && all_ok; + for (l = priv->pages; l != NULL; l = l->next) { + if (IS_COMP_EDITOR_PAGE(l->data)) + all_ok = comp_editor_page_fill_component (l->data, comp) && all_ok; + } } if (correct) @@ -2973,7 +3030,7 @@ page_dates_changed_cb (CompEditor *editor, GList *l; for (l = priv->pages; l != NULL; l = l->next) - if (page != (CompEditorPage *) l->data) + if (page != (CompEditorPage *) l->data && IS_COMP_EDITOR_PAGE(l->data)) comp_editor_page_set_dates (l->data, dates); if (!priv->warned && priv->existing_org && !priv->user_org && !(editor->priv->flags & COMP_EDITOR_NEW_ITEM)) { @@ -3030,14 +3087,3 @@ obj_removed_cb (ECal *client, close_dialog (editor); } -gboolean -comp_editor_get_lite () -{ - return comp_lite; -} - -void -comp_editor_set_lite (gboolean status) -{ - comp_lite = status; -} diff --git a/calendar/gui/dialogs/comp-editor.h b/calendar/gui/dialogs/comp-editor.h index 4871beae8f..bd26ce8b66 100644 --- a/calendar/gui/dialogs/comp-editor.h +++ b/calendar/gui/dialogs/comp-editor.h @@ -127,6 +127,11 @@ void comp_editor_append_page (CompEditor *editor, CompEditorPage *page, const gchar *label, gboolean add); +void comp_editor_append_widget (CompEditor *editor, + GtkWidget *page, + const gchar *label, + gboolean add); + void comp_editor_remove_page (CompEditor *editor, CompEditorPage *page); void comp_editor_show_page (CompEditor *editor, @@ -165,9 +170,6 @@ GtkWidget * comp_editor_get_managed_widget (CompEditor *editor, const gchar *widget_path); CompEditor * comp_editor_find_instance (const gchar *uid); -void comp_editor_set_lite (gboolean status); -gboolean comp_editor_get_lite (void); - G_END_DECLS #endif diff --git a/calendar/gui/dialogs/copy-source-dialog.c b/calendar/gui/dialogs/copy-source-dialog.c index 9b8c8c4fed..f1c568849b 100644 --- a/calendar/gui/dialogs/copy-source-dialog.c +++ b/calendar/gui/dialogs/copy-source-dialog.c @@ -32,18 +32,19 @@ #include "common/authentication.h" typedef struct { + GtkWindow *parent; ESource *orig_source; ECalSourceType obj_type; ESource *selected_source; } CopySourceDialogData; static void -show_error (GtkWindow *parent, const gchar *msg) +show_error (CopySourceDialogData *csdd, const gchar *msg) { GtkWidget *dialog; dialog = gtk_message_dialog_new ( - parent, 0, GTK_MESSAGE_ERROR, + csdd->parent, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", msg); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); @@ -88,7 +89,7 @@ copy_source (CopySourceDialogData *csdd) /* open the source */ source_client = e_auth_new_cal_from_source (csdd->orig_source, csdd->obj_type); if (!e_cal_open (source_client, TRUE, NULL)) { - show_error (NULL, _("Could not open source")); + show_error (csdd, _("Could not open source")); g_object_unref (source_client); return FALSE; } @@ -96,7 +97,7 @@ copy_source (CopySourceDialogData *csdd) /* open the destination */ dest_client = e_auth_new_cal_from_source (csdd->selected_source, csdd->obj_type); if (!e_cal_open (dest_client, FALSE, NULL)) { - show_error (NULL, _("Could not open destination")); + show_error (csdd, _("Could not open destination")); g_object_unref (dest_client); g_object_unref (source_client); return FALSE; @@ -105,7 +106,7 @@ copy_source (CopySourceDialogData *csdd) /* check if the destination is read only */ e_cal_is_read_only (dest_client, &read_only, NULL); if (read_only) { - show_error (NULL, _("Destination is read only")); + show_error (csdd, _("Destination is read only")); } else { if (e_cal_get_object_list (source_client, "#t", &obj_list, NULL)) { GList *l; @@ -135,7 +136,7 @@ copy_source (CopySourceDialogData *csdd) g_free (uid); } else { if (error) { - show_error (NULL, error->message); + show_error (csdd, error->message); g_error_free (error); } break; @@ -168,6 +169,7 @@ copy_source_dialog (GtkWindow *parent, ESource *source, ECalSourceType obj_type) g_return_val_if_fail (E_IS_SOURCE (source), FALSE); + csdd.parent = parent; csdd.orig_source = source; csdd.selected_source = NULL; csdd.obj_type = obj_type; diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c index c40f2b05d0..1ae9595c02 100644 --- a/calendar/gui/dialogs/event-editor.c +++ b/calendar/gui/dialogs/event-editor.c @@ -36,6 +36,7 @@ #include <e-util/e-binding.h> #include <e-util/e-plugin-ui.h> #include <e-util/e-util-private.h> +#include <e-util/e-ui-manager.h> #include "event-page.h" #include "recurrence-page.h" @@ -89,11 +90,19 @@ static const gchar *ui = " </menu>" " </menubar>" " <toolbar name='main-toolbar'>" -" <toolitem action='alarms'/>" -" <toolitem action='show-time-busy'/>" -" <toolitem action='recurrence'/>" -" <toolitem action='all-day-event'/>" -" <toolitem action='free-busy'/>" +" <placeholder name='content'>\n" +"#if !EXPRESS\n" +" <toolitem action='alarms'/>\n" +"#endif\n" +" <toolitem action='show-time-busy'/>\n" +"#if !EXPRESS\n" +" <toolitem action='recurrence'/>\n" +"#endif\n" +" <toolitem action='all-day-event'/>\n" +"#if !EXPRESS\n" +" <toolitem action='free-busy'/>\n" +"#endif\n" +" </placeholder>" " </toolbar>" "</ui>"; @@ -275,6 +284,8 @@ event_editor_constructor (GType type, GtkActionGroup *action_group; ECal *client; gboolean is_meeting; + GtkWidget *alarm_page; + GtkWidget *attendee_page; /* Chain up to parent's constructor() method. */ object = G_OBJECT_CLASS (event_editor_parent_class)->constructor ( @@ -308,11 +319,34 @@ event_editor_constructor (GType type, priv->recur_page = recurrence_page_new (editor); page = COMP_EDITOR_PAGE (priv->recur_page); - gtk_container_add ( - GTK_CONTAINER ((GTK_DIALOG (priv->recur_window)->vbox)), - comp_editor_page_get_widget (page)); - gtk_widget_show_all (gtk_bin_get_child (GTK_BIN (priv->recur_window))); - comp_editor_append_page (editor, page, NULL, FALSE); + if (!e_shell_get_express_mode(e_shell_get_default())) { + gtk_container_add ( + GTK_CONTAINER ((GTK_DIALOG (priv->recur_window)->vbox)), + comp_editor_page_get_widget (page)); + gtk_widget_show_all (gtk_bin_get_child (GTK_BIN (priv->recur_window))); + comp_editor_append_page (editor, page, NULL, FALSE); + } else { + comp_editor_append_page (editor, page, _("_Recurrence"), TRUE); + } + + if (e_shell_get_express_mode(e_shell_get_default())) { + ENameSelector *name_selector; + + priv->sched_page = schedule_page_new (priv->model, editor); + page = COMP_EDITOR_PAGE (priv->sched_page); + + name_selector = event_page_get_name_selector (priv->event_page); + schedule_page_set_name_selector (priv->sched_page, name_selector); + + comp_editor_append_page (editor, page, _("_Free/Busy"), TRUE); + schedule_page_update_free_busy (priv->sched_page); + + /* Alarm page */ + alarm_page = event_page_get_alarm_page (priv->event_page); + comp_editor_append_widget (editor, alarm_page, _("_Alarm"), TRUE); + g_object_unref(alarm_page); + + } if (is_meeting) { @@ -329,6 +363,12 @@ event_editor_constructor (GType type, event_page_set_meeting (priv->event_page, TRUE); priv->meeting_shown=TRUE; + + if (e_shell_get_express_mode(e_shell_get_default())) { + attendee_page = event_page_get_attendee_page (priv->event_page); + comp_editor_append_widget (editor, attendee_page, _("Attendee_s"), TRUE); + g_object_unref(attendee_page); + } } return object; @@ -369,25 +409,12 @@ static void event_editor_constructed (GObject *object) { EventEditorPrivate *priv; - EShellSettings *shell_settings; - EShell *shell; priv = EVENT_EDITOR_GET_PRIVATE (object); - shell = comp_editor_get_shell (COMP_EDITOR (object)); - shell_settings = e_shell_get_shell_settings (shell); - e_binding_new ( object, "client", priv->model, "client"); - - e_binding_new ( - shell_settings, "cal-free-busy-template", - priv->model, "free-busy-template"); - - e_binding_new ( - shell_settings, "cal-timezone", - priv->model, "timezone"); } static void @@ -518,7 +545,7 @@ event_editor_init (EventEditor *ee) G_N_ELEMENTS (meeting_entries), ee); ui_manager = comp_editor_get_ui_manager (editor); - gtk_ui_manager_add_ui_from_string (ui_manager, ui, -1, &error); + e_ui_manager_add_ui_from_string (E_UI_MANAGER (ui_manager), ui, &error); id = "org.gnome.evolution.event-editor"; e_plugin_ui_register_manager (ui_manager, id, ee); diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index 6308cda647..74d6af4c4b 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -828,7 +828,8 @@ sensitize_widgets (EventPage *epage) } else { gtk_widget_show (priv->calendar_label); gtk_widget_show (priv->list_box); - gtk_widget_show (priv->attendee_box); + if (!e_shell_get_express_mode(e_shell_get_default())) + gtk_widget_show (priv->attendee_box); gtk_widget_show (priv->organizer); gtk_label_set_text_with_mnemonic ((GtkLabel *) priv->org_cal_label, _("Or_ganizer:")); } @@ -2197,7 +2198,7 @@ get_widgets (EventPage *epage) priv->invite = GW ("invite"); priv->invite_label = GW ("invite-label"); - if (comp_editor_get_lite ()) + if (e_shell_get_express_mode (e_shell_get_default ())) gtk_widget_hide (priv->invite); else gtk_widget_hide (priv->invite_label); @@ -2222,7 +2223,6 @@ get_widgets (EventPage *epage) /* Glade's visibility flag doesn't seem to work for custom widgets */ priv->start_time = GW ("start-time"); - comp_editor_bind_date_edit_settings (priv->start_time, NULL); gtk_widget_show (priv->start_time); priv->time_hour = GW ("time-hour"); @@ -2231,7 +2231,6 @@ get_widgets (EventPage *epage) priv->end_time_combo = GW ("end-time-combobox"); priv->end_time = GW ("end-time"); - comp_editor_bind_date_edit_settings (priv->end_time, NULL); gtk_widget_show_all (priv->time_hour); gtk_widget_hide (priv->end_time); @@ -2239,7 +2238,6 @@ get_widgets (EventPage *epage) priv->source_selector = GW ("source"); -#undef GW e_util_set_source_combo_box_list (priv->source_selector, "/apps/evolution/calendar/sources"); @@ -3259,3 +3257,44 @@ event_page_remove_all_attendees (EventPage *epage) e_meeting_list_view_remove_all_attendees_from_name_selector (E_MEETING_LIST_VIEW (priv->list_view)); } + +GtkWidget * +event_page_get_alarm_page (EventPage *epage) +{ + EventPagePrivate *priv; + GtkWidget *alarm_page, *tmp; + + g_return_val_if_fail (epage != NULL, NULL); + g_return_val_if_fail (IS_EVENT_PAGE (epage), NULL); + + priv = epage->priv; + + tmp = GW("dialog-vbox1"); + alarm_page = GW("vbox2"); + g_object_ref(alarm_page); + gtk_container_remove ((GtkContainer *)tmp, alarm_page); + + return alarm_page; +} + +GtkWidget * +event_page_get_attendee_page (EventPage *epage) +{ + EventPagePrivate *priv; + GtkWidget *apage; + + g_return_val_if_fail (epage != NULL, NULL); + g_return_val_if_fail (IS_EVENT_PAGE (epage), NULL); + + priv = epage->priv; + + apage = priv->list_box; + g_object_ref(apage); + gtk_container_remove ((GtkContainer *)gtk_widget_get_parent(apage), apage); + gtk_widget_hide (priv->attendee_box); + + return apage; +} + + +#undef GW diff --git a/calendar/gui/dialogs/event-page.h b/calendar/gui/dialogs/event-page.h index ab43c0f7ba..a4513e4c68 100644 --- a/calendar/gui/dialogs/event-page.h +++ b/calendar/gui/dialogs/event-page.h @@ -109,6 +109,8 @@ ENameSelector * event_page_get_name_selector (EventPage *epage); void event_page_add_attendee (EventPage *epage, EMeetingAttendee *attendee); void event_page_remove_all_attendees (EventPage *epage); +GtkWidget * event_page_get_alarm_page (EventPage *epage); +GtkWidget * event_page_get_attendee_page (EventPage *epage); G_END_DECLS diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c index f1b3a71d03..adb10dc9fa 100644 --- a/calendar/gui/dialogs/memo-page.c +++ b/calendar/gui/dialogs/memo-page.c @@ -816,7 +816,6 @@ get_widgets (MemoPage *mpage) #undef GW e_util_set_source_combo_box_list (priv->source_selector, "/apps/evolution/memos/sources"); - comp_editor_bind_date_edit_settings (priv->start_date, NULL); completion = e_category_completion_new (); gtk_entry_set_completion (GTK_ENTRY (priv->categories), completion); diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c index 4d3e0af1f0..578f98929c 100644 --- a/calendar/gui/dialogs/recurrence-page.c +++ b/calendar/gui/dialogs/recurrence-page.c @@ -1340,8 +1340,6 @@ static void make_ending_until_special (RecurrencePage *rpage) { RecurrencePagePrivate *priv = rpage->priv; - EShell *shell; - EShellSettings *shell_settings; CompEditor *editor; CompEditorFlags flags; EDateEdit *de; @@ -1353,13 +1351,9 @@ make_ending_until_special (RecurrencePage *rpage) editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (rpage)); flags = comp_editor_get_flags (editor); - shell = comp_editor_get_shell (editor); - shell_settings = e_shell_get_shell_settings (shell); - /* Create the widget */ - priv->ending_date_edit = comp_editor_new_date_edit ( - shell_settings, TRUE, FALSE, FALSE); + priv->ending_date_edit = comp_editor_new_date_edit (TRUE, FALSE, FALSE); de = E_DATE_EDIT (priv->ending_date_edit); gtk_container_add (GTK_CONTAINER (priv->ending_special), @@ -2088,14 +2082,10 @@ create_exception_dialog (RecurrencePage *rpage, const gchar *title, GtkWidget ** RecurrencePagePrivate *priv; GtkWidget *dialog, *toplevel; CompEditor *editor; - EShell *shell; - EShellSettings *shell_settings; priv = rpage->priv; editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (rpage)); - shell = comp_editor_get_shell (editor); - shell_settings = e_shell_get_shell_settings (shell); toplevel = gtk_widget_get_toplevel (priv->main); dialog = gtk_dialog_new_with_buttons (title, GTK_WINDOW (toplevel), @@ -2104,7 +2094,7 @@ create_exception_dialog (RecurrencePage *rpage, const gchar *title, GtkWidget ** GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL); - *date_edit = comp_editor_new_date_edit (shell_settings, TRUE, FALSE, TRUE); + *date_edit = comp_editor_new_date_edit (TRUE, FALSE, TRUE); gtk_widget_show (*date_edit); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), *date_edit, FALSE, TRUE, 6); @@ -2260,8 +2250,6 @@ static void init_widgets (RecurrencePage *rpage) { RecurrencePagePrivate *priv; - EShell *shell; - EShellSettings *shell_settings; CompEditor *editor; ECalendar *ecal; GtkAdjustment *adj; @@ -2271,22 +2259,12 @@ init_widgets (RecurrencePage *rpage) priv = rpage->priv; editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (rpage)); - shell = comp_editor_get_shell (editor); - shell_settings = e_shell_get_shell_settings (shell); /* Recurrence preview */ priv->preview_calendar = e_calendar_new (); ecal = E_CALENDAR (priv->preview_calendar); - e_binding_new ( - shell_settings, "cal-show-week-numbers", - ecal->calitem, "show-week-numbers"); - - e_binding_new ( - shell_settings, "cal-week-start-day", - ecal->calitem, "week-start-day"); - g_signal_connect((ecal->calitem), "date_range_changed", G_CALLBACK (preview_date_range_changed_cb), rpage); @@ -2423,12 +2401,6 @@ GtkWidget *make_exdate_date_edit (void); GtkWidget * make_exdate_date_edit (void) { - EShell *shell; - EShellSettings *shell_settings; - - shell = e_shell_get_default (); - shell_settings = e_shell_get_shell_settings (shell); - - return comp_editor_new_date_edit (shell_settings, TRUE, TRUE, FALSE); + return comp_editor_new_date_edit (TRUE, TRUE, FALSE); } diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c index 32b6dffab8..2e13cba1b9 100644 --- a/calendar/gui/dialogs/schedule-page.c +++ b/calendar/gui/dialogs/schedule-page.c @@ -380,13 +380,9 @@ SchedulePage * schedule_page_construct (SchedulePage *spage, EMeetingStore *ems) { SchedulePagePrivate *priv = spage->priv; - EShellSettings *shell_settings; - EShell *shell; CompEditor *editor; editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (spage)); - shell = comp_editor_get_shell (editor); - shell_settings = e_shell_get_shell_settings (shell); priv->builder = gtk_builder_new (); e_load_ui_builder_definition (priv->builder, "schedule-page.ui"); @@ -412,18 +408,6 @@ schedule_page_construct (SchedulePage *spage, EMeetingStore *ems) gtk_widget_show (GTK_WIDGET (priv->sel)); gtk_box_pack_start (GTK_BOX (priv->main), GTK_WIDGET (priv->sel), TRUE, TRUE, 6); - e_binding_new ( - shell_settings, "cal-show-week-numbers", - priv->sel, "show-week-numbers"); - - e_binding_new ( - shell_settings, "cal-use-24-hour-format", - priv->sel, "use-24-hour-format"); - - e_binding_new ( - shell_settings, "cal-week-start-day", - priv->sel, "week-start-day"); - if (!init_widgets (spage)) { g_message ("schedule_page_construct(): " "Could not initialize the widgets!"); diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c index 4a5b5b094e..c549633eb5 100644 --- a/calendar/gui/dialogs/task-details-page.c +++ b/calendar/gui/dialogs/task-details-page.c @@ -474,7 +474,6 @@ get_widgets (TaskDetailsPage *tdpage) priv->date_completed_label = GW ("date_completed_label"); priv->completed_date = GW ("completed-date"); - comp_editor_bind_date_edit_settings (priv->completed_date, NULL); gtk_widget_show (priv->completed_date); priv->url_label = GW ("url_label"); diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c index a3d4baec46..7e35cbe070 100644 --- a/calendar/gui/dialogs/task-editor.c +++ b/calendar/gui/dialogs/task-editor.c @@ -81,8 +81,10 @@ static const gchar *ui = " </menu>" " </menubar>" " <toolbar name='main-toolbar'>" -" <toolitem action='view-time-zone'/>" -" <toolitem action='option-status'/>" +" <placeholder name='content'>" +" <toolitem action='view-time-zone'/>" +" <toolitem action='option-status'/>" +" </placeholder>" " </toolbar>" "</ui>"; @@ -202,25 +204,12 @@ static void task_editor_constructed (GObject *object) { TaskEditorPrivate *priv; - EShellSettings *shell_settings; - EShell *shell; priv = TASK_EDITOR_GET_PRIVATE (object); - shell = comp_editor_get_shell (COMP_EDITOR (object)); - shell_settings = e_shell_get_shell_settings (shell); - e_binding_new ( object, "client", priv->model, "client"); - - e_binding_new ( - shell_settings, "cal-free-busy-template", - priv->model, "free-busy-template"); - - e_binding_new ( - shell_settings, "cal-timezone", - priv->model, "timezone"); } static void diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index 9a10f403d7..fb6338005f 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -1363,10 +1363,8 @@ get_widgets (TaskPage *tpage) /* Glade's visibility flag doesn't seem to work for custom widgets */ priv->due_date = e_builder_get_widget (priv->builder, "due-date"); - comp_editor_bind_date_edit_settings (priv->due_date, NULL); gtk_widget_show (priv->due_date); priv->start_date = e_builder_get_widget (priv->builder, "start-date"); - comp_editor_bind_date_edit_settings (priv->start_date, NULL); gtk_widget_show (priv->start_date); priv->timezone = e_builder_get_widget (priv->builder, "timezone"); |