[evolution-data-server/openismus-work-3-8: 3/43] Fixing cursor example build.



commit ac3e5f3e48f868e5fb153946e6d4c0195c4f9457
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Wed Nov 13 17:41:19 2013 +0900

    Fixing cursor example build.
    
    Enabled warnings in the Makefile.am and fixed them.

 tests/cursor-example/Makefile.am        |    5 ++++
 tests/cursor-example/cursor-data.c      |   32 -------------------------------
 tests/cursor-example/cursor-example.c   |    7 +----
 tests/cursor-example/cursor-navigator.c |    3 --
 tests/cursor-example/cursor-search.c    |    2 -
 tests/cursor-example/cursor-slot.c      |    4 ---
 6 files changed, 7 insertions(+), 46 deletions(-)
---
diff --git a/tests/cursor-example/Makefile.am b/tests/cursor-example/Makefile.am
index 729c3cb..44ab643 100644
--- a/tests/cursor-example/Makefile.am
+++ b/tests/cursor-example/Makefile.am
@@ -33,6 +33,7 @@ cursor_example_CPPFLAGS =                                     \
        $(EVOLUTION_ADDRESSBOOK_CFLAGS)                         \
        $(EXAMPLES_CFLAGS) $(CAMEL_CFLAGS)                      \
        $(CODE_COVERAGE_CFLAGS)                                 \
+       $(WARNING_FLAGS)                                        \
        $(NULL)
 cursor_example_CFLAGS   = 
 cursor_example_LDFLAGS  = \
@@ -59,3 +60,7 @@ cursor-example-resources.c: cursor-example.gresources.xml $(UI_FILES)
 
 EXTRA_DIST = $(UI_FILES) cursor-example.gresources.xml
 CLEANFILES = $(BUILT_SOURCES)
