aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/component/addressbook.c8
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c1
-rw-r--r--addressbook/gui/minicard/e-minicard-view.c4
-rw-r--r--addressbook/gui/widgets/e-minicard-view.c4
4 files changed, 11 insertions, 6 deletions
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index 5830eb95f8..f54738fcb9 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -94,13 +94,17 @@ static void
new_contact_cb (BonoboUIHandler *uih, void *user_data, const char *path)
{
gint result;
- GtkWidget* contact_editor =
- e_contact_editor_new(e_card_new(""));
+ ECard *card;
+ GtkWidget* contact_editor;
EBook *book;
AddressbookView *view = (AddressbookView *) user_data;
GtkObject *object;
GtkWidget* dlg = gnome_dialog_new ("Contact Editor", "Save", "Cancel", NULL);
+ card = e_card_new("");
+ contact_editor = e_contact_editor_new(card);
+ gtk_object_sink(GTK_OBJECT(card));
+
gtk_window_set_policy(GTK_WINDOW(dlg), FALSE, TRUE, FALSE);
if (view->view)
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index e898b6eedd..058f39b153 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -1175,6 +1175,7 @@ fill_in_info(EContactEditor *editor)
gtk_editable_delete_text(editable, 0, -1);
if (categories)
gtk_editable_insert_text(editable, categories, strlen(categories), &position);
+ g_free(categories);
/* File as has to come after company and name or else it'll get messed up when setting them. */
position = 0;
diff --git a/addressbook/gui/minicard/e-minicard-view.c b/addressbook/gui/minicard/e-minicard-view.c
index c77fc1f6ba..566b798987 100644
--- a/addressbook/gui/minicard/e-minicard-view.c
+++ b/addressbook/gui/minicard/e-minicard-view.c
@@ -210,8 +210,7 @@ e_minicard_view_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
}
break;
case ARG_QUERY:
- if (view->query)
- g_free(view->query);
+ g_free(view->query);
view->query = g_strdup(GTK_VALUE_STRING (*arg));
if (view->get_view_idle == 0)
view->get_view_idle = g_idle_add((GSourceFunc)get_view, view);
@@ -250,6 +249,7 @@ e_minicard_view_destroy (GtkObject *object)
gtk_signal_disconnect(GTK_OBJECT (GNOME_CANVAS_ITEM(view)->canvas),
view->canvas_destroy_id);
disconnect_signals(view);
+ g_free(view->query);
if (view->book)
gtk_object_unref(GTK_OBJECT(view->book));
if (view->book_view)
diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c
index c77fc1f6ba..566b798987 100644
--- a/addressbook/gui/widgets/e-minicard-view.c
+++ b/addressbook/gui/widgets/e-minicard-view.c
@@ -210,8 +210,7 @@ e_minicard_view_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
}
break;
case ARG_QUERY:
- if (view->query)
- g_free(view->query);
+ g_free(view->query);
view->query = g_strdup(GTK_VALUE_STRING (*arg));
if (view->get_view_idle == 0)
view->get_view_idle = g_idle_add((GSourceFunc)get_view, view);
@@ -250,6 +249,7 @@ e_minicard_view_destroy (GtkObject *object)
gtk_signal_disconnect(GTK_OBJECT (GNOME_CANVAS_ITEM(view)->canvas),
view->canvas_destroy_id);
disconnect_signals(view);
+ g_free(view->query);
if (view->book)
gtk_object_unref(GTK_OBJECT(view->book));
if (view->book_view)