diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-10-22 21:37:26 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-10-22 21:37:26 +0800 |
commit | 6843cf006192fecf2382b1dd87a2fb8531a34b5f (patch) | |
tree | 385719873f29bdc6c90f536df9a87efc2700a2be | |
parent | a6eb75f8fddea5331c938c1ce42d08f962275f97 (diff) | |
parent | a28c3a40ece7da5304ca084e1f30d26dbf006b56 (diff) | |
download | gsoc2013-empathy-6843cf006192fecf2382b1dd87a2fb8531a34b5f.tar gsoc2013-empathy-6843cf006192fecf2382b1dd87a2fb8531a34b5f.tar.gz gsoc2013-empathy-6843cf006192fecf2382b1dd87a2fb8531a34b5f.tar.bz2 gsoc2013-empathy-6843cf006192fecf2382b1dd87a2fb8531a34b5f.tar.lz gsoc2013-empathy-6843cf006192fecf2382b1dd87a2fb8531a34b5f.tar.xz gsoc2013-empathy-6843cf006192fecf2382b1dd87a2fb8531a34b5f.tar.zst gsoc2013-empathy-6843cf006192fecf2382b1dd87a2fb8531a34b5f.zip |
Merge branch 'trivia'
24 files changed, 300 insertions, 283 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c index a750d471a..05911144a 100644 --- a/libempathy-gtk/empathy-account-widget.c +++ b/libempathy-gtk/empathy-account-widget.c @@ -1155,7 +1155,7 @@ do_constructed (GObject *obj) EmpathyAccountWidgetPriv *priv = GET_PRIV (self); EmpathyAccount *account; const gchar *protocol, *cm_name; - int i = 0; + guint i = 0; struct { const gchar *cm_name; const gchar *protocol; diff --git a/libempathy-gtk/empathy-avatar-chooser.c b/libempathy-gtk/empathy-avatar-chooser.c index 26528ef0c..df47d48e8 100644 --- a/libempathy-gtk/empathy-avatar-chooser.c +++ b/libempathy-gtk/empathy-avatar-chooser.c @@ -411,7 +411,7 @@ avatar_chooser_maybe_convert_and_scale (EmpathyAvatarChooser *chooser, guint max_width = 0, max_height = 0, max_size = 0; gchar **mime_types = NULL; gboolean needs_conversion = FALSE; - gint width, height; + guint width, height; gchar *new_format_name = NULL; gchar *new_mime_type = NULL; gdouble min_factor, max_factor; @@ -550,11 +550,11 @@ avatar_chooser_maybe_convert_and_scale (EmpathyAvatarChooser *chooser, * a difference of 1k. */ } while (min_factor != max_factor && - ABS (max_size - converted_image_size) > 1024); + abs (max_size - converted_image_size) > 1024); g_free (new_format_name); /* Takes ownership of new_mime_type and converted_image_data */ - avatar = empathy_avatar_new (converted_image_data, + avatar = empathy_avatar_new ((guchar *) converted_image_data, converted_image_size, new_mime_type, NULL, NULL); return avatar; @@ -599,7 +599,7 @@ avatar_chooser_set_image_from_data (EmpathyAvatarChooser *chooser, } /* avatar takes ownership of data and mime_type */ - avatar = empathy_avatar_new (data, size, mime_type, NULL, NULL); + avatar = empathy_avatar_new ((guchar *) data, size, mime_type, NULL, NULL); avatar_chooser_set_image (chooser, avatar, pixbuf, set_locally); } @@ -614,7 +614,7 @@ avatar_chooser_set_image_from_avatar (EmpathyAvatarChooser *chooser, g_assert (avatar != NULL); - pixbuf = empathy_pixbuf_from_data_and_mime (avatar->data, + pixbuf = empathy_pixbuf_from_data_and_mime ((gchar *) avatar->data, avatar->len, &mime_type); if (pixbuf == NULL) { @@ -704,7 +704,7 @@ avatar_chooser_drag_motion_cb (GtkWidget *widget, GdkDragContext *context, gint x, gint y, - guint time, + guint time_, EmpathyAvatarChooser *chooser) { EmpathyAvatarChooserPriv *priv; @@ -719,7 +719,7 @@ avatar_chooser_drag_motion_cb (GtkWidget *widget, if (!strcmp (possible_type, URI_LIST_TYPE)) { g_free (possible_type); - gdk_drag_status (context, GDK_ACTION_COPY, time); + gdk_drag_status (context, GDK_ACTION_COPY, time_); return TRUE; } @@ -733,7 +733,7 @@ avatar_chooser_drag_motion_cb (GtkWidget *widget, static void avatar_chooser_drag_leave_cb (GtkWidget *widget, GdkDragContext *context, - guint time, + guint time_, EmpathyAvatarChooser *chooser) { } @@ -743,7 +743,7 @@ avatar_chooser_drag_drop_cb (GtkWidget *widget, GdkDragContext *context, gint x, gint y, - guint time, + guint time_, EmpathyAvatarChooser *chooser) { EmpathyAvatarChooserPriv *priv; @@ -763,7 +763,7 @@ avatar_chooser_drag_drop_cb (GtkWidget *widget, g_free (possible_type); gtk_drag_get_data (widget, context, GDK_POINTER_TO_ATOM (p->data), - time); + time_); return TRUE; } @@ -781,7 +781,7 @@ avatar_chooser_drag_data_received_cb (GtkWidget *widget, gint y, GtkSelectionData *selection_data, guint info, - guint time, + guint time_, EmpathyAvatarChooser *chooser) { gchar *target_type; @@ -794,17 +794,19 @@ avatar_chooser_drag_data_received_cb (GtkWidget *widget, gchar *data = NULL; gsize bytes_read; - nl = strstr (gtk_selection_data_get_data (selection_data), "\r\n"); + nl = strstr ((gchar *) gtk_selection_data_get_data (selection_data), + "\r\n"); if (nl) { gchar *uri; - uri = g_strndup (gtk_selection_data_get_data (selection_data), + uri = g_strndup ((gchar *) gtk_selection_data_get_data (selection_data), nl - (gchar *) gtk_selection_data_get_data (selection_data)); file = g_file_new_for_uri (uri); g_free (uri); } else { - file = g_file_new_for_uri (gtk_selection_data_get_data (selection_data)); + file = g_file_new_for_uri ((gchar *) gtk_selection_data_get_data ( + selection_data)); } handled = g_file_load_contents (file, NULL, &data, &bytes_read, @@ -822,7 +824,7 @@ avatar_chooser_drag_data_received_cb (GtkWidget *widget, g_object_unref (file); } - gtk_drag_finish (context, handled, FALSE, time); + gtk_drag_finish (context, handled, FALSE, time_); } static void @@ -1049,7 +1051,7 @@ empathy_avatar_chooser_get_image_data (EmpathyAvatarChooser *chooser, if (priv->avatar != NULL) { if (data != NULL) { - *data = priv->avatar->data; + *data = (gchar *) priv->avatar->data; } if (data_size != NULL) { *data_size = priv->avatar->len; diff --git a/libempathy-gtk/empathy-avatar-image.c b/libempathy-gtk/empathy-avatar-image.c index f7898e1bd..03f638336 100644 --- a/libempathy-gtk/empathy-avatar-image.c +++ b/libempathy-gtk/empathy-avatar-image.c @@ -306,7 +306,8 @@ empathy_avatar_image_set (EmpathyAvatarImage *avatar_image, } if (avatar) { - priv->pixbuf = empathy_pixbuf_from_data (avatar->data, avatar->len); + priv->pixbuf = empathy_pixbuf_from_data ((gchar *) avatar->data, + avatar->len); } if (!priv->pixbuf) { diff --git a/libempathy-gtk/empathy-chat-text-view.c b/libempathy-gtk/empathy-chat-text-view.c index 894f9b84c..5822a429d 100644 --- a/libempathy-gtk/empathy-chat-text-view.c +++ b/libempathy-gtk/empathy-chat-text-view.c @@ -359,7 +359,7 @@ chat_text_view_maybe_trim_buffer (EmpathyChatTextView *view) EmpathyChatTextViewPriv *priv; GtkTextIter top, bottom; gint line; - gint remove; + gint remove_; GtkTextTagTable *table; GtkTextTag *tag; @@ -371,11 +371,11 @@ chat_text_view_maybe_trim_buffer (EmpathyChatTextView *view) return; } - remove = line - MAX_LINES; + remove_ = line - MAX_LINES; gtk_text_buffer_get_start_iter (priv->buffer, &top); bottom = top; - if (!gtk_text_iter_forward_lines (&bottom, remove)) { + if (!gtk_text_iter_forward_lines (&bottom, remove_)) { return; } @@ -506,7 +506,7 @@ chat_text_view_drag_motion (GtkWidget *widget, GdkDragContext *context, gint x, gint y, - guint time) + guint time_) { /* Don't handle drag motion, since we don't want the view to scroll as * the result of dragging something across it. */ @@ -1342,7 +1342,7 @@ empathy_chat_text_view_append_body (EmpathyChatTextView *view, g_match_info_free (match_info); g_regex_unref (uri_regex); - if (last < strlen (body)) { + if (last < (gint) strlen (body)) { gtk_text_buffer_get_end_iter (priv->buffer, &iter); chat_text_view_insert_text_with_emoticons (view, &iter, diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c index d6f806360..17bed7298 100644 --- a/libempathy-gtk/empathy-contact-widget.c +++ b/libempathy-gtk/empathy-contact-widget.c @@ -496,19 +496,19 @@ save_avatar_menu_activate_cb (GtkWidget *widget, if (!empathy_avatar_save_to_file (avatar, filename, &error)) { /* Save error */ - GtkWidget *dialog; + GtkWidget *error_dialog; - dialog = gtk_message_dialog_new (NULL, 0, + error_dialog = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("Unable to save avatar")); gtk_message_dialog_format_secondary_text ( - GTK_MESSAGE_DIALOG (dialog), "%s", error->message); + GTK_MESSAGE_DIALOG (error_dialog), "%s", error->message); - g_signal_connect (dialog, "response", + g_signal_connect (error_dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL); - gtk_window_present (GTK_WINDOW (dialog)); + gtk_window_present (GTK_WINDOW (error_dialog)); g_clear_error (&error); } @@ -1356,12 +1356,12 @@ contact_widget_location_update (EmpathyContactWidget *information) gchar *user_date; gchar *text; gint64 stamp; - time_t time; + time_t time_; stamp = g_value_get_int64 (value); - time = stamp; + time_ = stamp; - user_date = empathy_time_to_string_relative (time); + user_date = empathy_time_to_string_relative (time_); text = g_strconcat ( _("<b>Location</b>, "), user_date, NULL); gtk_label_set_markup (GTK_LABEL (information->label_location), text); @@ -1410,10 +1410,10 @@ contact_widget_location_update (EmpathyContactWidget *information) } else if (G_VALUE_TYPE (gvalue) == G_TYPE_INT64) { - time_t time; + time_t time_; - time = g_value_get_int64 (value); - svalue = empathy_time_to_string_utc (time, _("%B %e, %Y at %R UTC")); + time_ = g_value_get_int64 (value); + svalue = empathy_time_to_string_utc (time_, _("%B %e, %Y at %R UTC")); } if (svalue != NULL) diff --git a/libempathy-gtk/empathy-status-preset-dialog.c b/libempathy-gtk/empathy-status-preset-dialog.c index 802d116e7..0337d16a3 100644 --- a/libempathy-gtk/empathy-status-preset-dialog.c +++ b/libempathy-gtk/empathy-status-preset-dialog.c @@ -117,7 +117,7 @@ status_preset_dialog_presets_update (EmpathyStatusPresetDialog *self) { EmpathyStatusPresetDialogPriv *priv = GET_PRIV (self); GtkListStore *store; - int i; + guint i; store = GTK_LIST_STORE (gtk_tree_view_get_model ( GTK_TREE_VIEW (priv->presets_treeview))); @@ -167,7 +167,7 @@ status_preset_dialog_setup_add_combobox (EmpathyStatusPresetDialog *self) GtkWidget *combobox = priv->add_combobox; GtkListStore *store; GtkCellRenderer *renderer; - int i; + guint i; store = gtk_list_store_new (ADD_COMBO_N_COLS, G_TYPE_UINT, /* ADD_COMBO_STATE */ diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c index 0f2288e2a..49a76c24c 100644 --- a/libempathy-gtk/empathy-theme-adium.c +++ b/libempathy-gtk/empathy-theme-adium.c @@ -59,7 +59,7 @@ typedef struct { } EmpathyThemeAdiumPriv; struct _EmpathyAdiumData { - guint ref_count; + gint ref_count; gchar *path; gchar *basedir; gchar *default_avatar_filename; @@ -235,7 +235,7 @@ theme_adium_parse_body (EmpathyThemeAdium *theme, last = e; } while (g_match_info_next (match_info, NULL)); - if (e < strlen (text)) { + if (e < (gint) strlen (text)) { /* Append the text after the last link */ g_string_append_len (string, text + e, strlen (text) - e); } diff --git a/libempathy-gtk/empathy-theme-boxes.c b/libempathy-gtk/empathy-theme-boxes.c index 3d8b8ae7d..e6a606de1 100644 --- a/libempathy-gtk/empathy-theme-boxes.c +++ b/libempathy-gtk/empathy-theme-boxes.c @@ -193,7 +193,7 @@ theme_boxes_maybe_append_header (EmpathyThemeBoxes *theme, GtkTextChildAnchor *anchor; GtkWidget *box; gchar *str; - time_t time; + time_t time_; gchar *tmp; GtkTextIter start; gboolean color_set; @@ -259,8 +259,8 @@ theme_boxes_maybe_append_header (EmpathyThemeBoxes *theme, g_free (str); /* Add the message receive time */ - time = empathy_message_get_timestamp (msg); - tmp = empathy_time_to_string_local (time, + time_ = empathy_message_get_timestamp (msg); + tmp = empathy_time_to_string_local (time_, EMPATHY_TIME_FORMAT_DISPLAY_SHORT); str = g_strdup_printf ("<i>%s</i>", tmp); label2 = g_object_new (GTK_TYPE_LABEL, diff --git a/libempathy-gtk/empathy-theme-manager.c b/libempathy-gtk/empathy-theme-manager.c index fea2eca51..cda978330 100644 --- a/libempathy-gtk/empathy-theme-manager.c +++ b/libempathy-gtk/empathy-theme-manager.c @@ -573,24 +573,24 @@ GList * empathy_theme_manager_get_adium_themes (void) { #ifdef HAVE_WEBKIT - GList *themes = NULL; + GList *themes_list = NULL; gchar *userpath = NULL; const gchar *const *paths = NULL; gint i = 0; userpath = g_build_path (G_DIR_SEPARATOR_S, g_get_user_data_dir (), "adium/message-styles", NULL); - find_themes (&themes, userpath); + find_themes (&themes_list, userpath); g_free (userpath); paths = g_get_system_data_dirs (); for (i = 0; paths[i] != NULL; i++) { userpath = g_build_path (G_DIR_SEPARATOR_S, paths[i], "adium/message-styles", NULL); - find_themes (&themes, userpath); + find_themes (&themes_list, userpath); g_free (userpath); } - return themes; + return themes_list; #else return NULL; #endif /* HAVE_WEBKIT */ diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c index aeb665c74..4bbc3b81c 100644 --- a/libempathy-gtk/empathy-ui-utils.c +++ b/libempathy-gtk/empathy-ui-utils.c @@ -152,13 +152,13 @@ empathy_builder_connect (GtkBuilder *gui, { va_list args; const gchar *name; - const gchar *signal; + const gchar *sig; GObject *object; GCallback callback; va_start (args, first_object); for (name = first_object; name; name = va_arg (args, const gchar *)) { - signal = va_arg (args, const gchar *); + sig = va_arg (args, const gchar *); callback = va_arg (args, GCallback); object = gtk_builder_get_object (gui, name); @@ -167,7 +167,7 @@ empathy_builder_connect (GtkBuilder *gui, continue; } - g_signal_connect (object, signal, callback, user_data); + g_signal_connect (object, sig, callback, user_data); } va_end (args); @@ -250,7 +250,7 @@ empathy_pixbuf_from_data_and_mime (gchar *data, } loader = gdk_pixbuf_loader_new (); - if (!gdk_pixbuf_loader_write (loader, data, data_size, &error)) { + if (!gdk_pixbuf_loader_write (loader, (guchar *) data, data_size, &error)) { DEBUG ("Failed to write to pixbuf loader: %s", error ? error->message : "No error given"); goto out; diff --git a/libempathy-gtk/totem-subtitle-encoding.c b/libempathy-gtk/totem-subtitle-encoding.c index 112f169fd..285c5acf3 100644 --- a/libempathy-gtk/totem-subtitle-encoding.c +++ b/libempathy-gtk/totem-subtitle-encoding.c @@ -429,18 +429,18 @@ subtitle_encoding_get_index (const char *charset) } static const char * -subtitle_encoding_get_charset (int index) +subtitle_encoding_get_charset (int index_) { const SubtitleEncoding *e; - if (index >= SUBTITLE_ENCODING_LAST) + if (index_ >= SUBTITLE_ENCODING_LAST) e = &encodings[SUBTITLE_ENCODING_CURRENT_LOCALE]; - else if (index < SUBTITLE_ENCODING_CURRENT_LOCALE) + else if (index_ < SUBTITLE_ENCODING_CURRENT_LOCALE) e = &encodings[SUBTITLE_ENCODING_CURRENT_LOCALE]; - else if (!encodings[index].valid) + else if (!encodings[index_].valid) e = &encodings[SUBTITLE_ENCODING_CURRENT_LOCALE]; else - e = &encodings[index]; + e = &encodings[index_]; return e->charset; } @@ -530,15 +530,15 @@ totem_subtitle_encoding_get_selected (GtkComboBox * combo) { GtkTreeModel *model; GtkTreeIter iter; - gint index = -1; + gint index_ = -1; model = gtk_combo_box_get_model (combo); if (gtk_combo_box_get_active_iter (combo, &iter)) { - gtk_tree_model_get (model, &iter, INDEX_COL, &index, -1); + gtk_tree_model_get (model, &iter, INDEX_COL, &index_, -1); } - if (index == -1) + if (index_ == -1) return NULL; - return subtitle_encoding_get_charset (index); + return subtitle_encoding_get_charset (index_); } void @@ -546,12 +546,12 @@ totem_subtitle_encoding_set (GtkComboBox * combo, const char *encoding) { GtkTreeModel *model; GtkTreeIter iter, iter2; - gint index, i; + gint index_, i; g_return_if_fail (encoding != NULL); model = gtk_combo_box_get_model (combo); - index = subtitle_encoding_get_index (encoding); + index_ = subtitle_encoding_get_index (encoding); gtk_tree_model_get_iter_first (model, &iter); do { if (!gtk_tree_model_iter_has_child (model, &iter)) @@ -560,10 +560,10 @@ totem_subtitle_encoding_set (GtkComboBox * combo, const char *encoding) continue; do { gtk_tree_model_get (model, &iter2, INDEX_COL, &i, -1); - if (i == index) + if (i == index_) break; } while (gtk_tree_model_iter_next (model, &iter2)); - if (i == index) + if (i == index_) break; } while (gtk_tree_model_iter_next (model, &iter)); gtk_combo_box_set_active_iter (combo, &iter2); diff --git a/libempathy/empathy-account-settings.c b/libempathy/empathy-account-settings.c index 5069691a2..0acc8006f 100644 --- a/libempathy/empathy-account-settings.c +++ b/libempathy/empathy-account-settings.c @@ -320,7 +320,7 @@ empathy_account_settings_free_unset_parameters ( EmpathyAccountSettings *settings) { EmpathyAccountSettingsPriv *priv = GET_PRIV (settings); - int i; + guint i; for (i = 0 ; i < priv->unset_parameters->len; i++) g_free (g_array_index (priv->unset_parameters, gchar *, i)); @@ -520,7 +520,7 @@ empathy_account_settings_is_unset (EmpathyAccountSettings *settings, { EmpathyAccountSettingsPriv *priv = GET_PRIV (settings); GArray *a; - int i; + guint i; a = priv->unset_parameters; @@ -557,7 +557,7 @@ account_settings_remove_from_unset (EmpathyAccountSettings *settings, const gchar *param) { EmpathyAccountSettingsPriv *priv = GET_PRIV (settings); - int idx; + guint idx; gchar *val; for (idx = 0; idx < priv->unset_parameters->len; idx++) @@ -1240,7 +1240,7 @@ gboolean empathy_account_settings_is_valid (EmpathyAccountSettings *settings) { EmpathyAccountSettingsPriv *priv; - int idx; + guint idx; gchar *current; gboolean missed = FALSE; diff --git a/libempathy/empathy-chatroom-manager.c b/libempathy/empathy-chatroom-manager.c index 7d80b9441..b8c721bcb 100644 --- a/libempathy/empathy-chatroom-manager.c +++ b/libempathy/empathy-chatroom-manager.c @@ -90,8 +90,8 @@ chatroom_manager_file_save (EmpathyChatroomManager *manager) priv = GET_PRIV (manager); - doc = xmlNewDoc ("1.0"); - root = xmlNewNode (NULL, "chatrooms"); + doc = xmlNewDoc ((const xmlChar *) "1.0"); + root = xmlNewNode (NULL, (const xmlChar *) "chatrooms"); xmlDocSetRootElement (doc, root); for (l = priv->chatrooms; l; l = l->next) { @@ -108,12 +108,16 @@ chatroom_manager_file_save (EmpathyChatroomManager *manager) account_id = empathy_account_get_unique_name ( empathy_chatroom_get_account (chatroom)); - node = xmlNewChild (root, NULL, "chatroom", NULL); - xmlNewTextChild (node, NULL, "name", empathy_chatroom_get_name (chatroom)); - xmlNewTextChild (node, NULL, "room", empathy_chatroom_get_room (chatroom)); - xmlNewTextChild (node, NULL, "account", account_id); - xmlNewTextChild (node, NULL, "auto_connect", - empathy_chatroom_get_auto_connect (chatroom) ? "yes" : "no"); + node = xmlNewChild (root, NULL, (const xmlChar *) "chatroom", NULL); + xmlNewTextChild (node, NULL, (const xmlChar *) "name", + (const xmlChar *) empathy_chatroom_get_name (chatroom)); + xmlNewTextChild (node, NULL, (const xmlChar *) "room", + (const xmlChar *) empathy_chatroom_get_name (chatroom)); + xmlNewTextChild (node, NULL, (const xmlChar *) "account", + (const xmlChar *) account_id); + xmlNewTextChild (node, NULL, (const xmlChar *) "auto_connect", + empathy_chatroom_get_auto_connect (chatroom) ? + (const xmlChar *) "yes" : (const xmlChar *) "no"); } /* Make sure the XML is indented properly */ diff --git a/libempathy/empathy-connection-managers.c b/libempathy/empathy-connection-managers.c index bd6f315e2..5d381075e 100644 --- a/libempathy/empathy-connection-managers.c +++ b/libempathy/empathy-connection-managers.c @@ -111,8 +111,8 @@ empathy_connection_managers_get_property (GObject *object, GValue *value, GParamSpec *pspec) { - EmpathyConnectionManagers *managers = EMPATHY_CONNECTION_MANAGERS (object); - EmpathyConnectionManagersPriv *priv = GET_PRIV (managers); + EmpathyConnectionManagers *self = EMPATHY_CONNECTION_MANAGERS (object); + EmpathyConnectionManagersPriv *priv = GET_PRIV (self); switch (prop_id) { @@ -200,9 +200,9 @@ empathy_connection_managers_dup_singleton (void) } gboolean -empathy_connection_managers_is_ready (EmpathyConnectionManagers *managers) +empathy_connection_managers_is_ready (EmpathyConnectionManagers *self) { - EmpathyConnectionManagersPriv *priv = GET_PRIV (managers); + EmpathyConnectionManagersPriv *priv = GET_PRIV (self); return priv->ready; } @@ -245,28 +245,28 @@ out: } void -empathy_connection_managers_update (EmpathyConnectionManagers *managers) +empathy_connection_managers_update (EmpathyConnectionManagers *self) { - EmpathyConnectionManagersPriv *priv = GET_PRIV (managers); + EmpathyConnectionManagersPriv *priv = GET_PRIV (self); tp_list_connection_managers (priv->dbus, empathy_connection_managers_listed_cb, - NULL, NULL, G_OBJECT (managers)); + NULL, NULL, G_OBJECT (self)); } GList * -empathy_connection_managers_get_cms (EmpathyConnectionManagers *managers) +empathy_connection_managers_get_cms (EmpathyConnectionManagers *self) { - EmpathyConnectionManagersPriv *priv = GET_PRIV (managers); + EmpathyConnectionManagersPriv *priv = GET_PRIV (self); return priv->cms; } TpConnectionManager * -empathy_connection_managers_get_cm (EmpathyConnectionManagers *managers, +empathy_connection_managers_get_cm (EmpathyConnectionManagers *self, const gchar *cm) { - EmpathyConnectionManagersPriv *priv = GET_PRIV (managers); + EmpathyConnectionManagersPriv *priv = GET_PRIV (self); GList *l; for (l = priv->cms ; l != NULL; l = g_list_next (l)) @@ -281,13 +281,13 @@ empathy_connection_managers_get_cm (EmpathyConnectionManagers *managers, } guint -empathy_connection_managers_get_cms_num (EmpathyConnectionManagers *managers) +empathy_connection_managers_get_cms_num (EmpathyConnectionManagers *self) { EmpathyConnectionManagersPriv *priv; - g_return_val_if_fail (EMPATHY_IS_CONNECTION_MANAGERS (managers), 0); + g_return_val_if_fail (EMPATHY_IS_CONNECTION_MANAGERS (self), 0); - priv = GET_PRIV (managers); + priv = GET_PRIV (self); return g_list_length (priv->cms); } diff --git a/libempathy/empathy-contact-groups.c b/libempathy/empathy-contact-groups.c index 22d81d051..7244c1622 100644 --- a/libempathy/empathy-contact-groups.c +++ b/libempathy/empathy-contact-groups.c @@ -131,8 +131,8 @@ contact_groups_file_parse (const gchar *filename) gboolean expanded; ContactGroup *contact_group; - name = (gchar *) xmlGetProp (node, "name"); - expanded_str = (gchar *) xmlGetProp (node, "expanded"); + name = (gchar *) xmlGetProp (node, (const xmlChar *) "name"); + expanded_str = (gchar *) xmlGetProp (node, (const xmlChar *) "expanded"); if (expanded_str && strcmp (expanded_str, "yes") == 0) { expanded = TRUE; @@ -195,12 +195,12 @@ contact_groups_file_save (void) file = g_build_filename (dir, CONTACT_GROUPS_XML_FILENAME, NULL); g_free (dir); - doc = xmlNewDoc ("1.0"); - root = xmlNewNode (NULL, "contacts"); + doc = xmlNewDoc ((const xmlChar *) "1.0"); + root = xmlNewNode (NULL, (const xmlChar *) "contacts"); xmlDocSetRootElement (doc, root); - node = xmlNewChild (root, NULL, "account", NULL); - xmlNewProp (node, "name", "Default"); + node = xmlNewChild (root, NULL, (const xmlChar *) "account", NULL); + xmlNewProp (node, (const xmlChar *) "name", (const xmlChar *) "Default"); for (l = groups; l; l = l->next) { ContactGroup *cg; @@ -208,9 +208,10 @@ contact_groups_file_save (void) cg = l->data; - subnode = xmlNewChild (node, NULL, "group", NULL); - xmlNewProp (subnode, "expanded", cg->expanded ? "yes" : "no"); - xmlNewProp (subnode, "name", cg->name); + subnode = xmlNewChild (node, NULL, (const xmlChar *) "group", NULL); + xmlNewProp (subnode, (const xmlChar *) "expanded", cg->expanded ? + (const xmlChar *) "yes" : (const xmlChar *) "no"); + xmlNewProp (subnode, (const xmlChar *) "name", (const xmlChar *) cg->name); } /* Make sure the XML is indented properly */ @@ -262,7 +263,7 @@ empathy_contact_group_set_expanded (const gchar *group, g_return_if_fail (group != NULL); for (l = groups; l; l = l->next) { - ContactGroup *cg = l->data; + cg = l->data; if (!cg || !cg->name) { continue; diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c index 1cb418977..d4c2908e8 100644 --- a/libempathy/empathy-dispatcher.c +++ b/libempathy/empathy-dispatcher.c @@ -209,7 +209,7 @@ free_dispatch_data (DispatchData *data) } static DispatcherRequestData * -new_dispatcher_request_data (EmpathyDispatcher *dispatcher, +new_dispatcher_request_data (EmpathyDispatcher *self, TpConnection *connection, const gchar *channel_type, guint handle_type, @@ -221,7 +221,7 @@ new_dispatcher_request_data (EmpathyDispatcher *dispatcher, { DispatcherRequestData *result = g_slice_new0 (DispatcherRequestData); - result->dispatcher = g_object_ref (dispatcher); + result->dispatcher = g_object_ref (self); result->connection = connection; result->should_ensure = FALSE; @@ -281,10 +281,10 @@ static void free_connection_data (ConnectionData *cd) { GList *l; + guint i; g_hash_table_destroy (cd->dispatched_channels); g_hash_table_destroy (cd->dispatching_channels); - int i; for (l = cd->outstanding_requests ; l != NULL; l = g_list_delete_link (l,l)) { @@ -303,7 +303,7 @@ free_connection_data (ConnectionData *cd) static void free_find_channel_request (FindChannelRequest *r) { - int idx; + guint idx; char *str; g_object_unref (r->dispatcher); @@ -328,9 +328,9 @@ dispatcher_connection_invalidated_cb (TpConnection *connection, guint domain, gint code, gchar *message, - EmpathyDispatcher *dispatcher) + EmpathyDispatcher *self) { - EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher); + EmpathyDispatcherPriv *priv = GET_PRIV (self); DEBUG ("Error: %s", message); g_hash_table_remove (priv->connections, connection); @@ -359,7 +359,7 @@ dispatcher_operation_can_start (EmpathyDispatcher *self, } static void -dispatch_operation_flush_requests (EmpathyDispatcher *dispatcher, +dispatch_operation_flush_requests (EmpathyDispatcher *self, EmpathyDispatchOperation *operation, GError *error, ConnectionData *cd) @@ -397,10 +397,10 @@ dispatcher_channel_invalidated_cb (TpProxy *proxy, guint domain, gint code, gchar *message, - EmpathyDispatcher *dispatcher) + EmpathyDispatcher *self) { /* Channel went away... */ - EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher); + EmpathyDispatcherPriv *priv = GET_PRIV (self); TpConnection *connection; EmpathyDispatchOperation *operation; ConnectionData *cd; @@ -426,7 +426,7 @@ dispatcher_channel_invalidated_cb (TpProxy *proxy, if (operation != NULL) { GError error = { domain, code, message }; - dispatch_operation_flush_requests (dispatcher, operation, &error, cd); + dispatch_operation_flush_requests (self, operation, &error, cd); g_hash_table_remove (cd->outstanding_channels, object_path); g_object_unref (operation); } @@ -434,21 +434,21 @@ dispatcher_channel_invalidated_cb (TpProxy *proxy, static void dispatch_operation_approved_cb (EmpathyDispatchOperation *operation, - EmpathyDispatcher *dispatcher) + EmpathyDispatcher *self) { g_assert (empathy_dispatch_operation_is_incoming (operation)); DEBUG ("Send of for dispatching: %s", empathy_dispatch_operation_get_object_path (operation)); - g_signal_emit (dispatcher, signals[DISPATCH], 0, operation); + g_signal_emit (self, signals[DISPATCH], 0, operation); } static void dispatch_operation_claimed_cb (EmpathyDispatchOperation *operation, - EmpathyDispatcher *dispatcher) + EmpathyDispatcher *self) { /* Our job is done, remove the dispatch operation and mark the channel as * dispatched */ - EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher); + EmpathyDispatcherPriv *priv = GET_PRIV (self); TpConnection *connection; ConnectionData *cd; const gchar *object_path; @@ -475,23 +475,23 @@ dispatch_operation_claimed_cb (EmpathyDispatchOperation *operation, static void dispatch_operation_ready_cb (EmpathyDispatchOperation *operation, - EmpathyDispatcher *dispatcher) + EmpathyDispatcher *self) { - EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher); + EmpathyDispatcherPriv *priv = GET_PRIV (self); TpConnection *connection; ConnectionData *cd; EmpathyDispatchOperationState status; g_signal_connect (operation, "approved", - G_CALLBACK (dispatch_operation_approved_cb), dispatcher); + G_CALLBACK (dispatch_operation_approved_cb), self); g_signal_connect (operation, "claimed", - G_CALLBACK (dispatch_operation_claimed_cb), dispatcher); + G_CALLBACK (dispatch_operation_claimed_cb), self); /* Signal the observers */ DEBUG ("Send to observers: %s", empathy_dispatch_operation_get_object_path (operation)); - g_signal_emit (dispatcher, signals[OBSERVE], 0, operation); + g_signal_emit (self, signals[OBSERVE], 0, operation); empathy_dispatch_operation_start (operation); @@ -501,9 +501,9 @@ dispatch_operation_ready_cb (EmpathyDispatchOperation *operation, g_assert (cd != NULL); g_object_ref (operation); - g_object_ref (dispatcher); + g_object_ref (self); - dispatch_operation_flush_requests (dispatcher, operation, NULL, cd); + dispatch_operation_flush_requests (self, operation, NULL, cd); status = empathy_dispatch_operation_get_status (operation); g_object_unref (operation); @@ -514,17 +514,17 @@ dispatch_operation_ready_cb (EmpathyDispatchOperation *operation, { DEBUG ("Send to approvers: %s", empathy_dispatch_operation_get_object_path (operation)); - g_signal_emit (dispatcher, signals[APPROVE], 0, operation); + g_signal_emit (self, signals[APPROVE], 0, operation); } else { g_assert (status == EMPATHY_DISPATCHER_OPERATION_STATE_DISPATCHING); DEBUG ("Send of for dispatching: %s", empathy_dispatch_operation_get_object_path (operation)); - g_signal_emit (dispatcher, signals[DISPATCH], 0, operation); + g_signal_emit (self, signals[DISPATCH], 0, operation); } - g_object_unref (dispatcher); + g_object_unref (self); } static void @@ -549,10 +549,10 @@ dispatcher_start_dispatching (EmpathyDispatcher *self, { case EMPATHY_DISPATCHER_OPERATION_STATE_PREPARING: g_signal_connect (operation, "ready", - G_CALLBACK (dispatch_operation_ready_cb), dispatcher); + G_CALLBACK (dispatch_operation_ready_cb), self); break; case EMPATHY_DISPATCHER_OPERATION_STATE_PENDING: - dispatch_operation_ready_cb (operation, dispatcher); + dispatch_operation_ready_cb (operation, self); break; default: g_assert_not_reached (); @@ -584,13 +584,13 @@ dispatcher_flush_outstanding_operations (EmpathyDispatcher *self, if (dispatcher_operation_can_start (self, operation, cd)) { g_hash_table_iter_remove (&iter); - dispatcher_start_dispatching (dispatcher, operation, cd); + dispatcher_start_dispatching (self, operation, cd); } } } static void -dispatcher_connection_new_channel (EmpathyDispatcher *dispatcher, +dispatcher_connection_new_channel (EmpathyDispatcher *self, TpConnection *connection, const gchar *object_path, const gchar *channel_type, @@ -599,7 +599,7 @@ dispatcher_connection_new_channel (EmpathyDispatcher *dispatcher, GHashTable *properties, gboolean incoming) { - EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher); + EmpathyDispatcherPriv *priv = GET_PRIV (self); TpChannel *channel; ConnectionData *cd; EmpathyDispatchOperation *operation; @@ -614,7 +614,7 @@ dispatcher_connection_new_channel (EmpathyDispatcher *dispatcher, NULL }; - dispatcher_init_connection_if_needed (dispatcher, connection); + dispatcher_init_connection_if_needed (self, connection); cd = g_hash_table_lookup (priv->connections, connection); @@ -664,7 +664,7 @@ dispatcher_connection_new_channel (EmpathyDispatcher *dispatcher, g_signal_connect (channel, "invalidated", G_CALLBACK (dispatcher_channel_invalidated_cb), - dispatcher); + self); priv->channels = g_list_prepend (priv->channels, channel); @@ -678,21 +678,21 @@ dispatcher_connection_new_channel (EmpathyDispatcher *dispatcher, /* Request could either be by us or by a remote party. If there are no * outstanding requests for this channel type we can assume it's remote. * Otherwise we wait untill they are all satisfied */ - if (dispatcher_operation_can_start (dispatcher, operation, cd)) - dispatcher_start_dispatching (dispatcher, operation, cd); + if (dispatcher_operation_can_start (self, operation, cd)) + dispatcher_start_dispatching (self, operation, cd); else g_hash_table_insert (cd->outstanding_channels, g_strdup (object_path), operation); } else { - dispatcher_start_dispatching (dispatcher, operation, cd); + dispatcher_start_dispatching (self, operation, cd); } } static void dispatcher_connection_new_channel_with_properties ( - EmpathyDispatcher *dispatcher, + EmpathyDispatcher *self, TpConnection *connection, const gchar *object_path, GHashTable *properties) @@ -738,7 +738,7 @@ dispatcher_connection_new_channel_with_properties ( requested = FALSE; } - dispatcher_connection_new_channel (dispatcher, connection, + dispatcher_connection_new_channel (self, connection, object_path, channel_type, handle_type, handle, properties, !requested); } @@ -749,8 +749,8 @@ dispatcher_connection_got_all (TpProxy *proxy, gpointer user_data, GObject *object) { - EmpathyDispatcher *dispatcher = EMPATHY_DISPATCHER (object); - EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher); + EmpathyDispatcher *self = EMPATHY_DISPATCHER (object); + EmpathyDispatcherPriv *priv = GET_PRIV (self); GPtrArray *requestable_channels; GPtrArray *existing_channels; @@ -784,7 +784,7 @@ dispatcher_connection_got_all (TpProxy *proxy, { request = l->data; - retval = empathy_dispatcher_find_channel_classes (dispatcher, + retval = empathy_dispatcher_find_channel_classes (self, TP_CONNECTION (proxy), request->channel_type, request->handle_type, request->properties); request->callback (retval, request->user_data); @@ -803,24 +803,24 @@ dispatcher_connection_got_all (TpProxy *proxy, if (existing_channels != NULL) { - int idx; + guint idx; for (idx = 0; idx < existing_channels->len; idx++) { GValueArray *values = g_ptr_array_index (existing_channels, idx); const gchar *object_path; - GHashTable *properties; + GHashTable *props; object_path = g_value_get_boxed (g_value_array_get_nth (values, 0)); - properties = g_value_get_boxed (g_value_array_get_nth (values, 1)); + props = g_value_get_boxed (g_value_array_get_nth (values, 1)); - if (tp_strdiff (tp_asv_get_string (properties, + if (tp_strdiff (tp_asv_get_string (props, TP_IFACE_CHANNEL ".ChannelType"), TP_IFACE_CHANNEL_TYPE_TEXT)) continue; - dispatcher_connection_new_channel_with_properties (dispatcher, - TP_CONNECTION (proxy), object_path, properties); + dispatcher_connection_new_channel_with_properties (self, + TP_CONNECTION (proxy), object_path, props); } } } @@ -830,21 +830,21 @@ dispatcher_connection_advertise_capabilities_cb (TpConnection *connection, const GPtrArray *capabilities, const GError *error, gpointer user_data, - GObject *dispatcher) + GObject *self) { if (error) DEBUG ("Error: %s", error->message); } static void -dispatcher_init_connection_if_needed (EmpathyDispatcher *dispatcher, +dispatcher_init_connection_if_needed (EmpathyDispatcher *self, TpConnection *connection) { - EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher); + EmpathyDispatcherPriv *priv = GET_PRIV (self); GPtrArray *capabilities; GType cap_type; GValue cap = {0, }; - const gchar *remove = NULL; + const gchar *remove_ = NULL; if (g_hash_table_lookup (priv->connections, connection) != NULL) return; @@ -853,7 +853,7 @@ dispatcher_init_connection_if_needed (EmpathyDispatcher *dispatcher, new_connection_data ()); g_signal_connect (connection, "invalidated", - G_CALLBACK (dispatcher_connection_invalidated_cb), dispatcher); + G_CALLBACK (dispatcher_connection_invalidated_cb), self); if (tp_proxy_has_interface_by_id (TP_PROXY (connection), TP_IFACE_QUARK_CONNECTION_INTERFACE_REQUESTS)) @@ -861,7 +861,7 @@ dispatcher_init_connection_if_needed (EmpathyDispatcher *dispatcher, tp_cli_dbus_properties_call_get_all (connection, -1, TP_IFACE_CONNECTION_INTERFACE_REQUESTS, dispatcher_connection_got_all, - NULL, NULL, G_OBJECT (dispatcher)); + NULL, NULL, G_OBJECT (self)); } /* Advertise VoIP capabilities */ @@ -881,9 +881,9 @@ dispatcher_init_connection_if_needed (EmpathyDispatcher *dispatcher, g_ptr_array_add (capabilities, g_value_get_boxed (&cap)); tp_cli_connection_interface_capabilities_call_advertise_capabilities ( - connection, -1, capabilities, &remove, + connection, -1, capabilities, &remove_, dispatcher_connection_advertise_capabilities_cb, - NULL, NULL, G_OBJECT (dispatcher)); + NULL, NULL, G_OBJECT (self)); g_value_unset (&cap); g_ptr_array_free (capabilities, TRUE); @@ -892,9 +892,9 @@ dispatcher_init_connection_if_needed (EmpathyDispatcher *dispatcher, static void dispatcher_new_connection_cb (EmpathyAccountManager *manager, TpConnection *connection, - EmpathyDispatcher *dispatcher) + EmpathyDispatcher *self) { - dispatcher_init_connection_if_needed (dispatcher, connection); + dispatcher_init_connection_if_needed (self, connection); } static void @@ -1022,8 +1022,8 @@ dispatcher_set_property (GObject *object, const GValue *value, GParamSpec *pspec) { - EmpathyDispatcher *dispatcher = EMPATHY_DISPATCHER (object); - EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher); + EmpathyDispatcher *self = EMPATHY_DISPATCHER (object); + EmpathyDispatcherPriv *priv = GET_PRIV (self); switch (property_id) { @@ -1042,8 +1042,8 @@ dispatcher_get_property (GObject *object, GValue *value, GParamSpec *pspec) { - EmpathyDispatcher *dispatcher = EMPATHY_DISPATCHER (object); - EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher); + EmpathyDispatcher *self = EMPATHY_DISPATCHER (object); + EmpathyDispatcherPriv *priv = GET_PRIV (self); switch (property_id) { @@ -1111,18 +1111,18 @@ empathy_dispatcher_class_init (EmpathyDispatcherClass *klass) } static void -empathy_dispatcher_init (EmpathyDispatcher *dispatcher) +empathy_dispatcher_init (EmpathyDispatcher *self) { GList *connections, *l; - EmpathyDispatcherPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (dispatcher, + EmpathyDispatcherPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (self, EMPATHY_TYPE_DISPATCHER, EmpathyDispatcherPriv); - dispatcher->priv = priv; + self->priv = priv; priv->account_manager = empathy_account_manager_dup_singleton (); g_signal_connect (priv->account_manager, "new-connection", G_CALLBACK (dispatcher_new_connection_cb), - dispatcher); + self); priv->connections = g_hash_table_new_full (g_direct_hash, g_direct_equal, g_object_unref, (GDestroyNotify) free_connection_data); @@ -1137,7 +1137,7 @@ empathy_dispatcher_init (EmpathyDispatcher *dispatcher) for (l = connections; l; l = l->next) { dispatcher_new_connection_cb (priv->account_manager, l->data, - dispatcher); + self); g_object_unref (l->data); } g_list_free (connections); @@ -1151,10 +1151,10 @@ empathy_dispatcher_new (const gchar *name, GPtrArray *filters, GStrv capabilities) { - g_assert (dispatcher == NULL); EmpathyHandler *handler; EmpathyDispatcher *ret; + g_assert (dispatcher == NULL); handler = empathy_handler_new (name, filters, capabilities); ret = EMPATHY_DISPATCHER ( @@ -1173,11 +1173,11 @@ empathy_dispatcher_dup_singleton (void) } static void -dispatcher_request_failed (EmpathyDispatcher *dispatcher, +dispatcher_request_failed (EmpathyDispatcher *self, DispatcherRequestData *request_data, const GError *error) { - EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher); + EmpathyDispatcherPriv *priv = GET_PRIV (self); ConnectionData *conn_data; conn_data = g_hash_table_lookup (priv->connections, @@ -1196,13 +1196,13 @@ dispatcher_request_failed (EmpathyDispatcher *dispatcher, } static void -dispatcher_connection_new_requested_channel (EmpathyDispatcher *dispatcher, +dispatcher_connection_new_requested_channel (EmpathyDispatcher *self, DispatcherRequestData *request_data, const gchar *object_path, GHashTable *properties, const GError *error) { - EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher); + EmpathyDispatcherPriv *priv = GET_PRIV (self); EmpathyDispatchOperation *operation = NULL; ConnectionData *conn_data; @@ -1213,7 +1213,7 @@ dispatcher_connection_new_requested_channel (EmpathyDispatcher *dispatcher, { DEBUG ("Channel request failed: %s", error->message); - dispatcher_request_failed (dispatcher, request_data, error); + dispatcher_request_failed (self, request_data, error); goto out; } @@ -1300,12 +1300,12 @@ dispatcher_request_channel_cb (TpConnection *connection, GObject *weak_object) { DispatcherRequestData *request_data = (DispatcherRequestData *) user_data; - EmpathyDispatcher *dispatcher = + EmpathyDispatcher *self = EMPATHY_DISPATCHER (request_data->dispatcher); request_data->pending_call = NULL; - dispatcher_connection_new_requested_channel (dispatcher, + dispatcher_connection_new_requested_channel (self, request_data, object_path, NULL, error); } @@ -1348,7 +1348,7 @@ empathy_dispatcher_chat_with_contact (EmpathyContact *contact, EmpathyDispatcherRequestCb *callback, gpointer user_data) { - EmpathyDispatcher *dispatcher; + EmpathyDispatcher *self; EmpathyDispatcherPriv *priv; TpConnection *connection; ConnectionData *connection_data; @@ -1356,14 +1356,14 @@ empathy_dispatcher_chat_with_contact (EmpathyContact *contact, g_return_if_fail (EMPATHY_IS_CONTACT (contact)); - dispatcher = empathy_dispatcher_dup_singleton (); - priv = GET_PRIV (dispatcher); + self = empathy_dispatcher_dup_singleton (); + priv = GET_PRIV (self); connection = empathy_contact_get_connection (contact); connection_data = g_hash_table_lookup (priv->connections, connection); /* The contact handle might not be known yet */ - request_data = new_dispatcher_request_data (dispatcher, connection, + request_data = new_dispatcher_request_data (self, connection, TP_IFACE_CHANNEL_TYPE_TEXT, TP_HANDLE_TYPE_CONTACT, empathy_contact_get_handle (contact), NULL, contact, callback, user_data); request_data->should_ensure = TRUE; @@ -1373,7 +1373,7 @@ empathy_dispatcher_chat_with_contact (EmpathyContact *contact, dispatcher_request_channel (request_data); - g_object_unref (dispatcher); + g_object_unref (self); } typedef struct @@ -1413,17 +1413,17 @@ empathy_dispatcher_chat_with_contact_id (TpConnection *connection, EmpathyDispatcherRequestCb *callback, gpointer user_data) { - EmpathyDispatcher *dispatcher; + EmpathyDispatcher *self; EmpathyTpContactFactory *factory; ChatWithContactIdData *data; g_return_if_fail (TP_IS_CONNECTION (connection)); g_return_if_fail (!EMP_STR_EMPTY (contact_id)); - dispatcher = empathy_dispatcher_dup_singleton (); + self = empathy_dispatcher_dup_singleton (); factory = empathy_tp_contact_factory_dup_singleton (connection); data = g_slice_new0 (ChatWithContactIdData); - data->dispatcher = dispatcher; + data->dispatcher = self; data->callback = callback; data->user_data = user_data; empathy_tp_contact_factory_get_from_id (factory, contact_id, @@ -1445,8 +1445,8 @@ dispatcher_request_handles_cb (TpConnection *connection, if (error != NULL) { - EmpathyDispatcher *dispatcher = EMPATHY_DISPATCHER (object); - EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher); + EmpathyDispatcher *self = EMPATHY_DISPATCHER (object); + EmpathyDispatcherPriv *priv = GET_PRIV (self); ConnectionData *cd; cd = g_hash_table_lookup (priv->connections, request_data->connection); @@ -1459,7 +1459,7 @@ dispatcher_request_handles_cb (TpConnection *connection, free_dispatcher_request_data (request_data); - dispatcher_flush_outstanding_operations (dispatcher, cd); + dispatcher_flush_outstanding_operations (self, cd); return; } @@ -1473,7 +1473,7 @@ empathy_dispatcher_join_muc (TpConnection *connection, EmpathyDispatcherRequestCb *callback, gpointer user_data) { - EmpathyDispatcher *dispatcher; + EmpathyDispatcher *self; EmpathyDispatcherPriv *priv; DispatcherRequestData *request_data; ConnectionData *connection_data; @@ -1482,13 +1482,13 @@ empathy_dispatcher_join_muc (TpConnection *connection, g_return_if_fail (TP_IS_CONNECTION (connection)); g_return_if_fail (!EMP_STR_EMPTY (roomname)); - dispatcher = empathy_dispatcher_dup_singleton (); - priv = GET_PRIV (dispatcher); + self = empathy_dispatcher_dup_singleton (); + priv = GET_PRIV (self); connection_data = g_hash_table_lookup (priv->connections, connection); /* Don't know the room handle yet */ - request_data = new_dispatcher_request_data (dispatcher, connection, + request_data = new_dispatcher_request_data (self, connection, TP_IFACE_CHANNEL_TYPE_TEXT, TP_HANDLE_TYPE_ROOM, 0, NULL, NULL, callback, user_data); @@ -1500,7 +1500,7 @@ empathy_dispatcher_join_muc (TpConnection *connection, TP_HANDLE_TYPE_ROOM, names, dispatcher_request_handles_cb, request_data, NULL, NULL); - g_object_unref (dispatcher); + g_object_unref (self); } static void @@ -1512,12 +1512,12 @@ dispatcher_create_channel_cb (TpConnection *connect, GObject *weak_object) { DispatcherRequestData *request_data = (DispatcherRequestData *) user_data; - EmpathyDispatcher *dispatcher = + EmpathyDispatcher *self = EMPATHY_DISPATCHER (request_data->dispatcher); request_data->pending_call = NULL; - dispatcher_connection_new_requested_channel (dispatcher, + dispatcher_connection_new_requested_channel (self, request_data, object_path, properties, error); } @@ -1531,18 +1531,18 @@ dispatcher_ensure_channel_cb (TpConnection *connect, GObject *weak_object) { DispatcherRequestData *request_data = (DispatcherRequestData *) user_data; - EmpathyDispatcher *dispatcher = + EmpathyDispatcher *self = EMPATHY_DISPATCHER (request_data->dispatcher); request_data->pending_call = NULL; - dispatcher_connection_new_requested_channel (dispatcher, + dispatcher_connection_new_requested_channel (self, request_data, object_path, properties, error); } static void empathy_dispatcher_call_create_or_ensure_channel ( - EmpathyDispatcher *dispatcher, + EmpathyDispatcher *self, DispatcherRequestData *request_data) { if (request_data->should_ensure) @@ -1564,13 +1564,13 @@ empathy_dispatcher_call_create_or_ensure_channel ( } void -empathy_dispatcher_create_channel (EmpathyDispatcher *dispatcher, +empathy_dispatcher_create_channel (EmpathyDispatcher *self, TpConnection *connection, GHashTable *request, EmpathyDispatcherRequestCb *callback, gpointer user_data) { - EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher); + EmpathyDispatcherPriv *priv = GET_PRIV (self); ConnectionData *connection_data; DispatcherRequestData *request_data; const gchar *channel_type; @@ -1578,7 +1578,7 @@ empathy_dispatcher_create_channel (EmpathyDispatcher *dispatcher, guint handle; gboolean valid; - g_return_if_fail (EMPATHY_IS_DISPATCHER (dispatcher)); + g_return_if_fail (EMPATHY_IS_DISPATCHER (self)); g_return_if_fail (TP_IS_CONNECTION (connection)); g_return_if_fail (request != NULL); @@ -1594,14 +1594,14 @@ empathy_dispatcher_create_channel (EmpathyDispatcher *dispatcher, handle = tp_asv_get_uint32 (request, TP_IFACE_CHANNEL ".TargetHandle", NULL); - request_data = new_dispatcher_request_data (dispatcher, connection, + request_data = new_dispatcher_request_data (self, connection, channel_type, handle_type, handle, request, NULL, callback, user_data); connection_data->outstanding_requests = g_list_prepend (connection_data->outstanding_requests, request_data); - empathy_dispatcher_call_create_or_ensure_channel (dispatcher, request_data); + empathy_dispatcher_call_create_or_ensure_channel (self, request_data); } static gboolean @@ -1635,7 +1635,7 @@ channel_class_matches (GValueArray *class, if (fixed_properties != NULL) { gpointer h_key, h_val; - int idx; + guint idx; GHashTableIter iter; gboolean found; @@ -1686,17 +1686,17 @@ channel_class_matches (GValueArray *class, } static GList * -empathy_dispatcher_find_channel_classes (EmpathyDispatcher *dispatcher, +empathy_dispatcher_find_channel_classes (EmpathyDispatcher *self, TpConnection *connection, const gchar *channel_type, guint handle_type, GArray *fixed_properties) { - EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher); + EmpathyDispatcherPriv *priv = GET_PRIV (self); GValueArray *class; GPtrArray *classes; GList *matching_classes; - int i; + guint i; ConnectionData *cd; g_return_val_if_fail (channel_type != NULL, NULL); @@ -1826,7 +1826,7 @@ setup_varargs (va_list var_args, */ GList * empathy_dispatcher_find_requestable_channel_classes - (EmpathyDispatcher *dispatcher, + (EmpathyDispatcher *self, TpConnection *connection, const gchar *channel_type, guint handle_type, @@ -1837,15 +1837,15 @@ empathy_dispatcher_find_requestable_channel_classes GArray *properties; EmpathyDispatcherPriv *priv; GList *retval; - int idx; + guint idx; char *str; - g_return_val_if_fail (EMPATHY_IS_DISPATCHER (dispatcher), NULL); + g_return_val_if_fail (EMPATHY_IS_DISPATCHER (self), NULL); g_return_val_if_fail (TP_IS_CONNECTION (connection), NULL); g_return_val_if_fail (channel_type != NULL, NULL); g_return_val_if_fail (handle_type != 0, NULL); - priv = GET_PRIV (dispatcher); + priv = GET_PRIV (self); va_start (var_args, first_property_name); @@ -1853,7 +1853,7 @@ empathy_dispatcher_find_requestable_channel_classes va_end (var_args); - retval = empathy_dispatcher_find_channel_classes (dispatcher, connection, + retval = empathy_dispatcher_find_channel_classes (self, connection, channel_type, handle_type, properties); if (properties != NULL) @@ -1888,7 +1888,7 @@ empathy_dispatcher_find_requestable_channel_classes */ void empathy_dispatcher_find_requestable_channel_classes_async - (EmpathyDispatcher *dispatcher, + (EmpathyDispatcher *self, TpConnection *connection, const gchar *channel_type, guint handle_type, @@ -1903,12 +1903,12 @@ empathy_dispatcher_find_requestable_channel_classes_async EmpathyDispatcherPriv *priv; guint source_id; - g_return_if_fail (EMPATHY_IS_DISPATCHER (dispatcher)); + g_return_if_fail (EMPATHY_IS_DISPATCHER (self)); g_return_if_fail (TP_IS_CONNECTION (connection)); g_return_if_fail (channel_type != NULL); g_return_if_fail (handle_type != 0); - priv = GET_PRIV (dispatcher); + priv = GET_PRIV (self); va_start (var_args, first_property_name); @@ -1918,7 +1918,7 @@ empathy_dispatcher_find_requestable_channel_classes_async /* append another request for this connection */ request = g_slice_new0 (FindChannelRequest); - request->dispatcher = g_object_ref (dispatcher); + request->dispatcher = g_object_ref (self); request->channel_type = g_strdup (channel_type); request->handle_type = handle_type; request->connection = connection; @@ -1936,8 +1936,8 @@ static GList * empathy_dispatcher_get_channels (EmpathyHandler *handler, gpointer user_data) { - EmpathyDispatcher *dispatcher = EMPATHY_DISPATCHER (user_data); - EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher); + EmpathyDispatcher *self = EMPATHY_DISPATCHER (user_data); + EmpathyDispatcherPriv *priv = GET_PRIV (self); return priv->channels; } @@ -1953,9 +1953,9 @@ empathy_dispatcher_handle_channels (EmpathyHandler *handler, gpointer user_data, GError **error) { - EmpathyDispatcher *dispatcher = EMPATHY_DISPATCHER (user_data); - EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher); - int i; + EmpathyDispatcher *self = EMPATHY_DISPATCHER (user_data); + EmpathyDispatcherPriv *priv = GET_PRIV (self); + guint i; EmpathyAccount *account; TpConnection *connection; @@ -1981,7 +1981,7 @@ empathy_dispatcher_handle_channels (EmpathyHandler *handler, object_path = g_value_get_boxed (g_value_array_get_nth (arr, 0)); properties = g_value_get_boxed (g_value_array_get_nth (arr, 1)); - dispatcher_connection_new_channel_with_properties (dispatcher, + dispatcher_connection_new_channel_with_properties (self, connection, object_path, properties); } @@ -1990,12 +1990,12 @@ empathy_dispatcher_handle_channels (EmpathyHandler *handler, EmpathyHandler * -empathy_dispatcher_add_handler (EmpathyDispatcher *dispatcher, +empathy_dispatcher_add_handler (EmpathyDispatcher *self, const gchar *name, GPtrArray *filters, GStrv capabilities) { - EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher); + EmpathyDispatcherPriv *priv = GET_PRIV (self); EmpathyHandler *handler; handler = empathy_handler_new (name, filters, capabilities); @@ -2005,17 +2005,16 @@ empathy_dispatcher_add_handler (EmpathyDispatcher *dispatcher, * handler will always report all dispatched channels even if they came from * a different Handler */ empathy_handler_set_handle_channels_func (handler, - empathy_dispatcher_handle_channels, - dispatcher); + empathy_dispatcher_handle_channels, self); return handler; } void -empathy_dispatcher_remove_handler (EmpathyDispatcher *dispatcher, +empathy_dispatcher_remove_handler (EmpathyDispatcher *self, EmpathyHandler *handler) { - EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher); + EmpathyDispatcherPriv *priv = GET_PRIV (self); GList *h; h = g_list_find (priv->handlers, handler); diff --git a/libempathy/empathy-irc-network-manager.c b/libempathy/empathy-irc-network-manager.c index ad726800a..d537d5574 100644 --- a/libempathy/empathy-irc-network-manager.c +++ b/libempathy/empathy-irc-network-manager.c @@ -463,12 +463,12 @@ irc_network_manager_parse_irc_server (EmpathyIrcNetwork *network, { gchar *address = NULL, *port = NULL, *ssl = NULL; - if (strcmp (server_node->name, "server") != 0) + if (strcmp ((const gchar *) server_node->name, "server") != 0) continue; - address = xmlGetProp (server_node, "address"); - port = xmlGetProp (server_node, "port"); - ssl = xmlGetProp (server_node, "ssl"); + address = (gchar *) xmlGetProp (server_node, (const xmlChar *) "address"); + port = (gchar *) xmlGetProp (server_node, (const xmlChar *) "port"); + ssl = (gchar *) xmlGetProp (server_node, (const xmlChar *) "ssl"); if (address != NULL) { @@ -511,8 +511,8 @@ irc_network_manager_parse_irc_network (EmpathyIrcNetworkManager *self, gchar *str; gchar *id, *name; - id = xmlGetProp (node, "id"); - if (xmlHasProp (node, "dropped")) + id = (gchar *) xmlGetProp (node, (const xmlChar *) "id"); + if (xmlHasProp (node, (const xmlChar *) "dropped")) { if (!user_defined) { @@ -529,16 +529,16 @@ irc_network_manager_parse_irc_network (EmpathyIrcNetworkManager *self, return; } - if (!xmlHasProp (node, "name")) + if (!xmlHasProp (node, (const xmlChar *) "name")) return; - name = xmlGetProp (node, "name"); + name = (gchar *) xmlGetProp (node, (const xmlChar *) "name"); network = empathy_irc_network_new (name); - if (xmlHasProp (node, "network_charset")) + if (xmlHasProp (node, (const xmlChar *) "network_charset")) { gchar *charset; - charset = xmlGetProp (node, "network_charset"); + charset = (gchar *) xmlGetProp (node, (const xmlChar *) "network_charset"); g_object_set (network, "charset", charset, NULL); xmlFree (charset); } @@ -630,12 +630,13 @@ write_network_to_xml (const gchar *id, /* no need to write this network to the XML */ return; - network_node = xmlNewChild (root, NULL, "network", NULL); - xmlNewProp (network_node, "id", id); + network_node = xmlNewChild (root, NULL, (const xmlChar *) "network", NULL); + xmlNewProp (network_node, (const xmlChar *) "id", (const xmlChar *) id); if (network->dropped) { - xmlNewProp (network_node, "dropped", "1"); + xmlNewProp (network_node, (const xmlChar *) "dropped", + (const xmlChar *) "1"); return; } @@ -643,14 +644,16 @@ write_network_to_xml (const gchar *id, "name", &name, "charset", &charset, NULL); - xmlNewProp (network_node, "name", name); - xmlNewProp (network_node, "network_charset", charset); + xmlNewProp (network_node, (const xmlChar *) "name", (const xmlChar *) name); + xmlNewProp (network_node, (const xmlChar *) "network_charset", + (const xmlChar *) charset); g_free (name); g_free (charset); servers = empathy_irc_network_get_servers (network); - servers_node = xmlNewChild (network_node, NULL, "servers", NULL); + servers_node = xmlNewChild (network_node, NULL, (const xmlChar *) "servers", + NULL); for (l = servers; l != NULL; l = g_slist_next (l)) { EmpathyIrcServer *server; @@ -661,7 +664,8 @@ write_network_to_xml (const gchar *id, server = l->data; - server_node = xmlNewChild (servers_node, NULL, "server", NULL); + server_node = xmlNewChild (servers_node, NULL, (const xmlChar *) "server", + NULL); g_object_get (server, "address", &address, @@ -669,13 +673,16 @@ write_network_to_xml (const gchar *id, "ssl", &ssl, NULL); - xmlNewProp (server_node, "address", address); + xmlNewProp (server_node, (const xmlChar *) "address", + (const xmlChar *) address); tmp = g_strdup_printf ("%u", port); - xmlNewProp (server_node, "port", tmp); + xmlNewProp (server_node, (const xmlChar *) "port", + (const xmlChar *) tmp); g_free (tmp); - xmlNewProp (server_node, "ssl", ssl ? "TRUE": "FALSE"); + xmlNewProp (server_node, (const xmlChar *) "ssl", + ssl ? (const xmlChar *) "TRUE": (const xmlChar *) "FALSE"); g_free (address); } @@ -700,8 +707,8 @@ irc_network_manager_file_save (EmpathyIrcNetworkManager *self) DEBUG ("Saving IRC networks"); - doc = xmlNewDoc ("1.0"); - root = xmlNewNode (NULL, "networks"); + doc = xmlNewDoc ((const xmlChar *) "1.0"); + root = xmlNewNode (NULL, (const xmlChar *) "networks"); xmlDocSetRootElement (doc, root); g_hash_table_foreach (priv->networks, (GHFunc) write_network_to_xml, root); diff --git a/libempathy/empathy-log-store-empathy.c b/libempathy/empathy-log-store-empathy.c index 9e5170370..9771a9f28 100644 --- a/libempathy/empathy-log-store-empathy.c +++ b/libempathy/empathy-log-store-empathy.c @@ -480,7 +480,7 @@ log_store_empathy_get_messages_for_file (EmpathyLogStore *self, { EmpathyMessage *message; EmpathyContact *sender; - gchar *time; + gchar *time_; time_t t; gchar *sender_id; gchar *sender_name; @@ -493,17 +493,18 @@ log_store_empathy_get_messages_for_file (EmpathyLogStore *self, guint cm_id; TpChannelTextMessageType msg_type = TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL; - if (strcmp (node->name, "message") != 0) + if (strcmp ((const gchar *) node->name, "message") != 0) continue; - body = xmlNodeGetContent (node); - time = xmlGetProp (node, "time"); - sender_id = xmlGetProp (node, "id"); - sender_name = xmlGetProp (node, "name"); - sender_avatar_token = xmlGetProp (node, "token"); - is_user_str = xmlGetProp (node, "isuser"); - msg_type_str = xmlGetProp (node, "type"); - cm_id_str = xmlGetProp (node, "cm_id"); + body = (gchar *) xmlNodeGetContent (node); + time_ = (gchar *) xmlGetProp (node, (const xmlChar *) "time"); + sender_id = (gchar *) xmlGetProp (node, (const xmlChar *) "id"); + sender_name = (gchar *) xmlGetProp (node, (const xmlChar *) "name"); + sender_avatar_token = (gchar *) xmlGetProp (node, + (const xmlChar *) "token"); + is_user_str = (gchar *) xmlGetProp (node, (const xmlChar *) "isuser"); + msg_type_str = (gchar *) xmlGetProp (node, (const xmlChar *) "type"); + cm_id_str = (gchar *) xmlGetProp (node, (const xmlChar *) "cm_id"); if (is_user_str) is_user = strcmp (is_user_str, "true") == 0; @@ -514,7 +515,7 @@ log_store_empathy_get_messages_for_file (EmpathyLogStore *self, if (cm_id_str) cm_id = atoi (cm_id_str); - t = empathy_time_parse (time); + t = empathy_time_parse (time_); sender = empathy_contact_new_for_log (account, sender_id, sender_name, is_user); @@ -535,7 +536,7 @@ log_store_empathy_get_messages_for_file (EmpathyLogStore *self, messages = g_list_append (messages, message); g_object_unref (sender); - xmlFree (time); + xmlFree (time_); xmlFree (sender_id); xmlFree (sender_name); xmlFree (body); diff --git a/libempathy/empathy-status-presets.c b/libempathy/empathy-status-presets.c index 1fa991b0b..255f7ab21 100644 --- a/libempathy/empathy-status-presets.c +++ b/libempathy/empathy-status-presets.c @@ -127,7 +127,7 @@ status_presets_file_parse (const gchar *filename) } status = (gchar *) xmlNodeGetContent (node); - state_str = (gchar *) xmlGetProp (node, "presence"); + state_str = (gchar *) xmlGetProp (node, (const xmlChar *) "presence"); if (state_str) { state = empathy_presence_from_str (state_str); @@ -208,19 +208,19 @@ status_presets_file_save (void) file = g_build_filename (dir, STATUS_PRESETS_XML_FILENAME, NULL); g_free (dir); - doc = xmlNewDoc ("1.0"); - root = xmlNewNode (NULL, "presets"); + doc = xmlNewDoc ((const xmlChar *) "1.0"); + root = xmlNewNode (NULL, (const xmlChar *) "presets"); xmlDocSetRootElement (doc, root); if (default_preset) { xmlNodePtr subnode; xmlChar *state; - state = (gchar *) empathy_presence_to_str (default_preset->state); + state = (xmlChar *) empathy_presence_to_str (default_preset->state); - subnode = xmlNewTextChild (root, NULL, "default", - default_preset->status); - xmlNewProp (subnode, "presence", state); + subnode = xmlNewTextChild (root, NULL, (const xmlChar *) "default", + (const xmlChar *) default_preset->status); + xmlNewProp (subnode, (const xmlChar *) "presence", state); } for (l = presets; l; l = l->next) { @@ -229,7 +229,7 @@ status_presets_file_save (void) xmlChar *state; sp = l->data; - state = (gchar *) empathy_presence_to_str (sp->state); + state = (xmlChar *) empathy_presence_to_str (sp->state); count[sp->state]++; if (count[sp->state] > STATUS_PRESETS_MAX_EACH) { @@ -237,8 +237,8 @@ status_presets_file_save (void) } subnode = xmlNewTextChild (root, NULL, - "status", sp->status); - xmlNewProp (subnode, "presence", state); + (const xmlChar *) "status", (const xmlChar *) sp->status); + xmlNewProp (subnode, (const xmlChar *) "presence", state); } /* Make sure the XML is indented properly */ diff --git a/libempathy/empathy-time.c b/libempathy/empathy-time.c index 19397e7a9..a39636dde 100644 --- a/libempathy/empathy-time.c +++ b/libempathy/empathy-time.c @@ -40,18 +40,18 @@ empathy_time_get_current (void) time_t empathy_time_get_local_time (struct tm *tm) { - const gchar *timezone; + const gchar *tz; time_t t; - timezone = g_getenv ("TZ"); + tz = g_getenv ("TZ"); g_setenv ("TZ", "", TRUE); tzset (); t = mktime (tm); - if (timezone) { - g_setenv ("TZ", timezone, TRUE); + if (tz) { + g_setenv ("TZ", tz, TRUE); } else { g_unsetenv ("TZ"); } diff --git a/libempathy/empathy-tp-contact-factory.c b/libempathy/empathy-tp-contact-factory.c index dd6b60586..6683b5936 100644 --- a/libempathy/empathy-tp-contact-factory.c +++ b/libempathy/empathy-tp-contact-factory.c @@ -185,7 +185,7 @@ tp_contact_factory_avatar_retrieved_cb (TpConnection *connection, handle); empathy_contact_load_avatar_data (contact, - avatar_data->data, + (guchar *) avatar_data->data, avatar_data->len, mime_type, token); diff --git a/libempathy/empathy-tp-contact-list.c b/libempathy/empathy-tp-contact-list.c index 2bf2ec416..3e1015d0c 100644 --- a/libempathy/empathy-tp-contact-list.c +++ b/libempathy/empathy-tp-contact-list.c @@ -188,7 +188,7 @@ tp_contact_list_group_members_changed_cb (TpChannel *channel, { EmpathyTpContactListPriv *priv = GET_PRIV (list); const gchar *group_name; - gint i; + guint i; group_name = tp_channel_get_identifier (channel); @@ -430,12 +430,12 @@ tp_contact_list_remove_handle (EmpathyTpContactList *list, { EmpathyTpContactListPriv *priv = GET_PRIV (list); EmpathyContact *contact; - const gchar *signal; + const gchar *sig; if (table == priv->pendings) - signal = "pendings-changed"; + sig = "pendings-changed"; else if (table == priv->members) - signal = "members-changed"; + sig = "members-changed"; else return; @@ -443,7 +443,7 @@ tp_contact_list_remove_handle (EmpathyTpContactList *list, if (contact) { g_object_ref (contact); g_hash_table_remove (table, GUINT_TO_POINTER (handle)); - g_signal_emit_by_name (list, signal, contact, 0, 0, NULL, + g_signal_emit_by_name (list, sig, contact, 0, 0, NULL, FALSE); g_object_unref (contact); } @@ -539,7 +539,7 @@ tp_contact_list_get_requestablechannelclasses_cb (TpProxy *connection, { EmpathyTpContactListPriv *priv = GET_PRIV (list); GPtrArray *classes; - int i; + guint i; if (error) { DEBUG ("Error: %s", error->message); diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c index 3b14b0028..a0cb4111e 100644 --- a/libempathy/empathy-utils.c +++ b/libempathy/empathy-utils.c @@ -135,7 +135,8 @@ gboolean empathy_xml_validate (xmlDoc *doc, const gchar *dtd_filename) { - gchar *path, *escaped; + gchar *path; + xmlChar *escaped; xmlValidCtxt cvp; xmlDtd *dtd; gboolean ret; @@ -149,7 +150,8 @@ empathy_xml_validate (xmlDoc *doc, DEBUG ("Loading dtd file %s", path); /* The list of valid chars is taken from libxml. */ - escaped = xmlURIEscapeStr (path, ":@&=+$,/?;"); + escaped = xmlURIEscapeStr ((const xmlChar *) path, + (const xmlChar *)":@&=+$,/?;"); g_free (path); memset (&cvp, 0, sizeof (cvp)); @@ -172,7 +174,7 @@ empathy_xml_node_get_child (xmlNodePtr node, g_return_val_if_fail (child_name != NULL, NULL); for (l = node->children; l; l = l->next) { - if (l->name && strcmp (l->name, child_name) == 0) { + if (l->name && strcmp ((const gchar *) l->name, child_name) == 0) { return l; } } @@ -212,12 +214,12 @@ empathy_xml_node_find_child_prop_value (xmlNodePtr node, for (l = node->children; l && !found; l = l->next) { xmlChar *prop; - if (!xmlHasProp (l, prop_name)) { + if (!xmlHasProp (l, (const xmlChar *) prop_name)) { continue; } - prop = xmlGetProp (l, prop_name); - if (prop && strcmp (prop, prop_value) == 0) { + prop = xmlGetProp (l, (const xmlChar *) prop_name); + if (prop && strcmp ((const gchar *) prop, prop_value) == 0) { found = l; } diff --git a/nautilus-sendto-plugin/empathy-nautilus-sendto.c b/nautilus-sendto-plugin/empathy-nautilus-sendto.c index 976ed84c7..8560ac774 100644 --- a/nautilus-sendto-plugin/empathy-nautilus-sendto.c +++ b/nautilus-sendto-plugin/empathy-nautilus-sendto.c @@ -189,7 +189,7 @@ error_dialog_cb (GtkDialog *dialog, } static void -handler_ready_cb (EmpathyFTFactory *factory, +handler_ready_cb (EmpathyFTFactory *fact, EmpathyFTHandler *handler, GError *error, NstPlugin *plugin) |