]> Dogcows Code - chaz/tint2/commitdiff
Launcher tooltips configurable, default off (Issue 366).
authorUnknown <google@craigoakes.com>
Wed, 12 Oct 2011 00:10:46 +0000 (00:10 +0000)
committerUnknown <google@craigoakes.com>
Wed, 12 Oct 2011 00:10:46 +0000 (00:10 +0000)
src/config.c
src/launcher/launcher.c
src/launcher/launcher.h

index 7c3517b43b71dda53ce4f96ccf1b8b12d09c0787..bf86b10e4b942328186ae325c701c8665b1998ff 100644 (file)
@@ -594,6 +594,9 @@ void add_entry (char *key, char *value)
                launcher_saturation = atoi(value2);
                launcher_brightness = atoi(value3);
        }
+       else if (strcmp(key, "launcher_tooltip") == 0) {
+               launcher_tooltip_enabled = atoi(value);
+       }
 
        /* Tooltip */
        else if (strcmp (key, "tooltip_show_timeout") == 0) {
index fd85fed0e531fe7e94cfae90b2effa9f94979bdc..2dba4fda40be6a34433dfdc042e90dccb4a91f03 100644 (file)
@@ -34,6 +34,7 @@
 
 int launcher_enabled;
 int launcher_max_icon_size;
+int launcher_tooltip_enabled;
 int launcher_alpha;
 int launcher_saturation;
 int launcher_brightness;
@@ -55,6 +56,7 @@ void default_launcher()
 {
        launcher_enabled = 0;
        launcher_max_icon_size = 0;
+       launcher_tooltip_enabled = 0;
        launcher_alpha = 100;
        launcher_saturation = 0;
        launcher_brightness = 0;
@@ -694,7 +696,10 @@ void launcher_load_icons(Launcher *launcher)
                        launcherIcon->area.bg = &g_array_index(backgrounds, Background, 0);
                        launcherIcon->area.on_screen = 1;
                        launcherIcon->area._on_change_layout = launcher_icon_on_change_layout;
-                       launcherIcon->area._get_tooltip_text = launcher_icon_get_tooltip_text;
+                       if (launcher_tooltip_enabled) 
+                               launcherIcon->area._get_tooltip_text = launcher_icon_get_tooltip_text;
+                       else
+                               launcherIcon->area._get_tooltip_text = NULL;
                        launcherIcon->is_app_desktop = 1;
                        launcherIcon->cmd = strdup(entry.exec);
                        launcherIcon->icon_name = entry.icon ? strdup(entry.icon) : strdup(ICON_FALLBACK);
index 79c6fd88c65ebd6e57a878e83debd2dda1fbd653..dc853a7c2804e4f0f788263e4c8ac435a9f1baa1 100644 (file)
@@ -60,6 +60,7 @@ typedef struct IconTheme {
 
 extern int launcher_enabled;
 extern int launcher_max_icon_size;
+extern int launcher_tooltip_enabled;
 extern int launcher_alpha;
 extern int launcher_saturation;
 extern int launcher_brightness;
This page took 0.025333 seconds and 4 git commands to generate.