[evolution-patches] Cleanups for evolution/addressbook



Same stuff as for the calendar code.

Cheers
Kjartan

? addressbook.error
? warnings
Index: gui/component/addressbook-component.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/component/addressbook-component.c,v
retrieving revision 1.147
diff -u -p -r1.147 addressbook-component.c
--- gui/component/addressbook-component.c	17 Aug 2006 09:14:59 -0000	1.147
+++ gui/component/addressbook-component.c	29 Aug 2006 16:30:49 -0000
@@ -43,8 +43,6 @@
 
 #include "shell/e-component-view.h"
 
-#include "shell/e-component-view.h"
-
 #include <string.h>
 #include <bonobo/bonobo-i18n.h>
 #include <gtk/gtkimage.h>
Index: gui/contact-editor/e-contact-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/contact-editor/e-contact-editor.c,v
retrieving revision 1.264
diff -u -p -r1.264 e-contact-editor.c
--- gui/contact-editor/e-contact-editor.c	24 Jul 2006 13:06:10 -0000	1.264
+++ gui/contact-editor/e-contact-editor.c	29 Aug 2006 16:30:49 -0000
@@ -2265,7 +2265,7 @@ extract_simple_field (EContactEditor *ed
 		{
 			if (editor->image_set &&
 			    e_image_chooser_get_image_data (E_IMAGE_CHOOSER (widget),
-							    &photo.data.inlined.data, &photo.data.inlined.length)) {
+							    (char **)&photo.data.inlined.data, &photo.data.inlined.length)) {
 				GdkPixbuf *pixbuf, *new;
 				GdkPixbufLoader *loader = gdk_pixbuf_loader_new();
 				
@@ -2294,7 +2294,7 @@ extract_simple_field (EContactEditor *ed
 						new = gdk_pixbuf_scale_simple (pixbuf, width, height, GDK_INTERP_BILINEAR);
 						if (new) {
 							g_free(photo.data.inlined.data);
-							gdk_pixbuf_save_to_buffer (new, &photo.data.inlined.data, &photo.data.inlined.length, "jpeg", NULL, "quality", "100", NULL);
+							gdk_pixbuf_save_to_buffer (new, (gchar **)&photo.data.inlined.data, &photo.data.inlined.length, "jpeg", NULL, "quality", "100", NULL);
 							g_object_unref (new);
 						}
 						
Index: gui/contact-editor/e-contact-quick-add.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/contact-editor/e-contact-quick-add.c,v
retrieving revision 1.43
diff -u -p -r1.43 e-contact-quick-add.c
--- gui/contact-editor/e-contact-quick-add.c	13 Jun 2006 19:07:55 -0000	1.43
+++ gui/contact-editor/e-contact-quick-add.c	29 Aug 2006 16:30:49 -0000
@@ -325,7 +325,7 @@ build_quick_add_dialog (QuickAdd *qa)
 		qa->book = NULL;
 	}
 	qa->book = book ;
-	source_selected(qa->option_menu, e_source_option_menu_peek_selected (qa->option_menu), qa);
+	source_selected(qa->option_menu, e_source_option_menu_peek_selected ((ESourceOptionMenu *)qa->option_menu), qa);
 	g_signal_connect (qa->option_menu, "source_selected", G_CALLBACK (source_selected), qa);
 	
 	g_object_unref (source_list);	
Index: gui/widgets/e-addressbook-view.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/widgets/e-addressbook-view.c,v
retrieving revision 1.187
diff -u -p -r1.187 e-addressbook-view.c
--- gui/widgets/e-addressbook-view.c	21 Aug 2006 05:58:31 -0000	1.187
+++ gui/widgets/e-addressbook-view.c	29 Aug 2006 16:30:49 -0000
@@ -172,19 +172,21 @@ enum {
 	ESB_ANY,
 };
 
+#if 0
 static ESearchBarItem addressbook_search_option_items[] = {
 	{ N_("Name begins with"), ESB_FULL_NAME, ESB_ITEMTYPE_RADIO },
 	{ N_("Email begins with"), ESB_EMAIL, ESB_ITEMTYPE_RADIO },
 	{ N_("Any field contains"), ESB_ANY, ESB_ITEMTYPE_RADIO },
-	{ NULL, -1, NULL }
+	{ NULL, -1, 0 }
 };
+#endif
 
 static ESearchBarItem addressbook_search_items[] = {
 	E_FILTERBAR_ADVANCED,
-	{NULL, 0, NULL},
+	{NULL, 0, 0},
 	E_FILTERBAR_SAVE,
 	E_FILTERBAR_EDIT,
-	{NULL, -1, NULL}
+	{NULL, -1, 0}
 };
 
 GType
@@ -1624,7 +1626,6 @@ generate_viewoption_menu (EABSearchBarIt
 {
 	GtkWidget *menu, *menu_item;
 	gint i = 0;
-	GSList *l;
 
 	menu = gtk_menu_new ();
 
@@ -1671,7 +1672,7 @@ make_suboptions (EABView *view)
 		const char *category = g_list_nth_data (master_list, i);
 		subitems[i+1].search.id = i+1;
 		subitems[i+1].search.text = g_strdup (category);
-		subitems[i+1].image = e_categories_get_icon_file_for (category);
+		subitems[i+1].image = g_strdup (e_categories_get_icon_file_for (category));
 	}
 
 	subitems[N+1].search.id = -1;
@@ -1685,6 +1686,8 @@ make_suboptions (EABView *view)
 	for (s = subitems; ((ESearchBarItem *)s)->id != -1; s++) {
 		if (((ESearchBarItem *)s)->text)
 			g_free (((ESearchBarItem *)s)->text);
+		if (((ESearchBarItem *)s)->image)
+			g_free (((ESearchBarItem *)s)->image);
 	}
 	g_free (subitems);
 }
Index: gui/widgets/e-minicard.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/widgets/e-minicard.c,v
retrieving revision 1.129
diff -u -p -r1.129 e-minicard.c
--- gui/widgets/e-minicard.c	19 Jul 2006 10:40:42 -0000	1.129
+++ gui/widgets/e-minicard.c	29 Aug 2006 16:30:50 -0000
@@ -40,6 +40,7 @@
 #include "e-minicard-view.h"
 #include "e-contact-editor.h"
 #include <e-util/e-icon-factory.h>
+#include <e-util/e-html-utils.h>
 #include <libebook/e-destination.h>
 #include "a11y/addressbook/ea-addressbook.h"
 
@@ -837,7 +838,7 @@ add_email_field (EMinicard *e_minicard, 
 	GnomeCanvasItem *new_item;
 	GnomeCanvasGroup *group;
 	EMinicardField *minicard_field;
-	char *name;
+	const char *name;
 	char *string;
 	GList *l, *le;
 	int count =0;
Index: gui/widgets/eab-gui-util.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/widgets/eab-gui-util.c,v
retrieving revision 1.53
diff -u -p -r1.53 eab-gui-util.c
--- gui/widgets/eab-gui-util.c	29 Jun 2006 09:59:03 -0000	1.53
+++ gui/widgets/eab-gui-util.c	29 Aug 2006 16:30:50 -0000
@@ -527,7 +527,7 @@ eab_contact_save (char *title, EContact 
 
 	gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (filesel), g_get_home_dir ());
 	gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (filesel), file);
-	gtk_file_chooser_set_local_only (filesel, FALSE);
+	gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (filesel), FALSE);
 	
 	info->filesel = filesel;
 	info->vcard = e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30);
