From 08980396adb214920d4ee39ce99dcffaa728b4f3 Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 12 Oct 2011 00:10:46 +0000 Subject: [PATCH] Launcher tooltips configurable, default off (Issue 366). --- src/config.c | 3 +++ src/launcher/launcher.c | 7 ++++++- src/launcher/launcher.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index 7c3517b..bf86b10 100644 --- a/src/config.c +++ b/src/config.c @@ -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) { diff --git a/src/launcher/launcher.c b/src/launcher/launcher.c index fd85fed..2dba4fd 100644 --- a/src/launcher/launcher.c +++ b/src/launcher/launcher.c @@ -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); diff --git a/src/launcher/launcher.h b/src/launcher/launcher.h index 79c6fd8..dc853a7 100644 --- a/src/launcher/launcher.h +++ b/src/launcher/launcher.h @@ -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; -- 2.45.2