Author: olivier Date: 2009-05-22 13:19:13 +0000 (Fri, 22 May 2009) New Revision: 29973
Modified: xfwm4/branches/xfce_4_6/ChangeLog xfwm4/branches/xfce_4_6/NEWS xfwm4/branches/xfce_4_6/src/frame.c xfwm4/branches/xfce_4_6/src/tabwin.c Log: * frame.c, tabwin.c: Fix mixed RTL/LTR text not rendering properly in title and tabwin Modified: xfwm4/branches/xfce_4_6/ChangeLog =================================================================== --- xfwm4/branches/xfce_4_6/ChangeLog 2009-05-22 12:52:55 UTC (rev 29972) +++ xfwm4/branches/xfce_4_6/ChangeLog 2009-05-22 13:19:13 UTC (rev 29973) @@ -1,3 +1,7 @@ +2009-05-22 olivier + * frame.c, tabwin.c: Fix mixed RTL/LTR text not rendering properly + in title and tabwin + 2009-04-14 olivier * configure.ac.in: === xfwm4 4.6.1 === Modified: xfwm4/branches/xfce_4_6/NEWS =================================================================== --- xfwm4/branches/xfce_4_6/NEWS 2009-05-22 12:52:55 UTC (rev 29972) +++ xfwm4/branches/xfce_4_6/NEWS 2009-05-22 13:19:13 UTC (rev 29973) @@ -1,3 +1,8 @@ +4.6.2 +===== + +- Fix mixed RTL/LTR text not rendering properly in title and tabwin + 4.6.1 ===== Modified: xfwm4/branches/xfce_4_6/src/frame.c =================================================================== --- xfwm4/branches/xfce_4_6/src/frame.c 2009-05-22 12:52:55 UTC (rev 29972) +++ xfwm4/branches/xfce_4_6/src/frame.c 2009-05-22 13:19:13 UTC (rev 29973) @@ -313,9 +313,6 @@ return; } - layout = gtk_widget_create_pango_layout (myScreenGetGtkWidget (screen_info), c->name); - pango_layout_get_pixel_extents (layout, NULL, &logical_rect); - if (left < frameTopLeftWidth (c, state)) { left = frameTopLeftWidth (c, state); @@ -344,6 +341,10 @@ voffset = screen_info->params->title_vertical_offset_inactive; } + layout = gtk_widget_create_pango_layout (myScreenGetGtkWidget (screen_info), c->name); + pango_layout_set_auto_dir (layout, FALSE); + pango_layout_get_pixel_extents (layout, NULL, &logical_rect); + title_height = screen_info->font_height; if (!title_height) { Modified: xfwm4/branches/xfce_4_6/src/tabwin.c =================================================================== --- xfwm4/branches/xfce_4_6/src/tabwin.c 2009-05-22 12:52:55 UTC (rev 29972) +++ xfwm4/branches/xfce_4_6/src/tabwin.c 2009-05-22 13:19:13 UTC (rev 29973) @@ -107,9 +107,9 @@ { gchar *markup; gchar *message; + PangoLayout *layout; message = pretty_string (class); - gtk_label_set_use_markup (GTK_LABEL (t->class), TRUE); markup = g_strconcat ("<span size=\"larger\" weight=\"bold\">", message, "</span>", NULL); g_free (message); @@ -124,7 +124,13 @@ { message = g_strdup_printf ("%s", label); } + gtk_label_set_text (GTK_LABEL (t->label), message); + /* Need to update the layout after setting the text */ + layout = gtk_label_get_layout (GTK_LABEL(t->label)); + pango_layout_set_auto_dir (layout, FALSE); + /* the layout belong to the gtk_label and must not be freed */ + g_free (message); } @@ -287,7 +293,7 @@ gtk_container_set_border_width (GTK_CONTAINER (vbox), 5); gtk_container_add (GTK_CONTAINER (colorbox2), vbox); - tabwin->class = gtk_label_new (NULL); + tabwin->class = gtk_label_new (""); gtk_label_set_use_markup (GTK_LABEL (tabwin->class), TRUE); gtk_label_set_justify (GTK_LABEL (tabwin->class), GTK_JUSTIFY_CENTER); gtk_box_pack_start (GTK_BOX (vbox), tabwin->class, TRUE, TRUE, 0); @@ -300,6 +306,7 @@ tabwin->label = gtk_label_new (""); gtk_label_set_use_markup (GTK_LABEL (tabwin->label), FALSE); gtk_label_set_justify (GTK_LABEL (tabwin->label), GTK_JUSTIFY_CENTER); + gtk_label_set_use_markup (GTK_LABEL (tabwin->class), TRUE); gtk_box_pack_start (GTK_BOX (vbox), tabwin->label, TRUE, TRUE, 0); gtk_widget_set_size_request (GTK_WIDGET (tabwin->label), 240, -1); _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits