[gnome-bluetooth] Move the Add New Device button to the banner
- From: Ross Burton <rburton src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth] Move the Add New Device button to the banner
- Date: Fri, 16 Apr 2010 16:22:59 +0000 (UTC)
commit 835cc99013f412ce68b570d0e9ce9613ba36ed44
Author: Ross Burton <ross linux intel com>
Date: Fri Apr 16 17:20:55 2010 +0100
Move the Add New Device button to the banner
moblin/moblin-panel.c | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/moblin/moblin-panel.c b/moblin/moblin-panel.c
index b99ad40..2614424 100644
--- a/moblin/moblin-panel.c
+++ b/moblin/moblin-panel.c
@@ -1505,6 +1505,7 @@ create_devices_page (MoblinPanel *self)
GtkTreeViewColumn *type_column;
GtkCellRenderer *cell;
GtkWidget *tree_view;
+ GtkSizeGroup *size;
priv = MOBLIN_PANEL_GET_PRIVATE (self);
@@ -1512,6 +1513,8 @@ create_devices_page (MoblinPanel *self)
gtk_container_set_border_width (GTK_CONTAINER (page), 8);
gtk_widget_show (page);
+ size = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
+
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
gtk_widget_show (frame);
@@ -1522,8 +1525,16 @@ create_devices_page (MoblinPanel *self)
banner = mux_banner_new (_("Devices"));
gtk_widget_show (banner);
+ gtk_size_group_add_widget (size, banner);
gtk_box_pack_start (GTK_BOX (vbox), banner, FALSE, FALSE, 0);
+ /* Add new button */
+ priv->add_new_button = gtk_button_new_with_label (_("Add a new device"));
+ gtk_widget_show (priv->add_new_button);
+ g_signal_connect (priv->add_new_button, "clicked",
+ G_CALLBACK (set_scanning_view), self);
+ gtk_box_pack_end (GTK_BOX (banner), priv->add_new_button, FALSE, FALSE, 0);
+
/* BluetoothChooser adds its own alignment on the left, so balance it
out... */
alignment = gtk_alignment_new (0.0, 0.0, 1.0, 1.0);
@@ -1584,6 +1595,7 @@ create_devices_page (MoblinPanel *self)
gtk_box_pack_start (GTK_BOX (page), frame, FALSE, FALSE, 0);
banner = mux_banner_new (_("Settings"));
+ gtk_size_group_add_widget (size, banner);
gtk_widget_show (banner);
gtk_box_pack_start (GTK_BOX (vbox), banner, FALSE, FALSE, 0);
@@ -1632,13 +1644,6 @@ create_devices_page (MoblinPanel *self)
G_CALLBACK (selected_device_changed_cb), self);
gtk_box_pack_start (GTK_BOX (vbox2), priv->send_button, FALSE, FALSE, 4);
- /* Add new button */
- priv->add_new_button = gtk_button_new_with_label (_("Add a new device"));
- gtk_widget_show (priv->add_new_button);
- g_signal_connect (priv->add_new_button, "clicked",
- G_CALLBACK (set_scanning_view), self);
- gtk_box_pack_start (GTK_BOX (vbox2), priv->add_new_button, FALSE, FALSE, 4);
-
powerswitch_state_changed_cb (priv->powerswitch,
bluetooth_powerswitch_get_state (priv->powerswitch),
self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]