From 36309af730e239289925ea5701edf9ec8452bae3 Mon Sep 17 00:00:00 2001 From: rbuj Date: Sat, 18 Jul 2020 19:06:21 +0200 Subject: battstat: Rewrite preference dialog from scratch To manage the settings stored by GSettings. The preference dialog is a subclass of GtkDialog, and the ui file is a template. There is more info available in the "GTK+ Overview" chapter of "GTK+ 3 Reference Manual": "Building applications - A preference dialog" https://developer.gnome.org/gtk3/stable/ch01s04.html --- battstat/battstat.h | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'battstat/battstat.h') diff --git a/battstat/battstat.h b/battstat/battstat.h index 9e45e56b..d0d4e402 100644 --- a/battstat/battstat.h +++ b/battstat/battstat.h @@ -41,7 +41,7 @@ typedef enum { - APPLET_SHOW_NONE, + APPLET_SHOW_NONE = 0, APPLET_SHOW_PERCENT, APPLET_SHOW_TIME } AppletTextType; @@ -87,14 +87,6 @@ typedef struct typedef struct _ProgressData { GtkWidget *applet; - /* these are used by properties.c */ - GtkWidget *radio_text_1; - GtkWidget *radio_text_2; - GtkWidget *check_text; - GtkWidget *lowbatt_toggle; - GtkWidget *full_toggle; - GtkWidget *hbox_ptr; - /* flags set from gsettings or the properties dialog */ GSettings *settings; guint red_val; @@ -118,7 +110,7 @@ typedef struct _ProgressData { GtkWidget *percent; /* dialog boxes that might be displayed */ - GtkDialog *prop_win; + GtkWidget *prop_win; GtkWidget *battery_low_dialog; /* text label inside the low battery dialog */ @@ -149,12 +141,10 @@ typedef struct _ProgressData { gboolean last_present; } ProgressData; -/* properties.c */ -void prop_cb (GtkAction *, ProgressData *); - /* battstat_applet.c */ void reconfigure_layout( ProgressData *battstat ); void battstat_show_help( ProgressData *battstat, const char *section ); +void prop_cb (GtkAction *, ProgressData *); /* power-management.c */ const char *power_management_getinfo( BatteryStatus *status ); -- cgit v1.2.1