From 29afb621cd193ec80f8cd5780104a65c7c4d4bcb Mon Sep 17 00:00:00 2001 From: Jovan Lanik Date: Tue, 11 Oct 2022 19:29:44 +0200 Subject: [PATCH] update for gtklock 2.0.0 --- gtklock-module.h | 5 +++-- makefile | 4 ++-- source.c | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gtklock-module.h b/gtklock-module.h index 03183e5..a244b24 100644 --- a/gtklock-module.h +++ b/gtklock-module.h @@ -11,6 +11,7 @@ struct Window { GtkWidget *window; GtkWidget *overlay; GtkWidget *window_box; + GtkWidget *body_revealer; GtkWidget *body_grid; GtkWidget *input_label; GtkWidget *input_field; @@ -54,8 +55,8 @@ void g_module_unload(GModule *m); void on_activation(struct GtkLock *gtklock, int id); void on_output_change(struct GtkLock *gtklock); void on_focus_change(struct GtkLock *gtklock, struct Window *win, struct Window *old); -void on_window_empty(struct GtkLock *gtklock, struct Window *ctx); -void on_body_empty(struct GtkLock *gtklock, struct Window *ctx); +void on_window_create(struct GtkLock *gtklock, struct Window *win); +void on_window_destroy(struct GtkLock *gtklock, struct Window *win); /* diff --git a/makefile b/makefile index 368f89a..1b95bb9 100644 --- a/makefile +++ b/makefile @@ -5,8 +5,8 @@ NAME := powerbar-module.so -PREFIX ?= /usr/local -INSTALL ?= install +PREFIX = /usr/local +INSTALL = install LIBS := gtk+-3.0 gmodule-export-2.0 CFLAGS += -std=c11 -fPIC $(shell pkg-config --cflags $(LIBS)) diff --git a/source.c b/source.c index 3820351..73dfb9d 100644 --- a/source.c +++ b/source.c @@ -18,7 +18,8 @@ struct powerbar { }; const gchar module_name[] = "powerbar"; -const gchar module_version[] = "v1.3.7"; +const guint module_major_version = 2; +const guint module_minor_version = 0; static int self_id; @@ -95,7 +96,7 @@ void on_focus_change(struct GtkLock *gtklock, struct Window *win, struct Window gtk_revealer_set_reveal_child(GTK_REVEALER(POWERBAR(old)->revealer), FALSE); } -void on_window_empty(struct GtkLock *gtklock, struct Window *ctx) { +void on_window_destroy(struct GtkLock *gtklock, struct Window *ctx) { if(MODULE_DATA(ctx) != NULL) { g_free(MODULE_DATA(ctx)); MODULE_DATA(ctx) = NULL;