aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIan Fan <ianfan0@gmail.com>2020-03-04 14:34:32 +0000
committerSimon Ser <contact@emersion.fr>2020-03-30 17:31:00 +0200
commit68f53cd509af8812562d743a55128a1b341247f5 (patch)
tree269042ba89e26b4124bb9f53cd9debf29e6f2599 /include
parent3b894c387dc38e8715186d5c0171b6048b36c435 (diff)
tray: tidy code
This includes some refactoring and fixing a small memory leak.
Diffstat (limited to 'include')
-rw-r--r--include/swaybar/tray/icon.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/include/swaybar/tray/icon.h b/include/swaybar/tray/icon.h
index 8e1d471e..3673674b 100644
--- a/include/swaybar/tray/icon.h
+++ b/include/swaybar/tray/icon.h
@@ -3,16 +3,16 @@
#include "list.h"
-enum subdir_type {
- THRESHOLD,
- SCALABLE,
- FIXED
-};
-
struct icon_theme_subdir {
char *name;
int size;
- enum subdir_type type;
+
+ enum {
+ THRESHOLD,
+ SCALABLE,
+ FIXED
+ } type;
+
int max_size;
int min_size;
int threshold;
@@ -39,6 +39,5 @@ void finish_themes(list_t *themes, list_t *basedirs);
*/
char *find_icon(list_t *themes, list_t *basedirs, char *name, int size,
char *theme, int *min_size, int *max_size);
-char *find_icon_in_dir(char *name, char *dir, int *min_size, int *max_size);
#endif