summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-07-02 17:57:58 +0200
committerStefano Karapetsas <[email protected]>2014-07-02 17:57:58 +0200
commit30bc91bdbaa44589fe64021e0b2b51589a0cb156 (patch)
tree8a3f10d9db9304619274880edf5aa414693a83f7
parentdd209e7c581dd4dcf6f02e820d0a383f981f19eb (diff)
downloadmate-power-manager-30bc91bdbaa44589fe64021e0b2b51589a0cb156.tar.bz2
mate-power-manager-30bc91bdbaa44589fe64021e0b2b51589a0cb156.tar.xz
Remove old GTK2 code and support
-rw-r--r--data/Makefile.am2
-rw-r--r--data/gpm-prefs-deprecated.ui1133
-rw-r--r--data/gpm-statistics-deprecated.ui504
-rw-r--r--po/POTFILES.in2
-rw-r--r--src/gpm-prefs-core.c136
-rw-r--r--src/gpm-statistics.c82
-rw-r--r--src/gpm-tray-icon.c5
7 files changed, 36 insertions, 1828 deletions
diff --git a/data/Makefile.am b/data/Makefile.am
index f1e5bbf..014264f 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -29,10 +29,8 @@ convert_DATA = mate-power-manager.convert
pkgdata_DATA = \
gpm-statistics.ui \
- gpm-statistics-deprecated.ui \
gpm-feedback-widget.ui \
gpm-prefs.ui \
- gpm-prefs-deprecated.ui \
acme.ui
EXTRA_DIST = \
diff --git a/data/gpm-prefs-deprecated.ui b/data/gpm-prefs-deprecated.ui
deleted file mode 100644
index 6af3e40..0000000
--- a/data/gpm-prefs-deprecated.ui
+++ /dev/null
@@ -1,1133 +0,0 @@
-<?xml version="1.0"?>
-<interface>
- <requires lib="gtk+" version="2.16"/>
- <!-- interface-naming-policy toplevel-contextual -->
- <object class="GtkAdjustment" id="adjustment1">
- <property name="value">1</property>
- <property name="lower">1</property>
- <property name="upper">61</property>
- <property name="step_increment">1</property>
- <property name="page_increment">5</property>
- </object>
- <object class="GtkAdjustment" id="adjustment2">
- <property name="value">23</property>
- <property name="lower">1</property>
- <property name="upper">61</property>
- <property name="step_increment">1</property>
- <property name="page_increment">5</property>
- </object>
- <object class="GtkAdjustment" id="adjustment3">
- <property name="value">41</property>
- <property name="upper">100</property>
- <property name="step_increment">1</property>
- <property name="page_increment">5</property>
- </object>
- <object class="GtkAdjustment" id="adjustment4">
- <property name="value">1</property>
- <property name="lower">1</property>
- <property name="upper">61</property>
- <property name="step_increment">1</property>
- <property name="page_increment">5</property>
- </object>
- <object class="GtkAdjustment" id="adjustment5">
- <property name="value">23</property>
- <property name="lower">1</property>
- <property name="upper">61</property>
- <property name="step_increment">1</property>
- <property name="page_increment">5</property>
- </object>
- <object class="GtkAdjustment" id="adjustment6">
- <property name="value">1</property>
- <property name="lower">1</property>
- <property name="upper">61</property>
- <property name="step_increment">1</property>
- <property name="page_increment">5</property>
- </object>
- <object class="GtkAdjustment" id="adjustment7">
- <property name="value">23</property>
- <property name="lower">1</property>
- <property name="upper">61</property>
- <property name="step_increment">1</property>
- <property name="page_increment">5</property>
- </object>
- <object class="GtkDialog" id="dialog_preferences">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Power Management Preferences</property>
- <property name="resizable">False</property>
- <property name="window_position">center-on-parent</property>
- <property name="type_hint">dialog</property>
- <child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkNotebook" id="notebook_preferences">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="border_width">6</property>
- <child>
- <object class="GtkVBox" id="vbox_ac">
- <property name="visible">True</property>
- <property name="border_width">12</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkVBox" id="vbox_ac_actions">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label_ac_actions_sect">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;b&gt;Actions&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkAlignment" id="alignment45">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox79">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkHBox" id="hbox_ac_computer">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_ac_computer">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Put computer to _sleep when inactive for:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_ac_computer">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox_ac_lid">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_ac_lid">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">When laptop lid is cl_osed:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_ac_lid">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_ac_spindown">
- <property name="label" translatable="yes">Sp_in down hard disks when possible</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox_ac_display">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label_ac_display_sect">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;b&gt;Display&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkAlignment" id="alignment46">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox83">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">5</property>
- <child>
- <object class="GtkHBox" id="hbox_ac_display">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_ac_display">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Put _display to sleep when inactive for:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_ac_display">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox_ac_brightness">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_ac_brightness">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Set display _brightness to:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">hscale_ac_brightness</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHScale" id="hscale_ac_brightness">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment">adjustment3</property>
- <property name="digits">0</property>
- <property name="value_pos">bottom</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_ac_display_dim">
- <property name="label" translatable="yes">Di_m display when idle</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label_tab_ac">
- <property name="visible">True</property>
- <property name="label" translatable="yes">On AC Power</property>
- </object>
- <packing>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox_battery">
- <property name="visible">True</property>
- <property name="border_width">12</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkVBox" id="vbox_battery_actions">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label_battery_actions_sect">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;b&gt;Actions&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkAlignment" id="alignment47">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox86">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkHBox" id="hbox_battery_computer">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_battery_computer">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Put computer to _sleep when inactive for:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_battery_computer">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox_battery_lid">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_battery_lid">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">When laptop lid is cl_osed:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_battery_lid">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox20">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label121">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">When battery po_wer is critically low:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_battery_critical">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_battery_spindown">
- <property name="label" translatable="yes">Sp_in down hard disks when possible</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox_battery_display">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label_battery_display_sect">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;b&gt;Display&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkAlignment" id="alignment48">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox88">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">5</property>
- <child>
- <object class="GtkHBox" id="hbox_battery_display">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_battery_display">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Put _display to sleep when inactive for:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_battery_display">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_battery_display_reduce">
- <property name="label" translatable="yes">_Reduce backlight brightness</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_battery_display_dim">
- <property name="label" translatable="yes">Di_m display when idle</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label_tab_battery">
- <property name="visible">True</property>
- <property name="label" translatable="yes">On Battery Power</property>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox_ups">
- <property name="visible">True</property>
- <property name="border_width">12</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkVBox" id="vbox_ups_actions">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label_ups_actions_sect">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;b&gt;Actions&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkAlignment" id="alignment49">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox91">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkHBox" id="hbox_ups_computer">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_ups_computer">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Put computer to _sleep when inactive for:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_ups_computer">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox18">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_ups_low">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">When UPS power is l_ow:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_ups_low">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox19">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_ups_critical">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">When UPS power is _critically low:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_ups_critical">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox_ups_display">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label_ups_display_sect">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;b&gt;Display&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkAlignment" id="alignment50">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox93">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">5</property>
- <child>
- <object class="GtkHBox" id="hbox_ups_display">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_ups_display">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Put _display to sleep when inactive for:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_ups_display">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label_tab_ups">
- <property name="visible">True</property>
- <property name="label" translatable="yes">On UPS Power</property>
- </object>
- <packing>
- <property name="position">2</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox_general">
- <property name="visible">True</property>
- <property name="border_width">12</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkVBox" id="vbox75">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label122">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;b&gt;Actions&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkAlignment" id="alignment44">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox76">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkHBox" id="hbox_general_power">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_general_power">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">When the power _button is pressed:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_general_power">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox_general_suspend">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label_general_suspend">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">When the _suspend button is pressed:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_general_suspend">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox_notification">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label_notification_area_sect">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;b&gt;Notification Area&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkAlignment" id="alignment37">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox62">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkRadioButton" id="radiobutton_notification_never">
- <property name="label" translatable="yes">_Never display an icon</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="radiobutton_notification_low">
- <property name="label" translatable="yes">_Only display an icon when battery power is low</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">radiobutton_notification_never</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="radiobutton_notification_charge">
- <property name="label" translatable="yes">Only display an icon when charging or _discharging</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">radiobutton_notification_never</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="radiobutton_notification_present">
- <property name="label" translatable="yes">Only display an icon when a battery is p_resent</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">radiobutton_notification_never</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="radiobutton_notification_always">
- <property name="label" translatable="yes">_Always display an icon</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">radiobutton_notification_never</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">4</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label_tab_general">
- <property name="visible">True</property>
- <property name="label" translatable="yes">General</property>
- </object>
- <packing>
- <property name="position">3</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="button_help">
- <property name="label">gtk-help</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">Provides help about this program</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- <property name="secondary">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="button_defaults">
- <property name="label" translatable="yes">Make Default</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Sets this policy to be used by all users</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="button_close">
- <property name="label">gtk-close</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">Closes the program</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="0">button_help</action-widget>
- <action-widget response="0">button_defaults</action-widget>
- <action-widget response="0">button_close</action-widget>
- </action-widgets>
- </object>
-</interface>
diff --git a/data/gpm-statistics-deprecated.ui b/data/gpm-statistics-deprecated.ui
deleted file mode 100644
index 8fe3d04..0000000
--- a/data/gpm-statistics-deprecated.ui
+++ /dev/null
@@ -1,504 +0,0 @@
-<?xml version="1.0"?>
-<interface>
- <requires lib="gtk+" version="2.16"/>
- <!-- interface-naming-policy toplevel-contextual -->
- <object class="GtkDialog" id="dialog_stats">
- <property name="border_width">6</property>
- <property name="title" translatable="yes">Power Statistics</property>
- <property name="window_position">center-on-parent</property>
- <property name="type_hint">dialog</property>
- <child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="border_width">6</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">never</property>
- <property name="vscrollbar_policy">automatic</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkTreeView" id="treeview_devices">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkNotebook" id="notebook1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="border_width">9</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkTreeView" id="treeview_info">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- </object>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Details</property>
- </object>
- <packing>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox4">
- <property name="visible">True</property>
- <property name="extension_events">cursor</property>
- <property name="border_width">9</property>
- <property name="orientation">vertical</property>
- <property name="spacing">9</property>
- <child>
- <object class="GtkHBox" id="hbox4">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Graph type:</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_history_type">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox5">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Data length:</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_history_time">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox3">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkHBox" id="hbox_history">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label_axis_history_y">
- <property name="visible">True</property>
- <property name="label">y-axis</property>
- <property name="angle">90</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_history_nodata">
- <property name="visible">True</property>
- <property name="label" translatable="yes">There is no data to display.</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_axis_history_x">
- <property name="visible">True</property>
- <property name="label">x-axis</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox9">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkCheckButton" id="checkbutton_smooth_history">
- <property name="label" translatable="yes">Use smoothed line</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_points_history">
- <property name="label" translatable="yes">Show data points</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">History</property>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox2">
- <property name="visible">True</property>
- <property name="extension_events">cursor</property>
- <property name="border_width">9</property>
- <property name="orientation">vertical</property>
- <property name="spacing">9</property>
- <child>
- <object class="GtkHBox" id="hbox6">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Graph type:</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_stats_type">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox5">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkHBox" id="hbox_statistics">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label_axis_stats_y">
- <property name="visible">True</property>
- <property name="label">y-axis</property>
- <property name="angle">90</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_stats_nodata">
- <property name="visible">True</property>
- <property name="label" translatable="yes">There is no data to display.</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_axis_stats_x">
- <property name="visible">True</property>
- <property name="label">x-axis</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">3</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox10">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkCheckButton" id="checkbutton_smooth_stats">
- <property name="label" translatable="yes">Use smoothed line</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_points_stats">
- <property name="label" translatable="yes">Show data points</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Statistics</property>
- </object>
- <packing>
- <property name="position">2</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="border_width">9</property>
- <property name="orientation">vertical</property>
- <property name="spacing">9</property>
- <child>
- <object class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkLabel" id="label8">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Processor wakeups per second:</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_total_wakeups">
- <property name="visible">True</property>
- <property name="label" translatable="yes">0</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow3">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkTreeView" id="treeview_wakeups">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Wakeups</property>
- </object>
- <packing>
- <property name="position">3</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="button_help">
- <property name="label">gtk-help</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- <property name="secondary">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="button_close">
- <property name="label">gtk-close</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="0">button_help</action-widget>
- <action-widget response="0">button_close</action-widget>
- </action-widgets>
- </object>
-</interface>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index deef684..fb97b9f 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -11,9 +11,7 @@ data/mate-power-preferences.desktop.in.in
data/mate-power-statistics.desktop.in.in
[type: gettext/glade]data/gpm-feedback-widget.ui
[type: gettext/glade]data/gpm-statistics.ui
-[type: gettext/glade]data/gpm-statistics-deprecated.ui
[type: gettext/glade]data/gpm-prefs.ui
-[type: gettext/glade]data/gpm-prefs-deprecated.ui
policy/org.mate.power.policy.in2
src/gpm-backlight.c
src/gpm-backlight-helper.c
diff --git a/src/gpm-prefs-core.c b/src/gpm-prefs-core.c
index 6abb792..abafc6e 100644
--- a/src/gpm-prefs-core.c
+++ b/src/gpm-prefs-core.c
@@ -194,30 +194,6 @@ gpm_prefs_action_time_changed_cb (GtkWidget *widget, GpmPrefs *prefs)
}
/**
- * gpm_prefs_set_combo_simple_text:
- **/
-static void
-gpm_prefs_set_combo_simple_text (GtkWidget *combo_box)
-{
- #if !GTK_CHECK_VERSION (2, 24, 0)
- GtkCellRenderer *cell;
- GtkListStore *store;
-
- store = gtk_list_store_new (1, G_TYPE_STRING);
- gtk_combo_box_set_model (GTK_COMBO_BOX (combo_box), GTK_TREE_MODEL (store));
- g_object_unref (store);
-
- cell = gtk_cell_renderer_text_new ();
- gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_box), cell, TRUE);
- gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_box), cell,
- "text", 0,
- NULL);
- #else
- // nothing to do with GTK_COMBO_BOX_TEXT
- #endif
-}
-
-/**
* gpm_prefs_actions_destroy_cb:
**/
static void
@@ -246,7 +222,6 @@ gpm_prefs_setup_action_combo (GpmPrefs *prefs, const gchar *widget_name,
GpmActionPolicy *actions_added;
widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, widget_name));
- gpm_prefs_set_combo_simple_text (widget);
value = g_settings_get_enum (prefs->priv->settings, gpm_pref_key);
is_writable = g_settings_is_writable (prefs->priv->settings, gpm_pref_key);
@@ -263,57 +238,27 @@ gpm_prefs_setup_action_combo (GpmPrefs *prefs, const gchar *widget_name,
if (policy == GPM_ACTION_POLICY_SHUTDOWN && !prefs->priv->can_shutdown) {
egg_debug ("Cannot add option, as cannot shutdown.");
} else if (policy == GPM_ACTION_POLICY_SHUTDOWN && prefs->priv->can_shutdown) {
- #if GTK_CHECK_VERSION (2, 24, 0)
- gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), _("Shutdown"));
- g_ptr_array_add(array, GINT_TO_POINTER (policy));
- #else
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), _("Shutdown"));
- g_ptr_array_add (array, GINT_TO_POINTER (policy));
- #endif
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), _("Shutdown"));
+ g_ptr_array_add(array, GINT_TO_POINTER (policy));
} else if (policy == GPM_ACTION_POLICY_SUSPEND && !prefs->priv->can_suspend) {
egg_debug ("Cannot add option, as cannot suspend.");
} else if (policy == GPM_ACTION_POLICY_HIBERNATE && !prefs->priv->can_hibernate) {
egg_debug ("Cannot add option, as cannot hibernate.");
} else if (policy == GPM_ACTION_POLICY_SUSPEND && prefs->priv->can_suspend) {
- #if GTK_CHECK_VERSION (2, 24, 0)
- gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), _("Suspend"));
- g_ptr_array_add (array, GINT_TO_POINTER (policy));
- #else
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), _("Suspend"));
- g_ptr_array_add (array, GINT_TO_POINTER (policy));
- #endif
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), _("Suspend"));
+ g_ptr_array_add (array, GINT_TO_POINTER (policy));
} else if (policy == GPM_ACTION_POLICY_HIBERNATE && prefs->priv->can_hibernate) {
- #if GTK_CHECK_VERSION (2, 24, 0)
- gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), _("Hibernate"));
- g_ptr_array_add(array, GINT_TO_POINTER (policy));
- #else
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), _("Hibernate"));
- g_ptr_array_add (array, GINT_TO_POINTER (policy));
- #endif
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), _("Hibernate"));
+ g_ptr_array_add(array, GINT_TO_POINTER (policy));
} else if (policy == GPM_ACTION_POLICY_BLANK) {
- #if GTK_CHECK_VERSION (2, 24, 0)
- gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), _("Blank screen"));
- g_ptr_array_add (array, GINT_TO_POINTER (policy));
- #else
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), _("Blank screen"));
- g_ptr_array_add (array, GINT_TO_POINTER (policy));
- #endif
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), _("Blank screen"));
+ g_ptr_array_add (array, GINT_TO_POINTER (policy));
} else if (policy == GPM_ACTION_POLICY_INTERACTIVE) {
- #if GTK_CHECK_VERSION (2, 24, 0)
- gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), _("Ask me"));
- g_ptr_array_add(array, GINT_TO_POINTER (policy));
- #else
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), _("Ask me"));
- g_ptr_array_add (array, GINT_TO_POINTER (policy));
- #endif
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), _("Ask me"));
+ g_ptr_array_add(array, GINT_TO_POINTER (policy));
} else if (policy == GPM_ACTION_POLICY_NOTHING) {
- #if GTK_CHECK_VERSION (2, 24, 0)
- gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), _("Do nothing"));
- g_ptr_array_add(array, GINT_TO_POINTER (policy));
- #else
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), _("Do nothing"));
- g_ptr_array_add (array, GINT_TO_POINTER (policy));
- #endif
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), _("Do nothing"));
+ g_ptr_array_add(array, GINT_TO_POINTER (policy));
} else {
egg_warning ("Unknown action read from settings: %i", policy);
}
@@ -355,7 +300,6 @@ gpm_prefs_setup_time_combo (GpmPrefs *prefs, const gchar *widget_name,
GtkWidget *widget;
widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, widget_name));
- gpm_prefs_set_combo_simple_text (widget);
value = g_settings_get_int (prefs->priv->settings, gpm_pref_key);
is_writable = g_settings_is_writable (prefs->priv->settings, gpm_pref_key);
@@ -370,18 +314,10 @@ gpm_prefs_setup_time_combo (GpmPrefs *prefs, const gchar *widget_name,
/* get translation for number of seconds */
if (values[i] != 0) {
text = gpm_get_timestring (values[i]);
- #if GTK_CHECK_VERSION (2, 24, 0)
- gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), text);
- #else
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), text);
- #endif
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), text);
g_free (text);
} else {
- #if GTK_CHECK_VERSION (2, 24, 0)
- gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), _("Never"));
- #else
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), _("Never"));
- #endif
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), _("Never"));
}
/* matches, so set default */
@@ -546,28 +482,16 @@ prefs_setup_ac (GpmPrefs *prefs)
if (prefs->priv->has_button_lid == FALSE) {
widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "hbox_ac_lid"));
- #if GTK_CHECK_VERSION (2, 24, 0)
- gtk_widget_hide(widget);
- #else
- gtk_widget_hide_all (widget);
- #endif
+ gtk_widget_hide(widget);
}
if (prefs->priv->has_lcd == FALSE) {
widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "hbox_ac_brightness"));
- #if GTK_CHECK_VERSION (2, 24, 0)
- gtk_widget_hide(widget);
- #else
- gtk_widget_hide_all (widget);
- #endif
+ gtk_widget_hide(widget);
widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "checkbutton_ac_display_dim"));
- #if GTK_CHECK_VERSION (2, 24, 0)
- gtk_widget_hide(widget);
- #else
- gtk_widget_hide_all (widget);
- #endif
+ gtk_widget_hide(widget);
}
}
@@ -647,19 +571,11 @@ prefs_setup_battery (GpmPrefs *prefs)
if (prefs->priv->has_button_lid == FALSE) {
widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "hbox_battery_lid"));
- #if GTK_CHECK_VERSION(2, 24, 0)
- gtk_widget_hide(widget);
- #else
- gtk_widget_hide_all (widget);
- #endif
+ gtk_widget_hide(widget);
}
if (prefs->priv->has_lcd == FALSE) {
widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "checkbutton_battery_display_dim"));
- #if GTK_CHECK_VERSION(2, 24, 0)
- gtk_widget_hide(widget);
- #else
- gtk_widget_hide_all (widget);
- #endif
+ gtk_widget_hide(widget);
}
}
@@ -741,11 +657,7 @@ prefs_setup_general (GpmPrefs *prefs)
if (prefs->priv->has_button_suspend == FALSE) {
widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "hbox_general_suspend"));
- #if GTK_CHECK_VERSION (2, 24, 0)
- gtk_widget_hide(widget);
- #else
- gtk_widget_hide_all (widget);
- #endif
+ gtk_widget_hide(widget);
}
}
@@ -980,13 +892,7 @@ gpm_prefs_init (GpmPrefs *prefs)
prefs->priv->builder = gtk_builder_new ();
- #if GTK_CHECK_VERSION(2, 24, 0)
- retval = gtk_builder_add_from_file (prefs->priv->builder, GPM_DATA "/gpm-prefs.ui",
- &error);
- #else
- retval = gtk_builder_add_from_file (prefs->priv->builder,
- GPM_DATA "/gpm-prefs-deprecated.ui", &error);
- #endif
+ retval = gtk_builder_add_from_file (prefs->priv->builder, GPM_DATA "/gpm-prefs.ui", &error);
if (retval == 0) {
egg_warning ("failed to load ui: %s", error->message);
diff --git a/src/gpm-statistics.c b/src/gpm-statistics.c
index ea17703..795a372 100644
--- a/src/gpm-statistics.c
+++ b/src/gpm-statistics.c
@@ -1470,31 +1470,6 @@ gpm_stats_points_checkbox_stats_cb (GtkWidget *widget, gpointer data)
}
/**
- * gpm_stats_set_combo_simple_text:
- **/
-static void
-gpm_stats_set_combo_simple_text (GtkWidget *combo_box)
-{
- #if GTK_CHECK_VERSION (2, 24, 0)
- // nothing to do with GTK_COMBO_BOX_TEXT
- return;
- #else
- GtkCellRenderer *cell;
- GtkListStore *store;
-
- store = gtk_list_store_new (1, G_TYPE_STRING);
- gtk_combo_box_set_model (GTK_COMBO_BOX (combo_box), GTK_TREE_MODEL (store));
- g_object_unref (store);
-
- cell = gtk_cell_renderer_text_new ();
- gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_box), cell, TRUE);
- gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_box), cell,
- "text", 0,
- NULL);
- #endif
-}
-
-/**
* gpm_stats_highlight_device:
**/
static void
@@ -1601,11 +1576,7 @@ main (int argc, char *argv[])
/* get UI */
builder = gtk_builder_new ();
- #if GTK_CHECK_VERSION (2, 24, 0)
- retval = gtk_builder_add_from_file (builder, GPM_DATA "/gpm-statistics.ui", &error);
- #else
- retval = gtk_builder_add_from_file (builder, GPM_DATA "/gpm-statistics-deprecated.ui", &error);
- #endif
+ retval = gtk_builder_add_from_file (builder, GPM_DATA "/gpm-statistics.ui", &error);
if (retval == 0) {
egg_warning ("failed to load ui: %s", error->message);
@@ -1720,18 +1691,10 @@ main (int argc, char *argv[])
stats_type = GPM_STATS_CHARGE_DATA_VALUE;
widget = GTK_WIDGET (gtk_builder_get_object (builder, "combobox_history_type"));
- gpm_stats_set_combo_simple_text (widget);
- #if GTK_CHECK_VERSION (2, 24, 0)
- gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_HISTORY_RATE_TEXT);
- gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_HISTORY_CHARGE_TEXT);
- gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_HISTORY_TIME_FULL_TEXT);
- gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_HISTORY_TIME_EMPTY_TEXT);
- #else
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), GPM_HISTORY_RATE_TEXT);
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), GPM_HISTORY_CHARGE_TEXT);
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), GPM_HISTORY_TIME_FULL_TEXT);
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), GPM_HISTORY_TIME_EMPTY_TEXT);
- #endif
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_HISTORY_RATE_TEXT);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_HISTORY_CHARGE_TEXT);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_HISTORY_TIME_FULL_TEXT);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_HISTORY_TIME_EMPTY_TEXT);
if (g_strcmp0 (history_type, GPM_HISTORY_RATE_VALUE) == 0)
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
else
@@ -1740,18 +1703,10 @@ main (int argc, char *argv[])
G_CALLBACK (gpm_stats_history_type_combo_changed_cb), NULL);
widget = GTK_WIDGET (gtk_builder_get_object (builder, "combobox_stats_type"));
- gpm_stats_set_combo_simple_text (widget);
- #if GTK_CHECK_VERSION (2, 24, 0)
- gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_STATS_CHARGE_DATA_TEXT);
- gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_STATS_CHARGE_ACCURACY_TEXT);
- gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_STATS_DISCHARGE_DATA_TEXT);
- gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_STATS_DISCHARGE_ACCURACY_TEXT);
- #else
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), GPM_STATS_CHARGE_DATA_TEXT);
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), GPM_STATS_CHARGE_ACCURACY_TEXT);
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), GPM_STATS_DISCHARGE_DATA_TEXT);
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), GPM_STATS_DISCHARGE_ACCURACY_TEXT);
- #endif
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_STATS_CHARGE_DATA_TEXT);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_STATS_CHARGE_ACCURACY_TEXT);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_STATS_DISCHARGE_DATA_TEXT);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_STATS_DISCHARGE_ACCURACY_TEXT);
if (g_strcmp0 (stats_type, GPM_STATS_CHARGE_DATA_VALUE) == 0)
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
else if (g_strcmp0 (stats_type, GPM_STATS_CHARGE_DATA_VALUE) == 0)
@@ -1766,20 +1721,11 @@ main (int argc, char *argv[])
G_CALLBACK (gpm_stats_type_combo_changed_cb), NULL);
widget = GTK_WIDGET (gtk_builder_get_object (builder, "combobox_history_time"));
- gpm_stats_set_combo_simple_text (widget);
- #if GTK_CHECK_VERSION (2, 24, 0)
- gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_HISTORY_MINUTE_TEXT);
- gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_HISTORY_HOUR_TEXT);
- gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_HISTORY_HOURS_TEXT);
- gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_HISTORY_DAY_TEXT);
- gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_HISTORY_WEEK_TEXT);
- #else
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), GPM_HISTORY_MINUTE_TEXT);
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), GPM_HISTORY_HOUR_TEXT);
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), GPM_HISTORY_HOURS_TEXT);
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), GPM_HISTORY_DAY_TEXT);
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), GPM_HISTORY_WEEK_TEXT);
- #endif
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_HISTORY_MINUTE_TEXT);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_HISTORY_HOUR_TEXT);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_HISTORY_HOURS_TEXT);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_HISTORY_DAY_TEXT);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), GPM_HISTORY_WEEK_TEXT);
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 1);
if (history_time == GPM_HISTORY_MINUTE_VALUE)
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
diff --git a/src/gpm-tray-icon.c b/src/gpm-tray-icon.c
index ec6aea6..ad44f83 100644
--- a/src/gpm-tray-icon.c
+++ b/src/gpm-tray-icon.c
@@ -95,11 +95,8 @@ gpm_tray_icon_set_tooltip (GpmTrayIcon *icon, const gchar *tooltip)
g_return_val_if_fail (GPM_IS_TRAY_ICON (icon), FALSE);
g_return_val_if_fail (tooltip != NULL, FALSE);
-#if GTK_CHECK_VERSION(2,15,0)
gtk_status_icon_set_tooltip_text (icon->priv->status_icon, tooltip);
-#else
- gtk_status_icon_set_tooltip (icon->priv->status_icon, tooltip);
-#endif
+
return TRUE;
}