all repos — tint2 @ 8201742546b830ff045d1866d89c08303e87e758

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

*add* remove of tooltip = En/Disabled. it's renamed to task_tooltip to enable/disable task/clock tooltip separatly (tooltip = N is equivalent to 
task_tooltip = N for backwards compatibility)


git-svn-id: http://tint2.googlecode.com/svn/trunk@615 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
Andreas.Fink85 Andreas.Fink85@121b4492-b84c-0410-8b4c-0d4edfb3f3cc
commit

8201742546b830ff045d1866d89c08303e87e758

parent

07f48183d7b289812aa4b09e22cb7bbd7fe035e2

M sample/icon_and_text_1.tint2rcsample/icon_and_text_1.tint2rc

@@ -56,6 +56,7 @@ task_background_id = 3

task_active_background_id = 2 task_urgent_background_id = 2 task_iconified_background_id = 3 +task_tooltip = 0 # Task Icons task_icon_asb = 70 0 0

@@ -90,7 +91,6 @@ clock_background_id = 0

clock_rclick_command = orage # Tooltips -tooltip = 0 tooltip_padding = 2 2 tooltip_show_timeout = 0.7 tooltip_hide_timeout = 0.3
M sample/icon_and_text_2.tint2rcsample/icon_and_text_2.tint2rc

@@ -56,6 +56,7 @@ task_background_id = 3

task_active_background_id = 2 task_urgent_background_id = 2 task_iconified_background_id = 3 +task_tooltip = 0 # Task Icons task_icon_asb = 80 0 0

@@ -89,7 +90,6 @@ clock_background_id = 1

clock_rclick_command = gsimplecal # Tooltips -tooltip = 0 tooltip_padding = 5 0 tooltip_show_timeout = 0.7 tooltip_hide_timeout = 0.3
M sample/icon_and_text_3.tint2rcsample/icon_and_text_3.tint2rc

@@ -62,6 +62,7 @@ task_background_id = 2

task_active_background_id = 3 task_urgent_background_id = 4 task_iconified_background_id = 2 +task_tooltip = 1 # Task Icons task_icon_asb = 80 0 0

@@ -95,7 +96,6 @@ clock_background_id = 0

clock_rclick_command = gsimplecal # Tooltips -tooltip = 1 tooltip_padding = 5 0 tooltip_show_timeout = 1.2 tooltip_hide_timeout = 0.3
M sample/icon_and_text_4.tint2rcsample/icon_and_text_4.tint2rc

@@ -62,6 +62,7 @@ task_background_id = 2

task_active_background_id = 1 task_urgent_background_id = 4 task_iconified_background_id = 2 +task_tooltip = 0 # Task Icons task_icon_asb = 100 0 0

@@ -95,7 +96,6 @@ clock_padding = 4 4

clock_background_id = 1 # Tooltips -tooltip = 0 tooltip_padding = 0 0 tooltip_show_timeout = 0 tooltip_hide_timeout = 0
M sample/icon_only_1.tint2rcsample/icon_only_1.tint2rc

@@ -74,6 +74,7 @@ task_background_id = 0

task_active_background_id = 5 task_urgent_background_id = 6 task_iconified_background_id = 0 +task_tooltip = 1 # Task Icons task_icon_asb = 100 -25 -8

@@ -109,7 +110,6 @@ clock_background_id = 0

clock_rclick_command = gsimplecal # Tooltips -tooltip = 1 tooltip_padding = 5 3 tooltip_show_timeout = 0.8 tooltip_hide_timeout = 0.3
M sample/icon_only_2.tint2rcsample/icon_only_2.tint2rc

@@ -62,6 +62,7 @@ task_background_id = 0

task_active_background_id = 3 task_urgent_background_id = 3 task_iconified_background_id = 0 +task_tooltip = 1 # Task Icons task_icon_asb = 90 -100 -20

@@ -97,7 +98,6 @@ clock_background_id = 0

clock_rclick_command = gsimplecal # Tooltips -tooltip = 1 tooltip_padding = 2 2 tooltip_show_timeout = 0.9 tooltip_hide_timeout = 0.3
M sample/icon_only_3.tint2rcsample/icon_only_3.tint2rc

@@ -62,6 +62,7 @@ task_background_id = 0

task_active_background_id = 2 task_urgent_background_id = 4 task_iconified_background_id = 0 +task_tooltip = 0 # Task Icons task_icon_asb = 70 0 0

@@ -86,7 +87,6 @@ systray_icon_size = 20

systray_icon_asb = 100 0 0 # Tooltips -tooltip = 0 tooltip_padding = 2 2 tooltip_show_timeout = 0.7 tooltip_hide_timeout = 0.3
M sample/icon_only_4.tint2rcsample/icon_only_4.tint2rc

@@ -62,6 +62,7 @@ task_background_id = 3

