[Xfce4-commits] r30341 - terminal/trunk/terminal
Nick Schermer
nick at xfce.org
Sat Jul 18 11:46:51 CEST 2009
Author: nick
Date: 2009-07-18 09:46:51 +0000 (Sat, 18 Jul 2009)
New Revision: 30341
Modified:
terminal/trunk/terminal/terminal-screen.c
terminal/trunk/terminal/terminal-window.c
Log:
Properly fix tab labels in vertical orientation and scrollbar click.
Modified: terminal/trunk/terminal/terminal-screen.c
===================================================================
--- terminal/trunk/terminal/terminal-screen.c 2009-07-17 21:37:29 UTC (rev 30340)
+++ terminal/trunk/terminal/terminal-screen.c 2009-07-18 09:46:51 UTC (rev 30341)
@@ -241,6 +241,7 @@
screen->scrollbar = gtk_vscrollbar_new (VTE_TERMINAL (screen->terminal)->adjustment);
gtk_box_pack_start (GTK_BOX (screen), screen->scrollbar, FALSE, FALSE, 0);
+ g_signal_connect_after (G_OBJECT (screen->scrollbar), "button-press-event", G_CALLBACK (exo_noop_true), NULL);
gtk_widget_show (screen->scrollbar);
screen->preferences = terminal_preferences_get ();
@@ -1071,13 +1072,18 @@
ellipsize = PANGO_ELLIPSIZE_END;
gtk_misc_set_alignment (GTK_MISC (screen->tab_label), 0.00, 0.50);
+
+ /* reset size request, ellipsize works now */
+ gtk_widget_set_size_request (screen->tab_label, -1, -1);
}
else
{
angle = position == GTK_POS_LEFT ? 90.0 : 270.0;
ellipsize = PANGO_ELLIPSIZE_NONE;
+ gtk_misc_set_alignment (GTK_MISC (screen->tab_label), 0.50, 0.00);
- gtk_misc_set_alignment (GTK_MISC (screen->tab_label), 0.50, 0.00);
+ /* set a minimum height of 30px, because ellipsize does not work */
+ gtk_widget_set_size_request (screen->tab_label, -1, 30);
}
gtk_label_set_angle (GTK_LABEL (screen->tab_label), angle);
Modified: terminal/trunk/terminal/terminal-window.c
===================================================================
--- terminal/trunk/terminal/terminal-window.c 2009-07-17 21:37:29 UTC (rev 30340)
+++ terminal/trunk/terminal/terminal-window.c 2009-07-18 09:46:51 UTC (rev 30341)
@@ -1053,7 +1053,9 @@
#define EVENT_IN_ALLOCATION(event,widget) \
((widget)->allocation.x <= (event)->x \
- && (widget)->allocation.x + (widget)->allocation.width >= (event)->x)
+ && (widget)->allocation.x + (widget)->allocation.width >= (event)->x \
+ && (widget)->allocation.y <= (event)->y \
+ && (widget)->allocation.y + (widget)->allocation.height >= (event)->y)
More information about the Xfce4-commits
mailing list