[Evolution-hackers] [PATCH] Compile fix in addressbook-view.c



Hi,

get_primary_source() was used in load_uri_for_selection() before being
defined. May I commit?

-- 
  jules


Index: addressbook/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.1971
diff -u -p -r1.1971 ChangeLog
--- addressbook/ChangeLog	3 Aug 2005 08:34:01 -0000	1.1971
+++ addressbook/ChangeLog	3 Aug 2005 10:22:53 -0000
@@ -1,3 +1,8 @@
+2005-08-03  Jules Colding  <colding omesc com>
+
+	* gui/component/addressbook-view.c (get_primary_source): Moved up as
+	it was used in load_uri_for_selection() before it was defined.
+
 2005-03-03  Sushma Rai  <rsushma novell com>
 
 	* gui/widgets/eab-gui-util.c (eab_transfer_contacts): Initialize the
Index: addressbook/gui/component/addressbook-view.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/component/addressbook-view.c,v
retrieving revision 1.37
diff -u -p -r1.37 addressbook-view.c
--- addressbook/gui/component/addressbook-view.c	3 Aug 2005 08:23:26 -0000	1.37
+++ addressbook/gui/component/addressbook-view.c	3 Aug 2005 10:22:54 -0000
@@ -549,6 +549,27 @@ source_list_changed_cb (ESourceList *sou
 	}
 }
 
+static ESource *
+get_primary_source (AddressbookView *view)
+{
+	AddressbookViewPrivate *priv = view->priv;
+	ESource *source;
+	char *uid;
+
+	uid = gconf_client_get_string (priv->gconf_client,
+				       "/apps/evolution/addressbook/display/primary_addressbook",
+				       NULL);
+	if (uid) {
+		source = e_source_list_peek_source_by_uid (priv->source_list, uid);
+		g_free (uid);
+	} else {
+		/* Try to create a default if there isn't one */
+		source = find_first_source (priv->source_list);
+	}
+
+	return source;
+}
+
 static void
 load_uri_for_selection (ESourceSelector *selector,
 			AddressbookView *view,
@@ -596,27 +617,6 @@ save_primary_selection (AddressbookView 
 	gconf_client_set_string (priv->gconf_client,
 				 "/apps/evolution/addressbook/display/primary_addressbook",
 				 e_source_peek_uid (source), NULL);
-}
-
-static ESource *
-get_primary_source (AddressbookView *view)
-{
-	AddressbookViewPrivate *priv = view->priv;
-	ESource *source;
-	char *uid;
-
-	uid = gconf_client_get_string (priv->gconf_client,
-				       "/apps/evolution/addressbook/display/primary_addressbook",
-				       NULL);
-	if (uid) {
-		source = e_source_list_peek_source_by_uid (priv->source_list, uid);
-		g_free (uid);
-	} else {
-		/* Try to create a default if there isn't one */
-		source = find_first_source (priv->source_list);
-	}
-
-	return source;
 }
 
 static void





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