RE: [PATCH] Make bluetooth-properties fit on smaller displays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bastien & Marcel:

Here's the screenshots as requested:

Old: http://imagebin.org/27644

New: http://imagebin.org/27643

A lot of these MID devices don't have screens bigger than 1024x600 (some 800x600 depending on their aspect ratio).  This change really just reorganizes the GUI so that both laptops and MID devices can use the same layout.  I'm attaching an updated patch relative to 1.6.

Regards

Mario Limonciello 
Dell | Linux Engineering 
Mario_Limonciello@xxxxxxxx 



-----Original Message-----
From: linux-bluetooth-owner@xxxxxxxxxxxxxxx on behalf of Bastien Nocera
Sent: Mon 9/29/2008 4:15 AM
To: Marcel Holtmann
Cc: Limonciello, Mario; linux-bluetooth@xxxxxxxxxxxxxxx
Subject: Re: [PATCH] Make bluetooth-properties fit on smaller displays
 
On Mon, 2008-09-29 at 11:07 +0200, Marcel Holtmann wrote:
> Hi Mario,
> 
> > Ubuntu was carrying a "hildon" patch to make the bluetooth-properties application fit on smaller form factors for lpia.  We've adapted the patch to be applicable to all platforms.  It changes the layout of the bluetooth-properties window to be better for small displays without a loss of functionality.
> 
> I have no idea what this patch tries to achieve. How will this save
> space on small displays?

A before/after screenshot would be useful indeed. If it's a good layout,
it should probably be used by default.

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


diff -Nur -x '*.orig' -x '*~' bluez-gnome-1.6/properties/adapter.c bluez-gnome-1.6.new/properties/adapter.c
--- bluez-gnome-1.6/properties/adapter.c	2008-09-29 07:08:50.000000000 -0500
+++ bluez-gnome-1.6.new/properties/adapter.c	2008-09-29 09:55:36.000000000 -0500
@@ -246,16 +246,10 @@
 	}
 
 	update_buttons(adapter, paired, trusted, connected);
-
-	if (selected == TRUE) {
-		gtk_widget_show(adapter->button_disconnect);
-		gtk_widget_show(adapter->button_trusted);
-		gtk_widget_show(adapter->button_delete);
-	} else {
-		gtk_widget_hide(adapter->button_disconnect);
-		gtk_widget_hide(adapter->button_trusted);
-		gtk_widget_hide(adapter->button_delete);
-	}
+	
+	gtk_widget_set_sensitive(adapter->button_disconnect,selected);
+	gtk_widget_set_sensitive(adapter->button_trusted,selected);
+	gtk_widget_set_sensitive(adapter->button_delete,selected);
 }
 
 static void row_callback(GtkTreeModel *model, GtkTreePath  *path,
@@ -461,7 +455,7 @@
 	adapter->discoverable = discoverable;
 	adapter->timeout_value = timeout;
 
-	mainbox = gtk_vbox_new(FALSE, 18);
+	mainbox = gtk_hbox_new(FALSE, 12);
 	gtk_container_set_border_width(GTK_CONTAINER(mainbox), 12);
 
 	gtk_notebook_prepend_page(GTK_NOTEBOOK(adapter->notebook),
@@ -471,6 +465,9 @@
 
 	adapter->child = mainbox;
 
+	mainbox = gtk_vbox_new (FALSE, 18);
+	gtk_container_add(GTK_CONTAINER (GTK_CONTAINER (adapter->child)), mainbox);
+
 	vbox = gtk_vbox_new(FALSE, 6);
 	gtk_box_pack_start(GTK_BOX(mainbox), vbox, FALSE, FALSE, 0);
 
@@ -569,7 +566,7 @@
 	entry = gtk_entry_new();
 	gtk_entry_set_max_length(GTK_ENTRY(entry), 248);
 	gtk_widget_set_size_request(entry, 240, -1);
-	gtk_box_pack_start(GTK_BOX(vbox), entry, TRUE, TRUE, 0);
+	gtk_box_pack_start(GTK_BOX(vbox), entry, FALSE, FALSE, 0);
 
 	if (name != NULL)
 		gtk_entry_set_text(GTK_ENTRY(entry), name);
@@ -582,7 +579,7 @@
 					G_CALLBACK(focus_callback), adapter);
 
 	vbox = gtk_vbox_new(FALSE, 6);
-	gtk_box_pack_start(GTK_BOX(mainbox), vbox, TRUE, TRUE, 0);
+	gtk_box_pack_start(GTK_BOX(adapter->child), vbox, TRUE, TRUE, 0);
 
 	label = create_label(_("Known devices"));
 	gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
@@ -634,8 +631,8 @@
 						GTK_ICON_SIZE_BUTTON);
 	gtk_container_add(GTK_CONTAINER(button), image);
 	gtk_container_set_border_width(GTK_CONTAINER(button), 0);
-	gtk_widget_set_no_show_all(button, TRUE);
 	gtk_widget_show(image);
+	gtk_widget_set_sensitive(button,FALSE);
 	gtk_box_pack_end(GTK_BOX(buttonbox), button, FALSE, FALSE, 0);
 	gtk_button_box_set_child_secondary(GTK_BUTTON_BOX(buttonbox),
 								button, TRUE);
@@ -651,8 +648,8 @@
 						GTK_ICON_SIZE_BUTTON);
 	gtk_container_add(GTK_CONTAINER(button), image);
 	gtk_container_set_border_width(GTK_CONTAINER(button), 0);
-	gtk_widget_set_no_show_all(button, TRUE);
 	gtk_widget_show(image);
+	gtk_widget_set_sensitive(button,FALSE);
 	gtk_box_pack_end(GTK_BOX(buttonbox), button, FALSE, FALSE, 0);
 	gtk_button_box_set_child_secondary(GTK_BUTTON_BOX(buttonbox),
 								button, TRUE);
@@ -668,8 +665,8 @@
 						GTK_ICON_SIZE_BUTTON);
 	gtk_container_add(GTK_CONTAINER(button), image);
 	gtk_container_set_border_width(GTK_CONTAINER(button), 0);
-	gtk_widget_set_no_show_all(button, TRUE);
 	gtk_widget_show(image);
+	gtk_widget_set_sensitive(button,FALSE);
 	gtk_box_pack_end(GTK_BOX(buttonbox), button, FALSE, FALSE, 0);
 	gtk_button_box_set_child_secondary(GTK_BUTTON_BOX(buttonbox),
 								button, TRUE);

[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux