[phonemgr] ui: use gconf_bridge_bind_property() also for "other_serial"
- From: Daniele Forsi <dforsi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [phonemgr] ui: use gconf_bridge_bind_property() also for "other_serial"
- Date: Thu, 3 May 2012 07:49:11 +0000 (UTC)
commit e4f8676ed23a86431bdf7199addf93f44232c559
Author: Daniele Forsi <dforsi src gnome org>
Date: Wed May 2 18:18:01 2012 +0200
ui: use gconf_bridge_bind_property() also for "other_serial"
src/ui.c | 24 ++++++------------------
1 files changed, 6 insertions(+), 18 deletions(-)
---
diff --git a/src/ui.c b/src/ui.c
index ce6fb9a..c15301b 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -209,22 +209,11 @@ static void
populate_prefs (MyApp *app)
{
GtkWidget *w;
- char *c;
int ctype;
ctype = gconf_client_get_int (app->client,
CONFBASE"/connection_type", NULL);
- w = GTK_WIDGET (gtk_builder_get_object (app->ui, "otherportentry"));
- c = gconf_client_get_string (app->client,
- CONFBASE"/other_serial", NULL);
- if (c != NULL) {
- gtk_entry_set_text (GTK_ENTRY (w), c);
- g_free (c);
- } else {
- gtk_entry_set_text (GTK_ENTRY (w), "");
- }
-
S_ACTIVE("btdevice", CONNECTION_BLUETOOTH);
S_ACTIVE("serialport1", CONNECTION_SERIAL1);
@@ -236,13 +225,6 @@ populate_prefs (MyApp *app)
static void
apply_prefs (MyApp *app)
{
- GtkWidget *w;
-
- w = GTK_WIDGET (gtk_builder_get_object (app->ui, "otherportentry"));
- gconf_client_set_string (app->client,
- CONFBASE"/other_serial",
- gtk_entry_get_text (GTK_ENTRY (w)), NULL);
-
reconnect_phone (app);
}
@@ -466,6 +448,12 @@ ui_init (MyApp *app)
G_OBJECT (gtk_builder_get_object (app->ui, "prefs_sound")),
"active");
+ /* The other port address */
+ gconf_bridge_bind_property_delayed (bridge,
+ CONFBASE"/other_serial",
+ G_OBJECT (gtk_builder_get_object (app->ui, "otherportentry")),
+ "text");
+
/* And the address chooser */
gconf_bridge_bind_property (bridge,
CONFBASE"/bluetooth_addr",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]