diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-05-27 23:13:25 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-05-29 00:13:23 +0800 |
commit | fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056 (patch) | |
tree | ae78be371695c3dc18847b87d3f014f985aa3a40 /shell | |
parent | 6f5464f34ceec9e5701e3e3e651a40f9e6b3a072 (diff) | |
download | gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.gz gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.bz2 gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.lz gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.xz gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.zst gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.zip |
Prefer GLib basic types over C types.
Diffstat (limited to 'shell')
39 files changed, 386 insertions, 386 deletions
diff --git a/shell/e-component-registry.c b/shell/e-component-registry.c index 18092979d2..877c410289 100644 --- a/shell/e-component-registry.c +++ b/shell/e-component-registry.c @@ -45,15 +45,15 @@ G_DEFINE_TYPE (EComponentRegistry, e_component_registry, G_TYPE_OBJECT) /* EComponentInfo handling. */ static EComponentInfo * -component_info_new (const char *id, +component_info_new (const gchar *id, GNOME_Evolution_Component iface, - const char *alias, - const char *button_label, - const char *button_tooltips, - const char *menu_label, - const char *menu_accelerator, - const char *icon_name, - int sort_order) + const gchar *alias, + const gchar *button_label, + const gchar *button_tooltips, + const gchar *menu_label, + const gchar *menu_accelerator, + const gchar *icon_name, + gint sort_order) { EComponentInfo *info = g_new0 (EComponentInfo, 1); @@ -108,7 +108,7 @@ set_schemas (EComponentInfo *component_info, { Bonobo_ActivationProperty *property = bonobo_server_info_prop_find (server_info, "evolution:uri_schemas"); Bonobo_StringList *list; - int i; + gint i; if (property == NULL) return; @@ -133,8 +133,8 @@ query_components (EComponentRegistry *registry) const gchar * const *language_names; CORBA_Environment ev; GSList *languages = NULL; - char *query; - int i; + gchar *query; + gint i; if (registry->priv->init) return; @@ -147,7 +147,7 @@ query_components (EComponentRegistry *registry) g_free (query); if (BONOBO_EX (&ev)) { - char *ex_text = bonobo_exception_get_text (&ev); + gchar *ex_text = bonobo_exception_get_text (&ev); g_warning ("Cannot query for components: %s\n", ex_text); g_free (ex_text); CORBA_exception_free (&ev); @@ -159,22 +159,22 @@ query_components (EComponentRegistry *registry) languages = g_slist_append (languages, (gpointer)(*language_names++)); for (i = 0; i < info_list->_length; i++) { - const char *id; - const char *label; - const char *menu_label; - const char *menu_accelerator; - const char *alias; - const char *icon_name; - const char *sort_order_string; - const char *tooltips; + const gchar *id; + const gchar *label; + const gchar *menu_label; + const gchar *menu_accelerator; + const gchar *alias; + const gchar *icon_name; + const gchar *sort_order_string; + const gchar *tooltips; EComponentInfo *info; - int sort_order; + gint sort_order; GNOME_Evolution_Component iface; id = info_list->_buffer[i].iid; - iface = bonobo_activation_activate_from_id ((char *)id, 0, NULL, &ev); + iface = bonobo_activation_activate_from_id ((gchar *)id, 0, NULL, &ev); if (BONOBO_EX (&ev) || iface == CORBA_OBJECT_NIL) { - char *ex_text = bonobo_exception_get_text (&ev); + gchar *ex_text = bonobo_exception_get_text (&ev); g_warning("Cannot activate '%s': %s\n", id, ex_text); g_free(ex_text); @@ -276,7 +276,7 @@ e_component_registry_peek_list (EComponentRegistry *registry) EComponentInfo * e_component_registry_peek_info (EComponentRegistry *registry, enum _EComponentRegistryField field, - const char *key) + const gchar *key) { GSList *p, *q; @@ -298,7 +298,7 @@ e_component_registry_peek_info (EComponentRegistry *registry, break; case ECR_FIELD_SCHEMA: for (q = info->uri_schemas; q != NULL; q = q->next) - if (strcmp((char *)q->data, key) == 0) + if (strcmp((gchar *)q->data, key) == 0) return info; break; } @@ -309,7 +309,7 @@ e_component_registry_peek_info (EComponentRegistry *registry, GNOME_Evolution_Component e_component_registry_activate (EComponentRegistry *registry, - const char *id, + const gchar *id, CORBA_Environment *ev) { EComponentInfo *info; diff --git a/shell/e-component-registry.h b/shell/e-component-registry.h index 927fcf0120..c8c292a935 100644 --- a/shell/e-component-registry.h +++ b/shell/e-component-registry.h @@ -63,20 +63,20 @@ enum _EComponentRegistryField { }; struct _EComponentInfo { - char *id; + gchar *id; - char *alias; + gchar *alias; /* NULL if not activated. */ GNOME_Evolution_Component iface; - char *button_label; - char *button_tooltips; - char *menu_label; - char *menu_accelerator; - char *icon_name; + gchar *button_label; + gchar *button_tooltips; + gchar *menu_label; + gchar *menu_accelerator; + gchar *icon_name; - int sort_order; + gint sort_order; /* List of URI schemas that this component supports. */ GSList *uri_schemas; /* <char *> */ @@ -90,10 +90,10 @@ EComponentRegistry *e_component_registry_new (void); GSList *e_component_registry_peek_list (EComponentRegistry *registry); EComponentInfo *e_component_registry_peek_info (EComponentRegistry *registry, enum _EComponentRegistryField type, - const char *key); + const gchar *key); GNOME_Evolution_Component e_component_registry_activate (EComponentRegistry *registry, - const char *id, + const gchar *id, CORBA_Environment *ev); diff --git a/shell/e-component-view.c b/shell/e-component-view.c index b87078e974..8e75b5b4a8 100644 --- a/shell/e-component-view.c +++ b/shell/e-component-view.c @@ -93,7 +93,7 @@ e_component_view_init (EComponentView *shell) { } -EComponentView *e_component_view_new(GNOME_Evolution_ShellView parent, const char *id, struct _GtkWidget *side, struct _GtkWidget *view, struct _GtkWidget *statusbar) +EComponentView *e_component_view_new(GNOME_Evolution_ShellView parent, const gchar *id, struct _GtkWidget *side, struct _GtkWidget *view, struct _GtkWidget *statusbar) { EComponentView *new = g_object_new (e_component_view_get_type (), NULL); CORBA_Environment ev = { NULL }; @@ -110,7 +110,7 @@ EComponentView *e_component_view_new(GNOME_Evolution_ShellView parent, const cha return new; } -EComponentView *e_component_view_new_controls(GNOME_Evolution_ShellView parent, const char *id, BonoboControl *side, BonoboControl *view, BonoboControl *statusbar) +EComponentView *e_component_view_new_controls(GNOME_Evolution_ShellView parent, const gchar *id, BonoboControl *side, BonoboControl *view, BonoboControl *statusbar) { EComponentView *new = g_object_new (e_component_view_get_type (), NULL); CORBA_Environment ev = { NULL }; @@ -128,7 +128,7 @@ EComponentView *e_component_view_new_controls(GNOME_Evolution_ShellView parent, } void -e_component_view_set_title(EComponentView *ecv, const char *title) +e_component_view_set_title(EComponentView *ecv, const gchar *title) { CORBA_Environment ev = { NULL }; @@ -138,7 +138,7 @@ e_component_view_set_title(EComponentView *ecv, const char *title) } void -e_component_view_set_button_icon (EComponentView *ecv, const char *iconName) +e_component_view_set_button_icon (EComponentView *ecv, const gchar *iconName) { CORBA_Environment ev = { NULL }; diff --git a/shell/e-component-view.h b/shell/e-component-view.h index 51004e489e..9b741837b1 100644 --- a/shell/e-component-view.h +++ b/shell/e-component-view.h @@ -50,7 +50,7 @@ struct _EComponentView { EComponentViewPrivate *priv; - char *id; + gchar *id; GNOME_Evolution_ShellView shell_view; struct _BonoboControl *side_control; @@ -65,11 +65,11 @@ struct _EComponentViewClass { }; GType e_component_view_get_type(void); -EComponentView *e_component_view_new(GNOME_Evolution_ShellView shell_view, const char *id, struct _GtkWidget *side, struct _GtkWidget *view, struct _GtkWidget *status); -EComponentView *e_component_view_new_controls(GNOME_Evolution_ShellView parent, const char *id, struct _BonoboControl *side, struct _BonoboControl *view, struct _BonoboControl *statusbar); +EComponentView *e_component_view_new(GNOME_Evolution_ShellView shell_view, const gchar *id, struct _GtkWidget *side, struct _GtkWidget *view, struct _GtkWidget *status); +EComponentView *e_component_view_new_controls(GNOME_Evolution_ShellView parent, const gchar *id, struct _BonoboControl *side, struct _BonoboControl *view, struct _BonoboControl *statusbar); -void e_component_view_set_title(EComponentView *ecv, const char *title); -void e_component_view_set_button_icon (EComponentView *ecv, const char *iconName); +void e_component_view_set_title(EComponentView *ecv, const gchar *title); +void e_component_view_set_button_icon (EComponentView *ecv, const gchar *iconName); #ifdef __cplusplus } diff --git a/shell/e-config-upgrade.c b/shell/e-config-upgrade.c index 9aa71d3278..a933972b9b 100644 --- a/shell/e-config-upgrade.c +++ b/shell/e-config-upgrade.c @@ -132,12 +132,12 @@ static e_gconf_map_list_t remap_list[] = { { NULL }, }; -int -e_config_upgrade(int major, int minor, int revision) +gint +e_config_upgrade(gint major, gint minor, gint revision) { xmlDocPtr config_doc; - char *conf_file; - int res = 0; + gchar *conf_file; + gint res = 0; conf_file = g_build_filename (g_get_home_dir (), "evolution", "config.xmldb", NULL); config_doc = e_xml_parse_file (conf_file); diff --git a/shell/e-config-upgrade.h b/shell/e-config-upgrade.h index f4580425bd..36901109d7 100644 --- a/shell/e-config-upgrade.h +++ b/shell/e-config-upgrade.h @@ -24,6 +24,6 @@ #ifndef _E_CONFIG_UPGRADE_H #define _E_CONFIG_UPGRADE_H -int e_config_upgrade (int major, int minor, int revision); +gint e_config_upgrade (gint major, gint minor, gint revision); #endif /* _E_CONFIG_UPGRADE_H */ diff --git a/shell/e-shell-importer.c b/shell/e-shell-importer.c index 74a89cc2ec..0e0a07ea21 100644 --- a/shell/e-shell-importer.c +++ b/shell/e-shell-importer.c @@ -147,10 +147,10 @@ static struct { #define num_info (sizeof (info) / sizeof (info[0])) static GtkWidget * -create_help (const char *name) +create_help (const gchar *name) { GtkWidget *label; - int i; + gint i; for (i = 0; i < num_info; i++) { if (!strcmp (name, info[i].name)) @@ -175,8 +175,8 @@ filename_changed (GtkWidget *widget, ImportData *data) { ImportDialogFilePage *page; - const char *filename; - int fileok; + const gchar *filename; + gint fileok; page = data->filepage; @@ -189,7 +189,7 @@ filename_changed (GtkWidget *widget, gboolean valid; GSList *l; EImportImporter *first = NULL; - int i=0, firstitem=0; + gint i=0, firstitem=0; g_free(page->target->uri_src); page->target->uri_src = g_filename_to_uri(filename, NULL, NULL); @@ -253,12 +253,12 @@ filetype_changed_cb (GtkWidget *combobox, ImportData *data) #if 0 static int -compare_info_name (const void *data1, const void *data2) +compare_info_name (gconstpointer data1, const void *data2) { const Bonobo_ServerInfo *info1 = (Bonobo_ServerInfo *)data1; const Bonobo_ServerInfo *info2 = (Bonobo_ServerInfo *)data2; - const char *name1 = get_name_from_component_info (info1); - const char *name2 = get_name_from_component_info (info2); + const gchar *name1 = get_name_from_component_info (info1); + const gchar *name2 = get_name_from_component_info (info2); /* If we can't find a name for a plug-in, its iid will be used * for display. Put such plug-ins at the end of the list since @@ -281,7 +281,7 @@ importer_file_page_new (ImportData *data) GtkWidget *table, *label; GtkCellRenderer *cell; GtkListStore *store; - int row = 0; + gint row = 0; page = g_new0 (ImportDialogFilePage, 1); @@ -390,7 +390,7 @@ prepare_intelligent_page (GnomeDruidPage *dpage, { GSList *l; GtkWidget *table; - int row; + gint row; ImportDialogImporterPage *page = data->importerpage; if (page->target != NULL) @@ -412,7 +412,7 @@ prepare_intelligent_page (GnomeDruidPage *dpage, row = 0; for (;l;l=l->next) { EImportImporter *eii = l->data; - char *str; + gchar *str; GtkWidget *w, *label; w = e_import_get_widget(data->import, (EImportTarget *)page->target, eii); @@ -456,7 +456,7 @@ import_druid_esc (GnomeDruid *druid, } static void -import_druid_weak_notify (void *blah, +import_druid_weak_notify (gpointer blah, GObject *where_the_object_was) { ImportData *data = (ImportData *) blah; @@ -475,7 +475,7 @@ import_druid_weak_notify (void *blah, } static void -import_status(EImport *import, const char *what, int pc, void *d) +import_status(EImport *import, const gchar *what, gint pc, gpointer d) { ImportData *data = d; @@ -491,7 +491,7 @@ import_dialog_response(GtkDialog *d, guint button, ImportData *data) } static void -import_done(EImport *ei, void *d) +import_done(EImport *ei, gpointer d) { ImportData *data = d; @@ -500,7 +500,7 @@ import_done(EImport *ei, void *d) } static void -import_intelligent_done(EImport *ei, void *d) +import_intelligent_done(EImport *ei, gpointer d) { ImportData *data = d; @@ -519,7 +519,7 @@ import_druid_finish (GnomeDruidPage *page, ImportData *data) { EImportCompleteFunc done = NULL; - char *msg = NULL; + gchar *msg = NULL; if (gtk_toggle_button_get_active((GtkToggleButton *)data->typepage->intelligent)) { data->importerpage->current = data->importerpage->importers; @@ -677,7 +677,7 @@ back_intelligent_page (GnomeDruidPage *page, } static void -dialog_weak_notify (void *data, +dialog_weak_notify (gpointer data, GObject *where_the_dialog_was) { gboolean *dialog_open = (gboolean *) data; @@ -692,7 +692,7 @@ e_shell_importer_start_import (EShellWindow *shell_window) GtkWidget *html; static gboolean dialog_open = FALSE; GdkPixbuf *icon; - char *gladefile; + gchar *gladefile; if (dialog_open) { return; diff --git a/shell/e-shell-nm.c b/shell/e-shell-nm.c index f51a565486..c8b449bed1 100644 --- a/shell/e-shell-nm.c +++ b/shell/e-shell-nm.c @@ -55,9 +55,9 @@ reinit_dbus (gpointer user_data) static DBusHandlerResult e_shell_network_monitor (DBusConnection *connection G_GNUC_UNUSED, - DBusMessage *message, void *user_data) + DBusMessage *message, gpointer user_data) { - const char *object; + const gchar *object; EShell *shell = user_data; GNOME_Evolution_ShellState shell_state; EShellLineStatus line_status; diff --git a/shell/e-shell-settings-dialog.c b/shell/e-shell-settings-dialog.c index 291a46c187..1a9529688e 100644 --- a/shell/e-shell-settings-dialog.c +++ b/shell/e-shell-settings-dialog.c @@ -55,7 +55,7 @@ set_dialog_size (EShellSettingsDialog *dialog) PangoLayout *layout; PangoContext *context; PangoFontMetrics *metrics; - int width, height; + gint width, height; layout = gtk_widget_create_pango_layout (GTK_WIDGET (dialog), "M"); context = pango_layout_get_context (layout); @@ -78,21 +78,21 @@ set_dialog_size (EShellSettingsDialog *dialog) /* Page handling. */ struct _Page { - char *title; - char *description; + gchar *title; + gchar *description; GdkPixbuf *icon; Bonobo_ActivationProperty *type; - int priority; + gint priority; EConfigPage *page_widget; }; typedef struct _Page Page; static Page * -page_new (const char *title, - const char *description, +page_new (const gchar *title, + const gchar *description, GdkPixbuf *icon, Bonobo_ActivationProperty *type, - int priority, + gint priority, EConfigPage *page_widget) { Page *page; @@ -124,8 +124,8 @@ page_free (Page *page) } static int -compare_page_func (const void *a, - const void *b) +compare_page_func (gconstpointer a, + gconstpointer b) { const Page *page_a; const Page *page_b; @@ -155,7 +155,7 @@ load_pages (EShellSettingsDialog *dialog) GSList *languages = NULL; GList *page_list; GList *p; - int i, j; + gint i, j; priv = dialog->priv; @@ -178,12 +178,12 @@ load_pages (EShellSettingsDialog *dialog) for (i = 0; i < control_list->_length; i ++) { CORBA_Object corba_object; Bonobo_ServerInfo *info; - const char *title; - const char *description; - const char *icon_path; - const char *priority_string; + const gchar *title; + const gchar *description; + const gchar *icon_path; + const gchar *priority_string; Bonobo_ActivationProperty *type; - int priority; + gint priority; GdkPixbuf *icon; CORBA_exception_init (&ev); @@ -213,7 +213,7 @@ load_pages (EShellSettingsDialog *dialog) else priority = atoi (priority_string); - corba_object = bonobo_activation_activate_from_id ((char *) info->iid, 0, NULL, &ev); + corba_object = bonobo_activation_activate_from_id ((gchar *) info->iid, 0, NULL, &ev); if (! BONOBO_EX (&ev)) { Page *page; @@ -223,7 +223,7 @@ load_pages (EShellSettingsDialog *dialog) page_list = g_list_prepend (page_list, page); } else { - char *bonobo_ex_text = bonobo_exception_get_text (&ev); + gchar *bonobo_ex_text = bonobo_exception_get_text (&ev); g_warning ("Cannot activate %s -- %s", info->iid, bonobo_ex_text); g_free (bonobo_ex_text); } @@ -326,11 +326,11 @@ e_shell_settings_dialog_new (void) } void -e_shell_settings_dialog_show_type (EShellSettingsDialog *dialog, const char *type) +e_shell_settings_dialog_show_type (EShellSettingsDialog *dialog, const gchar *type) { EShellSettingsDialogPrivate *priv; gpointer key, value; - int page; + gint page; g_return_if_fail (dialog != NULL); g_return_if_fail (E_IS_SHELL_SETTINGS_DIALOG (dialog)); @@ -339,7 +339,7 @@ e_shell_settings_dialog_show_type (EShellSettingsDialog *dialog, const char *typ priv = dialog->priv; if (!g_hash_table_lookup_extended (priv->types, type, &key, &value)) { - char *slash, *supertype; + gchar *slash, *supertype; slash = strchr (type, '/'); if (slash) { diff --git a/shell/e-shell-settings-dialog.h b/shell/e-shell-settings-dialog.h index 55cce4a52f..ba636e6071 100644 --- a/shell/e-shell-settings-dialog.h +++ b/shell/e-shell-settings-dialog.h @@ -56,7 +56,7 @@ struct _EShellSettingsDialogClass { GType e_shell_settings_dialog_get_type (void); GtkWidget *e_shell_settings_dialog_new (void); void e_shell_settings_dialog_show_type (EShellSettingsDialog *dialog, - const char *type); + const gchar *type); #ifdef __cplusplus } diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index a6d071cc78..319a0d3c76 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -35,7 +35,7 @@ static BonoboObjectClass *parent_class = NULL; struct _EShellViewPrivate { - int dummy; + gint dummy; }; static void @@ -44,7 +44,7 @@ impl_ShellView_setTitle(PortableServer_Servant _servant, const CORBA_char *id, c EShellView *esw = (EShellView *)bonobo_object_from_servant(_servant); /* To translators: This is the window title and %s is the component name. Most translators will want to keep it as is. */ - char *tmp = g_strdup_printf(_("%s - Evolution"), title); + gchar *tmp = g_strdup_printf(_("%s - Evolution"), title); e_shell_window_set_title(esw->window, id, tmp); g_free(tmp); @@ -59,8 +59,8 @@ impl_ShellView_setComponent(PortableServer_Servant _servant, const CORBA_char *i } struct change_icon_struct { - const char *component_name; - const char *icon_name; + const gchar *component_name; + const gchar *icon_name; }; static gboolean diff --git a/shell/e-shell-window-commands.c b/shell/e-shell-window-commands.c index 6f180012cb..a81bacf07a 100644 --- a/shell/e-shell-window-commands.c +++ b/shell/e-shell-window-commands.c @@ -63,7 +63,7 @@ launch_pilot_settings (void) { GError* error = NULL; - gchar* args = g_find_program_in_path ("gpilotd-control-applet"); + gchar * args = g_find_program_in_path ("gpilotd-control-applet"); if (args == NULL) { e_notice (NULL, GTK_MESSAGE_ERROR, _("The GNOME Pilot tools do not appear to be installed on this system.")); @@ -86,7 +86,7 @@ launch_pilot_settings (void) static void command_import (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { e_shell_importer_start_import (window); } @@ -94,7 +94,7 @@ command_import (BonoboUIComponent *uih, static void command_page_setup (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { e_print_run_page_setup_dialog (GTK_WINDOW (window)); } @@ -102,7 +102,7 @@ command_page_setup (BonoboUIComponent *uih, static void command_close (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { if (e_shell_request_close_window (e_shell_window_peek_shell (window), window)) gtk_widget_destroy (GTK_WIDGET (window)); @@ -111,7 +111,7 @@ command_close (BonoboUIComponent *uih, static void command_quit (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { EShell *shell = e_shell_window_peek_shell (window); @@ -121,7 +121,7 @@ command_quit (BonoboUIComponent *uih, static void command_submit_bug (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { const gchar *command_line; GError *error = NULL; @@ -150,7 +150,7 @@ command_submit_bug (BonoboUIComponent *uih, No all environments are utf8 and not all editors can handle it. */ -static const char *authors[] = { +static const gchar *authors[] = { "Aaron Weber", "Abel Cheung", "Abhishek Parwal", @@ -915,7 +915,7 @@ static const char *authors[] = { NULL }; -static const char *documentors[] = { +static const gchar *documentors[] = { "Aaron Weber", "Binika Preet", "Dan Winship", @@ -929,7 +929,7 @@ static const char *documentors[] = { static void command_about (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { gchar *translator_credits; @@ -958,7 +958,7 @@ command_about (BonoboUIComponent *uih, static void command_open_faq (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { const gchar *uri; @@ -969,9 +969,9 @@ command_open_faq (BonoboUIComponent *uih, static void command_quick_reference (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { - char *quickref; + gchar *quickref; const gchar * const *language_names; language_names = g_get_language_names (); @@ -990,7 +990,7 @@ command_quick_reference (BonoboUIComponent *uih, if (file) { GError *error = NULL; - char *uri = g_file_get_uri (file); + gchar *uri = g_file_get_uri (file); g_app_info_launch_default_for_uri (uri, NULL, &error); @@ -1015,7 +1015,7 @@ command_quick_reference (BonoboUIComponent *uih, static void command_work_offline (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { EShell *shell; @@ -1026,7 +1026,7 @@ command_work_offline (BonoboUIComponent *uih, static void command_work_online (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { EShell *shell; @@ -1037,7 +1037,7 @@ command_work_online (BonoboUIComponent *uih, static void command_open_new_window (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { e_shell_create_window (e_shell_window_peek_shell (window), e_shell_window_peek_current_component_id (window), @@ -1050,15 +1050,15 @@ command_open_new_window (BonoboUIComponent *uih, static void command_send_receive (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { e_shell_send_receive (e_shell_window_peek_shell (window)); } static void command_forget_passwords (BonoboUIComponent *ui_component, - void *data, - const char *path) + gpointer data, + const gchar *path) { if (e_error_run (NULL, "shell:forget-passwords", NULL) == GTK_RESPONSE_OK) e_passwords_forget_passwords(); @@ -1069,7 +1069,7 @@ command_forget_passwords (BonoboUIComponent *ui_component, static void command_settings (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { e_shell_window_show_settings (window); } @@ -1077,7 +1077,7 @@ command_settings (BonoboUIComponent *uih, static void command_pilot_settings (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { launch_pilot_settings (); } @@ -1216,9 +1216,9 @@ shell_line_status_changed_cb (EShell *shell, static void view_buttons_icontext_item_toggled_handler (BonoboUIComponent *ui_component, - const char *path, + const gchar *path, Bonobo_UIComponent_EventType type, - const char *state, + const gchar *state, EShellWindow *shell_window) { ESidebar *sidebar; @@ -1229,9 +1229,9 @@ view_buttons_icontext_item_toggled_handler (BonoboUIComponent *ui_comp static void view_buttons_icon_item_toggled_handler (BonoboUIComponent *ui_component, - const char *path, + const gchar *path, Bonobo_UIComponent_EventType type, - const char *state, + const gchar *state, EShellWindow *shell_window) { ESidebar *sidebar; @@ -1242,9 +1242,9 @@ view_buttons_icon_item_toggled_handler (BonoboUIComponent *ui_componen static void view_buttons_text_item_toggled_handler (BonoboUIComponent *ui_component, - const char *path, + const gchar *path, Bonobo_UIComponent_EventType type, - const char *state, + const gchar *state, EShellWindow *shell_window) { ESidebar *sidebar; @@ -1255,9 +1255,9 @@ view_buttons_text_item_toggled_handler (BonoboUIComponent *ui_componen static void view_buttons_toolbar_item_toggled_handler (BonoboUIComponent *ui_component, - const char *path, + const gchar *path, Bonobo_UIComponent_EventType type, - const char *state, + const gchar *state, EShellWindow *shell_window) { ESidebar *sidebar; @@ -1268,9 +1268,9 @@ view_buttons_toolbar_item_toggled_handler (BonoboUIComponent *ui_compo static void view_buttons_hide_item_toggled_handler (BonoboUIComponent *ui_component, - const char *path, + const gchar *path, Bonobo_UIComponent_EventType type, - const char *state, + const gchar *state, EShellWindow *shell_window) { ESidebar *sidebar; @@ -1285,9 +1285,9 @@ view_buttons_hide_item_toggled_handler (BonoboUIComponent *ui_componen static void view_toolbar_item_toggled_handler (BonoboUIComponent *ui_component, - const char *path, + const gchar *path, Bonobo_UIComponent_EventType type, - const char *state, + const gchar *state, EShellWindow *shell_window) { gboolean is_visible; @@ -1300,9 +1300,9 @@ view_toolbar_item_toggled_handler (BonoboUIComponent *ui_component, static void view_statusbar_item_toggled_handler (BonoboUIComponent *ui_component, - const char *path, + const gchar *path, Bonobo_UIComponent_EventType type, - const char *state, + const gchar *state, EShellWindow *shell_window) { GtkWidget *status_bar = e_shell_window_peek_statusbar (shell_window); @@ -1321,9 +1321,9 @@ view_statusbar_item_toggled_handler (BonoboUIComponent *ui_component, static void view_sidebar_item_toggled_handler (BonoboUIComponent *ui_component, - const char *path, + const gchar *path, Bonobo_UIComponent_EventType type, - const char *state, + const gchar *state, EShellWindow *shell_window) { GtkWidget *side_bar = GTK_WIDGET(e_shell_window_peek_sidebar (shell_window)); diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c index 83e537c31b..8b24805fd4 100644 --- a/shell/e-shell-window.c +++ b/shell/e-shell-window.c @@ -60,18 +60,18 @@ gboolean e_shell_dbus_initialise (EShell *shell); to -1. When the views are created the first time, the widget pointers as well as the notebook page value get set. */ struct _ComponentView { - int button_id; - char *component_id; - char *component_alias; + gint button_id; + gchar *component_id; + gchar *component_alias; GNOME_Evolution_ComponentView component_view; - char *title; + gchar *title; GtkWidget *sidebar_widget; GtkWidget *view_widget; GtkWidget *statusbar_widget; - int notebook_page_num; + gint notebook_page_num; }; typedef struct _ComponentView ComponentView; @@ -132,7 +132,7 @@ static gboolean store_window_size (GtkWidget* widget); /* ComponentView handling. */ static ComponentView * -component_view_new (const char *id, const char *alias, int button_id) +component_view_new (const gchar *id, const gchar *alias, gint button_id) { ComponentView *view = g_new0 (ComponentView, 1); @@ -206,8 +206,8 @@ init_view (EShellWindow *window, Bonobo_Control statusbar_control; CORBA_boolean select_item; CORBA_Environment ev; - int sidebar_notebook_page_num; - int view_notebook_page_num; + gint sidebar_notebook_page_num; + gint view_notebook_page_num; g_return_if_fail (view->view_widget == NULL); g_return_if_fail (view->sidebar_widget == NULL); @@ -222,7 +222,7 @@ init_view (EShellWindow *window, component_iface = e_component_registry_activate (registry, view->component_id, &ev); if (BONOBO_EX (&ev) || component_iface == CORBA_OBJECT_NIL) { - char *ex_text = bonobo_exception_get_text (&ev); + gchar *ex_text = bonobo_exception_get_text (&ev); g_warning ("Cannot activate component %s: %s", view->component_id, ex_text); g_free (ex_text); CORBA_exception_free (&ev); @@ -305,7 +305,7 @@ switch_view (EShellWindow *window, ComponentView *component_view) EComponentInfo *info = e_component_registry_peek_info (registry, ECR_FIELD_ID, component_view->component_id); - char *title; + gchar *title; if (component_view->sidebar_widget == NULL) { init_view (window, component_view); @@ -423,7 +423,7 @@ update_send_receive_sensitivity (EShellWindow *window) /* Callbacks. */ static ComponentView * -get_component_view (EShellWindow *window, int id) +get_component_view (EShellWindow *window, gint id) { GSList *p; @@ -438,7 +438,7 @@ get_component_view (EShellWindow *window, int id) static void sidebar_button_selected_callback (ESidebar *sidebar, - int button_id, + gint button_id, EShellWindow *window) { ComponentView *component_view; @@ -450,7 +450,7 @@ sidebar_button_selected_callback (ESidebar *sidebar, static gboolean sidebar_button_pressed_callback (ESidebar *sidebar, GdkEventButton *event, - int button_id, + gint button_id, EShellWindow *window) { if (event->type == GDK_BUTTON_PRESS && @@ -502,7 +502,7 @@ shell_line_status_changed_callback (EShell *shell, static void ui_engine_add_hint_callback (BonoboUIEngine *engine, - const char *hint, + const gchar *hint, EShellWindow *window) { gtk_label_set_text (GTK_LABEL (window->priv->menu_hint_label), hint); @@ -614,9 +614,9 @@ setup_status_bar (EShellWindow *window) static void menu_component_selected (BonoboUIComponent *uic, EShellWindow *window, - const char *path) + const gchar *path) { - char *component_id; + gchar *component_id; component_id = strchr(path, '-'); if (component_id) @@ -640,10 +640,10 @@ setup_widgets (EShellWindow *window) GtkWidget *contents_vbox; GSList *p; GString *xml; - int button_id; + gint button_id; gboolean visible; - char *style; - int mode; + gchar *style; + gint mode; priv->paned = gtk_hpaned_new (); gtk_widget_show (priv->paned); @@ -754,7 +754,7 @@ setup_widgets (EShellWindow *window) button_id = 0; xml = g_string_new(""); for (p = e_component_registry_peek_list (registry); p != NULL; p = p->next) { - char *tmp, *tmp2; + gchar *tmp, *tmp2; EComponentInfo *info = p->data; ComponentView *view = component_view_new (info->id, info->alias, button_id); GtkIconInfo *icon_info; @@ -983,14 +983,14 @@ e_shell_window_init (EShellWindow *shell_window) GtkWidget * e_shell_window_new (EShell *shell, - const char *component_id) + const gchar *component_id) { EShellWindow *window = g_object_new (e_shell_window_get_type (), NULL); EShellWindowPrivate *priv = window->priv; GConfClient *gconf_client = gconf_client_get_default (); BonoboUIContainer *ui_container; - char *default_component_id = NULL; - char *xmlfile; + gchar *default_component_id = NULL; + gchar *xmlfile; gint width, height; if (bonobo_window_construct (BONOBO_WINDOW (window), @@ -1063,7 +1063,7 @@ e_shell_window_new (EShell *shell, void -e_shell_window_switch_to_component (EShellWindow *window, const char *component_id) +e_shell_window_switch_to_component (EShellWindow *window, const gchar *component_id) { EShellWindowPrivate *priv = window->priv; ComponentView *view = NULL; @@ -1093,7 +1093,7 @@ e_shell_window_switch_to_component (EShellWindow *window, const char *component_ } -const char * +const gchar * e_shell_window_peek_current_component_id (EShellWindow *window) { g_return_val_if_fail (E_IS_SHELL_WINDOW (window), NULL); @@ -1140,8 +1140,8 @@ void e_shell_window_save_defaults (EShellWindow *window) { GConfClient *client = gconf_client_get_default (); - char *prop; - const char *style; + gchar *prop; + const gchar *style; gboolean visible; gconf_client_set_int (client, "/apps/evolution/shell/view_defaults/folder_bar/width", @@ -1209,7 +1209,7 @@ e_shell_window_show_settings (EShellWindow *window) } void -e_shell_window_set_title(EShellWindow *window, const char *component_id, const char *title) +e_shell_window_set_title(EShellWindow *window, const gchar *component_id, const gchar *title) { EShellWindowPrivate *priv = window->priv; ComponentView *view = NULL; @@ -1246,7 +1246,7 @@ e_shell_window_set_title(EShellWindow *window, const char *component_id, const c * @param icon Icon buffer. **/ void -e_shell_window_change_component_button_icon (EShellWindow *window, const char *component_id, const char *icon_name) +e_shell_window_change_component_button_icon (EShellWindow *window, const gchar *component_id, const gchar *icon_name) { EShellWindowPrivate *priv; GSList *p; diff --git a/shell/e-shell-window.h b/shell/e-shell-window.h index 869352b01c..d3abe1f201 100644 --- a/shell/e-shell-window.h +++ b/shell/e-shell-window.h @@ -58,22 +58,22 @@ struct _EShellWindowClass { GType e_shell_window_get_type (void); GtkWidget *e_shell_window_new (EShell *shell, - const char *component_id); + const gchar *component_id); void e_shell_window_switch_to_component (EShellWindow *shell, - const char *component_id); -const char *e_shell_window_peek_current_component_id (EShellWindow *shell); + const gchar *component_id); +const gchar *e_shell_window_peek_current_component_id (EShellWindow *shell); EShell *e_shell_window_peek_shell (EShellWindow *window); BonoboUIComponent *e_shell_window_peek_bonobo_ui_component (EShellWindow *window); ESidebar *e_shell_window_peek_sidebar (EShellWindow *window); GtkWidget *e_shell_window_peek_statusbar (EShellWindow *window); -void e_shell_window_set_title(EShellWindow *window, const char *component_id, const char *title); +void e_shell_window_set_title(EShellWindow *window, const gchar *component_id, const gchar *title); void e_shell_window_save_defaults (EShellWindow *window); void e_shell_window_show_settings (EShellWindow *window); -void e_shell_window_change_component_button_icon (EShellWindow *window, const char *component_id, const char *icon_name); +void e_shell_window_change_component_button_icon (EShellWindow *window, const gchar *component_id, const gchar *icon_name); #endif /* _E_SHELL_WINDOW_H_ */ diff --git a/shell/e-shell.c b/shell/e-shell.c index 9b4e6bc53a..ed7f8cc4b0 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -68,7 +68,7 @@ #include "evolution-listener.h" #include "evolution-shell-component-utils.h" -static void set_line_status_complete(EvolutionListener *el, void *data); +static void set_line_status_complete(EvolutionListener *el, gpointer data); #define PARENT_TYPE bonobo_object_get_type () static BonoboObjectClass *parent_class = NULL; @@ -76,7 +76,7 @@ static gboolean session_started = FALSE; struct _EShellPrivate { /* IID for registering the object on OAF. */ - char *iid; + gchar *iid; GList *windows; @@ -85,11 +85,11 @@ struct _EShellPrivate { /* Names for the types of the folders that have maybe crashed. */ /* FIXME TODO */ - GList *crash_type_names; /* char * */ + GList *crash_type_names; /* gchar * */ /* Line status and controllers */ EShellLineStatus line_status; - int line_status_pending; + gint line_status_pending; EShellLineStatus line_status_working; EvolutionListener *line_status_listener; @@ -105,19 +105,19 @@ struct _EShellPrivate { /* Whether the shell is succesfully initialized. This is needed during the start-up sequence, to avoid CORBA calls to do make wrong things to happen while the shell is initializing. */ - unsigned int is_initialized : 1; + guint is_initialized : 1; /* Wether the shell is working in "interactive" mode or not. (Currently, it's interactive IIF there is at least one active view.) */ - unsigned int is_interactive : 1; + guint is_interactive : 1; /* Whether quit has been requested, and the shell is now waiting for permissions from all the components to quit. */ - unsigned int preparing_to_quit : 1; + guint preparing_to_quit : 1; /* Whether we are recovering from a crash in the previous session. */ - unsigned int crash_recovery : 1; + guint crash_recovery : 1; }; @@ -160,7 +160,7 @@ set_interactive (EShell *shell, GSList *component_list; GSList *p; GList *first_element; - int num_windows; + gint num_windows; GtkWidget *view; g_return_if_fail (E_IS_SHELL (shell)); @@ -260,8 +260,8 @@ impl_Shell_handleURI (PortableServer_Servant servant, { EShell *shell = E_SHELL (bonobo_object_from_servant (servant)); EComponentInfo *component_info; - char *schema, *p; - int show = FALSE; + gchar *schema, *p; + gint show = FALSE; schema = g_alloca(strlen(uri)+1); strcpy(schema, uri); @@ -349,7 +349,7 @@ impl_Shell_findComponent(PortableServer_Servant servant, static int window_delete_event_cb (GtkWidget *widget, GdkEventAny *ev, - void *data) + gpointer data) { EShell *shell; @@ -360,7 +360,7 @@ window_delete_event_cb (GtkWidget *widget, } static gboolean -notify_no_windows_left_idle_cb (void *data) +notify_no_windows_left_idle_cb (gpointer data) { EShell *shell; EShellPrivate *priv; @@ -381,11 +381,11 @@ notify_no_windows_left_idle_cb (void *data) } static void -window_weak_notify (void *data, +window_weak_notify (gpointer data, GObject *where_the_object_was) { EShell *shell; - int num_windows; + gint num_windows; shell = E_SHELL (data); @@ -551,9 +551,9 @@ e_shell_init (EShell *shell) } static void -detect_version (GConfClient *gconf, int *major, int *minor, int *revision) +detect_version (GConfClient *gconf, gint *major, gint *minor, gint *revision) { - char *val, *evolution_dir; + gchar *val, *evolution_dir; struct stat st; evolution_dir = g_build_filename (g_get_home_dir (), "evolution", NULL); @@ -571,7 +571,7 @@ detect_version (GConfClient *gconf, int *major, int *minor, int *revision) } else { xmlDocPtr config_doc; xmlNodePtr source; - char *tmp; + gchar *tmp; tmp = g_build_filename (evolution_dir, "config.xmldb", NULL); config_doc = e_xml_parse_file (tmp); @@ -600,11 +600,11 @@ detect_version (GConfClient *gconf, int *major, int *minor, int *revision) /* calls components to perform upgrade */ static gboolean -attempt_upgrade (EShell *shell, int major, int minor, int revision) +attempt_upgrade (EShell *shell, gint major, gint minor, gint revision) { GSList *component_infos, *p; gboolean success; - int res; + gint res; success = TRUE; @@ -618,7 +618,7 @@ attempt_upgrade (EShell *shell, int major, int minor, int revision) GNOME_Evolution_Component_upgradeFromVersion (info->iface, major, minor, revision, &ev); if (BONOBO_EX (&ev)) { - char *exception_text; + gchar *exception_text; CORBA_char *id = CORBA_exception_id(&ev); if (strcmp (id, ex_CORBA_NO_IMPLEMENT) == 0) { @@ -660,7 +660,7 @@ attempt_upgrade (EShell *shell, int major, int minor, int revision) **/ EShellConstructResult e_shell_construct (EShell *shell, - const char *iid, + const gchar *iid, EShellStartupLineMode startup_line_mode) { EShellPrivate *priv; @@ -753,12 +753,12 @@ e_shell_new (EShellStartupLineMode startup_line_mode, } static int -remove_dir(const char *root, const char *path) +remove_dir(const gchar *root, const gchar *path) { GDir *dir; - const char *dname; - int res = -1; - char *new = NULL; + const gchar *dname; + gint res = -1; + gchar *new = NULL; struct stat st; dir = g_dir_open(path, 0, NULL); @@ -804,12 +804,12 @@ gboolean e_shell_attempt_upgrade (EShell *shell) { GConfClient *gconf_client; - int major = 0, minor = 0, revision = 0; - int lmajor, lminor, lrevision; - int cmajor, cminor, crevision; - char *version_string, *last_version = NULL; - int done_upgrade = FALSE; - char *oldpath; + gint major = 0, minor = 0, revision = 0; + gint lmajor, lminor, lrevision; + gint cmajor, cminor, crevision; + gchar *version_string, *last_version = NULL; + gint done_upgrade = FALSE; + gchar *oldpath; struct stat st; ESEvent *ese; @@ -834,8 +834,8 @@ e_shell_attempt_upgrade (EShell *shell) size = e_fsutils_usage(oldpath); space = e_fsutils_avail(g_get_home_dir()); if (size != -1 && space != -1 && space < size) { - char *required = g_strdup_printf(_("%ld KB"), size); - char *have = g_strdup_printf(_("%ld KB"), space); + gchar *required = g_strdup_printf(_("%ld KB"), size); + gchar *have = g_strdup_printf(_("%ld KB"), space); e_error_run(NULL, "shell:upgrade-nospace", required, have, NULL); g_free(required); @@ -866,7 +866,7 @@ check_old: if (lmajor == 1 && lminor < 5 && g_stat(oldpath, &st) == 0 && S_ISDIR(st.st_mode)) { - int res; + gint res; last_version = g_strdup_printf("%d.%d.%d", lmajor, lminor, lrevision); res = e_error_run(NULL, "shell:upgrade-remove-1-4", last_version, NULL); @@ -927,7 +927,7 @@ check_old: **/ EShellWindow * e_shell_create_window (EShell *shell, - const char *component_id, + const gchar *component_id, EShellWindow *template_window) { EShellWindow *window; @@ -1111,7 +1111,7 @@ set_line_status_finished(EShell *shell) } static void -set_line_status_complete(EvolutionListener *el, void *data) +set_line_status_complete(EvolutionListener *el, gpointer data) { EShell *shell = data; EShellPrivate *priv = shell->priv; @@ -1224,7 +1224,7 @@ e_shell_send_receive (EShell *shell) void e_shell_show_settings (EShell *shell, - const char *type, + const gchar *type, EShellWindow *shell_window) { EShellPrivate *priv; @@ -1252,7 +1252,7 @@ e_shell_show_settings (EShell *shell, } -const char * +const gchar * e_shell_construct_result_to_string (EShellConstructResult result) { switch (result) { diff --git a/shell/e-shell.h b/shell/e-shell.h index e8451e3b5b..4f26846071 100644 --- a/shell/e-shell.h +++ b/shell/e-shell.h @@ -95,7 +95,7 @@ typedef enum _EShellConstructResult EShellConstructResult; GType e_shell_get_type (void); EShellConstructResult e_shell_construct (EShell *shell, - const char *iid, + const gchar *iid, EShellStartupLineMode startup_line_mode); EShell *e_shell_new (EShellStartupLineMode startup_line_mode, EShellConstructResult *construct_result_return); @@ -103,7 +103,7 @@ EShell *e_shell_new (EShellStartupLineMode startup_line_m gboolean e_shell_attempt_upgrade (EShell *shell); EShellWindow *e_shell_create_window (EShell *shell, - const char *component_id, + const gchar *component_id, EShellWindow *template_window); gboolean e_shell_request_close_window (EShell *shell, EShellWindow *window); @@ -129,14 +129,14 @@ void e_shell_set_crash_recovery (EShell *shell, void e_shell_send_receive (EShell *shell); void e_shell_show_settings (EShell *shell, - const char *type, + const gchar *type, EShellWindow *shell_window); gboolean e_shell_can_quit (EShell *shell); gboolean e_shell_do_quit (EShell *shell); gboolean e_shell_quit (EShell *shell); -const char *e_shell_construct_result_to_string (EShellConstructResult result); +const gchar *e_shell_construct_result_to_string (EShellConstructResult result); typedef gboolean (*EMainShellFunc) (EShell *shell, EShellWindow *window, gpointer user_data); void e_shell_foreach_shell_window (EShell *shell, EMainShellFunc func, gpointer user_data); diff --git a/shell/e-sidebar.c b/shell/e-sidebar.c index d4c02e63ce..3326c5d1dc 100644 --- a/shell/e-sidebar.c +++ b/shell/e-sidebar.c @@ -36,7 +36,7 @@ typedef struct { GtkWidget *icon; GtkWidget *hbox; gchar *default_icon_name; - int id; + gint id; } Button; struct _ESidebarPrivate { @@ -60,7 +60,7 @@ enum { NUM_SIGNALS }; -static unsigned int signals[NUM_SIGNALS] = { 0 }; +static guint signals[NUM_SIGNALS] = { 0 }; G_DEFINE_TYPE (ESidebar, e_sidebar, GTK_TYPE_CONTAINER) @@ -75,7 +75,7 @@ button_new (GtkWidget *button_widget, GtkWidget *label, GtkWidget *icon, GtkWidget *hbox, - int id) + gint id) { Button *button = g_new (Button, 1); const gchar *icon_name; @@ -109,7 +109,7 @@ button_free (Button *button) } static void -update_buttons (ESidebar *sidebar, int new_selected_id) +update_buttons (ESidebar *sidebar, gint new_selected_id) { GSList *p; @@ -134,7 +134,7 @@ static void button_toggled_callback (GtkToggleButton *toggle_button, ESidebar *sidebar) { - int id = 0; + gint id = 0; gboolean is_active = FALSE; GSList *p; @@ -192,7 +192,7 @@ button_query_tooltip (GtkWidget *widget, { /* Show the tooltip only if the label is hidden */ if (INTERNAL_MODE (sidebar) == E_SIDEBAR_MODE_ICON) { - char *tip; + gchar *tip; tip = g_object_get_data (G_OBJECT (widget), "ESidebar:button-tooltip"); @@ -215,14 +215,14 @@ layout_buttons (ESidebar *sidebar) GtkAllocation *allocation = & GTK_WIDGET (sidebar)->allocation; ESidebarMode mode; gboolean icons_only; - int num_btns = g_slist_length (sidebar->priv->buttons), btns_per_row; + gint num_btns = g_slist_length (sidebar->priv->buttons), btns_per_row; GSList **rows, *p; Button *button; - int row_number; - int max_btn_width = 0, max_btn_height = 0; - int row_last; - int x, y; - int i; + gint row_number; + gint max_btn_width = 0, max_btn_height = 0; + gint row_last; + gint x, y; + gint i; y = allocation->y + allocation->height - V_PADDING - 1; @@ -281,7 +281,7 @@ layout_buttons (ESidebar *sidebar) /* Layout the buttons. */ for (i = row_last; i >= 0; i --) { - int len, extra_width; + gint len, extra_width; y -= max_btn_height; x = H_PADDING + allocation->x; @@ -318,7 +318,7 @@ do_layout (ESidebar *sidebar) { GtkAllocation *allocation = & GTK_WIDGET (sidebar)->allocation; GtkAllocation child_allocation; - int y; + gint y; if (sidebar->priv->show) y = layout_buttons (sidebar); @@ -341,7 +341,7 @@ static void impl_forall (GtkContainer *container, gboolean include_internals, GtkCallback callback, - void *callback_data) + gpointer callback_data) { ESidebar *sidebar = E_SIDEBAR (container); GSList *p; @@ -544,10 +544,10 @@ e_sidebar_set_selection_widget (ESidebar *sidebar, GtkWidget *widget) void e_sidebar_add_button (ESidebar *sidebar, - const char *label, - const char *tooltips, - const char *icon_name, - int id) + const gchar *label, + const gchar *tooltips, + const gchar *icon_name, + gint id) { GtkWidget *button_widget; GtkWidget *hbox; @@ -613,7 +613,7 @@ e_sidebar_add_button (ESidebar *sidebar, * You cannot change icon as in a stack, only one default icon will be stored. **/ void -e_sidebar_change_button_icon (ESidebar *sidebar, const gchar *icon_name, int button_id) +e_sidebar_change_button_icon (ESidebar *sidebar, const gchar *icon_name, gint button_id) { GSList *p; @@ -639,7 +639,7 @@ e_sidebar_change_button_icon (ESidebar *sidebar, const gchar *icon_name, int but } void -e_sidebar_select_button (ESidebar *sidebar, int id) +e_sidebar_select_button (ESidebar *sidebar, gint id) { update_buttons (sidebar, id); @@ -712,11 +712,11 @@ set_mode_internal (ESidebar *sidebar, ESidebarMode mode ) } static void -style_changed_notify (GConfClient *gconf, guint id, GConfEntry *entry, void *data) +style_changed_notify (GConfClient *gconf, guint id, GConfEntry *entry, gpointer data) { ESidebar *sidebar = data; - char *val; - int mode; + gchar *val; + gint mode; val = gconf_client_get_string (gconf, "/desktop/gnome/interface/toolbar_style", NULL); if (val == NULL || !gconf_string_to_enum (toolbar_styles, val, &mode)) diff --git a/shell/e-sidebar.h b/shell/e-sidebar.h index 2585592363..9a06e5a377 100644 --- a/shell/e-sidebar.h +++ b/shell/e-sidebar.h @@ -54,8 +54,8 @@ struct _ESidebarClass { GtkContainerClass parent_class; /* signals */ - void (* button_selected) (ESidebar *sidebar, int id); - void (* button_pressed) (ESidebar *sidebar, GdkEventButton *event, int id); + void (* button_selected) (ESidebar *sidebar, gint id); + void (* button_pressed) (ESidebar *sidebar, GdkEventButton *event, gint id); }; @@ -66,17 +66,17 @@ void e_sidebar_set_selection_widget (ESidebar *sidebar, GtkWidget *widget); void e_sidebar_add_button (ESidebar *sidebar, - const char *label, - const char *tooltips, - const char *icon_name, - int id); + const gchar *label, + const gchar *tooltips, + const gchar *icon_name, + gint id); void e_sidebar_select_button (ESidebar *sidebar, - int id); + gint id); void e_sidebar_change_button_icon (ESidebar *sidebar, - const char *icon_name, - int button_id); + const gchar *icon_name, + gint button_id); ESidebarMode e_sidebar_get_mode (ESidebar *sidebar); void e_sidebar_set_mode (ESidebar *sidebar, ESidebarMode mode); diff --git a/shell/e-user-creatable-items-handler.c b/shell/e-user-creatable-items-handler.c index a49d7dbdc4..f5af1575dd 100644 --- a/shell/e-user-creatable-items-handler.c +++ b/shell/e-user-creatable-items-handler.c @@ -45,7 +45,7 @@ #include <gconf/gconf-client.h> struct _Component { - char *id, *alias; + gchar *id, *alias; GNOME_Evolution_Component component; GNOME_Evolution_CreatableItemTypeList *type_list; }; @@ -53,11 +53,11 @@ typedef struct _Component Component; /* Representation of a single menu item. */ struct _MenuItem { - const char *label; - char shortcut; - char *verb; - char *tooltip; - char *component; + const gchar *label; + gchar shortcut; + gchar *verb; + gchar *tooltip; + gchar *component; GdkPixbuf *icon; GdkPixbuf *icon_toolbar; }; @@ -65,11 +65,11 @@ typedef struct _MenuItem MenuItem; struct _EUserCreatableItemsHandlerPrivate { /* This component's alias */ - char *this_component; + gchar *this_component; /* For creating items on the view */ EUserCreatableItemsHandlerCreate create_local; - void *create_data; + gpointer create_data; /* The components that register user creatable items. */ GSList *components; /* Component */ @@ -85,7 +85,7 @@ struct _EUserCreatableItemsHandlerPrivate { const MenuItem *fallback_menu_item; const MenuItem *default_menu_item; - char *menu_xml; + gchar *menu_xml; GtkWidget *new_button, *new_menu; BonoboControl *new_control; GtkAccelGroup *accel_group; @@ -101,8 +101,8 @@ G_DEFINE_TYPE (EUserCreatableItemsHandler, e_user_creatable_items_handler, G_TYP /* Component struct handling. */ static Component * -component_new (const char *id, - const char *component_alias, +component_new (const gchar *id, + const gchar *component_alias, GNOME_Evolution_Component component) { CORBA_Environment ev; @@ -149,7 +149,7 @@ component_free (Component *component) g_free (component); } -static const char *component_query = +static const gchar *component_query = "repo_ids.has ('IDL:GNOME/Evolution/Component:" BASE_VERSION "')"; static void @@ -159,15 +159,15 @@ get_components_from_bonobo (EUserCreatableItemsHandler *handler) Bonobo_ActivationProperty *property; CORBA_Environment ev; const gchar *alias; - char *iid; + gchar *iid; GNOME_Evolution_Component corba_component; Component *component; - int i; + gint i; CORBA_exception_init (&ev); info_list = bonobo_activation_query (component_query, NULL, &ev); if (BONOBO_EX (&ev)) { - char *ex_text = bonobo_exception_get_text (&ev); + gchar *ex_text = bonobo_exception_get_text (&ev); g_warning ("Cannot query for components: %s\n", ex_text); g_free (ex_text); CORBA_exception_free (&ev); @@ -198,7 +198,7 @@ get_components_from_bonobo (EUserCreatableItemsHandler *handler) static gboolean item_is_default (const MenuItem *item, - const char *component) + const gchar *component) { if (component == NULL) return FALSE; @@ -209,8 +209,8 @@ item_is_default (const MenuItem *item, return FALSE; } -static char * -create_verb (EUserCreatableItemsHandler *handler, int component_num, const char *comp, const char *type_id) +static gchar * +create_verb (EUserCreatableItemsHandler *handler, gint component_num, const gchar *comp, const gchar *type_id) { return g_strdup_printf ("EUserCreatableItemsHandler-%s:%d:%s", comp, component_num, type_id); } @@ -224,8 +224,8 @@ ensure_menu_items (EUserCreatableItemsHandler *handler) EUserCreatableItemsHandlerPrivate *priv; GSList *objects, *folders; GSList *p; - int component_num; - const char *default_verb; + gint component_num; + const gchar *default_verb; priv = handler->priv; if (priv->objects != NULL) @@ -236,7 +236,7 @@ ensure_menu_items (EUserCreatableItemsHandler *handler) default_verb = NULL; for (p = priv->components; p != NULL; p = p->next) { const Component *component; - int i; + gint i; component = (const Component *) p->data; if (component->type_list != NULL) { @@ -344,15 +344,15 @@ get_default_action_for_view (EUserCreatableItemsHandler *handler) static void execute_verb (EUserCreatableItemsHandler *handler, - const char *verb_name) + const gchar *verb_name) { EUserCreatableItemsHandlerPrivate *priv; const Component *component; - int component_number; - const char *p; - const char *id; + gint component_number; + const gchar *p; + const gchar *id; GSList *component_list_item; - int i; + gint i; priv = handler->priv; @@ -397,8 +397,8 @@ execute_verb (EUserCreatableItemsHandler *handler, static void verb_fn (BonoboUIComponent *ui_component, - void *data, - const char *verb_name) + gpointer data, + const gchar *verb_name) { EUserCreatableItemsHandler *handler= E_USER_CREATABLE_ITEMS_HANDLER (data); @@ -411,7 +411,7 @@ add_verbs (EUserCreatableItemsHandler *handler, BonoboUIComponent *ui_component) { EUserCreatableItemsHandlerPrivate *priv; - int component_num; + gint component_num; GSList *p; priv = handler->priv; @@ -419,13 +419,13 @@ add_verbs (EUserCreatableItemsHandler *handler, component_num = 0; for (p = priv->components; p != NULL; p = p->next) { const Component *component; - int i; + gint i; component = (const Component *) p->data; if (component->type_list != NULL) { for (i = 0; i < component->type_list->_length; i ++) { - char *verb_name; + gchar *verb_name; verb_name = create_verb (handler, component_num, @@ -446,12 +446,12 @@ add_verbs (EUserCreatableItemsHandler *handler, /* Generic menu construction code */ static int -item_types_sort_func (const void *a, - const void *b) +item_types_sort_func (gconstpointer a, + gconstpointer b) { const MenuItem *item_a; const MenuItem *item_b; - const char *p1, *p2; + const gchar *p1, *p2; item_a = (const MenuItem *) a; item_b = (const MenuItem *) b; @@ -559,8 +559,8 @@ xml_menu_item_func (EUserCreatableItemsHandler *handler, gpointer menu, MenuItem *item, gboolean first) { GString *xml = menu; - char *encoded_label; - char *encoded_tooltip; + gchar *encoded_label; + gchar *encoded_tooltip; encoded_label = bonobo_ui_util_encode_str (item->label); g_string_append_printf (xml, "<menuitem name=\"New:%s\" verb=\"%s\" label=\"%s\"", @@ -572,7 +572,7 @@ xml_menu_item_func (EUserCreatableItemsHandler *handler, gpointer menu, g_string_append_printf (xml, " accel=\"*Control**Shift*%c\"", item->shortcut); if (item->icon != NULL) { - char *icon_xml; + gchar *icon_xml; icon_xml = bonobo_ui_util_pixbuf_to_xml (item->icon); g_string_append_printf (xml, " pixtype=\"pixbuf\" pixname=\"%s\"", icon_xml); @@ -589,7 +589,7 @@ xml_menu_item_func (EUserCreatableItemsHandler *handler, gpointer menu, } static void -xml_separator_func (EUserCreatableItemsHandler *handler, gpointer menu, int nth) +xml_separator_func (EUserCreatableItemsHandler *handler, gpointer menu, gint nth) { GString *xml = menu; @@ -616,7 +616,7 @@ static void menuitem_activate (GtkMenuItem *item, gpointer data) { EUserCreatableItemsHandler *handler = data; - const char *verb; + const gchar *verb; verb = g_object_get_data (G_OBJECT (item), "EUserCreatableItemsHandler:verb"); execute_verb (handler, verb); @@ -665,7 +665,7 @@ gtk_menu_item_func (EUserCreatableItemsHandler *handler, gpointer menu, } static void -gtk_separator_func (EUserCreatableItemsHandler *handler, gpointer menu, int nth) +gtk_separator_func (EUserCreatableItemsHandler *handler, gpointer menu, gint nth) { gtk_menu_shell_append (menu, gtk_separator_menu_item_new ()); } @@ -696,12 +696,12 @@ set_combo_button_style (EComboButton *button, const gchar *style, GdkPixbuf *ico static void new_button_change (GConfClient *gconf, - unsigned int connection_id, + guint connection_id, GConfEntry *entry, EUserCreatableItemsHandler *handler) { EUserCreatableItemsHandlerPrivate *priv; - char *val; + gchar *val; priv = handler->priv; val = gconf_client_get_string (gconf, "/desktop/gnome/interface/toolbar_style", NULL); @@ -718,7 +718,7 @@ setup_toolbar_button (EUserCreatableItemsHandler *handler) { EUserCreatableItemsHandlerPrivate *priv; GConfClient *gconf = gconf_client_get_default (); - char *val; + gchar *val; priv = handler->priv; val = gconf_client_get_string (gconf, "/desktop/gnome/interface/toolbar_style", NULL); @@ -866,8 +866,8 @@ e_user_creatable_items_handler_init (EUserCreatableItemsHandler *handler) EUserCreatableItemsHandler * -e_user_creatable_items_handler_new (const char *component_alias, - EUserCreatableItemsHandlerCreate create_local, void *data) +e_user_creatable_items_handler_new (const gchar *component_alias, + EUserCreatableItemsHandlerCreate create_local, gpointer data) { EUserCreatableItemsHandler *handler; diff --git a/shell/e-user-creatable-items-handler.h b/shell/e-user-creatable-items-handler.h index b9be272af1..5350691eae 100644 --- a/shell/e-user-creatable-items-handler.h +++ b/shell/e-user-creatable-items-handler.h @@ -43,7 +43,7 @@ typedef struct _EUserCreatableItemsHandler EUserCreatableItemsHandler; typedef struct _EUserCreatableItemsHandlerPrivate EUserCreatableItemsHandlerPrivate; typedef struct _EUserCreatableItemsHandlerClass EUserCreatableItemsHandlerClass; -typedef void (*EUserCreatableItemsHandlerCreate)(EUserCreatableItemsHandler *handler, const char *item_type_name, void *data); +typedef void (*EUserCreatableItemsHandlerCreate)(EUserCreatableItemsHandler *handler, const gchar *item_type_name, gpointer data); struct _EUserCreatableItemsHandler { GObject parent; @@ -57,8 +57,8 @@ struct _EUserCreatableItemsHandlerClass { GType e_user_creatable_items_handler_get_type (void); -EUserCreatableItemsHandler *e_user_creatable_items_handler_new (const char *component_alias, - EUserCreatableItemsHandlerCreate create_local, void *data); +EUserCreatableItemsHandler *e_user_creatable_items_handler_new (const gchar *component_alias, + EUserCreatableItemsHandlerCreate create_local, gpointer data); void e_user_creatable_items_handler_activate (EUserCreatableItemsHandler *handler, BonoboUIComponent *ui_component); diff --git a/shell/es-event.c b/shell/es-event.c index 43a55c3fd5..5740d585c7 100644 --- a/shell/es-event.c +++ b/shell/es-event.c @@ -113,7 +113,7 @@ ESEvent *es_event_peek(void) } ESEventTargetState * -es_event_target_new_state(ESEvent *eme, int state) +es_event_target_new_state(ESEvent *eme, gint state) { ESEventTargetState *t = e_event_target_new(&eme->event, ES_EVENT_TARGET_STATE, sizeof(*t)); guint32 mask = ~0; @@ -141,7 +141,7 @@ es_event_target_new_shell(ESEvent *eme, EShell *shell) } ESEventTargetUpgrade * -es_event_target_new_upgrade(ESEvent *eme, int major, int minor, int revision) +es_event_target_new_upgrade(ESEvent *eme, gint major, gint minor, gint revision) { ESEventTargetUpgrade *t = e_event_target_new(&eme->event, ES_EVENT_TARGET_UPGRADE, sizeof(*t)); @@ -153,7 +153,7 @@ es_event_target_new_upgrade(ESEvent *eme, int major, int minor, int revision) } ESEventTargetComponent * -es_event_target_new_component (ESEvent *eme, const char *id) +es_event_target_new_component (ESEvent *eme, const gchar *id) { ESEventTargetComponent *t = e_event_target_new (&eme->event, ES_EVENT_TARGET_COMPONENT, sizeof (*t)); @@ -164,7 +164,7 @@ es_event_target_new_component (ESEvent *eme, const char *id) /* ********************************************************************** */ -static void *emeh_parent_class; +static gpointer emeh_parent_class; #define emeh ((ESEventHook *)eph) static const EEventHookTargetMask emeh_state_masks[] = { @@ -192,7 +192,7 @@ emeh_finalise(GObject *o) static void emeh_class_init(EPluginHookClass *klass) { - int i; + gint i; /** @HookClass: Shell Main Menu * @Id: org.gnome.evolution.shell.events:1.0 diff --git a/shell/es-event.h b/shell/es-event.h index 5ac363b8c8..0fa2ae0484 100644 --- a/shell/es-event.h +++ b/shell/es-event.h @@ -66,21 +66,21 @@ struct _ESEventTargetShell { struct _ESEventTargetState { EEventTarget target; - int state; + gint state; }; struct _ESEventTargetUpgrade { EEventTarget target; - int major; - int minor; - int revision; + gint major; + gint minor; + gint revision; }; struct _ESEventTargetComponent { EEventTarget target; - const char *id; + const gchar *id; }; typedef struct _EEventItem ESEventItem; @@ -100,10 +100,10 @@ GType es_event_get_type(void); ESEvent *es_event_peek(void); -ESEventTargetState *es_event_target_new_state(ESEvent *emp, int state); +ESEventTargetState *es_event_target_new_state(ESEvent *emp, gint state); ESEventTargetShell *es_event_target_new_shell(ESEvent *eme, struct _EShell *shell); -ESEventTargetUpgrade *es_event_target_new_upgrade(ESEvent *emp, int major, int minor, int revision); -ESEventTargetComponent *es_event_target_new_component(ESEvent *eme, const char *id); +ESEventTargetUpgrade *es_event_target_new_upgrade(ESEvent *emp, gint major, gint minor, gint revision); +ESEventTargetComponent *es_event_target_new_component(ESEvent *eme, const gchar *id); /* ********************************************************************** */ diff --git a/shell/es-menu.c b/shell/es-menu.c index 3b459268a3..93fa3b339d 100644 --- a/shell/es-menu.c +++ b/shell/es-menu.c @@ -87,7 +87,7 @@ es_menu_get_type(void) return type; } -ESMenu *es_menu_new(const char *menuid) +ESMenu *es_menu_new(const gchar *menuid) { ESMenu *esm = g_object_new(es_menu_get_type(), NULL); @@ -120,7 +120,7 @@ es_menu_target_new_shell(ESMenu *esm, guint32 flags) /* ********************************************************************** */ -static void *esph_parent_class; +static gpointer esph_parent_class; #define esph ((ESMenuHook *)eph) static const EMenuHookTargetMask esph_shell_masks[] = { @@ -145,7 +145,7 @@ esph_finalise(GObject *o) static void esph_class_init(EPluginHookClass *klass) { - int i; + gint i; /** @HookClass: Shell Main Menu * @Id: org.gnome.evolution.shell.bonobomenu:1.0 diff --git a/shell/es-menu.h b/shell/es-menu.h index 9e9e0613b0..298de64e6e 100644 --- a/shell/es-menu.h +++ b/shell/es-menu.h @@ -71,7 +71,7 @@ struct _ESMenuClass { GType es_menu_get_type(void); -ESMenu *es_menu_new(const char *menuid); +ESMenu *es_menu_new(const gchar *menuid); ESMenuTargetShell *es_menu_target_new_shell(ESMenu *emp, guint32 flags); diff --git a/shell/evolution-listener.c b/shell/evolution-listener.c index 4bf9a76376..3209450134 100644 --- a/shell/evolution-listener.c +++ b/shell/evolution-listener.c @@ -59,7 +59,7 @@ evolution_listener_init(EvolutionListener *emf, EvolutionListenerClass *klass) BONOBO_TYPE_FUNC_FULL (EvolutionListener, GNOME_Evolution_Listener, PARENT_TYPE, evolution_listener) EvolutionListener * -evolution_listener_new(EvolutionListenerFunc complete, void *data) +evolution_listener_new(EvolutionListenerFunc complete, gpointer data) { EvolutionListener *el; diff --git a/shell/evolution-listener.h b/shell/evolution-listener.h index 7b79b3bab8..9637342099 100644 --- a/shell/evolution-listener.h +++ b/shell/evolution-listener.h @@ -32,14 +32,14 @@ typedef struct _EvolutionListener EvolutionListener; typedef struct _EvolutionListenerClass EvolutionListenerClass; -typedef void (*EvolutionListenerFunc)(EvolutionListener *, void *); +typedef void (*EvolutionListenerFunc)(EvolutionListener *, gpointer ); struct _EvolutionListener { BonoboObject parent; /* we dont need signals, so why bother wasting resources on it */ EvolutionListenerFunc complete; - void *data; + gpointer data; }; struct _EvolutionListenerClass { @@ -49,6 +49,6 @@ struct _EvolutionListenerClass { }; GType evolution_listener_get_type(void); -EvolutionListener *evolution_listener_new(EvolutionListenerFunc complete, void *data); +EvolutionListener *evolution_listener_new(EvolutionListenerFunc complete, gpointer data); #endif /* _EVOLUTION_LISTENER_H_ */ diff --git a/shell/evolution-shell-component-utils.c b/shell/evolution-shell-component-utils.c index a8ce855268..bcbe610e4e 100644 --- a/shell/evolution-shell-component-utils.c +++ b/shell/evolution-shell-component-utils.c @@ -39,8 +39,8 @@ static GSList *inited_arrays = NULL; void e_pixmaps_update (BonoboUIComponent *uic, EPixmap *pixcache) { - static int done_init = 0; - int i; + static gint done_init = 0; + gint i; if (!done_init) { g_atexit (free_pixmaps); @@ -72,7 +72,7 @@ void e_pixmaps_update (BonoboUIComponent *uic, EPixmap *pixcache) static void free_pixmaps (void) { - int i; + gint i; GSList *li; for (li = inited_arrays; li != NULL; li = li->next) { @@ -93,7 +93,7 @@ free_pixmaps (void) * * Return value: A newly allocated string with the printable error message. **/ -char * +gchar * e_get_activation_failure_msg (CORBA_Environment *ev) { g_return_val_if_fail (ev != NULL, NULL); diff --git a/shell/evolution-shell-component-utils.h b/shell/evolution-shell-component-utils.h index ce4fa11229..477643e93d 100644 --- a/shell/evolution-shell-component-utils.h +++ b/shell/evolution-shell-component-utils.h @@ -31,10 +31,10 @@ extern "C" { #endif /* __cplusplus */ typedef struct _EPixmap { - const char *path; - const char *name; + const gchar *path; + const gchar *name; GtkIconSize size; - char *pixbuf; + gchar *pixbuf; } EPixmap; #define E_PIXMAP(path,name,size) { (path), (name), (size), NULL } @@ -43,7 +43,7 @@ typedef struct _EPixmap { /* Takes an array of pixmaps, terminated by E_PIXMAP_END, and loads into uic */ void e_pixmaps_update (BonoboUIComponent *uic, EPixmap *pixcache); -char *e_get_activation_failure_msg (CORBA_Environment *ev); +gchar *e_get_activation_failure_msg (CORBA_Environment *ev); #ifdef __cplusplus } diff --git a/shell/importer/evolution-importer-client.c b/shell/importer/evolution-importer-client.c index 06d30d5733..66a82836e3 100644 --- a/shell/importer/evolution-importer-client.c +++ b/shell/importer/evolution-importer-client.c @@ -92,7 +92,7 @@ evolution_importer_client_new (const CORBA_Object objref) * Returns: A newly created EvolutionImporterClient. */ EvolutionImporterClient * -evolution_importer_client_new_from_id (const char *id) +evolution_importer_client_new_from_id (const gchar *id) { CORBA_Environment ev; CORBA_Object objref; @@ -100,7 +100,7 @@ evolution_importer_client_new_from_id (const char *id) g_return_val_if_fail (id != NULL, NULL); CORBA_exception_init (&ev); - objref = bonobo_activation_activate_from_id ((char *) id, 0, NULL, &ev); + objref = bonobo_activation_activate_from_id ((gchar *) id, 0, NULL, &ev); if (ev._major != CORBA_NO_EXCEPTION) { CORBA_exception_free (&ev); g_warning ("Could not start %s.", id); @@ -154,7 +154,7 @@ evolution_importer_client_create_control (EvolutionImporterClient *client) */ gboolean evolution_importer_client_support_format (EvolutionImporterClient *client, - const char *filename) + const gchar *filename) { GNOME_Evolution_Importer corba_importer; gboolean result; @@ -185,7 +185,7 @@ evolution_importer_client_support_format (EvolutionImporterClient *client, * Returns: TRUE on sucess, FALSE on failure. */ gboolean -evolution_importer_client_load_file (EvolutionImporterClient *client, const char *filename) +evolution_importer_client_load_file (EvolutionImporterClient *client, const gchar *filename) { GNOME_Evolution_Importer corba_importer; gboolean result; @@ -248,7 +248,7 @@ evolution_importer_client_process_item (EvolutionImporterClient *client, * Returns: The error as a string. If there is no error NULL is returned. * Importers need not support this method and if so, NULL is also returned. */ -const char * +const gchar * evolution_importer_client_get_error (EvolutionImporterClient *client) { GNOME_Evolution_Importer corba_importer; diff --git a/shell/importer/evolution-importer-client.h b/shell/importer/evolution-importer-client.h index 3ae4b2f7b0..2a71e58a45 100644 --- a/shell/importer/evolution-importer-client.h +++ b/shell/importer/evolution-importer-client.h @@ -56,16 +56,16 @@ struct _EvolutionImporterClientClass { GType evolution_importer_client_get_type (void); EvolutionImporterClient *evolution_importer_client_new (const CORBA_Object objref); -EvolutionImporterClient *evolution_importer_client_new_from_id (const char *id); +EvolutionImporterClient *evolution_importer_client_new_from_id (const gchar *id); GtkWidget *evolution_importer_client_create_control (EvolutionImporterClient *client); gboolean evolution_importer_client_support_format (EvolutionImporterClient *client, - const char *filename); + const gchar *filename); gboolean evolution_importer_client_load_file (EvolutionImporterClient *client, - const char *filename); + const gchar *filename); void evolution_importer_client_process_item (EvolutionImporterClient *client, EvolutionImporterListener *listener); -const char *evolution_importer_client_get_error (EvolutionImporterClient *client); +const gchar *evolution_importer_client_get_error (EvolutionImporterClient *client); #ifdef __cplusplus } diff --git a/shell/importer/evolution-importer-listener.c b/shell/importer/evolution-importer-listener.c index 8915202d30..ffac2d3ab4 100644 --- a/shell/importer/evolution-importer-listener.c +++ b/shell/importer/evolution-importer-listener.c @@ -37,7 +37,7 @@ static BonoboObjectClass *parent_class = NULL; struct _EvolutionImporterListenerPrivate { EvolutionImporterListenerCallback callback; - void *closure; + gpointer closure; }; #if 0 @@ -185,7 +185,7 @@ evolution_importer_listener_init (EvolutionImporterListener *listener) static void evolution_importer_listener_construct (EvolutionImporterListener *listener, EvolutionImporterListenerCallback callback, - void *closure) + gpointer closure) { EvolutionImporterListenerPrivate *priv; @@ -209,7 +209,7 @@ evolution_importer_listener_construct (EvolutionImporterListener *listener, */ EvolutionImporterListener * evolution_importer_listener_new (EvolutionImporterListenerCallback callback, - void *closure) + gpointer closure) { EvolutionImporterListener *listener; diff --git a/shell/importer/evolution-importer-listener.h b/shell/importer/evolution-importer-listener.h index 63f480e4dd..e4df945271 100644 --- a/shell/importer/evolution-importer-listener.h +++ b/shell/importer/evolution-importer-listener.h @@ -46,7 +46,7 @@ typedef struct _EvolutionImporterListenerClass EvolutionImporterListenerClass; typedef void (* EvolutionImporterListenerCallback) (EvolutionImporterListener *listener, EvolutionImporterResult result, gboolean more_items, - void *closure); + gpointer closure); struct _EvolutionImporterListener { BonoboObject parent; @@ -62,7 +62,7 @@ struct _EvolutionImporterListenerClass { GType evolution_importer_listener_get_type (void); EvolutionImporterListener *evolution_importer_listener_new (EvolutionImporterListenerCallback callback, - void *closure); + gpointer closure); #ifdef __cplusplus } diff --git a/shell/importer/evolution-importer.c b/shell/importer/evolution-importer.c index f8e6847891..26b06e7c20 100644 --- a/shell/importer/evolution-importer.c +++ b/shell/importer/evolution-importer.c @@ -41,7 +41,7 @@ struct _EvolutionImporterPrivate { EvolutionImporterProcessItemFn process_item_fn; EvolutionImporterGetErrorFn get_error_fn; - void *closure; + gpointer closure; }; @@ -194,7 +194,7 @@ evolution_importer_construct (EvolutionImporter *importer, EvolutionImporterLoadFileFn load_file_fn, EvolutionImporterProcessItemFn process_item_fn, EvolutionImporterGetErrorFn get_error_fn, - void *closure) + gpointer closure) { EvolutionImporterPrivate *priv; @@ -233,7 +233,7 @@ evolution_importer_new (EvolutionImporterCreateControlFn create_control_fn, EvolutionImporterLoadFileFn load_file_fn, EvolutionImporterProcessItemFn process_item_fn, EvolutionImporterGetErrorFn get_error_fn, - void *closure) + gpointer closure) { EvolutionImporter *importer; diff --git a/shell/importer/evolution-importer.h b/shell/importer/evolution-importer.h index 4925fad4fc..b4bf54928f 100644 --- a/shell/importer/evolution-importer.h +++ b/shell/importer/evolution-importer.h @@ -44,20 +44,20 @@ typedef struct _EvolutionImporterClass EvolutionImporterClass; typedef void (* EvolutionImporterCreateControlFn) (EvolutionImporter *importer, Bonobo_Control *control, - void *closure); + gpointer closure); typedef gboolean (* EvolutionImporterSupportFormatFn) (EvolutionImporter *importer, - const char *filename, - void *closure); + const gchar *filename, + gpointer closure); typedef gboolean (* EvolutionImporterLoadFileFn) (EvolutionImporter *importer, - const char *filename, - void *closure); + const gchar *filename, + gpointer closure); typedef void (* EvolutionImporterProcessItemFn) (EvolutionImporter *importer, CORBA_Object listener, - void *closure, + gpointer closure, CORBA_Environment *ev); -typedef char *(* EvolutionImporterGetErrorFn) (EvolutionImporter *importer, - void *closure); +typedef gchar *(* EvolutionImporterGetErrorFn) (EvolutionImporter *importer, + gpointer closure); typedef enum { EVOLUTION_IMPORTER_OK, diff --git a/shell/importer/evolution-intelligent-importer.c b/shell/importer/evolution-intelligent-importer.c index d867c120b8..48c767cfde 100644 --- a/shell/importer/evolution-intelligent-importer.c +++ b/shell/importer/evolution-intelligent-importer.c @@ -37,9 +37,9 @@ struct _EvolutionIntelligentImporterPrivate { EvolutionIntelligentImporterCanImportFn can_import_fn; EvolutionIntelligentImporterImportDataFn import_data_fn; - char *importername; - char *message; - void *closure; + gchar *importername; + gchar *message; + gpointer closure; }; @@ -148,9 +148,9 @@ static void evolution_intelligent_importer_construct (EvolutionIntelligentImporter *ii, EvolutionIntelligentImporterCanImportFn can_import_fn, EvolutionIntelligentImporterImportDataFn import_data_fn, - const char *importername, - const char *message, - void *closure) + const gchar *importername, + const gchar *message, + gpointer closure) { g_return_if_fail (ii != NULL); ii->priv->importername = g_strdup (importername); @@ -178,9 +178,9 @@ evolution_intelligent_importer_construct (EvolutionIntelligentImporter *ii, EvolutionIntelligentImporter * evolution_intelligent_importer_new (EvolutionIntelligentImporterCanImportFn can_import_fn, EvolutionIntelligentImporterImportDataFn import_data_fn, - const char *importername, - const char *message, - void *closure) + const gchar *importername, + const gchar *message, + gpointer closure) { EvolutionIntelligentImporter *ii; diff --git a/shell/importer/evolution-intelligent-importer.h b/shell/importer/evolution-intelligent-importer.h index 2d36d498e9..99d5d2b26d 100644 --- a/shell/importer/evolution-intelligent-importer.h +++ b/shell/importer/evolution-intelligent-importer.h @@ -43,9 +43,9 @@ typedef struct _EvolutionIntelligentImporterPrivate EvolutionIntelligentImporter typedef struct _EvolutionIntelligentImporterClass EvolutionIntelligentImporterClass; typedef gboolean (* EvolutionIntelligentImporterCanImportFn) (EvolutionIntelligentImporter *ii, - void *closure); + gpointer closure); typedef void (* EvolutionIntelligentImporterImportDataFn) (EvolutionIntelligentImporter *ii, - void *closure); + gpointer closure); struct _EvolutionIntelligentImporter { BonoboObject parent; @@ -63,9 +63,9 @@ GType evolution_intelligent_importer_get_type (void); EvolutionIntelligentImporter *evolution_intelligent_importer_new (EvolutionIntelligentImporterCanImportFn can_import_fn, EvolutionIntelligentImporterImportDataFn import_data_fn, - const char *importername, - const char *message, - void *closure); + const gchar *importername, + const gchar *message, + gpointer closure); #ifdef __cplusplus } diff --git a/shell/importer/intelligent.c b/shell/importer/intelligent.c index 20927d2742..8b7ebaa743 100644 --- a/shell/importer/intelligent.c +++ b/shell/importer/intelligent.c @@ -48,9 +48,9 @@ typedef struct { Bonobo_Control control; GtkWidget *widget; - char *name; - char *blurb; - char *iid; + gchar *name; + gchar *blurb; + gchar *iid; } IntelligentImporterData; typedef struct { @@ -61,12 +61,12 @@ typedef struct { GList *importers; - int running; + gint running; } IntelligentImporterDialog; typedef struct { CORBA_Object importer; - char *iid; + gchar *iid; } SelectedImporterData; static void @@ -119,7 +119,7 @@ get_intelligent_importers (void) Bonobo_ServerInfoList *info_list; GList *iids_ret = NULL; CORBA_Environment ev; - int i; + gint i; CORBA_exception_init (&ev); info_list = bonobo_activation_query ("repo_ids.has ('IDL:GNOME/Evolution/IntelligentImporter:" BASE_VERSION "')", NULL, &ev); @@ -137,8 +137,8 @@ get_intelligent_importers (void) static void select_row_cb (GtkCList *clist, - int row, - int column, + gint row, + gint column, GdkEvent *ev, IntelligentImporterDialog *d) { @@ -147,8 +147,8 @@ select_row_cb (GtkCList *clist, static void unselect_row_cb (GtkCList *clist, - int row, - int column, + gint row, + gint column, GdkEvent *ev, IntelligentImporterDialog *d) { @@ -162,7 +162,7 @@ create_gui (GList *importers) GtkWidget *hbox, *vbox, *dummy; IntelligentImporterDialog *d; GList *l; - int running = 0; + gint running = 0; d = g_new (IntelligentImporterDialog, 1); d->dialog = dialog = gtk_dialog_new(); @@ -220,7 +220,7 @@ create_gui (GList *importers) IntelligentImporterData *data; CORBA_Environment ev; gboolean dontaskagain, can_run; - char *text[1], *prefix; + gchar *text[1], *prefix; /* Check if we want to show this one again */ prefix = g_strdup_printf ("=%s/evolution/config/Shell=/intelligent-importers/", g_get_home_dir ()); @@ -237,7 +237,7 @@ create_gui (GList *importers) data->iid = g_strdup (l->data); CORBA_exception_init (&ev); - data->object = bonobo_activation_activate_from_id ((char *) data->iid, 0, + data->object = bonobo_activation_activate_from_id ((gchar *) data->iid, 0, NULL, &ev); if (ev._major != CORBA_NO_EXCEPTION) { g_warning ("Could not start %s: %s", data->iid, @@ -359,9 +359,9 @@ intelligent_importer_init (void) { GList *importers, *l, *selected = NULL; IntelligentImporterDialog *d; - char *prefix; + gchar *prefix; gboolean dontaskagain; - int resp; + gint resp; prefix = g_strdup_printf ("=%s/evolution/config/Shell=/intelligent-importers/", g_get_home_dir()); gnome_config_push_prefix (prefix); @@ -395,7 +395,7 @@ intelligent_importer_init (void) IntelligentImporterData *data; SelectedImporterData *new_data; CORBA_Environment ev; - char *iid; + gchar *iid; data = g_list_nth_data (d->importers, GPOINTER_TO_INT (l->data)); iid = g_strdup (data->iid); diff --git a/shell/main.c b/shell/main.c index c6959d7663..4032c5544e 100644 --- a/shell/main.c +++ b/shell/main.c @@ -106,8 +106,8 @@ static gboolean disable_eplugin = FALSE; static gboolean disable_preview = FALSE; static gboolean idle_cb (gchar **uris); -static char *default_component_id = NULL; -static char *evolution_debug_log = NULL; +static gchar *default_component_id = NULL; +static gchar *evolution_debug_log = NULL; static gchar **remaining_args; static void @@ -118,7 +118,7 @@ no_windows_left_cb (EShell *shell, gpointer data) } static void -shell_weak_notify (void *data, +shell_weak_notify (gpointer data, GObject *where_the_object_was) { bonobo_main_quit (); @@ -199,7 +199,7 @@ show_development_warning(void) GtkWidget *checkbox; GtkWidget *alignment; gboolean skip; - char *text; + gchar *text; warning_dialog = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (warning_dialog), "Evolution " VERSION); @@ -422,7 +422,7 @@ static GStaticMutex segv_mutex = G_STATIC_MUTEX_INIT; static pthread_t main_thread; static void -segv_redirect (int sig) +segv_redirect (gint sig) { if (pthread_self () == main_thread) gnome_segv_handler (sig); @@ -562,8 +562,8 @@ set_paths (void) } #endif -int -main (int argc, char **argv) +gint +main (gint argc, gchar **argv) { #ifdef G_OS_WIN32 extern void link_shutdown (void); @@ -576,7 +576,7 @@ main (int argc, char **argv) GnomeProgram *program; GnomeClient *master_client; GOptionContext *context; - char *filename; + gchar *filename; /* Make ElectricFence work. */ free (malloc (10)); @@ -645,7 +645,7 @@ main (int argc, char **argv) setup_segv_redirect (); if (evolution_debug_log) { - int fd; + gint fd; fd = g_open (evolution_debug_log, O_WRONLY | O_CREAT | O_TRUNC, 0600); if (fd != -1) { diff --git a/shell/test/evolution-test-component.c b/shell/test/evolution-test-component.c index 9fdeab7a3f..25df4d547a 100644 --- a/shell/test/evolution-test-component.c +++ b/shell/test/evolution-test-component.c @@ -103,7 +103,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant, list->_buffer[0].id = CREATE_TEST_ID; list->_buffer[0].description = _("New Test"); - list->_buffer[0].menuDescription = (char *) C_("New", "_Test"); + list->_buffer[0].menuDescription = (gchar *) C_("New", "_Test"); list->_buffer[0].tooltip = _("Create a new test item"); list->_buffer[0].menuShortcut = 'i'; list->_buffer[0].iconName = ""; @@ -161,8 +161,8 @@ BONOBO_TYPE_FUNC_FULL (EvolutionTestComponent, GNOME_Evolution_Component, PARENT static BonoboObject * factory (BonoboGenericFactory *factory, - const char *component_id, - void *closure) + const gchar *component_id, + gpointer closure) { if (strcmp (component_id, TEST_COMPONENT_ID) == 0) { BonoboObject *object = BONOBO_OBJECT (g_object_new (EVOLUTION_TEST_TYPE_COMPONENT, NULL)); |