aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog17
-rw-r--r--addressbook/gui/component/addressbook-component.c2
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c4
-rw-r--r--addressbook/gui/contact-editor/e-contact-quick-add.c2
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c9
-rw-r--r--addressbook/gui/widgets/e-minicard.c2
-rw-r--r--addressbook/gui/widgets/eab-gui-util.c6
-rw-r--r--addressbook/util/eab-book-util.c8
8 files changed, 34 insertions, 16 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 064eef9c5d..7a39fce3b2 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,20 @@
+2006-10-01 Kjartan Maraas <kmaraas@gnome.org>
+
+ * gui/component/addressbook-component.c: Remove duplicate include.
+ * gui/contact-editor/e-contact-editor.c: (extract_simple_field):
+ Fix some compiler warnings.
+ * gui/contact-editor/e-contact-quick-add.c:
+ (build_quick_add_dialog): Cast away a compiler warning.
+ * gui/widgets/e-addressbook-view.c: (generate_viewoption_menu):
+ #if 0 out an unused array, fix 0 vs NULL initialization in some
+ other arrays and remove an unused GSList.
+ * gui/widgets/e-minicard.c: (add_email_field): Make a var const.
+ * gui/widgets/eab-gui-util.c: (eab_contact_save),
+ (eab_contact_list_save): Add some casts to fix compiler warnings
+ and #if 0 out an unused function.
+ * util/eab-book-util.c: (escape), (eab_contact_list_from_string):
+ Some GString fixes. All of this from bug #332101.
+
2006-08-24 Ushveen Kaur <kushveen@novell.com>
** Fixes bug #261062
diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c
index a70ce8bb73..1c9262365f 100644
--- a/addressbook/gui/component/addressbook-component.c
+++ b/addressbook/gui/component/addressbook-component.c
@@ -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>
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index b40f780564..efd9b72503 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -2265,7 +2265,7 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id)
{
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 *editor, GtkWidget *widget, gint field_id)
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);
}
diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.c b/addressbook/gui/contact-editor/e-contact-quick-add.c
index 07be81fd1d..c3b1d3f70e 100644
--- a/addressbook/gui/contact-editor/e-contact-quick-add.c
+++ b/addressbook/gui/contact-editor/e-contact-quick-add.c
@@ -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);
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index 553085e2e8..4c36b1897d 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -171,19 +171,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
@@ -1623,7 +1625,6 @@ generate_viewoption_menu (EABSearchBarItem *subitems)
{
GtkWidget *menu, *menu_item;
gint i = 0;
- GSList *l;
menu = gtk_menu_new ();
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index 5678eb116b..aa968ed263 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -838,7 +838,7 @@ add_email_field (EMinicard *e_minicard, GList *email_list, gdouble left_width, i
GnomeCanvasItem *new_item;
GnomeCanvasGroup *group;
EMinicardField *minicard_field;
- char *name;
+ const char *name;
char *string;
GList *l, *le;
int count =0;
diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c
index a38d17b3de..64685bf6ff 100644
--- a/addressbook/gui/widgets/eab-gui-util.c
+++ b/addressbook/gui/widgets/eab-gui-util.c
@@ -528,7 +528,7 @@ eab_contact_save (char *title, EContact *contact, GtkWindow *parent_window)
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);
@@ -581,7 +581,7 @@ eab_contact_list_save (char *title, GList *list, GtkWindow *parent_window)
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
@@ -651,6 +651,7 @@ struct ContactCopyProcess_ {
ContactCopyDone done_cb;
};
+#if 0
static void
contact_deleted_cb (EBook* book, EBookStatus status, gpointer user_data)
{
@@ -658,6 +659,7 @@ contact_deleted_cb (EBook* book, EBookStatus status, gpointer user_data)
eab_error_dialog (_("Error removing contact"), status);
}
}
+#endif
static void
do_delete (gpointer data, gpointer user_data)
diff --git a/addressbook/util/eab-book-util.c b/addressbook/util/eab-book-util.c
index a463d43480..fb81399b4e 100644
--- a/addressbook/util/eab-book-util.c
+++ b/addressbook/util/eab-book-util.c
@@ -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, "\\\\", 2);
else if (*p == '"')
- g_string_append (s, "\\\"");
+ g_string_append_len (s, "\\\"", 2);
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;