diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2007-03-27 19:28:14 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2007-03-27 19:28:14 +0800 |
commit | c8d411ce2bc362cc76ad6d820e7397b3e8a01c3d (patch) | |
tree | c38e2d6abe33e2ea0564e36bc150897fc3fbb8fb /addressbook/gui/widgets | |
parent | b835359be0b9d33022dee7c815ebde9194eee2cf (diff) | |
download | gsoc2013-evolution-c8d411ce2bc362cc76ad6d820e7397b3e8a01c3d.tar.gz gsoc2013-evolution-c8d411ce2bc362cc76ad6d820e7397b3e8a01c3d.tar.zst gsoc2013-evolution-c8d411ce2bc362cc76ad6d820e7397b3e8a01c3d.zip |
Don't mix declarations and code (#405495).
2007-03-27 Matthew Barnes <mbarnes@redhat.com>
* 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
Diffstat (limited to 'addressbook/gui/widgets')
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 6 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-contact-display.c | 35 | ||||
-rw-r--r-- | addressbook/gui/widgets/gal-view-minicard.c | 12 |
3 files changed, 27 insertions, 26 deletions
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); |