swaybar: implement icon themes and lookup for tray

This commit is contained in:
Ian Fan 2018-12-06 12:51:52 +00:00
parent 02df3f67aa
commit 746600e6ed
5 changed files with 515 additions and 0 deletions

View file

@ -3,6 +3,7 @@
#include <stdlib.h>
#include <string.h>
#include "swaybar/bar.h"
#include "swaybar/tray/icon.h"
#include "swaybar/tray/tray.h"
#include "swaybar/tray/watcher.h"
#include "log.h"
@ -28,6 +29,8 @@ struct swaybar_tray *create_tray(struct swaybar *bar) {
tray->watcher_xdg = create_watcher("freedesktop", tray->bus);
tray->watcher_kde = create_watcher("kde", tray->bus);
init_themes(&tray->themes, &tray->basedirs);
return tray;
}
@ -38,6 +41,7 @@ void destroy_tray(struct swaybar_tray *tray) {
destroy_watcher(tray->watcher_xdg);
destroy_watcher(tray->watcher_kde);
sd_bus_flush_close_unref(tray->bus);
finish_themes(tray->themes, tray->basedirs);
free(tray);
}