From 96538878911586a9e9ca26b81e1916c04e538980 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 25 May 2010 10:15:32 -0400 Subject: Coding style and whitespace cleanup. --- addressbook/gui/contact-editor/e-contact-editor.c | 12 ++-- calendar/gui/alarm-notify/alarm-queue.c | 8 +-- calendar/gui/dialogs/cal-prefs-dialog.c | 2 +- calendar/gui/dialogs/comp-editor-util.c | 20 ++++-- calendar/gui/dialogs/comp-editor.c | 2 +- calendar/gui/dialogs/event-editor.c | 2 +- calendar/gui/dialogs/event-page.c | 9 +-- calendar/gui/dialogs/event-page.h | 4 +- calendar/gui/gnome-cal.c | 2 - capplet/settings/anjal-mail-view.c | 2 +- capplet/settings/mail-account-view.c | 86 +++++++++++------------ capplet/settings/mail-guess-servers.c | 4 +- composer/e-composer-header-table.c | 8 +-- e-util/e-alert-dialog.c | 11 ++- e-util/e-dialog-utils.c | 2 +- mail/e-mail-backend.c | 4 +- mail/e-mail-reader-utils.c | 29 +++++--- mail/e-mail-reader.c | 6 +- mail/em-account-editor.c | 5 +- mail/em-folder-tree-model.c | 9 ++- mail/em-folder-tree.c | 8 +-- mail/em-inline-filter.c | 2 +- modules/calendar/e-cal-shell-content.c | 8 +-- modules/calendar/e-cal-shell-sidebar.c | 8 +-- modules/calendar/e-cal-shell-view-actions.c | 2 +- modules/calendar/e-cal-shell-view-private.c | 23 +++--- modules/calendar/e-cal-shell-view.c | 12 ++-- modules/connman/evolution-connman.c | 6 +- modules/mail/e-mail-shell-sidebar.c | 46 ++++++------ modules/windows-sens/evolution-windows-sens.c | 42 +++++------ plugins/startup-wizard/startup-wizard.c | 1 - shell/e-shell-meego.c | 30 ++++---- shell/e-shell-switcher.c | 2 +- shell/e-shell-utils.c | 32 +++++---- shell/e-shell-utils.h | 2 +- shell/e-shell-view.c | 24 ++++--- shell/e-shell-window-actions.c | 9 ++- shell/e-shell-window-private.c | 2 +- shell/e-shell-window.c | 5 +- shell/e-shell.c | 9 ++- shell/e-shell.h | 6 +- shell/main.c | 4 +- widgets/misc/e-account-combo-box.c | 4 +- widgets/misc/e-account-combo-box.h | 2 +- widgets/misc/e-calendar.h | 2 +- widgets/misc/e-preferences-window.c | 23 +++--- 46 files changed, 287 insertions(+), 254 deletions(-) diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index f8cae86762..0f8eb07b15 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -1136,7 +1136,7 @@ set_attributes_named (EVCard *vcard, const gchar *attr_name, GList *attr_list) static void set_arrow_image (EContactEditor *editor, - const char *arrow_widget, + const gchar *arrow_widget, gboolean expanded) { GtkWidget *arrow; @@ -1150,10 +1150,10 @@ set_arrow_image (EContactEditor *editor, static void expand_widget_list (EContactEditor *editor, - const char **widget_names, + const gchar **widget_names, gboolean expanded) { - int i; + gint i; for (i = 0; widget_names[i]; i++) gtk_widget_set_visible ( e_builder_get_widget (editor->builder, widget_names[i]), @@ -1163,7 +1163,7 @@ expand_widget_list (EContactEditor *editor, static void expand_web (EContactEditor *editor, gboolean expanded) { - const char *names[] = { + const gchar *names[] = { "label-videourl", "label-fburl", "entry-videourl", "entry-fburl", NULL @@ -1175,7 +1175,7 @@ expand_web (EContactEditor *editor, gboolean expanded) static void expand_phone (EContactEditor *editor, gboolean expanded) { - const char *names[] = { + const gchar *names[] = { "entry-phone-2", "combobox-phone-2", "entry-phone-4", "combobox-phone-4", "table-phone-extended", NULL @@ -1189,7 +1189,7 @@ expand_mail (EContactEditor *editor, gboolean expanded) { GtkTable *table; GtkWidget *check; - const char *names[] = { + const gchar *names[] = { "entry-email-2", "combobox-email-2", "entry-email-3", "combobox-email-3", "entry-email-4", "combobox-email-4", diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index ae6eb3e172..ffa3d4b1f2 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -187,12 +187,12 @@ message_push (Message *msg) * use a static ring-buffer so we can call this twice * in a printf without getting nonsense results. */ -static const char * +static const gchar * e_ctime (const time_t *timep) { - static char *buffer[4] = { 0, }; - static int next = 0; - const char *ret; + static gchar *buffer[4] = { 0, }; + static gint next = 0; + const gchar *ret; g_free (buffer[next]); ret = buffer[next++] = g_strdup (ctime (timep)); diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c index e925838e58..f6ba176d00 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.c +++ b/calendar/gui/dialogs/cal-prefs-dialog.c @@ -806,7 +806,7 @@ calendar_prefs_dialog_construct (CalendarPrefsDialog *prefs, } /* Hook up and add the toplevel widget */ - + target = e_cal_config_target_new_prefs (ec, prefs->gconf); e_config_set_target ((EConfig *)ec, (EConfigTarget *) target); toplevel = e_config_create_widget ((EConfig *)ec); diff --git a/calendar/gui/dialogs/comp-editor-util.c b/calendar/gui/dialogs/comp-editor-util.c index cd16b46974..9f96011eda 100644 --- a/calendar/gui/dialogs/comp-editor-util.c +++ b/calendar/gui/dialogs/comp-editor-util.c @@ -390,7 +390,9 @@ free_slist_strs (gpointer data) * @note The list is just string of emails separated by ';' **/ void -comp_editor_manage_new_attendees (ECalComponent *comp, EMeetingAttendee *ma, gboolean add) +comp_editor_manage_new_attendees (ECalComponent *comp, + EMeetingAttendee *ma, + gboolean add) { const gchar *eml; @@ -402,7 +404,11 @@ comp_editor_manage_new_attendees (ECalComponent *comp, EMeetingAttendee *ma, gbo eml = itip_strip_mailto (eml); g_return_if_fail (eml != NULL); - g_object_set_data_full (G_OBJECT (comp), "new-attendees", manage_new_attendees (g_object_get_data (G_OBJECT (comp), "new-attendees"), eml, add), free_slist_strs); + g_object_set_data_full ( + G_OBJECT (comp), "new-attendees", + manage_new_attendees ( + g_object_get_data (G_OBJECT (comp), "new-attendees"), + eml, add), free_slist_strs); } /** @@ -445,15 +451,19 @@ comp_editor_have_in_new_attendees (ECalComponent *comp, EMeetingAttendee *ma) eml = itip_strip_mailto (eml); g_return_val_if_fail (eml != NULL, FALSE); - return comp_editor_have_in_new_attendees_lst (g_object_get_data (G_OBJECT (comp), "new-attendees"), eml); + return comp_editor_have_in_new_attendees_lst ( + g_object_get_data (G_OBJECT (comp), "new-attendees"), eml); } /** * comp_editor_have_in_new_attendees_lst: - * Same as @ref comp_editor_have_in_new_attendees only parameters are direct GSList and string. + * + * Same as comp_editor_have_in_new_attendees() only parameters are + * direct GSList and string. **/ gboolean -comp_editor_have_in_new_attendees_lst (const GSList *new_attendees, const gchar *eml) +comp_editor_have_in_new_attendees_lst (const GSList *new_attendees, + const gchar *eml) { const GSList *l; diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 91d9f1e202..062e483562 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -2314,7 +2314,7 @@ comp_editor_append_widget (CompEditor *editor, gtk_notebook_append_page (priv->notebook, page, label_widget); /* Listen for when the page is mapped/unmapped so we can - install/uninstall the appropriate GtkAccelGroup. + install/uninstall the appropriate GtkAccelGroup. g_signal_connect ( page, "map", G_CALLBACK (page_mapped_cb), page); diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c index 1ae9595c02..7184a63d9e 100644 --- a/calendar/gui/dialogs/event-editor.c +++ b/calendar/gui/dialogs/event-editor.c @@ -345,7 +345,7 @@ event_editor_constructor (GType type, alarm_page = event_page_get_alarm_page (priv->event_page); comp_editor_append_widget (editor, alarm_page, _("_Alarm"), TRUE); g_object_unref(alarm_page); - + } if (is_meeting) { diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index 74d6af4c4b..f37861827d 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -2238,7 +2238,6 @@ get_widgets (EventPage *epage) priv->source_selector = GW ("source"); - e_util_set_source_combo_box_list (priv->source_selector, "/apps/evolution/calendar/sources"); completion = e_category_completion_new (); @@ -3257,7 +3256,6 @@ event_page_remove_all_attendees (EventPage *epage) e_meeting_list_view_remove_all_attendees_from_name_selector (E_MEETING_LIST_VIEW (priv->list_view)); } - GtkWidget * event_page_get_alarm_page (EventPage *epage) { @@ -3275,7 +3273,7 @@ event_page_get_alarm_page (EventPage *epage) gtk_container_remove ((GtkContainer *)tmp, alarm_page); return alarm_page; -} +} GtkWidget * event_page_get_attendee_page (EventPage *epage) @@ -3287,14 +3285,13 @@ event_page_get_attendee_page (EventPage *epage) g_return_val_if_fail (IS_EVENT_PAGE (epage), NULL); priv = epage->priv; - + apage = priv->list_box; g_object_ref(apage); gtk_container_remove ((GtkContainer *)gtk_widget_get_parent(apage), apage); gtk_widget_hide (priv->attendee_box); return apage; -} - +} #undef GW diff --git a/calendar/gui/dialogs/event-page.h b/calendar/gui/dialogs/event-page.h index a4513e4c68..afa191e9c1 100644 --- a/calendar/gui/dialogs/event-page.h +++ b/calendar/gui/dialogs/event-page.h @@ -109,8 +109,8 @@ ENameSelector * event_page_get_name_selector (EventPage *epage); void event_page_add_attendee (EventPage *epage, EMeetingAttendee *attendee); void event_page_remove_all_attendees (EventPage *epage); -GtkWidget * event_page_get_alarm_page (EventPage *epage); -GtkWidget * event_page_get_attendee_page (EventPage *epage); +GtkWidget * event_page_get_alarm_page (EventPage *epage); +GtkWidget * event_page_get_attendee_page (EventPage *epage); G_END_DECLS diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index aa64c74564..f22e70efc7 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1005,7 +1005,6 @@ struct _date_query_msg { GnomeCalendar *gcal; }; - static void free_dn_queries (GnomeCalendar *gcal) { @@ -1453,7 +1452,6 @@ gnome_calendar_do_dispose (GObject *object) gcal = GNOME_CALENDAR (object); priv = gcal->priv; - if (priv->model != NULL) { g_signal_handlers_disconnect_by_func ( priv->model, view_progress_cb, gcal); diff --git a/capplet/settings/anjal-mail-view.c b/capplet/settings/anjal-mail-view.c index 99ff93a065..9f96bcd6ef 100644 --- a/capplet/settings/anjal-mail-view.c +++ b/capplet/settings/anjal-mail-view.c @@ -56,7 +56,7 @@ anjal_mail_view_finalize (GObject *object) G_OBJECT_CLASS (anjal_mail_view_parent_class)->finalize (object); } -static void +static void view_set_folder_uri (AnjalMailView *mail_view, const gchar *uri) { } diff --git a/capplet/settings/mail-account-view.c b/capplet/settings/mail-account-view.c index a6751b9a1b..cd47ae5223 100644 --- a/capplet/settings/mail-account-view.c +++ b/capplet/settings/mail-account-view.c @@ -48,7 +48,7 @@ struct _MailAccountViewPrivate { gboolean do_gcontacts; gboolean do_calendar; - char *username; + gchar *username; GtkWidget *yahoo_cal_entry; }; @@ -246,10 +246,10 @@ setup_yahoo_account (MailAccountView *mav) ESourceList *slist; ESourceGroup *sgrp; ESource *calendar; - char *sanitize_uname, *abs_uri, *rel_uri; + gchar *sanitize_uname, *abs_uri, *rel_uri; GSList *ids, *temp; - const char *email = e_account_get_string(em_account_editor_get_modified_account(mav->edit), E_ACCOUNT_ID_ADDRESS); - + const gchar *email = e_account_get_string(em_account_editor_get_modified_account(mav->edit), E_ACCOUNT_ID_ADDRESS); + slist = e_source_list_new_for_gconf (gconf, "/apps/evolution/calendar/sources"); sgrp = e_source_list_peek_group_by_base_uri (slist, "caldav://"); if (!sgrp) { @@ -259,20 +259,20 @@ setup_yahoo_account (MailAccountView *mav) printf("Setting up Yahoo Calendar: list:%p CalDAVGrp: %p\n", slist, sgrp); /* FIXME: Not sure if we should localize 'Calendar' */ - calendar = e_source_new ("Yahoo", ""); + calendar = e_source_new ("Yahoo", ""); e_source_set_property (calendar, "ssl", "1"); e_source_set_property (calendar, "refresh", "30"); - e_source_set_property (calendar, "refresh-type", "0"); + e_source_set_property (calendar, "refresh-type", "0"); e_source_set_property (calendar, "auth", "1"); e_source_set_property (calendar, "offline_sync", "1"); e_source_set_property (calendar, "username", email); e_source_set_property (calendar, "default", "true"); e_source_set_property (calendar, "alarm", "true"); - + e_source_set_readonly (calendar, FALSE); - + sanitize_uname = sanitize_user_mail (email); - + abs_uri = g_strdup_printf ("caldav://%s@caldav.calendar.yahoo.com/dav/%s/Calendar/%s/", sanitize_uname, email, gtk_entry_get_text((GtkEntry *)mav->priv->yahoo_cal_entry)); e_passwords_add_password (abs_uri, gtk_entry_get_text((GtkEntry *)mav->password)); e_passwords_remember_password ("Calendar", abs_uri); @@ -290,7 +290,7 @@ setup_yahoo_account (MailAccountView *mav) for (; temp != NULL; temp = g_slist_next (temp)) g_free (temp->data); - g_slist_free (ids); + g_slist_free (ids); g_free(abs_uri); g_free(rel_uri); @@ -305,14 +305,14 @@ setup_yahoo_account (MailAccountView *mav) ESourceList *slist; ESourceGroup *sgrp; ESource *abook; - char *rel_uri;; + gchar *rel_uri;; slist = e_source_list_new_for_gconf (gconf, "/apps/evolution/addressbook/sources" ); - + sgrp = e_source_list_peek_group_by_base_uri (slist, "google://"); - + /* FIXME: Not sure if we should localize 'Contacts' */ - abook = e_source_new ("Contacts", ""); + abook = e_source_new ("Contacts", ""); e_source_set_property (abook, "default", "true"); e_source_set_property (abook, "offline_sync", "1"); e_source_set_property (abook, "auth", "plain/password"); @@ -322,7 +322,7 @@ setup_yahoo_account (MailAccountView *mav) e_source_set_property (abook, "completion", "true"); e_source_set_property (abook, "username", mav->priv->username); e_source_set_relative_uri (abook, mav->priv->username); - + rel_uri = g_strdup_printf("google://%s/", mav->priv->username); e_passwords_add_password (rel_uri, gtk_entry_get_text((GtkEntry *)mav->password)); e_passwords_remember_password ("Addressbook", rel_uri); @@ -334,7 +334,6 @@ setup_yahoo_account (MailAccountView *mav) g_object_unref(sgrp); g_object_unref(abook); - } g_object_unref (gconf); @@ -352,9 +351,9 @@ setup_google_accounts (MailAccountView *mav) ESourceList *slist; ESourceGroup *sgrp; ESource *calendar; - char *sanitize_uname, *abs_uri, *rel_uri; + gchar *sanitize_uname, *abs_uri, *rel_uri; GSList *ids, *temp; - + slist = e_source_list_new_for_gconf (gconf, "/apps/evolution/calendar/sources"); sgrp = e_source_list_peek_group_by_base_uri (slist, "google://"); if (!sgrp) { @@ -364,13 +363,13 @@ setup_google_accounts (MailAccountView *mav) printf("Setting up Google Calendar: list:%p GoogleGrp: %p\n", slist, sgrp); /* FIXME: Not sure if we should localize 'Calendar' */ - calendar = e_source_new ("Calendar", ""); + calendar = e_source_new ("Calendar", ""); e_source_set_property (calendar, "ssl", "1"); e_source_set_property (calendar, "refresh", "30"); e_source_set_property (calendar, "auth", "1"); e_source_set_property (calendar, "offline_sync", "1"); e_source_set_property (calendar, "username", mav->priv->username); - e_source_set_property (calendar, "setup-username", mav->priv->username); + e_source_set_property (calendar, "setup-username", mav->priv->username); e_source_set_property (calendar, "default", "true"); e_source_set_readonly (calendar, FALSE); @@ -378,7 +377,7 @@ setup_google_accounts (MailAccountView *mav) abs_uri = g_strdup_printf (CALENDAR_CALDAV_URI, sanitize_uname, mav->priv->username); e_source_set_absolute_uri (calendar, abs_uri); - + e_passwords_add_password (abs_uri, gtk_entry_get_text((GtkEntry *)mav->password)); e_passwords_remember_password ("Calendar", abs_uri); rel_uri = g_strconcat ("https", GMAIL_CALENDAR_LOCATION, sanitize_uname, CALENDAR_DEFAULT_PATH, NULL); @@ -394,7 +393,7 @@ setup_google_accounts (MailAccountView *mav) for (; temp != NULL; temp = g_slist_next (temp)) g_free (temp->data); - g_slist_free (ids); + g_slist_free (ids); g_free(abs_uri); g_free(rel_uri); @@ -409,14 +408,14 @@ setup_google_accounts (MailAccountView *mav) ESourceList *slist; ESourceGroup *sgrp; ESource *abook; - char *rel_uri;; + gchar *rel_uri;; slist = e_source_list_new_for_gconf (gconf, "/apps/evolution/addressbook/sources" ); - + sgrp = e_source_list_peek_group_by_base_uri (slist, "google://"); - + /* FIXME: Not sure if we should localize 'Contacts' */ - abook = e_source_new ("Contacts", ""); + abook = e_source_new ("Contacts", ""); e_source_set_property (abook, "default", "true"); e_source_set_property (abook, "offline_sync", "1"); e_source_set_property (abook, "auth", "plain/password"); @@ -426,7 +425,7 @@ setup_google_accounts (MailAccountView *mav) e_source_set_property (abook, "completion", "true"); e_source_set_property (abook, "username", mav->priv->username); e_source_set_relative_uri (abook, mav->priv->username); - + rel_uri = g_strdup_printf("google://%s/", mav->priv->username); e_passwords_add_password (rel_uri, gtk_entry_get_text((GtkEntry *)mav->password)); e_passwords_remember_password ("Addressbook", rel_uri); @@ -438,7 +437,6 @@ setup_google_accounts (MailAccountView *mav) g_object_unref(sgrp); g_object_unref(abook); - } g_object_unref (gconf); @@ -657,7 +655,7 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav) if (!mav->original) { EAccount *account = em_account_editor_get_modified_account(mav->edit); CamelURL *aurl; - char *surl; + gchar *surl; /* Save the password ahead of time */ aurl = camel_url_new (account->source->url, NULL); surl = camel_url_to_string(aurl, CAMEL_URL_HIDE_ALL); @@ -667,7 +665,7 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav) g_free(surl); } - if (mav->priv->is_gmail && !mav->original) + if (mav->priv->is_gmail && !mav->original) setup_google_accounts (mav); else if (mav->priv->is_yahoo && !mav->original) setup_yahoo_account (mav); @@ -688,7 +686,7 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav) MAVPage *page = mav->pages[mav->current_page]; GtkWidget *tmp; EAccount *account = em_account_editor_get_modified_account(mav->edit); - + if (page->main) gtk_widget_destroy (page->main); @@ -698,7 +696,7 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav) gtk_box_pack_start((GtkBox *)page->main, tmp, FALSE, FALSE, 0); gtk_widget_show(tmp); gtk_box_pack_start((GtkBox *)page->box, page->main, FALSE, FALSE, 3); - + if (mav->priv->is_gmail) { gtk_widget_destroy (mav->priv->gcontacts); gtk_widget_destroy (mav->priv->calendar); @@ -717,19 +715,19 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav) mav->priv->gcontacts = gtk_check_button_new_with_label (_("Setup Google contacts with Evolution")); mav->priv->calendar = gtk_check_button_new_with_label (_("Setup Google calendar with Evolution")); - + gtk_toggle_button_set_active ((GtkToggleButton *)mav->priv->gcontacts, TRUE); gtk_toggle_button_set_active ((GtkToggleButton *)mav->priv->calendar, TRUE); mav->priv->gmail_info_label = gtk_label_new (_("You may need to enable IMAP access.")); gtk_label_set_selectable ((GtkLabel *)mav->priv->gmail_info_label, TRUE); - + gtk_widget_show (mav->priv->gcontacts); gtk_widget_show (mav->priv->calendar); gtk_widget_show (mav->priv->gmail_info_label); - + tmp = gtk_label_new (NULL); - gtk_label_set_markup ((GtkLabel *)tmp, _("Google account settings:")); + gtk_label_set_markup ((GtkLabel *)tmp, _("Google account settings:")); gtk_widget_show(tmp); #define PACK_IN_BOX(wid,child,num) { GtkWidget *tbox; tbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start ((GtkBox *)tbox, child, FALSE, FALSE, num); gtk_widget_show (tbox); gtk_box_pack_start ((GtkBox *)wid, tbox, FALSE, FALSE, 0); } @@ -742,29 +740,29 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav) PACK_IN_BOX(page->box,mav->priv->gmail_info_label,gtk_link_button_new("https://mail.google.com/mail/?ui=2&shva=1#settings/fwdandpop"), 24, 0); #undef PACK_IN_BOX - } else if (mav->original == NULL && + } else if (mav->original == NULL && (g_strrstr(account->source->url, "yahoo.") || g_strrstr(account->source->url, "ymail.") || g_strrstr(account->source->url, "rocketmail."))) { /* Yahoo accounts*/ GtkWidget *tmp; - char *cal_name; + gchar *cal_name; GtkWidget *tmpbox; mav->priv->is_yahoo = TRUE; printf("Google account: %s\n", account->source->url); mav->priv->calendar = gtk_check_button_new_with_label (_("Setup Yahoo calendar with Evolution")); - + gtk_toggle_button_set_active ((GtkToggleButton *)mav->priv->calendar, TRUE); mav->priv->gmail_info_label = gtk_label_new (_("Yahoo calendars are named as firstname_lastname. We have tried to form the calendar name. So please confirm and re-enter the calendar name if it is not correct.")); gtk_label_set_selectable ((GtkLabel *)mav->priv->gmail_info_label, TRUE); - + gtk_widget_show (mav->priv->calendar); gtk_widget_show (mav->priv->gmail_info_label); - + tmp = gtk_label_new (NULL); - gtk_label_set_markup ((GtkLabel *)tmp, _("Yahoo account settings:")); + gtk_label_set_markup ((GtkLabel *)tmp, _("Yahoo account settings:")); gtk_widget_show(tmp); #define PACK_IN_BOX(wid,child,num) { GtkWidget *tbox; tbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start ((GtkBox *)tbox, child, FALSE, FALSE, num); gtk_widget_show (tbox); gtk_box_pack_start ((GtkBox *)wid, tbox, FALSE, FALSE, 0); } @@ -1013,7 +1011,7 @@ mail_account_view_construct (MailAccountView *view) shell = e_shell_get_default (); if (!shell || e_shell_get_express_mode (shell)) { - GtkWidget *table = em_account_editor_get_widget (view->edit, "identity_required_table"); + GtkWidget *table = em_account_editor_get_widget (view->edit, "identity_required_table"); GtkWidget *label, *pwd; gtk_widget_hide (em_account_editor_get_widget (view->edit, "identity_optional_frame")); @@ -1027,7 +1025,7 @@ mail_account_view_construct (MailAccountView *view) gtk_widget_show(pwd); gtk_table_attach ((GtkTable *)table, label, 0, 1, 2, 3, GTK_FILL, 0, 0, 0); gtk_table_attach ((GtkTable *)table, pwd, 1, 2, 2, 3, GTK_FILL|GTK_EXPAND, 0, 0, 0); - + view->password = pwd; } } diff --git a/capplet/settings/mail-guess-servers.c b/capplet/settings/mail-guess-servers.c index f94fbb90e6..0a5f07d75b 100644 --- a/capplet/settings/mail-guess-servers.c +++ b/capplet/settings/mail-guess-servers.c @@ -131,7 +131,7 @@ handle_incoming (xmlNodePtr head, EmailProvider *provider) } else if (strcmp ((gchar *)node->name, "username") == 0) { provider->recv_username = xml_to_gchar(xmlNodeGetContent(node), provider); } else if (strcmp ((gchar *)node->name, "authentication") == 0) { - provider->recv_auth = xml_to_gchar(xmlNodeGetContent(node), provider); + provider->recv_auth = xml_to_gchar(xmlNodeGetContent(node), provider); } node = node->next; @@ -155,7 +155,7 @@ handle_outgoing (xmlNodePtr head, EmailProvider *provider) } else if (strcmp ((gchar *)node->name, "username") == 0) { provider->send_username = xml_to_gchar(xmlNodeGetContent(node), provider); } else if (strcmp ((gchar *)node->name, "authentication") == 0) { - provider->send_auth = xml_to_gchar(xmlNodeGetContent(node), provider); + provider->send_auth = xml_to_gchar(xmlNodeGetContent(node), provider); } node = node->next; diff --git a/composer/e-composer-header-table.c b/composer/e-composer-header-table.c index b7f2e8e437..98b004d616 100644 --- a/composer/e-composer-header-table.c +++ b/composer/e-composer-header-table.c @@ -276,7 +276,7 @@ skip_custom: return new_destinations; } -static int +static gint count_from_accounts (EComposerHeaderTable *table) { EComposerHeader *header; @@ -291,7 +291,7 @@ count_from_accounts (EComposerHeaderTable *table) static gboolean from_header_should_be_visible (EComposerHeaderTable *table) { - int num_accounts; + gint num_accounts; num_accounts = count_from_accounts (table); return (num_accounts > 1); @@ -502,7 +502,7 @@ composer_header_table_from_changed_cb (EComposerHeaderTable *table) composer_header_table_setup_mail_headers (table); } -static int +static gint get_row_padding (void) { /* For small screens, make the header-table's rows be packed closely together */ @@ -521,7 +521,7 @@ composer_header_table_constructor (GType type, GObject *object; EComposerHeaderTablePrivate *priv; guint rows, ii; - int row_padding; + gint row_padding; /* Chain up to parent's constructor() method. */ object = G_OBJECT_CLASS (parent_class)->constructor ( diff --git a/e-util/e-alert-dialog.c b/e-util/e-alert-dialog.c index 09512ce17c..39b5a5f778 100644 --- a/e-util/e-alert-dialog.c +++ b/e-util/e-alert-dialog.c @@ -215,7 +215,9 @@ e_alert_dialog_constructed (GObject *obj) if (e_alert_get_scroll (alert)) { scroll = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_policy ((GtkScrolledWindow *)scroll, GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); + gtk_scrolled_window_set_policy ( + GTK_SCROLLED_WINDOW (scroll), + GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); } w = gtk_label_new(NULL); gtk_label_set_selectable((GtkLabel *)w, TRUE); @@ -268,9 +270,12 @@ e_alert_dialog_class_init (EAlertDialogClass *klass) } GtkWidget* -e_alert_dialog_new (GtkWindow *parent, EAlert *alert) +e_alert_dialog_new (GtkWindow *parent, + EAlert *alert) { - return (GtkWidget*) g_object_new (E_TYPE_ALERT_DIALOG, "parent", parent, "alert", alert, NULL); + return g_object_new ( + E_TYPE_ALERT_DIALOG, + "parent", parent, "alert", alert, NULL); } GtkWidget* diff --git a/e-util/e-dialog-utils.c b/e-util/e-dialog-utils.c index 832d1b844a..620719665b 100644 --- a/e-util/e-dialog-utils.c +++ b/e-util/e-dialog-utils.c @@ -60,7 +60,7 @@ e_notice (gpointer parent, GtkMessageType type, const gchar *format, ...) parent = gtk_widget_get_toplevel (parent); if (parent) gtk_window_set_transient_for (GTK_WINDOW (dialog), parent); - + gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c index 734fefbd72..bac1beefdf 100644 --- a/mail/e-mail-backend.c +++ b/mail/e-mail-backend.c @@ -284,9 +284,9 @@ mail_backend_quit_requested_cb (EShell *shell, /* We can quit immediately if offline. */ if (!e_shell_get_online (shell)) return; - + /* In express mode, don't raise mail request in non mail window. */ - if (e_shell_get_express_mode(shell) && + if (e_shell_get_express_mode(shell) && strcmp(e_shell_window_get_active_view((EShellWindow *)window), "mail") != 0) return; diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c index addc126285..12d87d97c8 100644 --- a/mail/e-mail-reader-utils.c +++ b/mail/e-mail-reader-utils.c @@ -669,7 +669,10 @@ e_mail_reader_header_free (EMailReaderHeader *header) } static void -headers_changed_cb (GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMailReader *reader) +headers_changed_cb (GConfClient *gconf, + guint cnxn_id, + GConfEntry *entry, + EMailReader *reader) { EMFormat *emf; EMFormatHTMLDisplay *emfhd; @@ -685,16 +688,18 @@ headers_changed_cb (GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMailR emf = EM_FORMAT (emfhd); g_return_if_fail (emf != NULL); - header_config_list = gconf_client_get_list (gconf, "/apps/evolution/mail/display/headers", GCONF_VALUE_STRING, NULL); + header_config_list = gconf_client_get_list ( + gconf, "/apps/evolution/mail/display/headers", + GCONF_VALUE_STRING, NULL); em_format_clear_headers (emf); for (p = header_config_list; p; p = g_slist_next(p)) { EMailReaderHeader *h; gchar *xml = (gchar *)p->data; h = e_mail_reader_header_from_xml (xml); - if (h && h->enabled) { - em_format_add_header (emf, h->name, EM_FORMAT_HEADER_BOLD); - } + if (h && h->enabled) + em_format_add_header ( + emf, h->name, EM_FORMAT_HEADER_BOLD); e_mail_reader_header_free (h); } @@ -738,10 +743,16 @@ e_mail_reader_connect_headers (EMailReader *reader) GConfClient *gconf = mail_config_get_gconf_client (); guint notify_id; - gconf_client_add_dir (gconf, "/apps/evolution/mail/display", GCONF_CLIENT_PRELOAD_NONE, NULL); - notify_id = gconf_client_notify_add (gconf, "/apps/evolution/mail/display/headers", (GConfClientNotifyFunc) headers_changed_cb, reader, NULL, NULL); - - g_object_set_data_full (G_OBJECT (reader), "reader-header-notify-id", GINT_TO_POINTER (notify_id), remove_header_notify_cb); + gconf_client_add_dir ( + gconf, "/apps/evolution/mail/display", + GCONF_CLIENT_PRELOAD_NONE, NULL); + notify_id = gconf_client_notify_add ( + gconf, "/apps/evolution/mail/display/headers", + (GConfClientNotifyFunc) headers_changed_cb, + reader, NULL, NULL); + g_object_set_data_full ( + G_OBJECT (reader), "reader-header-notify-id", + GINT_TO_POINTER (notify_id), remove_header_notify_cb); headers_changed_cb (gconf, 0, NULL, reader); } diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c index 10f1864497..20448cc57f 100644 --- a/mail/e-mail-reader.c +++ b/mail/e-mail-reader.c @@ -2300,9 +2300,11 @@ mail_reader_update_actions (EMailReader *reader) gtk_action_set_sensitive (action, sensitive); action_name = "mail-mark-junk"; - sensitive = selection_has_not_junk_messages; + sensitive = + selection_has_not_junk_messages && + !(state & E_MAIL_READER_FOLDER_IS_JUNK); action = e_mail_reader_get_action (reader, action_name); - gtk_action_set_sensitive (action, sensitive && !(state & E_MAIL_READER_FOLDER_IS_JUNK)); + gtk_action_set_sensitive (action, sensitive); action_name = "mail-mark-not-junk"; sensitive = selection_has_junk_messages; diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c index 38be2f3dbd..2ceb77dbec 100644 --- a/mail/em-account-editor.c +++ b/mail/em-account-editor.c @@ -2087,7 +2087,7 @@ emae_create_basic_assistant_page (EMAccountEditor *emae, GtkAssistant *assistant gtk_widget_show (lbl); if (g_ascii_strcasecmp (page_id, "start_page") == 0) - g_hash_table_insert (emae->priv->widgets, (char *)"start_page_label", lbl); + g_hash_table_insert (emae->priv->widgets, (gchar *)"start_page_label", lbl); if (old) { /* keep page on its previous index */ @@ -2118,7 +2118,6 @@ static struct { { "identity_organization", E_ACCOUNT_ID_ORGANIZATION }, }; - static void emae_queue_widgets (EMAccountEditor *emae, GtkBuilder *builder, const gchar *first, ...) { @@ -2126,7 +2125,7 @@ emae_queue_widgets (EMAccountEditor *emae, GtkBuilder *builder, const gchar *fir va_start (ap, first); while (first) { - g_hash_table_insert (emae->priv->widgets, (char *)first, e_builder_get_widget (builder, first)); + g_hash_table_insert (emae->priv->widgets, (gchar *)first, e_builder_get_widget (builder, first)); first = va_arg (ap, const gchar *); } va_end (ap); diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c index b779caf63a..222c1cebd7 100644 --- a/mail/em-folder-tree-model.c +++ b/mail/em-folder-tree-model.c @@ -274,10 +274,13 @@ add_new_store (gchar *uri, CamelStore *store, gpointer user_data) static void account_added_cb (EAccountList *accounts, - EAccount *account, - EMFolderTreeModel *model) + EAccount *account, + EMFolderTreeModel *model) { - mail_get_store (e_account_get_string (account, E_ACCOUNT_SOURCE_URL), NULL, add_new_store, account); + const gchar *uri; + + uri = e_account_get_string (account, E_ACCOUNT_SOURCE_URL); + mail_get_store (uri, NULL, add_new_store, account); } static void diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index fdd1b88ee0..371d764d74 100644 --- a/mail/em-folder-tree.c +++ b/mail/em-folder-tree.c @@ -2834,22 +2834,22 @@ em_folder_tree_restore_state (EMFolderTree *folder_tree, goto next; group_name = g_strdup_printf ("Store %s", uri); - + if (e_shell_get_express_mode (shell)) { gboolean system = FALSE; if (strncmp (uri, "vfolder", 7) == 0 || strncmp(uri, "mbox", 4) == 0) system = TRUE; - + if (!system && !g_key_file_has_key (key_file, group_name, key, NULL)) { GtkTreePath *path; - + path = gtk_tree_model_get_path (tree_model, &iter); gtk_tree_view_expand_row (tree_view, path, FALSE); gtk_tree_path_free (path); } - + } else if (!g_key_file_has_key (key_file, group_name, key, NULL)) { GtkTreePath *path; diff --git a/mail/em-inline-filter.c b/mail/em-inline-filter.c index 43dee1f97e..4d3ac946f4 100644 --- a/mail/em-inline-filter.c +++ b/mail/em-inline-filter.c @@ -232,7 +232,7 @@ emif_scan(CamelMimeFilter *f, gchar *in, gsize len, gint final) } rest_len = inend - start; - if (inptr < inend) + if (inptr < inend) *inptr++ = 0; #define restore_inptr() G_STMT_START { if (inptr < inend) inptr[-1] = '\n'; } G_STMT_END diff --git a/modules/calendar/e-cal-shell-content.c b/modules/calendar/e-cal-shell-content.c index bf812f521f..99fb717c90 100644 --- a/modules/calendar/e-cal-shell-content.c +++ b/modules/calendar/e-cal-shell-content.c @@ -151,7 +151,7 @@ cal_chell_content_get_pad_state_filename (EShellContent *shell_content, ETable * g_return_val_if_fail (E_IS_SHELL_CONTENT (shell_content), NULL); g_return_val_if_fail (table != NULL, NULL); g_return_val_if_fail (E_IS_TABLE (table), NULL); - + if (E_IS_TASK_TABLE (table)) nick = "TaskPad"; else if (E_IS_MEMO_TABLE (table)) @@ -348,7 +348,7 @@ cal_shell_content_constructed (GObject *object) foreign_view = e_shell_window_get_shell_view (shell_window, "memos"); foreign_content = e_shell_view_get_shell_content (foreign_view); g_object_get (foreign_content, "model", &memo_model, NULL); - + foreign_view = e_shell_window_get_shell_view (shell_window, "tasks"); foreign_content = e_shell_view_get_shell_content (foreign_view); g_object_get (foreign_content, "model", &task_model, NULL); @@ -356,7 +356,7 @@ cal_shell_content_constructed (GObject *object) /* Build content widgets. */ container = GTK_WIDGET (object); - + if (!e_shell_get_express_mode (shell)) { widget = e_paned_new (GTK_ORIENTATION_HORIZONTAL); gtk_container_add (GTK_CONTAINER (container), widget); @@ -556,7 +556,7 @@ cal_shell_content_class_init (ECalShellContentClass *class) object_class->get_property = cal_shell_content_get_property; object_class->dispose = cal_shell_content_dispose; object_class->constructed = cal_shell_content_constructed; - + widget_class = GTK_WIDGET_CLASS (class); widget_class->map = cal_shell_content_map; diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c index 546d21b3c3..4545c88c3a 100644 --- a/modules/calendar/e-cal-shell-sidebar.c +++ b/modules/calendar/e-cal-shell-sidebar.c @@ -560,10 +560,10 @@ cal_shell_sidebar_finalize (GObject *object) } static void -new_calendar_clicked (GtkButton *button, +new_calendar_clicked (GtkButton *button, EShellSidebar *shell_sidebar) { - EShellView *shell_view; + EShellView *shell_view; EShellWindow *shell_window; EShellBackend *shell_backend; @@ -571,7 +571,7 @@ new_calendar_clicked (GtkButton *button, shell_backend = e_shell_view_get_shell_backend (shell_view); shell_window = e_shell_view_get_shell_window (shell_view); - calendar_setup_new_calendar (GTK_WINDOW (shell_window)); + calendar_setup_new_calendar (GTK_WINDOW (shell_window)); } static void @@ -621,7 +621,7 @@ cal_shell_sidebar_constructed (GObject *object) GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type ( GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN); - if(!e_shell_get_express_mode(e_shell_get_default())) { + if (!e_shell_get_express_mode(e_shell_get_default())) { gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, TRUE); } else { GtkWidget *button; diff --git a/modules/calendar/e-cal-shell-view-actions.c b/modules/calendar/e-cal-shell-view-actions.c index 83f6101d0a..9510f066ef 100644 --- a/modules/calendar/e-cal-shell-view-actions.c +++ b/modules/calendar/e-cal-shell-view-actions.c @@ -1715,7 +1715,7 @@ e_cal_shell_view_actions_init (ECalShellView *cal_shell_view) cal_shell_content = cal_shell_view->priv->cal_shell_content; searchbar = e_cal_shell_content_get_searchbar (cal_shell_content); - + /* Calendar Actions */ action_group = ACTION_GROUP (CALENDAR); gtk_action_group_add_actions ( diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c index a958a9f05e..43b8ae61cd 100644 --- a/modules/calendar/e-cal-shell-view-private.c +++ b/modules/calendar/e-cal-shell-view-private.c @@ -436,7 +436,6 @@ e_cal_shell_view_private_init (ECalShellView *cal_shell_view, G_CALLBACK (cal_shell_view_notify_view_id_cb), NULL); } - static void system_timezone_monitor_changed (GFileMonitor *handle, GFile *file, @@ -453,12 +452,12 @@ system_timezone_monitor_changed (GFileMonitor *handle, EShell *shell; ECalModel *model; const gchar *location; - - if (event != G_FILE_MONITOR_EVENT_CHANGED && - event != G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT && - event != G_FILE_MONITOR_EVENT_DELETED && - event != G_FILE_MONITOR_EVENT_CREATED) - return; + + if (event != G_FILE_MONITOR_EVENT_CHANGED && + event != G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT && + event != G_FILE_MONITOR_EVENT_DELETED && + event != G_FILE_MONITOR_EVENT_CREATED) + return; cal_shell_content = priv->cal_shell_content; model = e_cal_shell_content_get_model (cal_shell_content); @@ -474,7 +473,7 @@ system_timezone_monitor_changed (GFileMonitor *handle, location = icaltimezone_get_location (timezone); if (location == NULL) location = "UTC"; - + g_object_set (settings, "cal-timezone-string", location, NULL); g_object_set (settings, "cal-timezone", timezone, NULL); } @@ -496,7 +495,7 @@ init_timezone_monitors (ECalShellView *view) if (priv->monitors[i]) g_signal_connect (G_OBJECT (priv->monitors[i]), - "changed", + "changed", G_CALLBACK (system_timezone_monitor_changed), view); } @@ -621,7 +620,7 @@ e_cal_shell_view_private_constructed (ECalShellView *cal_shell_view) G_CALLBACK (cal_shell_view_selector_client_removed_cb), cal_shell_view); - if (memo_table) + if (memo_table) g_signal_connect_swapped ( memo_table, "popup-event", G_CALLBACK (cal_shell_view_memopad_popup_event_cb), @@ -650,7 +649,7 @@ e_cal_shell_view_private_constructed (ECalShellView *cal_shell_view) task_table, "status-message", G_CALLBACK (e_cal_shell_view_taskpad_set_status_message), cal_shell_view); - + if (task_table) g_signal_connect_swapped ( task_table, "selection-change", @@ -1081,7 +1080,7 @@ e_cal_shell_view_update_timezone (ECalShellView *cal_shell_view) cal_shell_sidebar = cal_shell_view->priv->cal_shell_sidebar; clients = e_cal_shell_sidebar_get_clients (cal_shell_sidebar); - + for (iter = clients; iter != NULL; iter = iter->next) { ECal *client = iter->data; diff --git a/modules/calendar/e-cal-shell-view.c b/modules/calendar/e-cal-shell-view.c index 1f719e82c5..c4f52de83a 100644 --- a/modules/calendar/e-cal-shell-view.c +++ b/modules/calendar/e-cal-shell-view.c @@ -304,25 +304,25 @@ cal_shell_view_update_actions (EShellView *shell_view) shell_window = e_shell_view_get_shell_window (shell_view); - if(e_shell_get_express_mode(e_shell_get_default())) { + if (e_shell_get_express_mode(e_shell_get_default())) { GtkWidget *widget, *item; - /* Hack: Get rid of New and Send/Receive in toolbar + /* Hack: Get rid of New and Send/Receive in toolbar * while in express mode */ widget = e_shell_window_get_managed_widget ( shell_window, "/main-toolbar"); item = (GtkWidget *)gtk_toolbar_get_nth_item ((GtkToolbar *)widget, 0); gtk_widget_hide(item); - + widget = e_shell_window_get_managed_widget ( shell_window, "/main-menu"); gtk_widget_hide(widget); - + item = e_shell_window_get_managed_widget ( shell_window, "/main-toolbar/send-receive"); if (item) - gtk_widget_hide(item); + gtk_widget_hide(item); } cal_shell_content = priv->cal_shell_content; calendar = e_cal_shell_content_get_calendar (cal_shell_content); @@ -497,7 +497,7 @@ cal_shell_view_class_init (ECalShellViewClass *class, shell_view_class->new_shell_sidebar = e_cal_shell_sidebar_new; shell_view_class->execute_search = cal_shell_view_execute_search; shell_view_class->update_actions = cal_shell_view_update_actions; -} +} static void cal_shell_view_init (ECalShellView *cal_shell_view, diff --git a/modules/connman/evolution-connman.c b/modules/connman/evolution-connman.c index abf532f295..6a302889a4 100644 --- a/modules/connman/evolution-connman.c +++ b/modules/connman/evolution-connman.c @@ -51,7 +51,7 @@ static gboolean network_manager_connect (EConnMan *extension); G_DEFINE_DYNAMIC_TYPE (EConnMan, e_connman, E_TYPE_EXTENSION) static void -extension_set_state (EConnMan *extension, const char *state) +extension_set_state (EConnMan *extension, const gchar *state) { EExtensible *extensible; @@ -66,7 +66,7 @@ connman_monitor (DBusConnection *connection G_GNUC_UNUSED, DBusMessage *message, gpointer user_data) { - char *value; + gchar *value; EConnMan *extension = user_data; DBusError error = DBUS_ERROR_INIT; DBusHandlerResult ret = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; @@ -103,7 +103,7 @@ connman_check_initial_state (EConnMan *extension) extension->connection, message, 100, &error); if (response != NULL) { - const char *value; + const gchar *value; if (dbus_message_get_args (message, &error, DBUS_TYPE_STRING, &value, DBUS_TYPE_INVALID)) diff --git a/modules/mail/e-mail-shell-sidebar.c b/modules/mail/e-mail-shell-sidebar.c index ebe72bf629..9b3c2fedd0 100644 --- a/modules/mail/e-mail-shell-sidebar.c +++ b/modules/mail/e-mail-shell-sidebar.c @@ -178,12 +178,12 @@ mail_shell_sidebar_constructed (GObject *object) shell_sidebar); } -static int +static gint guess_screen_width (EMailShellSidebar *sidebar) { GtkWidget *widget; GdkScreen *screen; - int screen_width; + gint screen_width; widget = GTK_WIDGET (sidebar); @@ -192,7 +192,7 @@ guess_screen_width (EMailShellSidebar *sidebar) screen = gtk_widget_get_screen (widget); if (screen) { GtkWidget *toplevel; - int monitor; + gint monitor; GdkRectangle rect; toplevel = gtk_widget_get_toplevel (widget); @@ -201,11 +201,12 @@ guess_screen_width (EMailShellSidebar *sidebar) #else if (toplevel && GTK_WIDGET_REALIZED (toplevel)) #endif - monitor = gdk_screen_get_monitor_at_window (screen, gtk_widget_get_window (toplevel)); + monitor = gdk_screen_get_monitor_at_window ( + screen, gtk_widget_get_window (toplevel)); else { /* We don't know in which monitor the window manager - * will put us. So we will just use the geometry of the - * first monitor. + * will put us. So we will just use the geometry of + * the first monitor. */ monitor = 0; } @@ -221,34 +222,38 @@ guess_screen_width (EMailShellSidebar *sidebar) } static void -mail_shell_sidebar_size_request (GtkWidget *widget, GtkRequisition *requisition) +mail_shell_sidebar_size_request (GtkWidget *widget, + GtkRequisition *requisition) { /* We override the normal size-request handler so that we can - * spit out a treeview with a suitable width. We measure the length - * of a typical string and use that as the requisition's width. + * spit out a treeview with a suitable width. We measure the + * length of a typical string and use that as the requisition's + * width. * - * EMFolderTreeClass, our parent class, is based on GtkTreeView, which - * doesn't really have a good way of figuring out a minimum width for - * the tree. This is really GTK+'s fault at large, as it only has - * "minimum size / allocated size", instead of "minimum size / preferred - * size / allocated size". Hopefully the extended-layout branch of GTK+ - * will get merged soon and then we can remove this crap. + * EMFolderTreeClass, our parent class, is based on GtkTreeView, + * which doesn't really have a good way of figuring out a minimum + * width for the tree. This is really GTK+'s fault at large, as + * it only has "minimum size / allocated size", instead of + * "minimum size / preferred size / allocated size". Hopefully + * the extended-layout branch of GTK+ will get merged soon and + * then we can remove this crap. */ EMailShellSidebar *sidebar; PangoLayout *layout; PangoRectangle ink_rect; GtkStyle *style; - int border; - int sidebar_width; - int screen_width; + gint border; + gint sidebar_width; + gint screen_width; sidebar = E_MAIL_SHELL_SIDEBAR (widget); GTK_WIDGET_CLASS (parent_class)->size_request (widget, requisition); /* This string is a mockup only; it doesn't need to be translated */ - layout = gtk_widget_create_pango_layout (widget, "typical.account@mailservice.com"); + layout = gtk_widget_create_pango_layout ( + widget, "typical.account@mailservice.com"); pango_layout_get_pixel_extents (layout, &ink_rect, NULL); g_object_unref (layout); @@ -256,7 +261,8 @@ mail_shell_sidebar_size_request (GtkWidget *widget, GtkRequisition *requisition) screen_width = guess_screen_width (sidebar); - border = 2 * style->xthickness + 4; /* Thickness of frame shadow plus some slack for padding */ + /* Thickness of frame shadow plus some slack for padding. */ + border = 2 * style->xthickness + 4; sidebar_width = ink_rect.width + border; sidebar_width = MIN (sidebar_width, screen_width / 4); requisition->width = MAX (requisition->width, sidebar_width); diff --git a/modules/windows-sens/evolution-windows-sens.c b/modules/windows-sens/evolution-windows-sens.c index d228fc02ac..2c58b938a1 100644 --- a/modules/windows-sens/evolution-windows-sens.c +++ b/modules/windows-sens/evolution-windows-sens.c @@ -39,7 +39,7 @@ typedef struct IEnumEventObject IEnumEventObject; const IID IID_IEnumEventObject; typedef struct IEnumEventObjectVtbl { BEGIN_INTERFACE - HRESULT (WINAPI *QueryInterface)(IEnumEventObject *This,REFIID riid,void **ppvObject); + HRESULT (WINAPI *QueryInterface)(IEnumEventObject *This,REFIID riid,gpointer *ppvObject); ULONG (WINAPI *AddRef)(IEnumEventObject *This); ULONG (WINAPI *Release)(IEnumEventObject *This); HRESULT (WINAPI *Clone)(IEnumEventObject *This,IEnumEventObject **ppInterface); @@ -57,7 +57,7 @@ typedef struct IEventObjectCollection IEventObjectCollection; const IID IID_IEventObjectCollection; typedef struct IEventObjectCollectionVtbl { BEGIN_INTERFACE - HRESULT (WINAPI *QueryInterface)(IEventObjectCollection *This,REFIID riid,void **ppvObject); + HRESULT (WINAPI *QueryInterface)(IEventObjectCollection *This,REFIID riid,gpointer *ppvObject); ULONG (WINAPI *AddRef)(IEventObjectCollection *This); ULONG (WINAPI *Release)(IEventObjectCollection *This); HRESULT (WINAPI *GetTypeInfoCount)(IEventObjectCollection *This,UINT *pctinfo); @@ -76,13 +76,12 @@ struct IEventObjectCollection { CONST_VTBL struct IEventObjectCollectionVtbl *lpVtbl; }; - typedef struct IEventSystem IEventSystem; const IID IID_IEventSystem; typedef struct IEventSystemVtbl { BEGIN_INTERFACE - HRESULT (WINAPI *QueryInterface)(IEventSystem *This,REFIID riid,void **ppvObject); + HRESULT (WINAPI *QueryInterface)(IEventSystem *This,REFIID riid,gpointer *ppvObject); ULONG (WINAPI *AddRef)(IEventSystem *This); ULONG (WINAPI *Release)(IEventSystem *This); HRESULT (WINAPI *GetTypeInfoCount)(IEventSystem *This,UINT *pctinfo); @@ -106,7 +105,7 @@ typedef struct IEventSubscription IEventSubscription; const IID IID_IEventSubscription; typedef struct IEventSubscriptionVtbl { BEGIN_INTERFACE - HRESULT (WINAPI *QueryInterface)(IEventSubscription *This,REFIID riid,void **ppvObject); + HRESULT (WINAPI *QueryInterface)(IEventSubscription *This,REFIID riid,gpointer *ppvObject); ULONG (WINAPI *AddRef)(IEventSubscription *This); ULONG (WINAPI *Release)(IEventSubscription *This); HRESULT (WINAPI *GetTypeInfoCount)(IEventSubscription *This,UINT *pctinfo); @@ -175,7 +174,7 @@ typedef struct ISensNetwork ISensNetwork; const IID IID_ISensNetwork; typedef struct ISensNetworkVtbl { BEGIN_INTERFACE - HRESULT (WINAPI *QueryInterface)(ISensNetwork *This,REFIID riid,void **ppvObject); + HRESULT (WINAPI *QueryInterface)(ISensNetwork *This,REFIID riid,gpointer *ppvObject); ULONG (WINAPI *AddRef)(ISensNetwork *This); ULONG (WINAPI *Release)(ISensNetwork *This); HRESULT (WINAPI *GetTypeInfoCount)(ISensNetwork *This,UINT *pctinfo); @@ -213,7 +212,6 @@ DEFINE_GUID(CLSID_CEventSystem, 0x4E14FBA2, 0x2E22, 0x11D1, 0x99, 0x64, 0x00, 0x /* 7542e960-79c7-11d1-88f9-0080c7d771bf */ DEFINE_GUID(CLSID_CEventSubscription, 0x7542e960, 0x79c7, 0x11d1, 0x88, 0xf9, 0x00, 0x80, 0xc7, 0xd7, 0x71, 0xbf); - /* Standard GObject macros */ #define E_TYPE_WINDOWS_SENS \ (e_windows_sens_get_type ()) @@ -263,7 +261,7 @@ static void e_sens_network_listener_init(ESensNetworkListener**,EWindowsSENS*); /* Functions to implement ISensNetwork interface */ -static HRESULT WINAPI e_sens_network_listener_queryinterface (ISensNetwork*,REFIID,void**); +static HRESULT WINAPI e_sens_network_listener_queryinterface (ISensNetwork*,REFIID,gpointer *); static ULONG WINAPI e_sens_network_listener_addref (ISensNetwork*); static ULONG WINAPI e_sens_network_listener_release (ISensNetwork*); static HRESULT WINAPI e_sens_network_listener_gettypeinfocount (ISensNetwork*, UINT*); @@ -293,7 +291,6 @@ static ISensNetworkVtbl ESensNetworkListenerVtbl = { e_sens_network_listener_destinationreachablenoqocinfo }; - static HRESULT WINAPI e_sens_network_listener_queryinterface (ISensNetwork *This, REFIID iid, @@ -381,7 +378,7 @@ e_sens_network_listener_connectionmade (ISensNetwork *This, } static HRESULT WINAPI -e_sens_network_listener_connectionmadenoqocinfo (ISensNetwork *This, +e_sens_network_listener_connectionmadenoqocinfo (ISensNetwork *This, BSTR bstrConnection, ULONG ulType) { @@ -438,19 +435,18 @@ e_sens_network_listener_init(ESensNetworkListener **esnl_ptr, (*esnl_ptr)->ref = 1; } - static BSTR -_mb2wchar (const char* a) +_mb2wchar (const gchar * a) { static WCHAR b[64]; MultiByteToWideChar (0, 0, a, -1, b, 64); return b; } -static const char* add_curly_braces_to_uuid (const char* string_uuid) +static const gchar * add_curly_braces_to_uuid (const gchar * string_uuid) { - static char curly_braced_uuid_string[64]; - int i; + static gchar curly_braced_uuid_string[64]; + gint i; if (!string_uuid) return NULL; lstrcpy(curly_braced_uuid_string,"{"); @@ -459,8 +455,8 @@ static const char* add_curly_braces_to_uuid (const char* string_uuid) i = strlen(curly_braced_uuid_string); lstrcat(curly_braced_uuid_string+i,"}"); return curly_braced_uuid_string; -} - +} + static void windows_sens_constructed (GObject *object) { @@ -468,22 +464,22 @@ windows_sens_constructed (GObject *object) static IEventSystem *pEventSystem =0; static IEventSubscription* pEventSubscription = 0; static ESensNetworkListener *pESensNetworkListener = 0; - static const char* eventclassid="{D5978620-5B9F-11D1-8DD2-00AA004ABD5E}"; - static const char* methods[]={ + static const gchar * eventclassid="{D5978620-5B9F-11D1-8DD2-00AA004ABD5E}"; + static const gchar * methods[]={ "ConnectionMade", "ConnectionMadeNoQOCInfo", "ConnectionLost", "DestinationReachable", "DestinationReachableNoQOCInfo" }; - static const char* names[]={ + static const gchar * names[]={ "EWS_ConnectionMade", "EWS_ConnectionMadeNoQOCInfo", "EWS_ConnectionLost", "EWS_DestinationReachable", "EWS_DestinationReachableNoQOCInfo" }; - unsigned char* subids[] = { 0, 0, 0, 0, 0 }; + guchar * subids[] = { 0, 0, 0, 0, 0 }; EWindowsSENS *extension = (E_WINDOWS_SENS (object)); e_sens_network_listener_init(&pESensNetworkListener, extension); @@ -504,7 +500,7 @@ windows_sens_constructed (GObject *object) UUID tmp_uuid; UuidCreate(&tmp_uuid); UuidToString(&tmp_uuid, &subids[i]); - res=pEventSubscription->lpVtbl->put_SubscriptionID (pEventSubscription, _mb2wchar (add_curly_braces_to_uuid ((char*)subids[i]))); + res=pEventSubscription->lpVtbl->put_SubscriptionID (pEventSubscription, _mb2wchar (add_curly_braces_to_uuid ((gchar *)subids[i]))); if (res) { RpcStringFree (&subids[i]); break; @@ -540,7 +536,7 @@ windows_sens_constructed (GObject *object) if (pEventSubscription) pEventSubscription->lpVtbl->Release(pEventSubscription); } - + /* Do not try to get initial state when we are sure we will not get system events. * Like that we don't get stuck with Disconnected status if we were disconnected * on start. diff --git a/plugins/startup-wizard/startup-wizard.c b/plugins/startup-wizard/startup-wizard.c index 77be99f80f..f6e5dcc34e 100644 --- a/plugins/startup-wizard/startup-wizard.c +++ b/plugins/startup-wizard/startup-wizard.c @@ -76,7 +76,6 @@ startup_wizard (EPlugin *ep, ESEventTargetUpgrade *target) return; } - client = gconf_client_get_default (); accounts = gconf_client_get_list (client, "/apps/evolution/mail/accounts", GCONF_VALUE_STRING, NULL); g_object_unref (client); diff --git a/shell/e-shell-meego.c b/shell/e-shell-meego.c index 3e1bb8a393..0b54250498 100644 --- a/shell/e-shell-meego.c +++ b/shell/e-shell-meego.c @@ -38,7 +38,7 @@ void e_shell_detect_meego (gboolean *is_meego, gboolean *small_screen) void e_shell_detect_meego (gboolean *is_meego, gboolean *small_screen) { Window *wm_window_v = NULL; - unsigned char *moblin_string = NULL; + guchar *moblin_string = NULL; GModule *module = NULL; /* * Wow - this is unpleasant, but it is hard to link directly @@ -46,22 +46,22 @@ void e_shell_detect_meego (gboolean *is_meego, gboolean *small_screen) * to get to the (mind-mashed) 'supporting' window. */ struct { - int (*XFree) (void *); - int (*XGetWindowProperty) (Display*, XID, Atom, long, long, Bool, - Atom, Atom *, int *, unsigned long*, - unsigned long*, unsigned char**); + gint (*XFree) (gpointer); + gint (*XGetWindowProperty) (Display*, XID, Atom, long, long, Bool, + Atom, Atom *, gint *, unsigned long*, + unsigned long*, guchar **); } fns = { 0, 0 }; *is_meego = *small_screen = FALSE; - moblin_string = (unsigned char *)g_getenv ("EVO_MEEGO"); + moblin_string = (guchar *)g_getenv ("EVO_MEEGO"); if (!moblin_string) { GdkScreen *screen; GdkDisplay *display; GdkAtom wm_win, mob_atom; Atom dummy_t; unsigned long dummy_l; - int dummy_i; + gint dummy_i; if (!gdk_display_get_default ()) return; @@ -88,12 +88,12 @@ void e_shell_detect_meego (gboolean *is_meego, gboolean *small_screen) gdk_error_trap_push (); /* get the window manager's supporting window */ - fns.XGetWindowProperty (gdk_x11_display_get_xdisplay (display), + fns.XGetWindowProperty (gdk_x11_display_get_xdisplay (display), GDK_WINDOW_XID (gdk_screen_get_root_window (screen)), gdk_x11_atom_to_xatom_for_display (display, wm_win), 0, 1, False, XA_WINDOW, &dummy_t, &dummy_i, - &dummy_l, &dummy_l, (unsigned char **)(&wm_window_v)); - + &dummy_l, &dummy_l, (guchar **)(&wm_window_v)); + /* get the '_Moblin' setting */ if (wm_window_v && (*wm_window_v != None)) fns.XGetWindowProperty (gdk_x11_display_get_xdisplay (display), *wm_window_v, @@ -101,13 +101,13 @@ void e_shell_detect_meego (gboolean *is_meego, gboolean *small_screen) 0, 8192, False, XA_STRING, &dummy_t, &dummy_i, &dummy_l, &dummy_l, &moblin_string); - + gdk_error_trap_pop (); } if (moblin_string) { - int i; - char **props; + gint i; + gchar **props; g_warning ("prop '%s'", moblin_string); @@ -116,7 +116,7 @@ void e_shell_detect_meego (gboolean *is_meego, gboolean *small_screen) props = g_strsplit ((gchar *)moblin_string, ":", -1); for (i = 0; props && props[i]; i++) { - char **pair = g_strsplit (props[i], "=", 2); + gchar **pair = g_strsplit (props[i], "=", 2); g_warning ("pair '%s'='%s'", pair ? pair[0] : "", pair && pair[0] ? pair[1] : ""); @@ -143,7 +143,7 @@ void e_shell_detect_meego (gboolean *is_meego, gboolean *small_screen) /* gcc -g -O0 -Wall -I. -DTEST_APP `pkg-config --cflags --libs gtk+-2.0` e-shell-meego.c && ./a.out */ #include -int main (int argc, char **argv) +gint main (gint argc, gchar **argv) { gboolean is_meego, small_screen; diff --git a/shell/e-shell-switcher.c b/shell/e-shell-switcher.c index c12423de99..474a22d22c 100644 --- a/shell/e-shell-switcher.c +++ b/shell/e-shell-switcher.c @@ -573,7 +573,7 @@ tool_item_button_cb (GtkWidget *internal_widget, * * Adds a button to @switcher that proxies for @switcher_action. * Switcher buttons appear in the order they were added. A middle - * click opens a new window of this type. + * click opens a new window of this type. * * #EShellWindow adds switcher actions in the order given by the * sort_order field in #EShellBackendClass. diff --git a/shell/e-shell-utils.c b/shell/e-shell-utils.c index 2a9f6f4f72..9fbb0bbca0 100644 --- a/shell/e-shell-utils.c +++ b/shell/e-shell-utils.c @@ -355,25 +355,25 @@ e_shell_utils_import_uris (EShell *shell, gchar **uris, gboolean preview) * @builder: a #GtkBuilder * @widget_name: NULL-terminated list of strings * - * If Evolution is running in Express mode (i.e. if the specified @shell is in - * Express mode), then this function will hide a list of widgets, based on their - * specified names. The list of names must be NULL-terminated, and each element - * of that list must be the name of a widget present in @builder. Those widgets - * will then get hidden. + * If Evolution is running in Express mode (i.e. if the specified @shell is + * in Express mode), then this function will hide a list of widgets, based + * on their specified names. The list of names must be NULL-terminated, + * and each element of that list must be the name of a widget present in + * @builder. Those widgets will then get hidden. * - * This can be used to simplify preference dialogs and such in an easy fashion, for use - * in Express mode. + * This can be used to simplify preference dialogs and such in an easy + * fashion, for use in Express mode. * * If Evolution is not running in Express mode, this function does nothing. */ void e_shell_hide_widgets_for_express_mode (EShell *shell, - GtkBuilder *builder, - const char *widget_name, - ...) + GtkBuilder *builder, + const gchar *widget_name, + ...) { va_list args; - const char *name; + const gchar *name; g_return_if_fail (E_IS_SHELL (shell)); g_return_if_fail (GTK_IS_BUILDER (builder)); @@ -384,19 +384,21 @@ e_shell_hide_widgets_for_express_mode (EShell *shell, va_start (args, widget_name); - name = va_arg (args, const char *); + name = va_arg (args, const gchar *); while (name) { GObject *object; object = gtk_builder_get_object (builder, name); - if (!object || !GTK_IS_WIDGET (object)) { - g_error ("Object '%s' was not found in the builder file, or it is not a GtkWidget", name); + if (!GTK_IS_WIDGET (object)) { + g_error ( + "Object '%s' was not found in the builder " + "file, or it is not a GtkWidget", name); g_assert_not_reached (); } gtk_widget_hide (GTK_WIDGET (object)); - name = va_arg (args, const char *); + name = va_arg (args, const gchar *); } va_end (args); diff --git a/shell/e-shell-utils.h b/shell/e-shell-utils.h index e552cc2e19..1b7202a5c5 100644 --- a/shell/e-shell-utils.h +++ b/shell/e-shell-utils.h @@ -52,7 +52,7 @@ guint e_shell_utils_import_uris (EShell *shell, void e_shell_hide_widgets_for_express_mode (EShell *shell, GtkBuilder *builder, - const char *widget_name, + const gchar *widget_name, ...) G_GNUC_NULL_TERMINATED; G_END_DECLS diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index be099b9869..5c19380da3 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -661,17 +661,24 @@ shell_view_construct_searchbar (EShellView *shell_view) if (e_shell_get_small_screen_mode (shell)) { GtkWidget *image; + GtkWidget *container; GtkAction *action; GtkToolItem *item; - action = e_shell_window_get_action (shell_window, "close-window"); - image = gtk_image_new_from_icon_name ("window-close-hover", - GTK_ICON_SIZE_DIALOG); - item = gtk_tool_button_new (image, gtk_action_get_label (action)); + action = e_shell_window_get_action ( + shell_window, "close-window"); + image = gtk_image_new_from_icon_name ( + "window-close-hover", GTK_ICON_SIZE_DIALOG); + item = gtk_tool_button_new ( + image, gtk_action_get_label (action)); gtk_widget_set_name (GTK_WIDGET (item), "MeeGoCloseButton"); - gtk_activatable_set_related_action (GTK_ACTIVATABLE (item), action); - gtk_box_pack_start ((GtkBox *)e_shell_window_get_menu_bar_box(shell_window), (GtkWidget *)item, FALSE, FALSE, 0); - gtk_widget_show_all((GtkWidget *)item); + gtk_activatable_set_related_action ( + GTK_ACTIVATABLE (item), action); + container = e_shell_window_get_menu_bar_box (shell_window); + gtk_box_pack_start ( + GTK_BOX (container), + GTK_WIDGET (item), FALSE, FALSE, 0); + gtk_widget_show_all (GTK_WIDGET (item)); } return widget; @@ -1739,7 +1746,8 @@ e_shell_view_unblock_update_actions (EShellView *shell_view) g_return_if_fail (shell_view->priv->update_actions_blocked > 0); shell_view->priv->update_actions_blocked--; - if (!shell_view->priv->update_actions_blocked && shell_view->priv->update_actions_called) { + if (!shell_view->priv->update_actions_blocked && + shell_view->priv->update_actions_called) { shell_view->priv->update_actions_called = FALSE; e_shell_view_update_actions (shell_view); } diff --git a/shell/e-shell-window-actions.c b/shell/e-shell-window-actions.c index 65c6acff7a..16b39928ff 100644 --- a/shell/e-shell-window-actions.c +++ b/shell/e-shell-window-actions.c @@ -934,7 +934,7 @@ action_preferences_cb (GtkAction *action, } else { e_preferences_window_show_page ( E_PREFERENCES_WINDOW (preferences_window), - shell_backend_class->preferences_page); + shell_backend_class->preferences_page); } } } @@ -1460,7 +1460,6 @@ static GtkActionEntry shell_entries[] = { N_("Close this window"), G_CALLBACK (action_close_cb) }, - { "close-window", GTK_STOCK_CLOSE, N_("_Close Window"), @@ -1906,7 +1905,7 @@ e_shell_window_actions_init (EShellWindow *shell_window) EFocusTracker *focus_tracker; GtkUIManager *ui_manager; gchar *path; - + g_return_if_fail (E_IS_SHELL_WINDOW (shell_window)); ui_manager = e_shell_window_get_ui_manager (shell_window); @@ -2133,8 +2132,8 @@ e_shell_window_create_new_menu (EShellWindow *shell_window) static GtkAction * e_shell_window_create_switcher_action (GType type, EShellViewClass *class, - const char *name, const char *tooltip, - const char *view_name) + const gchar *name, const gchar *tooltip, + const gchar *view_name) { GtkAction *action; diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c index 6878ff7456..6e47132bc1 100644 --- a/shell/e-shell-window-private.c +++ b/shell/e-shell-window-private.c @@ -445,7 +445,7 @@ e_shell_window_private_constructed (EShellWindow *shell_window) gconf_bridge_bind_property (bridge, key, object, "sidebar-visible"); if (e_shell_get_express_mode (shell)) { - const char *active_view = e_shell_window_get_active_view (shell_window); + const gchar *active_view = e_shell_window_get_active_view (shell_window); e_shell_window_set_switcher_visible (shell_window, FALSE); e_shell_window_set_taskbar_visible (shell_window, active_view && !strcmp (active_view, "mail")); diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c index 7970f5b015..413f799949 100644 --- a/shell/e-shell-window.c +++ b/shell/e-shell-window.c @@ -355,7 +355,7 @@ shell_window_construct_menubar (EShellWindow *shell_window) gtk_widget_show (child); gtk_container_add ((GtkContainer *)parent, child); shell_window->priv->menubar_box = child; - + e_mutual_binding_new (main_menu, "visible", child, "visible"); main_menu = child; @@ -440,7 +440,7 @@ shell_window_construct_toolbar (EShellWindow *shell_window) gtk_box_pack_start (GTK_BOX (box), toolbar, FALSE, FALSE, 0); if (e_shell_get_meego_mode (shell_window->priv->shell)) gtk_widget_set_name (GTK_WIDGET (toolbar), "MeeGoToolbar"); - + return box; } @@ -683,7 +683,6 @@ e_shell_window_class_init (EShellWindowClass *class) class->construct_taskbar = shell_window_construct_taskbar; class->create_shell_view = shell_window_create_shell_view; - /** * EShellWindow:active-view * diff --git a/shell/e-shell.c b/shell/e-shell.c index a786bf6eed..e41d836730 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -61,7 +61,7 @@ struct _EShellPrivate { gchar *geometry; gchar *module_directory; - + gchar *startup_view; guint auto_reconnect : 1; @@ -1940,7 +1940,7 @@ e_shell_adapt_window_size (EShell *shell, scr = gdk_screen_get_default (); monitor = gdk_screen_get_monitor_at_window (scr, GTK_WIDGET (window)->window); gdk_screen_get_monitor_geometry (scr, monitor, &rect); - + gtk_window_set_default_size (window, rect.width, rect.height); gtk_window_set_decorated (window, FALSE); gtk_window_maximize (window); @@ -1948,13 +1948,12 @@ e_shell_adapt_window_size (EShell *shell, void e_shell_set_startup_view (EShell *shell, - const char *view) + const gchar *view) { shell->priv->startup_view = g_strdup(view); } - -const char * +const gchar * e_shell_get_startup_view (EShell *shell) { return shell->priv->startup_view; diff --git a/shell/e-shell.h b/shell/e-shell.h index 0b8c3336c8..f1d76b9ea6 100644 --- a/shell/e-shell.h +++ b/shell/e-shell.h @@ -127,9 +127,9 @@ void e_shell_cancel_quit (EShell *shell); void e_shell_adapt_window_size (EShell *shell, GtkWindow *window); -void e_shell_set_startup_view (EShell *shell, - const char *view); -const char * e_shell_get_startup_view (EShell *shell); +void e_shell_set_startup_view (EShell *shell, + const gchar *view); +const gchar * e_shell_get_startup_view (EShell *shell); G_END_DECLS diff --git a/shell/main.c b/shell/main.c index f342f35588..c41071a349 100644 --- a/shell/main.c +++ b/shell/main.c @@ -507,9 +507,9 @@ main (gint argc, gchar **argv) g_warning ("Could not set PATH for Evolution and its child processes"); g_free (path); - + _e_win32_register_mailer (); - + if (reinstall) { _e_win32_set_default_mailer (); exit (0); diff --git a/widgets/misc/e-account-combo-box.c b/widgets/misc/e-account-combo-box.c index 786478a5e3..288ac408fb 100644 --- a/widgets/misc/e-account-combo-box.c +++ b/widgets/misc/e-account-combo-box.c @@ -41,7 +41,7 @@ enum { struct _EAccountComboBoxPrivate { EAccountList *account_list; GHashTable *index; - int num_displayed_accounts; + gint num_displayed_accounts; }; static gpointer parent_class; @@ -529,7 +529,7 @@ e_account_combo_box_set_active_name (EAccountComboBox *combo_box, * * Return value: number of active and valid accounts as shown in the @combo_box. */ -int +gint e_account_combo_box_count_displayed_accounts (EAccountComboBox *combo_box) { g_return_val_if_fail (E_IS_ACCOUNT_COMBO_BOX (combo_box), -1); diff --git a/widgets/misc/e-account-combo-box.h b/widgets/misc/e-account-combo-box.h index 60078690e9..c3fe4aa0f8 100644 --- a/widgets/misc/e-account-combo-box.h +++ b/widgets/misc/e-account-combo-box.h @@ -78,7 +78,7 @@ gboolean e_account_combo_box_set_active_name (EAccountComboBox *combo_box, const gchar *account_name); -int e_account_combo_box_count_displayed_accounts (EAccountComboBox *combo_box); +gint e_account_combo_box_count_displayed_accounts (EAccountComboBox *combo_box); G_END_DECLS diff --git a/widgets/misc/e-calendar.h b/widgets/misc/e-calendar.h index 83eb8df4ea..a3d979c07e 100644 --- a/widgets/misc/e-calendar.h +++ b/widgets/misc/e-calendar.h @@ -91,7 +91,7 @@ void e_calendar_set_minimum_size (ECalendar *cal, gint rows, gint cols); void e_calendar_set_maximum_size (ECalendar *cal, - gint rows, + gint rows, gint cols); void e_calendar_get_border_size (ECalendar *cal, gint *top, diff --git a/widgets/misc/e-preferences-window.c b/widgets/misc/e-preferences-window.c index d6ee321f5d..9390f047ca 100644 --- a/widgets/misc/e-preferences-window.c +++ b/widgets/misc/e-preferences-window.c @@ -39,7 +39,7 @@ struct _EPreferencesWindowPrivate { GtkListStore *store; GtkTreeModelFilter *filter; - const char *filter_view; + const gchar *filter_view; }; enum { @@ -213,19 +213,19 @@ filter_view (GtkTreeModel *model, /* Show everything except calendar */ if (str && (strncmp (str, "cal", 3) == 0)) visible = FALSE; - else + else visible = TRUE; } else if (strncmp(window->priv->filter_view, "cal", 3) == 0) { /* Show only calendar and nothing else */ if (str && (strncmp (str, "cal", 3) != 0)) visible = FALSE; - else + else visible = TRUE; } else /* In any other case, show everything */ visible = TRUE; - - g_free (str); + + g_free (str); return visible; } @@ -252,13 +252,16 @@ preferences_window_init (EPreferencesWindow *window) window->priv->filter_view = NULL; store = gtk_list_store_new ( - 5, G_TYPE_STRING, G_TYPE_STRING, GDK_TYPE_PIXBUF, G_TYPE_INT, G_TYPE_INT); + 5, G_TYPE_STRING, G_TYPE_STRING, + GDK_TYPE_PIXBUF, G_TYPE_INT, G_TYPE_INT); gtk_tree_sortable_set_sort_column_id ( GTK_TREE_SORTABLE (store), COLUMN_SORT, GTK_SORT_ASCENDING); window->priv->store = store; - window->priv->filter = (GtkTreeModelFilter *)gtk_tree_model_filter_new ((GtkTreeModel *)store, NULL); - gtk_tree_model_filter_set_visible_func (window->priv->filter, filter_view, window, NULL); + window->priv->filter = (GtkTreeModelFilter *) + gtk_tree_model_filter_new (GTK_TREE_MODEL (store), NULL); + gtk_tree_model_filter_set_visible_func ( + window->priv->filter, filter_view, window, NULL); title = _("Evolution Preferences"); gtk_window_set_title (GTK_WINDOW (window), title); @@ -290,7 +293,7 @@ preferences_window_init (EPreferencesWindow *window) gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, TRUE, 0); window->priv->scroll = widget; gtk_widget_show (widget); - + container = widget; widget = gtk_icon_view_new_with_model (GTK_TREE_MODEL (window->priv->filter)); @@ -476,7 +479,7 @@ e_preferences_window_filter_page (EPreferencesWindow *window, window->priv->filter_view = page_name; gtk_tree_model_filter_refilter (window->priv->filter); - /* XXX: We need a better solution to hide the icon view when + /* XXX: We need a better solution to hide the icon view when * there is just one entry */ if (strncmp(page_name, "cal", 3) == 0) { gtk_widget_hide (window->priv->scroll); -- cgit