libmbca r10 - trunk/src
- From: kaijanma svn gnome org
- To: svn-commits-list gnome org
- Subject: libmbca r10 - trunk/src
- Date: Fri, 8 Aug 2008 09:39:19 +0000 (UTC)
Author: kaijanma
Date: Fri Aug 8 09:39:19 2008
New Revision: 10
URL: http://svn.gnome.org/viewvc/libmbca?rev=10&view=rev
Log:
get page from gtk_assistant_get_nth_page () instead of gtk_builder_get_object () when calling gtk_assistant_set_page_complete ()
Modified:
trunk/src/bluetooth_page.c
trunk/src/method_page.c
trunk/src/provider_page.c
trunk/src/summary_page.c
Modified: trunk/src/bluetooth_page.c
==============================================================================
--- trunk/src/bluetooth_page.c (original)
+++ trunk/src/bluetooth_page.c Fri Aug 8 09:39:19 2008
@@ -36,7 +36,7 @@
gpointer user_data)
{
MBCAAssistantPrivate* priv = user_data;
- GObject* page;
+ GtkWidget* page;
gchar* name;
@@ -45,11 +45,8 @@
priv->nice_device_name = name;
priv->conf->device = g_strdup (address);
- page = gtk_builder_get_object (priv->builder, "bluetooth_page");
- g_return_if_fail (page);
- gtk_assistant_set_page_complete (priv->assistant,
- GTK_WIDGET (page),
- TRUE);
+ page = gtk_assistant_get_nth_page (priv->assistant, PAGE_BLUETOOTH);
+ gtk_assistant_set_page_complete (priv->assistant, page, TRUE);
}
void
@@ -98,9 +95,7 @@
page = gtk_assistant_get_nth_page (priv->assistant,
PAGE_BLUETOOTH);
- gtk_assistant_set_page_complete (priv->assistant,
- page,
- FALSE);
+ gtk_assistant_set_page_complete (priv->assistant, page, FALSE);
return;
}
mbca_bluetooth_selected_device_changed(selector, address, priv);
@@ -148,9 +143,7 @@
page = gtk_assistant_get_nth_page (priv->assistant,
PAGE_BLUETOOTH);
- gtk_assistant_set_page_complete (priv->assistant,
- page,
- is_valid);
+ gtk_assistant_set_page_complete (priv->assistant, page, is_valid);
if (!is_valid)
{
return;
Modified: trunk/src/method_page.c
==============================================================================
--- trunk/src/method_page.c (original)
+++ trunk/src/method_page.c Fri Aug 8 09:39:19 2008
@@ -44,7 +44,6 @@
priv->hal_device_type = device_type;
hal_page = gtk_assistant_get_nth_page (priv->assistant, PAGE_HAL);
- page = gtk_assistant_get_nth_page (priv->assistant, PAGE_METHOD);
gtk_assistant_set_page_title (priv->assistant,
hal_page,
@@ -78,13 +77,8 @@
gtk_label_set_markup (secondary_label, secondary);
}
- /** @bug maybe: should these set_page_complete come from
- * gtk_assistant_get_nth_page in stead of
- * gtk_builder_get_object?
- */
- gtk_assistant_set_page_complete (priv->assistant,
- page,
- TRUE);
+ page = gtk_assistant_get_nth_page (priv->assistant, PAGE_METHOD);
+ gtk_assistant_set_page_complete (priv->assistant, page, TRUE);
}
void
@@ -105,10 +99,8 @@
priv->conf->type = MBCA_DEVICE_BLUETOOTH;
page = gtk_assistant_get_nth_page (priv->assistant, PAGE_METHOD);
-
- gtk_assistant_set_page_complete (priv->assistant,
- page,
- TRUE);
+ gtk_assistant_set_page_complete (priv->assistant, page, TRUE);
+
/* lookahead :P
* If user decides to choose some other page mbca_assistant_prepare_cb ()
* anyway sets this to FALSE when page is changed.
@@ -147,13 +139,8 @@
priv->conf->type = MBCA_DEVICE_SERIAL;
- page = GTK_WIDGET (gtk_builder_get_object (priv->builder, "method_page"));
-
- g_return_if_fail(page);
-
- gtk_assistant_set_page_complete (priv->assistant,
- page,
- TRUE);
+ page = gtk_assistant_get_nth_page (priv->assistant, PAGE_METHOD);
+ gtk_assistant_set_page_complete (priv->assistant, page, TRUE);
}
void
Modified: trunk/src/provider_page.c
==============================================================================
--- trunk/src/provider_page.c (original)
+++ trunk/src/provider_page.c Fri Aug 8 09:39:19 2008
@@ -52,9 +52,6 @@
GtkTreeIter iter;
GtkWidget* page;
MBCAServiceProvider* provider;
-
- page = gtk_assistant_get_nth_page (priv->assistant,
- PAGE_PROVIDER);
if (gtk_tree_selection_count_selected_rows (selection) == 1)
{
@@ -74,7 +71,8 @@
{
is_complete = FALSE;
}
-
+
+ page = gtk_assistant_get_nth_page (priv->assistant, PAGE_PROVIDER);
gtk_assistant_set_page_complete (priv->assistant, page, is_complete);
}
Modified: trunk/src/summary_page.c
==============================================================================
--- trunk/src/summary_page.c (original)
+++ trunk/src/summary_page.c Fri Aug 8 09:39:19 2008
@@ -37,11 +37,8 @@
priv->conf->name = chars;
complete = (g_utf8_strlen (chars, -1) > 0);
- page = gtk_assistant_get_nth_page (priv->assistant,
- PAGE_SUMMARY);
- gtk_assistant_set_page_complete (priv->assistant,
- page,
- complete);
+ page = gtk_assistant_get_nth_page (priv->assistant, PAGE_SUMMARY);
+ gtk_assistant_set_page_complete (priv->assistant, page, complete);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]