diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2007-11-15 06:04:21 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2007-11-15 06:04:21 +0800 |
commit | 9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91 (patch) | |
tree | 2e1e96f33404781354c422a7e9beaf458ebeb655 /addressbook/gui/contact-editor | |
parent | 7e8f8bb9e5167b0219b48ab3e8062080d3740b0a (diff) | |
download | gsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.tar gsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.tar.gz gsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.tar.bz2 gsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.tar.lz gsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.tar.xz gsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.tar.zst gsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.zip |
** Remove trailing whitespace from source code.
2007-11-14 Matthew Barnes <mbarnes@redhat.com>
** Remove trailing whitespace from source code.
svn path=/trunk/; revision=34537
Diffstat (limited to 'addressbook/gui/contact-editor')
10 files changed, 105 insertions, 105 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor-address.c b/addressbook/gui/contact-editor/e-contact-editor-address.c index 06e79d61d6..5877babb49 100644 --- a/addressbook/gui/contact-editor/e-contact-editor-address.c +++ b/addressbook/gui/contact-editor/e-contact-editor-address.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* +/* * e-contact-editor-address.c * Copyright (C) 2000 Ximian, Inc. * Author: Chris Lahey <clahey@ximian.com> @@ -92,14 +92,14 @@ e_contact_editor_address_class_init (EContactEditorAddressClass *klass) object_class->get_property = e_contact_editor_address_get_property; object_class->dispose = e_contact_editor_address_dispose; - g_object_class_install_property (object_class, PROP_ADDRESS, + g_object_class_install_property (object_class, PROP_ADDRESS, g_param_spec_boxed ("address", _("Address"), /*_( */"XXX blurb" /*)*/, e_contact_address_get_type (), G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_EDITABLE, + g_object_class_install_property (object_class, PROP_EDITABLE, g_param_spec_boolean ("editable", _("Editable"), /*_( */"XXX blurb" /*)*/, @@ -501,7 +501,7 @@ e_contact_editor_address_set_property (GObject *object, guint prop_id, EContactEditorAddress *e_contact_editor_address; e_contact_editor_address = E_CONTACT_EDITOR_ADDRESS (object); - + switch (prop_id){ case PROP_ADDRESS: if (e_contact_editor_address->address) diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c index daaffd01de..bca5f14499 100644 --- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c +++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* +/* * eab-contact-editor-phones.c * Copyright (C) 2003 Ximian, Inc. * Author: Chris Toshok <toshok@ximian.com> @@ -85,13 +85,13 @@ e_contact_editor_fullname_class_init (EContactEditorFullnameClass *klass) object_class->get_property = e_contact_editor_fullname_get_property; object_class->dispose = e_contact_editor_fullname_dispose; - g_object_class_install_property (object_class, PROP_NAME, + g_object_class_install_property (object_class, PROP_NAME, g_param_spec_pointer ("name", _("Name"), /*_( */"XXX blurb" /*)*/, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_EDITABLE, + g_object_class_install_property (object_class, PROP_EDITABLE, g_param_spec_boolean ("editable", _("Editable"), /*_( */"XXX blurb" /*)*/, @@ -157,7 +157,7 @@ e_contact_editor_fullname_dispose (GObject *object) g_object_unref(e_contact_editor_fullname->gui); e_contact_editor_fullname->gui = NULL; } - + if (e_contact_editor_fullname->name) { e_contact_name_free(e_contact_editor_fullname->name); e_contact_editor_fullname->name = NULL; @@ -185,7 +185,7 @@ e_contact_editor_fullname_set_property (GObject *object, guint prop_id, EContactEditorFullname *e_contact_editor_fullname; e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME (object); - + switch (prop_id){ case PROP_NAME: e_contact_name_free(e_contact_editor_fullname->name); diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.h b/addressbook/gui/contact-editor/e-contact-editor-fullname.h index 01374f5c82..d0c9690d59 100644 --- a/addressbook/gui/contact-editor/e-contact-editor-fullname.h +++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.h @@ -48,7 +48,7 @@ typedef struct _EContactEditorFullnameClass EContactEditorFullnameClass; struct _EContactEditorFullname { GtkDialog parent; - + /* item specific fields */ EContactName *name; GladeXML *gui; diff --git a/addressbook/gui/contact-editor/e-contact-editor-im.c b/addressbook/gui/contact-editor/e-contact-editor-im.c index 93e6da7cae..9e8aa8d071 100644 --- a/addressbook/gui/contact-editor/e-contact-editor-im.c +++ b/addressbook/gui/contact-editor/e-contact-editor-im.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* +/* * e-contact-editor-im.c * Copyright (C) 2003 Ximian, Inc. * Author: Christian Hammond <chipx86@gnupdate.org> @@ -116,7 +116,7 @@ e_contact_editor_im_class_init (EContactEditorImClass *klass) object_class->get_property = e_contact_editor_im_get_property; object_class->dispose = e_contact_editor_im_dispose; - g_object_class_install_property (object_class, PROP_SERVICE, + g_object_class_install_property (object_class, PROP_SERVICE, g_param_spec_int ("service", _("Service"), /*_( */"XXX blurb" /*)*/, @@ -125,21 +125,21 @@ e_contact_editor_im_class_init (EContactEditorImClass *klass) FIRST_IM_TYPE, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_LOCATION, + g_object_class_install_property (object_class, PROP_LOCATION, g_param_spec_string ("location", _("Location"), /*_( */"XXX blurb" /*)*/, "HOME", G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_USERNAME, + g_object_class_install_property (object_class, PROP_USERNAME, g_param_spec_string ("username", _("Username"), /*_( */"XXX blurb" /*)*/, NULL, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_EDITABLE, + g_object_class_install_property (object_class, PROP_EDITABLE, g_param_spec_boolean ("editable", _("Editable"), /*_( */"XXX blurb" /*)*/, diff --git a/addressbook/gui/contact-editor/e-contact-editor-im.h b/addressbook/gui/contact-editor/e-contact-editor-im.h index 56116f7501..9db0d03c80 100644 --- a/addressbook/gui/contact-editor/e-contact-editor-im.h +++ b/addressbook/gui/contact-editor/e-contact-editor-im.h @@ -50,7 +50,7 @@ typedef struct _EContactEditorImClass EContactEditorImClass; struct _EContactEditorIm { GtkDialog parent; - + /* item specific fields */ EContactField service; char *location; diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 91d9e7af66..b1b30f0c33 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* +/* * e-contact-editor.c * Copyright (C) 2000 Ximian, Inc. * Author: Chris Lahey <clahey@ximian.com> @@ -254,56 +254,56 @@ e_contact_editor_class_init (EContactEditorClass *klass) editor_class->is_changed = e_contact_editor_is_changed; editor_class->get_window = e_contact_editor_get_window; - g_object_class_install_property (object_class, PROP_SOURCE_BOOK, + g_object_class_install_property (object_class, PROP_SOURCE_BOOK, g_param_spec_object ("source_book", _("Source Book"), /*_( */"XXX blurb" /*)*/, E_TYPE_BOOK, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_TARGET_BOOK, + g_object_class_install_property (object_class, PROP_TARGET_BOOK, g_param_spec_object ("target_book", _("Target Book"), /*_( */"XXX blurb" /*)*/, E_TYPE_BOOK, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_CONTACT, + g_object_class_install_property (object_class, PROP_CONTACT, g_param_spec_object ("contact", _("Contact"), /*_( */"XXX blurb" /*)*/, E_TYPE_CONTACT, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_IS_NEW_CONTACT, + g_object_class_install_property (object_class, PROP_IS_NEW_CONTACT, g_param_spec_boolean ("is_new_contact", _("Is New Contact"), /*_( */"XXX blurb" /*)*/, FALSE, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_WRITABLE_FIELDS, + g_object_class_install_property (object_class, PROP_WRITABLE_FIELDS, g_param_spec_object ("writable_fields", _("Writable Fields"), /*_( */"XXX blurb" /*)*/, E_TYPE_LIST, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_REQUIRED_FIELDS, + g_object_class_install_property (object_class, PROP_REQUIRED_FIELDS, g_param_spec_object ("required_fields", _("Required Fields"), /*_( */"XXX blurb" /*)*/, E_TYPE_LIST, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_EDITABLE, + g_object_class_install_property (object_class, PROP_EDITABLE, g_param_spec_boolean ("editable", _("Editable"), /*_( */"XXX blurb" /*)*/, FALSE, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_CHANGED, + g_object_class_install_property (object_class, PROP_CHANGED, g_param_spec_boolean ("changed", _("Changed"), /*_( */"XXX blurb" /*)*/, @@ -359,7 +359,7 @@ style_makes_sense (const EContactName *name, const gchar *company, int style) case 2: if(name) { if (name->additional && *name->additional) - return TRUE; + return TRUE; else return FALSE; } @@ -384,7 +384,7 @@ name_to_style (const EContactName *name, const gchar *company, int style) { char *string; char *strings[4], **stringptr; - char *midstring[4], **midstrptr; + char *midstring[4], **midstrptr; char *substring; switch (style) { case 0: @@ -410,7 +410,7 @@ name_to_style (const EContactName *name, const gchar *company, int style) string = g_strjoinv(" ", strings); break; case 2: - midstrptr=midstring; + midstrptr=midstring; if(name){ if (name->family && *name->family) *(midstrptr++) = name->family; @@ -426,7 +426,7 @@ name_to_style (const EContactName *name, const gchar *company, int style) } *stringptr = NULL; string = g_strjoinv(" ", strings); - break; + break; case 3: string = g_strdup(company); break; @@ -1363,13 +1363,13 @@ sensitize_phone (EContactEditor *editor) static void init_im_record_location (EContactEditor *editor, gint record) { - + #ifdef ENABLE_IM_LOCATION GtkWidget *location_option_menu; GtkWidget *location_menu; gint i; gchar *widget_name; - + widget_name = g_strdup_printf ("optionmenu-im-location-%d", record); location_option_menu = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); @@ -1670,13 +1670,13 @@ static void sensitize_im (EContactEditor *editor) { gint i; - gboolean enabled; + gboolean enabled; gboolean no_ims_supported; - + enabled = editor->target_editable; no_ims_supported = TRUE; - for (i = 0; i < G_N_ELEMENTS (im_service); i++) + for (i = 0; i < G_N_ELEMENTS (im_service); i++) if (is_field_supported (editor, im_service[i].field)) { no_ims_supported = FALSE; break; @@ -1684,7 +1684,7 @@ sensitize_im (EContactEditor *editor) if (no_ims_supported) enabled = FALSE; - + for (i = 1; i <= IM_SLOTS; i++) { sensitize_im_record (editor, i, enabled); } @@ -1761,7 +1761,7 @@ fill_in_address_textview (EContactEditor *editor, gint record, EContactAddress * } else { gtk_text_buffer_insert (text_buffer, &iter_end, "", -1); } - gtk_text_buffer_get_iter_at_line (text_buffer, &iter_start, 0); + gtk_text_buffer_get_iter_at_line (text_buffer, &iter_start, 0); gtk_text_buffer_place_cursor (text_buffer, &iter_start); } @@ -2025,7 +2025,7 @@ sensitize_address (EContactEditor *editor) gboolean enabled = TRUE; if (!editor->target_editable || - !(is_field_supported (editor, addresses [i]) || + !(is_field_supported (editor, addresses [i]) || is_field_supported (editor, address_labels[i]))) enabled = FALSE; @@ -2042,7 +2042,7 @@ typedef struct { FieldMapping; /* Table of widgets that interact with simple fields. This table is used to: - * + * * - Fill in data. * - Extract data. * - Set sensitivity based on backend capabilities. @@ -2266,22 +2266,22 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) &img_buff, &photo.data.inlined.length)) { GdkPixbuf *pixbuf, *new; GdkPixbufLoader *loader = gdk_pixbuf_loader_new(); - + photo.data.inlined.data = (unsigned char *)img_buff; img_buff = NULL; gdk_pixbuf_loader_write (loader, photo.data.inlined.data, photo.data.inlined.length, NULL); gdk_pixbuf_loader_close (loader, NULL); - + pixbuf = gdk_pixbuf_loader_get_pixbuf (loader); if (pixbuf) { int width, height, prompt_response; g_object_ref (pixbuf); - + height = gdk_pixbuf_get_height (pixbuf); width = gdk_pixbuf_get_width (pixbuf); if ((height > 96 || width > 96)) { - + prompt_response = e_error_run (GTK_WINDOW (editor->app), "addressbook:prompt-resize", NULL); if (prompt_response == GTK_RESPONSE_YES){ @@ -2292,7 +2292,7 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) width = width *96 / height; height = 96; } - + new = gdk_pixbuf_scale_simple (pixbuf, width, height, GDK_INTERP_BILINEAR); if (new) { GdkPixbufFormat *format = gdk_pixbuf_loader_get_format (loader); @@ -2317,11 +2317,11 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) } editor->image_changed = FALSE; g_object_unref (loader); - + e_contact_set (contact, field_id, &photo); - + g_free (photo.data.inlined.data); - + } else { editor->image_changed = FALSE; @@ -2331,7 +2331,7 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) } else if (GTK_IS_TOGGLE_BUTTON (widget)) { gboolean val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)); - + e_contact_set (contact, field_id, val?(void *)1:NULL); } else { @@ -2593,7 +2593,7 @@ full_name_response (GtkDialog *dialog, int response, EContactEditor *editor) int style = 0; gboolean editable = FALSE; - g_object_get (dialog, + g_object_get (dialog, "editable", &editable, NULL); @@ -2637,8 +2637,8 @@ full_name_clicked (GtkWidget *button, EContactEditor *editor) { GtkDialog *dialog = GTK_DIALOG (e_contact_editor_fullname_new (editor->name)); gboolean fullname_supported; - - + + fullname_supported = is_field_supported (editor, E_CONTACT_FULL_NAME); g_object_set (dialog, @@ -2647,7 +2647,7 @@ full_name_clicked (GtkWidget *button, EContactEditor *editor) g_signal_connect(dialog, "response", G_CALLBACK (full_name_response), editor); - + /* Close the fullname dialog if the editor is closed */ g_signal_connect_swapped (EAB_EDITOR (editor), "editor_closed", G_CALLBACK (full_name_editor_delete_event_cb), GTK_WIDGET (dialog)); @@ -2661,7 +2661,7 @@ categories_response (GtkDialog *dialog, int response, EContactEditor *editor) { const char *categories; GtkWidget *entry = glade_xml_get_widget(editor->gui, "entry-categories"); - + if (response == GTK_RESPONSE_OK) { categories = e_categories_dialog_get_categories (E_CATEGORIES_DIALOG (dialog)); if (entry && GTK_IS_ENTRY(entry)) @@ -2704,14 +2704,14 @@ categories_clicked (GtkWidget *button, EContactEditor *editor) g_free (categories); return; } - + g_signal_connect(dialog, "response", G_CALLBACK (categories_response), editor); - + /* Close the category dialog if the editor is closed*/ g_signal_connect_swapped (EAB_EDITOR (editor), "editor_closed", G_CALLBACK (categories_editor_delete_event_cb), GTK_WIDGET (dialog)); - + gtk_widget_show(GTK_WIDGET(dialog)); g_free (categories); @@ -2789,7 +2789,7 @@ update_preview_cb (GtkFileChooser *file_chooser, gpointer data) gtk_file_chooser_set_preview_widget_active (file_chooser, TRUE); preview = GTK_WIDGET (data); filename = gtk_file_chooser_get_preview_filename (file_chooser); - if (filename == NULL) + if (filename == NULL) return; pixbuf = gdk_pixbuf_new_from_file_at_size (filename, 128, 128, NULL); @@ -2984,7 +2984,7 @@ save_contact (EContactEditor *ce, gboolean should_close) if (!ce->target_book) return; - + if (ce->target_editable && !e_book_is_writable (ce->source_book)) { if (e_error_run (GTK_WINDOW (ce->app), "addressbook:prompt-move", NULL) == GTK_RESPONSE_NO) @@ -2999,14 +2999,14 @@ save_contact (EContactEditor *ce, gboolean should_close) company_name_string = gtk_entry_get_text (GTK_ENTRY (company_name)); if (strcmp (company_name_string , "")) { - if (!strcmp (name_entry_string, "")) + if (!strcmp (name_entry_string, "")) gtk_entry_set_text (GTK_ENTRY (entry_fullname), company_name_string); if (!strcmp (file_as_entry_string, "")) gtk_entry_set_text (GTK_ENTRY (entry_file_as), company_name_string); } extract_all (ce); - + if (!e_contact_editor_is_valid (EAB_EDITOR (ce))) { uid = e_contact_get (ce->contact, E_CONTACT_UID); g_object_unref (ce->contact); @@ -3017,7 +3017,7 @@ save_contact (EContactEditor *ce, gboolean should_close) } return; } - + real_save_contact (ce, should_close); } @@ -3060,11 +3060,11 @@ static const EContactField non_string_fields [] = { E_CONTACT_CATEGORY_LIST, E_CONTACT_BIRTH_DATE, E_CONTACT_ANNIVERSARY - - + + }; -static gboolean +static gboolean is_non_string_field (EContactField id) { int count = sizeof (non_string_fields) / sizeof (EContactField); @@ -3075,7 +3075,7 @@ is_non_string_field (EContactField id) return FALSE; } - + /* insert checks here (date format, for instance, etc.) */ static gboolean @@ -3108,7 +3108,7 @@ e_contact_editor_is_valid (EABEditor *editor) e_iterator_prev (iter)) { const char *field_name = e_iterator_get (iter); EContactField field_id = e_contact_field_id (field_name); - + if (is_non_string_field (field_id)) { if (e_contact_get_const (ce->contact, field_id) == NULL) { g_string_append_printf (errmsg, _("%s'%s' is empty"), @@ -3117,7 +3117,7 @@ e_contact_editor_is_valid (EABEditor *editor) validation_error = TRUE; break; } - + } else { const char *text = e_contact_get_const (ce->contact, field_id); @@ -3128,12 +3128,12 @@ e_contact_editor_is_valid (EABEditor *editor) validation_error = TRUE; break; } - - + + } } - - + + if (validation_error) { g_string_append (errmsg, "."); e_error_run (GTK_WINDOW (ce->app), "addressbook:generic-error", @@ -3181,7 +3181,7 @@ static gint app_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data) { EContactEditor *ce; - + ce = E_CONTACT_EDITOR (data); /* if we're saving, don't allow the dialog to close */ @@ -3411,7 +3411,7 @@ e_contact_editor_dispose (GObject *object) g_object_unref(e_contact_editor->contact); e_contact_editor->contact = NULL; } - + if (e_contact_editor->source_book) { g_object_unref(e_contact_editor->source_book); e_contact_editor->source_book = NULL; @@ -3534,7 +3534,7 @@ e_contact_editor_set_property (GObject *object, guint prop_id, const GValue *val EContactEditor *editor; editor = E_CONTACT_EDITOR (object); - + switch (prop_id){ case PROP_SOURCE_BOOK: { gboolean writable; @@ -3551,7 +3551,7 @@ e_contact_editor_set_property (GObject *object, guint prop_id, const GValue *val editor->source_book = source_book; g_object_ref (editor->source_book); - + if (!editor->target_book) { editor->target_book = editor->source_book; g_object_ref (editor->target_book); @@ -3672,7 +3672,7 @@ e_contact_editor_set_property (GObject *object, guint prop_id, const GValue *val editor->required_fields = g_value_get_object (value); if (editor->required_fields) g_object_ref (editor->required_fields); - else + else editor->required_fields = e_list_new (NULL, NULL, NULL); break; default: @@ -3804,7 +3804,7 @@ e_contact_editor_create_web(gchar *name, if (a11y != NULL) { atk_object_set_name (a11y, string1); } - + gtk_widget_show (widget); return widget; } diff --git a/addressbook/gui/contact-editor/e-contact-editor.h b/addressbook/gui/contact-editor/e-contact-editor.h index c93d57301f..10dd305347 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.h +++ b/addressbook/gui/contact-editor/e-contact-editor.h @@ -57,7 +57,7 @@ typedef struct _EContactEditorClass EContactEditorClass; struct _EContactEditor { EABEditor object; - + /* item specific fields */ EBook *source_book; EBook *target_book; @@ -65,7 +65,7 @@ struct _EContactEditor /* UI handler */ BonoboUIComponent *uic; - + GladeXML *gui; GtkWidget *app; @@ -92,7 +92,7 @@ struct _EContactEditor guint image_changed : 1; EList *writable_fields; - + EList *required_fields; /* ID for async load_source call */ diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.c b/addressbook/gui/contact-editor/e-contact-quick-add.c index 1fc68734f0..5a89dea03d 100644 --- a/addressbook/gui/contact-editor/e-contact-quick-add.c +++ b/addressbook/gui/contact-editor/e-contact-quick-add.c @@ -12,12 +12,12 @@ * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public * License as published by the Free Software Foundation. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 @@ -133,7 +133,7 @@ merge_cb (EBook *book, EBookStatus status, gpointer closure) if (qa->cb) qa->cb (NULL, qa->closure); } - + quick_add_unref (qa); } @@ -157,7 +157,7 @@ contact_added_cb (EContactEditor *ce, EBookStatus status, EContact *contact, gpo if (qa->cb) qa->cb (qa->contact, qa->closure); - + /* We don't need to unref qa because we set_data_full below */ g_object_set_data (G_OBJECT (ce), "quick_add", NULL); } @@ -257,7 +257,7 @@ clicked_cb (GtkWidget *w, gint button, gpointer closure) quick_add_merge_contact (qa); } else if (button == QUICK_ADD_RESPONSE_EDIT_FULL) { - + /* EDIT FULL */ edit_contact (qa); @@ -304,9 +304,9 @@ build_quick_add_dialog (QuickAdd *qa) NULL); gtk_widget_ensure_style (dialog); - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), + gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), 0); - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), + gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 12); g_signal_connect (dialog, "response", G_CALLBACK (clicked_cb), qa); @@ -337,8 +337,8 @@ build_quick_add_dialog (QuickAdd *qa) g_signal_connect ( qa->option_menu, "changed", G_CALLBACK (source_changed), qa); - - g_object_unref (source_list); + + g_object_unref (source_list); table = GTK_TABLE (gtk_table_new (3, 2, FALSE)); gtk_table_set_row_spacings (table, 6); @@ -377,13 +377,13 @@ build_quick_add_dialog (QuickAdd *qa) 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, 0, xpad, ypad); - gtk_container_set_border_width (GTK_CONTAINER (table), + gtk_container_set_border_width (GTK_CONTAINER (table), 12); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), GTK_WIDGET (table), FALSE, FALSE, 0); gtk_widget_show_all (GTK_WIDGET (table)); - + return dialog; } @@ -452,13 +452,13 @@ e_contact_quick_add_free_form (const gchar *text, EContactQuickAddCallback cb, g in_quote = !in_quote; } - + if (last_at == NULL) { /* No at sign, so we treat it all as the name */ name = g_strdup (text); } else { gboolean bad_char = FALSE; - + /* walk backwards to whitespace or a < or a quote... */ while (last_at >= text && !bad_char && !(isspace ((gint) *last_at) || *last_at == '<' || *last_at == '"')) { @@ -482,9 +482,9 @@ e_contact_quick_add_free_form (const gchar *text, EContactQuickAddCallback cb, g } /* If all else has failed, make it the name. */ - if (name == NULL && email == NULL) + if (name == NULL && email == NULL) name = g_strdup (text); - + /* Clean up email, remove bracketing <>s */ @@ -502,7 +502,7 @@ e_contact_quick_add_free_form (const gchar *text, EContactQuickAddCallback cb, g if (changed) g_strstrip (email); } - + e_contact_quick_add (name, email, cb, closure); g_free (name); diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.h b/addressbook/gui/contact-editor/e-contact-quick-add.h index ebc32ecdb1..cdb539b1b0 100644 --- a/addressbook/gui/contact-editor/e-contact-quick-add.h +++ b/addressbook/gui/contact-editor/e-contact-quick-add.h @@ -12,12 +12,12 @@ * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public * License as published by the Free Software Foundation. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 @@ -31,7 +31,7 @@ typedef void (*EContactQuickAddCallback) (EContact *new_contact, gpointer closure); -void e_contact_quick_add (const gchar *name, const gchar *email, +void e_contact_quick_add (const gchar *name, const gchar *email, EContactQuickAddCallback cb, gpointer closure); void e_contact_quick_add_free_form (const gchar *text, EContactQuickAddCallback cb, gpointer closure); diff --git a/addressbook/gui/contact-editor/eab-editor.c b/addressbook/gui/contact-editor/eab-editor.c index 5c9cd12678..b11c9af657 100644 --- a/addressbook/gui/contact-editor/eab-editor.c +++ b/addressbook/gui/contact-editor/eab-editor.c @@ -233,7 +233,7 @@ gboolean eab_editor_is_valid (EABEditor *editor) { g_return_val_if_fail (EAB_IS_EDITOR (editor), FALSE); - + if (EAB_EDITOR_GET_CLASS(editor)->is_valid) return EAB_EDITOR_GET_CLASS(editor)->is_valid (editor); else @@ -244,17 +244,17 @@ GtkWindow* eab_editor_get_window (EABEditor *editor) { g_return_val_if_fail (EAB_IS_EDITOR (editor), NULL); - + if (EAB_EDITOR_GET_CLASS(editor)->get_window) return EAB_EDITOR_GET_CLASS(editor)->get_window (editor); else return NULL; } /* This function prompts for saving if editor conents are in changed state and - save or discards or cancels(just returns with out doing anything) according to user input. - Editor gets destoryed in case of save and discard case. + save or discards or cancels(just returns with out doing anything) according to user input. + Editor gets destoryed in case of save and discard case. */ - + gboolean eab_editor_prompt_to_save_changes (EABEditor *editor, GtkWindow *window) { @@ -319,13 +319,13 @@ eab_editor_confirm_delete (GtkWindow *parent, gboolean plural, gboolean is_list, if (is_list) { /* contact list(s) */ if (!plural) - msg = g_strdup_printf (_("Are you sure you want\nto delete contact list (%s)?"), + msg = g_strdup_printf (_("Are you sure you want\nto delete contact list (%s)?"), name?name:""); else msg = g_strdup (_("Are you sure you want\nto delete these contact lists?")); } else { - /* contact(s) */ + /* contact(s) */ if (!plural) msg = g_strdup_printf (_("Are you sure you want\nto delete contact (%s)?"), name?name:""); |