*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
This commit is contained in:
parent
07f48183d7
commit
8201742546
23 changed files with 26 additions and 26 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -557,6 +557,9 @@ void add_entry (char *key, char *value)
|
|||
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 @@ void add_entry (char *key, char *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;
|
||||
|
|
|
@ -198,7 +198,7 @@ void init_panel()
|
|||
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;
|
||||
|
|
|
@ -96,7 +96,8 @@ Task *add_task (Window win)
|
|||
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 @@ int get_title(Task *tsk)
|
|||
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)) {
|
||||
|
|
|
@ -44,6 +44,7 @@ typedef struct {
|
|||
PangoFontDescription *font_desc;
|
||||
Color font[TASK_STATE_COUNT];
|
||||
int config_font_mask;
|
||||
int tooltip_enabled;
|
||||
} Global_task;
|
||||
|
||||
|
||||
|
|
|
@ -873,7 +873,6 @@ start:
|
|||
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 @@ start:
|
|||
}
|
||||
|
||||
case LeaveNotify:
|
||||
if (g_tooltip.enabled)
|
||||
tooltip_trigger_hide();
|
||||
tooltip_trigger_hide();
|
||||
break;
|
||||
|
||||
case Expose:
|
||||
|
|
|
@ -30,7 +30,6 @@ typedef struct {
|
|||
Window window;
|
||||
int show_timeout_msec;
|
||||
int hide_timeout_msec;
|
||||
Bool enabled;
|
||||
Bool mapped;
|
||||
int paddingx;
|
||||
int paddingy;
|
||||
|
|
Loading…
Reference in a new issue