From faae84477af9ba732358930d7d6ba57f16c4a6df Mon Sep 17 00:00:00 2001 From: Kjartan Maraas Date: Wed, 24 Oct 2007 14:11:25 +0000 Subject: Warning fixes: - mixing code and declarations - NULL vs 0 vs FALSE/TRUE - 2007-10-23 Kjartan Maraas * gui/contact-editor/e-contact-editor-address.c: * gui/contact-editor/e-contact-editor-fullname.c: * gui/contact-editor/e-contact-editor-im.c: * gui/contact-editor/e-contact-editor.c: (save_contact), (app_delete_event_cb), (e_contact_editor_set_property), (e_contact_editor_create_date): * gui/contact-list-editor/e-contact-list-model.c: (e_contact_list_model_new): * gui/merging/eab-contact-merging.c: (mergeit), (response): * gui/widgets/e-minicard.c: (e_minicard_event), (add_field), (get_email_location), (add_email_field), (remodel), (e_minicard_reflow), (e_minicard_compare): * gui/widgets/eab-config.c: (eab_config_new): * gui/widgets/eab-gui-util.c: (eab_load_error_dialog), (file_exists), (save_it), (contact_added_cb), (eab_send_to_contact_and_email_num_list): * gui/widgets/eab-menu.c: (eab_menu_new): * gui/widgets/eab-popup.c: (eab_popup_new): * importers/evolution-csv-importer.c: (parseLine), (getNextCSVEntry): * printing/e-contact-print-style-editor.c: * printing/test-contact-print-style-editor.c: * printing/test-print.c: * util/eab-book-util.c: (eab_get_config_database): Warning fixes: - mixing code and declarations - NULL vs 0 vs FALSE/TRUE - mark code static - some coding style fixes - if vs ifdef - Remove some unused bits - ANSIfication of declarations svn path=/trunk/; revision=34421 --- addressbook/gui/widgets/e-minicard.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'addressbook/gui/widgets/e-minicard.c') diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index 216401a69f..7132389379 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -738,7 +738,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) if (GNOME_CANVAS_ITEM_CLASS( parent_class )->event) return (* GNOME_CANVAS_ITEM_CLASS( parent_class )->event) (item, event); else - return 0; + return FALSE; } static void @@ -1021,28 +1021,29 @@ remodel( EMinicard *e_minicard ) } static void -e_minicard_reflow( GnomeCanvasItem *item, int flags ) +e_minicard_reflow(GnomeCanvasItem *item, int flags) { EMinicard *e_minicard = E_MINICARD(item); - if ( GTK_OBJECT_FLAGS( e_minicard ) & GNOME_CANVAS_ITEM_REALIZED ) { + if (GTK_OBJECT_FLAGS (e_minicard) & GNOME_CANVAS_ITEM_REALIZED) { GList *list; gdouble text_height; gint old_height; old_height = e_minicard->height; - g_object_get( e_minicard->header_text, + g_object_get(e_minicard->header_text, "text_height", &text_height, - NULL ); + NULL); e_minicard->height = text_height + 10.0; - gnome_canvas_item_set( e_minicard->header_rect, + gnome_canvas_item_set(e_minicard->header_rect, "y2", text_height + 9.0, - NULL ); + NULL); for(list = e_minicard->fields; list; list = g_list_next(list)) { EMinicardField *field = E_MINICARD_FIELD(list->data); + /* Why not use the item that is passed in? */ GnomeCanvasItem *item = field->label; g_object_get (item, "height", &text_height, @@ -1052,13 +1053,13 @@ e_minicard_reflow( GnomeCanvasItem *item, int flags ) } e_minicard->height += 2; - gnome_canvas_item_set( e_minicard->rect, + gnome_canvas_item_set(e_minicard->rect, "x2", (double) e_minicard->width - 1.0, "y2", (double) e_minicard->height - 1.0, - NULL ); - gnome_canvas_item_set( e_minicard->header_rect, + NULL); + gnome_canvas_item_set(e_minicard->header_rect, "x2", (double) e_minicard->width - 3.0, - NULL ); + NULL); if (old_height != e_minicard->height) e_canvas_item_request_parent_reflow(item); -- cgit