[gnome-terminal] tab-label: Rely on new GTK+ API to center the label



commit 9025407dd24341528dee41b175020226af08c0a8
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Jan 28 13:37:12 2015 +0100

    tab-label: Rely on new GTK+ API to center the label
    
    https://bugzilla.gnome.org/show_bug.cgi?id=743663

 src/terminal-tab-label.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/terminal-tab-label.c b/src/terminal-tab-label.c
index 6e99da9..0850652 100644
--- a/src/terminal-tab-label.c
+++ b/src/terminal-tab-label.c
@@ -196,7 +196,11 @@ terminal_tab_label_constructed (GObject *object)
   gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
   gtk_label_set_single_line_mode (GTK_LABEL (label), TRUE);
 
+#if GTK_CHECK_VERSION (3, 12, 0)
+  gtk_box_set_center_widget (GTK_BOX (hbox), label);
+#else
   gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
+#endif
 
   priv->close_button = close_button = terminal_close_button_new ();
   gtk_widget_set_tooltip_text (close_button, _("Close tab"));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]