aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-05-01 02:51:39 +0800
committerMilan Crha <mcrha@redhat.com>2009-05-01 02:51:39 +0800
commit7961048944d446f523a9ed12c811d7c2e8a47e97 (patch)
treea63b03bbde46b46163e794ded10f2e22276a3295 /calendar/gui/dialogs
parent8f2b4f9c6554698af19a39223acc33f965e2dfca (diff)
downloadgsoc2013-evolution-7961048944d446f523a9ed12c811d7c2e8a47e97.tar.gz
gsoc2013-evolution-7961048944d446f523a9ed12c811d7c2e8a47e97.tar.zst
gsoc2013-evolution-7961048944d446f523a9ed12c811d7c2e8a47e97.zip
Bug #273818 - Allow scrolling Month View by a week only
Edit->Preferences->Calendar and Tasks, tab Display, option Scroll Month View by a week.
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.glade19
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.h1
3 files changed, 31 insertions, 0 deletions
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c
index 60678d93e1..0e1f0f05d1 100644
--- a/calendar/gui/dialogs/cal-prefs-dialog.c
+++ b/calendar/gui/dialogs/cal-prefs-dialog.c
@@ -325,6 +325,12 @@ dview_show_week_no_toggled (GtkToggleButton *toggle, CalendarPrefsDialog *prefs)
}
static void
+month_scroll_by_week_toggled (GtkToggleButton *toggle, CalendarPrefsDialog *prefs)
+{
+ calendar_config_set_month_scroll_by_week (gtk_toggle_button_get_active (toggle));
+}
+
+static void
hide_completed_tasks_toggled (GtkToggleButton *toggle, CalendarPrefsDialog *prefs)
{
gboolean hide;
@@ -528,6 +534,7 @@ setup_changes (CalendarPrefsDialog *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->month_scroll_by_week), "toggled", G_CALLBACK (month_scroll_by_week_toggled), prefs);
g_signal_connect (G_OBJECT (prefs->tasks_hide_completed), "toggled",
G_CALLBACK (hide_completed_tasks_toggled), prefs);
@@ -704,6 +711,9 @@ show_config (CalendarPrefsDialog *prefs)
/* Day/Work Week view - Show Week Number. */
e_dialog_toggle_set (prefs->dview_show_week_no, calendar_config_get_dview_show_week_no ());
+ /* Month View - Scroll by a week */
+ e_dialog_toggle_set (prefs->month_scroll_by_week, calendar_config_get_month_scroll_by_week ());
+
/* Task list */
show_task_list_config (prefs);
@@ -817,6 +827,7 @@ calendar_prefs_dialog_construct (CalendarPrefsDialog *prefs)
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->month_scroll_by_week = glade_xml_get_widget (gui, "month_scroll_by_week");
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 867abdbb22..a279ad1107 100644
--- a/calendar/gui/dialogs/cal-prefs-dialog.glade
+++ b/calendar/gui/dialogs/cal-prefs-dialog.glade
@@ -1368,6 +1368,25 @@ Days</property>
<property name="fill">False</property>
</packing>
</child>
+
+ <child>
+ <widget class="GtkCheckButton" id="month_scroll_by_week">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Sc_roll Month View by a week</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 559eacced7..30b62440e5 100644
--- a/calendar/gui/dialogs/cal-prefs-dialog.h
+++ b/calendar/gui/dialogs/cal-prefs-dialog.h
@@ -67,6 +67,7 @@ struct _CalendarPrefsDialog {
GtkWidget *compress_weekend;
GtkWidget *dnav_show_week_no;
GtkWidget *dview_show_week_no;
+ GtkWidget *month_scroll_by_week;
GtkWidget *tasks_due_today_color;
GtkWidget *tasks_overdue_color;
GtkWidget *tasks_hide_completed;