]> Dogcows Code - chaz/tint2/commitdiff
*add* remove of tooltip = En/Disabled. it's renamed to task_tooltip to enable/disable...
authorAndreas Fink <andreas.fink85@googlemail.com>
Sun, 12 Dec 2010 08:57:51 +0000 (08:57 +0000)
committerAndreas Fink <andreas.fink85@googlemail.com>
Sun, 12 Dec 2010 08:57:51 +0000 (08:57 +0000)
task_tooltip = N for backwards compatibility)

23 files changed:
sample/icon_and_text_1.tint2rc
sample/icon_and_text_2.tint2rc
sample/icon_and_text_3.tint2rc
sample/icon_and_text_4.tint2rc
sample/icon_only_1.tint2rc
sample/icon_only_2.tint2rc
sample/icon_only_3.tint2rc
sample/icon_only_4.tint2rc
sample/icon_only_6.tint2rc
sample/icon_only_7.tint2rc
sample/text_only_1.tint2rc
sample/text_only_2.tint2rc
sample/text_only_3.tint2rc
sample/text_only_4.tint2rc
sample/text_only_5.tint2rc
sample/text_only_6.tint2rc
sample/tint2rc
src/config.c
src/panel.c
src/taskbar/task.c
src/taskbar/task.h
src/tint.c
src/tooltip/tooltip.h

index 677cc58062b012f0b9e553fc5cf74503a544dac7..e866de4657712b96f00008e729ef678a79da24d9 100644 (file)
@@ -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
index 7dc18db5146f5541ddad9630766268d540bdb825..c30f43d1d592e3e572d5627019135c2bd4d20d57 100644 (file)
@@ -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
index 325bc54989fc0497a938c8943d419c3a3da8bb8a..f3332667912be7cdd3e05d611b13ce4450e1ef0b 100644 (file)
@@ -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
index 06430f1ff3c6729036ef8e816e664a7c7bf0359b..0dcabd76c092a0d9abda39df2696a5b0d251a1c6 100644 (file)
@@ -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
index 8c433c452bfcb78e03da9ca9c0c28efa76414804..7708b5892919fa0a0972d138f48498c466c19510 100644 (file)
@@ -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
index 0504ea9ecd8ba3a52ffd0cbdd7d74aaa1b0f8da8..4d1c41fa6ed9badc8a232aa5feddc3ba396a9ca8 100644 (file)
@@ -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
index 24e0da18133952b21320dbd2562dc322d0d3f339..0069fbe1adb8837e6c253357108efb349e3cf824 100644 (file)
@@ -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
index 0c4264de06f3cc5349f3400714d9474e874d4059..fbbc76071ab538ccdb43408f5d86ee918a894a16 100644 (file)
@@ -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
index 14510554d4a2667420d44e7c4ffee142c74cfd09..75a59d7a1308fb44b7b24cf507650d107ec71b90 100644 (file)
@@ -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
index ae7b0611c3d095a287dd9744ff5fd34203674fa6..f60de10d8285c2b33c98f211cbd52325383357bd 100644 (file)
@@ -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
index faf7f20b0a227d6b5f0b36b0330aae9d6f82e7e2..80c71a62b3de4f2b4b32e527377f892457531de6 100644 (file)
@@ -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
index 473d31184cbccb311e27527b67530c55896a3d72..9c91b282c05b94b503633c8f132562eb8a867f9b 100644 (file)
@@ -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
index b58f54be1e2b62f4ef58af2a7d09a03c96641561..fa4b1376d9277cd8b8c0e0ee9c3504e9e8ed7de8 100644 (file)
@@ -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
index 6bbd8cd7252ca9951724a2f379d77f296bbb3624..ce98bd5d2aba6cee71404b6b5c383f60e4d38972 100644 (file)
@@ -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
index ef2ad764cee5a6838c61f7f9fe9d8bf778c9d86d..46fa09f6438dabb614ceab29dcb13f37613a4317 100644 (file)
@@ -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
index 87962c5b2b178829e280eedfbefd7596616c7708..b1a3d51cca4ef2a48e30eaa7862f9a87f2eafc57 100644 (file)
@@ -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
index d0fafddb2bd9014f4d76a70655b27ae4c9ac08bf..4907799c7a97be4ac2e1877f8b9e0cb361768978 100644 (file)
@@ -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
index 4b84e9412256220af65386c3a29fd3d589238f48..ae6fe31ecd3947c1fe145653732fa77f139cd9a6 100644 (file)
@@ -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;
index 85efec96640ca4c4230e5b08850ec40013530000..b99ffa56e576cb078c9cbfd440646615f8addc5e 100644 (file)
@@ -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;
index df4bdbd2221af67b9b4987891deb05500a57df67..e03f69c60943e40aad3511812cbce8c332840701 100644 (file)
@@ -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)) {
index 9fe7896ffca7e5a1d654f5e7b75d5bf5a5d8e64b..d701c70d7bb3d989e1da1ba59afe02a1c105672e 100644 (file)
@@ -44,6 +44,7 @@ typedef struct {
        PangoFontDescription *font_desc;
        Color font[TASK_STATE_COUNT];
        int config_font_mask;
+       int tooltip_enabled;
 } Global_task;
 
 
index a7016b3ea403e463c590c8825e7440d263f316fd..bc915eb3f3a51f31cbf110e6e7744376c46efe3e 100644 (file)
@@ -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:
index d575773bac753ef8db25e82da3d544b42cf5c8ef..c8c5d9bd2e43eba4d3c7de1c4266abce6cd8906a 100644 (file)
@@ -30,7 +30,6 @@ typedef struct {
        Window window;
        int show_timeout_msec;
        int hide_timeout_msec;
-       Bool enabled;
        Bool mapped;
        int paddingx;
        int paddingy;
This page took 0.039483 seconds and 4 git commands to generate.