summaryrefslogtreecommitdiff
path: root/settings
diff options
context:
space:
mode:
authorAli Abdallah <ali.slackware@gmail.com>2009-06-15 13:42:47 +0000
committerAli Abdallah <ali.slackware@gmail.com>2009-06-15 13:42:47 +0000
commitf369cef601e74fcc8b1bc7d4e6c9be14fbbf1249 (patch)
tree6dc4da0145e3cc6d3a30b91fc623f3cebdc320b3 /settings
parentc0f8ce98d1dae06324aa3cbd5cbebff4744c0e04 (diff)
downloadixfce4-power-manager-f369cef601e74fcc8b1bc7d4e6c9be14fbbf1249.tar.gz
* Remove libglade and use GtkBuilder instead.
(Old svn revision: 7580)
Diffstat (limited to 'settings')
-rw-r--r--settings/Makefile.am15
-rw-r--r--settings/xfpm-settings.c409
-rw-r--r--settings/xfpm-settings.glade1291
3 files changed, 222 insertions, 1493 deletions
diff --git a/settings/Makefile.am b/settings/Makefile.am
index ddbebbcd..bdd92eba 100644
--- a/settings/Makefile.am
+++ b/settings/Makefile.am
@@ -2,7 +2,6 @@ bin_PROGRAMS = xfce4-power-manager-settings
xfce4_power_manager_settings_SOURCES = \
xfce-power-manager-dbus-client.h \
- xfpm-settings-glade.h \
xfpm-settings-main.c \
xfpm-settings.c \
xfpm-settings.h \
@@ -14,25 +13,27 @@ xfce4_power_manager_settings_CFLAGS = \
-I$(top_srcdir)/src \
-DLOCALEDIR=\"$(localedir)\" \
-DG_LOG_DOMAIN=\"xfce4-power-manager-settings\" \
+ -export-dynamic \
+ $(MODULE_FLAGS) \
$(GTK_CFLAGS) \
$(GLIB_CFLAGS) \
$(GTHREAD_CFLAGS) \
+ $(GMODULE_CFLAGS) \
$(DBUS_CFLAGS) \
$(DBUS_GLIB_CFLAGS) \
$(LIBXFCE4GUI_CFLAGS) \
$(LIBXFCE4UTIL_CFLAGS) \
- $(LIBGLADE_CFLAGS) \
$(XFCONF_CFLAGS)
xfce4_power_manager_settings_LDADD = \
$(GTK_LIBS) \
$(GLIB_LIBS) \
$(GTHREAD_LIBS) \
+ $(GMODULE_LIBS) \
$(DBUS_LIBS) \
$(DBUS_GLIB_LIBS) \
$(LIBXFCE4GUI_LIBS) \
$(LIBXFCE4UTIL_LIBS) \
- $(LIBGLADE_LIBS) \
$(XFCONF_LIBS) \
$(top_builddir)/libxfpm/libxfpmcommon.la
@@ -44,15 +45,11 @@ manpage_DATA = xfce4-power-manager-settings.1
if MAINTAINER_MODE
BUILT_SOURCES = \
- xfce-power-manager-dbus-client.h \
- xfpm-settings-glade.h
+ xfce-power-manager-dbus-client.h
xfce-power-manager-dbus-client.h: $(top_srcdir)/src/org.xfce.Power.Manager.xml
dbus-binding-tool --mode=glib-client --prefix=xfpm_manager $< >$@
-xfpm-settings-glade.h: $(srcdir)/xfpm-settings.glade
- exo-csource --static --name=xfpm_settings_glade $< >$@
-
endif
#
@@ -66,8 +63,6 @@ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
EXTRA_DIST = \
xfce-power-manager-dbus-client.h \
- xfpm-settings-glade.h \
- xfpm-settings.glade \
$(desktop_in_files) \
$(manpage_DATA)
diff --git a/settings/xfpm-settings.c b/settings/xfpm-settings.c
index 5d5db294..4617f9c4 100644
--- a/settings/xfpm-settings.c
+++ b/settings/xfpm-settings.c
@@ -28,7 +28,6 @@
#include <gtk/gtk.h>
#include <glib.h>
-#include <glade/glade.h>
#include <xfconf/xfconf.h>
@@ -38,12 +37,12 @@
#include "libxfpm/xfpm-common.h"
#include "libxfpm/xfpm-string.h"
-#include "xfpm-settings-glade.h"
-
#include "xfpm-settings.h"
#include "xfpm-config.h"
-static GladeXML *xml = NULL;
+#define INTERFACE_FILE INTERFACES_DIR "/xfpm-settings.ui"
+
+static GtkBuilder *xml = NULL;
#ifdef HAVE_DPMS
static GtkWidget *on_battery_dpms_sleep = NULL;
@@ -53,9 +52,102 @@ static GtkWidget *on_ac_dpms_off = NULL;
#endif
/*
- * Callback settings
+ * GtkBuilder callbacks
*/
-static void
+void battery_critical_changed_cb (GtkWidget *w,
+ XfconfChannel *channel);
+
+void set_show_tray_icon_cb (GtkWidget *w,
+ XfconfChannel *channel);
+
+void inactivity_on_ac_value_changed_cb (GtkWidget *widget,
+ XfconfChannel *channel);
+
+void inactivity_on_battery_value_changed_cb (GtkWidget *widget,
+ XfconfChannel *channel);
+
+void button_sleep_changed_cb (GtkWidget *w,
+ XfconfChannel *channel);
+
+void button_power_changed_cb (GtkWidget *w,
+ XfconfChannel *channel);
+
+void button_hibernate_changed_cb (GtkWidget *w,
+ XfconfChannel *channel);
+
+void power_save_toggled_cb (GtkWidget *w,
+ XfconfChannel *channel);
+
+void notify_toggled_cb (GtkWidget *w,
+ XfconfChannel *channel);
+
+void set_hibernate_inactivity (GtkWidget *w,
+ XfconfChannel *channel);
+
+void set_suspend_inactivity (GtkWidget *w,
+ XfconfChannel *channel);
+
+void set_dpms_standby_mode (GtkWidget *w,
+ XfconfChannel *channel);
+
+void set_dpms_suspend_mode (GtkWidget *w,
+ XfconfChannel *channel);
+
+void dpms_toggled_cb (GtkWidget *w,
+ XfconfChannel *channel);
+
+void sleep_on_battery_value_changed_cb (GtkWidget *w,
+ XfconfChannel *channel);
+
+void off_on_battery_value_changed_cb (GtkWidget *w,
+ XfconfChannel *channel);
+
+void sleep_on_ac_value_changed_cb (GtkWidget *w,
+ XfconfChannel *channel);
+
+void off_on_ac_value_changed_cb (GtkWidget *w,
+ XfconfChannel *channel);
+
+gchar *format_dpms_value_cb (GtkScale *scale,
+ gdouble value,
+ gpointer data);
+
+gchar *format_inactivity_value_cb (GtkScale *scale,
+ gdouble value,
+ gpointer data);
+
+gchar *format_brightness_value_cb (GtkScale *scale,
+ gdouble value,
+ gpointer data);
+
+void brightness_on_battery_value_changed_cb (GtkWidget *w,
+ XfconfChannel *channel);
+
+void brightness_on_ac_value_changed_cb (GtkWidget *w,
+ XfconfChannel *channel);
+
+gboolean critical_spin_output_cb (GtkSpinButton *w,
+ gpointer data);
+
+void on_battery_lid_changed_cb (GtkWidget *w,
+ XfconfChannel *channel);
+
+void on_ac_lid_changed_cb (GtkWidget *w,
+ XfconfChannel *channel);
+
+void critical_level_value_changed_cb (GtkSpinButton *w,
+ XfconfChannel *channel);
+
+void lock_screen_toggled_cb (GtkWidget *w,
+ XfconfChannel *channel);
+
+void cpu_freq_control_changed_cb (GtkWidget *w,
+ XfconfChannel *channel);
+
+void _cursor_changed_cb (GtkTreeView *view,
+ gpointer data);
+
+void
battery_critical_changed_cb (GtkWidget *w, XfconfChannel *channel)
{
GtkTreeModel *model;
@@ -79,7 +171,7 @@ battery_critical_changed_cb (GtkWidget *w, XfconfChannel *channel)
}
}
-static void
+void
set_show_tray_icon_cb (GtkWidget *w, XfconfChannel *channel)
{
GtkTreeModel *model;
@@ -103,7 +195,7 @@ set_show_tray_icon_cb (GtkWidget *w, XfconfChannel *channel)
}
}
-static void
+void
inactivity_on_ac_value_changed_cb (GtkWidget *widget, XfconfChannel *channel)
{
gint value = (gint)gtk_range_get_value (GTK_RANGE (widget));
@@ -114,7 +206,7 @@ inactivity_on_ac_value_changed_cb (GtkWidget *widget, XfconfChannel *channel)
}
}
-static void
+void
inactivity_on_battery_value_changed_cb (GtkWidget *widget, XfconfChannel *channel)
{
gint value = (gint)gtk_range_get_value (GTK_RANGE (widget));
@@ -125,8 +217,8 @@ inactivity_on_battery_value_changed_cb (GtkWidget *widget, XfconfChannel *channe
}
}
-static void
-set_sleep_changed_cb (GtkWidget *w, XfconfChannel *channel)
+void
+button_sleep_changed_cb (GtkWidget *w, XfconfChannel *channel)
{
GtkTreeModel *model;
GtkTreeIter selected_row;
@@ -149,8 +241,8 @@ set_sleep_changed_cb (GtkWidget *w, XfconfChannel *channel)
}
}
-static void
-set_power_changed_cb (GtkWidget *w, XfconfChannel *channel)
+void
+button_power_changed_cb (GtkWidget *w, XfconfChannel *channel)
{
GtkTreeModel *model;
GtkTreeIter selected_row;
@@ -173,8 +265,8 @@ set_power_changed_cb (GtkWidget *w, XfconfChannel *channel)
}
}
-static void
-set_hibernate_changed_cb (GtkWidget *w, XfconfChannel *channel)
+void
+button_hibernate_changed_cb (GtkWidget *w, XfconfChannel *channel)
{
GtkTreeModel *model;
GtkTreeIter selected_row;
@@ -197,7 +289,7 @@ set_hibernate_changed_cb (GtkWidget *w, XfconfChannel *channel)
}
}
-static void
+void
power_save_toggled_cb (GtkWidget *w, XfconfChannel *channel)
{
gboolean val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(w));
@@ -208,7 +300,7 @@ power_save_toggled_cb (GtkWidget *w, XfconfChannel *channel)
}
}
-static void
+void
notify_toggled_cb (GtkWidget *w, XfconfChannel *channel)
{
gboolean val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(w));
@@ -219,7 +311,7 @@ notify_toggled_cb (GtkWidget *w, XfconfChannel *channel)
}
}
-static void
+void
set_hibernate_inactivity (GtkWidget *w, XfconfChannel *channel)
{
if (!xfconf_channel_set_string (channel, INACTIVITY_SLEEP_MODE, "Hibernate") )
@@ -228,7 +320,7 @@ set_hibernate_inactivity (GtkWidget *w, XfconfChannel *channel)
}
}
-static void
+void
set_suspend_inactivity (GtkWidget *w, XfconfChannel *channel)
{
if (!xfconf_channel_set_string (channel, INACTIVITY_SLEEP_MODE, "Suspend") )
@@ -237,28 +329,33 @@ set_suspend_inactivity (GtkWidget *w, XfconfChannel *channel)
}
}
-#ifdef HAVE_DPMS
-static void
-set_dpms_sleep_mode (GtkWidget *w, XfconfChannel *channel)
+
+void
+set_dpms_standby_mode (GtkWidget *w, XfconfChannel *channel)
{
+#ifdef HAVE_DPMS
if (!xfconf_channel_set_string (channel, DPMS_SLEEP_MODE, "sleep") )
{
g_critical ("Cannot set value sleep for property %s\n", DPMS_SLEEP_MODE);
}
+#endif
}
-static void
+void
set_dpms_suspend_mode (GtkWidget *w, XfconfChannel *channel)
{
+#ifdef HAVE_DPMS
if (!xfconf_channel_set_string (channel, DPMS_SLEEP_MODE, "suspend") )
{
g_critical ("Cannot set value sleep for property %s\n", DPMS_SLEEP_MODE);
}
+#endif
}
-static void
+void
dpms_toggled_cb (GtkWidget *w, XfconfChannel *channel)
{
+#ifdef HAVE_DPMS
gboolean val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(w));
xfconf_channel_set_bool (channel, DPMS_ENABLED_CFG, val);
@@ -271,13 +368,15 @@ dpms_toggled_cb (GtkWidget *w, XfconfChannel *channel)
gtk_widget_set_sensitive (on_battery_dpms_off, val);
gtk_widget_set_sensitive (on_battery_dpms_sleep, val);
}
+#endif
}
-static void
+void
sleep_on_battery_value_changed_cb (GtkWidget *w, XfconfChannel *channel)
{
- gint off_value = (gint)gtk_range_get_value (GTK_RANGE(on_battery_dpms_off));
- gint sleep_value = (gint)gtk_range_get_value (GTK_RANGE(w));
+#ifdef HAVE_DPMS
+ gint off_value = (gint)gtk_range_get_value (GTK_RANGE (on_battery_dpms_off));
+ gint sleep_value = (gint)gtk_range_get_value (GTK_RANGE (w));
if ( off_value != 0 )
{
@@ -291,11 +390,13 @@ sleep_on_battery_value_changed_cb (GtkWidget *w, XfconfChannel *channel)
{
g_critical ("Cannot set value for property %s\n", ON_BATT_DPMS_SLEEP);
}
+#endif
}
-static void
+void
off_on_battery_value_changed_cb (GtkWidget *w, XfconfChannel *channel)
{
+#ifdef HAVE_DPMS
gint off_value = (gint)gtk_range_get_value (GTK_RANGE(w));
gint sleep_value = (gint)gtk_range_get_value (GTK_RANGE(on_battery_dpms_sleep));
@@ -311,12 +412,13 @@ off_on_battery_value_changed_cb (GtkWidget *w, XfconfChannel *channel)
{
g_critical ("Cannot set value for property %s\n", ON_BATT_DPMS_OFF);
}
-
+#endif
}
-static void
+void
sleep_on_ac_value_changed_cb (GtkWidget *w, XfconfChannel *channel)
{
+#ifdef HAVE_DPMS
gint off_value = (gint)gtk_range_get_value (GTK_RANGE(on_ac_dpms_off));
gint sleep_value = (gint)gtk_range_get_value (GTK_RANGE(w));
@@ -335,11 +437,13 @@ sleep_on_ac_value_changed_cb (GtkWidget *w, XfconfChannel *channel)
{
g_critical ("Cannot set value for property %s\n", ON_AC_DPMS_SLEEP);
}
+#endif
}
-static void
+void
off_on_ac_value_changed_cb (GtkWidget *w, XfconfChannel *channel)
{
+#ifdef HAVE_DPMS
gint off_value = (gint)gtk_range_get_value (GTK_RANGE(w));
gint sleep_value = (gint)gtk_range_get_value (GTK_RANGE(on_ac_dpms_sleep));
@@ -358,26 +462,27 @@ off_on_ac_value_changed_cb (GtkWidget *w, XfconfChannel *channel)
{
g_critical ("Cannot set value for property %s\n", ON_AC_DPMS_OFF);
}
+#endif
}
/*
* Format value of GtkRange used with DPMS
*/
-static gchar *
-format_dpms_value_cb (GtkScale *scale, gdouble value)
+gchar *
+format_dpms_value_cb (GtkScale *scale, gdouble value, gpointer data)
{
if ( (gint)value == 0 )
return g_strdup (_("Never"));
if ( (int)value == 1 )
return g_strdup (_("One minute"));
-
+
return g_strdup_printf ("%d %s", (int)value, _("Minutes"));
}
-#endif /* HAVE_DPMS */
-static gchar *
-format_inactivity_value_cb (GtkScale *scale, gdouble value)
+
+gchar *
+format_inactivity_value_cb (GtkScale *scale, gdouble value, gpointer data)
{
gint h, min;
@@ -405,8 +510,8 @@ format_inactivity_value_cb (GtkScale *scale, gdouble value)
/*
* Format value of GtkRange used with Brightness
*/
-static gchar *
-format_brightness_value_cb (GtkScale *scale, gdouble value)
+gchar *
+format_brightness_value_cb (GtkScale *scale, gdouble value, gpointer data)
{
if ( (gint)value <= 9 )
return g_strdup (_("Never"));
@@ -414,7 +519,7 @@ format_brightness_value_cb (GtkScale *scale, gdouble value)
return g_strdup_printf ("%d %s", (int)value, _("Seconds"));
}
-static void
+void
brightness_on_battery_value_changed_cb (GtkWidget *w, XfconfChannel *channel)
{
gint value = (gint)gtk_range_get_value (GTK_RANGE(w));
@@ -425,7 +530,7 @@ brightness_on_battery_value_changed_cb (GtkWidget *w, XfconfChannel *channel)
}
}
-static void
+void
brightness_on_ac_value_changed_cb (GtkWidget *w, XfconfChannel *channel)
{
gint value = (gint)gtk_range_get_value (GTK_RANGE(w));
@@ -436,7 +541,7 @@ brightness_on_ac_value_changed_cb (GtkWidget *w, XfconfChannel *channel)
}
}
-static gboolean
+gboolean
critical_spin_output_cb (GtkSpinButton *w, gpointer data)
{
gint val = (gint) gtk_spin_button_get_value (w);
@@ -448,7 +553,7 @@ critical_spin_output_cb (GtkSpinButton *w, gpointer data)
return TRUE;
}
-static void
+void
on_battery_lid_changed_cb (GtkWidget *w, XfconfChannel *channel)
{
GtkTreeModel *model;
@@ -472,7 +577,7 @@ on_battery_lid_changed_cb (GtkWidget *w, XfconfChannel *channel)
}
}
-static void
+void
on_ac_lid_changed_cb (GtkWidget *w, XfconfChannel *channel)
{
GtkTreeModel *model;
@@ -496,7 +601,7 @@ on_ac_lid_changed_cb (GtkWidget *w, XfconfChannel *channel)
}
}
-static void
+void
critical_level_value_changed_cb (GtkSpinButton *w, XfconfChannel *channel)
{
guint val = (guint) gtk_spin_button_get_value (w);
@@ -507,7 +612,7 @@ critical_level_value_changed_cb (GtkSpinButton *w, XfconfChannel *channel)
}
}
-static void
+void
lock_screen_toggled_cb (GtkWidget *w, XfconfChannel *channel)
{
gboolean val = (gint) gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(w));
@@ -517,18 +622,19 @@ lock_screen_toggled_cb (GtkWidget *w, XfconfChannel *channel)
}
}
-#ifdef SYSTEM_IS_LINUX
-static void
+void
cpu_freq_control_changed_cb (GtkWidget *w, XfconfChannel *channel)
{
+#ifdef SYSTEM_IS_LINUX
gboolean val = (gint) gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(w));
if ( !xfconf_channel_set_bool (channel, CPU_FREQ_CONTROL, val) )
{
g_critical ("Unable to set value for property %s\n", CPU_FREQ_CONTROL);
}
-}
#endif
+}
+
static void
xfpm_settings_on_battery (XfconfChannel *channel, gboolean user_privilege, gboolean can_suspend,
@@ -552,9 +658,9 @@ xfpm_settings_on_battery (XfconfChannel *channel, gboolean user_privilege, gbool
GtkWidget *dpms_frame_on_battery;
#endif
- battery_critical = glade_xml_get_widget (xml, "battery-critical-combox");
+ battery_critical = GTK_WIDGET (gtk_builder_get_object (xml, "battery-critical-combox"));
- inact = glade_xml_get_widget (xml, "inactivity-on-battery");
+ inact = GTK_WIDGET (gtk_builder_get_object (xml, "inactivity-on-battery"));
if ( !can_suspend && !can_hibernate )
{
@@ -564,10 +670,7 @@ xfpm_settings_on_battery (XfconfChannel *channel, gboolean user_privilege, gbool
val = xfconf_channel_get_uint (channel, ON_BATTERY_INACTIVITY_TIMEOUT, 30);
gtk_range_set_value (GTK_RANGE (inact), val);
- g_signal_connect (inact, "value-changed",
- G_CALLBACK (inactivity_on_battery_value_changed_cb), channel);
- g_signal_connect (inact, "format-value",
- G_CALLBACK (format_inactivity_value_cb), NULL);
+
if (!user_privilege )
{
@@ -613,52 +716,30 @@ xfpm_settings_on_battery (XfconfChannel *channel, gboolean user_privilege, gbool
}
}
- g_signal_connect (battery_critical, "changed",
- G_CALLBACK(battery_critical_changed_cb), channel);
-
- g_free(str);
+ g_free (str);
- power_save = glade_xml_get_widget (xml, "power-save");
+ power_save = GTK_WIDGET (gtk_builder_get_object (xml, "power-save"));
save_power = xfconf_channel_get_bool (channel, POWER_SAVE_ON_BATTERY, TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(power_save), save_power);
- g_signal_connect (power_save, "toggled",
- G_CALLBACK(power_save_toggled_cb), channel);
-
/*
* DPMS settings when running on battery power
*/
#ifdef HAVE_DPMS
- dpms_frame_on_battery = glade_xml_get_widget (xml, "dpms-on-battery-frame");
+ dpms_frame_on_battery = GTK_WIDGET (gtk_builder_get_object (xml, "dpms-on-battery-frame"));
gtk_widget_show (GTK_WIDGET(dpms_frame_on_battery));
-
- on_battery_dpms_sleep = glade_xml_get_widget (xml, "sleep-dpms-on-battery");
val = xfconf_channel_get_uint (channel, ON_BATT_DPMS_SLEEP, 3);
gtk_range_set_value (GTK_RANGE(on_battery_dpms_sleep), val);
- g_signal_connect (on_battery_dpms_sleep, "value-changed",
- G_CALLBACK(sleep_on_battery_value_changed_cb), channel);
-
- g_signal_connect (on_battery_dpms_sleep, "format-value",
- G_CALLBACK(format_dpms_value_cb), NULL);
-
- on_battery_dpms_off = glade_xml_get_widget (xml, "off-dpms-on-battery");
-
val = xfconf_channel_get_uint (channel, ON_BATT_DPMS_OFF, 5);
- gtk_range_set_value (GTK_RANGE(on_battery_dpms_off), val);
-
- g_signal_connect (on_battery_dpms_off, "value-changed",
- G_CALLBACK(off_on_battery_value_changed_cb), channel);
- g_signal_connect (on_battery_dpms_off, "format-value",
- G_CALLBACK(format_dpms_value_cb), NULL);
#endif
/*
* Lid switch settings on battery
*/
- lid = glade_xml_get_widget (xml, "on-battery-lid");
+ lid = GTK_WIDGET (gtk_builder_get_object (xml, "on-battery-lid"));
if ( has_lid )
{
if (!user_privilege )
@@ -686,9 +767,6 @@ xfpm_settings_on_battery (XfconfChannel *channel, gboolean user_privilege, gbool
gtk_list_store_set (list_store, &iter, 0, _("Hibernate"), 1, 2, -1);
}
- g_signal_connect (lid, "changed",
- G_CALLBACK(on_battery_lid_changed_cb), channel);
-
str = xfconf_channel_get_string (channel, LID_SWITCH_ON_BATTERY_CFG, "Nothing");
val = xfpm_shutdown_string_to_int (str);
@@ -715,7 +793,7 @@ xfpm_settings_on_battery (XfconfChannel *channel, gboolean user_privilege, gbool
}
else
{
- label = glade_xml_get_widget (xml, "on-battery-lid-label");
+ label = GTK_WIDGET (gtk_builder_get_object (xml, "on-battery-lid-label"));
gtk_widget_hide (label);
gtk_widget_hide (lid);
}
@@ -724,28 +802,23 @@ xfpm_settings_on_battery (XfconfChannel *channel, gboolean user_privilege, gbool
*
* Brightness on battery power
*/
- brg = glade_xml_get_widget (xml ,"brg-on-battery");
+ brg = GTK_WIDGET (gtk_builder_get_object (xml ,"brg-on-battery"));
if ( has_lcd_brightness )
{
val = xfconf_channel_get_uint (channel, BRIGHTNESS_ON_BATTERY, 10);
gtk_range_set_value (GTK_RANGE(brg), val);
- g_signal_connect (brg, "value-changed",
- G_CALLBACK(brightness_on_battery_value_changed_cb), channel);
-
- g_signal_connect (brg, "format-value",
- G_CALLBACK(format_brightness_value_cb), NULL);
}
else
{
- frame = glade_xml_get_widget (xml, "on-battery-brg-frame");
+ frame = GTK_WIDGET (gtk_builder_get_object (xml, "on-battery-brg-frame"));
gtk_widget_hide_all (frame);
}
#ifndef HAVE_DPMS
if ( !has_lcd_brightness )
{
- gtk_notebook_remove_page (GTK_NOTEBOOK (glade_xml_get_widget (xml, "on-battery-notebook")), 1);
+ gtk_notebook_remove_page (GTK_NOTEBOOK (GTK_WIDGET (gtk_builder_get_object (xml, "on-battery-notebook"))), 1);
}
#endif
}
@@ -769,7 +842,7 @@ xfpm_settings_on_ac (XfconfChannel *channel, gboolean user_privilege, gboolean c
GtkWidget *dpms_frame_on_ac;
#endif
- inact = glade_xml_get_widget (xml, "inactivity-on-ac");
+ inact = GTK_WIDGET (gtk_builder_get_object (xml, "inactivity-on-ac"));
if ( !can_suspend && !can_hibernate )
{
@@ -779,43 +852,25 @@ xfpm_settings_on_ac (XfconfChannel *channel, gboolean user_privilege, gboolean c
val = xfconf_channel_get_uint (channel, ON_AC_INACTIVITY_TIMEOUT, 30);
gtk_range_set_value (GTK_RANGE (inact), val);
- g_signal_connect (inact, "value-changed",
- G_CALLBACK (inactivity_on_ac_value_changed_cb), channel);
- g_signal_connect (inact, "format-value",
- G_CALLBACK (format_inactivity_value_cb), NULL);
#ifdef HAVE_DPMS
/*
* DPMS settings when running on AC power
*/
- dpms_frame_on_ac = glade_xml_get_widget (xml, "dpms-on-ac-frame");
+ dpms_frame_on_ac = GTK_WIDGET (gtk_builder_get_object (xml, "dpms-on-ac-frame"));
gtk_widget_show (GTK_WIDGET(dpms_frame_on_ac));
- on_ac_dpms_sleep = glade_xml_get_widget (xml, "sleep-dpms-on-ac");
-
val = xfconf_channel_get_uint (channel, ON_AC_DPMS_SLEEP, 10);
gtk_range_set_value (GTK_RANGE (on_ac_dpms_sleep), val);
- g_signal_connect (on_ac_dpms_sleep, "value-changed",
- G_CALLBACK(sleep_on_ac_value_changed_cb), channel);
-
- g_signal_connect (on_ac_dpms_sleep, "format-value",
- G_CALLBACK(format_dpms_value_cb), NULL);
-
- on_ac_dpms_off = glade_xml_get_widget (xml, "off-dpms-on-ac");
-
val = xfconf_channel_get_uint (channel, ON_AC_DPMS_OFF, 15);
gtk_range_set_value (GTK_RANGE(on_ac_dpms_off), val);
- g_signal_connect (on_ac_dpms_off, "value-changed",
- G_CALLBACK(off_on_ac_value_changed_cb), channel);
- g_signal_connect (on_ac_dpms_off, "format-value",
- G_CALLBACK(format_dpms_value_cb), NULL);
#endif
/*
* Lid switch settings on AC power
*/
- lid = glade_xml_get_widget (xml, "on-ac-lid");
+ lid = GTK_WIDGET (gtk_builder_get_object (xml, "on-ac-lid"));
if ( has_lid )
{
list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT);
@@ -843,9 +898,6 @@ xfpm_settings_on_ac (XfconfChannel *channel, gboolean user_privilege, gboolean c
gtk_list_store_set (list_store, &iter, 0, _("Hibernate"), 1, 2, -1);
}
- g_signal_connect (lid, "changed",
- G_CALLBACK(on_ac_lid_changed_cb), channel);
-
str = xfconf_channel_get_string (channel, LID_SWITCH_ON_AC_CFG, "Nothing");
val = xfpm_shutdown_string_to_int (str);
@@ -872,7 +924,7 @@ xfpm_settings_on_ac (XfconfChannel *channel, gboolean user_privilege, gboolean c
}
else
{
- frame = glade_xml_get_widget (xml, "on-ac-actions-frame");
+ frame = GTK_WIDGET (gtk_builder_get_object (xml, "on-ac-actions-frame"));
gtk_widget_hide_all (frame);
}
@@ -880,28 +932,23 @@ xfpm_settings_on_ac (XfconfChannel *channel, gboolean user_privilege, gboolean c
*
* Brightness on AC power
*/
- brg = glade_xml_get_widget (xml ,"brg-on-ac");
+ brg = GTK_WIDGET (gtk_builder_get_object (xml ,"brg-on-ac"));
if ( has_lcd_brightness )
{
val = xfconf_channel_get_uint (channel, BRIGHTNESS_ON_AC, 9);
gtk_range_set_value (GTK_RANGE(brg), val);
- g_signal_connect (brg, "value-changed",
- G_CALLBACK(brightness_on_ac_value_changed_cb), channel);
-
- g_signal_connect (brg, "format-value",
- G_CALLBACK(format_brightness_value_cb), NULL);
}
else
{
- frame = glade_xml_get_widget (xml, "on-ac-brg-frame");
+ frame = GTK_WIDGET (gtk_builder_get_object (xml, "on-ac-brg-frame"));
gtk_widget_hide_all (frame);
}
#ifndef HAVE_DPMS
if ( !has_lcd_brightness )
{
- gtk_notebook_remove_page (GTK_NOTEBOOK (glade_xml_get_widget (xml, "on-ac-notebook")), 1);
+ gtk_notebook_remove_page (GTK_NOTEBOOK (GTK_WIDGET (gtk_builder_get_object (xml, "on-ac-notebook"))), 1);
}
#endif
}
@@ -942,7 +989,7 @@ xfpm_settings_general (XfconfChannel *channel, gboolean user_privilege,
list_store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_INT);
- tray = glade_xml_get_widget (xml, "tray-combox");
+ tray = GTK_WIDGET (gtk_builder_get_object (xml, "tray-combox"));
gtk_combo_box_set_model (GTK_COMBO_BOX(tray), GTK_TREE_MODEL(list_store));
gtk_list_store_append(list_store, &iter);
@@ -956,18 +1003,13 @@ xfpm_settings_general (XfconfChannel *channel, gboolean user_privilege,
show_tray = xfconf_channel_get_uint (channel, SHOW_TRAY_ICON_CFG, 1);
gtk_combo_box_set_active (GTK_COMBO_BOX(tray), show_tray);
- g_signal_connect (tray, "changed",
- G_CALLBACK(set_show_tray_icon_cb), channel);
- dpms = glade_xml_get_widget (xml, "enable-dpms");
+ dpms = GTK_WIDGET (gtk_builder_get_object (xml, "enable-dpms"));
#ifdef HAVE_DPMS
/*
* Global dpms settings (enable/disable)
*/
- g_signal_connect (dpms, "toggled",
- G_CALLBACK(dpms_toggled_cb), channel);
-
val = xfconf_channel_get_bool (channel, DPMS_ENABLED_CFG, TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(dpms), val);
@@ -981,8 +1023,8 @@ xfpm_settings_general (XfconfChannel *channel, gboolean user_privilege,
* Power button
*/
list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT);
- power = glade_xml_get_widget (xml, "power-combox");
- power_label = glade_xml_get_widget (xml, "power-label");
+ power = GTK_WIDGET (gtk_builder_get_object (xml, "power-combox"));
+ power_label = GTK_WIDGET (gtk_builder_get_object (xml, "power-label"));
if ( has_power_button )
{
@@ -1015,9 +1057,6 @@ xfpm_settings_general (XfconfChannel *channel, gboolean user_privilege,
gtk_list_store_append (list_store, &iter);
gtk_list_store_set (list_store, &iter, 0, _("Ask"), 1, 4, -1);
- g_signal_connect (power, "changed",
- G_CALLBACK(set_power_changed_cb), channel);
-
default_power_value = xfconf_channel_get_string (channel, POWER_SWITCH_CFG, "Nothing");
power_val_int = xfpm_shutdown_string_to_int (default_power_value );
@@ -1051,8 +1090,8 @@ xfpm_settings_general (XfconfChannel *channel, gboolean user_privilege,
* Hibernate button
*/
list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT);
- hibernate = glade_xml_get_widget (xml, "hibernate-combox");
- hibernate_label = glade_xml_get_widget (xml, "hibernate-label");
+ hibernate = GTK_WIDGET (gtk_builder_get_object (xml, "hibernate-combox"));
+ hibernate_label = GTK_WIDGET (gtk_builder_get_object (xml, "hibernate-label"));
if (has_hibernate_button )
{
if (!user_privilege )
@@ -1081,9 +1120,6 @@ xfpm_settings_general (XfconfChannel *channel, gboolean user_privilege,
gtk_list_store_append (list_store, &iter);
gtk_list_store_set (list_store, &iter, 0, _("Ask"), 1, 4, -1);
- g_signal_connect (hibernate, "changed",
- G_CALLBACK(set_hibernate_changed_cb), channel);
-
default_hibernate_value = xfconf_channel_get_string (channel, HIBERNATE_SWITCH_CFG, "Nothing");
hibernate_val_int = xfpm_shutdown_string_to_int (default_hibernate_value );
@@ -1117,8 +1153,8 @@ xfpm_settings_general (XfconfChannel *channel, gboolean user_privilege,
* Sleep button
*/
list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT);
- sleep_w = glade_xml_get_widget (xml, "sleep-combox");
- sleep_label = glade_xml_get_widget (xml, "sleep-label");
+ sleep_w = GTK_WIDGET (gtk_builder_get_object (xml, "sleep-combox"));
+ sleep_label = GTK_WIDGET (gtk_builder_get_object (xml, "sleep-label"));
if ( has_sleep_button )
{
if (!user_privilege )
@@ -1147,9 +1183,6 @@ xfpm_settings_general (XfconfChannel *channel, gboolean user_privilege,
gtk_list_store_append (list_store, &iter);
gtk_list_store_set (list_store, &iter, 0, _("Ask"), 1, 4, -1);
- g_signal_connect (sleep_w, "changed",
- G_CALLBACK(set_sleep_changed_cb), channel);
-
default_sleep_value = xfconf_channel_get_string (channel, SLEEP_SWITCH_CFG, "Nothing");
sleep_val_int = xfpm_shutdown_string_to_int (default_sleep_value );
if ( G_UNLIKELY (sleep_val_int == -1 || sleep_val_int == 3) )
@@ -1181,13 +1214,11 @@ xfpm_settings_general (XfconfChannel *channel, gboolean user_privilege,
* Enable/Disable Notification
*/
- notify = glade_xml_get_widget (xml, "notification");
+ notify = GTK_WIDGET (gtk_builder_get_object (xml, "notification"));
val = xfconf_channel_get_bool (channel, GENERAL_NOTIFICATION_CFG, TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(notify), val);
- g_signal_connect (notify, "toggled",
- G_CALLBACK(notify_toggled_cb), channel);
}
static void
@@ -1203,8 +1234,8 @@ xfpm_settings_advanced (XfconfChannel *channel, gboolean system_laptop, gboolean
GtkWidget *sleep_dpms_mode;
GtkWidget *suspend_dpms_mode;
- GtkWidget *inact_suspend = glade_xml_get_widget (xml, "inactivity-suspend");
- GtkWidget *inact_hibernate = glade_xml_get_widget (xml, "inactivity-hibernate");
+ GtkWidget *inact_suspend = GTK_WIDGET (gtk_builder_get_object (xml, "inactivity-suspend"));
+ GtkWidget *inact_hibernate = GTK_WIDGET (gtk_builder_get_object (xml, "inactivity-hibernate"));
if ( !can_suspend )
{
@@ -1218,12 +1249,6 @@ xfpm_settings_advanced (XfconfChannel *channel, gboolean system_laptop, gboolean
gtk_widget_set_tooltip_text (inact_hibernate, _("Hibernate operation not permitted"));
}
- g_signal_connect (inact_suspend, "toggled",
- G_CALLBACK (set_suspend_inactivity), channel);
-
- g_signal_connect (inact_hibernate, "toggled",
- G_CALLBACK (set_hibernate_inactivity), channel);
-
str = xfconf_channel_get_string (channel, INACTIVITY_SLEEP_MODE, "Suspend");
if ( xfpm_strequal (str, "Suspend") )
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (inact_suspend), TRUE);
@@ -1237,15 +1262,10 @@ xfpm_settings_advanced (XfconfChannel *channel, gboolean system_laptop, gboolean
g_free (str);
- sleep_dpms_mode = glade_xml_get_widget (xml, "sleep-dpms-mode");
- suspend_dpms_mode = glade_xml_get_widget (xml, "suspend-dpms-mode");
+ sleep_dpms_mode = GTK_WIDGET (gtk_builder_get_object (xml, "sleep-dpms-mode"));
+ suspend_dpms_mode = GTK_WIDGET (gtk_builder_get_object (xml, "suspend-dpms-mode"));
#ifdef HAVE_DPMS
- g_signal_connect (sleep_dpms_mode, "toggled",
- G_CALLBACK(set_dpms_sleep_mode), channel);
- g_signal_connect (suspend_dpms_mode, "toggled",
- G_CALLBACK(set_dpms_suspend_mode), channel);
-
str = xfconf_channel_get_string (channel, DPMS_SLEEP_MODE, "sleep");
if ( xfpm_strequal (str, "sleep" ) )
@@ -1263,23 +1283,18 @@ xfpm_settings_advanced (XfconfChannel *channel, gboolean system_laptop, gboolean
#else
gtk_widget_hide (sleep_dpms_mode);
gtk_widget_hide (suspend_dpms_mode);
- gtk_widget_hide (glade_xml_get_widget (xml, "dpms-mode-label"));
+ gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (xml, "dpms-mode-label")));
#endif
/*
* Critical battery level
*/
- critical_level = glade_xml_get_widget (xml, "critical-spin");
+ critical_level = GTK_WIDGET (gtk_builder_get_object (xml, "critical-spin"));
if ( system_laptop )
{
gtk_widget_set_tooltip_text (critical_level,
_("When all the power sources of the computer reach this charge level"));
- g_signal_connect (critical_level, "output",
- G_CALLBACK(critical_spin_output_cb), NULL);
- g_signal_connect (critical_level, "value-changed",
- G_CALLBACK(critical_level_value_changed_cb), channel);
-
val = xfconf_channel_get_uint (channel, CRITICAL_POWER_LEVEL, 10 );
if ( val > 20 )
@@ -1292,7 +1307,7 @@ xfpm_settings_advanced (XfconfChannel *channel, gboolean system_laptop, gboolean
}
else
{
- label = glade_xml_get_widget (xml, "critical-level-label" );
+ label = GTK_WIDGET (gtk_builder_get_object (xml, "critical-level-label" ));
gtk_widget_hide (critical_level);
gtk_widget_hide (label);
}
@@ -1300,7 +1315,7 @@ xfpm_settings_advanced (XfconfChannel *channel, gboolean system_laptop, gboolean
/*
* Lock screen for suspend/hibernate
*/
- lock = glade_xml_get_widget (xml, "lock-screen");
+ lock = GTK_WIDGET (gtk_builder_get_object (xml, "lock-screen"));
if ( !user_privilege )
{
@@ -1310,18 +1325,14 @@ xfpm_settings_advanced (XfconfChannel *channel, gboolean system_laptop, gboolean
val = xfconf_channel_get_bool (channel, LOCK_SCREEN_ON_SLEEP, TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(lock), val);
- g_signal_connect (lock, "toggled",
- G_CALLBACK(lock_screen_toggled_cb), channel);
- cpu = glade_xml_get_widget (xml, "cpu-freq");
+ cpu = GTK_WIDGET (gtk_builder_get_object (xml, "cpu-freq"));
#ifdef SYSTEM_IS_LINUX
if ( system_laptop )
{
val = xfconf_channel_get_bool (channel, CPU_FREQ_CONTROL, TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(cpu), val);
- g_signal_connect (cpu, "toggled",
- G_CALLBACK(cpu_freq_control_changed_cb), channel);
}
else
gtk_widget_hide (cpu);
@@ -1331,8 +1342,8 @@ xfpm_settings_advanced (XfconfChannel *channel, gboolean system_laptop, gboolean
}
-static void
-_cursor_changed_cb(GtkTreeView *view,gpointer data)
+void
+_cursor_changed_cb (GtkTreeView *view, gpointer data)
{
GtkTreeSelection *sel;
GtkTreeModel *model;
@@ -1352,7 +1363,7 @@ _cursor_changed_cb(GtkTreeView *view,gpointer data)
if ( G_LIKELY (int_data >= 0 && int_data <= 3) )
{
- GtkWidget *nt = glade_xml_get_widget (xml, "main-notebook");
+ GtkWidget *nt = GTK_WIDGET (gtk_builder_get_object (xml, "main-notebook"));
gtk_notebook_set_current_page(GTK_NOTEBOOK(nt), int_data);
}
}
@@ -1360,7 +1371,7 @@ _cursor_changed_cb(GtkTreeView *view,gpointer data)
static void
xfpm_settings_tree_view (XfconfChannel *channel, gboolean system_laptop)
{
- GtkWidget *view = glade_xml_get_widget (xml, "treeview");
+ GtkWidget *view;
GdkPixbuf *pix;
GtkListStore *list_store;
GtkTreeIter iter;
@@ -1370,13 +1381,13 @@ xfpm_settings_tree_view (XfconfChannel *channel, gboolean system_laptop)
GtkTreePath *path;
gint i = 0;
+ view = GTK_WIDGET (gtk_builder_get_object (xml, "treeview"));
list_store = gtk_list_store_new(3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_INT);
gtk_tree_view_set_model (GTK_TREE_VIEW(view), GTK_TREE_MODEL(list_store));
gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(view),TRUE);
col = gtk_tree_view_column_new();
- //gtk_tree_view_column_set_spacing(col, 10);
renderer = gtk_cell_renderer_pixbuf_new();
@@ -1454,7 +1465,6 @@ xfpm_settings_tree_view (XfconfChannel *channel, gboolean system_laptop)
gtk_tree_selection_select_path(sel, path);
gtk_tree_path_free(path);
- g_signal_connect(view,"cursor-changed",G_CALLBACK(_cursor_changed_cb),NULL);
}
static void
@@ -1496,6 +1506,8 @@ xfpm_settings_dialog_new (XfconfChannel *channel, gboolean system_laptop,
GtkWidget *plug;
GtkWidget *dialog;
GtkWidget *allbox;
+ GError *error = NULL;
+
TRACE("system_laptop=%s user_privilege=%s can_suspend=%s can_hibernate=%s has_lcd_brightness=%s has_lid=%s "\
"has_sleep_button=%s has_hibernate_button=%s has_power_button=%s",
xfpm_bool_to_string (system_laptop), xfpm_bool_to_string (user_privilege),
@@ -1503,12 +1515,25 @@ xfpm_settings_dialog_new (XfconfChannel *channel, gboolean system_laptop,
xfpm_bool_to_string (has_lcd_brightness), xfpm_bool_to_string (has_lid),
xfpm_bool_to_string (has_sleep_button), xfpm_bool_to_string (has_hibernate_button),
xfpm_bool_to_string (has_power_button) );
-
- xml = glade_xml_new_from_buffer (xfpm_settings_glade,
- xfpm_settings_glade_length,
- "xfpm-settings-dialog", NULL);
+
+ xml = xfpm_builder_new_from_file (INTERFACE_FILE, &error);
+
+ if ( G_UNLIKELY (error) )
+ {
+ xfce_err ("%s : %s", error->message, _("Check your power manager installation"));
+ g_error ("%s", error->message);
+ }
+
+#ifdef HAVE_DPMS
+ on_battery_dpms_sleep = GTK_WIDGET (gtk_builder_get_object (xml, "sleep-dpms-on-battery"));
+ on_battery_dpms_off = GTK_WIDGET (gtk_builder_get_object (xml, "off-dpms-on-battery"));
+ on_ac_dpms_sleep = GTK_WIDGET (gtk_builder_get_object (xml, "sleep-dpms-on-ac"));
+ on_ac_dpms_off = GTK_WIDGET (gtk_builder_get_object (xml, "off-dpms-on-ac"));
+#endif
+
+ gtk_builder_connect_signals (xml, channel);
- dialog = glade_xml_get_widget (xml, "xfpm-settings-dialog");
+ dialog = GTK_WIDGET (gtk_builder_get_object (xml, "xfpm-settings-dialog"));
xfpm_settings_on_ac (channel, user_privilege, can_suspend, can_hibernate, has_lcd_brightness, has_lid );
@@ -1524,7 +1549,7 @@ xfpm_settings_dialog_new (XfconfChannel *channel, gboolean system_laptop,
if ( id != 0 )
{
- allbox = glade_xml_get_widget (xml, "allbox");
+ allbox = GTK_WIDGET (gtk_builder_get_object (xml, "allbox"));
plug = gtk_plug_new (id);
gtk_widget_show (plug);
gtk_widget_reparent (allbox, plug);
diff --git a/settings/xfpm-settings.glade b/settings/xfpm-settings.glade
deleted file mode 100644
index 8d528dd2..00000000
--- a/settings/xfpm-settings.glade
+++ /dev/null
@@ -1,1291 +0,0 @@
-<?xml version="1.0"?>
-<glade-interface>
- <!-- interface-requires gtk+ 2.12 -->
- <requires lib="xfce4"/>
- <!-- interface-requires xfce4 2360.6128 -->
- <!-- interface-naming-policy toplevel-contextual -->
- <widget class="XfceTitledDialog" id="xfpm-settings-dialog">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Xfce Power Manager</property>
- <property name="window_position">center-on-parent</property>
- <property name="icon_name">xfpm-ac-adapter</property>
- <property name="type_hint">dialog</property>
- <property name="has_separator">False</property>
- <property name="subtitle" translatable="yes">Power manager settings</property>
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox">
- <property name="visible">True</property>
- <property name="spacing">2</property>
- <child>
- <widget class="GtkVBox" id="allbox">
- <property name="visible">True</property>
- <child>
- <widget class="GtkHBox" id="hbox">
- <property name="visible">True</property>
- <child>
- <widget class="GtkTreeView" id="treeview">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <property name="enable_search">False</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkNotebook" id="main-notebook">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="show_tabs">False</property>
- <child>
- <widget class="GtkVBox" id="vbox16">
- <property name="visible">True</property>
- <property name="spacing">10</property>
- <child>
- <widget class="GtkFrame" id="frame">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <widget class="GtkAlignment" id="alignment">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <widget class="GtkVBox" id="vbox17">
- <property name="visible">True</property>
- <property name="spacing">10</property>
- <child>
- <widget class="GtkTable" id="table3">
- <property name="visible">True</property>
- <property name="n_rows">4</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">10</property>
- <property name="row_spacing">10</property>
- <child>
- <widget class="GtkHBox" id="hbox13">
- <property name="visible">True</property>
- <child>
- <widget class="GtkComboBox" id="power-combox">
- <property name="visible">True</property>
- <property name="items" translatable="yes">Nothing</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox14">
- <property name="visible">True</property>
- <child>
- <widget class="GtkComboBox" id="tray-combox">
- <property name="visible">True</property>
- <property name="items" translatable="yes">Always show icon</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox15">
- <property name="visible">True</property>
- <child>
- <widget class="GtkLabel" id="label24">
- <property name="visible">True</property>
- <property name="label" translatable="yes">System tray icon: </property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox16">
- <property name="visible">True</property>
- <child>
- <widget class="GtkLabel" id="power-label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">When power button is pressed:</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <child>
- <widget class="GtkLabel" id="hibernate-label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">When hibernate button is pressed:</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox4">
- <property name="visible">True</property>
- <child>
- <widget class="GtkComboBox" id="hibernate-combox">
- <property name="visible">True</property>
- <property name="items" translatable="yes">Nothing</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox5">
- <property name="visible">True</property>
- <child>
- <widget class="GtkLabel" id="sleep-label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">When sleep button is pressed:</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox6">
- <property name="visible">True</property>
- <child>
- <widget class="GtkComboBox" id="sleep-combox">
- <property name="visible">True</property>
- <property name="items" translatable="yes">Nothing</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkCheckButton" id="enable-dpms">
- <property name="label" translatable="yes">Enable monitor power management control</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkCheckButton" id="notification">
- <property name="label" translatable="yes">Enable notification</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label26">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;General Options&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="General">
- <property name="visible">True</property>
- <property name="label" translatable="yes">General</property>
- </widget>
- <packing>
- <property name="tab_fill">False</property>
- <property name="type">tab</property>
- </packing>
- </child>
- <child>
- <widget class="GtkNotebook" id="on-ac-notebook">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <child>
- <widget class="GtkVBox" id="vbox18">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">10</property>
- <child>
- <widget class="GtkFrame" id="on-ac-actions-frame">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <widget class="GtkAlignment" id="alignment9">
- <property name="visible">True</property>
- <property name="top_padding">5</property>
- <property name="left_padding">15</property>
- <child>
- <widget class="GtkVBox" id="vbox19">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">20</property>
- <child>
- <widget class="GtkHBox" id="hbox17">
- <property name="visible">True</property>
- <property name="spacing">10</property>
- <child>
- <widget class="GtkLabel" id="on-ac-lid-label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">When laptop lid is closed:</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkComboBox" id="on-ac-lid">
- <property name="visible">True</property>
- <property name="items" translatable="yes">Nothing</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="sleep">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Actions&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="padding">10</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <widget class="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Put the computer to sleep when inactive for:</property>
- </widget>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHScale" id="inactivity-on-ac">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment">30 30 360 1 10 10</property>
- <property name="digits">0</property>
- <property name="value_pos">bottom</property>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="Actions-on-ac">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Actions</property>
- </widget>
- <packing>
- <property name="tab_fill">False</property>
- <property name="type">tab</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVBox" id="vbox6">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <widget class="GtkFrame" id="dpms-on-ac-frame">
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <widget class="GtkAlignment" id="alignment10">
- <property name="visible">True</property>
- <property name="top_padding">5</property>
- <property name="left_padding">15</property>
- <child>
- <widget class="GtkVBox" id="vbox20">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">20</property>
- <child>
- <widget class="GtkVBox" id="vbox21">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <widget class="GtkLabel" id="label28">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Put display to sleep when computer is inactive for:</property>
- </widget>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHScale" id="sleep-dpms-on-ac">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment">17 0 60 1 0 0</property>
- <property name="show_fill_level">True</property>
- <property name="digits">0</property>
- <property name="value_pos">bottom</property>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVBox" id="vbox22">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <widget class="GtkLabel" id="label29">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Switch off display when computer is inactive for:</property>
- </widget>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHScale" id="off-dpms-on-ac">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment">15 0 60 1 0 10</property>
- <property name="show_fill_level">True</property>
- <property name="digits">0</property>
- <property name="value_pos">bottom</property>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label30">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Monitor&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkFrame" id="on-ac-brg-frame">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <widget class="GtkAlignment" id="alignment11">
- <property name="visible">True</property>
- <property name="top_padding">5</property>
- <property name="left_padding">15</property>
- <child>
- <widget class="GtkVBox" id="vbox23">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">10</property>
- <child>
- <widget class="GtkLabel" id="label31">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Reduce screen brightness when computer is inactive for:</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHScale" id="brg-on-ac">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment">10 9 120 1 0 0</property>
- <property name="digits">0</property>
- <property name="value_pos">bottom</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label32">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Brightness&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="monitor-on-ac">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Monitor</property>
- </widget>
- <packing>
- <property name="position">1</property>
- <property name="tab_fill">False</property>
- <property name="type">tab</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label8">
- <property name="visible">True</property>
- <property name="label" translatable="yes">On AC</property>
- </widget>
- <packing>
- <property name="position">1</property>
- <property name="tab_fill">False</property>
- <property name="type">tab</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVBox" id="vbox24">
- <property name="visible">True</property>
- <property name="spacing">10</property>
- <child>
- <widget class="GtkNotebook" id="on-battery-notebook">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <child>
- <widget class="GtkVBox" id="vbox25">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <widget class="GtkFrame" id="frame9">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <widget class="GtkAlignment" id="alignment12">
- <property name="visible">True</property>
- <property name="top_padding">5</property>
- <property name="left_padding">15</property>
- <child>
- <widget class="GtkVBox" id="vbox26">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">10</property>
- <child>
- <widget class="GtkTable" id="table4">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">10</property>
- <property name="row_spacing">10</property>
- <child>
- <widget class="GtkHBox" id="hbox18">
- <property name="visible">True</property>
- <child>
- <widget class="GtkComboBox" id="on-battery-lid">
- <property name="visible">True</property>
- <property name="items" translatable="yes">Nothing</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox19">
- <property name="visible">True</property>
- <child>
- <widget class="GtkComboBox" id="battery-critical-combox">
- <property name="visible">True</property>
- <property name="items" translatable="yes">Nothing</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox20">
- <property name="visible">True</property>
- <child>
- <widget class="GtkLabel" id="on-battery-lid-label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">When laptop lid is closed:</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox21">
- <property name="visible">True</property>
- <child>
- <widget class="GtkLabel" id="label34">
- <property name="visible">True</property>
- <property name="label" translatable="yes">When battery power is critical:</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkCheckButton" id="power-save">
- <property name="label" translatable="yes">Prefer power savings over performance</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVBox" id="vbox4">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <widget class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Put the computer to sleep when inactive for:</property>
- </widget>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHScale" id="inactivity-on-battery">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment">30 30 360 1 10 10</property>
- <property name="digits">0</property>
- <property name="value_pos">bottom</property>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label35">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Actions&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="padding">10</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="actions-on-battery">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Actions</property>
- </widget>
- <packing>
- <property name="tab_fill">False</property>
- <property name="type">tab</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVBox" id="vbox7">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <widget class="GtkFrame" id="dpms-on-battery-frame">
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <widget class="GtkAlignment" id="alignment13">
- <property name="visible">True</property>
- <property name="top_padding">5</property>
- <property name="left_padding">15</property>
- <child>
- <widget class="GtkVBox" id="vbox27">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">20</property>
- <child>
- <widget class="GtkVBox" id="vbox28">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <widget class="GtkLabel" id="label36">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Put display to sleep when computer is inactive for:</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHScale" id="sleep-dpms-on-battery">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment">5 0 60 1 0 0</property>
- <property name="show_fill_level">True</property>
- <property name="digits">0</property>
- <property name="value_pos">bottom</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVBox" id="vbox29">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <widget class="GtkLabel" id="label37">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Switch off display when computer is inactive for:</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHScale" id="off-dpms-on-battery">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment">5 0 60 1 0 0</property>
- <property name="show_fill_level">True</property>
- <property name="digits">0</property>
- <property name="value_pos">bottom</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label38">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Monitor&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkFrame" id="on-battery-brg-frame">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <widget class="GtkAlignment" id="alignment14">
- <property name="visible">True</property>
- <property name="top_padding">5</property>
- <property name="left_padding">15</property>
- <child>
- <widget class="GtkVBox" id="vbox30">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">10</property>
- <child>
- <widget class="GtkLabel" id="label39">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Reduce screen brightness when computer is inactive for:</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHScale" id="brg-on-battery">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment">10 9 120 1 0 0</property>
- <property name="digits">0</property>
- <property name="value_pos">bottom</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label40">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Brightness&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="monitor-on-battery">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Monitor</property>
- </widget>
- <packing>
- <property name="position">1</property>
- <property name="tab_fill">False</property>
- <property name="type">tab</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label22">
- <property name="visible">True</property>
- <property name="label" translatable="yes">On battery</property>
- </widget>
- <packing>
- <property name="position">2</property>
- <property name="tab_fill">False</property>
- <property name="type">tab</property>
- </packing>
- </child>
- <child>
- <widget class="GtkFrame" id="frame1">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <widget class="GtkVBox" id="vbox2">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <child>
- <widget class="GtkTable" id="table1">
- <property name="visible">True</property>
- <property name="n_rows">3</property>
- <property name="n_columns">2</property>
- <property name="row_spacing">8</property>
- <child>
- <widget class="GtkVBox" id="vbox5">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <widget class="GtkRadioButton" id="inactivity-suspend">
- <property name="label" translatable="yes">Suspend</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkRadioButton" id="inactivity-hibernate">
- <property name="label" translatable="yes">Hibernate</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">inactivity-suspend</property>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVBox" id="vbox3">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <widget class="GtkRadioButton" id="sleep-dpms-mode">
- <property name="label" translatable="yes">Standby</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkRadioButton" id="suspend-dpms-mode">
- <property name="label" translatable="yes">Suspend</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">sleep-dpms-mode</property>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <child>
- <widget class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Set computer inactivity sleep mode:</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox7">
- <property name="visible">True</property>
- <child>
- <widget class="GtkLabel" id="dpms-mode-label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Set monitor sleep mode:</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <child>
- <widget class="GtkLabel" id="critical-level-label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Consider the computer on low power at:</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox8">
- <property name="visible">True</property>
- <child>
- <widget class="GtkSpinButton" id="critical-spin">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">&#x25CF;</property>
- <property name="adjustment">5 5 20 1 0 0</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkCheckButton" id="cpu-freq">
- <property name="label" translatable="yes">Enable CPU frequency control</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkCheckButton" id="lock-screen">
- <property name="label" translatable="yes">Lock screen when going for suspend/hibernate</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Advanced Options&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label23">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Advanced</property>
- </widget>
- <packing>
- <property name="position">3</property>
- <property name="tab_fill">False</property>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area">
- <property name="visible">True</property>
- <child>
- <widget class="GtkButton" id="help-button">
- <property name="label">gtk-help</property>
- <property name="response_id">-11</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="close-button">
- <property name="label">gtk-close</property>
- <property name="response_id">-7</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
-</glade-interface>