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/component | |
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/component')
-rw-r--r-- | addressbook/gui/component/addressbook-component.c | 26 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook-config.c | 34 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook-migrate.c | 70 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook-migrate.h | 2 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook-view.c | 122 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook-view.h | 4 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook.c | 14 | ||||
-rw-r--r-- | addressbook/gui/component/autocompletion-config.c | 4 | ||||
-rw-r--r-- | addressbook/gui/component/openldap-extract.h | 12 |
9 files changed, 144 insertions, 144 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++; |