/pidgin/main: b44c08754471: Backport warning fixes for Pidgin fr...
Tomasz Wasilczyk
twasilczyk at pidgin.im
Tue May 6 07:42:02 EDT 2014
Changeset: b44c08754471de0e3e96cc346787af5b294db51d
Author: Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date: 2014-05-06 13:41 +0200
Branch: release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/b44c08754471
Description:
Backport warning fixes for Pidgin from default
diffstat:
pidgin/gtkblist.c | 2 +-
pidgin/gtkimhtml.c | 2 +-
pidgin/gtkmain.c | 7 ++++++-
pidgin/gtksourceiter.c | 17 +++++++++++++++--
pidgin/plugins/vvconfig.c | 3 +++
5 files changed, 26 insertions(+), 5 deletions(-)
diffs (97 lines):
diff --git a/pidgin/gtkblist.c b/pidgin/gtkblist.c
--- a/pidgin/gtkblist.c
+++ b/pidgin/gtkblist.c
@@ -6868,7 +6868,7 @@ static void pidgin_blist_destroy(PurpleB
purple_signals_disconnect_by_handle(gtkblist);
if (gtkblist->headline_close)
- gdk_pixbuf_unref(gtkblist->headline_close);
+ g_object_unref(gtkblist->headline_close);
gtk_widget_destroy(gtkblist->window);
diff --git a/pidgin/gtkimhtml.c b/pidgin/gtkimhtml.c
--- a/pidgin/gtkimhtml.c
+++ b/pidgin/gtkimhtml.c
@@ -682,7 +682,7 @@ gtk_motion_event_notify(GtkWidget *imhtm
}
if (GTK_IMHTML(imhtml)->tip) {
- if ((tip == GTK_IMHTML(imhtml)->tip)) {
+ if (tip == GTK_IMHTML(imhtml)->tip) {
g_slist_free(tags);
return FALSE;
}
diff --git a/pidgin/gtkmain.c b/pidgin/gtkmain.c
--- a/pidgin/gtkmain.c
+++ b/pidgin/gtkmain.c
@@ -522,8 +522,13 @@ int main(int argc, char *argv[])
debug_enabled = FALSE;
#endif
- /* Initialize GThread before calling any Glib or GTK+ functions. */
+#if !GLIB_CHECK_VERSION(2, 32, 0)
+ /* GLib threading system is automaticaly initialized since 2.32.
+ * For earlier versions, it have to be initialized before calling any
+ * Glib or GTK+ functions.
+ */
g_thread_init(NULL);
+#endif
g_set_prgname("Pidgin");
diff --git a/pidgin/gtksourceiter.c b/pidgin/gtksourceiter.c
--- a/pidgin/gtksourceiter.c
+++ b/pidgin/gtksourceiter.c
@@ -526,6 +526,19 @@ strbreakup (const char *string,
return str_array;
}
+static GtkTextSearchFlags
+_source_flags_to_text_flags(GtkSourceSearchFlags flags)
+{
+ GtkTextSearchFlags text_flags = 0;
+
+ if (flags & GTK_SOURCE_SEARCH_VISIBLE_ONLY)
+ text_flags |= GTK_TEXT_SEARCH_VISIBLE_ONLY;
+ if (flags & GTK_SOURCE_SEARCH_TEXT_ONLY)
+ text_flags |= GTK_TEXT_SEARCH_TEXT_ONLY;
+
+ return text_flags;
+}
+
/**
* gtk_source_iter_forward_search:
* @iter: start of search.
@@ -576,7 +589,7 @@ gtk_source_iter_forward_search (const Gt
g_return_val_if_fail (str != NULL, FALSE);
if ((flags & GTK_SOURCE_SEARCH_CASE_INSENSITIVE) == 0)
- return gtk_text_iter_forward_search (iter, str, flags,
+ return gtk_text_iter_forward_search (iter, str, _source_flags_to_text_flags(flags),
match_start, match_end,
limit);
@@ -679,7 +692,7 @@ gtk_source_iter_backward_search (const G
g_return_val_if_fail (str != NULL, FALSE);
if ((flags & GTK_SOURCE_SEARCH_CASE_INSENSITIVE) == 0)
- return gtk_text_iter_backward_search (iter, str, flags,
+ return gtk_text_iter_backward_search (iter, str, _source_flags_to_text_flags(flags),
match_start, match_end,
limit);
diff --git a/pidgin/plugins/vvconfig.c b/pidgin/plugins/vvconfig.c
--- a/pidgin/plugins/vvconfig.c
+++ b/pidgin/plugins/vvconfig.c
@@ -131,7 +131,10 @@ get_element_devices(const gchar *element
const gchar *name;
const gchar *device_name;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ /* GValueArray is in gstreamer-0.10 API */
device = g_value_array_get_nth(array, n);
+G_GNUC_END_IGNORE_DEPRECATIONS
g_object_set_property(G_OBJECT(element), "device", device);
if (gst_element_set_state(element, GST_STATE_READY)
!= GST_STATE_CHANGE_SUCCESS) {
More information about the Commits
mailing list