diff options
author | Kjartan Maraas <kmaraas@gnome.org> | 2007-10-24 22:11:25 +0800 |
---|---|---|
committer | Kjartan Maraas <kmaraas@src.gnome.org> | 2007-10-24 22:11:25 +0800 |
commit | faae84477af9ba732358930d7d6ba57f16c4a6df (patch) | |
tree | 236ae64f47381d5e713fcaf81a981944f1a5d150 /addressbook/gui/widgets | |
parent | a1fb36c15210deac4ca989703587060c549c6e51 (diff) | |
download | gsoc2013-evolution-faae84477af9ba732358930d7d6ba57f16c4a6df.tar.gz gsoc2013-evolution-faae84477af9ba732358930d7d6ba57f16c4a6df.tar.zst gsoc2013-evolution-faae84477af9ba732358930d7d6ba57f16c4a6df.zip |
Warning fixes: - mixing code and declarations - NULL vs 0 vs FALSE/TRUE -
2007-10-23 Kjartan Maraas <kmaraas@gnome.org>
* 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
Diffstat (limited to 'addressbook/gui/widgets')
-rw-r--r-- | addressbook/gui/widgets/e-minicard.c | 23 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-config.c | 6 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-gui-util.c | 2 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-menu.c | 6 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-popup.c | 12 |
5 files changed, 25 insertions, 24 deletions
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); diff --git a/addressbook/gui/widgets/eab-config.c b/addressbook/gui/widgets/eab-config.c index ee95ea3582..967ef370b7 100644 --- a/addressbook/gui/widgets/eab-config.c +++ b/addressbook/gui/widgets/eab-config.c @@ -127,7 +127,7 @@ eab_config_get_type (void) EABConfig * eab_config_new (int type, const char *menuid) { - EABConfig *ecp = g_object_new (eab_config_get_type(), 0); + EABConfig *ecp = g_object_new (eab_config_get_type(), NULL); e_config_construct (&ecp->config, type, menuid); return ecp; } @@ -144,12 +144,12 @@ eab_config_target_new_source (EABConfig *ecp, struct _ESource *source) } static const EConfigHookTargetMask ecph_no_masks[] = { - { 0 } + { NULL } }; static const EConfigHookTargetMap ecph_targets[] = { { "source", EAB_CONFIG_TARGET_SOURCE, ecph_no_masks }, - { 0 }, + { NULL }, }; static void diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index dba4653f87..f7ed275698 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -108,7 +108,7 @@ eab_load_error_dialog (GtkWidget *parent, ESource *source, EBookStatus status) } else if (!strncmp (uri, "ldap:", 5)) { /* special case for ldap: contact folders so we can tell the user about openldap */ -#if HAVE_LDAP +#ifdef HAVE_LDAP label_string = _("We were unable to open this addressbook. This either " "means you have entered an incorrect URI, or the LDAP server " diff --git a/addressbook/gui/widgets/eab-menu.c b/addressbook/gui/widgets/eab-menu.c index 9b8e912642..c35cd6ba61 100644 --- a/addressbook/gui/widgets/eab-menu.c +++ b/addressbook/gui/widgets/eab-menu.c @@ -100,7 +100,7 @@ eab_menu_get_type(void) EABMenu *eab_menu_new(const char *menuid) { - EABMenu *emp = g_object_new(eab_menu_get_type(), 0); + EABMenu *emp = g_object_new(eab_menu_get_type(), NULL); e_menu_construct(&emp->menu, menuid); @@ -208,12 +208,12 @@ static const EMenuHookTargetMask eabmph_select_masks[] = { { "any", EAB_MENU_SELECT_ANY }, { "editable", EAB_MENU_SELECT_EDITABLE }, { "email", EAB_MENU_SELECT_EMAIL }, - { 0 } + { NULL } }; static const EMenuHookTargetMap eabmph_targets[] = { { "select", EAB_MENU_TARGET_SELECT, eabmph_select_masks }, - { 0 } + { NULL } }; static void diff --git a/addressbook/gui/widgets/eab-popup.c b/addressbook/gui/widgets/eab-popup.c index 59a64cd549..d37c1b7b73 100644 --- a/addressbook/gui/widgets/eab-popup.c +++ b/addressbook/gui/widgets/eab-popup.c @@ -116,7 +116,7 @@ eab_popup_get_type(void) EABPopup *eab_popup_new(const char *menuid) { - EABPopup *eabp = g_object_new(eab_popup_get_type(), 0); + EABPopup *eabp = g_object_new(eab_popup_get_type(), NULL); e_popup_construct(&eabp->popup, menuid); @@ -298,24 +298,24 @@ static const EPopupHookTargetMask eabph_select_masks[] = { { "any", EAB_POPUP_SELECT_ANY }, { "editable", EAB_POPUP_SELECT_EDITABLE }, { "email", EAB_POPUP_SELECT_EMAIL }, - { 0 } + { NULL } }; static const EPopupHookTargetMask eabph_source_masks[] = { { "primary", EAB_POPUP_SOURCE_PRIMARY }, { "system", EAB_POPUP_SOURCE_SYSTEM }, - { 0 } + { NULL } }; static const EPopupHookTargetMask eabph_uri_masks[] = { { "http", EAB_POPUP_URI_HTTP }, { "internal-mailto", EAB_POPUP_URI_MAILTO }, { "notmailto", EAB_POPUP_URI_NOT_MAILTO }, - { 0 } + { NULL } }; static const EPopupHookTargetMask eabph_select_names_masks[] = { - { 0 } + { NULL } }; static const EPopupHookTargetMap eabph_targets[] = { @@ -323,7 +323,7 @@ static const EPopupHookTargetMap eabph_targets[] = { { "uri", EAB_POPUP_TARGET_URI, eabph_uri_masks }, { "source", EAB_POPUP_TARGET_SOURCE, eabph_source_masks }, { "select-names", EAB_POPUP_TARGET_SELECT_NAMES, eabph_select_names_masks }, - { 0 } + { NULL } }; static void |