aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/eab-gui-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui/widgets/eab-gui-util.c')
-rw-r--r--addressbook/gui/widgets/eab-gui-util.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c
index d5ec322c3d..e8269100b7 100644
--- a/addressbook/gui/widgets/eab-gui-util.c
+++ b/addressbook/gui/widgets/eab-gui-util.c
@@ -48,7 +48,7 @@
/* the NULL's in this table correspond to the status codes
that should *never* be generated by a backend */
-static const char *status_to_string[] = {
+static const gchar *status_to_string[] = {
/* E_BOOK_ERROR_OK */ N_("Success"),
/* E_BOOK_ERROR_INVALID_ARG */ NULL,
/* E_BOOK_ERROR_BUSY */ N_("Backend busy"),
@@ -75,9 +75,9 @@ static const char *status_to_string[] = {
};
void
-eab_error_dialog (const char *msg, EBookStatus status)
+eab_error_dialog (const gchar *msg, EBookStatus status)
{
- const char *status_str;
+ const gchar *status_str;
if (status >= G_N_ELEMENTS (status_to_string))
status_str = "Other error";
@@ -91,7 +91,7 @@ eab_error_dialog (const char *msg, EBookStatus status)
void
eab_load_error_dialog (GtkWidget *parent, ESource *source, EBookStatus status)
{
- char *label_string, *label = NULL, *uri;
+ gchar *label_string, *label = NULL, *uri;
GtkWidget *dialog;
gboolean can_detail_error = TRUE;
@@ -108,7 +108,7 @@ eab_load_error_dialog (GtkWidget *parent, ESource *source, EBookStatus status)
}
else if (!strncmp (uri, "file:", 5)) {
- char *path = g_filename_from_uri (uri, NULL, NULL);
+ gchar *path = g_filename_from_uri (uri, NULL, NULL);
label = g_strdup_printf (
_("This address book cannot be opened. Please check that the "
"path %s exists and that permissions are set to access it."), path);
@@ -156,7 +156,7 @@ void
eab_search_result_dialog (GtkWidget *parent,
EBookViewStatus status)
{
- char *str = NULL;
+ gchar *str = NULL;
switch (status) {
case E_BOOK_VIEW_STATUS_OK:
@@ -196,11 +196,11 @@ eab_prompt_save_dialog (GtkWindow *parent)
}
static gint
-file_exists(GtkWindow *window, const char *filename)
+file_exists(GtkWindow *window, const gchar *filename)
{
GtkWidget *dialog;
gint response;
- char * utf8_filename;
+ gchar * utf8_filename;
utf8_filename = g_filename_to_utf8 (filename, -1, NULL, NULL, NULL);
dialog = gtk_message_dialog_new (window,
@@ -222,15 +222,15 @@ file_exists(GtkWindow *window, const char *filename)
typedef struct {
GtkWidget *filesel;
- char *vcard;
+ gchar *vcard;
gboolean has_multiple_contacts;
} SaveAsInfo;
static void
save_it(GtkWidget *widget, SaveAsInfo *info)
{
- const char *filename;
- char *uri;
+ const gchar *filename;
+ gchar *uri;
gint response = 0;
@@ -248,7 +248,7 @@ save_it(GtkWidget *widget, SaveAsInfo *info)
}
if (!e_write_file_uri (uri, info->vcard)) {
- char *err_str_ext;
+ gchar *err_str_ext;
if (info->has_multiple_contacts) {
/* more than one, finding the total number of contacts might
* hit performance while saving large number of contacts
@@ -279,7 +279,7 @@ close_it(GtkWidget *widget, SaveAsInfo *info)
}
static void
-destroy_it(void *data, GObject *where_the_object_was)
+destroy_it(gpointer data, GObject *where_the_object_was)
{
SaveAsInfo *info = data;
g_free (info->vcard);
@@ -295,10 +295,10 @@ filechooser_response (GtkWidget *widget, gint response_id, SaveAsInfo *info)
close_it (widget, info);
}
-static char *
-make_safe_filename (char *name)
+static gchar *
+make_safe_filename (gchar *name)
{
- char *safe;
+ gchar *safe;
if (!name) {
/* This is a filename. Translators take note. */
@@ -381,11 +381,11 @@ eab_select_source (const gchar *title, const gchar *message, const gchar *select
}
void
-eab_contact_save (char *title, EContact *contact, GtkWindow *parent_window)
+eab_contact_save (gchar *title, EContact *contact, GtkWindow *parent_window)
{
GtkWidget *filesel;
- char *file;
- char *name;
+ gchar *file;
+ gchar *name;
SaveAsInfo *info = g_new(SaveAsInfo, 1);
name = e_contact_get (contact, E_CONTACT_FILE_AS);
@@ -423,11 +423,11 @@ eab_contact_save (char *title, EContact *contact, GtkWindow *parent_window)
}
void
-eab_contact_list_save (char *title, GList *list, GtkWindow *parent_window)
+eab_contact_list_save (gchar *title, GList *list, GtkWindow *parent_window)
{
GtkWidget *filesel;
SaveAsInfo *info = g_new(SaveAsInfo, 1);
- char *file;
+ gchar *file;
filesel = gtk_file_chooser_dialog_new (title,
parent_window,
@@ -446,7 +446,7 @@ eab_contact_list_save (char *title, GList *list, GtkWindow *parent_window)
/* This is a filename. Translators take note. */
if (list && list->data && list->next == NULL) {
- char *name;
+ gchar *name;
name = e_contact_get (E_CONTACT (list->data), E_CONTACT_FILE_AS);
if (!name)
name = e_contact_get (E_CONTACT (list->data), E_CONTACT_FULL_NAME);
@@ -481,7 +481,7 @@ typedef struct ContactCopyProcess_ ContactCopyProcess;
typedef void (*ContactCopyDone) (ContactCopyProcess *process);
struct ContactCopyProcess_ {
- int count;
+ gint count;
gboolean book_status;
GList *contacts;
EBook *source;
@@ -494,7 +494,7 @@ do_delete (gpointer data, gpointer user_data)
{
EBook *book = user_data;
EContact *contact = data;
- const char *id;
+ const gchar *id;
id = e_contact_get_const (contact, E_CONTACT_UID);
e_book_remove_contact(book, id, NULL);
@@ -528,7 +528,7 @@ process_unref (ContactCopyProcess *process)
}
static void
-contact_added_cb (EBook* book, EBookStatus status, const char *id, gpointer user_data)
+contact_added_cb (EBook* book, EBookStatus status, const gchar *id, gpointer user_data)
{
ContactCopyProcess *process = user_data;
@@ -583,9 +583,9 @@ eab_transfer_contacts (EBook *source, GList *contacts /* adopted */, gboolean de
{
EBook *dest;
ESource *destination_source;
- static char *last_uid = NULL;
+ static gchar *last_uid = NULL;
ContactCopyProcess *process;
- char *desc;
+ gchar *desc;
if (contacts == NULL)
return;
@@ -638,7 +638,7 @@ eab_create_image_chooser_widget(gchar *name,
gchar *string1, gchar *string2,
gint int1, gint int2)
{
- char *filename;
+ gchar *filename;
GtkWidget *w = NULL;
w = e_image_chooser_new ();
@@ -686,12 +686,12 @@ eab_parse_qp_email (const gchar *string, gchar **name, gchar **email)
then makes one string and returns it, otherwise returns NULL.
Returned string is usable to place directly into GtkHtml stream.
Returned value should be freed with g_free. */
-char *
+gchar *
eab_parse_qp_email_to_html (const gchar *string)
{
- char *name = NULL, *mail = NULL;
- char *html_name, *html_mail;
- char *value;
+ gchar *name = NULL, *mail = NULL;
+ gchar *html_name, *html_mail;
+ gchar *value;
if (!eab_parse_qp_email (string, &name, &mail))
return NULL;