aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-07-11 02:11:48 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-07-11 02:11:48 +0800
commit31fd01398cc76d3c00abbc05d419dfe873bc04c6 (patch)
tree35c238cdb2a8a68936fa659e5269e75ee0042b49 /calendar/gui/dialogs
parentf9049cded460a9e316fa83ff1941970abfe0fd09 (diff)
parent10fef4ac0f4ef7dc907e8bfae9844d4e8be3d80d (diff)
downloadgsoc2013-evolution-31fd01398cc76d3c00abbc05d419dfe873bc04c6.tar
gsoc2013-evolution-31fd01398cc76d3c00abbc05d419dfe873bc04c6.tar.gz
gsoc2013-evolution-31fd01398cc76d3c00abbc05d419dfe873bc04c6.tar.bz2
gsoc2013-evolution-31fd01398cc76d3c00abbc05d419dfe873bc04c6.tar.lz
gsoc2013-evolution-31fd01398cc76d3c00abbc05d419dfe873bc04c6.tar.xz
gsoc2013-evolution-31fd01398cc76d3c00abbc05d419dfe873bc04c6.tar.zst
gsoc2013-evolution-31fd01398cc76d3c00abbc05d419dfe873bc04c6.zip
Merge branch 'master' into kill-bonobo
Conflicts: addressbook/util/addressbook.h calendar/gui/e-week-view-main-item.c configure.ac e-util/Makefile.am mail/em-account-editor.c mail/em-folder-selection-button.c shell/e-shell.c
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.c33
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.glade137
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.h1
3 files changed, 128 insertions, 43 deletions
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c
index af4c4b8e1a..b7b6e33fcf 100644
--- a/calendar/gui/dialogs/cal-prefs-dialog.c
+++ b/calendar/gui/dialogs/cal-prefs-dialog.c
@@ -435,6 +435,18 @@ ba_reminder_units_changed (GtkWidget *widget, CalendarPrefsDialog *prefs)
}
static void
+notify_with_tray_toggled (GtkToggleButton *toggle, CalendarPrefsDialog *prefs)
+{
+ GConfClient *gconf;
+
+ g_return_if_fail (toggle != NULL);
+
+ gconf = gconf_client_get_default ();
+ gconf_client_set_bool (gconf, "/apps/evolution/calendar/notify/notify_with_tray", gtk_toggle_button_get_active (toggle), NULL);
+ g_object_unref (gconf);
+}
+
+static void
alarms_selection_changed (ESourceSelector *selector, CalendarPrefsDialog *prefs)
{
ESourceList *source_list = prefs->alarms_list;
@@ -550,6 +562,7 @@ setup_changes (CalendarPrefsDialog *prefs)
G_CALLBACK (ba_reminder_interval_changed), prefs);
g_signal_connect (G_OBJECT (prefs->ba_reminder_units), "changed", G_CALLBACK (ba_reminder_units_changed), prefs);
+ g_signal_connect (G_OBJECT (prefs->notify_with_tray), "toggled", G_CALLBACK (notify_with_tray_toggled), prefs);
g_signal_connect (G_OBJECT (prefs->alarm_list_widget), "selection_changed", G_CALLBACK (alarms_selection_changed), prefs);
@@ -623,14 +636,19 @@ initialize_selection (ESourceSelector *selector, ESourceList *source_list)
static void
show_alarms_config (CalendarPrefsDialog *prefs)
{
- if (!e_cal_get_sources (&prefs->alarms_list, E_CAL_SOURCE_TYPE_EVENT, NULL))
- return;
+ GConfClient *gconf;
+
+ if (e_cal_get_sources (&prefs->alarms_list, E_CAL_SOURCE_TYPE_EVENT, NULL)) {
+ prefs->alarm_list_widget = e_source_selector_new (prefs->alarms_list);
+ atk_object_set_name (gtk_widget_get_accessible (prefs->alarm_list_widget), _("Selected Calendars for Alarms"));
+ gtk_container_add (GTK_CONTAINER (prefs->scrolled_window), prefs->alarm_list_widget);
+ gtk_widget_show (prefs->alarm_list_widget);
+ initialize_selection (E_SOURCE_SELECTOR (prefs->alarm_list_widget), prefs->alarms_list);
+ }
- prefs->alarm_list_widget = e_source_selector_new (prefs->alarms_list);
- atk_object_set_name (gtk_widget_get_accessible (prefs->alarm_list_widget), _("Selected Calendars for Alarms"));
- gtk_container_add (GTK_CONTAINER (prefs->scrolled_window), prefs->alarm_list_widget);
- gtk_widget_show (prefs->alarm_list_widget);
- initialize_selection (E_SOURCE_SELECTOR (prefs->alarm_list_widget), prefs->alarms_list);
+ gconf = gconf_client_get_default ();
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (prefs->notify_with_tray), gconf_client_get_bool (gconf, "/apps/evolution/calendar/notify/notify_with_tray", NULL));
+ g_object_unref (gconf);
}
/* Shows the current config settings in the dialog. */
@@ -844,6 +862,7 @@ calendar_prefs_dialog_construct (CalendarPrefsDialog *prefs,
/* Alarms tab */
+ prefs->notify_with_tray = glade_xml_get_widget (gui, "notify_with_tray");
prefs->scrolled_window = glade_xml_get_widget (gui, "calendar-source-scrolled-window");
/* Free/Busy tab */
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.glade b/calendar/gui/dialogs/cal-prefs-dialog.glade
index 9f2617db04..63e9e6092f 100644
--- a/calendar/gui/dialogs/cal-prefs-dialog.glade
+++ b/calendar/gui/dialogs/cal-prefs-dialog.glade
@@ -1045,42 +1045,107 @@ Days</property>
<property name="visible">True</property>
<property name="border_width">12</property>
<property name="spacing">6</property>
- <child>
- <widget class="GtkHBox" id="hbox24">
- <property name="visible">True</property>
- <child>
- <widget class="GtkLabel" id="label62">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Select the calendars for alarm notification</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget 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>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkLabel" id="label65">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;span weight=&quot;bold&quot;&gt;Alarms&lt;/span&gt;</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</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>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget 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>
+ <widget class="GtkCheckButton" id="notify_with_tray">
+ <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="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>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget 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>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget 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>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="position">2</property>
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.h b/calendar/gui/dialogs/cal-prefs-dialog.h
index 397cb35cfa..0889a395bf 100644
--- a/calendar/gui/dialogs/cal-prefs-dialog.h
+++ b/calendar/gui/dialogs/cal-prefs-dialog.h
@@ -93,6 +93,7 @@ struct _CalendarPrefsDialog {
GtkWidget *tasks_hide_completed_units;
/* Alarms tab */
+ GtkWidget *notify_with_tray;
GtkWidget *scrolled_window;
ESourceList *alarms_list;
GtkWidget *alarm_list_widget;