aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/gncal-day-panel.c
diff options
context:
space:
mode:
authorRussell Steinthal <steintr@src.gnome.org>1999-10-20 09:04:47 +0800
committerRussell Steinthal <steintr@src.gnome.org>1999-10-20 09:04:47 +0800
commitefafad91e962fc685e8c2235b0d6e32f7e3808fb (patch)
tree0f100635d7292bd6a90230cd0839896a6a1b212d /calendar/gui/gncal-day-panel.c
parent741b64588529acd2291e3e1e6cf6eab91f020077 (diff)
downloadgsoc2013-evolution-efafad91e962fc685e8c2235b0d6e32f7e3808fb.tar
gsoc2013-evolution-efafad91e962fc685e8c2235b0d6e32f7e3808fb.tar.gz
gsoc2013-evolution-efafad91e962fc685e8c2235b0d6e32f7e3808fb.tar.bz2
gsoc2013-evolution-efafad91e962fc685e8c2235b0d6e32f7e3808fb.tar.lz
gsoc2013-evolution-efafad91e962fc685e8c2235b0d6e32f7e3808fb.tar.xz
gsoc2013-evolution-efafad91e962fc685e8c2235b0d6e32f7e3808fb.tar.zst
gsoc2013-evolution-efafad91e962fc685e8c2235b0d6e32f7e3808fb.zip
Add paned windows to Day View so user can adjust relative size of daily
calendar, todo list, and monthly calendar. (Applies patch posted to calendar-list since there were no objections) svn path=/trunk/; revision=1334
Diffstat (limited to 'calendar/gui/gncal-day-panel.c')
-rw-r--r--calendar/gui/gncal-day-panel.c48
1 files changed, 23 insertions, 25 deletions
diff --git a/calendar/gui/gncal-day-panel.c b/calendar/gui/gncal-day-panel.c
index f041e3d6dd..f407a497d3 100644
--- a/calendar/gui/gncal-day-panel.c
+++ b/calendar/gui/gncal-day-panel.c
@@ -95,6 +95,8 @@ gncal_day_panel_new (GnomeCalendar *calendar, time_t start_of_day)
{
GncalDayPanel *dpanel;
GtkWidget *w;
+ GtkWidget *hpane, *vpane;
+ gint start_pos = 265;
struct tm tm;
g_return_val_if_fail (calendar != NULL, NULL);
@@ -118,6 +120,15 @@ gncal_day_panel_new (GnomeCalendar *calendar, time_t start_of_day)
0, 0);
gtk_widget_show (w);
+ /* Create horizontal pane */
+
+ hpane = gtk_hpaned_new ();
+ gtk_table_attach (GTK_TABLE (dpanel), hpane,
+ 0, 1, 2, 4,
+ GTK_EXPAND | GTK_FILL | GTK_SHRINK,
+ GTK_EXPAND | GTK_FILL | GTK_SHRINK,
+ 0, 0);
+
/* Full day */
w = gtk_scrolled_window_new (NULL, NULL);
@@ -125,11 +136,8 @@ gncal_day_panel_new (GnomeCalendar *calendar, time_t start_of_day)
gtk_scrolled_window_set_policy (dpanel->fullday_sw,
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
- gtk_table_attach (GTK_TABLE (dpanel), w,
- 0, 1, 1, 4,
- GTK_EXPAND | GTK_FILL | GTK_SHRINK,
- GTK_EXPAND | GTK_FILL | GTK_SHRINK,
- 0, 0);
+ gtk_paned_pack1 (GTK_PANED (hpane), w, FALSE, TRUE);
+ /*gtk_paned_add1 (GTK_PANED (hpane), w);*/
gtk_widget_show (w);
w = gncal_full_day_new (calendar, time_day_begin (start_of_day), time_day_end (start_of_day));
@@ -146,6 +154,12 @@ gncal_day_panel_new (GnomeCalendar *calendar, time_t start_of_day)
(GtkSignalFunc) full_day_size_allocated,
dpanel);
+ /* Create vertical pane */
+
+ vpane = gtk_vpaned_new ();
+ gtk_paned_pack2 (GTK_PANED (hpane), GTK_WIDGET (vpane), TRUE, TRUE);
+ /*gtk_paned_add2 (GTK_PANED (hpane), GTK_WIDGET (vpane));*/
+
/* Gtk calendar */
tm = *localtime (&start_of_day);
@@ -165,38 +179,22 @@ gncal_day_panel_new (GnomeCalendar *calendar, time_t start_of_day)
dpanel);
gtk_signal_connect (GTK_OBJECT (dpanel->gtk_calendar), "month_changed",
GTK_SIGNAL_FUNC (retag_calendar), dpanel);
- gtk_table_attach (GTK_TABLE (dpanel), w,
- 1, 2, 1, 2,
- GTK_FILL | GTK_SHRINK,
- GTK_FILL | GTK_SHRINK,
- 0, 0);
- gtk_widget_show (w);
-
- /* Separator */
-
- w = gtk_hseparator_new ();
- gtk_table_attach (GTK_TABLE (dpanel), w,
- 1, 2, 2, 3,
- GTK_FILL | GTK_SHRINK,
- GTK_FILL | GTK_SHRINK,
- 0, 0);
+ gtk_paned_add1 (GTK_PANED (vpane), w);
gtk_widget_show (w);
/* To-do */
w = gncal_todo_new (calendar);
dpanel->todo = GNCAL_TODO (w);
- gtk_table_attach (GTK_TABLE (dpanel), w,
- 1, 2, 3, 4,
- GTK_FILL | GTK_SHRINK,
- GTK_EXPAND | GTK_FILL | GTK_SHRINK,
- 0, 0);
+ gtk_paned_add2 (GTK_PANED (vpane), w);
gtk_widget_show (w);
/* Done */
gncal_day_panel_set (dpanel, start_of_day);
+ gtk_paned_set_position (GTK_PANED (hpane), start_pos);
+
return GTK_WIDGET (dpanel);
}