soylent r56 - trunk/src



Author: treitter
Date: Sat Jan 26 06:36:41 2008
New Revision: 56
URL: http://svn.gnome.org/viewvc/soylent?rev=56&view=rev

Log:
make moved functions static; give them more-consistent names

Modified:
   trunk/src/soylent-browser-eds.c
   trunk/src/soylent-browser-eds.h

Modified: trunk/src/soylent-browser-eds.c
==============================================================================
--- trunk/src/soylent-browser-eds.c	(original)
+++ trunk/src/soylent-browser-eds.c	Sat Jan 26 06:36:41 2008
@@ -33,15 +33,35 @@
 #include "soylent-person.h"
 #include "soylent.h"
 
-static void start_query (EBook *book, EBookStatus status, EBookView *book_view,
-                         gpointer closure);
-static void opened_book (EBook *book, EBookStatus status, gpointer closure);
-static gboolean open_book (gpointer data);
+/* Callbacks */
+static gboolean soylent_browser_eds_update_groups (SoylentBrowser *browser,
+                                                   EContact *e_contact);
+static gboolean soylent_browser_eds_contacts_added_cb (EBookView *book_view, 
+                                                       const GList *e_contacts,
+                                                       SoylentBrowser *browser);
+static gboolean soylent_browser_eds_contacts_changed_cb
+                                                 (EBookView *book_view, 
+                                                  const GList *e_contacts,
+                                                  SoylentBrowser *browser);
+static gboolean soylent_browser_eds_contacts_removed_cb
+                                                    (EBookView *book_view, 
+                                                     const GList *e_ids,
+                                                     SoylentBrowser *browser);
+static gboolean soylent_browser_eds_contacts_sequence_complete_cb 
+                                                    (EBookView *book_view,
+                                                     const GList *e_ids,
+                                                     SoylentBrowser *browser);
+static void soylent_browser_eds_query_start (EBook *book, EBookStatus status,
+                                             EBookView *book_view,
+                                             gpointer closure);
+static void soylent_browser_eds_book_opened (EBook *book, EBookStatus status,
+                                             gpointer closure);
+static gboolean soylent_browser_eds_book_open (gpointer data);
 
 /* Check for groups on the given EContact, and union them with the existing
  * browser-visible group list. */
 static gboolean
