From 9a4ee04a76f07a0183582b377260b9c37551a0ff Mon Sep 17 00:00:00 2001 From: Hans Petter Jansson Date: Thu, 26 Feb 2004 21:01:41 +0000 Subject: Move unused variable declaration inside notyet conditional. 2004-02-26 Hans Petter Jansson * util/eab-destination.c (name_and_email_cb): Move unused variable declaration inside notyet conditional. * printing/e-contact-print.c: Include gal/util/e-util.h * gui/merging/eab-contact-compare.c (eab_contact_locate_match): Cast callback to an EBookCallback. (eab_contact_locate_match_full): Ditto. * gui/contact-editor/e-contact-quick-add.c (quick_add_set_name): Remove unused variable and cast 3rd arg to e_contact_set () (perhaps this should take a gconstpointer?). * gui/contact-editor/e-contact-editor-im.c (setup_service_optmenu): Remove unused variable. * gui/component/select-names/e-select-names.c (e_select_names_init): Cast the vbox to a GtkBox. * gui/component/addressbook-config.c (dialog_to_source): Correctly cast the spin button to a GtkSpinButton, not a GtkEntry. * gui/component/addressbook-component.c (load_primary_selection): Remove unused variable. svn path=/trunk/; revision=24898 --- addressbook/ChangeLog | 27 ++++++++++++++++++++++ addressbook/gui/component/addressbook-component.c | 1 - addressbook/gui/component/addressbook-config.c | 2 +- .../gui/component/select-names/e-select-names.c | 2 +- .../gui/contact-editor/e-contact-editor-im.c | 1 - .../gui/contact-editor/e-contact-quick-add.c | 4 +--- addressbook/gui/merging/eab-contact-compare.c | 5 ++-- addressbook/printing/e-contact-print.c | 1 + addressbook/util/eab-destination.c | 4 ++-- 9 files changed, 36 insertions(+), 11 deletions(-) diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 0fb7874bdf..387e73a1c9 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,30 @@ +2004-02-26 Hans Petter Jansson + + * util/eab-destination.c (name_and_email_cb): Move unused variable + declaration inside notyet conditional. + + * printing/e-contact-print.c: Include gal/util/e-util.h + + * gui/merging/eab-contact-compare.c (eab_contact_locate_match): Cast + callback to an EBookCallback. + (eab_contact_locate_match_full): Ditto. + + * gui/contact-editor/e-contact-quick-add.c (quick_add_set_name): + Remove unused variable and cast 3rd arg to e_contact_set () (perhaps + this should take a gconstpointer?). + + * gui/contact-editor/e-contact-editor-im.c (setup_service_optmenu): + Remove unused variable. + + * gui/component/select-names/e-select-names.c (e_select_names_init): + Cast the vbox to a GtkBox. + + * gui/component/addressbook-config.c (dialog_to_source): Correctly cast + the spin button to a GtkSpinButton, not a GtkEntry. + + * gui/component/addressbook-component.c (load_primary_selection): + Remove unused variable. + 2004-02-26 Chris Toshok * gui/widgets/eab-contact-display.c (render_contact): add the diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c index aa2300b957..f669824940 100644 --- a/addressbook/gui/component/addressbook-component.c +++ b/addressbook/gui/component/addressbook-component.c @@ -146,7 +146,6 @@ load_primary_selection (AddressbookComponent *addressbook_component) { AddressbookComponentPrivate *priv; ESource *source; - char *uid; priv = addressbook_component->priv; diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c index eaf0093c77..9d4123034e 100644 --- a/addressbook/gui/component/addressbook-config.c +++ b/addressbook/gui/component/addressbook-config.c @@ -240,7 +240,7 @@ dialog_to_source (AddressbookSourceDialog *dialog, ESource *source, gboolean tem #ifdef HAVE_LDAP e_source_set_property (source, "email_addr", gtk_entry_get_text (GTK_ENTRY (dialog->email))); e_source_set_property (source, "binddn", gtk_entry_get_text (GTK_ENTRY (dialog->binddn))); - str = g_strdup_printf ("%d", gtk_spin_button_get_value_as_int (GTK_ENTRY (dialog->limit_spinbutton))); + str = g_strdup_printf ("%d", gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (dialog->limit_spinbutton))); e_source_set_property (source, "limit", str); g_free (str); e_source_set_property (source, "ssl", ldap_unparse_ssl (dialog->ssl)); diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c index a732e643ec..cd8a2141f3 100644 --- a/addressbook/gui/component/select-names/e-select-names.c +++ b/addressbook/gui/component/select-names/e-select-names.c @@ -481,7 +481,7 @@ e_select_names_init (ESelectNames *e_select_names) } gtk_widget_ref (widget); gtk_container_remove (GTK_CONTAINER (widget->parent), widget); - gtk_box_pack_start (GTK_DIALOG (e_select_names)->vbox, widget, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (e_select_names)->vbox), widget, TRUE, TRUE, 0); gtk_widget_unref (widget); gtk_dialog_add_buttons (GTK_DIALOG (e_select_names), diff --git a/addressbook/gui/contact-editor/e-contact-editor-im.c b/addressbook/gui/contact-editor/e-contact-editor-im.c index d7e98ce909..aedd712261 100644 --- a/addressbook/gui/contact-editor/e-contact-editor-im.c +++ b/addressbook/gui/contact-editor/e-contact-editor-im.c @@ -177,7 +177,6 @@ setup_service_optmenu(EContactEditorIm *editor) GtkWidget *image; GdkPixbuf *pixbuf; GdkPixbuf *scale; - GList *p; GtkSizeGroup *sg; char *icon_path; int i; diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.c b/addressbook/gui/contact-editor/e-contact-quick-add.c index 10bbe7087a..a317075450 100644 --- a/addressbook/gui/contact-editor/e-contact-quick-add.c +++ b/addressbook/gui/contact-editor/e-contact-quick-add.c @@ -93,15 +93,13 @@ quick_add_unref (QuickAdd *qa) static void quick_add_set_name (QuickAdd *qa, const gchar *name) { - EContactName *card_name; - if (name == qa->name) return; g_free (qa->name); qa->name = g_strdup (name); - e_contact_set (qa->contact, E_CONTACT_FULL_NAME, name); + e_contact_set (qa->contact, E_CONTACT_FULL_NAME, (char *) name); } static void diff --git a/addressbook/gui/merging/eab-contact-compare.c b/addressbook/gui/merging/eab-contact-compare.c index 33a696261e..f4f9afe1a7 100644 --- a/addressbook/gui/merging/eab-contact-compare.c +++ b/addressbook/gui/merging/eab-contact-compare.c @@ -29,6 +29,7 @@ #include #include #include "util/eab-book-util.h" +#include "../component/addressbook.h" #include "eab-contact-compare.h" /* This is an "optimistic" combiner: the best of the two outcomes is @@ -707,7 +708,7 @@ eab_contact_locate_match (EContact *contact, EABContactMatchQueryCallback cb, gp info->closure = closure; info->avoid = NULL; - addressbook_load_default_book (use_common_book_cb, info); + addressbook_load_default_book ((EBookCallback) use_common_book_cb, info); } /** @@ -740,6 +741,6 @@ eab_contact_locate_match_full (EBook *book, EContact *contact, GList *avoid, EAB if (book) use_common_book_cb (book, info); else - addressbook_load_default_book (use_common_book_cb, info); + addressbook_load_default_book ((EBookCallback) use_common_book_cb, info); } diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c index 8966504f28..39094d18a3 100644 --- a/addressbook/printing/e-contact-print.c +++ b/addressbook/printing/e-contact-print.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #define SCALE 5 diff --git a/addressbook/util/eab-destination.c b/addressbook/util/eab-destination.c index 020a9a5e09..4ab1a16678 100644 --- a/addressbook/util/eab-destination.c +++ b/addressbook/util/eab-destination.c @@ -919,10 +919,10 @@ name_and_email_cb (EBook *book, EBookStatus status, GList *contacts, gpointer cl if (status == E_BOOK_ERROR_OK && g_list_length ((GList *) contacts) == 1) { EContact *contact = E_CONTACT (contacts->data); - const char *email = eab_destination_get_email (dest); int email_num = 0; - #if notyet + const char *email = eab_destination_get_email (dest); + if (eab_destination_is_valid (dest) && email && *email) { email_num = e_contact_email_find_number (contact, eab_destination_get_email (dest)); } -- cgit v1.2.3