[evolution-patches] Compile fix in addressbook-view.c



Hi,

Moved functions that were used 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:43:17 -0000
@@ -1,3 +1,9 @@
+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.
+	(find_first_source): Moved as it was used in get_primary_source().
+
 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:43:18 -0000
@@ -549,19 +549,6 @@ source_list_changed_cb (ESourceList *sou
 	}
 }
 
-static void
-load_uri_for_selection (ESourceSelector *selector,
-			AddressbookView *view,
-			gboolean force)
-{
-	ESource *selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (selector));
-	ESource *primary = get_primary_source (view);
-
-	if (selected_source != NULL && 
-	    ((primary && (!g_str_equal (e_source_peek_uid (primary),e_source_peek_uid (selected_source) )))||force))
-		activate_source (view, selected_source);
-}
-
 static ESource *
 find_first_source (ESourceList *source_list)
 {
@@ -582,22 +569,6 @@ find_first_source (ESourceList *source_l
 	return NULL;
 }
 
-static void
-save_primary_selection (AddressbookView *view)
-{
-	AddressbookViewPrivate *priv = view->priv;
-	ESource *source;
-
-	source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->selector));
-	if (!source)
-		return;
-
-	/* Save the selection for next time we start up */
-	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)
 {
@@ -617,6 +588,35 @@ get_primary_source (AddressbookView *vie
 	}
 
 	return source;
+}
+
+static void
+load_uri_for_selection (ESourceSelector *selector,
+			AddressbookView *view,
+			gboolean force)
+{
+	ESource *selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (selector));
+	ESource *primary = get_primary_source (view);
+
+	if (selected_source != NULL && 
+	    ((primary && (!g_str_equal (e_source_peek_uid (primary),e_source_peek_uid (selected_source) )))||force))
+		activate_source (view, selected_source);
+}
+
+static void
+save_primary_selection (AddressbookView *view)
+{
+	AddressbookViewPrivate *priv = view->priv;
+	ESource *source;
+
+	source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->selector));
+	if (!source)
+		return;
+
+	/* Save the selection for next time we start up */
+	gconf_client_set_string (priv->gconf_client,
+				 "/apps/evolution/addressbook/display/primary_addressbook",
+				 e_source_peek_uid (source), NULL);
 }
 
 static void


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