+
+ GNOME_CODE_COVERAGE_RULES@
+
+-include $(top_srcdir)/git.mk
diff --git a/tests/cursor-example/cursor-data.c b/tests/cursor-example/cursor-data.c
index a2e8437..7a4745c 100644
--- a/tests/cursor-example/cursor-data.c
+++ b/tests/cursor-example/cursor-data.c
@@ -107,8 +107,6 @@ cursor_load_data (const gchar        *vcard_path,
        ESourceRegistry *registry;
        ESource *scratch;
        ESourceBackend *backend = NULL;
-       ESourceBackendSummarySetup *setup = NULL;
-       EBookClientCursor *cursor = NULL;
        GMainLoop *loop;
        GError  *error = NULL;
        GSList *contacts = NULL;
@@ -256,36 +254,6 @@ load_contacts (EBookClient *client,
                g_error ("No contacts found in vcard directory: %s", vcard_directory);
 }
 
-
-
-static gchar *
-get_addressbook_directory (ESourceRegistry *registry,
-                          ESource         *source)
-{
-       ESource *builtin_source;
-       const gchar *user_data_dir;
-       const gchar *uid;
-       gchar *filename = NULL;
-
-       uid = e_source_get_uid (source);
-       g_return_val_if_fail (uid != NULL, NULL);
-
-       user_data_dir = e_get_user_data_dir ();
-
-       builtin_source = e_source_registry_ref_builtin_address_book (registry);
-
-       /* Special case directory for the builtin addressbook source */
-       if (builtin_source != NULL && e_source_equal (source, builtin_source))
-               uid = "system";
-
-       filename = g_build_filename (user_data_dir, "addressbook", uid, NULL);
-
-       if (builtin_source)
-               g_object_unref (builtin_source);
-
-       return filename;
-}
-
 static EBookClientCursor *
 get_cursor (EBookClient *book_client)
 {
diff --git a/tests/cursor-example/cursor-example.c b/tests/cursor-example/cursor-example.c
index 3250d8c..41de5a2 100644
--- a/tests/cursor-example/cursor-example.c
+++ b/tests/cursor-example/cursor-example.c
@@ -25,6 +25,7 @@
 #include "cursor-navigator.h"
 #include "cursor-search.h"
 #include "cursor-data.h"
+#include "cursor-slot.h"
 
 #define N_SLOTS         10
 #define INITIAL_TIMEOUT 600
@@ -34,8 +35,6 @@
 typedef enum _TimeoutActivity TimeoutActivity;
 
 /* GObjectClass */
-static void            cursor_example_class_init              (CursorExampleClass *klass);
-static void            cursor_example_init                    (CursorExample      *example);
 static void            cursor_example_dispose                 (GObject            *object);
 
 /* UI Callbacks */
@@ -75,7 +74,6 @@ static gboolean        cursor_example_move_cursor             (CursorExample
 static gboolean        cursor_example_load_page               (CursorExample      *example,
                                                               gboolean           *full_results);
 static void            cursor_example_update_status           (CursorExample      *example);
-static void            cursor_example_update_sensitivity      (CursorExample      *example);
 static void            cursor_example_update_current_index    (CursorExample      *example,
                                                               EContact           *contact);
 static void            cursor_example_ensure_timeout          (CursorExample      *example,
@@ -504,7 +502,7 @@ cursor_example_load_page (CursorExample     *example,
                        if (i == 0 && contact)
                                cursor_example_update_current_index (example, contact);
 
-                       cursor_slot_set_from_contact (priv->slots[i], contact);
+                       cursor_slot_set_from_contact (CURSOR_SLOT (priv->slots[i]), contact);
                }
        }
 
@@ -520,7 +518,6 @@ static void
 cursor_example_update_status (CursorExample *example)
 {
        CursorExamplePrivate *priv = example->priv;
-       GError               *error = NULL;
        gint                  total, position;
        gchar                *txt;
        gboolean              up_sensitive;
diff --git a/tests/cursor-example/cursor-navigator.c b/tests/cursor-example/cursor-navigator.c
index 6ae2d90..a289d0f 100644
--- a/tests/cursor-example/cursor-navigator.c
+++ b/tests/cursor-example/cursor-navigator.c
@@ -22,8 +22,6 @@
 #include "cursor-navigator.h"
 
 /* GObjectClass */
-static void            cursor_navigator_class_init      (CursorNavigatorClass *klass);
-static void            cursor_navigator_init            (CursorNavigator      *navigator);
 static void            cursor_navigator_constructed     (GObject              *object);
 static void            cursor_navigator_finalize        (GObject              *object);
 
@@ -99,7 +97,6 @@ static void
 cursor_navigator_constructed (GObject *object)
 {
        CursorNavigator        *navigator = CURSOR_NAVIGATOR (object);
-       CursorNavigatorPrivate *priv = navigator->priv;
        GtkAdjustment          *adj = NULL;
 
        G_OBJECT_CLASS (cursor_navigator_parent_class)->constructed (object);
diff --git a/tests/cursor-example/cursor-search.c b/tests/cursor-example/cursor-search.c
index 16e8f61..18a66e7 100644
--- a/tests/cursor-example/cursor-search.c
+++ b/tests/cursor-example/cursor-search.c
@@ -24,8 +24,6 @@
 #include "cursor-search.h"
 
 /* GObjectClass */
-static void  cursor_search_class_init     (CursorSearchClass *klass);
-static void  cursor_search_init           (CursorSearch      *search);
 static void  cursor_search_finalize       (GObject           *object);
 static void  cursor_search_get_property   (GObject           *object,
                                           guint              property_id,
diff --git a/tests/cursor-example/cursor-slot.c b/tests/cursor-example/cursor-slot.c
index 2edd4e0..d2c6118 100644
--- a/tests/cursor-example/cursor-slot.c
+++ b/tests/cursor-example/cursor-slot.c
@@ -23,10 +23,6 @@
 
 #include "cursor-slot.h"
 
-/* GObjectClass */
-static void  cursor_slot_class_init  (CursorSlotClass *klass);
-static void  cursor_slot_init        (CursorSlot      *slot);
-
 struct _CursorSlotPrivate {
        /* Screen widgets */
        GtkWidget *area;


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