[Xfce4-commits] <midori:master> Re-use saved ellipsize in midori_view_update_tab_title
Christian Dywan
noreply at xfce.org
Sat Aug 25 17:06:03 CEST 2012
Updating branch refs/heads/master
to 6757898c9533f7efbc67c4309e3edf9c06bdcdde (commit)
from 879d6c41a7ba57908a1884e268de03f1be7e0c91 (commit)
commit 6757898c9533f7efbc67c4309e3edf9c06bdcdde
Author: Christian Dywan <christian at twotoasts.de>
Date: Sat Aug 25 16:11:37 2012 +0200
Re-use saved ellipsize in midori_view_update_tab_title
midori/midori-view.c | 22 ++++++++--------------
1 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/midori/midori-view.c b/midori/midori-view.c
index 4d7ffe7..f9d3414 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -5176,20 +5176,14 @@ midori_view_tab_icon_style_set_cb (GtkWidget* tab_close,
#endif
static void
-midori_view_update_tab_title (GtkWidget* label,
- gint size,
- gdouble angle)
+midori_view_update_tab_title (MidoriView* view,
+ gdouble angle)
{
- if (angle == 0.0 || angle == 360.0)
- {
- if (gtk_label_get_ellipsize (GTK_LABEL (label)) != PANGO_ELLIPSIZE_START)
- gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
- }
+ if (angle == 0.0)
+ gtk_label_set_ellipsize (GTK_LABEL (view->tab_title), view->ellipsize);
else
- {
- gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_NONE);
- }
- gtk_label_set_angle (GTK_LABEL (label), angle);
+ gtk_label_set_ellipsize (GTK_LABEL (view->tab_title), PANGO_ELLIPSIZE_NONE);
+ gtk_label_set_angle (GTK_LABEL (view->tab_title), angle);
}
static void
@@ -5273,7 +5267,7 @@ midori_view_tab_label_parent_set (GtkWidget* tab_label,
gtk_widget_show (box);
}
- midori_view_update_tab_title (view->tab_title, 10, angle);
+ midori_view_update_tab_title (view, angle);
/* FIXME: Connect orientation notification */
}
@@ -5357,7 +5351,7 @@ midori_view_get_proxy_tab_label (MidoriView* view)
gtk_event_box_set_visible_window (GTK_EVENT_BOX (event_box), FALSE);
hbox = gtk_hbox_new (FALSE, 1);
gtk_container_add (GTK_CONTAINER (event_box), GTK_WIDGET (hbox));
- midori_view_update_tab_title (view->tab_title, 10, 0.0);
+ midori_view_update_tab_title (view, 0.0);
view->tab_close = gtk_button_new ();
gtk_button_set_relief (GTK_BUTTON (view->tab_close), GTK_RELIEF_NONE);
More information about the Xfce4-commits
mailing list