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
This commit is contained in:
committed by
Chris Lahey
parent
901f107f26
commit
5485ba72d9
18
ChangeLog
18
ChangeLog
@ -1,3 +1,21 @@
|
||||
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.
|
||||
|
||||
2000-04-11 Chris Toshok <toshok@helixcode.com>
|
||||
|
||||
* addressbook/gui/component/addressbook.c (find_contact_cb):
|
||||
|
||||
@ -141,7 +141,7 @@ e_book_view_construct (EBookView *book_view, Evolution_BookView corba_book_view,
|
||||
*/
|
||||
book_view->priv->listener = listener;
|
||||
|
||||
gtk_object_ref(GTK_OBJECT(book_view->priv->listener));
|
||||
bonobo_object_ref(BONOBO_OBJECT(book_view->priv->listener));
|
||||
book_view->priv->responses_queued_id = gtk_signal_connect (GTK_OBJECT (book_view->priv->listener), "responses_queued",
|
||||
e_book_view_check_listener_queue, book_view);
|
||||
|
||||
@ -204,7 +204,7 @@ e_book_view_destroy (GtkObject *object)
|
||||
if (book_view->priv->responses_queued_id)
|
||||
gtk_signal_disconnect(GTK_OBJECT(book_view->priv->listener),
|
||||
book_view->priv->responses_queued_id);
|
||||
gtk_object_unref (GTK_OBJECT(book_view->priv->listener));
|
||||
bonobo_object_unref (BONOBO_OBJECT(book_view->priv->listener));
|
||||
}
|
||||
|
||||
g_free (book_view->priv);
|
||||
|
||||
@ -226,7 +226,7 @@ e_book_do_response_get_view (EBook *book,
|
||||
CORBA_exception_free (&ev);
|
||||
|
||||
gtk_object_unref(GTK_OBJECT(book_view));
|
||||
gtk_object_unref(GTK_OBJECT(op->listener));
|
||||
bonobo_object_unref(BONOBO_OBJECT(op->listener));
|
||||
|
||||
g_free (op);
|
||||
}
|
||||
@ -410,7 +410,7 @@ e_book_unload_uri (EBook *book)
|
||||
|
||||
CORBA_exception_free (&ev);
|
||||
|
||||
gtk_object_unref (GTK_OBJECT (book->priv->listener));
|
||||
bonobo_object_unref (BONOBO_OBJECT (book->priv->listener));
|
||||
|
||||
book->priv->listener = NULL;
|
||||
book->priv->load_state = URINotLoaded;
|
||||
|
||||
@ -215,7 +215,7 @@ pas_card_cursor_new (PASCardCursorLengthFunc get_length,
|
||||
corba_cursor = create_cursor (BONOBO_OBJECT (cursor));
|
||||
|
||||
if (corba_cursor == CORBA_OBJECT_NIL){
|
||||
gtk_object_destroy (GTK_OBJECT (cursor));
|
||||
gtk_object_unref (GTK_OBJECT (cursor));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
@ -189,6 +189,7 @@ e_reflow_destroy (GtkObject *object)
|
||||
EReflow *reflow = E_REFLOW(object);
|
||||
|
||||
g_list_free(reflow->items);
|
||||
reflow->items = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
@ -189,6 +189,7 @@ e_reflow_destroy (GtkObject *object)
|
||||
EReflow *reflow = E_REFLOW(object);
|
||||
|
||||
g_list_free(reflow->items);
|
||||
reflow->items = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@ -189,6 +189,7 @@ e_reflow_destroy (GtkObject *object)
|
||||
EReflow *reflow = E_REFLOW(object);
|
||||
|
||||
g_list_free(reflow->items);
|
||||
reflow->items = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user