@@ -580,7 +580,7 @@ eab_contact_list_save (char *title, GLis
 					       GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
 					       NULL);
 	gtk_dialog_set_default_response (GTK_DIALOG (filesel), GTK_RESPONSE_ACCEPT);
-	gtk_file_chooser_set_local_only (filesel, FALSE);
+	gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (filesel), FALSE);
 #else
 	filesel = gtk_file_selection_new(title);
 #endif
@@ -650,6 +650,7 @@ struct ContactCopyProcess_ {
 	ContactCopyDone done_cb;
 };
 
+#if 0
 static void
 contact_deleted_cb (EBook* book, EBookStatus status, gpointer user_data)
 {
@@ -657,6 +658,7 @@ contact_deleted_cb (EBook* book, EBookSt
 		eab_error_dialog (_("Error removing contact"), status);
 	}
 }
+#endif
 
 static void
 do_delete (gpointer data, gpointer user_data)
Index: util/eab-book-util.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/util/eab-book-util.c,v
retrieving revision 1.13
diff -u -p -r1.13 eab-book-util.c
--- util/eab-book-util.c	27 Jan 2006 15:41:52 -0000	1.13
+++ util/eab-book-util.c	29 Aug 2006 16:30:50 -0000
@@ -53,14 +53,14 @@ eab_get_config_database ()
 static char*
 escape (const char *str)
 {
-	GString *s = g_string_new ("");
+	GString *s = g_string_new (NULL);
 	const char *p = str;
 
 	while (*p) {
 		if (*p == '\\')
-			g_string_append (s, "\\\\");
+			g_string_append_len (s, "\\\\", 4);
 		else if (*p == '"')
-			g_string_append (s, "\\\"");
+			g_string_append_len (s, "\\\"", 4);
 		else
 			g_string_append_c (s, *p);
 
@@ -208,7 +208,7 @@ GList*
 eab_contact_list_from_string (const char *str)
 {
 	GList *contacts = NULL;
-	GString *gstr = g_string_new ("");
+	GString *gstr = g_string_new (NULL);
 	char *str_stripped;
 	char *p = (char*)str;
 	char *q;


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