Launcher tooltips configurable, default off (Issue 366).

git-svn-id: http://tint2.googlecode.com/svn/trunk@642 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
google@craigoakes.com 2011-10-12 00:10:46 +00:00
parent 6542370297
commit 88c133a9a7
3 changed files with 10 additions and 1 deletions

View 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) {

View 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);

View 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;