[evolution-patches] 273155, bbdb debug spew
- From: Not Zed <notzed ximian com>
- To: evolution-patches <evolution-patches gnome org>
- Subject: [evolution-patches] 273155, bbdb debug spew
- Date: Mon, 29 Aug 2005 13:43:17 +0800
Really, fixing stuff like this is such a wonderful use of my time, but
since nobody else seems to care ...
--
adfa(evolution-2.4:20087): gtkhtml-WARNING **: cannot find icon:
'stock_insert-url' in gnome
Index: plugins/bbdb/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/plugins/bbdb/ChangeLog,v
retrieving revision 1.17
diff -u -p -r1.17 ChangeLog
--- plugins/bbdb/ChangeLog 28 Jul 2005 09:41:23 -0000 1.17
+++ plugins/bbdb/ChangeLog 29 Aug 2005 05:44:02 -0000
@@ -1,3 +1,20 @@
+2005-08-29 Not Zed <NotZed Ximian com>
+
+ ** See #273155.
+
+ * gaimbuddies.c: fix more headers.
+ (bbdb_sync_buddy_list): remove another redundant assignment.
+ (bbdb_sync_buddy_list): open the addressbook before doing anything
+ else - this is the very implicit 'are we enabled' code.
+ (*): remove/disable more debug.
+
+ * bbdb.c (e_plugin_lib_enable): remove pointless debug vomit.
+ (bbdb_handle_reply): remove unecessary assignment. : clean up
+ headers.
+ (bbdb_do_it): remove a silly return if fail assertion, this isn't
+ a public api ...
+ (bbdb_do_it): reove trailing \n on gwarnings.
+
2005-07-28 Vivek Jain <jvivek novell com>
* bbdb.c:(bbdb_handle_reply):check for NULL
Index: plugins/bbdb/bbdb.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/bbdb/bbdb.c,v
retrieving revision 1.9
diff -u -p -r1.9 bbdb.c
--- plugins/bbdb/bbdb.c 28 Jul 2005 09:41:23 -0000 1.9
+++ plugins/bbdb/bbdb.c 29 Aug 2005 05:44:02 -0000
@@ -35,8 +35,14 @@
#include <config.h>
#endif
-#include <gtk/gtk.h>
-#include <libgnome/gnome-i18n.h>
+#include <gtk/gtkcontainer.h>
+#include <gtk/gtkvbox.h>
+#include <gtk/gtkhbox.h>
+#include <gtk/gtkcheckbutton.h>
+#include <gtk/gtklabel.h>
+#include <gtk/gtknotebook.h>
+
+#include <glib/gi18n.h>
#include <string.h>
#include <libebook/e-book.h>
@@ -53,7 +59,6 @@
int e_plugin_lib_enable (EPluginLib *ep, int enable);
void bbdb_handle_reply (EPlugin *ep, EMEventTargetMessage *target);
GtkWidget *bbdb_page_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_data);
-GtkWidget *bbdb_page_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_data);
/* For internal use */
struct bbdb_stuff {
@@ -79,8 +84,6 @@ e_plugin_lib_enable (EPluginLib *ep, int
{
/* Start up the plugin. */
if (enable) {
- fprintf (stderr, "BBDB spinning up...\n");
-
if (bbdb_check_gaim_enabled ())
bbdb_sync_buddy_list_check ();
@@ -106,7 +109,7 @@ void
bbdb_handle_reply (EPlugin *ep, EMEventTargetMessage *target)
{
const CamelInternetAddress *cia;
- EBook *book = NULL;
+ EBook *book;
int i;
/* Open the addressbook */
@@ -160,12 +163,9 @@ bbdb_do_it (EBook *book, const char *nam
EBookQuery *query;
GList *contacts, *l;
EContact *contact;
-
gboolean status;
GError *error = NULL;
- g_return_if_fail (book != NULL);
-
if (name == NULL || email == NULL)
return;
@@ -214,7 +214,7 @@ bbdb_do_it (EBook *book, const char *nam
contact = (EContact *) contacts->data;
add_email_to_contact (contact, email);
if (! e_book_commit_contact (book, contact, &error)) {
- g_warning ("bbdb: Could not modify contact: %s\n", error->message);
+ g_warning ("bbdb: Could not modify contact: %s", error->message);
g_error_free (error);
}
@@ -231,7 +231,7 @@ bbdb_do_it (EBook *book, const char *nam
add_email_to_contact (contact, email);
if (! e_book_add_contact (book, contact, &error)) {
- g_warning ("bbdb: Failed to add new contact: %s\n", error->message);
+ g_warning ("bbdb: Failed to add new contact: %s", error->message);
g_error_free (error);
return;
}
@@ -245,9 +245,7 @@ bbdb_open_addressbook (void)
GConfClient *gconf;
char *uri;
EBook *book = NULL;
-
gboolean enable;
-
gboolean status;
GError *error = NULL;
@@ -255,7 +253,7 @@ bbdb_open_addressbook (void)
/* Check to see if we're supposed to be running */
enable = gconf_client_get_bool (gconf, GCONF_KEY_ENABLE, NULL);
- if (! enable) {
+ if (!enable) {
g_object_unref (G_OBJECT (gconf));
return NULL;
}
@@ -268,14 +266,14 @@ bbdb_open_addressbook (void)
else
book = e_book_new_from_uri (uri, &error);
if (book == NULL) {
- g_warning ("bbdb: failed to get addressbook: %s\n", error->message);
+ g_warning ("bbdb: failed to get addressbook: %s", error->message);
g_error_free (error);
return NULL;
}
status = e_book_open (book, FALSE, &error);
if (! status) {
- g_warning ("bbdb: failed to open addressbook: %s\n", error->message);
+ g_warning ("bbdb: failed to open addressbook: %s", error->message);
g_error_free (error);
return NULL;
}
@@ -307,8 +305,6 @@ add_email_to_contact (EContact *contact,
e_contact_set (contact, E_CONTACT_EMAIL, (gpointer) emails);
}
-
-
/* Code to implement the configuration user interface follows */
static void
@@ -358,7 +354,6 @@ create_addressbook_option_menu (struct b
ESourceList *source_list;
char *selected_source_uri;
ESource *selected_source;
-
GConfClient *gconf = stuff->target->gconf;
source_list = e_source_list_new_for_gconf (gconf, "/apps/evolution/addressbook/sources");
Index: plugins/bbdb/gaimbuddies.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/bbdb/gaimbuddies.c,v
retrieving revision 1.5
diff -u -p -r1.5 gaimbuddies.c
--- plugins/bbdb/gaimbuddies.c 17 Jun 2005 15:20:30 -0000 1.5
+++ plugins/bbdb/gaimbuddies.c 29 Aug 2005 05:44:03 -0000
@@ -39,8 +39,7 @@
#include <libxml/xmlmemory.h>
#include <e-util/e-xml-utils.h>
-#include <gtk/gtk.h>
-#include <libgnome/gnome-i18n.h>
+#include <glib/gi18n.h>
#include <string.h>
#include <libebook/e-book.h>
@@ -53,6 +52,8 @@
#include "bbdb.h"
+#define w(x)
+
typedef struct {
char *account_name;
char *proto;
@@ -106,23 +107,15 @@ bbdb_sync_buddy_list_check (void)
g_free (last_sync_str);
g_object_unref (G_OBJECT (gconf));
- if (statbuf.st_mtime > last_sync) {
- fprintf (stderr, "bbdb: Buddy list has changed since last sync.\n");
-
+ if (statbuf.st_mtime > last_sync)
bbdb_sync_buddy_list ();
- }
}
void
bbdb_sync_buddy_list (void)
{
GList *blist, *l;
- EBook *book = NULL;
-
- /* Get the Gaim buddy list */
- blist = bbdb_get_gaim_buddy_list ();
- if (blist == NULL)
- return;
+ EBook *book;
/* Open the addressbook */
book = bbdb_open_addressbook ();
@@ -131,7 +124,11 @@ bbdb_sync_buddy_list (void)
return;
}
- printf ("bbdb: Synchronizing buddy list to contacts...\n");
+ /* Get the Gaim buddy list */
+ blist = bbdb_get_gaim_buddy_list ();
+ if (blist == NULL)
+ return;
+
/* Walk the buddy list */
for (l = blist; l != NULL; l = l->next) {
GaimBuddy *b = l->data;
@@ -201,7 +198,6 @@ bbdb_sync_buddy_list (void)
g_object_unref (G_OBJECT (gconf));
}
- printf ("bbdb: Done syncing buddy list to contacts.\n");
}
static gboolean
@@ -303,13 +299,13 @@ bbdb_get_gaim_buddy_list (void)
buddy_xml = xmlParseFile (blist_path);
g_free (blist_path);
if (! buddy_xml) {
- fprintf (stderr, "bbdb: Could not open Gaim buddy list.\n");
+ w(fprintf (stderr, "bbdb: Could not open Gaim buddy list.\n"));
return NULL;
}
root = xmlDocGetRootElement (buddy_xml);
if (strcmp (root->name, "gaim")) {
- fprintf (stderr, "bbdb: Could not parse Gaim buddy list.\n");
+ w(fprintf (stderr, "bbdb: Could not parse Gaim buddy list.\n"));
xmlFreeDoc (buddy_xml);
return NULL;
}
@@ -322,7 +318,7 @@ bbdb_get_gaim_buddy_list (void)
}
}
if (blist == NULL) {
- fprintf (stderr, "bbdb: Could not find 'blist' element in Gaim buddy list.\n");
+ w(fprintf (stderr, "bbdb: Could not find 'blist' element in Gaim buddy list.\n"));
xmlFreeDoc (buddy_xml);
return NULL;
}
@@ -398,7 +394,7 @@ parse_contact (xmlNodePtr contact, GList
}
if (buddy == NULL) {
- fprintf (stderr, "bbdb: Could not find buddy in contact. Malformed Gaim buddy list file.\n");
+ w(fprintf (stderr, "bbdb: Could not find buddy in contact. Malformed Gaim buddy list file.\n"));
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]