diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-04-11 08:21:08 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-04-11 08:21:08 +0800 |
commit | 5485ba72d9139b45de2b5dff8bc619c62250ecbf (patch) | |
tree | d49ff5f495dbeeaa23ba0c84e0a2741344cfbd6d /addressbook/gui/widgets | |
parent | 901f107f262e3c1913e15de2e5a5cd0521077587 (diff) | |
download | gsoc2013-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/widgets')
-rw-r--r-- | addressbook/gui/widgets/e-minicard-view.c | 28 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-minicard-view.h | 3 |
2 files changed, 31 insertions, 0 deletions
diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c index 0672983f05..4cd3606876 100644 --- a/addressbook/gui/widgets/e-minicard-view.c +++ b/addressbook/gui/widgets/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/widgets/e-minicard-view.h b/addressbook/gui/widgets/e-minicard-view.h index 520bf31a19..bb50aa99c1 100644 --- a/addressbook/gui/widgets/e-minicard-view.h +++ b/addressbook/gui/widgets/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 } |