diff options
author | Rodney Dawes <dobey#novell.com> | 2004-07-13 01:29:46 +0800 |
---|---|---|
committer | Rodney Dawes <dobey@src.gnome.org> | 2004-07-13 01:29:46 +0800 |
commit | e32aee64df4e58164851079e98e6e392a434f5cc (patch) | |
tree | f95f23ec94cc240efb40b34147c88266aa3799e0 | |
parent | 974f00331b0a67b68b9ecf3fb7da9a18e458fb3f (diff) | |
download | gsoc2013-evolution-e32aee64df4e58164851079e98e6e392a434f5cc.tar gsoc2013-evolution-e32aee64df4e58164851079e98e6e392a434f5cc.tar.gz gsoc2013-evolution-e32aee64df4e58164851079e98e6e392a434f5cc.tar.bz2 gsoc2013-evolution-e32aee64df4e58164851079e98e6e392a434f5cc.tar.lz gsoc2013-evolution-e32aee64df4e58164851079e98e6e392a434f5cc.tar.xz gsoc2013-evolution-e32aee64df4e58164851079e98e6e392a434f5cc.tar.zst gsoc2013-evolution-e32aee64df4e58164851079e98e6e392a434f5cc.zip |
Add this callback so we can set the paned position on realize
2004-07-12 Rodney Dawes <dobey#novell.com>
* gui/e-tasks.c (pane_realized): Add this callback so we can set the
paned position on realize
(setup_widgets): Move the paned widget to the priv structure so that
we can access it elsewhere
(display_view_cb): Set the paned position when the view gets displayed
Fixes #55653
svn path=/trunk/; revision=26624
-rw-r--r-- | calendar/ChangeLog | 10 | ||||
-rw-r--r-- | calendar/gui/e-tasks.c | 27 |
2 files changed, 29 insertions, 8 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index f399a6db53..4e7a31411e 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,13 @@ +2004-07-12 Rodney Dawes <dobey#novell.com> + + * gui/e-tasks.c (pane_realized): Add this callback so we can set the + paned position on realize + (setup_widgets): Move the paned widget to the priv structure so that + we can access it elsewhere + (display_view_cb): Set the paned position when the view gets displayed + + Fixes #55653 + 2004-07-12 Rodney Dawes <dobey@novell.com> * gui/dialogs/recur-comp.c (recur_component_dialog): diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c index aec5f15dd3..9f83428228 100644 --- a/calendar/gui/e-tasks.c +++ b/calendar/gui/e-tasks.c @@ -71,6 +71,9 @@ struct _ETasksPrivate { /* Calendar search bar for tasks */ GtkWidget *search_bar; + /* Paned widget */ + GtkWidget *paned; + /* The preview */ GtkWidget *preview; @@ -436,12 +439,17 @@ table_drag_data_delete (ETable *table, "</ETableState>" static void +pane_realized (GtkWidget *widget, ETasks *tasks) +{ + gtk_paned_set_position ((GtkPaned *)widget, calendar_config_get_task_vpane_pos ()); +} + +static void setup_widgets (ETasks *tasks) { ETasksPrivate *priv; ETable *etable; ECalModel *model; - GtkWidget *paned; priv = tasks->priv; @@ -456,13 +464,14 @@ setup_widgets (ETasks *tasks) gtk_widget_show (priv->search_bar); /* add the paned widget for the task list and task detail areas */ - paned = gtk_vpaned_new (); - gtk_paned_set_position (GTK_PANED (paned), calendar_config_get_task_vpane_pos ()); - g_signal_connect (G_OBJECT (paned), "button_release_event", + priv->paned = gtk_vpaned_new (); + g_signal_connect (priv->paned, "realize", G_CALLBACK (pane_realized), tasks); + + g_signal_connect (G_OBJECT (priv->paned), "button_release_event", G_CALLBACK (vpaned_resized_cb), tasks); - gtk_table_attach (GTK_TABLE (tasks), paned, 0, 1, 1, 2, + gtk_table_attach (GTK_TABLE (tasks), priv->paned, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); - gtk_widget_show (paned); + gtk_widget_show (priv->paned); /* create the task list */ priv->tasks_view = e_calendar_table_new (); @@ -471,7 +480,7 @@ setup_widgets (ETasks *tasks) etable = e_table_scrolled_get_table ( E_TABLE_SCROLLED (E_CALENDAR_TABLE (priv->tasks_view)->etable)); e_table_set_state (etable, E_TASKS_TABLE_DEFAULT_STATE); - gtk_paned_add1 (GTK_PANED (paned), priv->tasks_view); + gtk_paned_add1 (GTK_PANED (priv->paned), priv->tasks_view); gtk_widget_show (priv->tasks_view); @@ -504,7 +513,7 @@ setup_widgets (ETasks *tasks) /* create the task detail */ priv->preview = e_cal_component_preview_new (); e_cal_component_preview_set_default_timezone (E_CAL_COMPONENT_PREVIEW (priv->preview), calendar_config_get_icaltimezone ()); - gtk_paned_add2 (GTK_PANED (paned), priv->preview); + gtk_paned_add2 (GTK_PANED (priv->paned), priv->preview); gtk_widget_show (priv->preview); model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view)); @@ -1048,6 +1057,8 @@ display_view_cb (GalViewInstance *instance, GalView *view, gpointer data) if (GAL_IS_VIEW_ETABLE (view)) { gal_view_etable_attach_table (GAL_VIEW_ETABLE (view), e_table_scrolled_get_table (E_TABLE_SCROLLED (E_CALENDAR_TABLE (tasks->priv->tasks_view)->etable))); } + + gtk_paned_set_position ((GtkPaned *)tasks->priv->paned, calendar_config_get_task_vpane_pos ()); } /** |