aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-folder-title-bar.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-02-23 03:27:52 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-02-23 03:27:52 +0800
commit2c66be6ec9f15771110b0e34f3159a6f3b17df4e (patch)
tree0a053c732e307a6e0ba7b7bada35d185299b44b8 /shell/e-shell-folder-title-bar.c
parent2dd28d3e915503f147dfd65b1d1627cb781e1dfa (diff)
downloadgsoc2013-evolution-2c66be6ec9f15771110b0e34f3159a6f3b17df4e.tar
gsoc2013-evolution-2c66be6ec9f15771110b0e34f3159a6f3b17df4e.tar.gz
gsoc2013-evolution-2c66be6ec9f15771110b0e34f3159a6f3b17df4e.tar.bz2
gsoc2013-evolution-2c66be6ec9f15771110b0e34f3159a6f3b17df4e.tar.lz
gsoc2013-evolution-2c66be6ec9f15771110b0e34f3159a6f3b17df4e.tar.xz
gsoc2013-evolution-2c66be6ec9f15771110b0e34f3159a6f3b17df4e.tar.zst
gsoc2013-evolution-2c66be6ec9f15771110b0e34f3159a6f3b17df4e.zip
New. (display_uri): Call it before returning so the navigation buttons
* e-shell-view.c (update_navigation_buttons): New. (display_uri): Call it before returning so the navigation buttons always have the right sensitivity. * e-shell-folder-title-bar.c (e_shell_folder_title_bar_update_navigation_buttons): New. (add_navigation_buttons): Remove the "Back" label. svn path=/trunk/; revision=15799
Diffstat (limited to 'shell/e-shell-folder-title-bar.c')
-rw-r--r--shell/e-shell-folder-title-bar.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/shell/e-shell-folder-title-bar.c b/shell/e-shell-folder-title-bar.c
index ef9801f6e8..7e90e9bbce 100644
--- a/shell/e-shell-folder-title-bar.c
+++ b/shell/e-shell-folder-title-bar.c
@@ -390,7 +390,7 @@ static void
add_navigation_buttons (EShellFolderTitleBar *folder_title_bar)
{
EShellFolderTitleBarPrivate *priv;
- GtkWidget *back_label, *back_pixmap, *back_box;
+ GtkWidget *back_pixmap;
GtkWidget *forward_pixmap;
priv = folder_title_bar->priv;
@@ -399,15 +399,8 @@ add_navigation_buttons (EShellFolderTitleBar *folder_title_bar)
gtk_button_set_relief (GTK_BUTTON (priv->back_button), GTK_RELIEF_NONE);
GTK_WIDGET_UNSET_FLAGS (priv->back_button, GTK_CAN_FOCUS);
- back_label = gtk_label_new (_("Back"));
- set_title_bar_label_style (back_label);
back_pixmap = create_pixmap_widget_from_xpm (left_arrow_xpm);
-
- back_box = gtk_hbox_new (FALSE, 2);
- gtk_box_pack_start (GTK_BOX (back_box), back_pixmap, FALSE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (back_box), back_label, FALSE, TRUE, 0);
-
- gtk_container_add (GTK_CONTAINER (priv->back_button), back_box);
+ gtk_container_add (GTK_CONTAINER (priv->back_button), back_pixmap);
gtk_signal_connect (GTK_OBJECT (priv->back_button), "clicked",
GTK_SIGNAL_FUNC (back_button_clicked_callback), folder_title_bar);
@@ -593,6 +586,7 @@ init (EShellFolderTitleBar *shell_folder_title_bar)
priv->title_button_label = NULL;
priv->title_button = NULL;
priv->title_button_arrow = NULL;
+
priv->back_button = NULL;
priv->forward_button = NULL;
@@ -843,4 +837,21 @@ e_shell_folder_title_bar_set_title_clickable (EShellFolderTitleBar *folder_title
}
+void
+e_shell_folder_title_bar_update_navigation_buttons (EShellFolderTitleBar *folder_title_bar,
+ gboolean can_go_back,
+ gboolean can_go_forward)
+{
+ EShellFolderTitleBarPrivate *priv;
+
+ g_return_if_fail (folder_title_bar != NULL);
+ g_return_if_fail (E_IS_SHELL_FOLDER_TITLE_BAR (folder_title_bar));
+
+ priv = folder_title_bar->priv;
+
+ gtk_widget_set_sensitive (priv->back_button, can_go_back);
+ gtk_widget_set_sensitive (priv->forward_button, can_go_forward);
+}
+
+
E_MAKE_TYPE (e_shell_folder_title_bar, "EShellFolderTitleBar", EShellFolderTitleBar, class_init, init, PARENT_TYPE)