diff options
author | Rodney Dawes <dobey@ximian.com> | 2004-01-27 05:56:03 +0800 |
---|---|---|
committer | Rodney Dawes <dobey@src.gnome.org> | 2004-01-27 05:56:03 +0800 |
commit | 8c939dca8ad71ce10c7758243385b12bced22449 (patch) | |
tree | 29d48aa1ffcc9ec96322ba147fd6b4ed9eb73f2b /shell | |
parent | b09318f2bbd4898494462aee9b47669b045dfde3 (diff) | |
download | gsoc2013-evolution-8c939dca8ad71ce10c7758243385b12bced22449.tar.gz gsoc2013-evolution-8c939dca8ad71ce10c7758243385b12bced22449.tar.zst gsoc2013-evolution-8c939dca8ad71ce10c7758243385b12bced22449.zip |
Add panded widget to EShellWindowPrivate and handle state saving of
2004-01-26 Rodney Dawes <dobey@ximian.com>
* e-shell-window.c (setup_widgets): Add panded widget to
EShellWindowPrivate and handle state saving of position (#52049)
* e-task-bar.c (init): Switch to EClippedLabel instead of GtkLabel
for the status bar text (#52937)
Fixes #52049 and #52937
svn path=/trunk/; revision=24448
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ChangeLog | 9 | ||||
-rw-r--r-- | shell/e-shell-window.c | 20 | ||||
-rw-r--r-- | shell/e-task-bar.c | 11 |
3 files changed, 29 insertions, 11 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 1954094a11..5b2b6fcb9f 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,12 @@ +2004-01-26 Rodney Dawes <dobey@ximian.com> + + * e-shell-window.c (setup_widgets): Add panded widget to + EShellWindowPrivate and handle state saving of position (#52049) + * e-task-bar.c (init): Switch to EClippedLabel instead of GtkLabel + for the status bar text (#52937) + + Fixes #52049 and #52937 + 2004-01-26 JP Rosevear <jpr@ximian.com> * e-shell.c (e_shell_construct): there is no splash screen any diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c index a427d28bbe..b74ca15374 100644 --- a/shell/e-shell-window.c +++ b/shell/e-shell-window.c @@ -84,6 +84,9 @@ struct _EShellWindowPrivate { /* All the ComponentViews. */ GSList *component_views; + /* The paned widget for the sidebar and component views */ + GtkWidget *paned; + /* The sidebar. */ GtkWidget *sidebar; @@ -544,17 +547,17 @@ setup_widgets (EShellWindow *window) { EShellWindowPrivate *priv = window->priv; EComponentRegistry *registry = e_shell_peek_component_registry (priv->shell); - GtkWidget *paned; + GConfClient *gconf_client = gconf_client_get_default (); GtkWidget *contents_vbox; GSList *p; int button_id; - paned = gtk_hpaned_new (); + priv->paned = gtk_hpaned_new (); priv->sidebar = e_sidebar_new (); g_signal_connect (priv->sidebar, "button_selected", G_CALLBACK (sidebar_button_selected_callback), window); - gtk_paned_pack1 (GTK_PANED (paned), priv->sidebar, FALSE, FALSE); + gtk_paned_pack1 (GTK_PANED (priv->paned), priv->sidebar, FALSE, FALSE); priv->sidebar_notebook = gtk_notebook_new (); gtk_notebook_set_show_tabs (GTK_NOTEBOOK (priv->sidebar_notebook), FALSE); @@ -564,9 +567,10 @@ setup_widgets (EShellWindow *window) priv->view_notebook = gtk_notebook_new (); gtk_notebook_set_show_tabs (GTK_NOTEBOOK (priv->view_notebook), FALSE); gtk_notebook_set_show_border (GTK_NOTEBOOK (priv->view_notebook), FALSE); - gtk_paned_pack2 (GTK_PANED (paned), priv->view_notebook, TRUE, TRUE); + gtk_paned_pack2 (GTK_PANED (priv->paned), priv->view_notebook, TRUE, TRUE); - gtk_paned_set_position (GTK_PANED (paned), 200); + gtk_paned_set_position (GTK_PANED (priv->paned), + gconf_client_get_int (gconf_client, "/apps/evolution/shell/view_defaults/folder_bar/width", NULL)); button_id = 0; for (p = e_component_registry_peek_list (registry); p != NULL; p = p->next) { @@ -582,7 +586,7 @@ setup_widgets (EShellWindow *window) setup_status_bar (window); contents_vbox = gtk_vbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (contents_vbox), paned, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (contents_vbox), priv->paned, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (contents_vbox), priv->status_bar, FALSE, TRUE, 0); gtk_widget_show_all (contents_vbox); @@ -590,6 +594,7 @@ setup_widgets (EShellWindow *window) gtk_widget_hide (priv->menu_hint_label); bonobo_window_set_contents (BONOBO_WINDOW (window), contents_vbox); + g_object_unref (gconf_client); } @@ -810,6 +815,9 @@ e_shell_window_save_defaults (EShellWindow *window) gconf_client_set_int (client, "/apps/evolution/shell/view_defaults/height", GTK_WIDGET (window)->allocation.height, NULL); + gconf_client_set_int (client, "/apps/evolution/shell/view_defaults/folder_bar/width", + gtk_paned_get_position (GTK_PANED (window->priv->paned)), NULL); + g_object_unref (client); } diff --git a/shell/e-task-bar.c b/shell/e-task-bar.c index 7a706fd290..02ca5cbcdf 100644 --- a/shell/e-task-bar.c +++ b/shell/e-task-bar.c @@ -27,12 +27,12 @@ #include "e-task-bar.h" #include <gal/util/e-util.h> -#include <gtk/gtklabel.h> +#include "widgets/misc/e-clipped-label.h" struct _ETaskBarPrivate { - GtkLabel *message_label; + EClippedLabel *message_label; GtkHBox *hbox; }; @@ -103,11 +103,11 @@ init (ETaskBar *task_bar) gtk_box_set_spacing (GTK_BOX (task_bar), 10); - label = gtk_label_new (""); + label = e_clipped_label_new ("", PANGO_WEIGHT_NORMAL, 1.0); gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (task_bar), label, FALSE, TRUE, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); - task_bar->priv->message_label = GTK_LABEL (label); + task_bar->priv->message_label = E_CLIPPED_LABEL (label); hbox = gtk_hbox_new (0, FALSE); gtk_widget_show (hbox); @@ -142,7 +142,8 @@ e_task_bar_set_message (ETaskBar *task_bar, { if (message) { gtk_widget_show (GTK_WIDGET (task_bar->priv->message_label)); - gtk_label_set_text (task_bar->priv->message_label, message); + e_clipped_label_set_text (task_bar->priv->message_label, + message); } else { e_task_bar_unset_message (task_bar); } |