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 | |
parent | 7e8f8bb9e5167b0219b48ab3e8062080d3740b0a (diff) | |
download | gsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.tar.gz 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')
48 files changed, 559 insertions, 559 deletions
diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c index a010fafafb..57de2505c4 100644 --- a/addressbook/gui/component/addressbook-component.c +++ b/addressbook/gui/component/addressbook-component.c @@ -101,7 +101,7 @@ ensure_sources (AddressbookComponent *component) group = E_SOURCE_GROUP (g->data); - /* compare only file:// part. If user home dir name changes we do not want to create + /* compare only file:// part. If user home dir name changes we do not want to create one more group */ if (!on_this_computer && !strncmp (base_uri_proto, e_source_group_peek_base_uri (group), 7)) @@ -132,7 +132,7 @@ ensure_sources (AddressbookComponent *component) homedir name changes */ if (strcmp (base_uri_proto, e_source_group_peek_base_uri (on_this_computer))) { e_source_group_set_base_uri (on_this_computer, base_uri_proto); - + /* *sigh* . We shouldn't need this sync call here as set_base_uri call results in synching to gconf, but that happens in idle loop and too late to prevent user seeing "Can not Open ... because of invalid uri" error.*/ @@ -176,7 +176,7 @@ view_destroyed_cb (gpointer data, GObject *where_the_object_was) AddressbookComponent *addressbook_component = data; AddressbookComponentPrivate *priv; GList *l; - + priv = addressbook_component->priv; for (l = priv->views; l; l = l->next) { @@ -285,7 +285,7 @@ impl_requestCreateItem (PortableServer_Servant servant, CORBA_Environment *ev) { EBook *book; - GConfClient *gconf_client; + GConfClient *gconf_client; ESourceList *source_list; char *uid; @@ -345,9 +345,9 @@ impl_handleURI (PortableServer_Servant servant, l = g_list_last (priv->views); if (!l) return; - + view = l->data; - + if (!strncmp (uri, "contacts:", 9)) { EUri *euri = e_uri_new (uri); const char *p; @@ -358,17 +358,17 @@ impl_handleURI (PortableServer_Servant servant, if (p) { while (*p) { len = strcspn (p, "=&"); - + /* If it's malformed, give up. */ if (p[len] != '=') break; - + header = (char *) p; header[len] = '\0'; p += len + 1; - + clen = strcspn (p, "&"); - + content = g_strndup (p, clen); if (!g_ascii_strcasecmp (header, "source-uid")) { @@ -386,15 +386,15 @@ impl_handleURI (PortableServer_Servant servant, p += 4; } } - + addressbook_view_edit_contact (view, src_uid, contact_uid); - + g_free (src_uid); g_free (contact_uid); } e_uri_free (euri); } - + } static void diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c index c40a32ce0a..2f8b63b76c 100644 --- a/addressbook/gui/component/addressbook-config.c +++ b/addressbook/gui/component/addressbook-config.c @@ -110,7 +110,7 @@ struct _AddressbookSourceDialog { /* info page fields */ GtkWidget *host; GtkWidget *auth_optionmenu; - AddressbookLDAPAuthType auth; + AddressbookLDAPAuthType auth; GtkWidget *auth_principal; /* connecting page fields */ @@ -285,7 +285,7 @@ addressbook_ldap_auth (GtkWidget *window, LDAP *ldap) ldap_error = ldap_simple_bind_s (ldap, NULL, NULL); if (LDAP_SUCCESS != ldap_error) e_error_run ((GtkWindow *) window, "addressbook:ldap-auth", NULL); - + return ldap_error; } @@ -305,7 +305,7 @@ addressbook_root_dse_query (AddressbookSourceDialog *dialog, LDAP *ldap, attrs, 0, NULL, NULL, &timeout, LDAP_NO_LIMIT, resp); if (LDAP_SUCCESS != ldap_error) e_error_run (GTK_WINDOW (dialog->window), "addressbook:ldap-search-base", NULL); - + return ldap_error; } @@ -530,7 +530,7 @@ eabc_general_type(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, str label = gtk_label_new_with_mnemonic(_("_Type:")); gtk_box_pack_start((GtkBox *)w, label, FALSE, FALSE, 0); - dropdown = (GtkComboBox *)gtk_combo_box_new(); + dropdown = (GtkComboBox *)gtk_combo_box_new(); cell = gtk_cell_renderer_text_new(); store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER); i = 0; @@ -567,14 +567,14 @@ name_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) e_source_set_name (sdialog->source, gtk_entry_get_text (GTK_ENTRY (sdialog->display_name))); } -static void +static void offline_status_changed_cb (GtkWidget *widget, AddressbookSourceDialog *sdialog) { if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) e_source_set_property (sdialog->source, "offline_sync", "1"); - else - e_source_set_property (sdialog->source, "offline_sync", "0"); - + else + e_source_set_property (sdialog->source, "offline_sync", "0"); + } static GtkWidget * @@ -609,7 +609,7 @@ eabc_general_name(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, str gtk_widget_set_sensitive (GTK_WIDGET(sdialog->display_name), FALSE); } } - + g_object_unref(gui); return w; @@ -623,17 +623,17 @@ eabc_general_offline(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, GtkWidget *offline_setting; const char *offline_sync; gboolean is_local_book; - + is_local_book = g_str_has_prefix (e_source_group_peek_base_uri (sdialog->source_group), "file:"); offline_sync = e_source_get_property (sdialog->source, "offline_sync"); - if (old) + if (old) return old; else { offline_setting = gtk_check_button_new_with_label (N_("Copy book content locally for offline operation")); gtk_widget_show (offline_setting); gtk_container_add (GTK_CONTAINER (parent), offline_setting); g_signal_connect (offline_setting, "toggled", G_CALLBACK (offline_status_changed_cb), sdialog); - + } gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (offline_setting), (offline_sync && g_str_equal (offline_sync, "1")) ? TRUE : FALSE); if (is_local_book) @@ -644,12 +644,12 @@ eabc_general_offline(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, #ifdef HAVE_LDAP static gchar * -form_ldap_search_filter (GtkWidget *w) +form_ldap_search_filter (GtkWidget *w) { gchar *filter; const gchar *search_filter = gtk_entry_get_text ((GtkEntry *) w); - /* this function can be used to format the search filter entered */ + /* this function can be used to format the search filter entered */ if ((strlen (search_filter) !=0) && *search_filter != '(' && *(search_filter + (strlen (search_filter-1))) != ')') filter = g_strdup_printf ("(%s)", search_filter); else @@ -657,7 +657,7 @@ form_ldap_search_filter (GtkWidget *w) return filter; } - + static void url_changed(AddressbookSourceDialog *sdialog) { @@ -737,7 +737,7 @@ eabc_general_host(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, str gtk_entry_set_text((GtkEntry *)sdialog->host, lud && lud->lud_host ? lud->lud_host : ""); g_signal_connect (sdialog->host, "changed", G_CALLBACK (host_changed_cb), sdialog); - sdialog->port_combo = glade_xml_get_widget (gui, "port-combo"); + sdialog->port_combo = glade_xml_get_widget (gui, "port-combo"); sprintf(port, "%u", lud && lud->lud_port? lud->lud_port : LDAP_PORT); gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (sdialog->port_combo)->entry), port); g_signal_connect (GTK_COMBO(sdialog->port_combo)->entry, "changed", G_CALLBACK (port_entry_changed_cb), sdialog); @@ -813,7 +813,7 @@ eabc_general_auth(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, str sdialog->auth_optionmenu = glade_xml_get_widget (gui, "auth-optionmenu"); tmp = e_source_get_property(sdialog->source, "auth"); sdialog->auth = tmp ? ldap_parse_auth(tmp) : ADDRESSBOOK_LDAP_AUTH_NONE; - gtk_option_menu_set_history (GTK_OPTION_MENU(sdialog->auth_optionmenu), sdialog->auth); + gtk_option_menu_set_history (GTK_OPTION_MENU(sdialog->auth_optionmenu), sdialog->auth); g_signal_connect(sdialog->auth_optionmenu, "changed", G_CALLBACK(auth_optionmenu_changed_cb), sdialog); sdialog->auth_principal = glade_xml_get_widget (gui, "auth-entry"); diff --git a/addressbook/gui/component/addressbook-migrate.c b/addressbook/gui/component/addressbook-migrate.c index 249cdf7a12..1974ada536 100644 --- a/addressbook/gui/component/addressbook-migrate.c +++ b/addressbook/gui/component/addressbook-migrate.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* +/* * Copyright (C) 2004, Novell, Inc. * * This program is free software; you can redistribute it and/or @@ -73,28 +73,28 @@ setup_progress_dialog (MigrationContext *context) gtk_window_set_title (GTK_WINDOW (context->window), _("Migrating...")); gtk_window_set_modal (GTK_WINDOW (context->window), TRUE); gtk_container_set_border_width (GTK_CONTAINER (context->window), 6); - + vbox = gtk_vbox_new (FALSE, 6); gtk_widget_show (vbox); gtk_container_add (GTK_CONTAINER (context->window), vbox); - + context->label = gtk_label_new (""); gtk_label_set_line_wrap (GTK_LABEL (context->label), TRUE); gtk_widget_show (context->label); gtk_box_pack_start_defaults (GTK_BOX (vbox), context->label); - + hbox = gtk_hbox_new (FALSE, 6); gtk_widget_show (hbox); gtk_box_pack_start_defaults (GTK_BOX (vbox), hbox); - + context->folder_label = gtk_label_new (""); gtk_widget_show (context->folder_label); gtk_box_pack_start_defaults (GTK_BOX (hbox), context->folder_label); - + context->progress = gtk_progress_bar_new (); gtk_widget_show (context->progress); gtk_box_pack_start_defaults (GTK_BOX (hbox), context->progress); - + gtk_widget_show (context->window); } @@ -121,13 +121,13 @@ static void dialog_set_folder_name (MigrationContext *context, const char *folder_name) { char *text; - + text = g_strdup_printf (_("Migrating `%s':"), folder_name); gtk_label_set_text (GTK_LABEL (context->folder_label), text); g_free (text); - + gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (context->progress), 0.0); - + while (gtk_events_pending ()) gtk_main_iteration (); @@ -140,12 +140,12 @@ static void dialog_set_progress (MigrationContext *context, double percent) { char text[5]; - + snprintf (text, sizeof (text), "%d%%", (int) (percent * 100.0f)); - + gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (context->progress), percent); gtk_progress_bar_set_text (GTK_PROGRESS_BAR (context->progress), text); - + while (gtk_events_pending ()) gtk_main_iteration (); @@ -229,7 +229,7 @@ migrate_contacts (MigrationContext *context, EBook *old_book, EBook *new_book) /* both books are loaded, start the actual migration */ e_book_get_contacts (old_book, query, &contacts, NULL); - e_book_query_unref (query); + e_book_query_unref (query); num_contacts = g_list_length (contacts); for (l = contacts; l; l = l->next) { @@ -334,7 +334,7 @@ migrate_contacts (MigrationContext *context, EBook *old_book, EBook *new_book) params = e_vcard_attribute_get_params (a); if (!params) e_vcard_attribute_add_param_with_value (a, - e_vcard_attribute_param_new (EVC_TYPE), + e_vcard_attribute_param_new (EVC_TYPE), "OTHER"); if (v && v->data) { @@ -973,7 +973,7 @@ migrate_company_phone_for_local_folders (MigrationContext *context, ESourceGroup } attr = next_attr; - + if (converted) break; } @@ -1004,10 +1004,10 @@ migrate_pilot_data (const char *old_path, const char *new_path) const char *ext; char *filename; GDir *dir; - + if (!(dir = g_dir_open (old_path, 0, NULL))) return; - + while ((dent = g_dir_read_name (dir))) { if ((!strncmp (dent, "pilot-map-", 10) && ((ext = strrchr (dent, '.')) && !strcmp (ext, ".xml"))) || @@ -1018,13 +1018,13 @@ migrate_pilot_data (const char *old_path, const char *new_path) size_t nread, nwritten; int fd0, fd1; ssize_t n; - + filename = g_build_filename (old_path, dent, NULL); if ((fd0 = g_open (filename, O_RDONLY | O_BINARY, 0)) == -1) { g_free (filename); continue; } - + g_free (filename); filename = g_build_filename (new_path, dent, NULL); if ((fd1 = g_open (filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0666)) == -1) { @@ -1032,30 +1032,30 @@ migrate_pilot_data (const char *old_path, const char *new_path) close (fd0); continue; } - + do { do { n = read (fd0, inbuf, sizeof (inbuf)); } while (n == -1 && errno == EINTR); - + if (n < 1) break; - + nread = n; nwritten = 0; do { do { n = write (fd1, inbuf + nwritten, nread - nwritten); } while (n == -1 && errno == EINTR); - + if (n > 0) nwritten += n; } while (nwritten < nread && n != -1); - + if (n == -1) break; } while (1); - + if (n != -1) n = fsync (fd1); @@ -1063,13 +1063,13 @@ migrate_pilot_data (const char *old_path, const char *new_path) g_warning ("Failed to migrate %s: %s", dent, strerror (errno)); g_unlink (filename); } - + close (fd0); close (fd1); g_free (filename); } } - + g_dir_close (dir); } @@ -1077,7 +1077,7 @@ static MigrationContext* migration_context_new (AddressbookComponent *component) { MigrationContext *context = g_new (MigrationContext, 1); - + /* set up the mapping from old uris to new uids */ context->folder_uid_map = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify)g_free, (GDestroyNotify)g_free); @@ -1122,12 +1122,12 @@ addressbook_migrate (AddressbookComponent *component, int major, int minor, int further decomposition will happen below. */ && (minor < 5 || (minor == 5 && revision <= 10))) need_dialog = TRUE; - + if (need_dialog) setup_progress_dialog (context); if (major == 1) { - + if (minor < 5 || (minor == 5 && revision <= 2)) { /* initialize our dialog */ dialog_set_label (context, @@ -1160,13 +1160,13 @@ addressbook_migrate (AddressbookComponent *component, int major, int minor, int migrate_company_phone_for_local_folders (context, on_this_computer); } - + if (minor < 5 || (minor == 5 && revision <= 10)) { char *old_path, *new_path; - + dialog_set_label (context, _("Evolution's Palm Sync changelog and map files have changed.\n\n" "Please be patient while Evolution migrates your Pilot Sync data...")); - + old_path = g_build_filename (g_get_home_dir (), "evolution", "local", "Contacts", NULL); new_path = g_build_filename (addressbook_component_peek_base_directory (component), "addressbook", "local", "system", NULL); @@ -1204,7 +1204,7 @@ addressbook_migrate (AddressbookComponent *component, int major, int minor, int g_object_unref (on_ldap_servers); if (personal_source) g_object_unref (personal_source); - + migration_context_free (context); diff --git a/addressbook/gui/component/addressbook-migrate.h b/addressbook/gui/component/addressbook-migrate.h index 07d261a205..0ec738399f 100644 --- a/addressbook/gui/component/addressbook-migrate.h +++ b/addressbook/gui/component/addressbook-migrate.h @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* +/* * Copyright (C) 2004, Novell, Inc. * * This program is free software; you can redistribute it and/or diff --git a/addressbook/gui/component/addressbook-view.c b/addressbook/gui/component/addressbook-view.c index 8fcf39cc29..75c3f2f221 100644 --- a/addressbook/gui/component/addressbook-view.c +++ b/addressbook/gui/component/addressbook-view.c @@ -155,11 +155,11 @@ save_all_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path) { AddressbookView *view = (AddressbookView *) user_data; EABView *v = get_current_view (view); - + if (v) eab_view_save_as (v, TRUE); } - + static void save_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path) { @@ -274,7 +274,7 @@ copy_all_contacts_to_cb (BonoboUIComponent *uih, void *user_data, const char *pa AddressbookView *view = (AddressbookView *) user_data; EABView *v = get_current_view (view); - if (v) + if (v) eab_view_copy_to_folder (v, TRUE); } @@ -292,7 +292,7 @@ move_all_contacts_to_cb (BonoboUIComponent *uih, void *user_data, const char *pa { AddressbookView *view = (AddressbookView *) user_data; EABView *v = get_current_view (view); - if (v) + if (v) eab_view_move_to_folder (v, TRUE); } @@ -335,11 +335,11 @@ delete_addressbook_folder (AddressbookView *view) GtkWindow *toplevel; selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->selector)); - if (!selected_source) + if (!selected_source) return; toplevel = (GtkWindow *) gtk_widget_get_toplevel (priv->notebook); - if (e_error_run (toplevel, "addressbook:ask-delete-addressbook", + if (e_error_run (toplevel, "addressbook:ask-delete-addressbook", e_source_peek_name(selected_source)) != GTK_RESPONSE_YES) return; @@ -351,9 +351,9 @@ delete_addressbook_folder (AddressbookView *view) selected_source)) e_source_selector_unselect_source (E_SOURCE_SELECTOR (priv->selector), selected_source); - + e_source_group_remove_source (e_source_peek_group (selected_source), selected_source); - + e_source_list_sync (priv->source_list, NULL); } else { @@ -408,7 +408,7 @@ edit_addressbook_folder (AddressbookView *view) } gtk_window_present (GTK_WINDOW (closure->editor)); - + } static void @@ -425,10 +425,10 @@ rename_addressbook_folder (AddressbookView *view) { AddressbookViewPrivate *priv = view->priv; ESource *source; - const char *old_name; + const char *old_name; char *prompt, *new_name; gboolean done = FALSE; - + source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->selector)); old_name = e_source_peek_name(source); prompt = g_strdup_printf (_("Rename the \"%s\" folder to:"), old_name); @@ -449,7 +449,7 @@ rename_addressbook_folder (AddressbookView *view) } } g_free (new_name); - + } static void @@ -466,7 +466,7 @@ folder_can_delete (AddressbookView *view) AddressbookViewPrivate *priv = view->priv; ESource *source ; const char *source_uri; - + source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->selector)); if(source) { source_uri = e_source_peek_relative_uri (source); @@ -622,7 +622,7 @@ static EPixmap pixmaps [] = { E_PIXMAP ("/commands/ContactsPrint", "document-print", E_ICON_SIZE_MENU), E_PIXMAP ("/commands/ContactsPrintPreview", "document-print-preview", E_ICON_SIZE_MENU), E_PIXMAP ("/commands/ContactsSaveAsVCard", "document-save-as", E_ICON_SIZE_MENU), - E_PIXMAP ("/commands/ContactsSendContactToOther", "mail-forward", E_ICON_SIZE_MENU), + E_PIXMAP ("/commands/ContactsSendContactToOther", "mail-forward", E_ICON_SIZE_MENU), E_PIXMAP ("/commands/ContactsSendMessageToContact", "mail-message-new", E_ICON_SIZE_MENU), E_PIXMAP ("/commands/FolderCopy", "edit-copy", E_ICON_SIZE_MENU), E_PIXMAP ("/commands/FolderDelete", "edit-delete", E_ICON_SIZE_MENU), @@ -651,7 +651,7 @@ control_activate (BonoboControl *control, bonobo_ui_component_add_verb_list_with_data ( uic, verbs, view); - + bonobo_ui_component_freeze (uic, NULL); xmlfile = g_build_filename (EVOLUTION_UIDIR, @@ -676,8 +676,8 @@ control_activate (BonoboControl *control, } static void -control_activate_cb (BonoboControl *control, - gboolean activate, +control_activate_cb (BonoboControl *control, + gboolean activate, AddressbookView *view) { BonoboUIComponent *uic; @@ -770,7 +770,7 @@ load_uri_for_selection (ESourceSelector *selector, ESource *selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (selector)); ESource *primary = get_primary_source (view); - if (selected_source != NULL && + if (selected_source != NULL && ((primary && (!g_str_equal (e_source_peek_uid (primary),e_source_peek_uid (selected_source) )))||force)) activate_source (view, selected_source); } @@ -779,17 +779,17 @@ static ESource * find_first_source (ESourceList *source_list) { GSList *groups, *sources, *l, *m; - + groups = e_source_list_peek_groups (source_list); for (l = groups; l; l = l->next) { ESourceGroup *group = l->data; - + sources = e_source_group_peek_sources (group); for (m = sources; m; m = m->next) { ESource *source = m->data; return source; - } + } } return NULL; @@ -869,7 +869,7 @@ book_removed (EBook *book, EBookStatus status, gpointer data) source)) e_source_selector_unselect_source (E_SOURCE_SELECTOR (priv->selector), source); - + e_source_group_remove_source (e_source_peek_group (source), source); e_source_list_sync (priv->source_list, NULL); @@ -928,7 +928,7 @@ save_addressbook_cb(EPopup *ep, EPopupItem *pitem, void *data) { AddressbookView *view = data; EABView *v = get_current_view (view); - if (v) + if (v) eab_view_save_as (v, TRUE); } @@ -998,11 +998,11 @@ popup_event_callback(ESourceSelector *selector, ESource *source, GdkEventButton } static gboolean -selector_tree_drag_drop (GtkWidget *widget, - GdkDragContext *context, - int x, - int y, - guint time, +selector_tree_drag_drop (GtkWidget *widget, + GdkDragContext *context, + int x, + int y, + guint time, AddressbookView *view) { GtkTreeViewColumn *column; @@ -1012,10 +1012,10 @@ selector_tree_drag_drop (GtkWidget *widget, GtkTreeModel *model; GtkTreeIter iter; gpointer data; - + if (!gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (widget), x, y, &path, &column, &cell_x, &cell_y)) return FALSE; - + model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget)); if (!gtk_tree_model_get_iter (model, &iter, path)) { @@ -1024,17 +1024,17 @@ selector_tree_drag_drop (GtkWidget *widget, } gtk_tree_model_get (model, &iter, 0, &data, -1); - + if (E_IS_SOURCE_GROUP (data)) { g_object_unref (data); gtk_tree_path_free (path); return FALSE; } - + gtk_tree_path_free (path); return TRUE; } - + static gboolean selector_tree_drag_motion (GtkWidget *widget, GdkDragContext *context, @@ -1047,21 +1047,21 @@ selector_tree_drag_motion (GtkWidget *widget, GtkTreeModel *model; GtkTreeIter iter; GdkDragAction action = { 0, }; - + if (!gtk_tree_view_get_dest_row_at_pos (GTK_TREE_VIEW (widget), x, y, &path, &pos)) goto finish; - + model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget)); - + if (!gtk_tree_model_get_iter (model, &iter, path)) goto finish; - + gtk_tree_model_get (model, &iter, 0, &data, -1); if (E_IS_SOURCE_GROUP (data) || e_source_get_readonly (data)) goto finish; - + gtk_tree_view_set_drag_dest_row(GTK_TREE_VIEW (widget), path, GTK_TREE_VIEW_DROP_INTO_OR_BEFORE); /* Make default action move, not copy */ if (context->actions & GDK_ACTION_MOVE) @@ -1074,7 +1074,7 @@ selector_tree_drag_motion (GtkWidget *widget, gtk_tree_path_free (path); if (data) g_object_unref (data); - + gdk_drag_status (context, action, GDK_CURRENT_TIME); return TRUE; } @@ -1152,11 +1152,11 @@ merged_contact_cb (EBook *book, EBookStatus status, const char *id, gpointer clo } } -static gboolean -selector_tree_drag_data_received (GtkWidget *widget, - GdkDragContext *context, - gint x, - gint y, +static gboolean +selector_tree_drag_data_received (GtkWidget *widget, + GdkDragContext *context, + gint x, + gint y, GtkSelectionData *data, guint info, guint time, @@ -1177,17 +1177,17 @@ selector_tree_drag_data_received (GtkWidget *widget, if (!gtk_tree_view_get_dest_row_at_pos (GTK_TREE_VIEW (widget), x, y, &path, &pos)) goto finish; - + model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget)); - + if (!gtk_tree_model_get_iter (model, &iter, path)) goto finish; - + gtk_tree_model_get (model, &iter, 0, &target, -1); if (E_IS_SOURCE_GROUP (target) || e_source_get_readonly (target)) goto finish; - + target_book = e_book_new (target, NULL); if (!target_book) { g_message (G_STRLOC ":Couldn't create EBook."); @@ -1223,11 +1223,11 @@ selector_tree_drag_data_received (GtkWidget *widget, gtk_tree_path_free (path); if (target) g_object_unref (target); - + gtk_drag_finish (context, success, merge_context->remove_from_source, time); return TRUE; -} +} static void selector_tree_drag_leave (GtkWidget *widget, GdkDragContext *context, guint time, gpointer data) @@ -1277,12 +1277,12 @@ addressbook_view_class_init (AddressbookViewClass *klass) parent_class = g_type_class_peek_parent (klass); } -static gboolean +static gboolean source_selector_key_press_event_callback (GtkWidget *widget, GdkEventKey *event, AddressbookView *view) { if (event->keyval == GDK_Delete) { delete_addressbook_folder (view); - return TRUE; + return TRUE; } return FALSE; } @@ -1294,7 +1294,7 @@ addressbook_view_init (AddressbookView *view) GtkWidget *selector_scrolled_window; AtkObject *a11y; - view->priv = + view->priv = priv = g_new0 (AddressbookViewPrivate, 1); priv->gconf_client = addressbook_component_peek_gconf_client (addressbook_component_peek ()); @@ -1365,7 +1365,7 @@ addressbook_view_init (AddressbookView *view) G_CALLBACK (primary_source_selection_changed_callback), G_OBJECT (view), 0); g_signal_connect_after (priv->selector, "key_press_event", - G_CALLBACK (source_selector_key_press_event_callback), + G_CALLBACK (source_selector_key_press_event_callback), G_OBJECT (view)); g_signal_connect_object (priv->selector, "popup_event", G_CALLBACK (popup_event_callback), @@ -1397,7 +1397,7 @@ addressbook_view_dispose (GObject *object) if (view->priv) { if (priv->book) g_object_unref (priv->book); - + g_free(priv->passwd); if (priv->source_list) @@ -1522,7 +1522,7 @@ activate_source (AddressbookView *view, gtk_widget_show (uid_view); gtk_widget_show (label); - + g_object_set (uid_view, "type", EAB_VIEW_TABLE, NULL); gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook), @@ -1619,8 +1619,8 @@ addressbook_view_peek_folder_view (AddressbookView *view) } void -addressbook_view_edit_contact (AddressbookView* view, - const char* source_uid, +addressbook_view_edit_contact (AddressbookView* view, + const char* source_uid, const char* contact_uid) { AddressbookViewPrivate *priv = view->priv; @@ -1628,7 +1628,7 @@ addressbook_view_edit_contact (AddressbookView* view, ESource* source = NULL; EContact* contact = NULL; EBook* book = NULL; - + if (!source_uid || !contact_uid) return; @@ -1637,7 +1637,7 @@ addressbook_view_edit_contact (AddressbookView* view, return; /* FIXME: Can I unref this book? */ - book = e_book_new (source, NULL); + book = e_book_new (source, NULL); if (!book) return; @@ -1647,7 +1647,7 @@ addressbook_view_edit_contact (AddressbookView* view, } e_book_get_contact (book, contact_uid, &contact, NULL); - + if (!contact) { g_object_unref (book); return; diff --git a/addressbook/gui/component/addressbook-view.h b/addressbook/gui/component/addressbook-view.h index 7e66cc7062..168d46fc81 100644 --- a/addressbook/gui/component/addressbook-view.h +++ b/addressbook/gui/component/addressbook-view.h @@ -57,8 +57,8 @@ GtkWidget *addressbook_view_peek_sidebar (AddressbookView *view GtkWidget *addressbook_view_peek_statusbar (AddressbookView *view); BonoboControl *addressbook_view_peek_folder_view (AddressbookView *view); -void addressbook_view_edit_contact (AddressbookView* view, - const char* source_id, +void addressbook_view_edit_contact (AddressbookView* view, + const char* source_id, const char* contact_id); #endif /* _ADDRESSBOOK_VIEW_H_ */ diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index 2134c1a6b1..898ce692d9 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -89,7 +89,7 @@ load_source_auth_cb (EBook *book, EBookStatus status, gpointer closure) GtkWidget *dialog; /* XXX "LDAP" has to be removed from the folowing message - so that it wil valid for other servers which provide + so that it wil valid for other servers which provide anonymous access*/ dialog = gtk_message_dialog_new (NULL, @@ -164,7 +164,7 @@ addressbook_authenticate (EBook *book, gboolean previous_failure, ESource *sourc gchar *uri = remove_parameters_from_uri(e_book_get_uri (book)); const gchar *auth_domain = e_source_get_property (source, "auth-domain"); const gchar *component_name; - + component_name = auth_domain ? auth_domain : "Addressbook"; password = e_passwords_get_password (component_name, uri); @@ -237,14 +237,14 @@ static void auth_required_cb (EBook *book, gpointer data) { LoadSourceData *load_source_data = g_new0(LoadSourceData, 1); - + load_source_data->source = g_object_ref (g_object_ref (e_book_get_source (book))); load_source_data->cancelled = FALSE; addressbook_authenticate (book, FALSE, load_source_data->source, load_source_auth_cb, load_source_data); - - - + + + } static void load_source_cb (EBook *book, EBookStatus status, gpointer closure) @@ -262,7 +262,7 @@ load_source_cb (EBook *book, EBookStatus status, gpointer closure) auth = e_source_get_property (load_source_data->source, "auth"); if (auth && strcmp (auth, "none")) { g_signal_connect (book, "auth_required", G_CALLBACK(auth_required_cb), NULL); - + if (e_book_is_online (book)) { addressbook_authenticate (book, FALSE, load_source_data->source, load_source_auth_cb, closure); diff --git a/addressbook/gui/component/autocompletion-config.c b/addressbook/gui/component/autocompletion-config.c index a5604d4b2d..567139025b 100644 --- a/addressbook/gui/component/autocompletion-config.c +++ b/addressbook/gui/component/autocompletion-config.c @@ -132,7 +132,7 @@ autocompletion_config_control_new (void) GTK_SHADOW_IN); ac->control_widget = e_source_selector_new (ac->source_list); - + gtk_container_add (GTK_CONTAINER (scrolledwin), ac->control_widget); initialize_selection (ac); @@ -144,7 +144,7 @@ autocompletion_config_control_new (void) g_signal_connect (ac->control_widget, "selection_changed", G_CALLBACK (source_selection_changed), ac); - + g_object_weak_ref (G_OBJECT (ac->config_control), config_control_destroy_notify, ac); CORBA_exception_free (&ev); diff --git a/addressbook/gui/component/openldap-extract.h b/addressbook/gui/component/openldap-extract.h index 25c47df653..f11012ec40 100644 --- a/addressbook/gui/component/openldap-extract.h +++ b/addressbook/gui/component/openldap-extract.h @@ -217,7 +217,7 @@ get_token( const char ** sp, char ** token_val ) /* kind = TK_UNEXPCHAR; */ /* break; */ } - + return kind; } @@ -746,7 +746,7 @@ static char *ldap_utf8_strchr( const char *str, const char *chr ) for( ; *str != '\0'; LDAP_UTF8_INCR(str) ) { if( ldap_x_utf8_to_ucs4( str ) == ldap_x_utf8_to_ucs4( chr ) ) { return (char *) str; - } + } } return NULL; @@ -761,7 +761,7 @@ static size_t ldap_utf8_strcspn( const char *str, const char *set ) for( cset = set; *cset != '\0'; LDAP_UTF8_INCR(cset) ) { if( ldap_x_utf8_to_ucs4( cstr ) == ldap_x_utf8_to_ucs4( cset ) ) { return cstr - str; - } + } } } @@ -781,7 +781,7 @@ static size_t ldap_utf8_strspn( const char *str, const char *set ) if( ldap_x_utf8_to_ucs4( cstr ) == ldap_x_utf8_to_ucs4( cset ) ) { break; - } + } } } @@ -951,7 +951,7 @@ ldap_free_urldesc( LDAPURLDesc *ludp ) if ( ludp == NULL ) { return; } - + if ( ludp->lud_scheme != NULL ) { LDAP_FREE( ludp->lud_scheme ); } @@ -1202,7 +1202,7 @@ ldap_url_parse_ext( LDAP_CONST char *url_in, LDAPURLDesc **ludpp ) * anything real. */ if( (p == NULL) && (q != NULL) && ((q = strchr( q, '?')) != NULL)) { - q++; + q++; /* ? immediately followed by question */ if( *q == '?') { q++; 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:""); diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c index 67b92c904a..85a7b507d5 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c @@ -162,28 +162,28 @@ e_contact_list_editor_class_init (EContactListEditorClass *klass) object_class->get_property = e_contact_list_editor_get_property; object_class->dispose = e_contact_list_editor_dispose; - g_object_class_install_property (object_class, PROP_BOOK, + g_object_class_install_property (object_class, PROP_BOOK, g_param_spec_object ("book", _("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_LIST, + g_object_class_install_property (object_class, PROP_IS_NEW_LIST, g_param_spec_boolean ("is_new_list", _("Is New List"), /*_( */"XXX blurb" /*)*/, FALSE, 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" /*)*/, @@ -253,7 +253,7 @@ e_contact_list_editor_init (EContactListEditor *editor) "changed", G_CALLBACK(list_name_changed_cb), editor); g_signal_connect (editor->visible_addrs_checkbutton, "toggled", G_CALLBACK(visible_addrs_toggled_cb), editor); - g_signal_connect (editor->email_entry, + g_signal_connect (editor->email_entry, "key-press-event", G_CALLBACK(email_key_pressed), editor); e_table_drag_dest_set (e_table_scrolled_get_table (E_TABLE_SCROLLED (editor->table)), @@ -270,7 +270,7 @@ e_contact_list_editor_init (EContactListEditor *editor) "clicked", G_CALLBACK(save_and_close_cb), editor); g_signal_connect (editor->cancel_button, "clicked", G_CALLBACK(close_cb), editor); - + g_signal_connect (editor->list_image, "changed", G_CALLBACK(list_image_changed_cb), editor); @@ -425,7 +425,7 @@ save_contact (EContactListEditor *cle, gboolean should_close) if (cle->book) { EditorCloseStruct *ecs = g_new(EditorCloseStruct, 1); - + ecs->cle = cle; g_object_ref (cle); ecs->should_close = should_close; @@ -539,7 +539,7 @@ e_contact_list_editor_set_property (GObject *object, guint prop_id, EContactListEditor *editor; editor = E_CONTACT_LIST_EDITOR (object); - + switch (prop_id){ case PROP_BOOK: { gboolean changed; @@ -574,7 +574,7 @@ e_contact_list_editor_set_property (GObject *object, guint prop_id, gboolean changed = (editor->is_new_list != new_value); editor->is_new_list = new_value; - + if (changed) command_state_changed (editor); break; @@ -664,7 +664,7 @@ e_contact_list_editor_create_table(gchar *name, gchar *string1, gchar *string2, gint int1, gint int2) { - + ETableModel *model; GtkWidget *table; char *etspecfile; @@ -685,8 +685,8 @@ e_contact_list_editor_create_table(gchar *name, return table; } -static gboolean -contact_already_exists (EContactListModel *model, const char *email) +static gboolean +contact_already_exists (EContactListModel *model, const char *email) { int row_count; int row; @@ -840,13 +840,13 @@ e_contact_list_editor_create_name_selector (gchar *name, name_selector_model = e_name_selector_peek_model (name_selector); e_name_selector_model_add_section (name_selector_model, "Members", "Members", NULL); - + name_selector_entry = e_name_selector_peek_section_entry (name_selector, "Members"); e_name_selector_entry_set_contact_editor_func (name_selector_entry, e_contact_editor_new); e_name_selector_entry_set_contact_list_editor_func (name_selector_entry, e_contact_list_editor_new); gtk_widget_show (GTK_WIDGET (name_selector_entry)); - + return (GtkWidget *)name_selector_entry; } @@ -862,7 +862,7 @@ add_email_cb (GtkWidget *w, EContactListEditor *editor) /* Skip to the end of the list */ if (adj->upper - adj->lower > adj->page_size) gtk_adjustment_set_value (adj, adj->upper); - + editor->changed = TRUE; } @@ -877,19 +877,19 @@ email_match_selected (GtkWidget *w, EDestination *destination, EContactListEdito char *email; EDestinationStore *store; GtkAdjustment *adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (editor->table)); - + email = g_strdup(e_destination_get_address (destination)); store = e_name_selector_entry_peek_destination_store ((ENameSelectorEntry *)w); e_destination_store_remove_destination (store, destination); - gtk_entry_set_text (GTK_ENTRY(editor->email_entry), ""); - + gtk_entry_set_text (GTK_ENTRY(editor->email_entry), ""); + if (email && *email) { e_contact_list_model_add_email (E_CONTACT_LIST_MODEL(editor->model), email); /* Skip to the end of the list */ if (adj->upper - adj->lower > adj->page_size) gtk_adjustment_set_value (adj, adj->upper); - + editor->changed = TRUE; } @@ -970,7 +970,7 @@ email_key_pressed (GtkWidget *w, GdkEventKey *event, EContactListEditor *editor) if (event->keyval == GDK_comma || event->keyval == GDK_Return) { ENameSelectorEntry *entry = (ENameSelectorEntry *)w; - + g_signal_emit_by_name (entry, "activate", 0); add_email_cb (w, editor); @@ -1086,14 +1086,14 @@ table_drag_data_received_cb (ETable *table, int row, int col, for (c = contact_list; c; c = c->next) { EContact *contact = c->data; - if (!e_contact_get (contact, E_CONTACT_IS_LIST)) { + if (!e_contact_get (contact, E_CONTACT_IS_LIST)) { if (e_contact_get (contact, E_CONTACT_EMAIL_1)) { if (! contact_already_exists (E_CONTACT_LIST_MODEL (editor->model) , e_contact_get (contact, E_CONTACT_EMAIL_1))) { e_contact_list_model_add_contact (E_CONTACT_LIST_MODEL (editor->model), contact, 0 /* Hard-wired for default e-mail */); - + changed = TRUE; } } @@ -1252,7 +1252,7 @@ fill_in_info(EContactListEditor *editor) if (name) e_destination_set_name (list_dest, name); if (email) e_destination_set_email (list_dest, email); e_destination_set_html_mail_pref (list_dest, html_pref); - + e_contact_list_model_add_destination (E_CONTACT_LIST_MODEL (editor->model), list_dest); } @@ -1265,7 +1265,7 @@ fill_in_info(EContactListEditor *editor) e_contact_photo_free (photo); } } - + if (editor->book) { e_source_combo_box_set_active ( E_SOURCE_COMBO_BOX (editor->source_menu), diff --git a/addressbook/gui/contact-list-editor/e-contact-list-model.c b/addressbook/gui/contact-list-editor/e-contact-list-model.c index d0597e9eea..767e461d87 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-model.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-model.c @@ -208,9 +208,9 @@ e_contact_list_model_add_email (EContactListModel *model, for (row = 0; row < row_count; row++) { list_email = (char *) e_table_model_value_at (E_TABLE_MODEL (model), 1, row); - + if (strcmp (list_email, email) == 0) { - if (e_error_run (NULL, "addressbook:ask-list-add-exists", + if (e_error_run (NULL, "addressbook:ask-list-add-exists", email) != GTK_RESPONSE_YES) return; break; diff --git a/addressbook/gui/merging/eab-contact-compare.c b/addressbook/gui/merging/eab-contact-compare.c index ff6e86eb6d..ae80059eaa 100644 --- a/addressbook/gui/merging/eab-contact-compare.c +++ b/addressbook/gui/merging/eab-contact-compare.c @@ -13,12 +13,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 @@ -91,7 +91,7 @@ name_fragment_match_with_synonyms (const gchar *a, const gchar *b, gboolean stri if (!(a && b && *a && *b)) return FALSE; - if(!e_utf8_casefold_collate (a, b)) + if(!e_utf8_casefold_collate (a, b)) return TRUE; /* Check for nicknames. Yes, the linear search blows. */ @@ -100,7 +100,7 @@ name_fragment_match_with_synonyms (const gchar *a, const gchar *b, gboolean stri if (!e_utf8_casefold_collate (name_synonyms[i][0], a) && !e_utf8_casefold_collate (name_synonyms[i][1], b)) return TRUE; - + if (!e_utf8_casefold_collate (name_synonyms[i][0], b) && !e_utf8_casefold_collate (name_synonyms[i][1], a)) return TRUE; @@ -165,7 +165,7 @@ eab_contact_compare_name_to_string_full (EContact *contact, const gchar *str, gb ++fragment_count; for (i = 0; familyv && familyv[i]; ++i) ++fragment_count; - + for (i = 0; namev[i] && this_part_match != EAB_CONTACT_MATCH_PART_NONE; ++i) { if (*namev[i]) { @@ -194,7 +194,7 @@ eab_contact_compare_name_to_string_full (EContact *contact, const gchar *str, gb if (addv && this_part_match == EAB_CONTACT_MATCH_PART_NONE) { for (j = 0; addv[j]; ++j) { if (name_fragment_match_with_synonyms (addv[j], namev[i], allow_partial_matches)) { - + this_part_match = EAB_CONTACT_MATCH_PART_ADDITIONAL_NAME; g_free (addv[j]); @@ -234,7 +234,7 @@ eab_contact_compare_name_to_string_full (EContact *contact, const gchar *str, gb if (match_count > 0) match_type = EAB_CONTACT_MATCH_VAGUE; - + if (fragment_count == match_count) { match_type = EAB_CONTACT_MATCH_EXACT; @@ -434,8 +434,8 @@ match_email_hostname (const gchar *addr1, const gchar *addr2) --addr2; } if((*addr1 == '@' && *addr2 != '@' ) || (*addr2 == '@' && *addr1 != '@')) - return FALSE; - + return FALSE; + return TRUE; } @@ -446,7 +446,7 @@ compare_email_addresses (const gchar *addr1, const gchar *addr2) addr2 == NULL || *addr2 == 0) return EAB_CONTACT_MATCH_NOT_APPLICABLE; - if (match_email_username (addr1, addr2)) + if (match_email_username (addr1, addr2)) return match_email_hostname (addr1, addr2) ? EAB_CONTACT_MATCH_EXACT : EAB_CONTACT_MATCH_VAGUE; return EAB_CONTACT_MATCH_NONE; @@ -487,7 +487,7 @@ eab_contact_compare_email (EContact *contact1, EContact *contact2) char *addr2 = (char *) i2->data; match = combine_comparisons (match, compare_email_addresses (addr1, addr2)); - + i2 = i2->next; } @@ -666,13 +666,13 @@ use_common_book_cb (EBook *book, gpointer closure) if (contact_name->additional && *contact_name->additional) query_parts[p++] = g_strdup_printf ("(contains \"full_name\" \"%s\")", contact_name->additional); - + if (contact_name->family && *contact_name->family) query_parts[p++] = g_strdup_printf ("(contains \"full_name\" \"%s\")", contact_name->family); e_contact_name_free (contact_name); } - + contact_email = e_contact_get (contact, E_CONTACT_EMAIL); if (contact_email) { GList *iter; @@ -695,8 +695,8 @@ use_common_book_cb (EBook *book, gpointer closure) g_list_foreach (contact_email, (GFunc)g_free, NULL); g_list_free (contact_email); } - - + + /* Build up our full query from the parts. */ query_parts[p] = NULL; qj = g_strjoinv (" ", query_parts); @@ -751,7 +751,7 @@ eab_contact_locate_match (EContact *contact, EABContactMatchQueryCallback cb, gp * @avoid: A list of contacts to not match. These will not show up in the search. * @cb: The function to call. * @closure: The closure to add to the call. - * + * * Look for the best match and return it using the EABContactMatchQueryCallback. **/ void diff --git a/addressbook/gui/merging/eab-contact-compare.h b/addressbook/gui/merging/eab-contact-compare.h index be835539e2..fe3891fab5 100644 --- a/addressbook/gui/merging/eab-contact-compare.h +++ b/addressbook/gui/merging/eab-contact-compare.h @@ -13,12 +13,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 diff --git a/addressbook/gui/merging/eab-contact-merging.c b/addressbook/gui/merging/eab-contact-merging.c index a37f877fd8..2f6955bb0f 100644 --- a/addressbook/gui/merging/eab-contact-merging.c +++ b/addressbook/gui/merging/eab-contact-merging.c @@ -190,7 +190,7 @@ mergeit (EContactMergingLookup *lookup) dialog = (GtkDialog *)(gtk_dialog_new_with_buttons (_("Merge Contact"), NULL, GTK_DIALOG_NO_SEPARATOR, NULL)); gtk_container_border_width (GTK_CONTAINER(dialog), 5); - scrolled_window = gtk_scrolled_window_new (NULL, NULL); + scrolled_window = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); @@ -218,7 +218,7 @@ mergeit (EContactMergingLookup *lookup) if (string && *string) { /*Four email id's present, should be compared with all email id's in duplicate contact */ /*Merge only if number of email id's in existing contact is less than 4 */ - if ((field == E_CONTACT_EMAIL_1 || field == E_CONTACT_EMAIL_2 + if ((field == E_CONTACT_EMAIL_1 || field == E_CONTACT_EMAIL_2 || field == E_CONTACT_EMAIL_3 || field == E_CONTACT_EMAIL_4) && (num_of_email < 4)) { row++; str = (char *)e_contact_get_const (lookup->contact, field); @@ -237,7 +237,7 @@ mergeit (EContactMergingLookup *lookup) continue; case 2: /*New contact has email and it is equal to neither of the 2 emails in the duplicate contact*/ - if((str && *str) && + if((str && *str) && (g_ascii_strcasecmp(str,e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1))) && (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_2),str))) { field = E_CONTACT_EMAIL_3; @@ -247,9 +247,9 @@ mergeit (EContactMergingLookup *lookup) continue; case 3: /*New contact has email and it is equal to none of the 3 emails in the duplicate contact*/ - if((str && *str) && - (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1),str)) && - (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_2),str)) && + if((str && *str) && + (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1),str)) && + (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_2),str)) && (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_3),str))) field = E_CONTACT_EMAIL_4; else @@ -260,11 +260,11 @@ mergeit (EContactMergingLookup *lookup) gtk_box_pack_start (GTK_BOX(hbox), (GtkWidget*)label, FALSE, FALSE, 0); gtk_table_attach_defaults (table, (GtkWidget *)hbox, 0, 1, row, row + 1); - dropdown = gtk_combo_box_new_text(); + dropdown = gtk_combo_box_new_text(); gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), string); data = g_new0 (dropdown_data, 1); - + gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), ""); gtk_combo_box_set_active (GTK_COMBO_BOX (dropdown), 0); @@ -291,26 +291,26 @@ mergeit (EContactMergingLookup *lookup) gtk_box_pack_start (GTK_BOX(hbox), (GtkWidget*)label, FALSE, FALSE, 0); gtk_table_attach_defaults (table, (GtkWidget*)hbox, 1, 2, row, row + 1); continue; - } + } /*for all string fields except name and email*/ if(!(string1 && *string1) || (g_ascii_strcasecmp(string, string1))) { row++; label = gtk_label_new (e_contact_pretty_name(field)); - hbox = gtk_hbox_new (FALSE, 0); + hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX(hbox), (GtkWidget*)label, FALSE, FALSE, 0); - gtk_table_attach_defaults (table, (GtkWidget *)hbox, 0, 1, row, row + 1); + gtk_table_attach_defaults (table, (GtkWidget *)hbox, 0, 1, row, row + 1); data = g_new0 (dropdown_data, 1); - dropdown = gtk_combo_box_new_text(); + dropdown = gtk_combo_box_new_text(); gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), string); e_contact_set (lookup->match, field, string); if (string1 && *string1) gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), string1); - else + else gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), ""); - gtk_combo_box_set_active (GTK_COMBO_BOX (dropdown), 0); + gtk_combo_box_set_active (GTK_COMBO_BOX (dropdown), 0); data->field = field; data->match = lookup->match; @@ -322,20 +322,20 @@ mergeit (EContactMergingLookup *lookup) gtk_box_pack_start (GTK_BOX(hbox), (GtkWidget*)dropdown, FALSE, FALSE, 0); gtk_table_attach_defaults (table, (GtkWidget *)hbox, 1, 2, row, row + 1); gtk_widget_show_all ((GtkWidget *)dropdown); - } + } } } gtk_window_set_default_size (GTK_WINDOW (dialog), 420, 300); gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_window), GTK_WIDGET (table)); - gtk_box_pack_start (GTK_BOX (dialog->vbox), GTK_WIDGET (scrolled_window), TRUE, TRUE, 0); - gtk_widget_show (scrolled_window); - g_signal_connect (dialog, "map-event", G_CALLBACK (dialog_map), table); + gtk_box_pack_start (GTK_BOX (dialog->vbox), GTK_WIDGET (scrolled_window), TRUE, TRUE, 0); + gtk_widget_show (scrolled_window); + g_signal_connect (dialog, "map-event", G_CALLBACK (dialog_map), table); gtk_widget_show_all ((GtkWidget *)table); result = gtk_dialog_run (dialog); switch (result) - { + { case GTK_RESPONSE_OK: lookup->contact = lookup->match; e_book_async_remove_contact (lookup->book, lookup->match, NULL, lookup); @@ -344,7 +344,7 @@ mergeit (EContactMergingLookup *lookup) break; case GTK_RESPONSE_CANCEL: value = 0; - break; + break; } gtk_widget_destroy (GTK_WIDGET (dialog)); g_list_free (email_attr_list); @@ -353,17 +353,17 @@ mergeit (EContactMergingLookup *lookup) static gboolean check_if_same (EContact *contact, EContact *match) -{ +{ EContactField field; GList *email_attr_list; int num_of_email; - char *str = NULL, *string = NULL, *string1 = NULL; + char *str = NULL, *string = NULL, *string1 = NULL; for(field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1) ; field++) { email_attr_list = e_contact_get_attributes (match, E_CONTACT_EMAIL); num_of_email = g_list_length (email_attr_list); - if ((field == E_CONTACT_EMAIL_1 || field == E_CONTACT_EMAIL_2 + if ((field == E_CONTACT_EMAIL_1 || field == E_CONTACT_EMAIL_2 || field == E_CONTACT_EMAIL_3 || field == E_CONTACT_EMAIL_4) && (num_of_email<4)) { str = (char *)e_contact_get_const (contact, field); switch(num_of_email) @@ -374,17 +374,17 @@ check_if_same (EContact *contact, EContact *match) if((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_1),str))) return FALSE; case 2: - if((str && *str) && (g_ascii_strcasecmp(str,e_contact_get_const (match, E_CONTACT_EMAIL_1))) && + if((str && *str) && (g_ascii_strcasecmp(str,e_contact_get_const (match, E_CONTACT_EMAIL_1))) && (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_2),str))) return FALSE; case 3: - if((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_1),str)) && + if((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_1),str)) && (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_2),str)) && (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_3),str))) return FALSE; } } - else { + else { string = (char *)e_contact_get_const (contact, field); string1 = (char *)e_contact_get_const (match, field); if ((string && *string) && (string1 && *string1) && (g_ascii_strcasecmp(string1,string))) diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c index dae9c68745..ae553ad4e6 100644 --- a/addressbook/gui/widgets/e-addressbook-model.c +++ b/addressbook/gui/widgets/e-addressbook-model.c @@ -342,7 +342,7 @@ eab_model_class_init (GObjectClass *object_class) NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); - + eab_model_signals [SEARCH_RESULT] = g_signal_new ("search_result", G_OBJECT_CLASS_TYPE (object_class), @@ -351,7 +351,7 @@ eab_model_class_init (GObjectClass *object_class) NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); - + eab_model_signals [FOLDER_BAR_MESSAGE] = g_signal_new ("folder_bar_message", G_OBJECT_CLASS_TYPE (object_class), @@ -554,7 +554,7 @@ eab_model_set_property (GObject *object, guint prop_id, const GValue *value, GPa gboolean need_get_book_view = FALSE; model = EAB_MODEL (object); - + switch (prop_id){ case PROP_BOOK: if (model->book) { @@ -673,7 +673,7 @@ eab_model_new (void) EABModel *et; et = g_object_new (EAB_TYPE_MODEL, NULL); - + return et; } diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c index 29a9ed35af..06caebedee 100644 --- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c @@ -232,7 +232,7 @@ addressbook_incarnate (EReflowModel *erm, int i, GnomeCanvasGroup *parent) g_signal_connect (item, "drag_begin", G_CALLBACK(adapter_drag_begin), adapter); - + return item; } @@ -264,12 +264,12 @@ remove_contacts (EABModel *model, { GArray *indices = (GArray *) data; int count = indices->len; - + if (count == 1) e_reflow_model_item_removed (E_REFLOW_MODEL (adapter), g_array_index (indices, gint, 0)); - else + else e_reflow_model_changed (E_REFLOW_MODEL (adapter)); - + } static void @@ -378,7 +378,7 @@ e_addressbook_reflow_adapter_class_init (GObjectClass *object_class) object_class->get_property = addressbook_get_property; object_class->dispose = addressbook_dispose; - g_object_class_install_property (object_class, PROP_BOOK, + g_object_class_install_property (object_class, PROP_BOOK, g_param_spec_object ("book", _("Book"), /*_( */"XXX blurb" /*)*/, diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c index 65a82d03c9..b208952245 100644 --- a/addressbook/gui/widgets/e-addressbook-table-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c @@ -152,7 +152,7 @@ addressbook_is_cell_editable (ETableModel *etc, int col, int row) else if (contact && e_contact_get ((EContact *) contact, E_CONTACT_IS_LIST)) /* we only allow editing of the name and file as for lists */ - return col == E_CONTACT_FULL_NAME || col == E_CONTACT_FILE_AS; + return col == E_CONTACT_FULL_NAME || col == E_CONTACT_FILE_AS; else return col < E_CONTACT_LAST_SIMPLE_STRING; #endif @@ -265,10 +265,10 @@ remove_contacts (EABModel *model, { GArray *indices = (GArray *) data; int count = indices->len; - - + + e_table_model_pre_change (E_TABLE_MODEL (adapter)); - if (count == 1) + if (count == 1) e_table_model_rows_deleted (E_TABLE_MODEL (adapter), g_array_index (indices, gint, 0), 1); else e_table_model_changed (E_TABLE_MODEL (adapter)); diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index 483b3b4162..b591389d7c 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* +/* * e-addressbook-view.c * Copyright (C) 2000 Ximian, Inc. * Author: Chris Lahey <clahey@ximian.com> @@ -212,32 +212,32 @@ eab_view_class_init (EABViewClass *klass) object_class->get_property = eab_view_get_property; object_class->dispose = eab_view_dispose; - g_object_class_install_property (object_class, PROP_BOOK, + g_object_class_install_property (object_class, PROP_BOOK, g_param_spec_object ("book", _("Book"), /*_( */"XXX blurb" /*)*/, E_TYPE_BOOK, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_SOURCE, + g_object_class_install_property (object_class, PROP_SOURCE, g_param_spec_object ("source", _("Source"), /*_( */"XXX blurb" /*)*/, E_TYPE_SOURCE, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_QUERY, + g_object_class_install_property (object_class, PROP_QUERY, g_param_spec_string ("query", _("Query"), /*_( */"XXX blurb" /*)*/, NULL, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_TYPE, + g_object_class_install_property (object_class, PROP_TYPE, g_param_spec_int ("type", _("Type"), /*_( */"XXX blurb" /*)*/, - EAB_VIEW_NONE, + EAB_VIEW_NONE, EAB_VIEW_TABLE, EAB_VIEW_NONE, G_PARAM_READWRITE)); @@ -361,7 +361,7 @@ eab_view_dispose (GObject *object) gtk_widget_destroy (eav->invisible); eav->invisible = NULL; } - + /* if (eav->search_context) { g_object_unref (eav->search_context); @@ -450,13 +450,13 @@ eab_view_new (void) rule_context_add_part, rule_context_next_part); rule_context_add_rule_set (eav->search_context, "ruleset", filter_rule_get_type (), rule_context_add_rule, rule_context_next_rule); - + userfile = g_build_filename ( g_get_home_dir (), ".evolution/addressbook/searches.xml", NULL); xmlfile = g_build_filename (SEARCH_RULE_DIR, "addresstypes.xml", NULL); - + g_object_set_data_full (G_OBJECT (eav->search_context), "user", userfile, g_free); g_object_set_data_full (G_OBJECT (eav->search_context), "system", xmlfile, g_free); - + rule_context_load (eav->search_context, xmlfile, userfile); eav->search_rule = filter_rule_new (); @@ -468,7 +468,7 @@ eab_view_new (void) filter_rule_add_part (eav->search_rule, filter_part_clone (part)); eav->search = e_filter_bar_new (eav->search_context, xmlfile, userfile, NULL, eav); - + g_free (xmlfile); g_free (userfile); @@ -508,9 +508,9 @@ eab_view_new (void) clipboard_atom, GDK_SELECTION_TYPE_STRING, 0); - + g_signal_connect (eav->invisible, "selection_get", - G_CALLBACK (selection_get), + G_CALLBACK (selection_get), eav); g_signal_connect (eav->invisible, "selection_clear_event", G_CALLBACK (selection_clear_event), @@ -604,7 +604,7 @@ set_view_preview (EABView *view) state ? "1" : "0", NULL); eab_view_show_contact_preview (view, state); - + g_object_unref (gconf_client); } @@ -1005,7 +1005,7 @@ do_popup_menu(EABView *view, GdkEvent *event) contact_and_book->closure = cards; e_selection_model_foreach(selection_model, get_card_1, contact_and_book); } - + /** @HookPoint-EABPopup:Addressbook view Context Menu * @Id: org.gnome.evolution.addressbook.view.popup * @Class: org.gnome.evolution.addresbook.popup:1.0 @@ -1055,7 +1055,7 @@ selection_changed (GObject *o, EABView *view) eab_contact_display_render (EAB_CONTACT_DISPLAY (view->contact_display), NULL, EAB_CONTACT_DISPLAY_RENDER_NORMAL); } - + } static void @@ -1069,7 +1069,7 @@ table_double_click(ETableScrolled *table, gint row, gint col, GdkEvent *event, E g_object_get(model, "book", &book, NULL); - + g_return_if_fail (E_IS_BOOK (book)); if (e_contact_get (contact, E_CONTACT_IS_LIST)) @@ -1228,10 +1228,10 @@ contacts_removed (EABModel *model, gpointer data, EABView *eav) gint i; for (i = 0; i < count; i ++) { - - + + if (eav->displayed_contact == g_array_index (indices, gint, i)) { - + /* if the contact that's presently displayed is changed, clear the display */ eab_contact_display_render (EAB_CONTACT_DISPLAY (eav->contact_display), NULL, EAB_CONTACT_DISPLAY_RENDER_NORMAL); @@ -1288,7 +1288,7 @@ create_table_view (EABView *view) ETableModel *adapter; GtkWidget *table; char *etspecfile; - + adapter = eab_table_adapter_new(view->model); /* Here we create the table. We give it the three pieces of @@ -1315,7 +1315,7 @@ create_table_view (EABView *view) /* drag & drop signals */ e_table_drag_source_set (E_TABLE(E_TABLE_SCROLLED(table)->table), GDK_BUTTON1_MASK, drag_types, num_drag_types, GDK_ACTION_MOVE | GDK_ACTION_COPY); - + g_signal_connect (E_TABLE_SCROLLED(table)->table, "table_drag_data_get", G_CALLBACK (table_drag_data_get), @@ -1396,14 +1396,14 @@ search_activated (ESearchBar *esb, EABView *v) } g_string_free (s, TRUE); - } else + } else search_query = g_strdup ("(contains \"x-evolution-any-field\" \"\")"); /* Merge view and sexp */ subid = e_search_bar_get_viewitem_id (esb); if (subid) { - master_list = get_master_list (); + master_list = get_master_list (); category_name = g_list_nth_data (master_list, subid-1); view_sexp = g_strdup_printf ("(is \"category_list\" \"%s\")", category_name); search_query = g_strconcat ("(and ", view_sexp, search_query, ")", NULL); @@ -1460,7 +1460,7 @@ compare_subitems (const void *a, const void *b) g_free (collate_a); g_free (collate_b); - + return ret; } @@ -1502,7 +1502,7 @@ make_suboptions (EABView *view) GList *master_list; gint i, N; GtkWidget *menu; - + master_list = get_master_list (); N = g_list_length (master_list); subitems = g_new (EABSearchBarItem, N+2); @@ -1521,7 +1521,7 @@ make_suboptions (EABView *view) subitems[N+1].search.id = -1; subitems[N+1].search.text = NULL; subitems[N+1].image = NULL; - + qsort (subitems + 1, N, sizeof (subitems[0]), compare_subitems); menu = generate_viewoption_menu (subitems); e_search_bar_set_viewoption_menu ((ESearchBar *)view->search, menu); @@ -1620,7 +1620,7 @@ eab_view_setup_menus (EABView *view, /** * eab_view_discard_menus: * @view: An addressbook view. - * + * * Makes an addressbook view discard its GAL view menus and its views instance * objects. This should be called when the corresponding Bonobo component is * deactivated. @@ -1688,8 +1688,8 @@ eab_view_print (EABView *view, GtkPrintOperationAction action) } } -/* callback function to handle removal of contacts for - * which a user doesnt have write permission +/* callback function to handle removal of contacts for + * which a user doesnt have write permission */ static void delete_contacts_cb (EBook *book, EBookStatus status, gpointer closure) { @@ -1715,10 +1715,10 @@ eab_view_delete_selection(EABView *view, gboolean is_delete) EContact *contact; ETable *etable = NULL; EMinicardView *card_view; - ESelectionModel *selection_model = NULL; + ESelectionModel *selection_model = NULL; char *name = NULL; gint row = 0, select; - + list = get_selected_contacts (view); contact = list->data; @@ -1738,11 +1738,11 @@ eab_view_delete_selection(EABView *view, gboolean is_delete) else if (view->view_type == EAB_VIEW_TABLE) { etable = e_table_scrolled_get_table(E_TABLE_SCROLLED(view->widget)); - row = e_table_get_cursor_row (E_TABLE (etable)); + row = e_table_get_cursor_row (E_TABLE (etable)); } /* confirm delete */ - if (is_delete && + if (is_delete && !eab_editor_confirm_delete(GTK_WINDOW(gtk_widget_get_toplevel(view->widget)), plural, is_list, name)) { g_free (name); @@ -1765,7 +1765,7 @@ eab_view_delete_selection(EABView *view, gboolean is_delete) ids, delete_contacts_cb, NULL); - + g_list_free (ids); } else { @@ -1778,14 +1778,14 @@ eab_view_delete_selection(EABView *view, gboolean is_delete) NULL); } } - + /* Sets the cursor, at the row after the deleted row */ - if (view->view_type == EAB_VIEW_MINICARD && row!=0) { + if (view->view_type == EAB_VIEW_MINICARD && row!=0) { select = e_sorter_model_to_sorted (selection_model->sorter, row); /* Sets the cursor, before the deleted row if its the last row */ if (select == e_selection_model_row_count (selection_model) - 1) - select = select - 1; + select = select - 1; else select = select + 1; @@ -1795,12 +1795,12 @@ eab_view_delete_selection(EABView *view, gboolean is_delete) /* Sets the cursor, at the row after the deleted row */ else if (view->view_type == EAB_VIEW_TABLE && row!=0) { - select = e_table_model_to_view_row (E_TABLE (etable), row); - + select = e_table_model_to_view_row (E_TABLE (etable), row); + /* Sets the cursor, before the deleted row if its the last row */ if (select == e_table_model_row_count (E_TABLE(etable)->model) - 1) select = select - 1; - else + else select = select + 1; row = e_table_view_to_model_row (E_TABLE (etable), select); @@ -1864,7 +1864,7 @@ selection_received (GtkWidget *invisible, contact_list = eab_contact_list_from_string (str); } else contact_list = eab_contact_list_from_string ((char *)selection_data->data); - + for (l = contact_list; l; l = l->next) { EContact *contact = l->data; @@ -1907,15 +1907,15 @@ eab_view_save_as (EABView *view, gboolean all) { GList *list = NULL; EBook *book ; - - g_object_get(view->model, + + g_object_get(view->model, "book", &book, NULL); if (all) { EBookQuery *query = e_book_query_any_field_contains(""); e_book_get_contacts(book, query, &list, NULL); - e_book_query_unref(query); + e_book_query_unref(query); } else { list = get_selected_contacts(view); @@ -1987,7 +1987,7 @@ eab_view_copy (EABView *view) { gtk_html_copy (GTK_HTML (view->contact_display)); } - else + else { view->clipboard_contacts = get_selected_contacts (view); @@ -2035,14 +2035,14 @@ view_transfer_contacts (EABView *view, gboolean delete_from_source, gboolean all GList *contacts = NULL; GtkWindow *parent_window; - g_object_get(view->model, + g_object_get(view->model, "book", &book, NULL); if (all) { EBookQuery *query = e_book_query_any_field_contains(""); e_book_get_contacts(book, query, &contacts, NULL); - e_book_query_unref(query); + e_book_query_unref(query); } else { contacts = get_selected_contacts (view); @@ -2102,13 +2102,13 @@ eab_view_can_view (EABView *view) return view ? eab_view_selection_nonempty (view) : FALSE; } -gboolean +gboolean eab_view_can_send (EABView *view) { return view ? eab_view_selection_nonempty (view) : FALSE; } -gboolean +gboolean eab_view_can_send_to (EABView *view) { return view ? eab_view_selection_nonempty (view) : FALSE; diff --git a/addressbook/gui/widgets/e-addressbook-view.h b/addressbook/gui/widgets/e-addressbook-view.h index 14f16c82f4..3ba45d6302 100644 --- a/addressbook/gui/widgets/e-addressbook-view.h +++ b/addressbook/gui/widgets/e-addressbook-view.h @@ -62,7 +62,7 @@ typedef struct _EABViewClass EABViewClass; struct _EABView { GtkVBox parent; - + /* item specific fields */ EABViewType view_type; diff --git a/addressbook/gui/widgets/e-minicard-label.c b/addressbook/gui/widgets/e-minicard-label.c index 1d4bf307c9..ab6e5471de 100644 --- a/addressbook/gui/widgets/e-minicard-label.c +++ b/addressbook/gui/widgets/e-minicard-label.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* +/* * e-minicard-label.c * Copyright (C) 2000 Ximian, Inc. * Author: Chris Lahey <clahey@ximian.com> @@ -203,7 +203,7 @@ e_minicard_label_set_property (GObject *object, guint prop_id, const GValue *va GnomeCanvasItem *item; e_minicard_label = E_MINICARD_LABEL (object); - item = GNOME_CANVAS_ITEM (object); + item = GNOME_CANVAS_ITEM (object); switch (prop_id){ case PROP_WIDTH: @@ -344,7 +344,7 @@ static gboolean e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event) { EMinicardLabel *e_minicard_label; - + e_minicard_label = E_MINICARD_LABEL (item); switch( event->type ) { @@ -371,7 +371,7 @@ e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event) break; } case GDK_BUTTON_PRESS: - case GDK_BUTTON_RELEASE: + case GDK_BUTTON_RELEASE: case GDK_MOTION_NOTIFY: case GDK_ENTER_NOTIFY: case GDK_LEAVE_NOTIFY: { @@ -382,7 +382,7 @@ e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event) default: break; } - + if (GNOME_CANVAS_ITEM_CLASS( parent_class )->event) return (* GNOME_CANVAS_ITEM_CLASS( parent_class )->event) (item, event); else @@ -413,7 +413,7 @@ set_colors (EMinicardLabel *label) GtkWidget *canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (label)->canvas); GtkStyle *style = gtk_widget_get_style (canvas); if (label->has_focus) { - gnome_canvas_item_set (label->rect, + gnome_canvas_item_set (label->rect, "outline_color_gdk", &style->mid[GTK_STATE_SELECTED], "fill_color_gdk", &style->bg[GTK_STATE_NORMAL], NULL); @@ -453,21 +453,21 @@ static void e_minicard_label_reflow(GnomeCanvasItem *item, int flags) { EMinicardLabel *e_minicard_label = E_MINICARD_LABEL(item); - + gint old_height; gdouble text_height; gdouble left_width; old_height = e_minicard_label->height; - g_object_get(e_minicard_label->fieldname, + g_object_get(e_minicard_label->fieldname, "text_height", &text_height, NULL); e_minicard_label->height = text_height; - g_object_get(e_minicard_label->field, + g_object_get(e_minicard_label->field, "text_height", &text_height, NULL); diff --git a/addressbook/gui/widgets/e-minicard-label.h b/addressbook/gui/widgets/e-minicard-label.h index 30e1a274e7..1b64d6874b 100644 --- a/addressbook/gui/widgets/e-minicard-label.h +++ b/addressbook/gui/widgets/e-minicard-label.h @@ -53,7 +53,7 @@ typedef struct _EMinicardLabelClass EMinicardLabelClass; struct _EMinicardLabel { GnomeCanvasGroup parent; - + /* item specific fields */ double width; double height; diff --git a/addressbook/gui/widgets/e-minicard-view-widget.c b/addressbook/gui/widgets/e-minicard-view-widget.c index 7f4c84d0fd..5c1693dea2 100644 --- a/addressbook/gui/widgets/e-minicard-view-widget.c +++ b/addressbook/gui/widgets/e-minicard-view-widget.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* +/* * e-minicard-view-widget.c * Copyright (C) 2000 Ximian, Inc. * Author: Chris Lahey <clahey@ximian.com> @@ -102,28 +102,28 @@ e_minicard_view_widget_class_init (EMinicardViewWidgetClass *klass) object_class->get_property = e_minicard_view_widget_get_property; object_class->dispose = e_minicard_view_widget_dispose; - g_object_class_install_property (object_class, PROP_BOOK, + g_object_class_install_property (object_class, PROP_BOOK, g_param_spec_object ("book", _("Book"), /*_( */"XXX blurb" /*)*/, E_TYPE_BOOK, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_QUERY, + g_object_class_install_property (object_class, PROP_QUERY, g_param_spec_string ("query", _("Query"), /*_( */"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" /*)*/, FALSE, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_COLUMN_WIDTH, + g_object_class_install_property (object_class, PROP_COLUMN_WIDTH, g_param_spec_double ("column_width", _("Column Width"), /*_( */"XXX blurb" /*)*/, @@ -390,7 +390,7 @@ e_minicard_view_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocatio { if (GTK_WIDGET_CLASS(parent_class)->size_allocate) GTK_WIDGET_CLASS(parent_class)->size_allocate (widget, allocation); - + if (GTK_WIDGET_REALIZED(widget)) { double width; EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET(widget); @@ -443,7 +443,7 @@ e_minicard_view_widget_get_view (EMinicardViewWidget *view) return NULL; } -static gboolean +static gboolean e_minicard_view_widget_real_focus_in_event(GtkWidget *widget, GdkEventFocus *event) { GnomeCanvas *canvas; diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c index 2b271629b1..772798432f 100644 --- a/addressbook/gui/widgets/e-minicard-view.c +++ b/addressbook/gui/widgets/e-minicard-view.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* +/* * e-minicard-view.c * Copyright (C) 2000 Ximian, Inc. * Author: Chris Lahey <clahey@ximian.com> @@ -88,7 +88,7 @@ e_minicard_view_drag_data_get(GtkWidget *widget, switch (info) { case DND_TARGET_TYPE_VCARD_LIST: { char *value; - + value = eab_contact_list_to_string (view->drag_list); gtk_selection_data_set (selection_data, @@ -101,7 +101,7 @@ e_minicard_view_drag_data_get(GtkWidget *widget, case DND_TARGET_TYPE_SOURCE_VCARD_LIST: { EBook *book; char *value; - + g_object_get (view->adapter, "book", &book, NULL); value = eab_book_and_contact_list_to_string (book, view->drag_list); @@ -131,7 +131,7 @@ e_minicard_view_drag_begin (EAddressbookReflowAdapter *adapter, GdkEvent *event, GdkDragAction actions = GDK_ACTION_MOVE | GDK_ACTION_COPY; clear_drag_data (view); - + view->drag_list = e_minicard_view_get_card_list (view); g_print ("dragging %d card(s)\n", g_list_length (view->drag_list)); @@ -213,7 +213,7 @@ e_minicard_view_set_property (GObject *object, EMinicardView *view; view = E_MINICARD_VIEW (object); - + switch (prop_id){ case PROP_ADAPTER: if (view->adapter) { @@ -246,7 +246,7 @@ e_minicard_view_set_property (GObject *object, g_signal_connect (model, "writable_status", G_CALLBACK (writable_status_change), view); } - + } break; case PROP_BOOK: @@ -350,7 +350,7 @@ static gboolean e_minicard_view_event (GnomeCanvasItem *item, GdkEvent *event) { EMinicardView *view; - + view = E_MINICARD_VIEW (item); switch( event->type ) { @@ -359,11 +359,11 @@ e_minicard_view_event (GnomeCanvasItem *item, GdkEvent *event) gboolean editable; g_object_get(view->adapter, "editable", &editable, NULL); - + if (editable) { EBook *book; g_object_get(view, "book", &book, NULL); - + if (book && E_IS_BOOK (book)) eab_show_contact_editor (book, e_contact_new(), TRUE, editable); } @@ -485,39 +485,39 @@ e_minicard_view_class_init (EMinicardViewClass *klass) GObjectClass *object_class; GnomeCanvasItemClass *item_class; EReflowClass *reflow_class; - + object_class = G_OBJECT_CLASS (klass); item_class = (GnomeCanvasItemClass *) klass; reflow_class = (EReflowClass *) klass; - + parent_class = g_type_class_peek_parent (klass); - + object_class->set_property = e_minicard_view_set_property; object_class->get_property = e_minicard_view_get_property; object_class->dispose = e_minicard_view_dispose; - g_object_class_install_property (object_class, PROP_ADAPTER, + g_object_class_install_property (object_class, PROP_ADAPTER, g_param_spec_object ("adapter", _("Adapter"), /*_( */"XXX blurb" /*)*/, E_TYPE_ADDRESSBOOK_REFLOW_ADAPTER, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_BOOK, + g_object_class_install_property (object_class, PROP_BOOK, g_param_spec_object ("book", _("Book"), /*_( */"XXX blurb" /*)*/, E_TYPE_BOOK, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_QUERY, + g_object_class_install_property (object_class, PROP_QUERY, g_param_spec_string ("query", _("Query"), /*_( */"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/widgets/e-minicard-view.h b/addressbook/gui/widgets/e-minicard-view.h index 6950204286..ca706fed70 100644 --- a/addressbook/gui/widgets/e-minicard-view.h +++ b/addressbook/gui/widgets/e-minicard-view.h @@ -63,7 +63,7 @@ struct _EMinicardView EReflow parent; EAddressbookReflowAdapter *adapter; - + /* item specific fields */ GList *drag_list; diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index 7132389379..c0fd0b5994 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* +/* * e-minicard.c * Copyright (C) 2000 Ximian, Inc. * Author: Chris Lahey <clahey@ximian.com> @@ -188,14 +188,14 @@ e_minicard_class_init (EMinicardClass *klass) /*_( */"XXX blurb" /*)*/, FALSE, G_PARAM_READWRITE)); - + g_object_class_install_property (object_class, PROP_CONTACT, g_param_spec_object ("contact", _("Contact"), /*_( */"XXX blurb" /*)*/, E_TYPE_CONTACT, G_PARAM_READWRITE)); - + e_minicard_signals [SELECTED] = g_signal_new ("selected", G_OBJECT_CLASS_TYPE (object_class), @@ -264,23 +264,23 @@ set_selected (EMinicard *minicard, gboolean selected) { GtkWidget *canvas = GTK_WIDGET(GNOME_CANVAS_ITEM(minicard)->canvas); if (selected) { - gnome_canvas_item_set (minicard->rect, + gnome_canvas_item_set (minicard->rect, "outline_color_gdk", &canvas->style->bg[GTK_STATE_ACTIVE], NULL); - gnome_canvas_item_set (minicard->header_rect, + gnome_canvas_item_set (minicard->header_rect, "fill_color_gdk", &canvas->style->bg[GTK_STATE_SELECTED], NULL); - gnome_canvas_item_set (minicard->header_text, + gnome_canvas_item_set (minicard->header_text, "fill_color_gdk", &canvas->style->text[GTK_STATE_SELECTED], NULL); } else { - gnome_canvas_item_set (minicard->rect, - "outline_color", NULL, + gnome_canvas_item_set (minicard->rect, + "outline_color", NULL, NULL); - gnome_canvas_item_set (minicard->header_rect, + gnome_canvas_item_set (minicard->header_rect, "fill_color_gdk", &canvas->style->bg[GTK_STATE_NORMAL], NULL); - gnome_canvas_item_set (minicard->header_text, + gnome_canvas_item_set (minicard->header_text, "fill_color_gdk", &canvas->style->text[GTK_STATE_NORMAL], NULL); } @@ -306,7 +306,7 @@ e_minicard_set_property (GObject *object, guint prop_id, const GValue *value, G item = GNOME_CANVAS_ITEM (object); e_minicard = E_MINICARD (object); - + switch (prop_id){ case PROP_WIDTH: if (e_minicard->width != g_value_get_double (value)) { @@ -415,7 +415,7 @@ e_minicard_dispose (GObject *object) g_return_if_fail (E_IS_MINICARD (object)); e_minicard = E_MINICARD (object); - + if (e_minicard->fields) { g_list_foreach(e_minicard->fields, (GFunc) e_minicard_field_destroy, NULL); g_list_free(e_minicard->fields); @@ -442,12 +442,12 @@ e_minicard_finalize (GObject *object) g_return_if_fail (E_IS_MINICARD (object)); e_minicard = E_MINICARD (object); - + if (e_minicard->contact) { g_object_unref (e_minicard->contact); e_minicard->contact = NULL; } - + if (e_minicard->list_icon_pixbuf) { g_object_unref (e_minicard->list_icon_pixbuf); e_minicard->list_icon_pixbuf = NULL; @@ -477,7 +477,7 @@ e_minicard_realize (GnomeCanvasItem *item) if (GNOME_CANVAS_ITEM_CLASS(parent_class)->realize) (* GNOME_CANVAS_ITEM_CLASS(parent_class)->realize) (item); - + e_minicard->rect = gnome_canvas_item_new( group, gnome_canvas_rect_get_type(), @@ -512,7 +512,7 @@ e_minicard_realize (GnomeCanvasItem *item) e_canvas_item_move_absolute(e_minicard->header_text, 6, 6); - e_minicard->list_icon = + e_minicard->list_icon = gnome_canvas_item_new ( group, gnome_canvas_pixbuf_get_type(), "pixbuf", e_minicard->list_icon_pixbuf, @@ -544,7 +544,7 @@ gboolean e_minicard_activate_editor(EMinicard *minicard) { GnomeCanvasItem *item = (GnomeCanvasItem *)minicard; - + if (minicard->editor) { eab_editor_raise (minicard->editor); } @@ -581,7 +581,7 @@ static gboolean e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) { EMinicard *e_minicard; - + e_minicard = E_MINICARD (item); switch( event->type ) { @@ -608,7 +608,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK); - + e_canvas_item_grab_focus(item, TRUE); if (gnome_canvas_item_grab (GNOME_CANVAS_ITEM (e_minicard), @@ -734,7 +734,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) default: break; } - + if (GNOME_CANVAS_ITEM_CLASS( parent_class )->event) return (* GNOME_CANVAS_ITEM_CLASS( parent_class )->event) (item, event); else @@ -749,7 +749,7 @@ e_minicard_resize_children( EMinicard *e_minicard ) if (e_minicard->header_text) { gnome_canvas_item_set( e_minicard->header_text, - "width", ((double) e_minicard->width - 12 + "width", ((double) e_minicard->width - 12 - (is_list ? e_minicard->list_icon_size : 0.0)), NULL ); } @@ -773,14 +773,14 @@ add_field (EMinicard *e_minicard, EContactField field, gdouble left_width) EMinicardField *minicard_field; char *name; char *string; - + group = GNOME_CANVAS_GROUP( e_minicard ); - + name = g_strdup_printf("%s:", e_contact_pretty_name (field)); string = e_contact_get (e_minicard->contact, field); new_item = e_minicard_label_new(group); - + if (e_minicard->contact && e_contact_get (e_minicard->contact, E_CONTACT_IS_LIST)) gnome_canvas_item_set( new_item, "width", e_minicard->width - 4.0, @@ -847,7 +847,7 @@ add_email_field (EMinicard *e_minicard, GList *email_list, gdouble left_width, i for (l=email_list, le=emails; l!=NULL && count < limit && le!=NULL; l = l->next, le=le->next) { const gchar *tmp; - + tmp = get_email_location ((EVCardAttribute *) l->data); if (tmp) name = g_strdup_printf ("%s:", tmp); @@ -856,7 +856,7 @@ add_email_field (EMinicard *e_minicard, GList *email_list, gdouble left_width, i string = e_text_to_html (le->data, 0); new_item = e_minicard_label_new(group); - + gnome_canvas_item_set( new_item, "width", e_minicard->width - 4.0, "fieldname", name, @@ -954,7 +954,7 @@ remodel( EMinicard *e_minicard ) for(field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1) && count < 5; field++) { EMinicardField *minicard_field = NULL; gboolean is_email=FALSE; - + if (field == E_CONTACT_FAMILY_NAME || field == E_CONTACT_GIVEN_NAME) continue; @@ -1028,19 +1028,19 @@ e_minicard_reflow(GnomeCanvasItem *item, int flags) GList *list; gdouble text_height; gint old_height; - + old_height = e_minicard->height; g_object_get(e_minicard->header_text, "text_height", &text_height, NULL); - + e_minicard->height = text_height + 10.0; - + gnome_canvas_item_set(e_minicard->header_rect, "y2", text_height + 9.0, 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? */ @@ -1052,7 +1052,7 @@ e_minicard_reflow(GnomeCanvasItem *item, int flags) e_minicard->height += text_height; } e_minicard->height += 2; - + gnome_canvas_item_set(e_minicard->rect, "x2", (double) e_minicard->width - 1.0, "y2", (double) e_minicard->height - 1.0, @@ -1083,7 +1083,7 @@ int e_minicard_compare (EMinicard *minicard1, EMinicard *minicard2) { int cmp = 0; - + g_return_val_if_fail(minicard1 != NULL, 0); g_return_val_if_fail(E_IS_MINICARD(minicard1), 0); g_return_val_if_fail(minicard2 != NULL, 0); @@ -1098,13 +1098,13 @@ e_minicard_compare (EMinicard *minicard1, EMinicard *minicard2) "file_as", &file_as2, NULL); - if (file_as1 && file_as2) + if (file_as1 && file_as2) cmp = g_utf8_collate(file_as1, file_as2); else if (file_as1) cmp = -1; else if (file_as2) cmp = 1; - else + else cmp = strcmp(e_minicard_get_card_id(minicard1), e_minicard_get_card_id(minicard2)); g_free (file_as1); diff --git a/addressbook/gui/widgets/e-minicard.h b/addressbook/gui/widgets/e-minicard.h index 4a5d1c6e77..a1d084869c 100644 --- a/addressbook/gui/widgets/e-minicard.h +++ b/addressbook/gui/widgets/e-minicard.h @@ -60,10 +60,10 @@ enum _EMinicardFocusType { struct _EMinicard { GnomeCanvasGroup parent; - + /* item specific fields */ EContact *contact; - + GnomeCanvasItem *rect; GnomeCanvasItem *header_rect; GnomeCanvasItem *header_text; @@ -107,7 +107,7 @@ struct _EMinicardClass }; typedef struct _EMinicardField EMinicardField; - + struct _EMinicardField { EContactField field; GnomeCanvasItem *label; diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c index 41e436c07e..639ccf6d04 100644 --- a/addressbook/gui/widgets/eab-contact-display.c +++ b/addressbook/gui/widgets/eab-contact-display.c @@ -81,7 +81,7 @@ eab_uri_popup_link_open(EPopup *ep, EPopupItem *item, void *data) { EABPopupTargetURI *t = (EABPopupTargetURI *)ep->target; GError *err = NULL; - + gnome_url_show(t->uri, &err); if (err) { g_warning("gnome_url_show: %s", err->message); @@ -96,11 +96,11 @@ eab_uri_popup_email_address_copy(EPopup *ep, EPopupItem *item, void *data) struct _EABContactDisplayPrivate *p = display->priv; EABPopupTargetURI *t = (EABPopupTargetURI *)ep->target; const char *url = t->uri; - char *html=NULL; - int i=0; + char *html=NULL; + int i=0; GList *email_list, *l; int email_num = atoi (url + strlen ("internal-mailto:")); - + email_list = e_contact_get (p->contact, E_CONTACT_EMAIL); for (l = email_list; l; l=l->next) { if(i==email_num) @@ -109,9 +109,9 @@ eab_uri_popup_email_address_copy(EPopup *ep, EPopupItem *item, void *data) } g_free(p->selection_uri); - p->selection_uri = g_strdup(html); + p->selection_uri = g_strdup(html); g_free (html); - + gtk_selection_owner_set(p->invisible, GDK_SELECTION_PRIMARY, gtk_get_current_event_time()); gtk_selection_owner_set(p->invisible, GDK_SELECTION_CLIPBOARD, gtk_get_current_event_time()); } @@ -136,12 +136,12 @@ eab_uri_popup_address_send(EPopup *ep, EPopupItem *item, void *data) const char *url = t->uri; EABContactDisplay *display = data; struct _EABContactDisplayPrivate *p = display->priv; - + int mail_num = atoi (url + strlen ("internal-mailto:")); - + if (mail_num == -1) - return; - + return; + eab_send_contact (p->contact, mail_num, EAB_DISPOSITION_AS_TO); } @@ -160,7 +160,7 @@ eab_selection_get(GtkWidget *widget, GtkSelectionData *data, guint info, guint t static void eab_selection_clear_event(GtkWidget *widget, GdkEventSelection *event, EABContactDisplay *display) { -#if 0 +#if 0 struct _EABContactDisplayPrivate *p = display->priv; g_free(p->selection_uri); @@ -171,7 +171,7 @@ eab_selection_clear_event(GtkWidget *widget, GdkEventSelection *event, EABContac static EPopupItem eab_uri_popups[] = { { E_POPUP_ITEM, "05.open", N_("_Open Link in Browser"), eab_uri_popup_link_open, NULL, NULL, EAB_POPUP_URI_NOT_MAILTO }, { E_POPUP_ITEM, "10.copy", N_("_Copy Link Location"), eab_uri_popup_link_copy, NULL, "edit-copy", EAB_POPUP_URI_NOT_MAILTO }, - { E_POPUP_ITEM, "15.send", N_("_Send New Message To..."), eab_uri_popup_address_send, NULL, "mail-message-new", EAB_POPUP_URI_MAILTO}, + { E_POPUP_ITEM, "15.send", N_("_Send New Message To..."), eab_uri_popup_address_send, NULL, "mail-message-new", EAB_POPUP_URI_MAILTO}, { E_POPUP_ITEM, "20.copy", N_("Copy _Email Address"), eab_uri_popup_email_address_copy, NULL, "edit-copy", EAB_POPUP_URI_MAILTO}, }; @@ -199,7 +199,7 @@ eab_uri_popup_event(EABContactDisplay *display, GdkEvent *event, const char *uri GtkMenu *menu; GSList *menus = NULL; int i; - + emp = eab_popup_new("org.gnome.evolution.addressbook.contactdisplay.popup"); t = eab_popup_target_new_uri(emp, uri); @@ -212,7 +212,7 @@ eab_uri_popup_event(EABContactDisplay *display, GdkEvent *event, const char *uri e_popup_add_items((EPopup *)emp, menus, NULL, eab_uri_popup_free, display); menu = e_popup_create_menu_once((EPopup *)emp,(EPopupTarget*)t, 0); - + if (event == NULL) { gtk_menu_popup(menu, NULL, NULL, NULL, NULL, 0, gtk_get_current_event_time()); } else { @@ -267,7 +267,7 @@ on_link_clicked (GtkHTML *html, const char *url, EABContactDisplay *display) if (mail_num == -1) return; - + eab_send_contact (display->priv->contact, mail_num, EAB_DISPOSITION_AS_TO); return; @@ -275,7 +275,7 @@ on_link_clicked (GtkHTML *html, const char *url, EABContactDisplay *display) #endif gnome_url_show (url, &err); - + if (err) { g_warning ("gnome_url_show: %s", err->message); g_error_free (err); @@ -417,7 +417,7 @@ accum_time_attribute (GString *gstr, EContact *contact, const char *html_label, EContactDate *date; GDate *gdate = NULL; char sdate[100]; - + date = e_contact_get (contact, field); if (date) { gdate = g_date_new_dmy ( date->day, @@ -508,7 +508,7 @@ render_contact (GtkHTMLStream *html_stream, EContact *contact) email_list = e_contact_get (contact, E_CONTACT_EMAIL); email_attr_list = e_contact_get_attributes (contact, E_CONTACT_EMAIL); - + for (l = email_list, al=email_attr_list; l && al; l = l->next, al = al->next) { #ifdef HANDLE_MAILTO_INTERNALLY char *html = e_text_to_html (l->data, 0); @@ -517,7 +517,7 @@ render_contact (GtkHTMLStream *html_stream, EContact *contact) email_num ++; g_free (html); nl = "<br>"; - + #else g_string_append_printf (accum, "%s%s <font color=" HEADER_COLOR ">(%s)</font>", nl, (char*)l->data, get_email_location ((EVCardAttribute *) al->data)); nl = "\n"; @@ -546,7 +546,7 @@ render_contact (GtkHTMLStream *html_stream, EContact *contact) if (accum->len > 0) gtk_html_stream_printf (html_stream, "%s", accum->str); } - + g_string_assign (accum, ""); accum_multival_attribute (accum, contact, _("AIM"), E_CONTACT_IM_AIM, AIM_ICON, 0); accum_multival_attribute (accum, contact, _("GroupWise"), E_CONTACT_IM_GROUPWISE, GROUPWISE_ICON, 0); @@ -571,7 +571,7 @@ render_contact (GtkHTMLStream *html_stream, EContact *contact) accum_attribute (accum, contact, _("Assistant"), E_CONTACT_ASSISTANT, NULL, 0); accum_attribute (accum, contact, _("Video Chat"), E_CONTACT_VIDEO_URL, VIDEOCONF_ICON, E_TEXT_TO_HTML_CONVERT_URLS); accum_attribute (accum, contact, _("Calendar"), E_CONTACT_CALENDAR_URI, NULL, E_TEXT_TO_HTML_CONVERT_URLS); - accum_attribute (accum, contact, _("Free/Busy"), E_CONTACT_FREEBUSY_URL, NULL, E_TEXT_TO_HTML_CONVERT_URLS); + accum_attribute (accum, contact, _("Free/Busy"), E_CONTACT_FREEBUSY_URL, NULL, E_TEXT_TO_HTML_CONVERT_URLS); accum_attribute (accum, contact, _("Phone"), E_CONTACT_PHONE_BUSINESS, NULL, 0); accum_attribute (accum, contact, _("Fax"), E_CONTACT_PHONE_BUSINESS_FAX, NULL, 0); accum_address (accum, contact, _("Address"), E_CONTACT_ADDRESS_WORK, E_CONTACT_ADDRESS_LABEL_WORK); @@ -637,7 +637,7 @@ eab_contact_display_render_normal (EABContactDisplay *display, EContact *contact gtk_html_stream_printf (html_stream, "<img border=\"1\" src=\"internal-contact-photo:\">"); e_contact_photo_free (photo); } - + gtk_html_stream_printf (html_stream, "</td><td valign=\"top\">\n"); str = e_contact_get_const (contact, E_CONTACT_FILE_AS); @@ -735,7 +735,7 @@ eab_contact_display_render_compact (EABContactDisplay *display, EContact *contac calced_width, calced_height); e_contact_photo_free (photo); } - + gtk_html_stream_printf (html_stream, "</td><td valign=\"top\">\n"); str = e_contact_get_const (contact, E_CONTACT_FILE_AS); @@ -754,7 +754,7 @@ eab_contact_display_render_compact (EABContactDisplay *display, EContact *contac } gtk_html_stream_write (html_stream, "<hr>", 4); - + if (e_contact_get (contact, E_CONTACT_IS_LIST)) { GList *email_list; GList *l; @@ -804,7 +804,7 @@ eab_contact_display_render_compact (EABContactDisplay *display, EContact *contac g_free (html); } gtk_html_stream_write (html_stream, "<br>", 4); - + str = e_contact_get_const (contact, E_CONTACT_HOMEPAGE_URL); if (str) { html = e_text_to_html (str, E_TEXT_TO_HTML_CONVERT_URLS); @@ -847,11 +847,11 @@ eab_html_press_event (GtkWidget *widget, GdkEvent *event,EABContactDisplay *disp { char *uri; gboolean res = FALSE; - + if (event->button.button!= 3 ) return FALSE; - + uri = gtk_html_get_url_at (GTK_HTML (widget), event->button.x, event->button.y); if (uri){ eab_uri_popup_event(display,event,uri); @@ -873,7 +873,7 @@ eab_contact_display_new (void) p=display->priv = g_new0 (EABContactDisplayPrivate, 1); gtk_html_set_default_content_type (GTK_HTML (display), "text/html; charset=utf-8"); - + gtk_html_set_editable (GTK_HTML (display), FALSE); g_signal_connect (display, "url_requested", @@ -882,7 +882,7 @@ eab_contact_display_new (void) g_signal_connect (display, "link_clicked", G_CALLBACK (on_link_clicked), display); - g_signal_connect(display, "button_press_event", + g_signal_connect(display, "button_press_event", G_CALLBACK(eab_html_press_event), display); p->invisible = gtk_invisible_new(); @@ -890,7 +890,7 @@ eab_contact_display_new (void) g_signal_connect(p->invisible, "selection_clear_event", G_CALLBACK(eab_selection_clear_event), display); gtk_selection_add_target(p->invisible, GDK_SELECTION_PRIMARY, GDK_SELECTION_TYPE_STRING, 0); gtk_selection_add_target(p->invisible, GDK_SELECTION_CLIPBOARD, GDK_SELECTION_TYPE_STRING, 1); - + #if 0 g_signal_connect (display, "object_requested", G_CALLBACK (on_object_requested), diff --git a/addressbook/gui/widgets/eab-contact-display.h b/addressbook/gui/widgets/eab-contact-display.h index cc10b0eeac..e1b84346e7 100644 --- a/addressbook/gui/widgets/eab-contact-display.h +++ b/addressbook/gui/widgets/eab-contact-display.h @@ -43,7 +43,7 @@ typedef enum { struct _EABContactDisplay { GtkHTML parent; - + EABContactDisplayPrivate *priv; }; diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index f7ed275698..731d141a84 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* +/* * e-table-field-chooser.c * Copyright (C) 2001 Ximian, Inc. * Author: Chris Toshok <toshok@ximian.com> @@ -76,7 +76,7 @@ void eab_error_dialog (const char *msg, EBookStatus status) { const char *status_str = status_to_string [status]; - + if (status_str) e_error_run (NULL, "addressbook:generic-error", msg, _(status_str), NULL); } @@ -86,7 +86,7 @@ eab_load_error_dialog (GtkWidget *parent, ESource *source, EBookStatus status) { char *label_string, *label = NULL, *uri; GtkWidget *dialog; - + g_return_if_fail (source != NULL); uri = e_source_get_uri (source); @@ -97,7 +97,7 @@ eab_load_error_dialog (GtkWidget *parent, ESource *source, EBookStatus status) "for offline usage. Please load the addressbook once in online mode " "to download its contents"); } - + else if (!strncmp (uri, "file:", 5)) { char *path = g_filename_from_uri (uri, NULL, NULL); label = g_strdup_printf ( @@ -109,7 +109,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 */ #ifdef HAVE_LDAP - label_string = + label_string = _("We were unable to open this addressbook. This either " "means you have entered an incorrect URI, or the LDAP server " "is unreachable."); @@ -126,12 +126,12 @@ eab_load_error_dialog (GtkWidget *parent, ESource *source, EBookStatus status) "means you have entered an incorrect URI, or the server " "is unreachable."); } - + dialog = e_error_new ((GtkWindow *) parent, "addressbook:load-error", label_string, NULL); g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL); - + gtk_widget_show (dialog); - g_free (label); + g_free (label); g_free (uri); } @@ -168,7 +168,7 @@ eab_search_result_dialog (GtkWidget *parent, default: g_return_if_reached (); } - + e_error_run ((GtkWindow *) parent, "addressbook:search-error", str, NULL); } @@ -340,7 +340,7 @@ file_exists(GtkWindow *window, const char *filename) typedef struct { GtkWidget *filesel; char *vcard; - gboolean has_multiple_contacts; + gboolean has_multiple_contacts; } SaveAsInfo; static void @@ -350,11 +350,11 @@ save_it(GtkWidget *widget, SaveAsInfo *info) char *uri; gint error = 0; gint response = 0; - + filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (info->filesel)); - uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (info->filesel)); - + uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (info->filesel)); + if (filename && g_file_test (filename, G_FILE_TEST_EXISTS)) { response = file_exists(GTK_WINDOW (info->filesel), filename); switch (response) { @@ -365,12 +365,12 @@ save_it(GtkWidget *widget, SaveAsInfo *info) } } - error = e_write_file_uri (uri, info->vcard); + error = e_write_file_uri (uri, info->vcard); if (error != 0) { char *err_str_ext; if (info->has_multiple_contacts) { /* more than one, finding the total number of contacts might - * hit performance while saving large number of contacts + * hit performance while saving large number of contacts */ err_str_ext = ngettext ("contact", "contacts", 2); } @@ -378,16 +378,16 @@ save_it(GtkWidget *widget, SaveAsInfo *info) err_str_ext = ngettext ("contact", "contacts", 1); } - /* translators: Arguments, err_str_ext (item to be saved: "contact"/"contacts"), - * destination file name, and error code will fill the placeholders - * {0}, {1} and {2}, respectively in the error message formed + /* translators: Arguments, err_str_ext (item to be saved: "contact"/"contacts"), + * destination file name, and error code will fill the placeholders + * {0}, {1} and {2}, respectively in the error message formed */ - e_error_run (GTK_WINDOW (info->filesel), "addressbook:save-error", + e_error_run (GTK_WINDOW (info->filesel), "addressbook:save-error", err_str_ext, filename, g_strerror (errno)); gtk_widget_destroy(GTK_WIDGET(info->filesel)); return; } - + gtk_widget_destroy(GTK_WIDGET(info->filesel)); } @@ -430,7 +430,7 @@ make_safe_filename (char *name) safe = g_strdup (name); e_filename_make_safe (safe); - + return safe; } @@ -523,7 +523,7 @@ eab_contact_save (char *title, EContact *contact, GtkWindow *parent_window) gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (filesel), g_get_home_dir ()); gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (filesel), file); gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (filesel), FALSE); - + info->filesel = filesel; info->vcard = e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30); @@ -624,7 +624,7 @@ do_delete (gpointer data, gpointer user_data) EBook *book = user_data; EContact *contact = data; const char *id; - + id = e_contact_get_const (contact, E_CONTACT_UID); e_book_remove_contact(book, id, NULL); } @@ -664,7 +664,7 @@ contact_added_cb (EBook* book, EBookStatus status, const char *id, gpointer user if (status != E_BOOK_ERROR_OK && status != E_BOOK_ERROR_CANCELLED) { process->book_status = FALSE; eab_error_dialog (_("Error adding contact"), status); - } + } else if (status == E_BOOK_ERROR_CANCELLED) { process->book_status = FALSE; } @@ -786,7 +786,7 @@ eab_send_to_contact_and_email_num_list (GList *c) return; CORBA_exception_init (&ev); - + composer_server = bonobo_activation_activate_from_id (COMPOSER_OAFID, 0, NULL, &ev); /* Figure out how many addresses of each kind we have. */ @@ -819,7 +819,7 @@ eab_send_to_contact_and_email_num_list (GList *c) cc_list = GNOME_Evolution_Composer_RecipientList__alloc (); cc_list->_maximum = cc_list->_length = 0; - + bcc_list = GNOME_Evolution_Composer_RecipientList__alloc (); bcc_list->_maximum = bcc_length; bcc_list->_length = bcc_length; @@ -845,7 +845,7 @@ eab_send_to_contact_and_email_num_list (GList *c) if (is_list) { for (iterator = emails; iterator; iterator = iterator->next) { - + if (is_hidden) { recipient = &(bcc_list->_buffer[bcc_i]); ++bcc_i; @@ -853,7 +853,7 @@ eab_send_to_contact_and_email_num_list (GList *c) recipient = &(to_list->_buffer[to_i]); ++to_i; } - + name = NULL; addr = NULL; if (iterator && iterator->data) { @@ -863,7 +863,7 @@ eab_send_to_contact_and_email_num_list (GList *c) recipient->name = CORBA_string_dup (name ? name : ""); recipient->address = CORBA_string_dup (addr ? addr : ""); - + g_free (name); g_free (addr); } @@ -882,7 +882,7 @@ eab_send_to_contact_and_email_num_list (GList *c) if (nth >= length) nth = 0; - + if (contact_name) { name = e_contact_name_to_string (contact_name); e_contact_name_free (contact_name); @@ -891,7 +891,7 @@ eab_send_to_contact_and_email_num_list (GList *c) name = NULL; addr = g_strdup (g_list_nth_data (emails, nth)); - + recipient->name = CORBA_string_dup (name ? name : ""); recipient->address = CORBA_string_dup (addr ? addr : ""); @@ -948,11 +948,11 @@ eab_send_contact_list_as_attachment (GList *contacts) return; CORBA_exception_init (&ev); - + composer_server = bonobo_activation_activate_from_id (COMPOSER_OAFID, 0, NULL, &ev); - + content_type = CORBA_string_dup ("text/x-vcard"); filename = CORBA_string_dup (""); @@ -975,17 +975,17 @@ eab_send_contact_list_as_attachment (GList *contacts) memcpy (attach_data->_buffer, tempstr, attach_data->_length); g_free (tempstr); - GNOME_Evolution_Composer_attachData (composer_server, + GNOME_Evolution_Composer_attachData (composer_server, content_type, filename, description, show_inline, attach_data, &ev); - + if (ev._major != CORBA_NO_EXCEPTION) { g_printerr ("gui/e-meeting-edit.c: I couldn't attach data to the composer via CORBA! Aagh.\n"); CORBA_exception_free (&ev); return; } - + CORBA_free (content_type); CORBA_free (filename); CORBA_free (description); @@ -993,7 +993,7 @@ eab_send_contact_list_as_attachment (GList *contacts) to_list = GNOME_Evolution_Composer_RecipientList__alloc (); to_list->_maximum = to_list->_length = 0; - + cc_list = GNOME_Evolution_Composer_RecipientList__alloc (); cc_list->_maximum = cc_list->_length = 0; @@ -1025,7 +1025,7 @@ eab_send_contact_list_as_attachment (GList *contacts) subject = CORBA_string_dup (tempstr); g_free (tempstr); } - + GNOME_Evolution_Composer_setHeaders (composer_server, "", to_list, cc_list, bcc_list, subject, &ev); CORBA_free (to_list); diff --git a/addressbook/gui/widgets/eab-menu.c b/addressbook/gui/widgets/eab-menu.c index c35cd6ba61..d1c8b4e243 100644 --- a/addressbook/gui/widgets/eab-menu.c +++ b/addressbook/gui/widgets/eab-menu.c @@ -115,8 +115,8 @@ EABMenu *eab_menu_new(const char *menuid) * @cards: Cards selected. This will be freed on completion and the array indices unreferenced. * * Create a new selection menu target. - * - * Return value: + * + * Return value: **/ EABMenuTargetSelect * eab_menu_target_new_select(EABMenu *eabp, struct _EBook *book, int readonly, GPtrArray *cards) @@ -139,7 +139,7 @@ eab_menu_target_new_select(EABMenu *eabp, struct _EBook *book, int readonly, GPt email = e_contact_get(E_CONTACT(contact), E_CONTACT_EMAIL); if (email) { has_email = TRUE; - + g_list_foreach(email, (GFunc)g_free, NULL); g_list_free(email); } @@ -243,7 +243,7 @@ GType eab_menu_hook_get_type(void) { static GType type = 0; - + if (!type) { static const GTypeInfo info = { sizeof(EABMenuHookClass), NULL, NULL, (GClassInitFunc) eabmph_class_init, NULL, NULL, @@ -253,6 +253,6 @@ eab_menu_hook_get_type(void) eabmph_parent_class = g_type_class_ref(e_menu_hook_get_type()); type = g_type_register_static(e_menu_hook_get_type(), "EABMenuHook", &info, 0); } - + return type; } diff --git a/addressbook/gui/widgets/eab-menu.h b/addressbook/gui/widgets/eab-menu.h index 9f521cca85..d095ce9e74 100644 --- a/addressbook/gui/widgets/eab-menu.h +++ b/addressbook/gui/widgets/eab-menu.h @@ -44,7 +44,7 @@ enum _eab_menu_target_t { /** * enum _eab_menu_target_select_t - EABMenuTargetSelect qualifiers. - * + * * @EAB_MENU_SELECT_ONE: Only one item is selected. * @EAB_MENU_SELECT_MANY: More than one item selected. * @EAB_MENU_SELECT_ANY: One or more items selected. diff --git a/addressbook/gui/widgets/eab-popup-control.c b/addressbook/gui/widgets/eab-popup-control.c index 81baba6752..94e46e0524 100644 --- a/addressbook/gui/widgets/eab-popup-control.c +++ b/addressbook/gui/widgets/eab-popup-control.c @@ -13,12 +13,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 @@ -213,7 +213,7 @@ eab_popup_control_set_free_form (EABPopupControl *pop, const gchar *txt) return TRUE; } - + return FALSE; } @@ -326,7 +326,7 @@ emit_event (EABPopupControl *pop, const char *event) event, arg, NULL); bonobo_arg_release (arg); - } + } } static void diff --git a/addressbook/gui/widgets/eab-popup-control.h b/addressbook/gui/widgets/eab-popup-control.h index 7112c90606..1d7ee36f0a 100644 --- a/addressbook/gui/widgets/eab-popup-control.h +++ b/addressbook/gui/widgets/eab-popup-control.h @@ -13,12 +13,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 @@ -54,7 +54,7 @@ struct _EABPopupControl { GtkWidget *name_widget; GtkWidget *email_widget; GtkWidget *query_msg; - + GtkWidget *main_vbox; GtkWidget *generic_view; GtkWidget *contact_display; diff --git a/addressbook/gui/widgets/eab-popup.c b/addressbook/gui/widgets/eab-popup.c index d37c1b7b73..ad43bde11e 100644 --- a/addressbook/gui/widgets/eab-popup.c +++ b/addressbook/gui/widgets/eab-popup.c @@ -131,8 +131,8 @@ EABPopup *eab_popup_new(const char *menuid) * @cards: Cards selected. This will be freed on completion. * * Create a new selection popup target. - * - * Return value: + * + * Return value: **/ @@ -180,7 +180,7 @@ eab_popup_target_new_select(EABPopup *eabp, struct _EBook *book, int readonly, G email = e_contact_get(E_CONTACT(contact), E_CONTACT_EMAIL); if (email) { has_email = TRUE; - + g_list_foreach(email, (GFunc)g_free, NULL); g_list_free(email); } @@ -352,7 +352,7 @@ GType eab_popup_hook_get_type(void) { static GType type = 0; - + if (!type) { static const GTypeInfo info = { sizeof(EABPopupHookClass), NULL, NULL, (GClassInitFunc) eabph_class_init, NULL, NULL, @@ -362,6 +362,6 @@ eab_popup_hook_get_type(void) eabph_parent_class = g_type_class_ref(e_popup_hook_get_type()); type = g_type_register_static(e_popup_hook_get_type(), "EABPopupHook", &info, 0); } - + return type; } diff --git a/addressbook/gui/widgets/eab-popup.h b/addressbook/gui/widgets/eab-popup.h index 3a1fbafd95..2f7b50a30f 100644 --- a/addressbook/gui/widgets/eab-popup.h +++ b/addressbook/gui/widgets/eab-popup.h @@ -38,7 +38,7 @@ typedef struct _EABPopupClass EABPopupClass; /** * enum _eab_popup_target_t - A list of mail popup target types. - * + * * @EAB_POPUP_TARGET_SELECT: A selection of cards * @EAB_POPUP_TARGET_SOURCE: A source selection. * @@ -53,7 +53,7 @@ enum _eab_popup_target_t { /** * enum _eab_popup_target_select_t - EABPopupTargetSelect qualifiers. - * + * * @EAB_POPUP_SELECT_ONE: Only one item is selected. * @EAB_POPUP_SELECT_MANY: Two or more items are selected. * @EAB_POPUP_SELECT_ANY: One or more items are selected. @@ -77,10 +77,10 @@ enum _eab_popup_target_uri_t { }; /** * enum _eab_popup_target_source_t - EABPopupTargetSource qualifiers. - * + * * @EAB_POPUP_SOURCE_PRIMARY: Has a primary selection. * @EAB_POPUP_SOURCE_SYSTEM: Is a 'system' folder. - * + * **/ enum _eab_popup_target_source_t { EAB_POPUP_SOURCE_PRIMARY = 1<<0, @@ -94,7 +94,7 @@ typedef struct _EABPopupTargetSelectNames EABPopupTargetSelectNames; typedef struct _EABPopupTargetURI EABPopupTargetURI; /** * struct _EABPopupTargetSelect - A list of address cards. - * + * * @target: Superclass. * @book: Book the cards belong to. * @cards: All selected cards. @@ -117,7 +117,7 @@ struct _EABPopupTargetURI { /** * struct _EABPopupTargetSource - A source target. - * + * * @target: Superclass. * @selector: Selector holding the source selection. * @@ -133,7 +133,7 @@ struct _EABPopupTargetSource { /** * struct _EABPopupTargetSelectNames - A select names target. - * + * * @target: Superclass. * @model: Select names model. * @row: Row of item selected. diff --git a/addressbook/gui/widgets/eab-vcard-control.c b/addressbook/gui/widgets/eab-vcard-control.c index 678a841be9..8922c396c5 100644 --- a/addressbook/gui/widgets/eab-vcard-control.c +++ b/addressbook/gui/widgets/eab-vcard-control.c @@ -112,8 +112,8 @@ pstream_load (BonoboPersistStream *ps, const Bonobo_Stream stream, char *vcard; EABVCardControl *vcard_control = data; - if (type && g_ascii_strcasecmp (type, "text/vCard") != 0 && - g_ascii_strcasecmp (type, "text/x-vCard") != 0) { + if (type && g_ascii_strcasecmp (type, "text/vCard") != 0 && + g_ascii_strcasecmp (type, "text/x-vCard") != 0) { CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_Bonobo_Persist_WrongDataType, NULL); return; @@ -140,8 +140,8 @@ pstream_load (BonoboPersistStream *ps, const Bonobo_Stream stream, if (list && list->next) { char *message; int length = g_list_length (list) - 1; - message = g_strdup_printf (ngettext("There is one other contact.", - "There are %d other contacts.", length), + message = g_strdup_printf (ngettext("There is one other contact.", + "There are %d other contacts.", length), length); gtk_label_set_text (GTK_LABEL (vcard_control->label), message); g_free (message); @@ -163,8 +163,8 @@ pstream_save (BonoboPersistStream *ps, const Bonobo_Stream stream, char *vcard; int length; - if (type && g_ascii_strcasecmp (type, "text/vCard") != 0 && - g_ascii_strcasecmp (type, "text/x-vCard") != 0) { + if (type && g_ascii_strcasecmp (type, "text/vCard") != 0 && + g_ascii_strcasecmp (type, "text/x-vCard") != 0) { CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_Bonobo_Persist_WrongDataType, NULL); return; diff --git a/addressbook/gui/widgets/gal-view-minicard.c b/addressbook/gui/widgets/gal-view-minicard.c index dc32f74fc5..cf0833d1fe 100644 --- a/addressbook/gui/widgets/gal-view-minicard.c +++ b/addressbook/gui/widgets/gal-view-minicard.c @@ -22,7 +22,7 @@ static GalViewClass *gal_view_minicard_parent_class; -static void +static void gal_view_minicard_load (GalView *view, const char *filename) { diff --git a/addressbook/gui/widgets/test-reflow.c b/addressbook/gui/widgets/test-reflow.c index 25b9c525a5..a71a052525 100644 --- a/addressbook/gui/widgets/test-reflow.c +++ b/addressbook/gui/widgets/test-reflow.c @@ -102,7 +102,7 @@ static void resize(GnomeCanvas *canvas, gpointer data) gnome_canvas_item_set( rect, "x2", (double) width, "y2", (double) last_alloc.height, - NULL ); + NULL ); } int main( int argc, char *argv[] ) @@ -157,7 +157,7 @@ int main( int argc, char *argv[] ) e_scroll_frame_set_policy (E_SCROLL_FRAME (scrollframe), GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER); - + gtk_container_add (GTK_CONTAINER (scrollframe), canvas); gnome_app_set_contents( GNOME_APP( app ), scrollframe ); @@ -172,7 +172,7 @@ int main( int argc, char *argv[] ) gtk_widget_show_all( app ); gdk_window_set_back_pixmap( GTK_LAYOUT(canvas)->bin_window, NULL, FALSE); - gtk_main(); + gtk_main(); /* Not reached. */ return 0; |