aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-folder-title-bar.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-08-05 12:33:57 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-08-05 12:33:57 +0800
commitbd2f1603e5eb577e9b57ecf02701e5bfbfebb9b0 (patch)
tree6fbd2491f8b7814f1e280d2727e0ec130079e83f /shell/e-shell-folder-title-bar.c
parent90b888b8af55c61c3af7d8356c4314aed2913a90 (diff)
downloadgsoc2013-evolution-bd2f1603e5eb577e9b57ecf02701e5bfbfebb9b0.tar
gsoc2013-evolution-bd2f1603e5eb577e9b57ecf02701e5bfbfebb9b0.tar.gz
gsoc2013-evolution-bd2f1603e5eb577e9b57ecf02701e5bfbfebb9b0.tar.bz2
gsoc2013-evolution-bd2f1603e5eb577e9b57ecf02701e5bfbfebb9b0.tar.lz
gsoc2013-evolution-bd2f1603e5eb577e9b57ecf02701e5bfbfebb9b0.tar.xz
gsoc2013-evolution-bd2f1603e5eb577e9b57ecf02701e5bfbfebb9b0.tar.zst
gsoc2013-evolution-bd2f1603e5eb577e9b57ecf02701e5bfbfebb9b0.zip
Add some padding to the label so that the title doesn't move around when
* e-shell-folder-title-bar.c (e_shell_folder_title_bar_construct): Add some padding to the label so that the title doesn't move around when you switch between pop-up and non-pop-up folder bar. Also, change all the GtkLabels to be GtkClippedLabels instead. (e_shell_folder_title_bar_set_title): Updated to use EClippedLabels instead of GtkLabels. (e_shell_folder_title_bar_set_folder_bar_label): Likewise. * e-shell.c (impl_Shell__get_displayName): New, implementation for the `displayName' attribute. * Evolution-Shell.idl: Added readonly attribute `displayName' to get the canonicalized X11 display name for the shell. * e-shell.c (e_shell_construct): Ooops. Return `E_SHELL_CONSTRUCT_RESULT_CANNOTREGISTER' if the OAF registration fails, not `E_SHELL_CONSTRUCT_RESULT_GENERICERROR'. * e-shortcuts-view.c (rename_group_cb): Get the toplevel from the shortcuts view, not the widget. (rename_shortcut_cb): Likewise. (show_new_group_dialog): Changed to use `e_request_string()'. * evolution-test-component.c: Add the %FALSE value for the `user_creatable' field in the `folder_types' entry. * evolution-shell-client.c: New member `shortcuts_interface' in `EvolutionShellClientPrivate'. (destroy): Unref it if not CORBA_OBJECT_NIL. (init): Init to CORBA_OBJECT_NIL. (query_shell_interface): New helper function to query an interface on the shell and spit out warnings if it fails. (evolution_shell_client_construct): Use it to query the ::Activity interface. Also query the ::Shortcuts interface and set the `shortcuts_interface' member to point to it. * e-shell.c: New member `corba_shortcuts' in `EShellPrivate'. (init): Init to NULL. (setup_shortcuts_interface): Helper function to add the ::Shortcuts CORBA interface to the shell. (e_shell_construct): Call it. * e-corba-shortcuts.c, e-corba-shortcuts.h: New objects implementing the `Evolution::Shortcuts' CORBA interface. * Evolution-Shortcuts.idl: New interface for accessing the shortcuts in the shell. * e-shell.c (e_shell_get_config_db): Moved down. svn path=/trunk/; revision=11689
Diffstat (limited to 'shell/e-shell-folder-title-bar.c')
-rw-r--r--shell/e-shell-folder-title-bar.c32
1 files changed, 20 insertions, 12 deletions
diff --git a/shell/e-shell-folder-title-bar.c b/shell/e-shell-folder-title-bar.c
index d69d8d0884..3d43a1e417 100644
--- a/shell/e-shell-folder-title-bar.c
+++ b/shell/e-shell-folder-title-bar.c
@@ -379,15 +379,15 @@ e_shell_folder_title_bar_construct (EShellFolderTitleBar *folder_title_bar)
priv = folder_title_bar->priv;
widget = GTK_WIDGET (folder_title_bar);
- priv->label = gtk_label_new ("");
+ priv->label = e_clipped_label_new ("");
gtk_misc_set_padding (GTK_MISC (priv->label), 5, 0);
gtk_misc_set_alignment (GTK_MISC (priv->label), 0.0, 0.5);
- priv->folder_bar_label = gtk_label_new ("");
+ priv->folder_bar_label = e_clipped_label_new ("");
gtk_misc_set_alignment (GTK_MISC (priv->folder_bar_label), 1.0, 0.5);
gtk_widget_show (priv->folder_bar_label);
- priv->button_label = gtk_label_new ("");
+ priv->button_label = e_clipped_label_new ("");
gtk_misc_set_padding (GTK_MISC (priv->button_label), 2, 0);
gtk_misc_set_alignment (GTK_MISC (priv->button_label), 0.0, 0.5);
gtk_widget_show (priv->button_label);
@@ -406,9 +406,17 @@ e_shell_folder_title_bar_construct (EShellFolderTitleBar *folder_title_bar)
priv->hbox = gtk_hbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (priv->hbox), 2);
- gtk_box_pack_start (GTK_BOX (priv->hbox), priv->label, FALSE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (priv->hbox), priv->button, FALSE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (priv->hbox), priv->folder_bar_label, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (priv->hbox), priv->label, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (priv->hbox), priv->button, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (priv->hbox), priv->folder_bar_label, FALSE, TRUE, 0);
+
+ /* Make the label have a border as large as the button's.
+ FIXME: This is really hackish. The hardcoded numbers should be OK
+ as the padding is hardcoded in GtkButton too (see CHILD_SPACING in
+ gtkbutton.c). */
+ gtk_misc_set_padding (GTK_MISC (priv->label),
+ GTK_WIDGET (priv->button)->style->klass->xthickness + 3,
+ GTK_WIDGET (priv->button)->style->klass->ythickness + 1);
gtk_widget_show (priv->hbox);
@@ -466,11 +474,11 @@ e_shell_folder_title_bar_set_title (EShellFolderTitleBar *folder_title_bar,
priv = folder_title_bar->priv;
if (title == NULL) {
- gtk_label_set_text (GTK_LABEL (priv->button_label), _("(Untitled)"));
- gtk_label_set_text (GTK_LABEL (priv->label), _("(Untitled)"));
+ e_clipped_label_set_text (E_CLIPPED_LABEL (priv->button_label), _("(Untitled)"));
+ e_clipped_label_set_text (E_CLIPPED_LABEL (priv->label), _("(Untitled)"));
} else {
- gtk_label_set_text (GTK_LABEL (priv->button_label), title);
- gtk_label_set_text (GTK_LABEL (priv->label), title);
+ e_clipped_label_set_text (E_CLIPPED_LABEL (priv->button_label), title);
+ e_clipped_label_set_text (E_CLIPPED_LABEL (priv->label), title);
}
/* FIXME: There seems to be a bug in EClippedLabel, this is just a workaround. */
@@ -497,9 +505,9 @@ e_shell_folder_title_bar_set_folder_bar_label (EShellFolderTitleBar *folder_titl
priv = folder_title_bar->priv;
if (text == NULL)
- gtk_label_set_text (GTK_LABEL (priv->folder_bar_label), "");
+ e_clipped_label_set_text (E_CLIPPED_LABEL (priv->folder_bar_label), "");
else
- gtk_label_set_text (GTK_LABEL (priv->folder_bar_label), text);
+ e_clipped_label_set_text (E_CLIPPED_LABEL (priv->folder_bar_label), text);
/* FIXME: Might want to set the styles somewhere in here too,
black text on grey background isn't the best combination */