aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-01-19 21:10:36 +0800
committerMilan Crha <mcrha@src.gnome.org>2009-01-19 21:10:36 +0800
commitae26a9a5fb34beb48e4161c8f145b0fb2d3cb3a9 (patch)
treee7eaffe89d351ff96ac07acba1d8222abc4c94c0 /calendar/gui/dialogs
parentfe416afe35ea272263dea6a526dd383b5fb24c16 (diff)
downloadgsoc2013-evolution-ae26a9a5fb34beb48e4161c8f145b0fb2d3cb3a9.tar.gz
gsoc2013-evolution-ae26a9a5fb34beb48e4161c8f145b0fb2d3cb3a9.tar.zst
gsoc2013-evolution-ae26a9a5fb34beb48e4161c8f145b0fb2d3cb3a9.zip
** Fix for bug #200254
2009-01-19 Milan Crha <mcrha@redhat.com> ** Fix for bug #200254 * gui/apps_evolution_calendar.schemas.in: * gui/dialogs/cal-prefs-dialog.glade: * gui/dialogs/cal-prefs-dialog.h: (struct _CalendarPrefsDialog): * gui/dialogs/cal-prefs-dialog.c: (dview_show_week_no_toggled), (setup_changes), (show_config), (calendar_prefs_dialog_construct): * gui/calendar-config-keys.h: * gui/calendar-config.h: * gui/calendar-config.c: (calendar_config_get_dview_show_week_no), (calendar_config_set_dview_show_week_no), (calendar_config_add_notification_dview_show_week_no): New option whether to show week number in Day and Work Week view. * gui/e-day-view.h: (struct _EDayView), (e_day_view_get_show_week_number), (e_day_view_set_show_week_number): * gui/e-day-view.c: (dview_show_week_no_changed_cb), (e_day_view_init), (e_day_view_destroy), (e_day_view_recalc_day_starts), (e_day_view_get_show_week_number), (e_day_view_set_show_week_number): New widget showing week number of the first day in a view. svn path=/trunk/; revision=37096
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.c11
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.glade18
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.h1
3 files changed, 30 insertions, 0 deletions
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c
index 38871c2f89..8cec102e4a 100644
--- a/calendar/gui/dialogs/cal-prefs-dialog.c
+++ b/calendar/gui/dialogs/cal-prefs-dialog.c
@@ -333,6 +333,12 @@ dnav_show_week_no_toggled (GtkToggleButton *toggle, CalendarPrefsDialog *prefs)
}
static void
+dview_show_week_no_toggled (GtkToggleButton *toggle, CalendarPrefsDialog *prefs)
+{
+ calendar_config_set_dview_show_week_no (gtk_toggle_button_get_active (toggle));
+}
+
+static void
hide_completed_tasks_toggled (GtkToggleButton *toggle, CalendarPrefsDialog *prefs)
{
gboolean hide;
@@ -483,6 +489,7 @@ setup_changes (CalendarPrefsDialog *prefs)
g_signal_connect (G_OBJECT (prefs->show_end_times), "toggled", G_CALLBACK (show_end_times_toggled), prefs);
g_signal_connect (G_OBJECT (prefs->compress_weekend), "toggled", G_CALLBACK (compress_weekend_toggled), prefs);
g_signal_connect (G_OBJECT (prefs->dnav_show_week_no), "toggled", G_CALLBACK (dnav_show_week_no_toggled), prefs);
+ g_signal_connect (G_OBJECT (prefs->dview_show_week_no), "toggled", G_CALLBACK (dview_show_week_no_toggled), prefs);
g_signal_connect (G_OBJECT (prefs->tasks_hide_completed), "toggled",
G_CALLBACK (hide_completed_tasks_toggled), prefs);
@@ -654,6 +661,9 @@ show_config (CalendarPrefsDialog *prefs)
/* Date Navigator - Show Week Numbers. */
e_dialog_toggle_set (prefs->dnav_show_week_no, calendar_config_get_dnav_show_week_no ());
+ /* Day/Work Week view - Show Week Number. */
+ e_dialog_toggle_set (prefs->dview_show_week_no, calendar_config_get_dview_show_week_no ());
+
/* Task list */
show_task_list_config (prefs);
@@ -755,6 +765,7 @@ calendar_prefs_dialog_construct (CalendarPrefsDialog *prefs)
prefs->show_end_times = glade_xml_get_widget (gui, "show_end_times");
prefs->compress_weekend = glade_xml_get_widget (gui, "compress_weekend");
prefs->dnav_show_week_no = glade_xml_get_widget (gui, "dnav_show_week_no");
+ prefs->dview_show_week_no = glade_xml_get_widget (gui, "dview_show_week_no");
prefs->tasks_due_today_color = glade_xml_get_widget (gui, "tasks_due_today_color");
prefs->tasks_overdue_color = glade_xml_get_widget (gui, "tasks_overdue_color");
prefs->tasks_hide_completed = glade_xml_get_widget (gui, "tasks_hide_completed");
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.glade b/calendar/gui/dialogs/cal-prefs-dialog.glade
index 0282d17d4d..9f7f6a8092 100644
--- a/calendar/gui/dialogs/cal-prefs-dialog.glade
+++ b/calendar/gui/dialogs/cal-prefs-dialog.glade
@@ -1176,6 +1176,24 @@ Days</property>
<property name="fill">False</property>
</packing>
</child>
+ <child>
+ <widget class="GtkCheckButton" id="dview_show_week_no">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Show week n_umber in Day and Work Week View</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>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.h b/calendar/gui/dialogs/cal-prefs-dialog.h
index 24682a6cc7..512d5d06c6 100644
--- a/calendar/gui/dialogs/cal-prefs-dialog.h
+++ b/calendar/gui/dialogs/cal-prefs-dialog.h
@@ -62,6 +62,7 @@ struct _CalendarPrefsDialog {
GtkWidget *show_end_times;
GtkWidget *compress_weekend;
GtkWidget *dnav_show_week_no;
+ GtkWidget *dview_show_week_no;
GtkWidget *tasks_due_today_color;
GtkWidget *tasks_overdue_color;
GtkWidget *tasks_hide_completed;