aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/minicard
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-04-11 08:21:08 +0800
committerChris Lahey <clahey@src.gnome.org>2000-04-11 08:21:08 +0800
commit5485ba72d9139b45de2b5dff8bc619c62250ecbf (patch)
treed49ff5f495dbeeaa23ba0c84e0a2741344cfbd6d /addressbook/gui/minicard
parent901f107f262e3c1913e15de2e5a5cd0521077587 (diff)
downloadgsoc2013-evolution-5485ba72d9139b45de2b5dff8bc619c62250ecbf.tar
gsoc2013-evolution-5485ba72d9139b45de2b5dff8bc619c62250ecbf.tar.gz
gsoc2013-evolution-5485ba72d9139b45de2b5dff8bc619c62250ecbf.tar.bz2
gsoc2013-evolution-5485ba72d9139b45de2b5dff8bc619c62250ecbf.tar.lz
gsoc2013-evolution-5485ba72d9139b45de2b5dff8bc619c62250ecbf.tar.xz
gsoc2013-evolution-5485ba72d9139b45de2b5dff8bc619c62250ecbf.tar.zst
gsoc2013-evolution-5485ba72d9139b45de2b5dff8bc619c62250ecbf.zip
Changed some incorrect gtk_object_refs and gtk_object_unrefs into
2000-04-10 Christopher James Lahey <clahey@helixcode.com> * addressbook/backend/ebook/e-book-view.c, addressbook/backend/ebook/e-book.c: Changed some incorrect gtk_object_refs and gtk_object_unrefs into bonobo_object_refs and bonobo_object_unrefs. * addressbook/backend/pas/pas-card-cursor.c: Changed a gtk_object_destroy to a gtk_object_unref. * addressbook/gui/minicard/e-minicard-view.c, addressbook/gui/minicard/e-minicard-view.h: Set a list pointer to NULL after freeing its contents. Added e_minicard_view_remove_selection function. * addressbook/gui/minicard/e-reflow.c: Set a list pointer to NULL after freeing its contents. svn path=/trunk/; revision=2386
Diffstat (limited to 'addressbook/gui/minicard')
-rw-r--r--addressbook/gui/minicard/e-minicard-view.c28
-rw-r--r--addressbook/gui/minicard/e-minicard-view.h3
-rw-r--r--addressbook/gui/minicard/e-reflow.c1
3 files changed, 32 insertions, 0 deletions
diff --git a/addressbook/gui/minicard/e-minicard-view.c b/addressbook/gui/minicard/e-minicard-view.c
index 0672983f05..4cd3606876 100644
--- a/addressbook/gui/minicard/e-minicard-view.c
+++ b/addressbook/gui/minicard/e-minicard-view.c
@@ -168,6 +168,8 @@ book_view_loaded (EBook *book, EBookStatus status, EBookView *book_view, gpointe
view);
g_list_foreach(E_REFLOW(view)->items, (GFunc) gtk_object_destroy, NULL);
g_list_free(E_REFLOW(view)->items);
+ E_REFLOW(view)->items = NULL;
+ e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(view));
}
static gboolean
@@ -251,3 +253,29 @@ e_minicard_view_destroy (GtkObject *object)
if (view->book_view)
gtk_object_unref(GTK_OBJECT(view->book_view));
}
+
+void
+e_minicard_remove_selection(EMinicardView *view,
+ EBookCallback cb,
+ gpointer closure)
+{
+ if (view->book) {
+ EReflow *reflow = E_REFLOW(view);
+ GList *list;
+ for (list = reflow->items; list; list = g_list_next(list)) {
+ GnomeCanvasItem *item = list->data;
+ gboolean has_focus;
+ gtk_object_get(item,
+ "has_focus", &has_focus,
+ NULL);
+ if (has_focus) {
+ ECard *card;
+ gtk_object_get(GTK_OBJECT(item),
+ "card", &card,
+ NULL);
+ e_book_remove_card(view->book, card, cb, closure);
+ return;
+ }
+ }
+ }
+}
diff --git a/addressbook/gui/minicard/e-minicard-view.h b/addressbook/gui/minicard/e-minicard-view.h
index 520bf31a19..bb50aa99c1 100644
--- a/addressbook/gui/minicard/e-minicard-view.h
+++ b/addressbook/gui/minicard/e-minicard-view.h
@@ -79,6 +79,9 @@ struct _EMinicardViewClass
};
GtkType e_minicard_view_get_type (void);
+void e_minicard_view_remove_selection (EMinicardView *view,
+ EBookCallback cb,
+ gpointer closure);
#ifdef __cplusplus
}
diff --git a/addressbook/gui/minicard/e-reflow.c b/addressbook/gui/minicard/e-reflow.c
index 0ff8c0f4ea..004183727a 100644
--- a/addressbook/gui/minicard/e-reflow.c
+++ b/addressbook/gui/minicard/e-reflow.c
@@ -189,6 +189,7 @@ e_reflow_destroy (GtkObject *object)
EReflow *reflow = E_REFLOW(object);
g_list_free(reflow->items);
+ reflow->items = NULL;
}
static void