diff options
40 files changed, 186 insertions, 114 deletions
diff --git a/a11y/ChangeLog b/a11y/ChangeLog index 255a874e3e..0b33665712 100644 --- a/a11y/ChangeLog +++ b/a11y/ChangeLog @@ -1,3 +1,9 @@ +2007-03-27 Matthew Barnes <mbarnes@redhat.com> + + * e-table/gal-a11y-e-cell-text.c: + * e-table/gal-a11y-e-cell-vbox.c: + Don't mix declarations and code (#405495). + 2007-03-20 Matthew Barnes <mbarnes@redhat.com> ** Fixes part of bug #419524 diff --git a/a11y/e-table/gal-a11y-e-cell-text.c b/a11y/e-table/gal-a11y-e-cell-text.c index d751af1452..baee1c3cbc 100644 --- a/a11y/e-table/gal-a11y-e-cell-text.c +++ b/a11y/e-table/gal-a11y-e-cell-text.c @@ -152,11 +152,12 @@ ect_get_character_at_offset (AtkText *text, GalA11yECell *gaec = GAL_A11Y_E_CELL (text); gunichar ret_val; gchar *at_offset; + gchar *full_text; if (!ect_check (text)) return -1; - gchar *full_text = e_cell_text_get_text_by_view (gaec->cell_view, gaec->model_col, gaec->row); + full_text = e_cell_text_get_text_by_view (gaec->cell_view, gaec->model_col, gaec->row); at_offset = g_utf8_offset_to_pointer (full_text, offset); ret_val = g_utf8_get_char_validated (at_offset, -1); g_free (full_text); @@ -236,11 +237,12 @@ ect_get_character_count (AtkText *text) { GalA11yECell *gaec = GAL_A11Y_E_CELL (text); gint ret_val; + gchar *full_text; if (!ect_check (text)) return -1; - gchar *full_text = e_cell_text_get_text_by_view (gaec->cell_view, gaec->model_col, gaec->row); + full_text = e_cell_text_get_text_by_view (gaec->cell_view, gaec->model_col, gaec->row); ret_val = g_utf8_strlen (full_text, -1); g_free (full_text); diff --git a/a11y/e-table/gal-a11y-e-cell-vbox.c b/a11y/e-table/gal-a11y-e-cell-vbox.c index 0a5125338c..a3ba582e91 100644 --- a/a11y/e-table/gal-a11y-e-cell-vbox.c +++ b/a11y/e-table/gal-a11y-e-cell-vbox.c @@ -36,8 +36,8 @@ static gint ecv_get_n_children (AtkObject *a11y) { g_return_val_if_fail (GAL_A11Y_IS_E_CELL_VBOX (a11y), 0); - GalA11yECellVbox *gaev = GAL_A11Y_E_CELL_VBOX (a11y); - return (gaev->a11y_subcell_count); + + return GAL_A11Y_E_CELL_VBOX (a11y)->a11y_subcell_count; } static void @@ -67,10 +67,11 @@ ecv_ref_child (AtkObject *a11y, gint i) AtkObject *ret; if (i < gaev->a11y_subcell_count) { if (gaev->a11y_subcells[i] == NULL) { + ECellView *subcell_view; gint model_col, row; row = gaec->row; model_col = ecvv->model_cols[i]; - ECellView *subcell_view = ecvv->subcell_views[i]; + subcell_view = ecvv->subcell_views[i]; ret = gal_a11y_e_cell_registry_get_object (NULL, gaec->item, subcell_view, @@ -204,14 +205,17 @@ AtkObject *gal_a11y_e_cell_vbox_new (ETableItem *item, int row) { AtkObject *a11y; + GalA11yECell *gaec; + GalA11yECellVbox *gaev; + ECellVboxView *ecvv; a11y = g_object_new (gal_a11y_e_cell_vbox_get_type (), NULL); gal_a11y_e_cell_construct (a11y, item, cell_view, parent, model_col, view_col, row); - GalA11yECell *gaec = GAL_A11Y_E_CELL (a11y); - GalA11yECellVbox *gaev = GAL_A11Y_E_CELL_VBOX (a11y); - ECellVboxView *ecvv = (ECellVboxView *) (gaec->cell_view); + gaec = GAL_A11Y_E_CELL (a11y); + gaev = GAL_A11Y_E_CELL_VBOX (a11y); + ecvv = (ECellVboxView *) (gaec->cell_view); gaev->a11y_subcell_count = ecvv->subcell_view_count; gaev->a11y_subcells = g_malloc0 (sizeof(AtkObject *)*gaev->a11y_subcell_count); return a11y; diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index ab9a377ec3..cee8de1cf0 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,14 @@ +2007-03-27 Matthew Barnes <mbarnes@redhat.com> + + * gui/contact-editor/e-contact-editor.c: + * gui/contact-editor/e-contact-quick-add.c: + * gui/component/addressbook-component.c: + * gui/component/addressbook-view.c: + * gui/widgets/eab-contact-display.c: + * gui/widgets/gal-view-minicard.c: + * gui/widgets/e-addressbook-view.c: + Don't mix declarations and code (#405495). + 2007-03-20 Matthew Barnes <mbarnes@redhat.com> ** Fixes part of bug #419524 diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c index 1c9262365f..af65240d83 100644 --- a/addressbook/gui/component/addressbook-component.c +++ b/addressbook/gui/component/addressbook-component.c @@ -193,12 +193,11 @@ impl_createView (PortableServer_Servant servant, AddressbookComponent *addressbook_component = ADDRESSBOOK_COMPONENT (bonobo_object_from_servant (servant)); AddressbookComponentPrivate *priv = addressbook_component->priv; AddressbookView *view = addressbook_view_new (); + EComponentView *component_view; g_object_weak_ref (G_OBJECT (view), view_destroyed_cb, addressbook_component); priv->views = g_list_append (priv->views, view); - EComponentView *component_view; - component_view = e_component_view_new_controls (parent, "contacts", bonobo_control_new (addressbook_view_peek_sidebar (view)), addressbook_view_peek_folder_view (view), diff --git a/addressbook/gui/component/addressbook-view.c b/addressbook/gui/component/addressbook-view.c index 37cc297f6c..7defe5e42b 100644 --- a/addressbook/gui/component/addressbook-view.c +++ b/addressbook/gui/component/addressbook-view.c @@ -1169,6 +1169,8 @@ selector_tree_drag_data_received (GtkWidget *widget, EBook *source_book, *target_book; MergeContext *merge_context; GList *contactlist; + AddressbookView *view; + EABView *v; if (!gtk_tree_view_get_dest_row_at_pos (GTK_TREE_VIEW (widget), x, y, &path, &pos)) @@ -1193,8 +1195,8 @@ selector_tree_drag_data_received (GtkWidget *widget, eab_book_and_contact_list_from_string (data->data, &source_book, &contactlist); - AddressbookView *view = (AddressbookView *) user_data; - EABView *v = get_current_view (view); + view = (AddressbookView *) user_data; + v = get_current_view (view); g_object_get (v->model, "book",&source_book, NULL); /* Set up merge context */ diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 8dab79c465..1f857e593a 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -606,12 +606,9 @@ sensitize_ok (EContactEditor *ce) { GtkWidget *widget; gboolean allow_save; - GtkWidget *entry_fullname; - GtkWidget *entry_file_as; - GtkWidget *company_name; - entry_fullname = glade_xml_get_widget (ce->gui, "entry-fullname" ); - entry_file_as = glade_xml_get_widget (ce->gui, "entry-file-as"); - company_name = glade_xml_get_widget (ce->gui, "entry-company"); + GtkWidget *entry_fullname = glade_xml_get_widget (ce->gui, "entry-fullname" ); + GtkWidget *entry_file_as = glade_xml_get_widget (ce->gui, "entry-file-as"); + GtkWidget *company_name = glade_xml_get_widget (ce->gui, "entry-company"); const char *name_entry_string = gtk_entry_get_text (GTK_ENTRY (entry_fullname)); const char *file_as_entry_string = gtk_entry_get_text (GTK_ENTRY (entry_file_as)); const char *company_name_string = gtk_entry_get_text (GTK_ENTRY (company_name)); @@ -3003,12 +3000,9 @@ save_contact (EContactEditor *ce, gboolean should_close) return; } - GtkWidget *entry_fullname; - GtkWidget *entry_file_as; - GtkWidget *company_name; - entry_fullname = glade_xml_get_widget (ce->gui, "entry-fullname" ); - entry_file_as = glade_xml_get_widget (ce->gui, "entry-file-as"); - company_name = glade_xml_get_widget (ce->gui, "entry-company"); + GtkWidget *entry_fullname = glade_xml_get_widget (ce->gui, "entry-fullname" ); + GtkWidget *entry_file_as = glade_xml_get_widget (ce->gui, "entry-file-as"); + GtkWidget *company_name = glade_xml_get_widget (ce->gui, "entry-company"); const char *name_entry_string = gtk_entry_get_text (GTK_ENTRY (entry_fullname)); const char *file_as_entry_string = gtk_entry_get_text (GTK_ENTRY (entry_file_as)); const char *company_name_string = gtk_entry_get_text (GTK_ENTRY (company_name)); diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.c b/addressbook/gui/contact-editor/e-contact-quick-add.c index 549b8ecb83..ea3e7b6f35 100644 --- a/addressbook/gui/contact-editor/e-contact-quick-add.c +++ b/addressbook/gui/contact-editor/e-contact-quick-add.c @@ -279,6 +279,8 @@ source_selected (GtkWidget *source_option_menu, ESource *source, QuickAdd *qa) static GtkWidget * build_quick_add_dialog (QuickAdd *qa) { + ESourceList *source_list; + GConfClient *gconf_client; GtkWidget *dialog; GtkWidget *label; GtkTable *table; @@ -312,9 +314,6 @@ build_quick_add_dialog (QuickAdd *qa) if (qa->email) gtk_entry_set_text (GTK_ENTRY (qa->email_entry), qa->email); - ESourceList *source_list; - GConfClient *gconf_client; - gconf_client = gconf_client_get_default (); source_list = e_source_list_new_for_gconf (gconf_client, "/apps/evolution/addressbook/sources"); qa->option_menu = e_source_option_menu_new (source_list); diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index c011f385d3..5410bef787 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -1844,12 +1844,13 @@ eab_view_print(EABView *view, int preview) char *query; EBook *book; GtkWidget *print; + GList *list; g_object_get (view->model, "query", &query, "book", &book, NULL); - GList *list = get_selected_contacts (view); + list = get_selected_contacts (view); print = e_contact_print_dialog_new (book, query, list); if (!preview) @@ -1902,13 +1903,14 @@ eab_view_print_preview(EABView *view) char *query; EBook *book; GtkWidget *dialog; + GList *list; g_object_get (view->model, "query", &query, "book", &book, NULL); - GList *list = get_selected_contacts (view); + list = get_selected_contacts (view); if (list != NULL) dialog = e_contact_print_contact_list_dialog_new (list); else diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c index 6962962b0d..ddade470a2 100644 --- a/addressbook/gui/widgets/eab-contact-display.c +++ b/addressbook/gui/widgets/eab-contact-display.c @@ -95,11 +95,10 @@ eab_uri_popup_email_address_copy(EPopup *ep, EPopupItem *item, void *data) EABContactDisplay *display = data; struct _EABContactDisplayPrivate *p = display->priv; EABPopupTargetURI *t = (EABPopupTargetURI *)ep->target; - const char *url; + const char *url = t->uri; char *html=NULL; int i=0; GList *email_list, *l; - url = t->uri; int email_num = atoi (url + strlen ("internal-mailto:")); email_list = e_contact_get (p->contact, E_CONTACT_EMAIL); @@ -134,11 +133,10 @@ static void eab_uri_popup_address_send(EPopup *ep, EPopupItem *item, void *data) { EABPopupTargetURI *t = (EABPopupTargetURI *)ep->target; - const char *url; + const char *url = t->uri; EABContactDisplay *display = data; struct _EABContactDisplayPrivate *p = display->priv; - url = t->uri; int mail_num = atoi (url + strlen ("internal-mailto:")); if (mail_num == -1) @@ -199,22 +197,19 @@ eab_uri_popup_event(EABContactDisplay *display, GdkEvent *event, const char *uri EABPopup *emp; EABPopupTargetURI *t ; GtkMenu *menu; - - - emp = eab_popup_new("org.gnome.evolution.addressbook.contactdisplay.popup"); - - GSList *menus = NULL; - int i; + GSList *menus = NULL; + int i; - t = eab_popup_target_new_uri(emp, uri); - t->target.widget = (GtkWidget *)display; + emp = eab_popup_new("org.gnome.evolution.addressbook.contactdisplay.popup"); - for (i=0;i<sizeof(eab_uri_popups)/sizeof(eab_uri_popups[0]);i++) { - eab_uri_popups[i].user_data = g_strdup(t->uri); - menus = g_slist_prepend(menus, &eab_uri_popups[i]); - } - e_popup_add_items((EPopup *)emp, menus, NULL, eab_uri_popup_free, display); - + t = eab_popup_target_new_uri(emp, uri); + t->target.widget = (GtkWidget *)display; + + for (i=0;i<sizeof(eab_uri_popups)/sizeof(eab_uri_popups[0]);i++) { + eab_uri_popups[i].user_data = g_strdup(t->uri); + menus = g_slist_prepend(menus, &eab_uri_popups[i]); + } + e_popup_add_items((EPopup *)emp, menus, NULL, eab_uri_popup_free, display); menu = e_popup_create_menu_once((EPopup *)emp,(EPopupTarget*)t, 0); @@ -867,9 +862,9 @@ eab_contact_display_new (void) { EABContactDisplay *display; - display = g_object_new (EAB_TYPE_CONTACT_DISPLAY, NULL); - struct _EABContactDisplayPrivate *p; + + display = g_object_new (EAB_TYPE_CONTACT_DISPLAY, NULL); p=display->priv = g_new0 (EABContactDisplayPrivate, 1); gtk_html_set_default_content_type (GTK_HTML (display), "text/html; charset=utf-8"); diff --git a/addressbook/gui/widgets/gal-view-minicard.c b/addressbook/gui/widgets/gal-view-minicard.c index 7111cc0cb8..6239ead080 100644 --- a/addressbook/gui/widgets/gal-view-minicard.c +++ b/addressbook/gui/widgets/gal-view-minicard.c @@ -188,24 +188,28 @@ static void column_width_changed (EMinicardViewWidget *w, double width, EABView *address_view) { GalViewMinicard *view = GAL_VIEW_MINICARD (gal_view_instance_get_current_view (address_view->view_instance)); + GtkScrolledWindow *scrolled_window; + GtkAdjustment *adj; + GtkAdjustment *adj_new; + d(g_print("%s: Old width = %f, New width = %f\n", G_GNUC_FUNCTION, view->column_width, width)); if (view->column_width != width) { view->column_width = width; gal_view_changed(GAL_VIEW(view)); } - GtkScrolledWindow * scrolled_window = GTK_SCROLLED_WINDOW(address_view->widget); - GtkAdjustment *adj = gtk_scrolled_window_get_hadjustment (scrolled_window); - GtkAdjustment *adj_new = gtk_adjustment_new(adj->value, adj->lower, adj->upper, adj->page_size, adj->page_increment,adj->page_size); + scrolled_window = GTK_SCROLLED_WINDOW(address_view->widget); + adj = gtk_scrolled_window_get_hadjustment (scrolled_window); + adj_new = gtk_adjustment_new(adj->value, adj->lower, adj->upper, adj->page_size, adj->page_increment,adj->page_size); gtk_scrolled_window_set_hadjustment(scrolled_window, adj_new); } void gal_view_minicard_attach (GalViewMinicard *view, EABView *address_view) { + EMinicardViewWidget *emvw = E_MINICARD_VIEW_WIDGET (address_view->object); gal_view_minicard_detach (view); - EMinicardViewWidget *emvw = E_MINICARD_VIEW_WIDGET (address_view->object); view->emvw = emvw; g_object_ref (view->emvw); diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 6e8897152e..c689008374 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,16 @@ +2007-03-27 Matthew Barnes <mbarnes@redhat.com> + + * gui/alarm-notify/alarm-queue.c: + * gui/dialogs/comp-editor.c: + * gui/dialogs/event-page.c: + * gui/dialogs/memo-page.c: + * gui/dialogs/task-page.c: + * gui/e-cal-popup.c: + * gui/e-meeting-list-view.c: + * gui/e-tasks.c: + * gui/gnome-cal.c: + Don't mix declarations and code (#405495). + 2007-03-20 Matthew Barnes <mbarnes@redhat.com> ** Fixes part of bug #419524 diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index cd25ada5d5..5f5060e8e8 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -1082,8 +1082,10 @@ tray_list_remove_cqa_async(EThread *e, AlarmMsg *msg, void *data) } else { GtkTreeIter iter; GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (alarm_notifications_dialog->treeview)); + GtkTreeSelection *sel; + gtk_tree_model_get_iter_first (model, &iter); - GtkTreeSelection *sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (alarm_notifications_dialog->treeview)); + sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (alarm_notifications_dialog->treeview)); gtk_tree_selection_select_iter (sel, &iter); } } @@ -1579,6 +1581,7 @@ popup_notification (time_t trigger, CompQueuedAlarms *cqa, char *str, *start_str, *end_str, *alarm_str, *time_str; icaltimezone *current_zone; ECalComponentOrganizer organiser; + NotifyNotification *n; char *body; d(printf("%s:%d (popup_notification)\n",__FILE__, __LINE__)); @@ -1627,7 +1630,7 @@ popup_notification (time_t trigger, CompQueuedAlarms *cqa, body = g_strdup_printf ("%s %s", start_str, time_str); } - NotifyNotification *n = notify_notification_new (summary, body, "stock_appointment-reminder", NULL); + n = notify_notification_new (summary, body, "stock_appointment-reminder", NULL); if (!notify_notification_show(n, NULL)) g_warning ("Could not send notification to daemon\n"); diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 71e31e0515..d74c23daef 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -2340,6 +2340,7 @@ set_attachment_list (CompEditor *editor, GSList *attach_list) CamelStream *stream; struct stat statbuf; char *mime_type, *file_name; + char *ptr; attach_filename = (char *) p->data; /* should we assert if g_str_has_prefix (attach_filename, "file://")) @@ -2394,7 +2395,7 @@ set_attachment_list (CompEditor *editor, GSList *attach_list) camel_mime_part_set_disposition (part, "attachment"); - char *ptr = strstr (file_name, comp_uid); + ptr = strstr (file_name, comp_uid); if (ptr) { ptr += strlen(comp_uid); if (*ptr++ == '-') diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index c8be07a0a9..74cd4d2144 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -3058,9 +3058,9 @@ event_page_construct (EventPage *epage, EMeetingStore *model, ECal *client) for (it = e_list_get_iterator((EList *)priv->accounts); e_iterator_is_valid(it); e_iterator_next(it)) { - a = (EAccount *)e_iterator_get(it); char *full; + a = (EAccount *)e_iterator_get(it); full = g_strdup_printf("%s <%s>", a->id->name, a->id->address); address_strings = g_list_append(address_strings, full); diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c index 15cf4ab83f..c0cade5155 100644 --- a/calendar/gui/dialogs/memo-page.c +++ b/calendar/gui/dialogs/memo-page.c @@ -1072,9 +1072,9 @@ memo_page_construct (MemoPage *mpage) for (it = e_list_get_iterator((EList *)priv->accounts); e_iterator_is_valid(it); e_iterator_next(it)) { - a = (EAccount *)e_iterator_get(it); char *full; + a = (EAccount *)e_iterator_get(it); full = g_strdup_printf("%s <%s>", a->id->name, a->id->address); address_strings = g_list_append(address_strings, full); diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index c40a7e6f9f..79b07d012b 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -1856,9 +1856,9 @@ task_page_construct (TaskPage *tpage, EMeetingStore *model, ECal *client) for (it = e_list_get_iterator((EList *)priv->accounts); e_iterator_is_valid(it); e_iterator_next(it)) { - a = (EAccount *)e_iterator_get(it); char *full; + a = (EAccount *)e_iterator_get(it); full = g_strdup_printf("%s <%s>", a->id->name, a->id->address); address_strings = g_list_append(address_strings, full); diff --git a/calendar/gui/e-cal-popup.c b/calendar/gui/e-cal-popup.c index ab12a51ab2..a0c3ce2c3b 100644 --- a/calendar/gui/e-cal-popup.c +++ b/calendar/gui/e-cal-popup.c @@ -574,9 +574,10 @@ e_cal_popup_target_new_select(ECalPopup *eabp, struct _ECalModel *model, GPtrArr if (t->events->len == 1) mask &= ~E_CAL_POPUP_SELECT_ONE; else { + int i=0; + mask &= ~E_CAL_POPUP_SELECT_MANY; /* Now check for any incomplete tasks and set the flags*/ - int i=0; for (; i < t->events->len; i++) { ECalModelComponent *comp_data = (ECalModelComponent *)t->events->pdata[i]; if (!icalcomponent_get_first_property (comp_data->icalcomp, ICAL_COMPLETED_PROPERTY)) diff --git a/calendar/gui/e-meeting-list-view.c b/calendar/gui/e-meeting-list-view.c index ff794f1048..c3ea4e8d89 100644 --- a/calendar/gui/e-meeting-list-view.c +++ b/calendar/gui/e-meeting-list-view.c @@ -877,9 +877,7 @@ e_meeting_list_view_invite_others_dialog (EMeetingListView *view) void e_meeting_list_view_set_editable (EMeetingListView *lview, gboolean set) { - EMeetingListViewPrivate *priv; - - priv = lview->priv; + EMeetingListViewPrivate *priv = lview->priv; gint edit_level = set; diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c index 14a2a80ffc..fec3839ddc 100644 --- a/calendar/gui/e-tasks.c +++ b/calendar/gui/e-tasks.c @@ -1430,8 +1430,10 @@ e_tasks_open_task_id (ETasks *tasks, return; for (l = tasks->priv->clients_list; l != NULL; l = l->next) { + ESource *client_src; + client = l->data; - ESource *client_src = e_cal_get_source (client); + client_src = e_cal_get_source (client); if (!strcmp (src_uid, e_source_peek_uid (client_src))) break; diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 6a00e4f37c..fb361ea7fa 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -3795,8 +3795,10 @@ gnome_calendar_edit_appointment (GnomeCalendar *gcal, return; for (l = gcal->priv->clients_list[E_CAL_SOURCE_TYPE_EVENT]; l != NULL; l = l->next) { + ESource *client_src; + client = l->data; - ESource *client_src = e_cal_get_source (client); + client_src = e_cal_get_source (client); if (!strcmp (src_uid, e_source_peek_uid (client_src))) break; diff --git a/composer/ChangeLog b/composer/ChangeLog index 6475dd7a8a..594e5aa67b 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,7 @@ +2007-03-27 Matthew Barnes <mbarnes@redhat.com> + + * e-msg-composer.c: Don't mix declarations and code (#405495). + 2007-03-20 Matthew Barnes <mbarnes@redhat.com> ** Fixes part of bug #419524 diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 17a2af7b9e..6f06bd7e74 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -1737,13 +1737,11 @@ menu_file_save_cb (BonoboUIComponent *uic, void *data, const char *path) { - EMsgComposer *composer; + EMsgComposer *composer = E_MSG_COMPOSER (data); + EMsgComposerPrivate *p = composer->priv; CORBA_char *file_name; CORBA_Environment ev; - composer = E_MSG_COMPOSER (data); - EMsgComposerPrivate *p = composer->priv; - CORBA_exception_init (&ev); file_name = Bonobo_PersistFile_getCurrentFile (p->persist_file_interface, &ev); @@ -1914,11 +1912,9 @@ menu_edit_select_all_cb (BonoboUIComponent *uic, void *data, const char *path) static void menu_edit_delete_all_cb (BonoboUIComponent *uic, void *data, const char *path) { - CORBA_Environment ev; - EMsgComposer *composer; - - composer = E_MSG_COMPOSER (data); + EMsgComposer *composer = E_MSG_COMPOSER (data); EMsgComposerPrivate *p = composer->priv; + CORBA_Environment ev; CORBA_exception_init (&ev); @@ -2696,9 +2692,7 @@ update_auto_recipients (EMsgComposerHdrs *hdrs, int mode, const char *auto_addrs static void from_changed_cb (EMsgComposerHdrs *hdrs, void *data) { - EMsgComposer *composer; - - composer = E_MSG_COMPOSER (data); + EMsgComposer *composer = E_MSG_COMPOSER (data); EMsgComposerPrivate *p = composer->priv; if (hdrs->account) { @@ -3812,7 +3806,7 @@ create_composer (int visible_mask) GList *icon_list; BonoboControlFrame *control_frame; GtkWidget *html_widget = NULL; - gpointer servant;; + gpointer servant; BonoboObject *impl; EMsgComposerPrivate *p; @@ -4746,12 +4740,13 @@ EMsgComposer * e_msg_composer_new_redirect (CamelMimeMessage *message, const char *resent_from) { EMsgComposer *composer; + EMsgComposerPrivate *p; const char *subject; g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL); composer = e_msg_composer_new_with_message (message); - EMsgComposerPrivate *p = composer->priv; + p = composer->priv; subject = camel_mime_message_get_subject (message); @@ -5116,11 +5111,13 @@ e_msg_composer_modify_header (EMsgComposer *composer, const char *name, void e_msg_composer_remove_header (EMsgComposer *composer, const char *name) { + EMsgComposerPrivate *p; + int i; + g_return_if_fail (E_IS_MSG_COMPOSER (composer)); g_return_if_fail (name != NULL); - int i; - EMsgComposerPrivate *p = composer->priv; + p = composer->priv; for (i = 0; i < p->extra_hdr_names->len; i++) { if (strcmp (p->extra_hdr_names->pdata[i], name) == 0) { diff --git a/mail/ChangeLog b/mail/ChangeLog index b51720be54..72f22728a9 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2007-03-27 Matthew Barnes <mbarnes@redhat.com> + + * em-folder-browser.c: + * em-format.c: + * em-popup.c: + Don't mix declarations and code (#405495). + 2007-03-20 Matthew Barnes <mbarnes@redhat.com> ** Fixes part of bug #419524 diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c index 329af0b290..2903a2e19d 100644 --- a/mail/em-folder-browser.c +++ b/mail/em-folder-browser.c @@ -959,7 +959,7 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb) EMFolderView *emfv = (EMFolderView *) emfb; EFilterBar *efb = (EFilterBar *)esb; char *search_state, *view_sexp, *folder_uri=NULL; - char *word = NULL, *storeuri = NULL, *search_word = NULL;; + char *word = NULL, *storeuri = NULL, *search_word = NULL; gint id, i; CamelFolder *folder; CamelStore *store; @@ -1784,6 +1784,7 @@ static void emfb_set_search_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri) { EMFolderBrowser *emfb = (EMFolderBrowser *) emfv; + char *state; message_list_freeze(emfv->list); @@ -1805,11 +1806,11 @@ emfb_set_search_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri) emfb_parent->set_folder(emfv, folder, uri); /* etspec for search results */ - char *state = "<ETableState>" - "<column source=\"0\"/> <column source=\"3\"/> <column source=\"1\"/>" - "<column source=\"14\"/> <column source=\"5\"/>" - "<column source=\"7\"/> <column source=\"13\"/> " - "<grouping><leaf column=\"7\" ascending=\"false\"/> </grouping> </ETableState>"; + state = "<ETableState>" + "<column source=\"0\"/> <column source=\"3\"/> <column source=\"1\"/>" + "<column source=\"14\"/> <column source=\"5\"/>" + "<column source=\"7\"/> <column source=\"13\"/> " + "<grouping><leaf column=\"7\" ascending=\"false\"/> </grouping> </ETableState>"; e_tree_set_state (((MessageList *)emfv->list)->tree, state); message_list_thaw(emfv->list); diff --git a/mail/em-format.c b/mail/em-format.c index 32fc1d0b91..1871e885c3 100644 --- a/mail/em-format.c +++ b/mail/em-format.c @@ -1235,10 +1235,13 @@ emf_multipart_alternative(EMFormat *emf, CamelStream *stream, CamelMimePart *par /* as per rfc, find the last part we know how to display */ nparts = camel_multipart_get_number(mp); for (i = 0; i < nparts; i++) { + CamelContentType *type; + char *mime_type; + /* is it correct to use the passed in *part here? */ part = camel_multipart_get_part(mp, i); - CamelContentType *type = camel_mime_part_get_content_type (part); - char *mime_type = camel_content_type_simple (type); + type = camel_mime_part_get_content_type (part); + mime_type = camel_content_type_simple (type); camel_strdown (mime_type); diff --git a/mail/em-popup.c b/mail/em-popup.c index 833da13696..c48f901d94 100644 --- a/mail/em-popup.c +++ b/mail/em-popup.c @@ -633,11 +633,11 @@ static EPopupItem emp_standard_uri_popups[] = { static void emp_apps_open_in(EPopup *ep, EPopupItem *item, void *data) { - printf("in emp_apps_open_in\n"); char *path; EPopupTarget *target = ep->target; CamelMimePart *part; + printf("in emp_apps_open_in\n"); if (target->type == EM_POPUP_TARGET_ATTACHMENTS) part = ((EAttachment *) ((EMPopupTargetAttachments *) target)->attachments->data)->body; else 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 <mbarnes@redhat.com> + + * 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 <mbarnes@redhat.com> ** 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 <mbarnes@redhat.com> + + * icsimporter.c: Don't mix declarations and code (#405495). + 2007-03-20 Matthew Barnes <mbarnes@redhat.com> ** 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 ("<b>%s</b>", 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); diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index b63c41fac9..ce2c894193 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,9 @@ +2007-03-27 Matthew Barnes <mbarnes@redhat.com> + + * e-filter-bar.c: + * e-multi-config-dialog.c: + Don't mix declarations and code (#405495). + 2007-03-20 Matthew Barnes <mbarnes@redhat.com> ** Fixes part of bug #419524 diff --git a/widgets/misc/e-filter-bar.c b/widgets/misc/e-filter-bar.c index 1e15a8b539..f755ac8dba 100644 --- a/widgets/misc/e-filter-bar.c +++ b/widgets/misc/e-filter-bar.c @@ -269,6 +269,7 @@ menubar_activated (ESearchBar *esb, int id, void *data) if (id >= efb->menu_base && id < efb->menu_base + efb->menu_rules->len) { #if d(!)0 GString *out = g_string_new (""); + GtkStyle *style; printf("Selected rule: %s\n", ((FilterRule *)efb->menu_rules->pdata[id - efb->menu_base])->name); filter_rule_build_code (efb->menu_rules->pdata[id - efb->menu_base], out); @@ -282,7 +283,7 @@ menubar_activated (ESearchBar *esb, int id, void *data) efb->setquery = FALSE; /* saved searches activated */ - GtkStyle *style = gtk_widget_get_default_style (); + style = gtk_widget_get_default_style (); efb->setquery = TRUE; gtk_widget_modify_base (esb->entry , GTK_STATE_NORMAL, &(style->base[GTK_STATE_SELECTED] )); gtk_widget_modify_text (esb->entry, GTK_STATE_NORMAL, &(style->text [GTK_STATE_SELECTED] )); diff --git a/widgets/misc/e-multi-config-dialog.c b/widgets/misc/e-multi-config-dialog.c index 60f9256705..fef0a507a9 100644 --- a/widgets/misc/e-multi-config-dialog.c +++ b/widgets/misc/e-multi-config-dialog.c @@ -389,6 +389,7 @@ e_multi_config_dialog_add_page (EMultiConfigDialog *dialog, { EMultiConfigDialogPrivate *priv; AtkObject *a11y; + AtkObject *a11yPage; gint page_no; g_return_if_fail (E_IS_MULTI_CONFIG_DIALOG (dialog)); @@ -411,7 +412,7 @@ e_multi_config_dialog_add_page (EMultiConfigDialog *dialog, NULL); a11y = gtk_widget_get_accessible (GTK_WIDGET(priv->notebook)); - AtkObject *a11yPage = atk_object_ref_accessible_child (a11y, page_no); + a11yPage = atk_object_ref_accessible_child (a11y, page_no); if (a11yPage != NULL) { if (atk_object_get_role (a11yPage) == ATK_ROLE_PAGE_TAB) atk_object_set_name (a11yPage, title); diff --git a/widgets/table/ChangeLog b/widgets/table/ChangeLog index ee35f6e2e7..9601d05e64 100644 --- a/widgets/table/ChangeLog +++ b/widgets/table/ChangeLog @@ -1,5 +1,11 @@ 2007-03-20 Matthew Barnes <mbarnes@redhat.com> + * e-cell-checkbox.c: + * e-table-header-item.c: + Don't mix declarations and code (#405495). + +2007-03-20 Matthew Barnes <mbarnes@redhat.com> + ** Fixes part of bug #419524 * Include <glib/gi18n.h> instead of <libgnome/gnome-i18n.h>. diff --git a/widgets/table/e-cell-checkbox.c b/widgets/table/e-cell-checkbox.c index 33135b5b71..8f3c8083fe 100644 --- a/widgets/table/e-cell-checkbox.c +++ b/widgets/table/e-cell-checkbox.c @@ -43,8 +43,7 @@ ecc_print (ECellView *ecell_view, GtkPrintContext *context, int model_col, int view_col, int row, double width, double height) { - cairo_t *cr; - cr = gtk_print_context_get_cairo_context (context); + cairo_t *cr = gtk_print_context_get_cairo_context (context); const int value = GPOINTER_TO_INT ( e_table_model_value_at (ecell_view->e_table_model, model_col, row)); cairo_save (cr); diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c index 15890b17b7..707d2baaa4 100644 --- a/widgets/table/e-table-header-item.c +++ b/widgets/table/e-table-header-item.c @@ -1514,7 +1514,7 @@ ethi_header_context_menu (ETableHeaderItem *ethi, GdkEventButton *event) { EthiHeaderInfo *info = g_new(EthiHeaderInfo, 1); ETableCol *col; - GtkMenu *popup, *sub_menu;; + GtkMenu *popup, *sub_menu; int ncol, sort_count, sort_col; GtkWidget *menu_item; GSList *group = NULL; |