Added themes and made struct names more generic.

This commit is contained in:
Johannes Findeisen 2023-03-09 03:58:04 +01:00
commit 7154b7c29e
5 changed files with 750 additions and 428 deletions

View file

@ -27,7 +27,7 @@
#include <string.h>
#include <time.h>
#include "pesthoernchen.h"
#include "themes/lock.h"
struct string {
char *ptr;
@ -165,12 +165,12 @@ void invoke_notification() {
if (door_open == true) {
notify_notification_set_icon_from_pixbuf(n, gdk_pixbuf_from_pixdata(
&icon_yellow_pixbuf,
&icon_closed_pixbuf,
true,
NULL));
} else {
notify_notification_set_icon_from_pixbuf(n, gdk_pixbuf_from_pixdata(
&icon_red_pixbuf,
&icon_closed_pixbuf,
true,
NULL));
}
@ -183,13 +183,13 @@ void set_status() {
if (door_open == true) {
printf("Set to status: open\n");
gtk_status_icon_set_from_pixbuf(tray_icon,
gdk_pixbuf_from_pixdata(&icon_yellow_pixbuf,
gdk_pixbuf_from_pixdata(&icon_open_pixbuf,
true,
NULL));
} else {
printf("Set to status: closed\n");
gtk_status_icon_set_from_pixbuf(tray_icon,
gdk_pixbuf_from_pixdata(&icon_red_pixbuf,
gdk_pixbuf_from_pixdata(&icon_closed_pixbuf,
true,
NULL));
}