diff options
Diffstat (limited to 'panels/power')
-rw-r--r-- | panels/power/cc-power-panel.c | 22 | ||||
-rw-r--r-- | panels/power/cc-power-panel.ui | 15 |
2 files changed, 25 insertions, 12 deletions
diff --git a/panels/power/cc-power-panel.c b/panels/power/cc-power-panel.c index 9da51e3df..e872d298c 100644 --- a/panels/power/cc-power-panel.c +++ b/panels/power/cc-power-panel.c @@ -62,11 +62,16 @@ struct _CcPowerPanel CcPanel parent_instance; GtkDialog *automatic_suspend_dialog; + GtkSizeGroup *battery_row_sizegroup; + GtkSizeGroup *battery_sizegroup; + GtkSizeGroup *charge_sizegroup; GtkListStore *idle_time_liststore; + GtkSizeGroup *level_sizegroup; GtkScrolledWindow *main_scroll; HdyClamp *main_box; GtkListStore *power_button_liststore; GtkBox *power_vbox; + GtkSizeGroup *row_sizegroup; GtkComboBox *suspend_on_battery_delay_combo; GtkLabel *suspend_on_battery_delay_label; GtkLabel *suspend_on_battery_label; @@ -86,12 +91,6 @@ struct _CcPowerPanel GList *boxes; GList *boxes_reverse; - GtkSizeGroup *battery_row_sizegroup; - GtkSizeGroup *row_sizegroup; - GtkSizeGroup *battery_sizegroup; - GtkSizeGroup *charge_sizegroup; - GtkSizeGroup *level_sizegroup; - GtkWidget *battery_heading; GtkWidget *battery_section; GtkWidget *battery_list; @@ -193,11 +192,16 @@ cc_power_panel_class_init (CcPowerPanelClass *klass) gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/power/cc-power-panel.ui"); gtk_widget_class_bind_template_child (widget_class, CcPowerPanel, automatic_suspend_dialog); + gtk_widget_class_bind_template_child (widget_class, CcPowerPanel, battery_row_sizegroup); + gtk_widget_class_bind_template_child (widget_class, CcPowerPanel, battery_sizegroup); + gtk_widget_class_bind_template_child (widget_class, CcPowerPanel, charge_sizegroup); gtk_widget_class_bind_template_child (widget_class, CcPowerPanel, idle_time_liststore); + gtk_widget_class_bind_template_child (widget_class, CcPowerPanel, level_sizegroup); gtk_widget_class_bind_template_child (widget_class, CcPowerPanel, main_scroll); gtk_widget_class_bind_template_child (widget_class, CcPowerPanel, main_box); gtk_widget_class_bind_template_child (widget_class, CcPowerPanel, power_button_liststore); gtk_widget_class_bind_template_child (widget_class, CcPowerPanel, power_vbox); + gtk_widget_class_bind_template_child (widget_class, CcPowerPanel, row_sizegroup); gtk_widget_class_bind_template_child (widget_class, CcPowerPanel, suspend_on_battery_delay_combo); gtk_widget_class_bind_template_child (widget_class, CcPowerPanel, suspend_on_battery_delay_label); gtk_widget_class_bind_template_child (widget_class, CcPowerPanel, suspend_on_battery_label); @@ -2216,12 +2220,6 @@ cc_power_panel_init (CcPowerPanel *self) self->session_settings = g_settings_new ("org.gnome.desktop.session"); self->interface_settings = g_settings_new ("org.gnome.desktop.interface"); - self->battery_row_sizegroup = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL); - self->row_sizegroup = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL); - self->battery_sizegroup = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); - self->charge_sizegroup = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); - self->level_sizegroup = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); - add_battery_section (self); add_device_section (self); add_power_profiles_section (self); diff --git a/panels/power/cc-power-panel.ui b/panels/power/cc-power-panel.ui index 6d7380dbe..f8e87202b 100644 --- a/panels/power/cc-power-panel.ui +++ b/panels/power/cc-power-panel.ui @@ -138,6 +138,21 @@ </object> </child> </template> + <object class="GtkSizeGroup" id="battery_row_sizegroup"> + <property name="mode">vertical</property> + </object> + <object class="GtkSizeGroup" id="battery_sizegroup"> + <property name="mode">horizontal</property> + </object> + <object class="GtkSizeGroup" id="charge_sizegroup"> + <property name="mode">horizontal</property> + </object> + <object class="GtkSizeGroup" id="level_sizegroup"> + <property name="mode">horizontal</property> + </object> + <object class="GtkSizeGroup" id="row_sizegroup"> + <property name="mode">vertical</property> + </object> <object class="GtkDialog" id="automatic_suspend_dialog"> <property name="can_focus">False</property> |