From: Thierry Lorthiois Date: Mon, 19 Apr 2010 18:15:42 +0000 (+0000) Subject: tint2conf enabled by default, and switch ELLIPSIZE_END to ELLIPSIZE_MIDDLE X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=7c6cbefdf2443e1e9fa8372585d23fff40db1768;p=chaz%2Ftint2 tint2conf enabled by default, and switch ELLIPSIZE_END to ELLIPSIZE_MIDDLE --- diff --git a/configure.ac b/configure.ac index 4efd9fc..ba5e20e 100644 --- a/configure.ac +++ b/configure.ac @@ -31,12 +31,12 @@ AM_CONDITIONAL([INSTALL_EXAMPLES], [test x$examples = xtrue]) # tint2conf AC_ARG_ENABLE([tint2conf], - [AS_HELP_STRING([--enable-tint2conf], [Enable tint2conf build, a GTK+2 theme switcher for tint2])], + [AS_HELP_STRING([--disable-tint2conf], [Disable tint2conf build, a GTK+2 theme switcher for tint2])], [case "${enableval}" in yes) tint2conf=true ;; no) tint2conf=false ;; - *) AC_MSG_ERROR([bad value ${enableval} for --enable-tint2conf]) ;; - esac],[tint2conf=false]) + *) AC_MSG_ERROR([bad value ${enableval} for --disable-tint2conf]) ;; + esac],[tint2conf=true]) AM_CONDITIONAL([ENABLE_TINT2CONF], [test x$tint2conf = xtrue]) # diff --git a/src/systray/systraybar.c b/src/systray/systraybar.c index 81eba8f..53527a8 100644 --- a/src/systray/systraybar.c +++ b/src/systray/systraybar.c @@ -56,7 +56,6 @@ static Pixmap render_background; void default_systray() { -printf("*** default_systray()\n"); memset(&systray, 0, sizeof(Systraybar)); render_background = 0; systray.alpha = 100; diff --git a/src/taskbar/task.c b/src/taskbar/task.c index d0b247f..12476bc 100644 --- a/src/taskbar/task.c +++ b/src/taskbar/task.c @@ -353,7 +353,8 @@ void draw_task (void *obj, cairo_t *c) /* Drawing width and Cut text */ // pango use U+22EF or U+2026 pango_layout_set_width (layout, ((Taskbar*)tsk->area.parent)->text_width * PANGO_SCALE); - pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_END); + pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_MIDDLE); + //pango_layout_set_wrap(layout, PANGO_WRAP_CHAR); /* Center text */ if (panel->g_task.centered) pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER); diff --git a/src/tooltip/tooltip.c b/src/tooltip/tooltip.c index a724473..11b7f3b 100644 --- a/src/tooltip/tooltip.c +++ b/src/tooltip/tooltip.c @@ -231,7 +231,7 @@ void tooltip_update() pango_layout_get_pixel_extents(layout, &r1, &r2); pango_layout_set_width(layout, width*PANGO_SCALE); pango_layout_set_height(layout, height*PANGO_SCALE); - pango_layout_set_ellipsize(layout, PANGO_ELLIPSIZE_END); + pango_layout_set_ellipsize(layout, PANGO_ELLIPSIZE_MIDDLE); // I do not know why this is the right way, but with the below cairo_move_to it seems to be centered (horiz. and vert.) cairo_move_to(c, -r1.x/2+g_tooltip.bg->border.width+g_tooltip.paddingx, -r1.y/2+g_tooltip.bg->border.width+g_tooltip.paddingy); pango_cairo_show_layout (c, layout);