-update_groups (SoylentBrowser *browser, EContact *e_contact)
+soylent_browser_eds_update_groups (SoylentBrowser *browser, EContact *e_contact)
 {
   gboolean retval = FALSE;
   GList *e_contact_groups = NULL;
@@ -88,9 +108,10 @@
  * contacts get added at startup (though all at once).
  *
  * Return TRUE for success. */
-gboolean
-contacts_added_cb (EBookView *book_view, const GList *e_contacts,
-                   SoylentBrowser *browser)
+static gboolean
+soylent_browser_eds_contacts_added_cb (EBookView *book_view,
+                                       const GList *e_contacts,
+                                       SoylentBrowser *browser)
 {
   /* FIXME FIXME: we need to block the live_contacts callbacks for the body of
    * these EContact callbacks */
@@ -142,7 +163,8 @@
                                                                        value);
                       if (update_icon_retval)
                         {
-                          update_groups (browser, e_contact);
+                          soylent_browser_eds_update_groups (browser,
+                                                             e_contact);
                         }
                       else
                         {
@@ -184,9 +206,10 @@
  * SoylentBrowser's internal lookup table.
  *
  * Return TRUE for success. */
-gboolean
-contacts_changed_cb (EBookView *book_view, const GList *e_contacts,
-                     SoylentBrowser *browser)
+static gboolean
+soylent_browser_eds_contacts_changed_cb (EBookView *book_view,
+                                         const GList *e_contacts,
+                                         SoylentBrowser *browser)
 {
   gboolean retval = FALSE;
   GList *c = NULL;
@@ -236,7 +259,7 @@
                                                                        value);
                   if (update_icon_retval)
                     {
-                      update_groups (browser, e_contact);
+                      soylent_browser_eds_update_groups (browser, e_contact);
                     }
                   else
                     {
@@ -272,9 +295,10 @@
  * SoylentBrowser's internal lookup table and perform any clean-up.
  *
  * Return TRUE for success. */
-gboolean
-contacts_removed_cb (EBookView *book_view, const GList *e_uids,
-                     SoylentBrowser *browser)
+static gboolean
+soylent_browser_eds_contacts_removed_cb (EBookView *book_view,
+                                         const GList *e_uids,
+                                         SoylentBrowser *browser)
 {
   gboolean retval = FALSE;
   GList *i = NULL;
@@ -310,9 +334,10 @@
  * those EContacts' metadata to any other lookup tables we care about.
  *
  * Return TRUE for success. */
-gboolean
-contacts_sequence_complete_cb (EBookView *book_view, const GList *e_uids,
-                               SoylentBrowser *browser)
+static gboolean
+soylent_browser_eds_contacts_sequence_complete_cb (EBookView *book_view,
+                                                   const GList *e_uids,
+                                                   SoylentBrowser *browser)
 {
   gboolean retval = FALSE;
   gboolean live_setup_retval = FALSE;
@@ -336,8 +361,8 @@
 
 /* Set up the main EBookView's signal handlers and initiate it */
 static void
-start_query (EBook *book, EBookStatus status, EBookView *book_view,
-             gpointer closure)
+soylent_browser_eds_query_start (EBook *book, EBookStatus status,
+                                 EBookView *book_view, gpointer closure)
 {
   gboolean retval = FALSE;
   SoylentBrowser *browser = NULL;
@@ -357,13 +382,17 @@
 
       /* Connect signals on EBookView */
       g_signal_connect (G_OBJECT (book_view), "contacts_added",
-                        G_CALLBACK (contacts_added_cb), browser);
+                        G_CALLBACK (soylent_browser_eds_contacts_added_cb),
+                        browser);
       g_signal_connect (G_OBJECT (book_view), "contacts_changed",
-                        G_CALLBACK (contacts_changed_cb), browser);
+                        G_CALLBACK (soylent_browser_eds_contacts_changed_cb),
+                        browser);
       g_signal_connect (G_OBJECT (book_view), "contacts_removed",
-                        G_CALLBACK (contacts_removed_cb), browser);
+                        G_CALLBACK (soylent_browser_eds_contacts_removed_cb),
+                        browser);
       g_signal_connect (G_OBJECT (book_view), "sequence_complete",
-                        G_CALLBACK (contacts_sequence_complete_cb),
+                        G_CALLBACK
+                            (soylent_browser_eds_contacts_sequence_complete_cb),
                         browser);
 
       set_book_view_retval = soylent_browser_set_e_book_view (browser,
@@ -389,7 +418,8 @@
 
 /* Handler for the just-opened main EBook; initiates the main EBookView setup */
 static void
-opened_book (EBook *book, EBookStatus status, gpointer closure)
+soylent_browser_eds_book_opened (EBook *book, EBookStatus status,
+                                 gpointer closure)
 {
   gboolean retval = FALSE;
   SoylentBrowser *browser = NULL;
@@ -419,10 +449,10 @@
                 {
                   gboolean book_view_retval = FALSE;
 
-                  book_view_retval = e_book_async_get_book_view (e_book, query,
-                                                                 NULL, -1,
-                                                                 start_query,
-                                                                 browser);
+                  book_view_retval = e_book_async_get_book_view
+                                              (e_book, query, NULL, -1,
+                                               soylent_browser_eds_query_start,
+                                               browser);
                   if (book_view_retval)
                     {
                       retval = TRUE;
@@ -454,7 +484,7 @@
 
 /* Set up EBook post-opening handler */
 static gboolean
-open_book (gpointer data)
+soylent_browser_eds_book_open (gpointer data)
 {
   SoylentBrowser *browser = NULL;
   EBook *e_book = NULL;
@@ -469,7 +499,9 @@
         {
           gboolean open_retval = FALSE;
 
-          open_retval = e_book_async_open (e_book, FALSE, opened_book, browser);
+          open_retval = e_book_async_open (e_book, FALSE,
+                                           soylent_browser_eds_book_opened,
+                                           browser);
           if (open_retval)
             {
               /* all is well; nothing to do */
@@ -530,7 +562,7 @@
                                                              people_table);
               if (table_set_retval)
                 {
-                  g_idle_add (open_book, browser);
+                  g_idle_add (soylent_browser_eds_book_open, browser);
 
                   retval = TRUE;
                 }

Modified: trunk/src/soylent-browser-eds.h
==============================================================================
--- trunk/src/soylent-browser-eds.h	(original)
+++ trunk/src/soylent-browser-eds.h	Sat Jan 26 06:36:41 2008
@@ -30,18 +30,6 @@
 #include "eds-utils.h"
 #include "soylent-browser.h"
 
-/* Callbacks */
-gboolean contacts_added_cb (EBookView *book_view, const GList *e_contacts,
-                            SoylentBrowser *browser);
-gboolean contacts_changed_cb (EBookView *book_view, const GList *e_contacts,
-                              SoylentBrowser *browser);
-gboolean contacts_removed_cb (EBookView *book_view, const GList *e_ids,
-                              SoylentBrowser *browser);
-gboolean contacts_sequence_complete_cb (EBookView *book_view,
-                                        const GList *e_ids,
-                                        SoylentBrowser *browser);
-
-/* Setup functions */
 gboolean soylent_browser_eds_ebook_setup (SoylentBrowser *browser);
 
 #endif /* _SOYLENT_BROWSER_EDS_H_ */



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