From c8d411ce2bc362cc76ad6d820e7397b3e8a01c3d Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 27 Mar 2007 11:28:14 +0000 Subject: Don't mix declarations and code (#405495). 2007-03-27 Matthew Barnes * a11y/e-table/gal-a11y-e-cell-text.c: * a11y/e-table/gal-a11y-e-cell-vbox.c: * addressbook/gui/component/addressbook-component.c: * addressbook/gui/component/addressbook-view.c: * addressbook/gui/contact-editor/e-contact-editor.c: * addressbook/gui/contact-editor/e-contact-quick-add.c: * addressbook/gui/widgets/e-addressbook-view.c: * addressbook/gui/widgets/eab-contact-display.c: * addressbook/gui/widgets/gal-view-minicard.c: * calendar/gui/alarm-notify/alarm-queue.c: * calendar/gui/dialogs/comp-editor.c: * calendar/gui/dialogs/event-page.c: * calendar/gui/dialogs/memo-page.c: * calendar/gui/dialogs/task-page.c: * calendar/gui/e-cal-popup.c: * calendar/gui/e-meeting-list-view.c: * calendar/gui/e-tasks.c: * calendar/gui/gnome-cal.c: * composer/e-msg-composer.c: * mail/em-folder-browser.c: * mail/em-format.c: * mail/em-popup.c: * plugins/exchange-operations/exchange-account-setup.c: * plugins/exchange-operations/exchange-calendar.c: * plugins/exchange-operations/exchange-config-listener.c: * plugins/exchange-operations/exchange-contacts.c: * plugins/import-ics-attachments/icsimporter.c: * widgets/misc/e-filter-bar.c: * widgets/misc/e-multi-config-dialog.c: * widgets/table/e-cell-checkbox.c: * widgets/table/e-table-header-item.c: Don't mix declarations and code (#405495). svn path=/trunk/; revision=33324 --- plugins/exchange-operations/ChangeLog | 8 ++++++++ plugins/exchange-operations/exchange-account-setup.c | 2 +- plugins/exchange-operations/exchange-calendar.c | 11 +++++------ plugins/exchange-operations/exchange-config-listener.c | 10 ++++------ plugins/exchange-operations/exchange-contacts.c | 5 ++--- plugins/import-ics-attachments/ChangeLog | 4 ++++ plugins/import-ics-attachments/icsimporter.c | 9 +++++---- 7 files changed, 29 insertions(+), 20 deletions(-) (limited to 'plugins') diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog index 4ebbabbb4d..72601f8f11 100644 --- a/plugins/exchange-operations/ChangeLog +++ b/plugins/exchange-operations/ChangeLog @@ -1,3 +1,11 @@ +2007-03-27 Matthew Barnes + + * exchange-account-setup.c: + * exchange-calendar.c: + * exchange-config-listener.c: + * exchange-contacts.c: + Don't mix declarations and code (#405495). + 2007-03-20 Matthew Barnes ** Fixes part of bug #419524 diff --git a/plugins/exchange-operations/exchange-account-setup.c b/plugins/exchange-operations/exchange-account-setup.c index 0ac6ffcd75..5806243fa8 100644 --- a/plugins/exchange-operations/exchange-account-setup.c +++ b/plugins/exchange-operations/exchange-account-setup.c @@ -710,10 +710,10 @@ void org_gnome_exchange_commit (EPlugin *epl, EConfigHookItemFactoryData *data) { EMConfigTargetAccount *target_account; - target_account = (EMConfigTargetAccount *)data->config->target; const char *source_url; CamelURL *url; + target_account = (EMConfigTargetAccount *)data->config->target; source_url = e_account_get_string (target_account->account, E_ACCOUNT_SOURCE_URL); url = camel_url_new (source_url, NULL); if (url == NULL diff --git a/plugins/exchange-operations/exchange-calendar.c b/plugins/exchange-operations/exchange-calendar.c index 3d47c6c636..bd19c50cef 100644 --- a/plugins/exchange-operations/exchange-calendar.c +++ b/plugins/exchange-operations/exchange-calendar.c @@ -309,6 +309,11 @@ e_exchange_calendar_check (EPlugin *epl, EConfigHookPageCheckData *data) const char *base_uri; const char *rel_uri; gint offline_status; + ExchangeAccount *account; + EUri *euri; + int uri_len; + gchar *uri_text, *uri_string, *path, *folder_name; + gboolean is_personal; rel_uri = e_source_peek_relative_uri (t->source); group = e_source_peek_group (t->source); @@ -330,12 +335,6 @@ e_exchange_calendar_check (EPlugin *epl, EConfigHookPageCheckData *data) return TRUE; } - ExchangeAccount *account; - EUri *euri; - int uri_len; - gchar *uri_text, *uri_string, *path, *folder_name; - gboolean is_personal; - account = exchange_operations_get_exchange_account (); uri_text = e_source_get_uri (t->source); euri = e_uri_new (uri_text); diff --git a/plugins/exchange-operations/exchange-config-listener.c b/plugins/exchange-operations/exchange-config-listener.c index 5466c9b82d..d7a2fc54c7 100644 --- a/plugins/exchange-operations/exchange-config-listener.c +++ b/plugins/exchange-operations/exchange-config-listener.c @@ -793,6 +793,10 @@ exchange_config_listener_authenticate (ExchangeConfigListener *ex_conf_listener, } if (result == EXCHANGE_ACCOUNT_CONNECT_SUCCESS) { int max_pwd_age_days; + GladeXML *xml; + GtkWidget *dialog; + GtkResponseType response; + gboolean oof; /* check for password expiry warning */ max_pwd_age_days = exchange_account_check_password_expiry (account); @@ -801,12 +805,6 @@ exchange_config_listener_authenticate (ExchangeConfigListener *ex_conf_listener, } /* check for oof state */ - - GladeXML *xml; - GtkWidget *dialog; - GtkResponseType response; - gboolean oof; - if (exchange_oof_get (account, &oof, NULL)) { if (oof) { /* OOF state is set, check if user wants to set it back to in-office */ diff --git a/plugins/exchange-operations/exchange-contacts.c b/plugins/exchange-operations/exchange-contacts.c index a1ea6dab98..d33a2024a7 100644 --- a/plugins/exchange-operations/exchange-contacts.c +++ b/plugins/exchange-operations/exchange-contacts.c @@ -104,14 +104,13 @@ e_exchange_contacts_pcontacts_on_change (GtkTreeView *treeview, ESource *source) GtkTreeIter iter; ExchangeAccount *account; gchar *es_ruri; + gchar *ruri; account = exchange_operations_get_exchange_account (); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)); gtk_tree_selection_get_selected(selection, &model, &iter); - gchar *ruri; - gtk_tree_model_get (model, &iter, CONTACTSRURI_COL, &ruri, -1); es_ruri = g_strconcat (account->account_filename, "/;", ruri, NULL); e_source_set_relative_uri (source, es_ruri); @@ -307,6 +306,7 @@ e_exchange_contacts_check (EPlugin *epl, EConfigHookPageCheckData *data) const char *base_uri; const char *rel_uri; gint offline_status; + ExchangeAccount *account; rel_uri = e_source_peek_relative_uri (t->source); group = e_source_peek_group (t->source); @@ -327,7 +327,6 @@ e_exchange_contacts_check (EPlugin *epl, EConfigHookPageCheckData *data) return TRUE; } - ExchangeAccount *account; account = exchange_operations_get_exchange_account (); if (!rel_uri) { diff --git a/plugins/import-ics-attachments/ChangeLog b/plugins/import-ics-attachments/ChangeLog index fecf14f5ee..ebd4d650bf 100644 --- a/plugins/import-ics-attachments/ChangeLog +++ b/plugins/import-ics-attachments/ChangeLog @@ -1,3 +1,7 @@ +2007-03-27 Matthew Barnes + + * icsimporter.c: Don't mix declarations and code (#405495). + 2007-03-20 Matthew Barnes ** Fixes part of bug #419524 diff --git a/plugins/import-ics-attachments/icsimporter.c b/plugins/import-ics-attachments/icsimporter.c index 4300c1216c..db5c96d1d0 100644 --- a/plugins/import-ics-attachments/icsimporter.c +++ b/plugins/import-ics-attachments/icsimporter.c @@ -198,6 +198,9 @@ init_widgets(char *path) ESource *primary; GtkWidget *scrolled; ICalImporterData *icidata = g_malloc0(sizeof(*icidata)); + GtkWidget *icon, *button; + char *label_str = NULL; + char *markup; g_return_if_fail ( path != NULL); dialog = gtk_dialog_new_with_buttons (_("Import ICS"), @@ -225,7 +228,6 @@ init_widgets(char *path) subcomp = icalcomponent_get_inner(icidata->icalcomp); kind = icalcomponent_isa (subcomp); - char *label_str = NULL; if (kind == ICAL_VTODO_COMPONENT ) { e_cal_get_sources (&source_list, E_CAL_SOURCE_TYPE_TODO, NULL); label_str = _("Select Task List"); @@ -236,7 +238,6 @@ init_widgets(char *path) icidata->source_type = E_CAL_SOURCE_TYPE_EVENT; } - char *markup; markup = g_markup_printf_escaped ("%s", label_str); gtk_label_set_markup (GTK_LABEL (label), markup); hbox = gtk_hbox_new (FALSE, FALSE); @@ -261,12 +262,12 @@ init_widgets(char *path) g_object_unref (source_list); hbox = gtk_hbox_new (FALSE, FALSE); - GtkWidget *icon = e_icon_factory_get_image ("stock_mail-import", E_ICON_SIZE_MENU); + icon = e_icon_factory_get_image ("stock_mail-import", E_ICON_SIZE_MENU); gtk_box_pack_start (GTK_BOX(hbox), icon, FALSE, FALSE, 6); label = gtk_label_new_with_mnemonic (_("_Import")); gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 6); gtk_widget_show(label); - GtkWidget *button = gtk_button_new (); + button = gtk_button_new (); gtk_container_add (GTK_CONTAINER (button), hbox); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK); gtk_widget_grab_focus (button); -- cgit