diff options
author | Chris Toshok <toshok@ximian.com> | 2002-11-09 11:26:48 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2002-11-09 11:26:48 +0800 |
commit | 93e3a5b7a26de02fd34045c4b127e3349d89add4 (patch) | |
tree | 6055965377649723fbc292c16213e4522ee7300c /addressbook/gui/widgets/e-minicard.c | |
parent | 0b1546202c75992262a3da84bcf8adf2c216022a (diff) | |
download | gsoc2013-evolution-93e3a5b7a26de02fd34045c4b127e3349d89add4.tar.gz gsoc2013-evolution-93e3a5b7a26de02fd34045c4b127e3349d89add4.tar.zst gsoc2013-evolution-93e3a5b7a26de02fd34045c4b127e3349d89add4.zip |
port work.
2002-11-08 Chris Toshok <toshok@ximian.com>
* gui/widgets/test-reflow.c: port work.
* gui/widgets/test-minicard-view.c: port work.
* gui/widgets/e-minicard.[ch]: port work.
* gui/widgets/e-minicard-widget.c: port work.
* gui/widgets/e-minicard-view.c: port work.
* gui/widgets/e-minicard-view-widget.c
(e_minicard_view_widget_size_allocate): gtk_->g_ change i missed.
(e_minicard_view_widget_reflow): same.
* gui/widgets/e-minicard-label.c: port work.
* gui/widgets/e-minicard-control.c (get_prop): gtk_->g_ change i
missed.
* gui/widgets/e-addressbook-view.c (setup_menus): ifdef this
PENDING_PORT_WORK for now.
(has_email_address_1): gtk_->g_ change i missed.
(print): remove the PENDING_PORT_WORK from here, as the print_*
symbols now resolve.
(delete): gtk_->g_ changes.
(new_card): same.
(new_list): same.
(sources): same.
(create_minicard_view): same.
(table_double_click): same.
(create_table_view): same.
(e_contact_print_destroy): same.
(e_contact_print_button): same.
(e_addressbook_view_print): same, and remove the PENDING_PORT_WORK
ifdef.
(e_addressbook_view_print_preview): same.
(do_remove): gtk_->g_ changes.
(e_addressbook_view_save_state): same.
(view_transfer_cards): same.
* gui/widgets/e-addressbook-view.h (struct _EAddressbookView):
GtkObject -> GObject.
* gui/widgets/e-addressbook-util.c (e_addressbook_error_dialog):
GnomeDialog -> GtkDialog.
* gui/widgets/e-addressbook-table-adapter.c
(addressbook_set_value_at): a gtk_->g_ change i missed.
(e_addressbook_table_adapter_class_init): gtk_type_class ->
g_type_class_peek_parent.
* gui/widgets/e-addressbook-reflow-adapter.c
(addressbook_get_property): use g_object_get_property for
aggregated properties.
(e_addressbook_reflow_adapter_class_init): gtk_type_class ->
g_type_class_peek_parent.
* gui/merging/e-card-merging.c (match_query_callback): some misc
gtk_->g_ changes i missed.
svn path=/trunk/; revision=18682
Diffstat (limited to 'addressbook/gui/widgets/e-minicard.c')
-rw-r--r-- | addressbook/gui/widgets/e-minicard.c | 91 |
1 files changed, 48 insertions, 43 deletions
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index 28ae0d07e1..38e7b6d3c9 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -42,7 +42,7 @@ static void e_minicard_init (EMinicard *card); static void e_minicard_class_init (EMinicardClass *klass); static void e_minicard_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void e_minicard_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); -static void e_minicard_destroy (GtkObject *object); +static void e_minicard_dispose (GObject *object); static void e_minicard_finalize (GObject *object); static gboolean e_minicard_event (GnomeCanvasItem *item, GdkEvent *event); static void e_minicard_realize (GnomeCanvasItem *item); @@ -124,12 +124,11 @@ static void e_minicard_class_init (EMinicardClass *klass) { GObjectClass *object_class = (GObjectClass*) klass; - GtkObjectClass *gtkobject_class = (GtkObjectClass*) klass; GnomeCanvasItemClass *item_class = (GnomeCanvasItemClass *) klass; object_class->set_property = e_minicard_set_property; object_class->get_property = e_minicard_get_property; - gtkobject_class->destroy = e_minicard_destroy; + object_class->dispose = e_minicard_dispose; object_class->finalize = e_minicard_finalize; parent_class = gtk_type_class (gnome_canvas_group_get_type ()); @@ -138,15 +137,15 @@ e_minicard_class_init (EMinicardClass *klass) g_param_spec_double ("width", _("Width"), /*_( */"XXX blurb" /*)*/, - 10.0, G_MAXDOUBLE, 10.0, - G_PARAM_READWRITE | G_PARAM_LAX_VALIDATION)); + 0.0, G_MAXDOUBLE, 10.0, + G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_HEIGHT, g_param_spec_double ("height", _("Height"), /*_( */"XXX blurb" /*)*/, - 10.0, G_MAXDOUBLE, 10.0, - G_PARAM_READWRITE | G_PARAM_LAX_VALIDATION)); + 0.0, G_MAXDOUBLE, 10.0, + G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_HAS_FOCUS, /* XXX should be _enum */ @@ -383,7 +382,7 @@ e_minicard_get_property (GObject *object, guint prop_id, GValue *value, GParamS } static void -e_minicard_destroy (GtkObject *object) +e_minicard_dispose (GObject *object) { EMinicard *e_minicard; @@ -392,13 +391,19 @@ e_minicard_destroy (GtkObject *object) e_minicard = E_MINICARD (object); - g_list_foreach(e_minicard->fields, (GFunc) e_minicard_field_destroy, NULL); - g_list_free(e_minicard->fields); + if (e_minicard->fields) { + g_list_foreach(e_minicard->fields, (GFunc) e_minicard_field_destroy, NULL); + g_list_free(e_minicard->fields); + e_minicard->fields = NULL; + } - gdk_pixbuf_unref (e_minicard->list_icon_pixbuf); + if (e_minicard->list_icon_pixbuf) { + gdk_pixbuf_unref (e_minicard->list_icon_pixbuf); + e_minicard->list_icon_pixbuf = NULL; + } - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); + if (G_OBJECT_CLASS (parent_class)->dispose) + (* G_OBJECT_CLASS (parent_class)->dispose) (object); } @@ -547,9 +552,9 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) if (E_IS_MINICARD_VIEW(GNOME_CANVAS_ITEM(e_minicard)->parent)) { - gtk_object_get(GTK_OBJECT(GNOME_CANVAS_ITEM(e_minicard)->parent), - "book", &book, - NULL); + g_object_get(GNOME_CANVAS_ITEM(e_minicard)->parent, + "book", &book, + NULL); } @@ -635,21 +640,21 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) } else { EBook *book = NULL; if (E_IS_MINICARD_VIEW(item->parent)) { - gtk_object_get(GTK_OBJECT(item->parent), - "book", &book, - NULL); + g_object_get(item->parent, + "book", &book, + NULL); } if (book != NULL) { if (e_card_evolution_list (e_minicard->card)) { EContactListEditor *editor = e_addressbook_show_contact_list_editor (book, e_minicard->card, FALSE, e_minicard->editable); - e_minicard->editor = GTK_OBJECT (editor); + e_minicard->editor = G_OBJECT (editor); } else { EContactEditor *editor = e_addressbook_show_contact_editor (book, e_minicard->card, FALSE, e_minicard->editable); - e_minicard->editor = GTK_OBJECT (editor); + e_minicard->editor = G_OBJECT (editor); } g_object_ref (e_minicard->editor); @@ -670,9 +675,9 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) EMinicardField *field = E_MINICARD_FIELD(list->data); GnomeCanvasItem *item = field->label; EFocus has_focus; - gtk_object_get(GTK_OBJECT(item), - "has_focus", &has_focus, - NULL); + g_object_get(item, + "has_focus", &has_focus, + NULL); if (has_focus != E_FOCUS_NONE) { if (event->key.state & GDK_SHIFT_MASK) list = list->prev; @@ -731,11 +736,11 @@ field_changed (EText *text, EMinicard *e_minicard) char *string; type = GPOINTER_TO_INT - (gtk_object_get_data(GTK_OBJECT(text), - "EMinicard:field")); - gtk_object_get(GTK_OBJECT(text), - "text", &string, - NULL); + (g_object_get_data(G_OBJECT(text), + "EMinicard:field")); + g_object_get(text, + "text", &string, + NULL); e_card_simple_set(e_minicard->simple, type, string); @@ -786,9 +791,9 @@ add_field (EMinicard *e_minicard, ECardSimpleField field, gdouble left_width) "editable", e_minicard->editable, NULL ); g_signal_connect(E_MINICARD_LABEL(new_item)->field, - "changed", GTK_SIGNAL_FUNC(field_changed), e_minicard); + "changed", G_CALLBACK (field_changed), e_minicard); g_signal_connect(E_MINICARD_LABEL(new_item)->field, - "activate", GTK_SIGNAL_FUNC(field_activated), e_minicard); + "activate", G_CALLBACK (field_activated), e_minicard); g_object_set(E_MINICARD_LABEL(new_item)->field, "allow_newlines", e_card_simple_get_allow_newlines (e_minicard->simple, field), NULL); @@ -921,9 +926,9 @@ e_minicard_reflow( GnomeCanvasItem *item, int flags ) old_height = e_minicard->height; - gtk_object_get( GTK_OBJECT( e_minicard->header_text ), - "text_height", &text_height, - NULL ); + g_object_get( e_minicard->header_text, + "text_height", &text_height, + NULL ); e_minicard->height = text_height + 10.0; @@ -934,9 +939,9 @@ e_minicard_reflow( GnomeCanvasItem *item, int flags ) for(list = e_minicard->fields; list; list = g_list_next(list)) { EMinicardField *field = E_MINICARD_FIELD(list->data); GnomeCanvasItem *item = field->label; - gtk_object_get (GTK_OBJECT(item), - "height", &text_height, - NULL); + g_object_get (item, + "height", &text_height, + NULL); e_canvas_item_move_absolute(item, 2, e_minicard->height); e_minicard->height += text_height; } @@ -982,12 +987,12 @@ e_minicard_compare (EMinicard *minicard1, EMinicard *minicard2) if (minicard1->card && minicard2->card) { char *file_as1, *file_as2; - gtk_object_get(GTK_OBJECT(minicard1->card), - "file_as", &file_as1, - NULL); - gtk_object_get(GTK_OBJECT(minicard2->card), - "file_as", &file_as2, - NULL); + g_object_get(minicard1->card, + "file_as", &file_as1, + NULL); + g_object_get(minicard2->card, + "file_as", &file_as2, + NULL); if (file_as1 && file_as2) return g_utf8_collate(file_as1, file_as2); if (file_as1) |