task_active_background_id = 2 task_urgent_background_id = 4 task_iconified_background_id = 3 +task_tooltip = 1 # Task Icons task_icon_asb = 90 0 0

@@ -86,7 +87,6 @@ systray_icon_size = 20

systray_icon_asb = 100 0 -10 # Tooltips -tooltip = 1 tooltip_padding = 5 0 tooltip_show_timeout = 0.8 tooltip_hide_timeout = 0.3
M sample/icon_only_6.tint2rcsample/icon_only_6.tint2rc

@@ -62,6 +62,7 @@ task_background_id = 3

task_active_background_id = 2 task_urgent_background_id = 2 task_iconified_background_id = 3 +task_tooltip = 1 # Task Icons task_icon_asb = 100 0 0

@@ -97,7 +98,6 @@ clock_background_id = 1

clock_rclick_command = zenity --calendar # Tooltips -tooltip = 1 tooltip_padding = 3 2 tooltip_show_timeout = 0.9 tooltip_hide_timeout = 0.3
M sample/icon_only_7.tint2rcsample/icon_only_7.tint2rc

@@ -56,6 +56,7 @@ task_background_id = 0

task_active_background_id = 3 task_urgent_background_id = 0 task_iconified_background_id = 0 +task_tooltip = 1 # Task Icons task_icon_asb = 100 0 0

@@ -93,7 +94,6 @@ time1_timezone = :Europe/Paris

time2_timezone = :Europe/Moscow # Tooltips -tooltip = 1 tooltip_padding = 5 4 tooltip_show_timeout = 0.8 tooltip_hide_timeout = 0.3
M sample/text_only_1.tint2rcsample/text_only_1.tint2rc

@@ -68,6 +68,7 @@ task_background_id = 4

task_active_background_id = 1 task_urgent_background_id = 0 task_iconified_background_id = 4 +task_tooltip = 0 # Task Icons task_icon_asb = 100 -90 -15

@@ -103,7 +104,6 @@ clock_background_id = 1

clock_rclick_command = gsimplecal # Tooltips -tooltip = 0 tooltip_padding = 5 5 tooltip_show_timeout = 0.7 tooltip_hide_timeout = 0.3
M sample/text_only_2.tint2rcsample/text_only_2.tint2rc

@@ -68,6 +68,7 @@ task_background_id = 4

task_active_background_id = 1 task_urgent_background_id = 0 task_iconified_background_id = 4 +task_tooltip = 0 # Task Icons task_icon_asb = 100 -90 -15

@@ -103,7 +104,6 @@ clock_background_id = 1

clock_rclick_command = gsimplecal # Tooltips -tooltip = 0 tooltip_padding = 5 5 tooltip_show_timeout = 0.7 tooltip_hide_timeout = 0.3
M sample/text_only_3.tint2rcsample/text_only_3.tint2rc

@@ -50,6 +50,7 @@ task_background_id = 0

task_active_background_id = 2 task_urgent_background_id = 2 task_iconified_background_id = 0 +task_tooltip = 0 # Task Icons task_icon_asb = 100 0 0

@@ -81,7 +82,6 @@ clock_padding = 2 0

clock_background_id = 0 # Tooltips -tooltip = 0 tooltip_padding = 2 2 tooltip_show_timeout = 0.5 tooltip_hide_timeout = 1.2
M sample/text_only_4.tint2rcsample/text_only_4.tint2rc

@@ -50,6 +50,7 @@ task_background_id = 1

task_active_background_id = 2 task_urgent_background_id = 2 task_iconified_background_id = 1 +task_tooltip = 0 # Task Icons task_icon_asb = 100 0 0

@@ -74,7 +75,6 @@ systray_icon_size = 16

systray_icon_asb = 100 -100 -15 # Tooltips -tooltip = 0 tooltip_padding = 0 0 tooltip_show_timeout = 0 tooltip_hide_timeout = 0
M sample/text_only_5.tint2rcsample/text_only_5.tint2rc

@@ -56,6 +56,7 @@ task_background_id = 1

task_active_background_id = 2 task_urgent_background_id = 2 task_iconified_background_id = 1 +task_tooltip = 1 # Task Icons task_icon_asb = 50 0 0

@@ -87,7 +88,6 @@ clock_padding = 4 0

clock_background_id = 0 # Tooltips -tooltip = 1 tooltip_padding = 3 3 tooltip_show_timeout = 1.5 tooltip_hide_timeout = 0.3
M sample/text_only_6.tint2rcsample/text_only_6.tint2rc

@@ -56,6 +56,7 @@ task_background_id = 2

task_active_background_id = 2 task_urgent_background_id = 2 task_iconified_background_id = 0 +task_tooltip = 0 # Task Icons task_icon_asb = 100 -90 -15

