--- a/configure.ac Mon Dec 21 21:29:48 2015 -0600
+++ b/configure.ac Mon Dec 21 22:14:59 2015 -0600
@@ -517,15 +517,9 @@
AC_ARG_ENABLE(gtkui, [AS_HELP_STRING([--disable-gtkui],
[compile without GTK+ user interface])],
enable_gtkui="$enableval", enable_gtkui="yes")
-AC_ARG_WITH(gtk, [AS_HELP_STRING([--with-gtk=<version>],
- [compile with GTK+ 2 or 3 user interface (default: auto)])],
- with_gtk="$withval", with_gtk="auto")
AC_ARG_ENABLE(consoleui, [AS_HELP_STRING([--disable-consoleui],
[compile without console user interface])],
[enable_consoleui=$enableval force_finch=$enableval], [enable_consoleui=yes force_finch=no])
-AC_ARG_ENABLE(gstreamer,
- [AS_HELP_STRING([--disable-gstreamer], [compile without GStreamer audio support])],
- enable_gst="$enableval", enable_gst="yes")
dnl #######################################################################
dnl # Check for GTK+ 2.18 and other things used by the GTK UI
@@ -578,45 +572,22 @@
x_incpath_add="-I$x_includes"
+dnl ####################################################################### +dnl Check Pidgin dependencies +dnl ####################################################################### if test "x$enable_gtkui" = "xyes" ; then
- if test "x$with_gtk" = "x3"; then
- PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= 3.0.0], , [
+ PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= 3.0.0], , [ You must have GTK+ 3.0.0 or newer development headers installed to compile
Pidgin. If you want to build only Finch then specify --disable-gtkui when
- elif test "x$with_gtk" = "x2"; then
- PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.18.0], , [
-You must have GTK+ 2.18.0 or newer development headers installed to compile
-Pidgin. If you want to build only Finch then specify --disable-gtkui when
- elif test "x$with_gtk" = "xauto"; then
- if test "x$enable_gst" != "xno"; then
- gst10_pkg="gstreamer-1.0"
- gst010_pkg="gstreamer-0.10"
- PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= 3.0.0 $gst10_pkg], [with_gtk=3], [
- PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.18.0 $gst010_pkg], [with_gtk=2], [
-You must have GTK+ 2.18.0 or newer and GStreamer development headers installed to compile
-Pidgin. If you want to build only Finch then specify --disable-gtkui when
-running configure. Use --disable-gstreamer if you do not need GStreamer (sound) support.
- AC_MSG_ERROR([--with-gtk must specify one of 2, 3 or auto.])
- GTK_PC_MODULE="gtk+-${with_gtk}.0"
- GTK_VERSION=${with_gtk}
+ GTK_PC_MODULE="gtk+-3.0" @@ -625,25 +596,14 @@
AC_DEFINE(HAVE_PANGO14, 1, [Define if we have Pango 1.4 or newer.]),:)
- if test "x$with_gtk" = "x3"; then
- WEBKIT_PC_MODULE="webkitgtk-3.0"
- PKG_CHECK_MODULES(WEBKIT, [$WEBKIT_PC_MODULE >= $WEBKIT_VERSION], , [
+ WEBKIT_PC_MODULE="webkitgtk-3.0" + PKG_CHECK_MODULES(WEBKIT, [$WEBKIT_PC_MODULE >= $WEBKIT_VERSION], , [ You must have WebKit for GTK+3 $WEBKIT_VERSION or newer development headers
installed to compile Pidgin. If you want to build only Finch then specify
--disable-gtkui when running configure.
- WEBKIT_PC_MODULE="webkit-1.0"
- PKG_CHECK_MODULES(WEBKIT, [$WEBKIT_PC_MODULE >= $WEBKIT_VERSION], , [
-You must have WebKit for GTK+2 $WEBKIT_VERSION or newer development headers
-installed to compile Pidgin. If you want to build only Finch then specify
---disable-gtkui when running configure.
AC_SUBST(WEBKIT_PC_MODULE)
@@ -822,29 +782,16 @@
dnl # Check for GCR for its certificate widgets
dnl #######################################################################
if test "x$enable_gcr" = "xyes"; then
- if test "x$with_gtk" = "x3"; then
- PKG_CHECK_MODULES(GCR, gcr-3, [
- AC_DEFINE(ENABLE_GCR, 1, [Define to 1 if GCR is found.])], [
- if test "x$force_deps" = "xyes" ; then
+ PKG_CHECK_MODULES(GCR, gcr-3, [ + AC_DEFINE(ENABLE_GCR, 1, [Define to 1 if GCR is found.])], [ + if test "x$force_deps" = "xyes" ; then GCR for GTK+3 development headers not found.
Use --disable-gcr if you do not need GCR certificate widgets.
- PKG_CHECK_MODULES(GCR, gcr-0, [
- AC_DEFINE(ENABLE_GCR, 1, [Define to 1 if GCR is found.])], [
- if test "x$force_deps" = "xyes" ; then
-GCR for GTK+2 development headers not found.
-Use --disable-gcr if you do not need GCR certificate widgets.
@@ -1011,93 +958,32 @@
dnl #######################################################################
dnl # Check for GStreamer
dnl #######################################################################
+AC_ARG_ENABLE(gstreamer, + [AS_HELP_STRING([--disable-gstreamer], [compile without GStreamer audio support])], + enable_gst="$enableval", enable_gst="yes") -dnl AC_ARG_ENABLE is declared near GTK2/3 configuration
-AC_ARG_WITH(gstreamer, [AS_HELP_STRING([--with-gstreamer=<version>],
- [compile with GStreamer 0.10 or 1.0 interface (default: auto)])],
- with_gstreamer="$withval", with_gstreamer="auto")
-if test "x$enable_gst" != "xno"; then
- if test "x$with_gstreamer" == "xauto" -a "x$with_gtk" = "x3"; then
- elif test "x$with_gstreamer" == "xauto" -a "x$with_gtk" = "x2"; then
- if test "x$with_gstreamer" == "xauto"; then
- PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0], [
- AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds])
- AC_SUBST(GSTREAMER_CFLAGS)
- AC_SUBST(GSTREAMER_LIBS)
- dnl Check whether forking stuff is required for this version.
- PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10], [
- AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds])
- AC_SUBST(GSTREAMER_CFLAGS)
- AC_SUBST(GSTREAMER_LIBS)
- if test "x$force_deps" = "xyes" ; then
-GStreamer development headers not found.
-Use --disable-gstreamer if you do not need GStreamer (sound) support.
- elif test "x$with_gstreamer" == "x1.0"; then
- PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0], [
- AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer 1.0 for playing sounds])
- AC_SUBST(GSTREAMER_CFLAGS)
- AC_SUBST(GSTREAMER_LIBS)
- if test "x$force_deps" = "xyes" ; then
-GStreamer development headers not found.
-Use --disable-gstreamer if you do not need GStreamer (sound) support.
- elif test "x$with_gstreamer" == "x0.10"; then
- PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10], [
- AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer 0.10 for playing sounds])
- AC_SUBST(GSTREAMER_CFLAGS)
- AC_SUBST(GSTREAMER_LIBS)
- if test "x$force_deps" = "xyes" ; then
-GStreamer development headers not found.
-Use --disable-gstreamer if you do not need GStreamer (sound) support.
- AC_MSG_ERROR([--with-gstreamer must specify one of 0.10, 1.0 or auto.])
-if test "x$with_gtk" == "x3" -a "x$with_gstreamer" == "x0.10"; then
- AC_MSG_ERROR([WebKitGTK+ 3.0 cannot be mixed with GStreamer 0.10.
-Please switch to WebKitGTK+ 2.0 or GStreamer 1.0.])
-elif test "x$with_gtk" == "x2" -a "x$with_gstreamer" == "x1.0"; then
- AC_MSG_ERROR([WebKitGTK+ 2.0 cannot be mixed with GStreamer 1.0.
-Please switch to WebKitGTK+ 3.0 or GStreamer 0.10.])
-if test "x$with_gstreamer" == "x0.10" -o "x$with_gstreamer" == "x1.0"; then
- AC_SUBST(GSTREAMER_VER, [$with_gstreamer])
- AC_SUBST(GSTREAMER_VER, "")
+if test x"$enable_gst" != "xno"; then + PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0], [ + AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds]) + AC_SUBST(GSTREAMER_CFLAGS) + AC_SUBST(GSTREAMER_LIBS) + if test "x$force_deps" = "xyes" ; then + GStreamer development headers not found. + Use --disable-gstreamer if you do not need GStreamer (sound) support. dnl #######################################################################
dnl # Check for GStreamer Video
dnl #######################################################################
-if test "x$enable_gst" != "xno" -a "x$with_gstreamer" == "x1.0"; then
+if test "x$enable_gst" != "xno"; then AC_ARG_ENABLE(gstreamer-video,
[AS_HELP_STRING([--disable-gstreamer-video], [compile without GStreamer 1.0 Video Overlay support])],
enable_gstvideo="$enableval", enable_gstvideo="yes")
@@ -1115,47 +1001,18 @@
dnl #######################################################################
-dnl # Check for GStreamer Interfaces
-dnl #######################################################################
-if test "x$enable_gst" != "xno" -a "x$with_gstreamer" == "x0.10"; then
- AC_ARG_ENABLE(gstreamer-interfaces,
- [AS_HELP_STRING([--disable-gstreamer-interfaces], [compile without GStreamer 0.10 interface support])],
- enable_gstinterfaces="$enableval", enable_gstinterfaces="yes")
- if test "x$enable_gstinterfaces" != "xno"; then
- PKG_CHECK_MODULES(GSTINTERFACES, [gstreamer-interfaces-0.10], [
- AC_DEFINE(USE_GSTINTERFACES, 1, [Use GStreamer 0.10 interfaces for X overlay support])
- AC_SUBST(GSTINTERFACES_CFLAGS)
- AC_SUBST(GSTINTERFACES_LIBS)
- enable_gstinterfaces="no"
- enable_gstinterfaces="no"
-dnl #######################################################################
dnl # Check for Farstream
dnl #######################################################################
[AS_HELP_STRING([--disable-farstream], [compile without farstream support])],
enable_farstream="$enableval", enable_farstream="yes")
if test "x$enable_farstream" != "xno"; then
- if test "x$with_gstreamer" == "x1.0"; then
- PKG_CHECK_MODULES(FARSTREAM, [farstream-0.2 >= 0.2.7], [
- AC_SUBST(FARSTREAM_CFLAGS)
- AC_SUBST(FARSTREAM_LIBS)
- PKG_CHECK_MODULES(FARSTREAM, [farstream-0.1], [
- AC_SUBST(FARSTREAM_CFLAGS)
- AC_SUBST(FARSTREAM_LIBS)
+ PKG_CHECK_MODULES(FARSTREAM, [farstream-0.2 >= 0.2.7], [ + AC_SUBST(FARSTREAM_CFLAGS) + AC_SUBST(FARSTREAM_LIBS) dnl #######################################################################
@@ -1165,9 +1022,7 @@
[AS_HELP_STRING([--disable-vv], [compile without voice and video support])],
enable_vv="$enableval", enable_vv="yes")
if test "x$enable_vv" != "xno"; then
- if test "x$enable_gst" != "xno" -a "x$with_gstreamer" == "x1.0" -a "x$enable_gstvideo" != "xno" -a "x$enable_farstream" != "xno"; then
- AC_DEFINE(USE_VV, 1, [Use voice and video])
- elif test "x$enable_gst" != "xno" -a "x$with_gstreamer" == "x0.10" -a "x$enable_gstinterfaces" != "xno" -a "x$enable_farstream" != "xno"; then
+ if test "x$enable_gst" != "xno" -a "x$enable_gstvideo" != "xno" -a "x$enable_farstream" != "xno"; then AC_DEFINE(USE_VV, 1, [Use voice and video])
@@ -1185,7 +1040,7 @@
dnl #######################################################################
dnl # Check for Raw data streams support in Farstream
dnl #######################################################################
-if test "x$enable_vv" != "xno" -a "x$with_gstreamer" == "x1.0"; then
+if test "x$enable_vv" != "xno"; then PKG_CHECK_MODULES(GSTAPP, [gstreamer-app-1.0], [
AC_DEFINE(USE_GSTAPP, 1, [Use GStreamer Video Overlay support])
@@ -1891,7 +1746,7 @@
if test "x$enable_plugins" = "xyes" ; then
PKG_CHECK_MODULES(GPLUGIN, [gplugin >= 0.0.17 gmodule-2.0], [
dnl # GPLUGIN_REQ sets pkg-config requirements in the .pc file
- if test "x$with_gtk" != "xno" ; then
+ if test "x$enable_gtkui" != "xno" ; then GPLUGIN_REQ=[", gplugin, gplugin-gtk"]
GPLUGIN_REQ=[", gplugin"]
@@ -2102,10 +1957,7 @@
if test "x$have_gnutls" = "xyes"; then
AC_DEFINE(HAVE_GNUTLS, 1, [Define if you have GnuTLS])
- AC_DEFINE(HAVE_SSL, 1, [Define if you have SSL])
@@ -2139,11 +1991,10 @@
if test "x$have_nss" = "xyes"; then
AC_DEFINE(HAVE_NSS, 1, [Define if you have Mozilla NSS])
- AC_DEFINE(HAVE_SSL, 1, [Define if you have SSL])
+ AC_MSG_ERROR([No SSL/TLS library available]) @@ -2470,9 +2321,6 @@
echo Build GTK+ UI................. : $enable_gtkui
-if test "x$enable_gtkui" = "xyes"; then
- echo Build for GTK+ version........ : $with_gtk
echo Build console UI.............. : $enable_consoleui
echo Build for X11................. : $with_x
--- a/finch/gntaccount.c Mon Dec 21 21:29:48 2015 -0600
+++ b/finch/gntaccount.c Mon Dec 21 22:14:59 2015 -0600
@@ -979,8 +979,7 @@
- if (data->alias != NULL)
--- a/finch/gntsound.c Mon Dec 21 21:29:48 2015 -0600
+++ b/finch/gntsound.c Mon Dec 21 22:14:59 2015 -0600
@@ -544,11 +544,7 @@
-#if GST_CHECK_VERSION(1,0,0)
play = gst_element_factory_make("playbin", "play");
- play = gst_element_factory_make("playbin2", "play");
--- a/libpurple/Makefile.am Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/Makefile.am Mon Dec 21 22:14:59 2015 -0600
@@ -263,7 +263,9 @@
marshallers.h: marshallers.list
$(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=purple_smarshal $(srcdir)/marshallers.list --header > marshallers.h
--- a/libpurple/ciphers/hmaccipher.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/ciphers/hmaccipher.c Mon Dec 21 22:14:59 2015 -0600
@@ -77,14 +77,10 @@
if(PURPLE_IS_HASH(priv->hash))
purple_hash_reset(priv->hash);
--- a/libpurple/example/Makefile.am Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/example/Makefile.am Mon Dec 21 22:14:59 2015 -0600
@@ -4,13 +4,13 @@
nullclient_DEPENDENCIES =
nullclient_LDFLAGS = -export-dynamic
+ $(top_builddir)/libpurple/libpurple.la \
- $(top_builddir)/libpurple/libpurple.la
--- a/libpurple/http.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/http.c Mon Dec 21 22:14:59 2015 -0600
@@ -751,8 +751,7 @@
req->http11 ? "1.1" : "1.0");
if (!purple_http_headers_get(hdrs, "host"))
g_string_append_printf(h, "Host: %s\r\n", url->host);
@@ -1474,13 +1473,6 @@
- if (is_ssl && !purple_ssl_is_supported()) {
- _purple_http_error(hc, _("Unable to connect to %s: %s"),
- url->host, _("Server requires TLS/SSL, "
- "but no TLS/SSL support was found."));
if (hc->request->keepalive_pool != NULL) {
hc->socket_request = purple_http_keepalive_pool_request(
hc->request->keepalive_pool, hc->gc, url->host,
@@ -1756,13 +1748,6 @@
"related to gc=%p (it shouldn't happen)\n", gc);
-gboolean purple_http_conn_is_cancelling(PurpleHttpConnection *http_conn)
- return http_conn->is_cancelling;
gboolean purple_http_conn_is_running(PurpleHttpConnection *http_conn)
--- a/libpurple/http.h Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/http.h Mon Dec 21 22:14:59 2015 -0600
@@ -222,16 +222,6 @@
void purple_http_conn_cancel_all(PurpleConnection *gc);
- * purple_http_conn_is_cancelling:
- * @http_conn: The HTTP connection (may be invalid pointer).
- * Checks, if provided HTTP request is cancelling.
- * Returns: TRUE, if provided connection is currently cancelling.
-gboolean purple_http_conn_is_cancelling(PurpleHttpConnection *http_conn);
* purple_http_conn_is_running:
* @http_conn: The HTTP connection (may be invalid pointer).
--- a/libpurple/media/backend-fs2.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/media/backend-fs2.c Mon Dec 21 22:14:59 2015 -0600
@@ -76,7 +76,6 @@
static GList *purple_media_backend_fs2_get_local_candidates(
PurpleMediaBackend *self,
const gchar *sess_id, const gchar *participant);
-#if GST_CHECK_VERSION(1,0,0)
static gboolean purple_media_backend_fs2_set_encryption_parameters (
PurpleMediaBackend *self, const gchar *sess_id, const gchar *cipher,
const gchar *auth, const gchar *key, gsize key_len);
@@ -84,7 +83,6 @@
PurpleMediaBackend *self, const gchar *sess_id,
const gchar *participant, const gchar *cipher,
const gchar *auth, const gchar *key, gsize key_len);
static gboolean purple_media_backend_fs2_set_remote_codecs(
PurpleMediaBackend *self,
const gchar *sess_id, const gchar *participant,
@@ -230,14 +228,12 @@
case PURPLE_MEDIA_NETWORK_PROTOCOL_UDP:
return FS_NETWORK_PROTOCOL_UDP;
-#if GST_CHECK_VERSION(1,0,0)
case PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_PASSIVE:
return FS_NETWORK_PROTOCOL_TCP_PASSIVE;
case PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_ACTIVE:
return FS_NETWORK_PROTOCOL_TCP_ACTIVE;
case PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_SO:
return FS_NETWORK_PROTOCOL_TCP_SO;
g_return_val_if_reached(FS_NETWORK_PROTOCOL_TCP);
@@ -249,30 +245,21 @@
case FS_NETWORK_PROTOCOL_UDP:
return PURPLE_MEDIA_NETWORK_PROTOCOL_UDP;
-#if GST_CHECK_VERSION(1,0,0)
case FS_NETWORK_PROTOCOL_TCP_PASSIVE:
return PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_PASSIVE;
case FS_NETWORK_PROTOCOL_TCP_ACTIVE:
return PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_ACTIVE;
case FS_NETWORK_PROTOCOL_TCP_SO:
return PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_SO;
g_return_val_if_reached(PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_PASSIVE);
-#if GST_CHECK_VERSION(1,0,0)
event_probe_cb(GstPad *srcpad, GstPadProbeInfo *info, gpointer unused)
-event_probe_cb(GstPad *srcpad, GstEvent *event, gboolean release_pad)
-#if GST_CHECK_VERSION(1,0,0)
GstEvent *event = GST_PAD_PROBE_INFO_EVENT(info);
if (GST_EVENT_TYPE(event) == GST_EVENT_CUSTOM_DOWNSTREAM
&& gst_event_has_name(event, "purple-unlink-tee")) {
@@ -280,40 +267,23 @@
gst_pad_unlink(srcpad, gst_pad_get_peer(srcpad));
-#if GST_CHECK_VERSION(1,0,0)
gst_pad_remove_probe(srcpad,
g_value_get_ulong(gst_structure_get_value(s, "handler-id")));
- gst_pad_remove_event_probe(srcpad,
- g_value_get_uint(gst_structure_get_value(s, "handler-id")));
if (g_value_get_boolean(gst_structure_get_value(s, "release-pad")))
gst_element_release_request_pad(GST_ELEMENT_PARENT(srcpad), srcpad);
-#if GST_CHECK_VERSION(1,0,0)
return GST_PAD_PROBE_DROP;
-#if GST_CHECK_VERSION(1,0,0)
unlink_teepad_dynamic(GstPad *srcpad, gboolean release_pad)
-#if GST_CHECK_VERSION(1,0,0)
gulong id = gst_pad_add_probe(srcpad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM,
event_probe_cb, NULL, NULL);
- guint id = gst_pad_add_event_probe(srcpad, G_CALLBACK(event_probe_cb), NULL);
if (GST_IS_GHOST_PAD(srcpad))
srcpad = gst_ghost_pad_get_target(GST_GHOST_PAD(srcpad));
@@ -322,11 +292,7 @@
gst_event_new_custom(GST_EVENT_CUSTOM_DOWNSTREAM,
gst_structure_new("purple-unlink-tee",
"release-pad", G_TYPE_BOOLEAN, release_pad,
-#if GST_CHECK_VERSION(1,0,0)
"handler-id", G_TYPE_ULONG, id,
- "handler-id", G_TYPE_UINT, id,
@@ -548,12 +514,10 @@
purple_media_backend_fs2_get_local_candidates;
iface->set_remote_codecs = purple_media_backend_fs2_set_remote_codecs;
iface->set_send_codec = purple_media_backend_fs2_set_send_codec;
-#if GST_CHECK_VERSION(1,0,0)
iface->set_encryption_parameters =
purple_media_backend_fs2_set_encryption_parameters;
iface->set_decryption_parameters =
purple_media_backend_fs2_set_decryption_parameters;
iface->set_params = purple_media_backend_fs2_set_params;
iface->get_available_params = purple_media_backend_fs2_get_available_params;
iface->send_dtmf = purple_media_backend_fs2_send_dtmf;
@@ -934,13 +898,9 @@
list = gst_structure_get_value(gst_message_get_structure(msg), value_name);
-#if GST_CHECK_VERSION(1,0,0)
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
value = g_value_array_get_nth(g_value_get_boxed(list), 0);
G_GNUC_END_IGNORE_DEPRECATIONS
- value = gst_value_list_get_value(list, 0);
value_db = g_value_get_double(value);
percent = pow(10, value_db / 20);
return (percent > 1.0) ? 1.0 : percent;
@@ -1670,11 +1630,7 @@
srcpad = gst_element_get_static_pad(session->srcvalve, "src");
g_object_set(volume, "volume", input_volume, NULL);
-#if GST_CHECK_VERSION(1,0,0)
srcpad = gst_element_get_request_pad(session->tee, "src_%u");
- srcpad = gst_element_get_request_pad(session->tee, "src%d");
purple_debug_info("backend-fs2", "connecting pad: %s\n",
@@ -1926,11 +1882,7 @@
gst_element_link(stream->queue, stream->volume);
} else if (codec->media_type == FS_MEDIA_TYPE_VIDEO) {
-#if GST_CHECK_VERSION(1,0,0)
stream->src = gst_element_factory_make("funnel", NULL);
- stream->src = gst_element_factory_make("fsfunnel", NULL);
sink = gst_element_factory_make("fakesink", NULL);
g_object_set(G_OBJECT(sink), "async", FALSE, NULL);
gst_bin_add(GST_BIN(priv->confbin), sink);
@@ -1938,11 +1890,7 @@
#ifdef HAVE_MEDIA_APPLICATION
} else if (codec->media_type == FS_MEDIA_TYPE_APPLICATION) {
-#if GST_CHECK_VERSION(1,0,0)
stream->src = gst_element_factory_make("funnel", NULL);
- stream->src = gst_element_factory_make("fsfunnel", NULL);
sink = purple_media_manager_get_element(
purple_media_get_manager(priv->media),
PURPLE_MEDIA_RECV_APPLICATION, priv->media,
@@ -1960,11 +1908,7 @@
gst_element_link_many(stream->src, stream->tee, sink, NULL);
-#if GST_CHECK_VERSION(1,0,0)
sinkpad = gst_element_get_request_pad(stream->src, "sink_%u");
- sinkpad = gst_element_get_request_pad(stream->src, "sink%d");
gst_pad_link(srcpad, sinkpad);
gst_object_unref(sinkpad);
@@ -2405,7 +2349,6 @@
-#if GST_CHECK_VERSION(1,0,0)
create_fs2_srtp_structure(const gchar *cipher, const gchar *auth,
const gchar *key, gsize key_len)
@@ -2494,7 +2437,6 @@
gst_structure_free(srtp);
purple_media_backend_fs2_set_send_codec(PurpleMediaBackend *self,
--- a/libpurple/mediamanager.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/mediamanager.c Mon Dec 21 22:14:59 2015 -0600
@@ -35,11 +35,7 @@
#include <media/backend-fs2.h>
#include <farstream/fs-element-added-notifier.h>
-#if GST_CHECK_VERSION(1,0,0)
#include <gst/video/videooverlay.h>
-#include <gst/interfaces/xoverlay.h>
#ifdef HAVE_MEDIA_APPLICATION
@@ -312,11 +308,7 @@
gst_bus_add_signal_watch(GST_BUS(bus));
g_signal_connect(G_OBJECT(bus), "message",
G_CALLBACK(pipeline_bus_call), manager);
-#if GST_CHECK_VERSION(1,0,0)
gst_bus_set_sync_handler(bus, gst_bus_sync_signal_handler, NULL, NULL);
- gst_bus_set_sync_handler(bus, gst_bus_sync_signal_handler, NULL);
filename = g_build_filename(purple_user_dir(),
@@ -626,9 +618,7 @@
GstElement *parent = GST_ELEMENT_PARENT(pad);
-#if GST_CHECK_VERSION(1,0,0)
GValue tmp = G_VALUE_INIT;
GstIteratorResult result;
@@ -636,21 +626,15 @@
iter = gst_element_iterate_src_pads(parent);
-#if GST_CHECK_VERSION(1,0,0)
result = gst_iterator_next(iter, &tmp);
- result = gst_iterator_next(iter, (gpointer)&remaining_pad);
if (result == GST_ITERATOR_DONE) {
gst_element_set_locked_state(parent, TRUE);
gst_element_set_state(parent, GST_STATE_NULL);
gst_bin_remove(GST_BIN(GST_ELEMENT_PARENT(parent)), parent);
} else if (result == GST_ITERATOR_OK) {
-#if GST_CHECK_VERSION(1,0,0)
remaining_pad = g_value_get_object(&tmp);
gst_object_unref(remaining_pad);
@@ -702,11 +686,7 @@
if (manager->priv->video_caps == NULL)
-#if GST_CHECK_VERSION(1,0,0)
manager->priv->video_caps = gst_caps_from_string("video/x-raw,"
- manager->priv->video_caps = gst_caps_from_string("video/x-raw-yuv,"
"width=[250,352], height=[200,288], framerate=[1/1,20/1]");
return manager->priv->video_caps;
@@ -1159,11 +1139,7 @@
tee = gst_bin_get_by_name(GST_BIN(ret), "tee");
-#if GST_CHECK_VERSION(1,0,0)
pad = gst_element_get_request_pad(tee, "src_%u");
- pad = gst_element_get_request_pad(tee, "src%d");
ghost = gst_ghost_pad_new(NULL, pad);
@@ -1369,11 +1345,7 @@
if (GST_MESSAGE_TYPE(msg) != GST_MESSAGE_ELEMENT
-#if GST_CHECK_VERSION(1,0,0)
|| !gst_is_video_overlay_prepare_window_handle_message(msg))
- || !gst_structure_has_name(msg->structure, "prepare-xwindow-id"))
sink = GST_ELEMENT(GST_MESSAGE_SRC(msg));
@@ -1387,16 +1359,8 @@
| G_SIGNAL_MATCH_DATA, 0, 0, NULL,
-#if GST_CHECK_VERSION(1,0,0)
gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(GST_MESSAGE_SRC(msg)),
-#elif GST_CHECK_VERSION(0,10,31)
- gst_x_overlay_set_window_handle(GST_X_OVERLAY(GST_MESSAGE_SRC(msg)),
- gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(GST_MESSAGE_SRC(msg)),
@@ -1429,11 +1393,7 @@
queue = gst_element_factory_make("queue", NULL);
-#if GST_CHECK_VERSION(1,0,0)
convert = gst_element_factory_make("videoconvert", NULL);
- convert = gst_element_factory_make("ffmpegcolorspace", NULL);
ow->sink = purple_media_manager_get_element(
manager, PURPLE_MEDIA_RECV_VIDEO,
ow->media, ow->session_id,
--- a/libpurple/network.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/network.c Mon Dec 21 22:14:59 2015 -0600
@@ -1014,7 +1014,7 @@
purple_debug_info("network",
"network is unavailable, don't try to update STUN IP");
@@ -1034,7 +1034,7 @@
purple_debug_info("network",
"network is unavailable, don't try to update TURN IP");
@@ -1304,8 +1304,7 @@
purple_signal_unregister(purple_network_get_handle(),
"network-configuration-changed");
g_hash_table_destroy(upnp_port_mappings);
g_hash_table_destroy(nat_pmp_port_mappings);
--- a/libpurple/plugins/perl/common/SSLConn.xs Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/plugins/perl/common/SSLConn.xs Mon Dec 21 22:14:59 2015 -0600
@@ -28,9 +28,6 @@
-purple_ssl_is_supported()
purple_ssl_read(gsc, buffer, len)
Purple::Ssl::Connection gsc
--- a/libpurple/plugins/ssl/ssl-nss.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/plugins/ssl/ssl-nss.c Mon Dec 21 22:14:59 2015 -0600
@@ -682,8 +682,7 @@
purple_debug_error("nss/x509",
"Certificate file has no contents!\n");
@@ -731,8 +730,7 @@
purple_debug_error("nss/x509",
"Certificate file has no contents!\n");
--- a/libpurple/protocols/bonjour/bonjour.h Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/bonjour/bonjour.h Mon Dec 21 22:14:59 2015 -0600
@@ -26,6 +26,8 @@
--- a/libpurple/protocols/facebook/Makefile.mingw Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/facebook/Makefile.mingw Mon Dec 21 22:14:59 2015 -0600
@@ -59,6 +59,7 @@
--- a/libpurple/protocols/facebook/api.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/facebook/api.c Mon Dec 21 22:14:59 2015 -0600
@@ -50,8 +50,9 @@
@@ -160,6 +161,7 @@
FbApiPrivate *priv = FB_API(obj)->priv;
+ fb_http_conns_cancel_all(priv->cons); g_hash_table_iter_init(&iter, priv->data);
while (g_hash_table_iter_next(&iter, NULL, (gpointer) &fata)) {
@@ -167,14 +169,11 @@
- if (G_LIKELY(priv->gc != NULL)) {
- purple_http_conn_cancel_all(priv->gc);
if (G_UNLIKELY(priv->mqtt != NULL)) {
g_object_unref(priv->mqtt);
+ fb_http_conns_free(priv->cons); g_hash_table_destroy(priv->data);
g_hash_table_destroy(priv->mids);
@@ -485,6 +484,7 @@
priv = G_TYPE_INSTANCE_GET_PRIVATE(api, FB_TYPE_API, FbApiPrivate);
+ priv->cons = fb_http_conns_new(); priv->data = g_hash_table_new_full(g_direct_hash, g_direct_equal,
priv->mids = g_hash_table_new_full(g_int64_hash, g_int64_equal,
@@ -646,19 +646,20 @@
+ FbApiPrivate *priv = api->priv; - if (G_UNLIKELY(purple_http_conn_is_cancelling(con))) {
- /* Ignore canceling HTTP requests */
+ if (fb_http_conns_is_canceled(priv->cons)) { msg = purple_http_response_get_error(res);
code = purple_http_response_get_code(res);
data = purple_http_response_get_data(res, &size);
+ fb_http_conns_remove(priv->cons, con); emsg = g_strdup_printf("%s (%d)", msg, code);
@@ -717,7 +718,7 @@
fb_http_params_set_str(params, "format", "json");
fb_http_params_set_str(params, "method", method);
- val = fb_util_locale_str();
+ val = fb_util_get_locale(); fb_http_params_set_str(params, "locale", val);
@@ -755,6 +756,7 @@
data = fb_http_params_close(params, NULL);
purple_http_request_set_contents(req, data, -1);
ret = purple_http_request(priv->gc, req, callback, api);
+ fb_http_conns_add(priv->cons, ret); purple_http_request_unref(req);
fb_util_debug(FB_UTIL_DEBUG_INFO, "HTTP Request (%p):", ret);
@@ -919,7 +921,7 @@
fb_thrift_write_stop(thft);
bytes = fb_thrift_get_bytes(thft);
- cytes = fb_util_zcompress(bytes, &err);
+ cytes = fb_util_zlib_deflate(bytes, &err); FB_API_ERROR_EMIT(api, err,
@@ -1619,10 +1621,10 @@
{"/t_p", fb_api_cb_publish_p}
- comp = fb_util_zcompressed(pload);
+ comp = fb_util_zlib_test(pload); - bytes = fb_util_zuncompress(pload, &err);
+ bytes = fb_util_zlib_inflate(pload, &err); FB_API_ERROR_EMIT(api, err, return);
bytes = (GByteArray*) pload;
@@ -1685,7 +1687,7 @@
- priv->cid = fb_util_randstr(32);
+ priv->cid = fb_util_rand_alnum(32); @@ -1954,6 +1956,8 @@
fb_json_values_add(values, FB_JSON_TYPE_STR, TRUE,
fb_json_values_add(values, FB_JSON_TYPE_STR, TRUE,
+ "$.represented_profile.friendship_status"); + fb_json_values_add(values, FB_JSON_TYPE_STR, TRUE, "$.represented_profile.id");
fb_json_values_add(values, FB_JSON_TYPE_STR, TRUE,
"$.structured_name.text");
@@ -1965,6 +1969,12 @@
while (fb_json_values_update(values, &err)) {
writeid = fb_json_values_next_str_dup(values, NULL);
+ str = fb_json_values_next_str(values, NULL); + if (!purple_strequal(str, "ARE_FRIENDS")) { user = fb_api_user_dup(NULL, FALSE);
str = fb_json_values_next_str(values, "0");
@@ -2127,7 +2137,7 @@
bytes = g_byte_array_new_take((guint8*) msg, strlen(msg));
- cytes = fb_util_zcompress(bytes, &err);
+ cytes = fb_util_zlib_deflate(bytes, &err); FB_API_ERROR_EMIT(api, err,
g_byte_array_free(bytes, TRUE);
--- a/libpurple/protocols/facebook/data.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/facebook/data.c Mon Dec 21 22:14:59 2015 -0600
@@ -30,6 +30,7 @@
PurpleRoomlist *roomlist;
@@ -67,6 +68,7 @@
+ fb_http_conns_cancel_all(priv->cons); g_hash_table_iter_init(&iter, priv->evs);
while (g_hash_table_iter_next(&iter, NULL, &ptr)) {
@@ -77,6 +79,7 @@
g_object_unref(priv->api);
+ fb_http_conns_free(priv->cons); g_queue_free_full(priv->msgs, (GDestroyNotify) fb_api_message_free);
g_hash_table_destroy(priv->imgs);
@@ -101,7 +104,9 @@
priv = G_TYPE_INSTANCE_GET_PRIVATE(fata, FB_TYPE_DATA, FbDataPrivate);
+ priv->cons = fb_http_conns_new(); priv->msgs = g_queue_new();
priv->imgs = g_hash_table_new_full(g_direct_hash, g_direct_equal,
priv->unread = g_hash_table_new_full(fb_id_hash, fb_id_equal,
@@ -528,22 +533,25 @@
FbDataImagePrivate *priv = img->priv;
+ FbDataPrivate *driv = priv->fata->priv; - if (G_UNLIKELY(purple_http_conn_is_cancelling(con))) {
- /* Ignore canceling HTTP requests */
+ if (fb_http_conns_is_canceled(driv->cons)) { + fb_http_conns_remove(driv->cons, con); fb_http_error_chk(res, &err);
priv->image = (guint8*) purple_http_response_get_data(res, &priv->size);
- if (G_UNLIKELY(err != NULL)) {
+ if (G_LIKELY(err == NULL)) { + fb_data_image_queue(priv->fata); - fb_data_image_queue(priv->fata);
@@ -555,6 +563,7 @@
+ PurpleHttpConnection *con; g_return_if_fail(FB_IS_DATA(fata));
@@ -579,7 +588,8 @@
img->priv->active = TRUE;
url = fb_data_image_get_url(img);
- purple_http_get(priv->gc, fb_data_image_cb, img, url);
+ con = purple_http_get(priv->gc, fb_data_image_cb, img, url); + fb_http_conns_add(priv->cons, con); if (++active >= FB_DATA_ICON_MAX) {
--- a/libpurple/protocols/facebook/facebook.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/facebook/facebook.c Mon Dec 21 22:14:59 2015 -0600
@@ -854,13 +854,6 @@
gc = purple_account_get_connection(acct);
- if (!purple_ssl_is_supported()) {
- purple_connection_error(gc,
- PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT,
- _("SSL support unavailable"));
api = fb_data_get_api(fata);
convh = purple_conversations_get_handle();
--- a/libpurple/protocols/facebook/facebook.h Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/facebook/facebook.h Mon Dec 21 22:14:59 2015 -0600
@@ -32,6 +32,7 @@
#define FACEBOOK_TYPE_PROTOCOL (facebook_protocol_get_type())
#define FACEBOOK_PROTOCOL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), FACEBOOK_TYPE_PROTOCOL, FacebookProtocol))
--- a/libpurple/protocols/facebook/http.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/facebook/http.c Mon Dec 21 22:14:59 2015 -0600
@@ -25,6 +25,12 @@
fb_http_error_quark(void)
@@ -37,6 +43,74 @@
+ cons = g_new0(FbHttpConns, 1); + cons->cons = g_hash_table_new(g_direct_hash, g_direct_equal); +fb_http_conns_free(FbHttpConns *cons) + g_return_if_fail(cons != NULL); + g_hash_table_destroy(cons->cons); +fb_http_conns_cancel_all(FbHttpConns *cons) + g_return_if_fail(cons != NULL); + g_return_if_fail(!cons->canceled); + g_hash_table_iter_init(&iter, cons->cons); + while (g_hash_table_iter_next(&iter, &con, NULL)) { + g_hash_table_iter_remove(&iter); + purple_http_conn_cancel(con); +fb_http_conns_is_canceled(FbHttpConns *cons) + g_return_val_if_fail(cons != NULL, TRUE); +fb_http_conns_add(FbHttpConns *cons, PurpleHttpConnection *con) + g_return_if_fail(cons != NULL); + g_return_if_fail(!cons->canceled); + g_hash_table_replace(cons->cons, con, con); +fb_http_conns_remove(FbHttpConns *cons, PurpleHttpConnection *con) + g_return_if_fail(cons != NULL); + g_return_if_fail(!cons->canceled); + g_hash_table_remove(cons->cons, con); +fb_http_conns_reset(FbHttpConns *cons) + g_return_if_fail(cons != NULL); + cons->canceled = FALSE; + g_hash_table_remove_all(cons->cons); fb_http_error_chk(PurpleHttpResponse *res, GError **error)
--- a/libpurple/protocols/facebook/http.h Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/facebook/http.h Mon Dec 21 22:14:59 2015 -0600
@@ -43,6 +43,13 @@
#define FB_HTTP_ERROR fb_http_error_quark()
+ * Represents a set of #PurpleHttpConnection. +typedef struct _FbHttpConns FbHttpConns; * Represents a set of key/value HTTP parameters.
@@ -73,9 +80,81 @@
fb_http_error_quark(void);
+ * Creates a new #FbHttpConns. The returned #FbHttpConns should be + * freed with #fb_http_conns_free() when no longer needed. + * Returns: The new #FbHttpConns. +fb_http_conns_new(void); + * @cons: The #FbHttpConns. + * Frees all memory used by the #FbHttpConns. This will *not* cancel + * the any of the added #PurpleHttpConnection. +fb_http_conns_free(FbHttpConns *cons); + * fb_http_conns_cancel_all: + * @cons: The #FbHttpConns. + * Cancels each #PurpleHttpConnection in the #FbHttpConns. +fb_http_conns_cancel_all(FbHttpConns *cons); + * fb_http_conns_is_canceled: + * @cons: The #FbHttpConns. + * Determines if the #FbHttpConns has been canceled. + * Returns: #TRUE if it has been canceled, otherwise #FALSE. +fb_http_conns_is_canceled(FbHttpConns *cons); + * @cons: The #FbHttpConns. + * @con: The #PurpleHttpConnection. + * Adds a #PurpleHttpConnection to the #FbHttpConns. +fb_http_conns_add(FbHttpConns *cons, PurpleHttpConnection *con); + * fb_http_conns_remove: + * @cons: The #FbHttpConns. + * @con: The #PurpleHttpConnection. + * Removes a #PurpleHttpConnection from the #FbHttpConns. +fb_http_conns_remove(FbHttpConns *cons, PurpleHttpConnection *con); + * @cons: The #FbHttpConns. + * Resets the #FbHttpConns. This removes each #PurpleHttpConnection + * from the #FbHttpConns *without* canceling it. This allows the the + * #FbHttpConns to be reused. +fb_http_conns_reset(FbHttpConns *cons); * @res: The #PurpleHttpResponse.
- * @error: The return location for the #GError, or #NULL.
+ * @error: The return location for the #GError or #NULL. * Checks a #PurpleHttpResponse for success. This optionally assigns an
* appropriate #GError upon failure.
@@ -142,7 +221,7 @@
* fb_http_params_get_bool:
* @params: The #FbHttpParams.
* @name: The parameter name.
- * @error: The return location for the #GError, or #NULL.
+ * @error: The return location for the #GError or #NULL. * Gets a boolean value from the #FbHttpParams. This optionally assigns
* an appropriate #GError upon failure.
@@ -157,7 +236,7 @@
* fb_http_params_get_dbl:
* @params: The #FbHttpParams.
* @name: The parameter name.
- * @error: The return location for the #GError, or #NULL.
+ * @error: The return location for the #GError or #NULL. * Gets a floating point value from the #FbHttpParams. This optionally
* assigns an appropriate #GError upon failure.
@@ -172,7 +251,7 @@
* fb_http_params_get_int:
* @params: The #FbHttpParams.
* @name: The parameter name.
- * @error: The return location for the #GError, or #NULL.
+ * @error: The return location for the #GError or #NULL. * Gets an integer value from the #FbHttpParams. This optionally
* assigns an appropriate #GError upon failure.
@@ -187,7 +266,7 @@
* fb_http_params_get_str:
* @params: The #FbHttpParams.
* @name: The parameter name.
- * @error: The return location for the #GError, or #NULL.
+ * @error: The return location for the #GError or #NULL. * Gets a string value from the #FbHttpParams. This optionally assigns
* an appropriate #GError upon failure.
@@ -202,7 +281,7 @@
* fb_http_params_dup_str:
* @params: The #FbHttpParams.
* @name: The parameter name.
- * @error: The return location for the #GError, or #NULL.
+ * @error: The return location for the #GError or #NULL. * Gets a duplicated string value from the #FbHttpParams. This
* optionally assigns an appropriate #GError upon failure. The returned
--- a/libpurple/protocols/facebook/id.h Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/facebook/id.h Mon Dec 21 22:14:59 2015 -0600
@@ -93,7 +93,7 @@
* Return: #TRUE if the string is an #FbId, otherwise #FALSE.
-#define FB_ID_IS_STR(s) fb_util_str_is(s, G_ASCII_DIGIT)
+#define FB_ID_IS_STR(s) fb_util_strtest(s, G_ASCII_DIGIT) --- a/libpurple/protocols/facebook/json.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/facebook/json.c Mon Dec 21 22:14:59 2015 -0600
@@ -258,13 +258,23 @@
fb_json_node_new(const gchar *data, gssize size, GError **error)
+ g_return_val_if_fail(data != NULL, NULL); + /* Ensure data is null terminated for json-glib < 1.0.2 */ + slice = g_strndup(data, size); prsr = json_parser_new();
- if (!json_parser_load_from_data(prsr, data, size, error)) {
+ if (!json_parser_load_from_data(prsr, slice, size, error)) { @@ -272,6 +282,7 @@
root = json_node_copy(root);
@@ -284,6 +295,11 @@
+ /* Special case for json-glib < 0.99.2 */ + if (purple_strequal(expr, "$")) { + return json_node_copy(root); node = json_path_query(expr, root, &err);
--- a/libpurple/protocols/facebook/json.h Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/facebook/json.h Mon Dec 21 22:14:59 2015 -0600
@@ -167,7 +167,7 @@
* fb_json_bldr_arr_begin:
* @bldr: The #JsonBuilder.
- * @name: The member name, or #NULL.
+ * @name: The member name or #NULL. * Begins an array member in the #JsonBuilder.
@@ -186,7 +186,7 @@
* fb_json_bldr_obj_begin:
* @bldr: The #JsonBuilder.
- * @name: The member name, or #NULL.
+ * @name: The member name or #NULL. * Begins an object member in the #JsonBuilder.
@@ -205,7 +205,7 @@
* @bldr: The #JsonBuilder.
- * @name: The member name, or #NULL.
+ * @name: The member name or #NULL. * Adds a boolean memeber to the #JsonBuilder.
@@ -216,7 +216,7 @@
* @bldr: The #JsonBuilder.
- * @name: The member name, or #NULL.
+ * @name: The member name or #NULL. * Adds a floating point memeber to the #JsonBuilder.
@@ -227,7 +227,7 @@
* @bldr: The #JsonBuilder.
- * @name: The member name, or #NULL.
+ * @name: The member name or #NULL. * Adds a integer memeber to the #JsonBuilder.
@@ -238,7 +238,7 @@
* @bldr: The #JsonBuilder.
- * @name: The member name, or #NULL.
+ * @name: The member name or #NULL. * Adds a string memeber to the #JsonBuilder.
@@ -249,7 +249,7 @@
* @bldr: The #JsonBuilder.
- * @name: The member name, or #NULL.
+ * @name: The member name or #NULL. * @format: The format string literal.
* @...: The arguments for @format.
@@ -263,8 +263,8 @@
* @data: The string JSON.
- * @size: The size of @json, or -1 if null-terminated.
- * @error: The return location for the #GError, or #NULL.
+ * @size: The size of @json or -1 if null-terminated. + * @error: The return location for the #GError or #NULL. * Creates a new #JsonNode. The returned #JsonBuilder should be freed
* wuth #json_node_free() when no longer needed.
@@ -278,7 +278,7 @@
* @root: The root #JsonNode.
* @expr: The #JsonPath expression.
- * @error: The return location for the #GError, or #NULL.
+ * @error: The return location for the #GError or #NULL. * Gets a new #JsonNode value from a parent #JsonNode with a #JsonPath
* expression. The returned #JsonNode should be freed with
@@ -306,7 +306,7 @@
* @root: The root #JsonNode.
* @expr: The #JsonPath expression.
- * @error: The return location for the #GError, or #NULL.
+ * @error: The return location for the #GError or #NULL. * Gets a new #JsonArray value from a parent #JsonNode with a #JsonPath
* expression. The returned #JsonArray should be freed with
@@ -321,7 +321,7 @@
* @root: The root #JsonNode.
* @expr: The #JsonPath expression.
- * @error: The return location for the #GError, or #NULL.
+ * @error: The return location for the #GError or #NULL. * Gets a boolean value from a parent #JsonNode with a #JsonPath
@@ -335,7 +335,7 @@
* @root: The root #JsonNode.
* @expr: The #JsonPath expression.
- * @error: The return location for the #GError, or #NULL.
+ * @error: The return location for the #GError or #NULL. * Gets a floating point value from a parent #JsonNode with a #JsonPath
@@ -349,7 +349,7 @@
* @root: The root #JsonNode.
* @expr: The #JsonPath expression.
- * @error: The return location for the #GError, or #NULL.
+ * @error: The return location for the #GError or #NULL. * Gets an integer value from a parent #JsonNode with a #JsonPath
@@ -363,7 +363,7 @@
* @root: The root #JsonNode.
* @expr: The #JsonPath expression.
- * @error: The return location for the #GError, or #NULL.
+ * @error: The return location for the #GError or #NULL. * Gets an string value from a parent #JsonNode with a #JsonPath
* expression. The returned string should be freed with #g_free()
@@ -404,8 +404,8 @@
* @values: The #FbJsonValues.
* Gets the current working root #JsonNode. This is either the current
- * array #JsonNode, or the root #JsonNode. The returned #JsonNode
+ * array #JsonNode or the root #JsonNode. The returned #JsonNode should fb_json_values_get_root(FbJsonValues *values);
@@ -425,7 +425,7 @@
* @values: The #FbJsonValues.
- * @error: The return location for the #GError, or #NULL.
+ * @error: The return location for the #GError or #NULL. * Updates the current working root. This should be called after all of
* the #FbJsonValue's have been added with #fb_json_values_add(). If an
--- a/libpurple/protocols/facebook/mqtt.h Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/facebook/mqtt.h Mon Dec 21 22:14:59 2015 -0600
@@ -521,7 +521,7 @@
* fb_mqtt_message_read_byte:
* @msg: The #FbMqttMessage.
- * @value: The return location for the value, or #NULL.
+ * @value: The return location for the value or #NULL. * Reads an 8-bit integer value from the #FbMqttMessage. If @value is
* #NULL, this will simply advance the cursor position.
@@ -534,7 +534,7 @@
* fb_mqtt_message_read_mid:
* @msg: The #FbMqttMessage.
- * @value: The return location for the value, or #NULL.
+ * @value: The return location for the value or #NULL. * Reads a message identifier from the #FbMqttMessage. If @value is
* #NULL, this will simply advance the cursor position.
@@ -547,7 +547,7 @@
* fb_mqtt_message_read_u16:
* @msg: The #FbMqttMessage.
- * @value: The return location for the value, or #NULL.
+ * @value: The return location for the value or #NULL. * Reads a 16-bit integer value from the #FbMqttMessage. If @value is
* #NULL, this will simply advance the cursor position.
@@ -560,7 +560,7 @@
* fb_mqtt_message_read_str:
* @msg: The #FbMqttMessage.
- * @value: The return location for the value, or #NULL.
+ * @value: The return location for the value or #NULL. * Reads a string value from the #FbMqttMessage. The value returned to
* @value should be freed with #g_free() when no longer needed. If
--- a/libpurple/protocols/facebook/thrift.h Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/facebook/thrift.h Mon Dec 21 22:14:59 2015 -0600
@@ -193,7 +193,7 @@
- * @value: The return location for the value, or #NULL.
+ * @value: The return location for the value or #NULL. * Reads a boolean value from the #FbThrift. If @value is #NULL, this
* will simply advance the cursor position.
@@ -206,7 +206,7 @@
- * @value: The return location for the value, or #NULL.
+ * @value: The return location for the value or #NULL. * Reads an 8-bit integer value from the #FbThrift. If @value is #NULL,
* this will simply advance the cursor position.
@@ -219,7 +219,7 @@
- * @value: The return location for the value, or #NULL.
+ * @value: The return location for the value or #NULL. * Reads a 64-bit floating point value from the #FbThrift. If @value
* is #NULL, this will simply advance the cursor position.
@@ -232,7 +232,7 @@
- * @value: The return location for the value, or #NULL.
+ * @value: The return location for the value or #NULL. * Reads a signed 16-bit integer value from the #FbThrift. This will
* convert the integer from the zig-zag format. If @value is #NULL,
@@ -246,7 +246,7 @@
- * @value: The return location for the value, or #NULL.
+ * @value: The return location for the value or #NULL. * Reads a 16-bit integer value from the #FbThrift. This reads the raw
* integer value without converting it from the zig-zag format. If
@@ -260,7 +260,7 @@
- * @value: The return location for the value, or #NULL.
+ * @value: The return location for the value or #NULL. * Reads a signed 32-bit integer value from the #FbThrift. This will
* convert the integer from the zig-zag format. If @value is #NULL,
@@ -274,7 +274,7 @@
- * @value: The return location for the value, or #NULL.
+ * @value: The return location for the value or #NULL. * Reads a 32-bit integer value from the #FbThrift. This reads the raw
* integer value without converting it from the zig-zag format. If
@@ -288,7 +288,7 @@
- * @value: The return location for the value, or #NULL.
+ * @value: The return location for the value or #NULL. * Reads a signed 64-bit integer value from the #FbThrift. This will
* convert the integer from the zig-zag format. If @value is #NULL,
@@ -302,7 +302,7 @@
- * @value: The return location for the value, or #NULL.
+ * @value: The return location for the value or #NULL. * Reads a 64-bit integer value from the #FbThrift. This reads the raw
* integer value without converting it from the zig-zag format. If
@@ -316,7 +316,7 @@
- * @value: The return location for the value, or #NULL.
+ * @value: The return location for the value or #NULL. * Reads a string value from the #FbThrift. The value returned to
* @value should be freed with #g_free() when no longer needed. If
@@ -331,7 +331,7 @@
* @type: The return location for the #FbThriftType.
- * @id: The return location for the identifier, or #NULL.
+ * @id: The return location for the identifier or #NULL. * Reads a field header from the #FbThrift.
--- a/libpurple/protocols/facebook/util.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/facebook/util.c Mon Dec 21 22:14:59 2015 -0600
@@ -244,7 +244,7 @@
-fb_util_locale_str(void)
+fb_util_get_locale(void) const gchar * const *langs;
@@ -272,7 +272,7 @@
-fb_util_randstr(gsize size)
+fb_util_rand_alnum(guint len) @@ -285,19 +285,16 @@
static const gsize charc = G_N_ELEMENTS(chars) - 1;
- if (G_UNLIKELY(size < 1)) {
+ g_return_val_if_fail(len > 0, NULL); + ret = g_new(gchar, len + 1);
- ret = g_new(gchar, size + 1);
- for (i = 0; i < size; i++) {
+ for (i = 0; i < len; i++) { j = g_rand_int_range(rand, 0, charc);
@@ -463,7 +460,7 @@
-fb_util_str_is(const gchar *str, GAsciiType type)
+fb_util_strtest(const gchar *str, GAsciiType type) @@ -484,7 +481,7 @@
-fb_util_zcompressed(const GByteArray *bytes)
+fb_util_zlib_test(const GByteArray *bytes) @@ -503,7 +500,7 @@
-fb_util_zconv(GConverter *conv, const GByteArray *bytes, GError **error)
+fb_util_zlib_conv(GConverter *conv, const GByteArray *bytes, GError **error) @@ -546,25 +543,25 @@
-fb_util_zcompress(const GByteArray *bytes, GError **error)
+fb_util_zlib_deflate(const GByteArray *bytes, GError **error) conv = g_zlib_compressor_new(G_ZLIB_COMPRESSOR_FORMAT_ZLIB, -1);
- ret = fb_util_zconv(G_CONVERTER(conv), bytes, error);
+ ret = fb_util_zlib_conv(G_CONVERTER(conv), bytes, error); -fb_util_zuncompress(const GByteArray *bytes, GError **error)
+fb_util_zlib_inflate(const GByteArray *bytes, GError **error) conv = g_zlib_decompressor_new(G_ZLIB_COMPRESSOR_FORMAT_ZLIB);
- ret = fb_util_zconv(G_CONVERTER(conv), bytes, error);
+ ret = fb_util_zlib_conv(G_CONVERTER(conv), bytes, error); --- a/libpurple/protocols/facebook/util.h Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/facebook/util.h Mon Dec 21 22:14:59 2015 -0600
@@ -110,7 +110,7 @@
* @acct: The #PurpleAccount.
* @chat: The #PurpleChatConversation.
* @name: The name of the buddy.
- * @error: The return location for the #GError, or #NULL.
+ * @error: The return location for the #GError or #NULL. * Finds a buddy by their name or alias.
@@ -216,7 +216,7 @@
* Gets the locale string (ex: en_US) from the system. The returned
* string should be freed with #g_free() when no longer needed.
@@ -224,19 +224,20 @@
* Returns: The locale string.
-fb_util_locale_str(void);
+fb_util_get_locale(void);
- * @size: The size of the string.
+ * @len: The length of the string. - * Gets a random alphanumeric string. The returned string should be
- * freed with #g_free() when no longer needed.
+ * Gets a random alphanumeric (A-Za-z0-9) string. This function should + * *not* be relied on for cryptographic operations. The returned string + * should be freed with #g_free() when no longer needed. - * Returns: The random string.
+ * Returns: The alphanumeric string. -fb_util_randstr(gsize size);
+fb_util_rand_alnum(guint len); @@ -244,7 +245,7 @@
* @title: The title of the message or #NULL.
* @primary: The main point of the message or #NULL.
* @secondary: The secondary information or #NULL.
- * @select: A #GSList of selected buddies, or #NULL.
+ * @select: A #GSList of selected buddies or #NULL. * @multi: #TRUE to for multiple buddy selections, otherwise #FALSE.
* @ok_cb: The callback for the `OK` button or #NULL.
* @cancel_cb: The callback for the `Cancel` button or #NULL.
@@ -295,52 +296,55 @@
* @type: The #GAsciiType.
- * Determines if @str abides to the #GAsciiType.
+ * Tests if the string only contains characters allowed by the + * #GAsciiType. More than one type can be specified by ORing the types - * Returns: #TRUE if the string abides to @type, otherwise #FALSE.
+ * Returns: #TRUE if the string only contains characters allowed by the + * #GAsciiType, otherwise #FALSE. -fb_util_str_is(const gchar *str, GAsciiType type);
+fb_util_strtest(const gchar *str, GAsciiType type);
* @bytes: The #GByteArray.
- * Determines if the #GByteArray is zlib compressed.
+ * Tests if the #GByteArray is zlib compressed. * Returns: #TRUE if the #GByteArray is compressed, otherwise #FALSE.
-fb_util_zcompressed(const GByteArray *bytes);
+fb_util_zlib_test(const GByteArray *bytes);
+ * fb_util_zlib_deflate: * @bytes: The #GByteArray.
- * @error: The return location for the #GError, or #NULL.
+ * @error: The return location for the #GError or #NULL. - * Compresses a #GByteArray with zlib. The returned #GByteArray should
- * be freed with #g_byte_array_free() when no longer needed.
+ * Deflates a #GByteArray with zlib. The returned #GByteArray should be + * freed with #g_byte_array_free() when no longer needed. - * Returns: The compressed #GByteArray.
+ * Returns: The deflated #GByteArray or #NULL on error. -fb_util_zcompress(const GByteArray *bytes, GError **error);
+fb_util_zlib_deflate(const GByteArray *bytes, GError **error);
+ * fb_util_zlib_inflate: * @bytes: The #GByteArray.
- * @error: The return location for the #GError, or #NULL.
+ * @error: The return location for the #GError or #NULL. - * Uncompresses a #GByteArray with zlib. The returned #GByteArray
- * should be freed with #g_byte_array_free() when no longer needed.
+ * Inflates a #GByteArray with zlib. The returned #GByteArray should be + * freed with #g_byte_array_free() when no longer needed. - * Returns: The uncompressed #GByteArray, or #NULL on error.
+ * Returns: The inflated #GByteArray or #NULL on error. -fb_util_zuncompress(const GByteArray *bytes, GError **error);
+fb_util_zlib_inflate(const GByteArray *bytes, GError **error); #endif /* _FACEBOOK_UTIL_H_ */
--- a/libpurple/protocols/gg/gg.h Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/gg/gg.h Mon Dec 21 22:14:59 2015 -0600
@@ -26,6 +26,7 @@
#define GGP_UIN_LEN_MAX 10
--- a/libpurple/protocols/gg/lib/http.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/gg/lib/http.c Mon Dec 21 22:14:59 2015 -0600
@@ -312,10 +312,8 @@
if (res == -1 && errno != EINTR && errno != EAGAIN) {
gg_debug(GG_DEBUG_MISC, "=> http, reading header failed (errno=%d)\n", errno);
gg_http_error(GG_ERROR_READING);
@@ -328,10 +326,8 @@
gg_debug(GG_DEBUG_MISC, "=> http, connection reset by peer\n");
gg_http_error(GG_ERROR_READING);
@@ -447,10 +443,8 @@
if (res == -1 && errno != EINTR && errno != EAGAIN) {
gg_debug(GG_DEBUG_MISC, "=> http, reading body failed (errno=%d)\n", errno);
gg_http_error(GG_ERROR_READING);
@@ -472,10 +466,8 @@
"connection closed while reading "
h->body_done, h->body_size);
gg_http_error(GG_ERROR_READING);
--- a/libpurple/protocols/gg/roster.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/gg/roster.c Mon Dec 21 22:14:59 2015 -0600
@@ -159,8 +159,7 @@
g_hash_table_destroy(content->group_ids);
if (content->group_names)
g_hash_table_destroy(content->group_names);
- if (content->bots_group_id)
- g_free(content->bots_group_id);
+ g_free(content->bots_group_id); --- a/libpurple/protocols/gg/tcpsocket.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/gg/tcpsocket.c Mon Dec 21 22:14:59 2015 -0600
@@ -113,8 +113,7 @@
ggp_tcpsocket_setup(PurpleConnection *gc, struct gg_login_params *glp)
- glp->socket_manager_type = purple_ssl_is_supported() ?
- GG_SOCKET_MANAGER_TYPE_TLS : GG_SOCKET_MANAGER_TYPE_TCP;
+ glp->socket_manager_type = GG_SOCKET_MANAGER_TYPE_TLS; glp->socket_manager.cb_data = gc;
glp->socket_manager.connect_cb = ggp_tcpsocket_connect;
glp->socket_manager.close_cb = ggp_tcpsocket_close;
--- a/libpurple/protocols/irc/irc.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/irc/irc.c Mon Dec 21 22:14:59 2015 -0600
@@ -370,16 +370,9 @@
purple_connection_update_progress(gc, _("Connecting"), 1, 2);
if (purple_account_get_bool(account, "ssl", FALSE)) {
- if (purple_ssl_is_supported()) {
- irc->gsc = purple_ssl_connect(account, irc->server,
- purple_account_get_int(account, "port", IRC_DEFAULT_SSL_PORT),
- irc_login_cb_ssl, irc_ssl_connect_failure, gc);
- purple_connection_error (gc,
- PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT,
- _("SSL support unavailable"));
+ irc->gsc = purple_ssl_connect(account, irc->server, + purple_account_get_int(account, "port", IRC_DEFAULT_SSL_PORT), + irc_login_cb_ssl, irc_ssl_connect_failure, gc); --- a/libpurple/protocols/irc/irc.h Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/irc/irc.h Mon Dec 21 22:14:59 2015 -0600
@@ -24,6 +24,7 @@
--- a/libpurple/protocols/jabber/chat.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/jabber/chat.c Mon Dec 21 22:14:59 2015 -0600
@@ -540,8 +540,7 @@
_("Configuration error"), msg,
purple_request_cpar_from_connection(js->gc));
@@ -621,8 +620,7 @@
_("Registration error"), msg,
purple_request_cpar_from_connection(js->gc));
@@ -692,8 +690,7 @@
_("Registration error"), msg,
purple_request_cpar_from_connection(js->gc));
--- a/libpurple/protocols/jabber/ibb.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/jabber/ibb.c Mon Dec 21 22:14:59 2015 -0600
@@ -294,10 +294,8 @@
- if (sess->last_iq_id) {
- g_free(sess->last_iq_id);
- sess->last_iq_id = NULL;
+ g_free(sess->last_iq_id); + sess->last_iq_id = NULL; if (type == JABBER_IQ_ERROR) {
jabber_ibb_session_close(sess);
--- a/libpurple/protocols/jabber/jabber.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/jabber/jabber.c Mon Dec 21 22:14:59 2015 -0600
@@ -99,10 +99,8 @@
open_stream = g_strdup_printf("<stream:stream to='%s' "
"xmlns='" NS_XMPP_CLIENT "' "
@@ -235,21 +233,16 @@
const gchar *connection_security = purple_account_get_string(account, "connection_security", JABBER_DEFAULT_REQUIRE_TLS);
- if (!g_str_equal(connection_security, "none") &&
- purple_ssl_is_supported()) {
+ if (!g_str_equal(connection_security, "none")) { "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>", -1);
- if(purple_ssl_is_supported()) {
- "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>", -1);
- purple_debug_warning("jabber", "No libpurple TLS/SSL support found.");
+ "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>", -1); starttls = purple_xmlnode_get_child(packet, "starttls");
@@ -1078,19 +1071,13 @@
/* if they've got old-ssl mode going, we probably want to ignore SRV lookups */
if (g_str_equal("old_ssl", purple_account_get_string(account, "connection_security", JABBER_DEFAULT_REQUIRE_TLS))) {
- if(purple_ssl_is_supported()) {
- js->gsc = purple_ssl_connect(account, js->certificate_CN,
- purple_account_get_int(account, "port", 5223),
- jabber_login_callback_ssl, jabber_ssl_connect_failure, gc);
- purple_connection_error(gc,
- PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT,
- _("Unable to establish SSL connection"));
+ js->gsc = purple_ssl_connect(account, js->certificate_CN, + purple_account_get_int(account, "port", 5223), + jabber_login_callback_ssl, jabber_ssl_connect_failure, gc); purple_connection_error(gc,
PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT,
- _("SSL support unavailable"));
+ _("Unable to establish SSL connection")); @@ -2671,10 +2658,8 @@
if((jb = jabber_buddy_find(js, who, TRUE)) &&
(jbr = jabber_buddy_find_resource(jb, jid->resource))) {
- g_free(jbr->thread_id);
+ g_free(jbr->thread_id); --- a/libpurple/protocols/jabber/jabber.h Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/jabber/jabber.h Mon Dec 21 22:14:59 2015 -0600
@@ -56,6 +56,7 @@
#include <libxml/parser.h>
#include "circularbuffer.h"
--- a/libpurple/protocols/jabber/message.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/jabber/message.c Mon Dec 21 22:14:59 2015 -0600
@@ -147,8 +147,7 @@
jbr->chat_states = JABBER_CHAT_STATES_UNSUPPORTED;
- g_free(jbr->thread_id);
+ g_free(jbr->thread_id); jbr->thread_id = g_strdup(jbr->thread_id);
--- a/libpurple/protocols/jabber/presence.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/jabber/presence.c Mon Dec 21 22:14:59 2015 -0600
@@ -245,10 +245,8 @@
- g_free(js->old_avatarhash);
+ g_free(js->old_avatarhash); js->old_msg = g_strdup(stripped);
js->old_avatarhash = g_strdup(js->avatar_hash);
@@ -440,7 +438,7 @@
if (tmp && strstr(bare_jid, tmp) == NULL) {
@@ -945,10 +943,8 @@
if (presence.jid_from->node)
presence.chat = jabber_chat_find(js, presence.jid_from->node,
presence.jid_from->domain);
- if(presence.jb->error_msg) {
- g_free(presence.jb->error_msg);
- presence.jb->error_msg = NULL;
+ g_free(presence.jb->error_msg); + presence.jb->error_msg = NULL; if (presence.type == JABBER_PRESENCE_AVAILABLE) {
presence.state = JABBER_BUDDY_STATE_ONLINE;
--- a/libpurple/protocols/jabber/si.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/jabber/si.c Mon Dec 21 22:14:59 2015 -0600
@@ -351,8 +351,7 @@
jsx->iq_id = g_strdup(id);
for(streamhost = purple_xmlnode_get_child(query, "streamhost"); streamhost;
--- a/libpurple/protocols/msn/msn.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/msn/msn.c Mon Dec 21 22:14:59 2015 -0600
@@ -1341,15 +1341,6 @@
gc = purple_account_get_connection(account);
- if (!purple_ssl_is_supported())
- purple_connection_error(gc,
- PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT,
- _("SSL support is needed for MSN. Please install a supported "
http_method = purple_account_get_bool(account, "http_method", FALSE);
--- a/libpurple/protocols/msn/msn.h Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/msn/msn.h Mon Dec 21 22:14:59 2015 -0600
@@ -110,6 +110,8 @@
MSN_CLIENT_VER_15_0 = 0xB0 /* MSNC11 */
--- a/libpurple/protocols/msn/object.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/msn/object.c Mon Dec 21 22:14:59 2015 -0600
@@ -37,8 +37,7 @@
- if (obj->field != NULL) \
obj->field = g_strndup(tag, c - tag); \
--- a/libpurple/protocols/mxit/client.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/mxit/client.c Mon Dec 21 22:14:59 2015 -0600
@@ -1906,20 +1906,17 @@
/* this is an invite, so update its profile info */
if ( ( statusMsg ) && ( *statusMsg ) ) {
/* update the status message */
- if ( contact->statusMsg )
- g_free( contact->statusMsg );
+ g_free(contact->statusMsg); contact->statusMsg = strdup( statusMsg );
contact->statusMsg = NULL;
- if ( contact->profile )
- g_free( contact->profile );
+ g_free(contact->profile); contact->profile = profile;
if ( ( avatarId ) && ( *avatarId ) ) {
/* avatar must be requested for this invite before we can display it */
mxit_get_avatar( session, mxitId, avatarId );
- if ( contact->avatarId )
- g_free( contact->avatarId );
+ g_free(contact->avatarId); contact->avatarId = strdup( avatarId );
@@ -1941,8 +1938,7 @@
contact = purple_buddy_get_protocol_data( buddy );
- if ( contact->statusMsg )
- g_free( contact->statusMsg );
+ g_free(contact->statusMsg); contact->statusMsg = strdup( statusMsg );
@@ -2926,12 +2922,9 @@
session->invites = g_list_remove( session->invites, contact );
- g_free( contact->msg );
- if ( contact->statusMsg )
- g_free( contact->statusMsg );
- if ( contact->profile )
- g_free( contact->profile );
+ g_free(contact->statusMsg); + g_free(contact->profile); g_object_unref(contact->image);
--- a/libpurple/protocols/mxit/formcmds.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/mxit/formcmds.c Mon Dec 21 22:14:59 2015 -0600
@@ -303,8 +303,7 @@
g_string_append_printf(msg, "<a href=\"%s\">%s</a>", purple_url_decode(dest), (text) ? text : _( "Download" )); /* add link to display message */
--- a/libpurple/protocols/mxit/markup.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/mxit/markup.c Mon Dec 21 22:14:59 2015 -0600
@@ -258,8 +258,7 @@
g_string_free( mx->msg, TRUE );
--- a/libpurple/protocols/mxit/multimx.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/mxit/multimx.c Mon Dec 21 22:14:59 2015 -0600
@@ -164,8 +164,7 @@
session->rooms = g_list_remove(session->rooms, multimx);
- g_free(multimx->nickname);
+ g_free(multimx->nickname); --- a/libpurple/protocols/mxit/mxit.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/mxit/mxit.c Mon Dec 21 22:14:59 2015 -0600
@@ -112,8 +112,7 @@
/* this is not an internal mxit link */
@@ -491,12 +490,9 @@
contact = purple_buddy_get_protocol_data( buddy );
- if ( contact->statusMsg )
- g_free( contact->statusMsg );
- if ( contact->avatarId )
- g_free( contact->avatarId );
- g_free( contact->msg );
+ g_free(contact->statusMsg); + g_free(contact->avatarId); g_object_unref(contact->image);
--- a/libpurple/protocols/mxit/mxit.h Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/mxit/mxit.h Mon Dec 21 22:14:59 2015 -0600
@@ -26,6 +26,7 @@
--- a/libpurple/protocols/mxit/roster.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/mxit/roster.c Mon Dec 21 22:14:59 2015 -0600
@@ -481,10 +481,8 @@
// TODO: Download custom mood frame.
/* update status message */
- if ( contact->statusMsg ) {
- g_free( contact->statusMsg );
- contact->statusMsg = NULL;
+ g_free(contact->statusMsg); + contact->statusMsg = NULL; if ( ( statusMsg ) && ( statusMsg[0] != '\0' ) )
contact->statusMsg = g_markup_escape_text( statusMsg, -1 );
@@ -532,8 +530,7 @@
/* avatar has not changed - do nothing */
else if ( avatarId[0] != '\0' ) { /* avatar has changed */
- if ( contact->avatarId )
- g_free( contact->avatarId );
+ g_free(contact->avatarId); contact->avatarId = g_strdup( avatarId );
/* Send request to download new avatar image */
@@ -596,12 +593,9 @@
invite->session->invites = g_list_remove( invite->session->invites, invite->contact );
/* freeup invite object */
- if ( invite->contact->msg )
- g_free( invite->contact->msg );
- if ( invite->contact->statusMsg )
- g_free( invite->contact->statusMsg );
- if ( invite->contact->profile )
- g_free( invite->contact->profile );
+ g_free(invite->contact->msg); + g_free(invite->contact->statusMsg); + g_free(invite->contact->profile); if (invite->contact->image)
g_object_unref(invite->contact->image);
g_free( invite->contact );
@@ -627,12 +621,9 @@
invite->session->invites = g_list_remove( invite->session->invites, invite->contact );
/* freeup invite object */
- if ( invite->contact->msg )
- g_free( invite->contact->msg );
- if ( invite->contact->statusMsg )
- g_free( invite->contact->statusMsg );
- if ( invite->contact->profile )
- g_free( invite->contact->profile );
+ g_free(invite->contact->msg); + g_free(invite->contact->statusMsg); + g_free(invite->contact->profile); if (invite->contact->image)
g_object_unref(invite->contact->image);
g_free( invite->contact );
--- a/libpurple/protocols/novell/nmconference.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/novell/nmconference.c Mon Dec 21 22:14:59 2015 -0600
@@ -83,8 +83,7 @@
"Releasing conference %p, total=%d\n",
conference, --conf_count);
- g_free(conference->guid);
+ g_free(conference->guid); if (conference->participants) {
for (node = conference->participants; node; node = node->next) {
--- a/libpurple/protocols/novell/nmconn.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/novell/nmconn.c Mon Dec 21 22:14:59 2015 -0600
@@ -187,10 +187,8 @@
g_slist_free(conn->requests);
- g_free(conn->ssl_conn);
+ g_free(conn->ssl_conn); --- a/libpurple/protocols/novell/nmcontact.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/novell/nmcontact.c Mon Dec 21 22:14:59 2015 -0600
@@ -164,8 +164,7 @@
nm_locate_field(NM_A_SZ_DISPLAY_NAME, (NMField *) fields->ptr_value))) {
- if (contact->display_name)
- g_free(contact->display_name);
+ g_free(contact->display_name); contact->display_name = g_strdup((char *) field->ptr_value);
@@ -175,8 +174,7 @@
if ((field = nm_locate_field(NM_A_SZ_DN, (NMField *) fields->ptr_value))) {
contact->dn = g_strdup((char *) field->ptr_value);
@@ -303,10 +301,8 @@
- if (contact->display_name) {
- g_free(contact->display_name);
- contact->display_name = NULL;
+ g_free(contact->display_name); + contact->display_name = NULL; contact->display_name = g_strdup(display_name);
@@ -318,10 +314,8 @@
contact->dn = g_strdup(dn);
@@ -538,8 +532,7 @@
nm_locate_field(NM_A_SZ_DISPLAY_NAME, (NMField *) fields->ptr_value))) {
folder->name = g_strdup((char *) field->ptr_value);
@@ -640,8 +633,7 @@
if (folder == NULL || name == NULL)
folder->name = g_strdup(name);
--- a/libpurple/protocols/novell/nmevent.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/novell/nmevent.c Mon Dec 21 22:14:59 2015 -0600
@@ -241,14 +241,9 @@
nm_release_conference(conference);
@@ -323,11 +318,8 @@
@@ -381,8 +373,7 @@
@@ -417,8 +408,7 @@
@@ -468,8 +458,7 @@
@@ -507,8 +496,7 @@
@@ -569,8 +557,7 @@
@@ -605,8 +592,7 @@
@@ -651,8 +637,7 @@
@@ -677,8 +662,7 @@
rc = nm_read_all(conn, guid, size);
@@ -712,8 +696,7 @@
if (--(event->ref_count) == 0) {
nm_release_conference(event->conference);
@@ -721,8 +704,7 @@
nm_release_user_record(event->user_record);
@@ -936,8 +918,7 @@
--- a/libpurple/protocols/novell/nmmessage.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/novell/nmmessage.c Mon Dec 21 22:14:59 2015 -0600
@@ -53,8 +53,7 @@
nm_release_message(NMMessage * msg)
if (msg && (--(msg->ref_count) == 0)) {
nm_release_conference(msg->conference);
--- a/libpurple/protocols/novell/nmrequest.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/novell/nmrequest.c Mon Dec 21 22:14:59 2015 -0600
@@ -60,8 +60,7 @@
nm_release_request(NMRequest * req)
if (req && (--req->ref_count == 0)) {
purple_debug_info("novell",
--- a/libpurple/protocols/novell/nmuserrecord.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/novell/nmuserrecord.c Mon Dec 21 22:14:59 2015 -0600
@@ -191,64 +191,50 @@
dest->status = src->status;
- if (dest->status_text) {
- g_free(dest->status_text);
- dest->status_text = NULL;
+ g_free(dest->status_text); + dest->status_text = NULL; dest->status_text = g_strdup(src->status_text);
dest->dn = g_strdup(src->dn);
dest->cn = g_strdup(src->cn);
- if (dest->display_id) {
- g_free(dest->display_id);
- dest->display_id = NULL;
+ g_free(dest->display_id); + dest->display_id = NULL; dest->display_id = g_strdup(src->display_id);
dest->fname = g_strdup(src->fname);
dest->lname = g_strdup(src->lname);
- g_free(dest->full_name);
- dest->full_name = NULL;
+ g_free(dest->full_name); + dest->full_name = NULL; dest->full_name = g_strdup(src->full_name);
@@ -321,8 +307,7 @@
nm_user_record_set_dn(NMUserRecord * user_record, const char *dn)
if (user_record != NULL && dn != NULL) {
- g_free(user_record->dn);
+ g_free(user_record->dn); user_record->dn = g_strdup(dn);
@@ -341,8 +326,7 @@
nm_user_record_set_userid(NMUserRecord * user_record, const char *userid)
if (user_record != NULL && userid != NULL) {
- g_free(user_record->cn);
+ g_free(user_record->cn); user_record->cn = g_strdup(userid);
@@ -361,8 +345,7 @@
nm_user_record_set_display_id(NMUserRecord * user_record, const char *display_id)
if (user_record != NULL && display_id != NULL) {
- if (user_record->display_id)
- g_free(user_record->display_id);
+ g_free(user_record->display_id); user_record->display_id = g_strdup(display_id);
@@ -445,10 +428,8 @@
user_record->status = status;
- if (user_record->status_text) {
- g_free(user_record->status_text);
- user_record->status_text = NULL;
+ g_free(user_record->status_text); + user_record->status_text = NULL; user_record->status_text = g_strdup(text);
@@ -512,11 +493,9 @@
nm_release_property(NMProperty * property)
- g_free(property->value);
+ g_free(property->value); --- a/libpurple/protocols/novell/novell.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/novell/novell.c Mon Dec 21 22:14:59 2015 -0600
@@ -572,8 +572,7 @@
if (user == NULL || folder_name == NULL || contact == NULL) {
@@ -606,8 +605,7 @@
/* Add contact to newly create folder */
@@ -625,8 +623,7 @@
nm_release_contact(contact);
@@ -724,8 +721,7 @@
/* Handle get details response add to privacy list */
@@ -824,8 +820,7 @@
@@ -880,8 +875,7 @@
@@ -949,8 +943,7 @@
@@ -1678,8 +1671,7 @@
static char *name = NULL;
name = g_strdup_printf(_("GroupWise Conference %d"), id);
@@ -3095,8 +3087,7 @@
rc = nm_send_set_status(user, novellstatus, text, msg, NULL, NULL);
_check_for_disconnect(user, rc);
--- a/libpurple/protocols/novell/novell.h Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/novell/novell.h Mon Dec 21 22:14:59 2015 -0600
@@ -22,6 +22,8 @@
#define NOVELL_TYPE_PROTOCOL (novell_protocol_get_type())
--- a/libpurple/protocols/oscar/family_icq.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/oscar/family_icq.c Mon Dec 21 22:14:59 2015 -0600
@@ -254,7 +254,7 @@
byte_stream_destroy(&bs);
/* Keep track of this request and the ICQ number and request ID */
- info = (struct aim_icq_info *)g_new0(struct aim_icq_info, 1);
+ info = g_new0(struct aim_icq_info, 1); od->icq_info = g_slist_prepend(od->icq_info, info);
@@ -301,7 +301,7 @@
byte_stream_destroy(&bs);
/* Keep track of this request and the ICQ number and request ID */
- info = (struct aim_icq_info *)g_new0(struct aim_icq_info, 1);
+ info = g_new0(struct aim_icq_info, 1); info->for_auth_request = for_auth_request;
@@ -472,7 +472,7 @@
/* find other data from the same request */
info_ptr = g_slist_find_custom(od->icq_info, &reqid, compare_icq_infos);
- struct aim_icq_info *new_info = (struct aim_icq_info *)g_new0(struct aim_icq_info, 1);
+ struct aim_icq_info *new_info = g_new0(struct aim_icq_info, 1); info_ptr = od->icq_info = g_slist_prepend(od->icq_info, new_info);
@@ -541,7 +541,7 @@
case 0x00eb: { /* email address(es) */
info->numaddresses = byte_stream_getle16(&qbs);
- info->email2 = (char **)g_new0(char *, info->numaddresses);
+ info->email2 = g_new0(char *, info->numaddresses); for (i = 0; i < info->numaddresses; i++) {
info->email2[i] = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs));
if (i+1 != info->numaddresses)
--- a/libpurple/protocols/oscar/family_locate.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/oscar/family_locate.c Mon Dec 21 22:14:59 2015 -0600
@@ -549,14 +549,10 @@
* We don't have an away message specified in this user_info
* block, so clear any cached away message now.
- if (cur->away_encoding) {
- g_free(cur->away_encoding);
- cur->away_encoding = NULL;
+ g_free(cur->away_encoding); + cur->away_encoding = NULL; --- a/libpurple/protocols/oscar/oscar.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/oscar/oscar.c Mon Dec 21 22:14:59 2015 -0600
@@ -741,14 +741,7 @@
od->default_port = purple_account_get_int(account, "port", OSCAR_DEFAULT_LOGIN_PORT);
encryption_type = purple_account_get_string(account, "encryption", OSCAR_DEFAULT_ENCRYPTION);
- if (!purple_ssl_is_supported() && strcmp(encryption_type, OSCAR_REQUIRE_ENCRYPTION) == 0) {
- purple_connection_error(
- PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT,
- _("You required encryption in your account settings, but encryption is not supported by your system."));
- od->use_ssl = purple_ssl_is_supported() && strcmp(encryption_type, OSCAR_NO_ENCRYPTION) != 0;
+ od->use_ssl = strcmp(encryption_type, OSCAR_NO_ENCRYPTION) != 0; /* Connect to core Purple signals */
purple_prefs_connect_callback(purple_connection_get_protocol(gc), "/purple/away/idle_reporting", idle_reporting_pref_cb, gc);
--- a/libpurple/protocols/oscar/oscar.h Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/oscar/oscar.h Mon Dec 21 22:14:59 2015 -0600
@@ -45,6 +45,7 @@
--- a/libpurple/protocols/sametime/sametime.h Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/sametime/sametime.h Mon Dec 21 22:14:59 2015 -0600
@@ -1,6 +1,8 @@
#define MW_TYPE_PROTOCOL (mw_protocol_get_type())
#define MW_PROTOCOL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), MW_TYPE_PROTOCOL, mwProtocol))
#define MW_PROTOCOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), MW_TYPE_PROTOCOL, mwProtocolClass))
--- a/libpurple/protocols/silc/silcpurple.h Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/silc/silcpurple.h Mon Dec 21 22:14:59 2015 -0600
@@ -20,6 +20,8 @@
--- a/libpurple/protocols/simple/simple.h Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/simple/simple.h Mon Dec 21 22:14:59 2015 -0600
@@ -24,6 +24,7 @@
--- a/libpurple/protocols/yahoo/yahoo.h Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/yahoo/yahoo.h Mon Dec 21 22:14:59 2015 -0600
@@ -22,6 +22,8 @@
#define YAHOO_TYPE_PROTOCOL (yahoo_protocol_get_type())
--- a/libpurple/protocols/yahoo/yahoochat.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/yahoo/yahoochat.c Mon Dec 21 22:14:59 2015 -0600
@@ -727,8 +727,7 @@
c = purple_conversations_find_chat(gc, YAHOO_CHAT_ID);
/* we still get messages after we part, funny that */
@@ -955,10 +954,8 @@
yahoo_packet_send_and_free(pkt, yd);
if (purple_conversations_find_chat(gc, YAHOO_CHAT_ID) != NULL)
purple_serv_got_chat_left(gc, YAHOO_CHAT_ID);
--- a/libpurple/protocols/yahoo/ymsg.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/yahoo/ymsg.c Mon Dec 21 22:14:59 2015 -0600
@@ -1906,11 +1906,6 @@
purple_debug_info("yahoo", "Authentication: In yahoo_auth16_stage1\n");
- if(!purple_ssl_is_supported()) {
- purple_connection_error(gc, PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT, _("SSL support unavailable"));
auth_data = g_new0(struct yahoo_auth_data, 1);
auth_data->seed = g_strdup(seed);
--- a/libpurple/protocols/zephyr/zephyr.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/zephyr/zephyr.c Mon Dec 21 22:14:59 2015 -0600
@@ -2313,10 +2313,8 @@
zephyr_account *zephyr = purple_connection_get_protocol_data(gc);
PurpleStatusPrimitive primitive = purple_status_type_get_primitive(purple_status_get_status_type(status));
if (primitive == PURPLE_STATUS_AWAY) {
zephyr->away = g_strdup(purple_status_get_attr_string(status,"message"));
--- a/libpurple/protocols/zephyr/zephyr.h Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/protocols/zephyr/zephyr.h Mon Dec 21 22:14:59 2015 -0600
@@ -22,6 +22,8 @@
#define ZEPHYR_TYPE_PROTOCOL (zephyr_protocol_get_type())
--- a/libpurple/proxy.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/proxy.c Mon Dec 21 22:14:59 2015 -0600
@@ -332,18 +332,12 @@
/* Free the old fields */
tmp = purple_gnome_proxy_get_parameter(GNOME_PROXY_USE_SAME_PROXY, gnome_version);
--- a/libpurple/purple-socket.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/purple-socket.c Mon Dec 21 22:14:59 2015 -0600
@@ -259,12 +259,6 @@
- if (!purple_ssl_is_supported()) {
- purple_debug_error("socket", "TLS is not supported");
- ps->state = PURPLE_SOCKET_STATE_ERROR;
ps->tls_connection = purple_ssl_connect(account, ps->host,
ps->port, _purple_socket_connected_tls,
_purple_socket_connected_tls_error, ps);
--- a/libpurple/server.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/server.c Mon Dec 21 22:14:59 2015 -0600
@@ -103,7 +103,7 @@
- lar = (struct last_auto_response *)g_new0(struct last_auto_response, 1);
+ lar = g_new0(struct last_auto_response, 1); g_snprintf(lar->name, sizeof(lar->name), "%s", name);
--- a/libpurple/sslconn.c Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/sslconn.c Mon Dec 21 22:14:59 2015 -0600
@@ -56,17 +56,6 @@
return (_ssl_initialized = ops->init());
-purple_ssl_is_supported(void)
- return (purple_ssl_get_ops() != NULL);
purple_ssl_connect_cb(gpointer data, gint source, const gchar *error_message)
@@ -110,7 +99,6 @@
g_return_val_if_fail(host != NULL, NULL);
g_return_val_if_fail(port != 0 && port != -1, NULL);
g_return_val_if_fail(func != NULL, NULL);
- g_return_val_if_fail(purple_ssl_is_supported(), NULL);
@@ -156,7 +144,6 @@
g_return_if_fail(func != NULL);
- g_return_if_fail(purple_ssl_is_supported());
purple_ssl_input_remove(gsc);
@@ -203,7 +190,6 @@
g_return_val_if_fail(fd != -1, NULL);
g_return_val_if_fail(func != NULL, NULL);
- g_return_val_if_fail(purple_ssl_is_supported(), NULL);
--- a/libpurple/sslconn.h Mon Dec 21 21:29:48 2015 -0600
+++ b/libpurple/sslconn.h Mon Dec 21 22:14:59 2015 -0600
@@ -152,15 +152,6 @@
/**************************************************************************/
- * purple_ssl_is_supported:
- * Returns whether or not SSL is currently supported.
- * Returns: %TRUE if SSL is supported, or %FALSE otherwise.
-gboolean purple_ssl_is_supported(void);
--- a/pidgin/gtkaccount.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/gtkaccount.c Mon Dec 21 22:14:59 2015 -0600
@@ -114,11 +114,7 @@
GtkWidget *username_entry;
-#if GTK_CHECK_VERSION(3,0,0)
GdkRGBA username_entry_hint_color;
- GdkColor *username_entry_hint_color;
GtkWidget *password_entry;
GtkWidget *remember_pass_check;
@@ -325,11 +321,7 @@
if(!strcmp(gtk_entry_get_text(GTK_ENTRY(widget)), label)) {
gtk_entry_set_text(GTK_ENTRY(widget), "");
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_override_color(widget, GTK_STATE_NORMAL, NULL);
- gtk_widget_modify_text(widget, GTK_STATE_NORMAL,NULL);
g_hash_table_destroy(table);
@@ -355,11 +347,7 @@
gtk_entry_set_text(GTK_ENTRY(widget), label);
/* Make sure we can hit it again */
g_signal_handlers_unblock_by_func(widget, G_CALLBACK(username_changed_cb), dialog);
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_override_color(widget, GTK_STATE_NORMAL, &dialog->username_entry_hint_color);
- gtk_widget_modify_text(widget, GTK_STATE_NORMAL, dialog->username_entry_hint_color);
g_hash_table_destroy(table);
@@ -374,13 +362,8 @@
const char *label, *text;
-#if GTK_CHECK_VERSION(3,0,0)
GtkStyleContext *context;
- const GtkBorder *border = NULL;
table = purple_protocol_client_iface_get_account_text_table(dialog->protocol, NULL);
@@ -392,51 +375,25 @@
if (strcmp(text, label)) {
temp_text = g_strdup(text);
gtk_entry_set_text(GTK_ENTRY(widget), label);
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_override_color(GTK_WIDGET(widget), GTK_STATE_NORMAL, NULL);
- gtk_widget_modify_text(GTK_WIDGET(widget), GTK_STATE_NORMAL, NULL);
-#if GTK_CHECK_VERSION(3,0,0)
context = gtk_widget_get_style_context(dialog->username_entry);
gtk_style_context_get_color(context, GTK_STATE_FLAG_INSENSITIVE,
&dialog->username_entry_hint_color);
- style = gtk_rc_get_style(dialog->username_entry);
- dialog->username_entry_hint_color = &(style->fg[GTK_STATE_INSENSITIVE]);
pango_layout_get_pixel_size(gtk_entry_get_layout(GTK_ENTRY(widget)), &xsize, NULL);
-#if GTK_CHECK_VERSION(3,0,0)
gtk_style_context_get_margin(context, GTK_STATE_FLAG_NORMAL, &border);
xsize += border.left + border.right;
gtk_style_context_get_padding(context, GTK_STATE_FLAG_NORMAL, &border);
xsize += border.left + border.right;
- xsize += 2 * style->xthickness;
- gtk_style_get(style, GTK_TYPE_ENTRY, "inner-border", &border, NULL);
- xsize += border->left + border->right;
- xsize += 4; /* 2 * default inner-border */
gtk_widget_set_size_request(GTK_WIDGET(widget), xsize, -1);
gtk_entry_set_text(GTK_ENTRY(widget), temp_text);
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_override_color(GTK_WIDGET(widget), GTK_STATE_NORMAL, NULL);
- gtk_widget_modify_text(GTK_WIDGET(widget), GTK_STATE_NORMAL, NULL);
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_override_color(GTK_WIDGET(widget), GTK_STATE_NORMAL, &dialog->username_entry_hint_color);
- gtk_widget_modify_text(GTK_WIDGET(widget), GTK_STATE_NORMAL, dialog->username_entry_hint_color);
g_signal_handlers_unblock_by_func(widget, G_CALLBACK(username_themechange_cb), dialog);
g_signal_handlers_unblock_by_func(widget, G_CALLBACK(username_changed_cb), dialog);
@@ -548,12 +505,8 @@
update_editable(PurpleConnection *gc, AccountPrefsDialog *dialog)
-#if GTK_CHECK_VERSION(3,0,0)
@@ -566,7 +519,6 @@
set = !(purple_account_is_connected(dialog->account) || purple_account_is_connecting(dialog->account));
gtk_widget_set_sensitive(dialog->protocol_menu, set);
gtk_editable_set_editable(GTK_EDITABLE(dialog->username_entry), set);
-#if GTK_CHECK_VERSION(3,0,0)
style = set ? NULL : gtk_widget_get_style_context(dialog->username_entry);
gtk_style_context_get_background_color(style, GTK_STATE_FLAG_INSENSITIVE, &color);
@@ -574,18 +526,12 @@
gtk_widget_override_background_color(dialog->username_entry, GTK_STATE_FLAG_NORMAL, NULL);
- style = set ? NULL : gtk_widget_get_style(dialog->username_entry);
- gtk_widget_modify_base(dialog->username_entry, GTK_STATE_NORMAL,
- style ? &style->base[GTK_STATE_INSENSITIVE] : NULL);
for (l = dialog->user_split_entries ; l != NULL ; l = l->next) {
if (GTK_IS_EDITABLE(l->data)) {
gtk_editable_set_editable(GTK_EDITABLE(l->data), set);
-#if GTK_CHECK_VERSION(3,0,0)
style = set ? NULL : gtk_widget_get_style_context(GTK_WIDGET(l->data));
gtk_style_context_get_background_color(style, GTK_STATE_FLAG_INSENSITIVE, &color);
@@ -593,11 +539,6 @@
gtk_widget_override_background_color(GTK_WIDGET(l->data), GTK_STATE_FLAG_NORMAL, NULL);
- style = set ? NULL : gtk_widget_get_style(GTK_WIDGET(l->data));
- gtk_widget_modify_base(GTK_WIDGET(l->data), GTK_STATE_NORMAL,
- style ? &style->base[GTK_STATE_INSENSITIVE] : NULL);
gtk_widget_set_sensitive(GTK_WIDGET(l->data), set);
@@ -2574,11 +2515,7 @@
width = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/accounts/dialog/width");
height = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/accounts/dialog/height");
-#if GTK_CHECK_VERSION(3,0,0)
dialog->window = win = pidgin_create_dialog(_("Accounts"), 0, "accounts", TRUE);
- dialog->window = win = pidgin_create_dialog(_("Accounts"), PIDGIN_HIG_BORDER, "accounts", TRUE);
gtk_window_set_default_size(GTK_WINDOW(win), width, height);
g_signal_connect(G_OBJECT(win), "delete_event",
--- a/pidgin/gtkblist.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/gtkblist.c Mon Dec 21 22:14:59 2015 -0600
@@ -122,11 +122,6 @@
guint select_notebook_page_timeout;
-#if !GTK_CHECK_VERSION(3,0,0)
- GdkCursor *hand_cursor; /* Hand cursor */
- GdkCursor *arrow_cursor; /* Arrow cursor */
- gboolean changing_style; /* True when changing GTK+ theme style */
} PidginBuddyListPrivate;
@@ -2943,11 +2938,7 @@
pidgin_blist_paint_tip(GtkWidget *widget, cairo_t *cr, gpointer null)
-#if GTK_CHECK_VERSION(3,0,0)
GtkStyleContext *context;
int current_height, max_width;
@@ -2959,12 +2950,8 @@
if(gtkblist->tooltipdata == NULL)
-#if GTK_CHECK_VERSION(3,0,0)
context = gtk_widget_get_style_context(gtkblist->tipwindow);
gtk_style_context_add_class(context, GTK_STYLE_CLASS_TOOLTIP);
- style = gtk_widget_get_style(gtkblist->tipwindow);
@@ -2993,7 +2980,6 @@
if (td->avatar && pidgin_gdk_pixbuf_is_opaque(td->avatar))
-#if GTK_CHECK_VERSION(3,0,0)
gtk_style_context_save(context);
gtk_style_context_add_class(context, GTK_STYLE_CLASS_FRAME);
if (dir == GTK_TEXT_DIR_RTL) {
@@ -3007,22 +2993,6 @@
td->avatar_width + 2, td->avatar_height + 2);
gtk_style_context_restore(context);
- if (dir == GTK_TEXT_DIR_RTL) {
- gtk_paint_flat_box(style, gtkblist->tipwindow->window,
- GTK_STATE_NORMAL, GTK_SHADOW_OUT,
- NULL, gtkblist->tipwindow, "tooltip",
- TOOLTIP_BORDER - 1, current_height - 1,
- td->avatar_width + 2, td->avatar_height + 2);
- gtk_paint_flat_box(style, gtkblist->tipwindow->window,
- GTK_STATE_NORMAL, GTK_SHADOW_OUT,
- NULL, gtkblist->tipwindow, "tooltip",
- max_width - (td->avatar_width + TOOLTIP_BORDER) - 1,
- current_height - 1, td->avatar_width + 2,
- td->avatar_height + 2);
@@ -3059,7 +3029,6 @@
-#if GTK_CHECK_VERSION(3,0,0)
if (dir == GTK_TEXT_DIR_RTL) {
gtk_render_layout(context, cr,
max_width - (TOOLTIP_BORDER + status_size + SMALL_SPACE) - PANGO_PIXELS(300000),
@@ -3069,22 +3038,9 @@
TOOLTIP_BORDER + status_size + SMALL_SPACE,
current_height, td->name_layout);
- if (dir == GTK_TEXT_DIR_RTL) {
- gtk_paint_layout(style, gtkblist->tipwindow->window, GTK_STATE_NORMAL, FALSE,
- NULL, gtkblist->tipwindow, "tooltip",
- max_width -(TOOLTIP_BORDER + status_size + SMALL_SPACE) - PANGO_PIXELS(300000),
- current_height, td->name_layout);
- gtk_paint_layout(style, gtkblist->tipwindow->window, GTK_STATE_NORMAL, FALSE,
- NULL, gtkblist->tipwindow, "tooltip",
- TOOLTIP_BORDER + status_size + SMALL_SPACE, current_height, td->name_layout);
-#if GTK_CHECK_VERSION(3,0,0)
if (dir != GTK_TEXT_DIR_RTL) {
gtk_render_layout(context, cr,
TOOLTIP_BORDER + status_size + SMALL_SPACE,
@@ -3096,20 +3052,6 @@
current_height + td->name_height,
- if (dir != GTK_TEXT_DIR_RTL) {
- gtk_paint_layout(style, gtkblist->tipwindow->window, GTK_STATE_NORMAL, FALSE,
- NULL, gtkblist->tipwindow, "tooltip",
- TOOLTIP_BORDER + status_size + SMALL_SPACE,
- current_height + td->name_height, td->layout);
- gtk_paint_layout(style, gtkblist->tipwindow->window, GTK_STATE_NORMAL, FALSE,
- NULL, gtkblist->tipwindow, "tooltip",
- max_width - (TOOLTIP_BORDER + status_size + SMALL_SPACE) - PANGO_PIXELS(300000),
- current_height + td->name_height,
current_height += MAX(td->name_height + td->height, td->avatar_height) + td->padding;
@@ -5088,24 +5030,6 @@
-#if !GTK_CHECK_VERSION(3,0,0)
-headline_box_enter_cb(GtkWidget *widget, GdkEventCrossing *event,
- PidginBuddyListPrivate *priv)
- gdk_window_set_cursor(widget->window, priv->hand_cursor);
-headline_box_leave_cb(GtkWidget *widget, GdkEventCrossing *event,
- PidginBuddyListPrivate *priv)
- gdk_window_set_cursor(widget->window, priv->arrow_cursor);
reset_headline(PidginBuddyList *gtkblist)
@@ -5124,8 +5048,6 @@
-#if GTK_CHECK_VERSION(3,0,0)
headline_response_cb(GtkInfoBar *infobar, int resp, PidginBuddyList *gtkblist)
@@ -5163,31 +5085,6 @@
-headline_close_press_cb(GtkButton *button, PidginBuddyList *gtkblist)
- gtk_widget_hide(gtkblist->headline);
-headline_box_press_cb(GtkWidget *widget, GdkEventButton *event, PidginBuddyList *gtkblist)
- gtk_widget_hide(gtkblist->headline);
- if (gtkblist->headline_callback)
- g_idle_add(headline_click_callback, NULL);
- if (gtkblist->headline_destroy)
- gtkblist->headline_destroy(gtkblist->headline_data);
- reset_headline(gtkblist);
/***********************************/
/* Connection error handling stuff */
/***********************************/
@@ -5611,27 +5508,6 @@
-#if !GTK_CHECK_VERSION(3,0,0)
-paint_headline_hbox (GtkWidget *widget,
- gtk_paint_flat_box (widget->style,
- widget->allocation.x + 1,
- widget->allocation.y + 1,
- widget->allocation.width - 2,
- widget->allocation.height - 2);
/* This assumes there are not things like groupless buddies or multi-leveled groups.
* I'm sure other things in this code assumes that also.
@@ -5648,34 +5524,6 @@
-#if !GTK_CHECK_VERSION(3,0,0)
-headline_style_set (GtkWidget *widget,
- PidginBuddyListPrivate *priv = PIDGIN_BUDDY_LIST_GET_PRIVATE(gtkblist);
- if (priv->changing_style)
- /* This is a hack needed to use the tooltip background colour */
- window = gtk_window_new(GTK_WINDOW_POPUP);
- gtk_widget_set_name(window, "gtk-tooltip");
- gtk_widget_ensure_style(window);
- style = gtk_widget_get_style(window);
- priv->changing_style = TRUE;
- gtk_widget_set_style(gtkblist->headline, style);
- priv->changing_style = FALSE;
- gtk_widget_destroy(window);
- gtk_widget_queue_draw(gtkblist->headline);
/******************************************/
/* End of connection error handling stuff */
/******************************************/
@@ -5905,12 +5753,8 @@
GtkTreeViewColumn *column;
-#if GTK_CHECK_VERSION(3,0,0)
@@ -5919,9 +5763,6 @@
GtkAccelGroup *accel_group;
GtkTreeSelection *selection;
-#if ! GTK_CHECK_VERSION(3,0,0)
GtkTargetEntry dte[] = {{"PURPLE_BLIST_NODE", GTK_TARGET_SAME_APP, DRAG_ROW},
{"application/x-im-contact", 0, DRAG_BUDDY},
{"text/x-vcard", 0, DRAG_VCARD },
@@ -5956,11 +5797,6 @@
g_signal_connect(G_OBJECT(gtkblist->window), "focus-out-event",
G_CALLBACK(blist_focus_cb), gtkblist);
- /* TODO: how is this done in gtk+ 3.0? */
-#if !GTK_CHECK_VERSION(3,0,0)
- GTK_WINDOW(gtkblist->window)->allow_shrink = TRUE;
gtkblist->main_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_show(gtkblist->main_vbox);
gtk_container_add(GTK_CONTAINER(gtkblist->window), gtkblist->main_vbox);
@@ -6043,7 +5879,6 @@
pidgin_blist_select_notebook_page(gtkblist);
/****************************** Headline **********************************/
-#if GTK_CHECK_VERSION(3,0,0)
gtkblist->headline = gtk_event_box_new();
gtk_box_pack_start(GTK_BOX(gtkblist->vbox), gtkblist->headline,
@@ -6078,50 +5913,6 @@
g_signal_connect(gtkblist->headline, "button-press-event",
G_CALLBACK(headline_press_cb), infobar);
- ebox = gtk_event_box_new();
- gtk_box_pack_start(GTK_BOX(gtkblist->vbox), ebox, FALSE, FALSE, 0);
- gtkblist->headline = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3);
- gtk_container_set_border_width(GTK_CONTAINER(gtkblist->headline), 6);
- gtk_container_add(GTK_CONTAINER(ebox), gtkblist->headline);
- gtkblist->headline_image = gtk_image_new_from_pixbuf(NULL);
- gtk_misc_set_alignment(GTK_MISC(gtkblist->headline_image), 0.0, 0);
- gtkblist->headline_label = gtk_label_new(NULL);
- blist_width = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/blist/width") - 25;
- gtk_widget_set_size_request(gtkblist->headline_label, blist_width, -1);
- gtk_label_set_line_wrap(GTK_LABEL(gtkblist->headline_label), TRUE);
- gtk_box_pack_start(GTK_BOX(gtkblist->headline), gtkblist->headline_image, FALSE, FALSE, 0);
- gtk_box_pack_start(GTK_BOX(gtkblist->headline), gtkblist->headline_label, TRUE, TRUE, 0);
- g_signal_connect(gtkblist->headline_label, /* connecting on headline doesn't work, because
- the signal is not emitted when theme is changed */
- G_CALLBACK(headline_style_set),
- g_signal_connect (gtkblist->headline,
- G_CALLBACK (paint_headline_hbox),
- gtk_widget_set_name(gtkblist->headline, "gtk-tooltips");
- priv->hand_cursor = gdk_cursor_new (GDK_HAND2);
- priv->arrow_cursor = gdk_cursor_new (GDK_LEFT_PTR);
- close = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
- close = pidgin_create_small_button(close);
- gtk_box_pack_start(GTK_BOX(gtkblist->headline), close, FALSE, FALSE, 0);
- gtk_widget_set_tooltip_text(close, _("Close"));
- g_signal_connect(close, "clicked", G_CALLBACK(headline_close_press_cb), gtkblist);
- g_signal_connect(G_OBJECT(ebox), "enter-notify-event", G_CALLBACK(headline_box_enter_cb), priv);
- g_signal_connect(G_OBJECT(ebox), "leave-notify-event", G_CALLBACK(headline_box_leave_cb), priv);
- g_signal_connect(G_OBJECT(ebox), "button-press-event", G_CALLBACK(headline_box_press_cb), gtkblist);
/****************************** GtkTreeView **********************************/
gtkblist->treemodel = gtk_tree_store_new(BLIST_COLUMNS,
GDK_TYPE_PIXBUF, /* Status icon */
@@ -6220,9 +6011,6 @@
gtkblist->statusbox = pidgin_status_box_new();
gtk_box_pack_start(GTK_BOX(gtkblist->vbox), gtkblist->statusbox, FALSE, TRUE, 0);
gtk_widget_set_name(gtkblist->statusbox, "pidgin_blist_statusbox");
-#if !GTK_CHECK_VERSION(3,0,0)
- gtk_container_set_border_width(GTK_CONTAINER(gtkblist->statusbox), 3);
gtk_widget_show(gtkblist->statusbox);
/* set the Show Offline Buddies option. must be done
@@ -7119,13 +6907,6 @@
priv = PIDGIN_BUDDY_LIST_GET_PRIVATE(gtkblist);
-#if !GTK_CHECK_VERSION(3,0,0)
- gdk_cursor_unref(priv->hand_cursor);
- gdk_cursor_unref(priv->arrow_cursor);
- priv->hand_cursor = NULL;
- priv->arrow_cursor = NULL;
g_object_unref(priv->current_theme);
if (priv->select_notebook_page_timeout)
--- a/pidgin/gtkcertmgr.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/gtkcertmgr.c Mon Dec 21 22:14:59 2015 -0600
@@ -608,11 +608,7 @@
pidgin_create_dialog(_("Certificate Manager"),/* Title */
-#if GTK_CHECK_VERSION(3,0,0)
- PIDGIN_HIG_BORDER, /*Window border*/
TRUE); /* Allow resizing */
g_signal_connect(G_OBJECT(win), "delete_event",
--- a/pidgin/gtkconv.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/gtkconv.c Mon Dec 21 22:14:59 2015 -0600
@@ -5198,12 +5198,8 @@
pidgin_conv_end_quickfind(PidginConversation *gtkconv)
-#if GTK_CHECK_VERSION(3,0,0)
GtkStyleContext *context = gtk_widget_get_style_context(gtkconv->quickfind_entry);
gtk_style_context_remove_class(context, "not-found");
- gtk_widget_modify_base(gtkconv->quickfind_entry, GTK_STATE_NORMAL, NULL);
webkit_web_view_unmark_text_matches(WEBKIT_WEB_VIEW(gtkconv->webview));
gtk_widget_hide(gtkconv->quickfind_container);
@@ -5219,23 +5215,11 @@
if (webkit_web_view_search_text(WEBKIT_WEB_VIEW(gtkconv->webview), gtk_entry_get_text(GTK_ENTRY(entry)), FALSE, TRUE, TRUE)) {
-#if GTK_CHECK_VERSION(3,0,0)
GtkStyleContext *context = gtk_widget_get_style_context(gtkconv->quickfind_entry);
gtk_style_context_remove_class(context, "not-found");
- gtk_widget_modify_base(gtkconv->quickfind_entry, GTK_STATE_NORMAL, NULL);
-#if GTK_CHECK_VERSION(3,0,0)
GtkStyleContext *context = gtk_widget_get_style_context(gtkconv->quickfind_entry);
gtk_style_context_add_class(context, "not-found");
- gtk_widget_modify_base(gtkconv->quickfind_entry, GTK_STATE_NORMAL, &col);
@@ -5252,7 +5236,6 @@
GtkWidget *widget = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
GtkWidget *label, *entry, *close;
-#if GTK_CHECK_VERSION(3,0,0)
GtkStyleContext *context;
GtkCssProvider *filter_css;
const gchar filter_style[] =
@@ -5262,7 +5245,6 @@
"background-image: none;"
"background-color: @error_bg_color;"
gtk_box_pack_start(GTK_BOX(container), widget, FALSE, FALSE, 0);
@@ -5275,14 +5257,12 @@
gtk_box_pack_start(GTK_BOX(widget), entry, TRUE, TRUE, 0);
-#if GTK_CHECK_VERSION(3,0,0)
filter_css = gtk_css_provider_new();
gtk_css_provider_load_from_data(filter_css, filter_style, -1, NULL);
context = gtk_widget_get_style_context(entry);
gtk_style_context_add_provider(context,
GTK_STYLE_PROVIDER(filter_css),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
gtkconv->quickfind_entry = entry;
gtkconv->quickfind_container = widget;
@@ -8918,43 +8898,6 @@
default_conv_theme = purple_theme_manager_load_theme(theme_dir, "conversation");
-#if !GTK_CHECK_VERSION(3,0,0)
- /* Set default tab colors */
- GString *str = g_string_new(NULL);
- GtkSettings *settings = gtk_settings_get_default();
- GtkStyle *parent = gtk_rc_get_style_by_paths(settings, "tab-container.tab-label*", NULL, G_TYPE_NONE), *now;
- {"pidgin_tab_label_typing_default", "tab-label-typing", "#4e9a06"},
- {"pidgin_tab_label_typed_default", "tab-label-typed", "#c4a000"},
- {"pidgin_tab_label_attention_default", "tab-label-attention", "#006aff"},
- {"pidgin_tab_label_unreadchat_default", "tab-label-unreadchat", "#cc0000"},
- {"pidgin_tab_label_event_default", "tab-label-event", "#888a85"},
- for (iter = 0; styles[iter].stylename; iter++) {
- now = gtk_rc_get_style_by_paths(settings, styles[iter].labelname, NULL, G_TYPE_NONE);
- (parent && now && parent->rc_style == now->rc_style)) {
- g_string_append_printf(str, "style \"%s\" {\n"
- "fg[ACTIVE] = \"%s\"\n"
- "widget \"*%s\" style \"%s\"\n",
- styles[iter].stylename,
- styles[iter].labelname, styles[iter].stylename);
- gtk_rc_parse_string(str->str);
- g_string_free(str, TRUE);
- gtk_rc_reset_styles(settings);
@@ -9242,9 +9185,7 @@
notebook_init_grab(PidginConvWindow *gtkwin, GtkWidget *widget, GdkEvent *event)
static GdkCursor *cursor = NULL;
-#if GTK_CHECK_VERSION(3,0,0)
@@ -9259,23 +9200,12 @@
gtk_grab_add(gtkwin->notebook);
-#if GTK_CHECK_VERSION(3,0,0)
device = gdk_event_get_device(event);
if (!gdk_display_device_is_grabbed(gdk_device_get_display(device), device))
gdk_device_grab(device, gtk_widget_get_window(gtkwin->notebook),
GDK_OWNERSHIP_WINDOW, FALSE,
GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
cursor, gdk_event_get_time(event));
- /* Currently for win32 GTK+ (as of 2.2.1), gdk_pointer_is_grabbed will
- always be true after a button press. */
- if (!gdk_pointer_is_grabbed())
- gdk_pointer_grab(gtk_widget_get_window(gtkwin->notebook), FALSE,
- GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
- NULL, cursor, gdk_event_get_time(event));
@@ -9541,9 +9471,7 @@
gboolean new_window = FALSE;
gboolean to_right = FALSE;
-#if GTK_CHECK_VERSION(3,0,0)
* Don't check to make sure that the event's window matches the
@@ -9553,18 +9481,11 @@
if (e->button != 1 && e->type != GDK_BUTTON_RELEASE)
-#if GTK_CHECK_VERSION(3,0,0)
device = gdk_event_get_device((GdkEvent *)e);
if (gdk_display_device_is_grabbed(gdk_device_get_display(device), device)) {
gdk_device_ungrab(device, gdk_event_get_time((GdkEvent *)e));
- if (gdk_pointer_is_grabbed()) {
- gdk_pointer_ungrab(gdk_event_get_time((GdkEvent *)e));
- gtk_grab_remove(widget);
if (!win->in_predrag && !win->in_drag)
@@ -10367,7 +10288,6 @@
-#if GTK_CHECK_VERSION(3,0,0)
set_default_tab_colors(GtkWidget *widget)
@@ -10411,7 +10331,6 @@
g_string_free(str, TRUE);
pidgin_conv_window_add_gtkconv(PidginConvWindow *win, PidginConversation *gtkconv)
@@ -10448,9 +10367,7 @@
gtkconv->tab_label = gtk_label_new(tmp_lab = purple_conversation_get_title(conv));
-#if GTK_CHECK_VERSION(3,0,0)
set_default_tab_colors(gtkconv->tab_label);
gtk_widget_set_name(gtkconv->tab_label, "tab-label");
gtkconv->menu_tabby = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PIDGIN_HIG_BOX_SPACE);
@@ -10671,12 +10588,8 @@
-#if GTK_CHECK_VERSION(3,0,0)
gdkwin = gdk_device_get_window_at_position(gdk_event_get_device(event),
- gdkwin = gdk_window_at_pointer(&x, &y);
gdkwin = gdk_window_get_toplevel(gdkwin);
--- a/pidgin/gtkdebug.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/gtkdebug.c Mon Dec 21 22:14:59 2015 -0600
@@ -148,18 +148,13 @@
*****************************************************************************/
regex_clear_color(GtkWidget *w) {
-#if GTK_CHECK_VERSION(3,0,0)
GtkStyleContext *context = gtk_widget_get_style_context(w);
gtk_style_context_remove_class(context, "good-filter");
gtk_style_context_remove_class(context, "bad-filter");
- gtk_widget_modify_base(w, GTK_STATE_NORMAL, NULL);
regex_change_color(GtkWidget *w, gboolean success) {
-#if GTK_CHECK_VERSION(3,0,0)
GtkStyleContext *context = gtk_widget_get_style_context(w);
@@ -169,21 +164,6 @@
gtk_style_context_add_class(context, "bad-filter");
gtk_style_context_remove_class(context, "good-filter");
- gtk_widget_modify_base(w, GTK_STATE_NORMAL, &color);
@@ -438,7 +418,6 @@
-#if GTK_CHECK_VERSION(3,0,0)
GtkStyleContext *context;
GtkCssProvider *filter_css;
const gchar filter_style[] =
@@ -454,7 +433,6 @@
"background-image: none;"
"background-color: @success_color;"
win = g_new0(DebugWindow, 1);
@@ -548,14 +526,12 @@
gtk_container_add(GTK_CONTAINER(item), GTK_WIDGET(win->expression));
gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item));
-#if GTK_CHECK_VERSION(3,0,0)
filter_css = gtk_css_provider_new();
gtk_css_provider_load_from_data(filter_css, filter_style, -1, NULL);
context = gtk_widget_get_style_context(win->expression);
gtk_style_context_add_provider(context,
GTK_STYLE_PROVIDER(filter_css),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
/* this needs to be before the text is set from the pref if we want it
* to colorize a stored expression.
--- a/pidgin/gtkdialogs.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/gtkdialogs.c Mon Dec 21 22:14:59 2015 -0600
@@ -467,13 +467,8 @@
-#if GTK_CHECK_VERSION(3,0,0)
win = pidgin_create_dialog(title, 0, role, TRUE);
vbox = pidgin_dialog_get_vbox_with_properties(GTK_DIALOG(win), FALSE, 0);
- win = pidgin_create_dialog(title, PIDGIN_HIG_BORDER, role, TRUE);
- vbox = pidgin_dialog_get_vbox_with_properties(GTK_DIALOG(win), FALSE, PIDGIN_HIG_BORDER);
gtk_window_set_default_size(GTK_WINDOW(win), 475, 450);
/* Generate a logo with a version number */
@@ -624,11 +619,7 @@
g_string_append(str, "<dt>Plugins:</dt><dd>Disabled</dd>");
g_string_append(str, "<dt>SSL:</dt><dd>SSL support is present.</dd>");
- g_string_append(str, "<dt>SSL:</dt><dd>SSL support was <strong><em>NOT</em></strong> compiled!</dd>");
g_string_append_printf(str, "<dt>GTK+ Runtime:</dt><dd>%u.%u.%u</dd>"
"<dt>GLib Runtime:</dt><dd>%u.%u.%u</dd>",
--- a/pidgin/gtkdnd-hints.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/gtkdnd-hints.c Mon Dec 21 22:14:59 2015 -0600
@@ -48,8 +48,6 @@
-#if GTK_CHECK_VERSION(3,0,0)
dnd_hints_realized_cb(GtkWidget *window, GtkWidget *pix)
@@ -99,41 +97,6 @@
-dnd_hints_init_window(const gchar *fname)
- pixbuf = gdk_pixbuf_new_from_file(fname, NULL);
- g_return_val_if_fail(pixbuf, NULL);
- win = gtk_window_new(GTK_WINDOW_POPUP);
- colormap = gtk_widget_get_colormap(win);
- gdk_pixbuf_render_pixmap_and_mask_for_colormap(pixbuf, colormap,
- &pixmap, &bitmap, 128);
- g_object_unref(G_OBJECT(pixbuf));
- pix = gtk_image_new_from_pixmap(pixmap, bitmap);
- gtk_container_add(GTK_CONTAINER(win), pix);
- gtk_widget_shape_combine_mask(win, bitmap, 0, 0);
- g_object_unref(G_OBJECT(pixmap));
- g_object_unref(G_OBJECT(bitmap));
- gtk_widget_show_all(pix);
get_widget_coords(GtkWidget *w, gint *x1, gint *y1, gint *x2, gint *y2)
--- a/pidgin/gtkdocklet.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/gtkdocklet.c Mon Dec 21 22:14:59 2015 -0600
@@ -107,18 +107,6 @@
gtk_status_icon_set_from_icon_name(docklet, icon_name);
-#if !GTK_CHECK_VERSION(3,0,0)
- if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/docklet/blink")) {
- gboolean pending = FALSE;
- pending |= (newflag & PIDGIN_DOCKLET_EMAIL_PENDING);
- pending |= (newflag & PIDGIN_DOCKLET_CONV_PENDING);
- gtk_status_icon_set_blinking(docklet, pending &&
- !(newflag & PIDGIN_DOCKLET_CONNECTING));
- } else if (gtk_status_icon_get_blinking(docklet)) {
- gtk_status_icon_set_blinking(docklet, FALSE);
@@ -341,15 +329,6 @@
gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(toggle)));
-#if !GTK_CHECK_VERSION(3,0,0)
-docklet_toggle_blink(GtkWidget *toggle, void *data)
- purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/docklet/blink",
- gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(toggle)));
docklet_toggle_blist(GtkWidget *toggle, void *data)
@@ -761,13 +740,6 @@
g_signal_connect(G_OBJECT(menuitem), "toggled", G_CALLBACK(docklet_toggle_mute), NULL);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
-#if !GTK_CHECK_VERSION(3,0,0)
- menuitem = gtk_check_menu_item_new_with_mnemonic(_("_Blink on New Message"));
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem), purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/docklet/blink"));
- g_signal_connect(G_OBJECT(menuitem), "toggled", G_CALLBACK(docklet_toggle_blink), NULL);
- gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
--- a/pidgin/gtkmedia.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/gtkmedia.c Mon Dec 21 22:14:59 2015 -0600
@@ -922,11 +922,7 @@
PidginMediaRealizeData *data;
-#if GTK_CHECK_VERSION(3,0,0)
GdkRGBA color = {0.0, 0.0, 0.0, 1.0};
- GdkColor color = {0, 0, 0, 0};
aspect = gtk_aspect_frame_new(NULL, 0, 0, 4.0/3.0, FALSE);
gtk_frame_set_shadow_type(GTK_FRAME(aspect), GTK_SHADOW_IN);
@@ -938,11 +934,7 @@
data->participant = g_strdup(gtkmedia->priv->screenname);
remote_video = gtk_drawing_area_new();
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_override_background_color(remote_video, GTK_STATE_FLAG_NORMAL, &color);
- gtk_widget_modify_bg(remote_video, GTK_STATE_NORMAL, &color);
g_signal_connect(G_OBJECT(remote_video), "realize",
G_CALLBACK(realize_cb), data);
gtk_container_add(GTK_CONTAINER(aspect), remote_video);
@@ -961,11 +953,7 @@
PidginMediaRealizeData *data;
-#if GTK_CHECK_VERSION(3,0,0)
GdkRGBA color = {0.0, 0.0, 0.0, 1.0};
- GdkColor color = {0, 0, 0, 0};
aspect = gtk_aspect_frame_new(NULL, 0, 0, 4.0/3.0, TRUE);
gtk_frame_set_shadow_type(GTK_FRAME(aspect), GTK_SHADOW_IN);
@@ -977,11 +965,7 @@
data->participant = NULL;
local_video = gtk_drawing_area_new();
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_override_background_color(local_video, GTK_STATE_FLAG_NORMAL, &color);
- gtk_widget_modify_bg(local_video, GTK_STATE_NORMAL, &color);
g_signal_connect(G_OBJECT(local_video), "realize",
G_CALLBACK(realize_cb), data);
gtk_container_add(GTK_CONTAINER(aspect), local_video);
@@ -1141,8 +1125,7 @@
- if (media->priv->screenname)
- g_free(media->priv->screenname);
+ g_free(media->priv->screenname); media->priv->screenname = g_value_dup_string(value);
--- a/pidgin/gtkmenutray.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/gtkmenutray.c Mon Dec 21 22:14:59 2015 -0600
@@ -45,7 +45,6 @@
/******************************************************************************
*****************************************************************************/
-#if GTK_CHECK_VERSION(3,0,0)
pidgin_menu_tray_select(GtkMenuItem *widget) {
/* this may look like nothing, but it's really overriding the
@@ -60,21 +59,6 @@
* overridding the select, so it makes sense to override deselect as well.
-pidgin_menu_tray_select(GtkItem *widget) {
- /* this may look like nothing, but it's really overriding the
- * GtkMenuItem's select function so that it doesn't get highlighted like
- * a normal menu item would.
-pidgin_menu_tray_deselect(GtkItem *widget) {
- /* Probably not necessary, but I'd rather be safe than sorry. We're
- * overridding the select, so it makes sense to override deselect as well.
/******************************************************************************
@@ -125,11 +109,7 @@
pidgin_menu_tray_class_init(PidginMenuTrayClass *klass) {
GObjectClass *object_class = G_OBJECT_CLASS(klass);
-#if GTK_CHECK_VERSION(3,0,0)
GtkMenuItemClass *menu_item_class = GTK_MENU_ITEM_CLASS(klass);
- GtkItemClass *menu_item_class = GTK_ITEM_CLASS(klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
--- a/pidgin/gtknotify.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/gtknotify.c Mon Dec 21 22:14:59 2015 -0600
@@ -888,9 +888,6 @@
window = gtk_dialog_new();
gtk_window_set_title(GTK_WINDOW(window), title);
-#if !GTK_CHECK_VERSION(3,0,0)
- gtk_container_set_border_width(GTK_CONTAINER(window), PIDGIN_HIG_BORDER);
gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
g_signal_connect(G_OBJECT(window), "delete_event",
--- a/pidgin/gtkplugin.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/gtkplugin.c Mon Dec 21 22:14:59 2015 -0600
@@ -808,15 +808,9 @@
pidgin_plugins_paint_tooltip(GtkWidget *tipwindow, cairo_t *cr, gpointer data)
PangoLayout *layout = g_object_get_data(G_OBJECT(tipwindow), "tooltip-plugin");
-#if GTK_CHECK_VERSION(3,0,0)
GtkStyleContext *context = gtk_widget_get_style_context(tipwindow);
gtk_style_context_add_class(context, GTK_STYLE_CLASS_TOOLTIP);
gtk_render_layout(context, cr, 6, 6, layout);
- gtk_paint_layout(tipwindow->style, tipwindow->window, GTK_STATE_NORMAL, FALSE,
- NULL, tipwindow, "tooltip",
--- a/pidgin/gtkpluginpref.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/gtkpluginpref.c Mon Dec 21 22:14:59 2015 -0600
@@ -203,9 +203,6 @@
sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
parent = ret = gtk_box_new(GTK_ORIENTATION_VERTICAL, 16);
-#if !GTK_CHECK_VERSION(3,0,0)
- gtk_container_set_border_width(GTK_CONTAINER(ret), PIDGIN_HIG_BORDER);
for(pp = purple_plugin_pref_frame_get_prefs(frame);
--- a/pidgin/gtkpounce.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/gtkpounce.c Mon Dec 21 22:14:59 2015 -0600
@@ -545,9 +545,6 @@
dialog->window = window = gtk_dialog_new();
gtk_window_set_title(GTK_WINDOW(window), (cur_pounce == NULL ? _("Add Buddy Pounce") : _("Modify Buddy Pounce")));
gtk_window_set_role(GTK_WINDOW(window), "buddy_pounce");
-#if !GTK_CHECK_VERSION(3,0,0)
- gtk_container_set_border_width(GTK_CONTAINER(dialog->window), PIDGIN_HIG_BORDER);
g_signal_connect(G_OBJECT(window), "delete_event",
G_CALLBACK(delete_win_cb), dialog);
@@ -1343,11 +1340,8 @@
width = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/pounces/dialog/width");
height = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/pounces/dialog/height");
-#if GTK_CHECK_VERSION(3,0,0)
dialog->window = win = pidgin_create_dialog(_("Buddy Pounces"), 0, "pounces", TRUE);
- dialog->window = win = pidgin_create_dialog(_("Buddy Pounces"), PIDGIN_HIG_BORDER, "pounces", TRUE);
gtk_window_set_default_size(GTK_WINDOW(win), width, height);
g_signal_connect(G_OBJECT(win), "delete_event",
--- a/pidgin/gtkprefs.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/gtkprefs.c Mon Dec 21 22:14:59 2015 -0600
@@ -56,12 +56,7 @@
-#if GST_CHECK_VERSION(1,0,0)
#include <gst/video/videooverlay.h>
-#include <gst/interfaces/xoverlay.h>
-#include <gst/interfaces/propertyprobe.h>
#ifdef GDK_WINDOWING_WIN32
#include <gdk/gdkwin32.h>
@@ -1988,7 +1983,6 @@
network_ip_changed(GtkEntry *entry, gpointer data)
-#if GTK_CHECK_VERSION(3,0,0)
const gchar *text = gtk_entry_get_text(entry);
GtkStyleContext *context = gtk_widget_get_style_context(GTK_WIDGET(entry));
@@ -2007,30 +2001,6 @@
gtk_style_context_remove_class(context, "bad-ip");
gtk_style_context_remove_class(context, "good-ip");
- const gchar *text = gtk_entry_get_text(entry);
- if (purple_ip_address_is_valid(text)) {
- purple_network_set_public_ip(text);
- gtk_widget_modify_base(GTK_WIDGET(entry), GTK_STATE_NORMAL, &color);
- purple_network_set_public_ip("");
- gtk_widget_modify_base(GTK_WIDGET(entry), GTK_STATE_NORMAL, NULL);
@@ -2153,7 +2123,6 @@
GtkWidget *vbox, *hbox, *entry;
GtkWidget *label, *auto_ip_checkbox, *ports_checkbox, *spin_button;
-#if GTK_CHECK_VERSION(3,0,0)
GtkStyleContext *context;
@@ -2169,7 +2138,6 @@
"background-image: none;"
"background-color: @success_color;"
ret = gtk_box_new(GTK_ORIENTATION_VERTICAL, PIDGIN_HIG_CAT_SPACE);
gtk_container_set_border_width (GTK_CONTAINER (ret), PIDGIN_HIG_BORDER);
@@ -2211,14 +2179,12 @@
g_signal_connect(G_OBJECT(entry), "changed",
G_CALLBACK(network_ip_changed), NULL);
-#if GTK_CHECK_VERSION(3,0,0)
ip_css = gtk_css_provider_new();
gtk_css_provider_load_from_data(ip_css, ip_style, -1, NULL);
context = gtk_widget_get_style_context(entry);
gtk_style_context_add_provider(context,
GTK_STYLE_PROVIDER(ip_css),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
hbox = pidgin_add_widget_to_vbox(GTK_BOX(vbox), _("Public _IP:"),
@@ -3482,17 +3448,6 @@
-#if !GST_CHECK_VERSION(1,0,0)
- GstPropertyProbe *probe;
- const GParamSpec *pspec;
ret = g_list_prepend(ret, g_strdup(_("Default")));
ret = g_list_prepend(ret, g_strdup(""));
@@ -3524,99 +3479,8 @@
return g_list_reverse(ret);
-#if GST_CHECK_VERSION(1,0,0)
purple_debug_info("vvconfig", "'%s' - gstreamer-1.0 doesn't suport "
"property probing\n", element_name);
- if (g_object_class_find_property(klass, "device"))
- probe_attr = PROBE_DEVICE;
- else if (g_object_class_find_property(klass, "device-index") &&
- g_object_class_find_property(klass, "device-name"))
- probe_attr = PROBE_NAME;
- probe_attr = PROBE_NONE;
- if (!GST_IS_PROPERTY_PROBE(element))
- probe_attr = PROBE_NONE;
- if (probe_attr == PROBE_NONE)
- purple_debug_info("vvconfig", "'%s' - no possibility to probe "
- "for devices\n", element_name);
- gst_object_unref(element);
- return g_list_reverse(ret);
- probe = GST_PROPERTY_PROBE(element);
- if (probe_attr == PROBE_DEVICE)
- pspec = gst_property_probe_get_property(probe, "device");
- else /* probe_attr == PROBE_NAME */
- pspec = gst_property_probe_get_property(probe, "device-name");
- purple_debug_info("vvconfig", "'%s' - creating probe failed\n",
- gst_object_unref(element);
- return g_list_reverse(ret);
- /* Set autoprobe[-fps] to FALSE to avoid delays when probing. */
- if (g_object_class_find_property(klass, "autoprobe"))
- g_object_set(G_OBJECT(element), "autoprobe", FALSE, NULL);
- if (g_object_class_find_property(klass, "autoprobe-fps"))
- g_object_set(G_OBJECT(element), "autoprobe-fps", FALSE, NULL);
- array = gst_property_probe_probe_and_get_values(probe, pspec);
- purple_debug_info("vvconfig", "'%s' has no devices\n",
- gst_object_unref(element);
- return g_list_reverse(ret);
- for (i = 0; i < array->n_values; i++) {
- const gchar *device_name;
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- /* GValueArray is in gstreamer-0.10 API */
- device = g_value_array_get_nth(array, i);
-G_GNUC_END_IGNORE_DEPRECATIONS
- if (probe_attr == PROBE_DEVICE) {
- g_object_set_property(G_OBJECT(element), "device",
- if (gst_element_set_state(element, GST_STATE_READY)
- != GST_STATE_CHANGE_SUCCESS)
- purple_debug_warning("vvconfig", "Error "
- "changing state of %s\n", element_name);
- g_object_get(G_OBJECT(element), "device-name", &name,
- device_name = g_strdup(g_value_get_string(device));
- } else /* probe_attr == PROBE_NAME */ {
- name = g_strdup(g_value_get_string(device));
- device_name = g_strdup_printf("%d", i);
- purple_debug_info("vvconfig", "Found device %s: %s for %s\n",
- device_name, name, element_name);
- ret = g_list_prepend(ret, (gpointer)name);
- ret = g_list_prepend(ret, (gpointer)device_name);
- gst_element_set_state(element, GST_STATE_NULL);
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- /* GValueArray is in gstreamer-0.10 API */
- g_value_array_free(array);
-G_GNUC_END_IGNORE_DEPRECATIONS
gst_object_unref(element);
return g_list_reverse(ret);
@@ -4011,19 +3875,11 @@
-#if GTK_CHECK_VERSION(3,0,0)
GdkRGBA color = {0.0, 0.0, 0.0, 1.0};
- GdkColor color = {0, 0, 0, 0};
video_drawing_area = video = gtk_drawing_area_new();
gtk_box_pack_start(GTK_BOX(vbox), video, TRUE, TRUE, 0);
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_override_background_color(video, GTK_STATE_FLAG_NORMAL, &color);
- gtk_widget_modify_bg(video, GTK_STATE_NORMAL, &color);
gtk_widget_set_size_request(GTK_WIDGET(video), 240, 180);
test = gtk_toggle_button_new_with_label(_("Test Video"));
@@ -4208,11 +4064,7 @@
/* Back to instant-apply! I win! BU-HAHAHA! */
-#if GTK_CHECK_VERSION(3,0,0)
prefs = pidgin_create_dialog(_("Preferences"), 0, "preferences", FALSE);
- prefs = pidgin_create_dialog(_("Preferences"), PIDGIN_HIG_BORDER, "preferences", FALSE);
g_signal_connect(G_OBJECT(prefs), "destroy",
G_CALLBACK(delete_prefs), NULL);
--- a/pidgin/gtkrequest.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/gtkrequest.c Mon Dec 21 22:14:59 2015 -0600
@@ -37,9 +37,6 @@
#define GCR_API_SUBJECT_TO_CHANGE
-#if !GTK_CHECK_VERSION(3,0,0)
-#include <gcr/gcr-simple-certificate.h>
--- a/pidgin/gtkroomlist.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/gtkroomlist.c Mon Dec 21 22:14:59 2015 -0600
@@ -355,23 +355,16 @@
int current_height, max_width;
GtkTextDirection dir = gtk_widget_get_direction(GTK_WIDGET(grl->tree));
-#if GTK_CHECK_VERSION(3,0,0)
GtkStyleContext *context;
context = gtk_widget_get_style_context(grl->tipwindow);
gtk_style_context_add_class(context, GTK_STYLE_CLASS_TOOLTIP);
- style = gtk_widget_get_style(grl->tipwindow);
max_text_width = MAX(grl->tip_width, grl->tip_name_width);
max_width = TOOLTIP_BORDER + SMALL_SPACE + max_text_width + TOOLTIP_BORDER;
-#if GTK_CHECK_VERSION(3,0,0)
if (dir == GTK_TEXT_DIR_RTL) {
gtk_render_layout(context, cr,
max_width - (TOOLTIP_BORDER + SMALL_SPACE) - PANGO_PIXELS(600000),
@@ -394,34 +387,6 @@
current_height + grl->tip_name_height,
- if (dir == GTK_TEXT_DIR_RTL) {
- gtk_paint_layout(style, grl->tipwindow->window, GTK_STATE_NORMAL, FALSE,
- NULL, grl->tipwindow, "tooltip",
- max_width - (TOOLTIP_BORDER + SMALL_SPACE) - PANGO_PIXELS(600000),
- gtk_paint_layout(style, grl->tipwindow->window, GTK_STATE_NORMAL, FALSE,
- NULL, grl->tipwindow, "tooltip",
- TOOLTIP_BORDER + SMALL_SPACE,
- if (dir != GTK_TEXT_DIR_RTL) {
- gtk_paint_layout(style, grl->tipwindow->window, GTK_STATE_NORMAL, FALSE,
- NULL, grl->tipwindow, "tooltip",
- TOOLTIP_BORDER + SMALL_SPACE,
- current_height + grl->tip_name_height,
- gtk_paint_layout(style, grl->tipwindow->window, GTK_STATE_NORMAL, FALSE,
- NULL, grl->tipwindow, "tooltip",
- max_width - (TOOLTIP_BORDER + SMALL_SPACE) - PANGO_PIXELS(600000),
- current_height + grl->tip_name_height,
@@ -567,11 +532,7 @@
dialog->account = account;
-#if GTK_CHECK_VERSION(3,0,0)
dialog->window = window = pidgin_create_dialog(_("Room List"), 0, "room list", TRUE);
- dialog->window = window = pidgin_create_dialog(_("Room List"), PIDGIN_HIG_BORDER, "room list", TRUE);
g_signal_connect(G_OBJECT(window), "delete_event",
G_CALLBACK(delete_win_cb), dialog);
--- a/pidgin/gtksmiley-manager.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/gtksmiley-manager.c Mon Dec 21 22:14:59 2015 -0600
@@ -339,47 +339,26 @@
-#if !GTK_CHECK_VERSION(3,0,0)
- gtk_container_set_border_width(
- GTK_CONTAINER(edit_dialog->window), PIDGIN_HIG_BORDER);
-#if GTK_CHECK_VERSION(3,0,0)
gtk_grid_set_row_spacing(GTK_GRID(vbox), PIDGIN_HIG_BORDER);
- vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_BORDER);
gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(
edit_dialog->window)), vbox);
-#if GTK_CHECK_VERSION(3,0,0)
gtk_grid_set_column_spacing(GTK_GRID(hbox), PIDGIN_HIG_BORDER);
gtk_grid_attach(GTK_GRID(vbox), hbox, 0, 0, 1, 1);
- hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BORDER);
- gtk_container_add(GTK_CONTAINER(GTK_VBOX(vbox)), hbox);
label = GTK_LABEL(gtk_label_new_with_mnemonic(_("_Image:")));
-#if GTK_CHECK_VERSION(3,0,0)
gtk_grid_attach(GTK_GRID(hbox), GTK_WIDGET(label), 0, 0, 1, 1);
- gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(label), FALSE, FALSE, 0);
gtk_widget_show(GTK_WIDGET(label));
filech = GTK_BUTTON(gtk_button_new());
-#if GTK_CHECK_VERSION(3,0,0)
gtk_grid_attach_next_to(GTK_GRID(hbox), GTK_WIDGET(filech), NULL,
- gtk_box_pack_end(GTK_BOX(hbox), GTK_WIDGET(filech), FALSE, FALSE, 0);
pidgin_set_accessible_label(GTK_WIDGET(filech), label);
edit_dialog->thumbnail = GTK_IMAGE(gtk_image_new());
@@ -389,37 +368,23 @@
gtk_widget_show_all(hbox);
-#if GTK_CHECK_VERSION(3,0,0)
gtk_grid_set_column_spacing(GTK_GRID(hbox), PIDGIN_HIG_BORDER);
gtk_grid_attach_next_to(GTK_GRID(vbox), hbox, NULL,
- hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BORDER);
- gtk_container_add(GTK_CONTAINER(GTK_VBOX(vbox)), hbox);
label = GTK_LABEL(gtk_label_new_with_mnemonic(_("S_hortcut text:")));
-#if GTK_CHECK_VERSION(3,0,0)
gtk_grid_attach(GTK_GRID(hbox), GTK_WIDGET(label), 0, 0, 1, 1);
- gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(label), FALSE, FALSE, 0);
gtk_widget_show(GTK_WIDGET(label));
edit_dialog->shortcut = GTK_ENTRY(gtk_entry_new());
gtk_entry_set_activates_default(edit_dialog->shortcut, TRUE);
pidgin_set_accessible_label(GTK_WIDGET(edit_dialog->shortcut), label);
-#if GTK_CHECK_VERSION(3,0,0)
gtk_grid_attach_next_to(GTK_GRID(hbox),
GTK_WIDGET(edit_dialog->shortcut), NULL, GTK_POS_RIGHT, 1, 1);
- gtk_box_pack_end(GTK_BOX(hbox), GTK_WIDGET(edit_dialog->shortcut),
gtk_widget_show(GTK_WIDGET(edit_dialog->shortcut));
@@ -810,9 +775,6 @@
gtk_window_set_default_size(GTK_WINDOW(win), 50, 400);
gtk_window_set_role(GTK_WINDOW(win), "custom_smiley_manager");
-#if !GTK_CHECK_VERSION(3,0,0)
- gtk_container_set_border_width(GTK_CONTAINER(win), PIDGIN_HIG_BORDER);
gtk_dialog_set_response_sensitive(win, GTK_RESPONSE_NO, FALSE);
gtk_dialog_set_response_sensitive(win, PIDGIN_RESPONSE_MODIFY, FALSE);
--- a/pidgin/gtksound.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/gtksound.c Mon Dec 21 22:14:59 2015 -0600
@@ -554,11 +554,7 @@
-#if GST_CHECK_VERSION(1,0,0)
play = gst_element_factory_make("playbin", "play");
- play = gst_element_factory_make("playbin2", "play");
--- a/pidgin/gtkstatusbox.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/gtkstatusbox.c Mon Dec 21 22:14:59 2015 -0600
@@ -71,14 +71,9 @@
static void status_menu_refresh_iter(PidginStatusBox *status_box, gboolean status_changed);
static void pidgin_status_box_regenerate(PidginStatusBox *status_box, gboolean status_changed);
static void pidgin_status_box_changed(PidginStatusBox *box);
-#if GTK_CHECK_VERSION(3,0,0)
static void pidgin_status_box_get_preferred_height (GtkWidget *widget,
gint *minimum_height, gint *natural_height);
static gboolean pidgin_status_box_draw (GtkWidget *widget, cairo_t *cr);
-static void pidgin_status_box_size_request (GtkWidget *widget, GtkRequisition *requisition);
-static gboolean pidgin_status_box_expose_event (GtkWidget *widget, GdkEventExpose *event);
static void pidgin_status_box_size_allocate (GtkWidget *widget, GtkAllocation *allocation);
static void pidgin_status_box_redisplay_buddy_icon(PidginStatusBox *status_box);
static void pidgin_status_box_forall (GtkContainer *container, gboolean include_internals, GtkCallback callback, gpointer callback_data);
@@ -451,13 +446,8 @@
gtk_widget_destroy(statusbox->icon_box);
-#if GTK_CHECK_VERSION(3,0,0)
g_object_unref(statusbox->hand_cursor);
g_object_unref(statusbox->arrow_cursor);
- gdk_cursor_unref(statusbox->hand_cursor);
- gdk_cursor_unref(statusbox->arrow_cursor);
if (statusbox->buddy_icon_img)
g_object_unref(statusbox->buddy_icon_img);
@@ -566,13 +556,8 @@
parent_class = g_type_class_peek_parent(klass);
widget_class = (GtkWidgetClass*)klass;
-#if GTK_CHECK_VERSION(3,0,0)
widget_class->get_preferred_height = pidgin_status_box_get_preferred_height;
widget_class->draw = pidgin_status_box_draw;
- widget_class->size_request = pidgin_status_box_size_request;
- widget_class->expose_event = pidgin_status_box_expose_event;
widget_class->size_allocate = pidgin_status_box_size_allocate;
container_class->child_type = pidgin_status_box_child_type;
@@ -1325,7 +1310,6 @@
popup_grab_on_window(GdkWindow *window, GdkEvent *event)
guint32 activate_time = gdk_event_get_time(event);
-#if GTK_CHECK_VERSION(3,0,0)
GdkDevice *device = gdk_event_get_device(event);
@@ -1346,23 +1330,6 @@
- if ((gdk_pointer_grab(window, TRUE,
- GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
- GDK_POINTER_MOTION_MASK,
- NULL, NULL, activate_time) == 0))
- if (gdk_keyboard_grab(window, TRUE, activate_time) == 0)
- gdk_display_pointer_ungrab(gdk_window_get_display(window),
@@ -1396,22 +1363,15 @@
pidgin_status_box_popdown(PidginStatusBox *box, GdkEvent *event)
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_hide(box->popup_window);
box->popup_in_progress = FALSE;
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(box->toggle_button), FALSE);
gtk_grab_remove(box->popup_window);
time = gdk_event_get_time(event);
-#if GTK_CHECK_VERSION(3,0,0)
device = gdk_event_get_device(event);
gdk_device_ungrab(device, time);
gdk_device_ungrab(gdk_device_get_associated_device(device), time);
- gdk_pointer_ungrab(time);
- gdk_keyboard_ungrab(time);
@@ -1911,7 +1871,6 @@
-#if GTK_CHECK_VERSION(3,0,0)
pidgin_status_box_get_preferred_height(GtkWidget *widget, gint *minimum_height,
@@ -1937,30 +1896,6 @@
*natural_height += box_nat_height + border_width * 2;
-pidgin_status_box_size_request(GtkWidget *widget,
- GtkRequisition *requisition)
- GtkRequisition box_req;
- gint border_width = GTK_CONTAINER (widget)->border_width;
- gtk_widget_size_request(PIDGIN_STATUS_BOX(widget)->toggle_button, requisition);
- /* Make this icon the same size as other buddy icons in the list; unless it already wants to be bigger */
- requisition->height = MAX(requisition->height, 34);
- requisition->height += border_width * 2;
- /* If the gtkwebview is visible, then add some additional padding */
- if (PIDGIN_STATUS_BOX(widget)->webview_visible) {
- gtk_widget_size_request(PIDGIN_STATUS_BOX(widget)->vbox, &box_req);
- if (box_req.height > 1)
- requisition->height += box_req.height + border_width * 2;
- requisition->width = 1;
@@ -2051,7 +1986,6 @@
gtk_widget_set_allocation(GTK_WIDGET(status_box), allocation);
-#if GTK_CHECK_VERSION(3,0,0)
pidgin_status_box_draw(GtkWidget *widget, cairo_t *cr)
@@ -2069,22 +2003,6 @@
-pidgin_status_box_expose_event(GtkWidget *widget,
- PidginStatusBox *status_box = PIDGIN_STATUS_BOX(widget);
- gtk_container_propagate_expose(GTK_CONTAINER(widget), status_box->vbox, event);
- gtk_container_propagate_expose(GTK_CONTAINER(widget), status_box->toggle_button, event);
- if (status_box->icon_box && status_box->icon_opaque) {
- gtk_paint_box(widget->style, widget->window, GTK_STATE_NORMAL, GTK_SHADOW_OUT, NULL,
- status_box->icon_box, "button", status_box->icon_box->allocation.x-1, status_box->icon_box->allocation.y-1,
pidgin_status_box_forall(GtkContainer *container,
@@ -2396,11 +2314,8 @@
gtk_widget_hide(status_box->vbox);
status_box->webview_visible = FALSE;
if (status_box->account == NULL) {
--- a/pidgin/gtkutils.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/gtkutils.c Mon Dec 21 22:14:59 2015 -0600
@@ -210,11 +210,6 @@
/* don't allow focus on the close button */
gtk_button_set_focus_on_click(GTK_BUTTON(button), FALSE);
- /* set style to make it as small as possible */
-#if !GTK_CHECK_VERSION(3,0,0)
- gtk_widget_set_name(button, "pidgin-small-close-button");
gtk_container_add(GTK_CONTAINER(button), image);
@@ -2116,11 +2111,7 @@
cursor = gdk_cursor_new(cursor_type);
gdk_window_set_cursor(gtk_widget_get_window(widget), cursor);
-#if GTK_CHECK_VERSION(3,0,0)
- gdk_cursor_unref(cursor);
gdk_display_flush(gdk_window_get_display(gtk_widget_get_window(widget)));
@@ -2805,14 +2796,8 @@
GtkComboBoxText *ret = NULL;
GtkWidget *the_entry = NULL;
-#if GTK_CHECK_VERSION(2,24,0)
ret = GTK_COMBO_BOX_TEXT(gtk_combo_box_text_new_with_entry());
the_entry = gtk_bin_get_child(GTK_BIN(ret));
- ret = GTK_COMBO_BOX(gtk_combo_box_entry_new_text());
- the_entry = gtk_entry_new();
- gtk_container_add(GTK_CONTAINER(ret), the_entry);
gtk_entry_set_text(GTK_ENTRY(the_entry), default_item);
@@ -3554,11 +3539,7 @@
#if GTK_CHECK_VERSION(3,8,0)
gtk_container_add(GTK_CONTAINER(sw), child);
-#if GTK_CHECK_VERSION(3,0,0)
if (GTK_IS_SCROLLABLE(child))
- if (GTK_WIDGET_GET_CLASS(child)->set_scroll_adjustments_signal)
-#endif /* GTK_CHECK_VERSION(3,0,0) */
gtk_container_add(GTK_CONTAINER(sw), child);
gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), child);
@@ -3584,21 +3565,6 @@
/* Example custom URL handler. */
pidgin_webview_class_register_protocol("open://", open_dialog, dummy);
- /* Used to make small buttons */
-#if !GTK_CHECK_VERSION(3,0,0)
- gtk_rc_parse_string("style \"pidgin-small-close-button\"\n"
- "GtkWidget::focus-padding = 0\n"
- "GtkWidget::focus-line-width = 0\n"
- "GtkContainer::border-width = 0\n"
- "GtkButton::inner-border = {0, 0, 0, 0}\n"
- "GtkButton::default-border = {0, 0, 0, 0}\n"
- "widget \"*.pidgin-small-close-button\" style \"pidgin-small-close-button\"");
winpidgin_register_win32_url_handlers();
--- a/pidgin/gtkwhiteboard.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/gtkwhiteboard.c Mon Dec 21 22:14:59 2015 -0600
@@ -87,11 +87,6 @@
pidgin_whiteboard_draw_event(GtkWidget *widget, cairo_t *cr,
-#if !GTK_CHECK_VERSION(3,0,0)
-pidgin_whiteboard_expose_event(GtkWidget *widget, GdkEventExpose *event,
static gboolean pidgin_whiteboard_brush_down(GtkWidget *widget, GdkEventButton *event, gpointer data);
static gboolean pidgin_whiteboard_brush_motion(GtkWidget *widget, GdkEventMotion *event, gpointer data);
@@ -219,19 +214,11 @@
gtk_widget_show(drawing_area);
/* Signals used to handle backing pixmap */
-#if GTK_CHECK_VERSION(3,0,0)
g_signal_connect(G_OBJECT(drawing_area), "draw",
G_CALLBACK(pidgin_whiteboard_draw_event), gtkwb);
g_signal_connect(G_OBJECT(drawing_area), "configure-event",
G_CALLBACK(pidgin_whiteboard_configure_event), gtkwb);
- g_signal_connect(G_OBJECT(drawing_area), "expose_event",
- G_CALLBACK(pidgin_whiteboard_expose_event), gtkwb);
- g_signal_connect(G_OBJECT(drawing_area), "configure_event",
- G_CALLBACK(pidgin_whiteboard_configure_event), gtkwb);
g_signal_connect(G_OBJECT(drawing_area), "button_press_event",
@@ -389,9 +376,7 @@
PidginWhiteboard *gtkwb = (PidginWhiteboard*)data;
GtkAllocation allocation;
-#if GTK_CHECK_VERSION(3,0,0)
GdkRGBA white = {1.0, 1.0, 1.0, 1.0};
cairo_destroy(gtkwb->priv->cr);
@@ -403,11 +388,7 @@
gtkwb->priv->surface = cairo_image_surface_create(CAIRO_FORMAT_RGB24,
allocation.width, allocation.height);
gtkwb->priv->cr = cr = cairo_create(gtkwb->priv->surface);
-#if GTK_CHECK_VERSION(3,0,0)
gdk_cairo_set_source_rgba(cr, &white);
- gdk_cairo_set_source_color(cr, >k_widget_get_style(widget)->white);
cairo_rectangle(cr, 0, 0, allocation.width, allocation.height);
@@ -426,23 +407,6 @@
-#if !GTK_CHECK_VERSION(3,0,0)
-pidgin_whiteboard_expose_event(GtkWidget *widget, GdkEventExpose *event,
- cr = gdk_cairo_create(GDK_DRAWABLE(widget->window));
- pidgin_whiteboard_draw_event(widget, cr, _gtkwb);
static gboolean pidgin_whiteboard_brush_down(GtkWidget *widget, GdkEventButton *event, gpointer data)
PidginWhiteboard *gtkwb = (PidginWhiteboard*)data;
@@ -502,12 +466,8 @@
GList *draw_list = purple_whiteboard_get_draw_list(wb);
-#if GTK_CHECK_VERSION(3,0,0)
gdk_window_get_device_position(event->window, event->device, &x, &y,
- gdk_window_get_pointer(event->window, &x, &y, &state);
@@ -645,22 +605,16 @@
GtkWidget *widget = gtkwb->drawing_area;
cairo_t *gfx_con = gtkwb->priv->cr;
-#if GTK_CHECK_VERSION(3,0,0)
/* Interpret and convert color */
pidgin_whiteboard_rgb24_to_rgb48(color, &col);
-#if GTK_CHECK_VERSION(3,0,0)
rgba.red = col.red / 0xffff;
rgba.green = col.green / 0xffff;
rgba.blue = col.blue / 0xffff;
gdk_cairo_set_source_rgba(gfx_con, &rgba);
- gdk_cairo_set_source_color(gfx_con, &col);
@@ -763,18 +717,11 @@
GtkWidget *drawing_area = gtkwb->drawing_area;
cairo_t *cr = gtkwb->priv->cr;
GtkAllocation allocation;
-#if GTK_CHECK_VERSION(3,0,0)
GdkRGBA white = {1.0, 1.0, 1.0, 1.0};
gtk_widget_get_allocation(drawing_area, &allocation);
-#if GTK_CHECK_VERSION(3,0,0)
gdk_cairo_set_source_rgba(cr, &white);
- gdk_cairo_set_source_color(cr,
- >k_widget_get_style(drawing_area)->white);
cairo_rectangle(cr, 0, 0, allocation.width, allocation.height);
--- a/pidgin/gtkxfer.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/gtkxfer.c Mon Dec 21 22:14:59 2015 -0600
@@ -718,11 +718,7 @@
purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/filetransfer/clear_finished");
-#if GTK_CHECK_VERSION(3,0,0)
dialog->window = window = pidgin_create_dialog(_("File Transfers"), 0, "file transfer", TRUE);
- dialog->window = window = pidgin_create_dialog(_("File Transfers"), PIDGIN_HIG_BORDER, "file transfer", TRUE);
gtk_window_set_default_size(GTK_WINDOW(window), 450, 250);
g_signal_connect(G_OBJECT(window), "delete_event",
--- a/pidgin/libpidgin.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/libpidgin.c Mon Dec 21 22:14:59 2015 -0600
@@ -431,10 +431,8 @@
char *opt_login_arg = NULL;
char *opt_session_arg = NULL;
-#if GTK_CHECK_VERSION(3,0,0)
GtkCssProvider *provider;
int sig_indx; /* for setting up signal catching */
@@ -443,13 +441,11 @@
GIOChannel *signal_channel;
guint signal_channel_watcher;
char *segfault_message_tmp;
-#if defined(HAVE_SIGNAL_H) || GTK_CHECK_VERSION(3,0,0)
+#endif /* HAVE_SIGNAL_N */ gboolean debug_enabled, debug_colored;
@@ -694,12 +690,6 @@
purple_debug_set_enabled(debug_enabled);
purple_debug_set_colored(debug_colored);
-#if !GTK_CHECK_VERSION(3,0,0)
- search_path = g_build_filename(purple_user_dir(), "gtkrc-2.0", NULL);
- gtk_rc_add_default_file(search_path);
gui_check = gtk_init_check(&argc, &argv);
char *display = gdk_get_display();
@@ -715,7 +705,6 @@
-#if GTK_CHECK_VERSION(3,0,0)
search_path = g_build_filename(purple_user_dir(), "gtk-3.0.css", NULL);
@@ -733,7 +722,6 @@
@@ -788,14 +776,10 @@
pidgin_session_init(argv[0], opt_session_arg, opt_config_dir_arg);
- if (opt_session_arg != NULL) {
- g_free(opt_session_arg);
- opt_session_arg = NULL;
- if (opt_config_dir_arg != NULL) {
- g_free(opt_config_dir_arg);
- opt_config_dir_arg = NULL;
+ g_free(opt_session_arg); + opt_session_arg = NULL; + g_free(opt_config_dir_arg); + opt_config_dir_arg = NULL; /* This needs to be before purple_blist_show() so the
* statusbox gets the forced online status. */
@@ -822,10 +806,8 @@
purple_savedstatus_activate(purple_savedstatus_get_startup());
/* now enable the requested ones */
dologin_named(opt_login_arg);
- if (opt_login_arg != NULL) {
} else if (opt_nologin) {
/* Set all accounts to "offline" */
PurpleSavedStatus *saved_status;
--- a/pidgin/minidialog.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/minidialog.c Mon Dec 21 22:14:59 2015 -0600
@@ -446,38 +446,10 @@
g_object_class_install_properties(object_class, LAST_PROPERTY, properties);
-#if !GTK_CHECK_VERSION(3,0,0)
-/* 16 is the width of the icon, due to PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL */
-#define BLIST_WIDTH_OTHER_THAN_LABEL \
- ((PIDGIN_HIG_BOX_SPACE * 3) + 16)
-#define BLIST_WIDTH_PREF \
- (PIDGIN_PREFS_ROOT "/blist/width")
-blist_width_changed_cb(const char *name,
- PidginMiniDialog *self = PIDGIN_MINI_DIALOG(data);
- PidginMiniDialogPrivate *priv = PIDGIN_MINI_DIALOG_GET_PRIVATE(self);
- guint blist_width = GPOINTER_TO_INT(val);
- guint label_width = blist_width - BLIST_WIDTH_OTHER_THAN_LABEL;
- gtk_widget_set_size_request(GTK_WIDGET(priv->title), label_width, -1);
- gtk_widget_set_size_request(GTK_WIDGET(priv->desc), label_width, -1);
pidgin_mini_dialog_init(PidginMiniDialog *self)
GtkBox *self_box = GTK_BOX(self);
-#if !GTK_CHECK_VERSION(3,0,0)
- guint blist_width = purple_prefs_get_int(BLIST_WIDTH_PREF);
- guint label_width = blist_width - BLIST_WIDTH_OTHER_THAN_LABEL;
PidginMiniDialogPrivate *priv = g_new0(PidginMiniDialogPrivate, 1);
@@ -490,9 +462,6 @@
gtk_misc_set_alignment(GTK_MISC(priv->icon), 0, 0);
priv->title = GTK_LABEL(gtk_label_new(NULL));
-#if !GTK_CHECK_VERSION(3,0,0)
- gtk_widget_set_size_request(GTK_WIDGET(priv->title), label_width, -1);
gtk_label_set_line_wrap(priv->title, TRUE);
gtk_label_set_selectable(priv->title, TRUE);
gtk_misc_set_alignment(GTK_MISC(priv->title), 0, 0);
@@ -501,9 +470,6 @@
gtk_box_pack_start(priv->title_box, GTK_WIDGET(priv->title), TRUE, TRUE, 0);
priv->desc = GTK_LABEL(gtk_label_new(NULL));
-#if !GTK_CHECK_VERSION(3,0,0)
- gtk_widget_set_size_request(GTK_WIDGET(priv->desc), label_width, -1);
gtk_label_set_line_wrap(priv->desc, TRUE);
gtk_misc_set_alignment(GTK_MISC(priv->desc), 0, 0);
gtk_label_set_selectable(priv->desc, TRUE);
@@ -512,11 +478,6 @@
g_object_set(G_OBJECT(priv->desc), "no-show-all", TRUE, NULL);
-#if !GTK_CHECK_VERSION(3,0,0)
- purple_prefs_connect_callback(self, BLIST_WIDTH_PREF,
- blist_width_changed_cb, self);
self->contents = GTK_BOX(gtk_box_new(GTK_ORIENTATION_VERTICAL, 0));
priv->buttons = GTK_BOX(gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0));
--- a/pidgin/pidginstock.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/pidginstock.c Mon Dec 21 22:14:59 2015 -0600
@@ -388,13 +388,7 @@
-#if GTK_CHECK_VERSION(3,0,0)
gtk_style_context_reset_widgets(gdk_screen_get_default());
- GtkSettings *setting = NULL;
- setting = gtk_settings_get_default();
- gtk_rc_reset_styles(setting);
/*****************************************************************************
@@ -522,13 +516,8 @@
if (stock_icons[i].dir == NULL) {
-#if GTK_CHECK_VERSION(3,0,0)
iconset = gtk_style_context_lookup_icon_set(gtk_widget_get_style_context(win),
stock_icons[i].filename);
- iconset = gtk_style_lookup_icon_set(gtk_widget_get_style(win),
- stock_icons[i].filename);
filename = find_file(stock_icons[i].dir, stock_icons[i].filename);
--- a/pidgin/pidgintooltip.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/pidgintooltip.c Mon Dec 21 22:14:59 2015 -0600
@@ -88,7 +88,6 @@
-#if GTK_CHECK_VERSION(3,0,0)
pidgin_tooltip_draw_cb(GtkWidget *widget, cairo_t *cr, gpointer data)
@@ -105,20 +104,6 @@
-pidgin_tooltip_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data)
- if (pidgin_tooltip.paint_tooltip) {
- cairo_t *cr = gdk_cairo_create(GDK_DRAWABLE(gtk_widget_get_window(widget)));
- gtk_paint_flat_box(widget->style, widget->window, GTK_STATE_NORMAL, GTK_SHADOW_OUT,
- NULL, widget, "tooltip", 0, 0, -1, -1);
- pidgin_tooltip.paint_tooltip(widget, cr, data);
setup_tooltip_window(void)
@@ -149,17 +134,12 @@
GtkWidget *tipwindow = pidgin_tooltip.tipwindow;
-#if GTK_CHECK_VERSION(3,0,0)
GdkDeviceManager *devmgr;
devmgr = gdk_display_get_device_manager(gdk_display_get_default());
dev = gdk_device_manager_get_client_pointer(devmgr);
gdk_device_get_position(dev, &screen, &x, &y);
- gdk_display_get_pointer(gdk_display_get_default(),
- &screen, &x, &y, NULL);
mon_num = gdk_screen_get_monitor_at_point(screen, x, y);
gdk_screen_get_monitor_geometry(screen, mon_num, &mon_size);
@@ -209,13 +189,8 @@
gtk_window_move(GTK_WINDOW(tipwindow), x, y);
gtk_widget_show(tipwindow);
-#if GTK_CHECK_VERSION(3,0,0)
g_signal_connect(G_OBJECT(tipwindow), "draw",
G_CALLBACK(pidgin_tooltip_draw_cb), data);
- g_signal_connect(G_OBJECT(tipwindow), "expose_event",
- G_CALLBACK(pidgin_tooltip_expose_event), data);
/* Hide the tooltip when the widget is destroyed */
sig = g_signal_connect(G_OBJECT(pidgin_tooltip.widget), "destroy", G_CALLBACK(pidgin_tooltip_destroy), NULL);
--- a/pidgin/pixmaps/emotes/default/24/scalable/shout.svg Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/pixmaps/emotes/default/24/scalable/shout.svg Mon Dec 21 22:14:59 2015 -0600
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
@@ -13,18 +14,38 @@
- inkscape:version="0.46"
+ inkscape:version="0.48.5 r10040" - sodipodi:docbase="/home/hbons/Desktop/untitled folder 1"
sodipodi:docname="shout.svg"
- inkscape:export-filename="/home/hbons/Desktop/newstyle.png"
+ inkscape:export-filename="/home/steve/src/hg/pidgin/pidgin/pidgin/pixmaps/emotes/default/24/scalable/path1307.png" inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
- inkscape:collect="always"
+ id="linearGradient9179"> + style="stop-color:#4f371a;stop-opacity:0.97254902;" + style="stop-color:#ad8248;stop-opacity:0.96470588;" + id="linearGradient9171"> + style="stop-color:#edd400;stop-opacity:1;" + style="stop-color:#ff9422;stop-opacity:1;" style="stop-color:#eeeeec;stop-opacity:1;"
@@ -39,13 +60,13 @@
inkscape:collect="always"
xlink:href="#linearGradient3104"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.9327,0.932656,-0.947494,-0.947449,33.02126,11.96667)" />
+ gradientTransform="matrix(-0.99399656,1.0132041,-1.0209557,-1.0015021,34.62613,12.445313)" /> inkscape:collect="always"
@@ -79,6 +100,25 @@
+ inkscape:collect="always" + xlink:href="#linearGradient9171" + id="radialGradient9177" + gradientUnits="userSpaceOnUse" /> + inkscape:collect="always" + xlink:href="#linearGradient9179" + id="linearGradient9185" + gradientUnits="userSpaceOnUse" /> @@ -87,17 +127,18 @@
inkscape:pageopacity="0.0"
- inkscape:cx="26.111884"
+ inkscape:zoom="15.839192" + inkscape:cx="11.494979" inkscape:document-units="px"
inkscape:current-layer="layer1"
- inkscape:window-width="1440"
- inkscape:window-height="845"
- inkscape:window-y="0" />
+ inkscape:window-width="1012" + inkscape:window-height="834" + inkscape:window-y="154" + inkscape:window-maximized="0" /> @@ -106,90 +147,95 @@
<dc:format>image/svg+xml</dc:format>
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
inkscape:groupmode="layer"
+ style="display:inline"> - style="opacity:0.64044944;fill:#2e3436;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3405)"
+ style="opacity:0.64044949;fill:#2e3436;fill-opacity:1;stroke:none;filter:url(#filter3405)" - d="M 17.393564 10.457643 A 6.6449099 2.3675451 0 1 1 4.1037445,10.457643 A 6.6449099 2.3675451 0 1 1 17.393564 10.457643 z"
+ d="m 17.393564,10.457643 a 6.6449099,2.3675451 0 1 1 -13.2898195,0 6.6449099,2.3675451 0 1 1 13.2898195,0 z" transform="matrix(1.2039291,0,0,1.055946,-0.9406174,8.4572942)" />
- style="opacity:1;fill:#edd400;fill-opacity:1;stroke:#cc6400;stroke-width:1.05276573;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ style="fill:url(#radialGradient9177);fill-opacity:1;stroke:url(#linearGradient9185);stroke-width:1.05226015;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" - d="M 21.781414 10.983024 A 9.975256 9.975256 0 1 1 1.8309021,10.983024 A 9.975256 9.975256 0 1 1 21.781414 10.983024 z"
- transform="matrix(0.952236,0,0,0.952236,0.757713,1.541608)" />
+ d="m 21.781414,10.983024 a 9.975256,9.975256 0 1 1 -19.9505119,0 9.975256,9.975256 0 1 1 19.9505119,0 z" + transform="matrix(0.952236,0,0,0.952236,0.757713,1.541608)" + inkscape:export-xdpi="108.01644" + inkscape:export-ydpi="108.01644" /> - style="opacity:0.79545455;fill:url(#radialGradient3114);fill-opacity:1.0;stroke:none;stroke-width:1.05274069;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ style="opacity:0.79545456;fill:url(#radialGradient3114);fill-opacity:1;stroke:none" - d="M 21.781414 10.983024 A 9.975256 9.975256 0 1 1 1.8309021,10.983024 A 9.975256 9.975256 0 1 1 21.781414 10.983024 z"
+ d="m 21.781414,10.983024 a 9.975256,9.975256 0 1 1 -19.9505119,0 9.975256,9.975256 0 1 1 19.9505119,0 z" transform="matrix(0.8019,0,0,0.801938,2.532654,3.191833)" />
- style="opacity:0.64044944;fill:none;fill-opacity:1.0;stroke:#ffffff;stroke-width:1.17343897;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ style="opacity:0.64044949;fill:none;stroke:#ffffff;stroke-width:1.17343903;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" - d="M 21.781414 10.983024 A 9.975256 9.975256 0 1 1 1.8309021,10.983024 A 9.975256 9.975256 0 1 1 21.781414 10.983024 z"
+ d="m 21.781414,10.983024 a 9.975256,9.975256 0 1 1 -19.9505119,0 9.975256,9.975256 0 1 1 19.9505119,0 z" transform="matrix(0.852176,0,0,0.852216,1.93909,2.639626)" />
style="fill:#eeeeec;fill-opacity:1;stroke:#fea523;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1"
- d="M 11.499998,10 C 11.499998,11.38 10.379999,12.5 8.9999982,12.5 C 7.6199981,12.5 6.4999979,11.38 6.4999979,10 C 6.4999979,8.62 7.6199981,7.5 8.9999982,7.5 C 10.379999,7.5 11.499998,8.62 11.499998,10 z "
+ d="m 11.499998,10 c 0,1.38 -1.119999,2.5 -2.4999998,2.5 -1.3800001,0 -2.5000003,-1.12 -2.5000003,-2.5 0,-1.38 1.1200002,-2.5 2.5000003,-2.5 1.3800008,0 2.4999998,1.12 2.4999998,2.5 z" + inkscape:connector-curvature="0" /> - style="opacity:1;fill:#2e3436;fill-opacity:1;stroke:none;stroke-width:0.98640186;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ style="fill:#2e3436;fill-opacity:1;stroke:none" - d="M 10.732871 9.6526775 A 1.0259361 1.9413869 0 1 1 8.6809988,9.6526775 A 1.0259361 1.9413869 0 1 1 10.732871 9.6526775 z"
+ d="m 10.732871,9.6526775 a 1.0259361,1.9413869 0 1 1 -2.0518722,0 1.0259361,1.9413869 0 1 1 2.0518722,0 z" transform="matrix(0.9747196,0,0,0.7726436,0.5384595,3.0419202)" />
- style="opacity:1;fill:#eeeeec;fill-opacity:1;stroke:#fea523;stroke-width:0.56451595;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ style="fill:#eeeeec;fill-opacity:1;stroke:#fea523;stroke-width:0.56451595;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" - d="M 10.732871 9.6526775 A 1.0259361 1.9413869 0 1 1 8.6809988,9.6526775 A 1.0259361 1.9413869 0 1 1 10.732871 9.6526775 z"
+ d="m 10.732871,9.6526775 a 1.0259361,1.9413869 0 1 1 -2.0518722,0 1.0259361,1.9413869 0 1 1 2.0518722,0 z" transform="matrix(2.4367992,0,0,1.2877391,-8.6538516,-2.4301299)" />
- style="opacity:1;fill:#2e3436;fill-opacity:1;stroke:none;stroke-width:0.98640186;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ style="fill:#2e3436;fill-opacity:1;stroke:none" - d="M 10.732871 9.6526775 A 1.0259361 1.9413869 0 1 1 8.6809988,9.6526775 A 1.0259361 1.9413869 0 1 1 10.732871 9.6526775 z"
+ d="m 10.732871,9.6526775 a 1.0259361,1.9413869 0 1 1 -2.0518722,0 1.0259361,1.9413869 0 1 1 2.0518722,0 z" transform="matrix(0.9747195,0,0,0.7726435,4.5384605,3.0419215)" />
- style="opacity:0.64044949;fill:none;fill-opacity:1;stroke:#f57900;stroke-width:0.73675901;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ style="opacity:0.64044949;fill:none;stroke:#f57900;stroke-width:0.73675901;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" @@ -202,7 +248,7 @@
- style="opacity:0.64044949;fill:none;fill-opacity:1;stroke:#f57900;stroke-width:0.73675901;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ style="opacity:0.64044949;fill:none;stroke:#f57900;stroke-width:0.73675901;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" @@ -215,23 +261,23 @@
- style="fill:#2e3436;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ style="fill:#2e3436;fill-opacity:1;stroke:none" - d="M 13.928572 15.741072 A 2.0982144 1.7857143 0 1 1 9.7321432,15.741072 A 2.0982144 1.7857143 0 1 1 13.928572 15.741072 z"
+ d="m 13.928572,15.741072 a 2.0982144,1.7857143 0 1 1 -4.1964288,0 2.0982144,1.7857143 0 1 1 4.1964288,0 z" transform="matrix(1.4297873,0,0,1.3999999,-4.9148947,-5.5374983)" />
- style="fill:url(#linearGradient2388);fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ style="fill:url(#linearGradient2388);fill-opacity:1;stroke:none" - d="M 13.928572 15.741072 A 2.0982144 1.7857143 0 1 1 9.7321432,15.741072 A 2.0982144 1.7857143 0 1 1 13.928572 15.741072 z"
+ d="m 13.928572,15.741072 a 2.0982144,1.7857143 0 1 1 -4.1964288,0 2.0982144,1.7857143 0 1 1 4.1964288,0 z" transform="matrix(1.4297873,0,0,1.3999999,-4.9148947,-5.5374983)" />
Binary file pidgin/pixmaps/emotes/default/24/shout.png has changed
--- a/pidgin/plugins/disco/gtkdisco.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/plugins/disco/gtkdisco.c Mon Dec 21 22:14:59 2015 -0600
@@ -435,17 +435,9 @@
disco_paint_tooltip(GtkWidget *tipwindow, cairo_t *cr, gpointer data)
PangoLayout *layout = g_object_get_data(G_OBJECT(tipwindow), "tooltip-plugin");
-#if GTK_CHECK_VERSION(3,0,0)
GtkStyleContext *context = gtk_widget_get_style_context(tipwindow);
gtk_style_context_add_class(context, GTK_STYLE_CLASS_TOOLTIP);
gtk_render_layout(context, cr, 6, 6, layout);
- gtk_paint_layout(gtk_widget_get_style(tipwindow),
- gtk_widget_get_window(tipwindow),
- GTK_STATE_NORMAL, FALSE,
- NULL, tipwindow, "tooltip",
--- a/pidgin/plugins/gestures/stroke-draw.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/plugins/gestures/stroke-draw.c Mon Dec 21 22:14:59 2015 -0600
@@ -57,21 +57,15 @@
struct gstroke_metrics *metrics;
-#if GTK_CHECK_VERSION(3,0,0)
GdkDeviceManager *devmgr;
g_return_if_fail(widget != NULL);
-#if GTK_CHECK_VERSION(3,0,0)
devmgr = gdk_display_get_device_manager(gtk_widget_get_display(widget));
dev = gdk_device_manager_get_client_pointer(devmgr);
gdk_window_get_device_position(gtk_widget_get_window(widget),
- gtk_widget_get_pointer(widget, &x, &y);
if (last_mouse_position.invalid)
last_mouse_position.invalid = FALSE;
@@ -125,11 +119,7 @@
-#if GTK_CHECK_VERSION(3,0,0)
gdk_device_ungrab(gdk_event_get_device(event), event->button.time);
- gdk_pointer_ungrab (event->button.time);
if (gstroke_draw_strokes() && gstroke_disp != NULL) {
/* get rid of the invisible stroke window */
@@ -167,16 +157,10 @@
cursor = gdk_cursor_new(GDK_PENCIL);
-#if GTK_CHECK_VERSION(3,0,0)
gdk_device_grab(gdk_event_get_device(event),
gtk_widget_get_window(widget), GDK_OWNERSHIP_WINDOW,
FALSE, GDK_BUTTON_RELEASE_MASK, cursor,
- gdk_pointer_grab (gtk_widget_get_window(widget), FALSE,
- GDK_BUTTON_RELEASE_MASK, NULL, cursor,
timer_id = g_timeout_add (GSTROKE_TIMEOUT_DURATION,
gstroke_timeout, widget);
@@ -195,11 +179,7 @@
last_mouse_position.invalid = TRUE;
g_source_remove (timer_id);
-#if GTK_CHECK_VERSION(3,0,0)
gdk_device_ungrab(gdk_event_get_device(event), event->button.time);
- gdk_pointer_ungrab (event->button.time);
@@ -341,8 +321,7 @@
metrics = (struct gstroke_metrics*)g_object_get_data(G_OBJECT(widget),
g_object_steal_data(G_OBJECT(widget), GSTROKE_METRICS);
--- a/pidgin/plugins/gestures/stroke.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/plugins/gestures/stroke.c Mon Dec 21 22:14:59 2015 -0600
@@ -197,7 +197,7 @@
if (metrics->point_count < GSTROKE_MAX_POINTS) {
- new_point_p = (p_point) g_malloc (sizeof (struct s_point));
+ new_point_p = g_malloc(sizeof (struct s_point)); if (metrics->pointList == NULL) {
@@ -239,7 +239,7 @@
if (((gint) iy) > metrics->max_y) metrics->max_y = (gint) iy;
- new_point_p = (p_point) malloc (sizeof(struct s_point));
+ new_point_p = malloc(sizeof(struct s_point)); } else { /* same thing, but for dely larger than delx case... */
@@ -263,7 +263,7 @@
if (((gint) iy) > metrics->max_y) metrics->max_y = (gint) iy;
- new_point_p = (p_point) malloc (sizeof(struct s_point));
+ new_point_p = malloc(sizeof(struct s_point)); --- a/pidgin/plugins/screencap.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/plugins/screencap.c Mon Dec 21 22:14:59 2015 -0600
@@ -276,21 +276,6 @@
-#if !GTK_CHECK_VERSION(3,0,0)
-scrncap_draw_window_expose(GtkWidget *widget, GdkEventExpose *event,
- cairo_t *cr = gdk_cairo_create(GDK_DRAWABLE(widget->window));
- scrncap_draw_window_paint(widget, cr, _surface);
scrncap_draw_window_response(GtkDialog *draw_window, gint response_id,
@@ -372,13 +357,8 @@
G_CALLBACK(scrncap_draw_window_close), NULL);
draw_cursor = gdk_cursor_new(GDK_PENCIL);
-#if GTK_CHECK_VERSION(3,0,0)
g_object_set_data_full(G_OBJECT(draw_window), "draw-cursor",
draw_cursor, g_object_unref);
- g_object_set_data_full(G_OBJECT(draw_window), "draw-cursor",
- draw_cursor, (GDestroyNotify)gdk_cursor_unref);
width = gdk_pixbuf_get_width(screen);
height = gdk_pixbuf_get_height(screen);
@@ -397,13 +377,8 @@
drawing_area = gtk_drawing_area_new();
gtk_widget_set_size_request(drawing_area, width, height);
-#if GTK_CHECK_VERSION(3,0,0)
g_signal_connect(G_OBJECT(drawing_area), "draw",
G_CALLBACK(scrncap_draw_window_paint), surface);
- g_signal_connect(G_OBJECT(drawing_area), "expose_event",
- G_CALLBACK(scrncap_draw_window_expose), surface);
gtk_widget_add_events(drawing_area, GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_MOTION_MASK |
GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK);
@@ -423,9 +398,7 @@
scroll_area = pidgin_make_scrollable(box,
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC,
GTK_SHADOW_NONE, -1, -1);
-#if GTK_CHECK_VERSION(3,0,0)
g_object_set(G_OBJECT(scroll_area), "expand", TRUE, NULL);
gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(
GTK_DIALOG(draw_window))), scroll_area);
@@ -585,11 +558,7 @@
cursor = gdk_cursor_new(GDK_CROSSHAIR);
gdk_window_set_cursor(gdkwindow, cursor);
-#if GTK_CHECK_VERSION(3,0,0)
- gdk_cursor_unref(cursor);
--- a/pidgin/plugins/ticker/gtkticker.c Mon Dec 21 21:29:48 2015 -0600
+++ b/pidgin/plugins/ticker/gtkticker.c Mon Dec 21 22:14:59 2015 -0600
@@ -31,17 +31,12 @@
static void gtk_ticker_init (GtkTicker *ticker);
static void gtk_ticker_map (GtkWidget *widget);
static void gtk_ticker_realize (GtkWidget *widget);
-#if GTK_CHECK_VERSION(3,0,0)
static void gtk_ticker_get_preferred_width (GtkWidget *widget,
static void gtk_ticker_get_preferred_height (GtkWidget *widget,
-static void gtk_ticker_size_request (GtkWidget *widget,
- GtkRequisition *requisition);
static void gtk_ticker_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
static void gtk_ticker_add_real (GtkContainer *container,
@@ -82,12 +77,8 @@
widget_class->map = gtk_ticker_map;
widget_class->realize = gtk_ticker_realize;
-#if GTK_CHECK_VERSION(3,0,0)
widget_class->get_preferred_width = gtk_ticker_get_preferred_width;
widget_class->get_preferred_height = gtk_ticker_get_preferred_height;
- widget_class->size_request = gtk_ticker_size_request;
widget_class->size_allocate = gtk_ticker_size_allocate;
container_class->add = gtk_ticker_add_real;
@@ -262,11 +253,7 @@
GdkWindowAttr attributes;
-#if GTK_CHECK_VERSION(3,0,0)
GtkStyleContext *context;
GtkAllocation allocation;
g_return_if_fail (widget != NULL);
@@ -282,36 +269,22 @@
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
-#if !GTK_CHECK_VERSION(3,0,0)
- attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK;
-#if GTK_CHECK_VERSION(3,0,0)
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
gtk_widget_set_window (widget, window);
gdk_window_set_user_data (window, widget);
-#if GTK_CHECK_VERSION(3,0,0)
context = gtk_widget_get_style_context(widget);
gtk_style_context_add_class(context, GTK_STYLE_CLASS_BACKGROUND);
gtk_style_context_set_state(context, GTK_STATE_FLAG_NORMAL);
gtk_style_context_set_background(context, window);
- style = gtk_style_attach (gtk_widget_get_style (widget), window);
- gtk_widget_set_style (widget, style);
- gtk_style_set_background (style, window, GTK_STATE_NORMAL);
-#if GTK_CHECK_VERSION(3,0,0)
gtk_ticker_get_preferred_width (GtkWidget *widget,
@@ -384,47 +357,6 @@
*minimal_height = *natural_height = height;
-static void gtk_ticker_size_request (GtkWidget *widget, GtkRequisition *requisition)
- GtkRequisition child_requisition;
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GTK_IS_TICKER (widget));
- g_return_if_fail (requisition != NULL);
- ticker = GTK_TICKER (widget);
- requisition->width = 0;
- requisition->height = 0;
- children = ticker->children;
- child = children->data;
- children = children->next;
- if (gtk_widget_get_visible (child->widget))
- gtk_widget_size_request (child->widget, &child_requisition);
- requisition->height = MAX (requisition->height,
- child_requisition.height);
- requisition->width += child_requisition.width + ticker->spacing;
- if ( requisition->width > ticker->spacing )
- requisition->width -= ticker->spacing;
- border_width = gtk_container_get_border_width (GTK_CONTAINER (ticker));
- requisition->height += border_width * 2;
- requisition->width += border_width * 2;
static void gtk_ticker_compute_offsets (GtkTicker *ticker)