@@ -80,7 +81,6 @@ systray_icon_size = 18

systray_icon_asb = 100 -70 -15 # Tooltips -tooltip = 0 tooltip_padding = 5 5 tooltip_show_timeout = 0.7 tooltip_hide_timeout = 0.3
M sample/tint2rcsample/tint2rc

@@ -56,6 +56,7 @@ task_background_id = 3

task_active_background_id = 2 task_urgent_background_id = 2 task_iconified_background_id = 3 +task_tooltip = 0 # Task Icons task_icon_asb = 70 0 0

@@ -90,7 +91,6 @@ clock_background_id = 0

clock_rclick_command = orage # Tooltips -tooltip = 0 tooltip_padding = 2 2 tooltip_show_timeout = 0.7 tooltip_hide_timeout = 0.3
M src/config.csrc/config.c

@@ -557,6 +557,9 @@ panel_config.g_task.background[status] = &g_array_index(backgrounds, Background, id);

panel_config.g_task.config_background_mask |= (1<<status); if (status == TASK_NORMAL) panel_config.g_task.area.bg = panel_config.g_task.background[TASK_NORMAL]; } + // "tooltip" is deprecated but here for backwards compatibility + else if (strcmp (key, "task_tooltip") == 0 || strcmp(key, "tooltip") == 0) + panel_config.g_task.tooltip_enabled = atoi(value); /* Systray */ else if (strcmp (key, "systray_padding") == 0) {

@@ -626,8 +629,6 @@ icon_theme_name = strdup(value);

} /* Tooltip */ - else if (strcmp (key, "tooltip") == 0) - g_tooltip.enabled = atoi(value); else if (strcmp (key, "tooltip_show_timeout") == 0) { int timeout_msec = 1000*atof(value); g_tooltip.show_timeout_msec = timeout_msec;
M src/panel.csrc/panel.c

@@ -198,7 +198,7 @@ unsigned long mask = CWEventMask|CWColormap|CWBackPixel|CWBorderPixel;

p->main_win = XCreateWindow(server.dsp, server.root_win, p->posx, p->posy, p->area.width, p->area.height, 0, server.depth, InputOutput, server.visual, mask, &att); long event_mask = ExposureMask|ButtonPressMask|ButtonReleaseMask|ButtonMotionMask; - if (g_tooltip.enabled) + if (p->g_task.tooltip_enabled || p->clock.area._get_tooltip_text) event_mask |= PointerMotionMask|LeaveWindowMask; if (panel_autohide) event_mask |= LeaveWindowMask|EnterWindowMask;
M src/taskbar/task.csrc/taskbar/task.c

@@ -96,7 +96,8 @@ // hide ALLDESKTOP task on non-current desktop

new_tsk2->area.on_screen = 0; } new_tsk2->title = new_tsk.title; - new_tsk2->area._get_tooltip_text = task_get_tooltip; + if (panel1[monitor].g_task.tooltip_enabled) + new_tsk2->area._get_tooltip_text = task_get_tooltip; for (k=0; k<TASK_STATE_COUNT; ++k) { new_tsk2->icon[k] = new_tsk.icon[k]; new_tsk2->state_pix[k] = 0;

@@ -164,7 +165,7 @@ {

Panel *panel = tsk->area.panel; char *title, *name; - if (!panel->g_task.text && !g_tooltip.enabled) return 0; + if (!panel->g_task.text && !panel->g_task.tooltip_enabled) return 0; name = server_get_property (tsk->win, server.atom._NET_WM_VISIBLE_NAME, server.atom.UTF8_STRING, 0); if (!name || !strlen(name)) {
M src/taskbar/task.hsrc/taskbar/task.h

@@ -44,6 +44,7 @@ int font_shadow;

PangoFontDescription *font_desc; Color font[TASK_STATE_COUNT]; int config_font_mask; + int tooltip_enabled; } Global_task;
M src/tint.csrc/tint.c

@@ -873,7 +873,6 @@ unsigned int button_mask = Button1Mask | Button2Mask | Button3Mask | Button4Mask | Button5Mask;

if (e.xmotion.state & button_mask) event_button_motion_notify (&e); - if (!g_tooltip.enabled) break; Panel* panel = get_panel(e.xmotion.window); Area* area = click_area(panel, e.xmotion.x, e.xmotion.y); if (area->_get_tooltip_text)

@@ -884,8 +883,7 @@ break;

} case LeaveNotify: - if (g_tooltip.enabled) - tooltip_trigger_hide(); + tooltip_trigger_hide(); break; case Expose:
M src/tooltip/tooltip.hsrc/tooltip/tooltip.h

@@ -30,7 +30,6 @@ Panel* panel;

Window window; int show_timeout_msec; int hide_timeout_msec; - Bool enabled; Bool mapped; int paddingx; int paddingy;