Merged default branch soc.2013.gobjectification.plugins

Wed, 12 Feb 2014 10:54:53 +0530

author
Ankit Vani <a@nevitus.org>
date
Wed, 12 Feb 2014 10:54:53 +0530
branch
soc.2013.gobjectification.plugins
changeset 37110
4309235d2a46
parent 37109
94d1a2589d5a (current diff)
parent 35536
22a576a03e5f (diff)
child 37111
efe4b7c5218a

Merged default branch

doc/Makefile.am file | annotate | diff | comparison | revisions
doc/reference/libpurple/Makefile.am file | annotate | diff | comparison | revisions
libpurple/Makefile.am file | annotate | diff | comparison | revisions
pidgin/Makefile.am file | annotate | diff | comparison | revisions
pidgin/gtkconv.c file | annotate | diff | comparison | revisions
pidgin/gtkstatusbox.c file | annotate | diff | comparison | revisions
pidgin/gtkutils.c file | annotate | diff | comparison | revisions
pidgin/plugins/unity.c file | annotate | diff | comparison | revisions
--- a/libpurple/Makefile.am	Tue Feb 11 23:47:33 2014 +0530
+++ b/libpurple/Makefile.am	Wed Feb 12 10:54:53 2014 +0530
@@ -2,6 +2,8 @@
 		dbus-analyze-functions.py \
 		dbus-analyze-signals.py \
 		dbus-analyze-types.py \
+		enums.c.in \
+		enums.h.in \
 		glibcompat.h \
 		marshallers.list \
 		purple-notifications-example \
--- a/pidgin/Makefile.am	Tue Feb 11 23:47:33 2014 +0530
+++ b/pidgin/Makefile.am	Wed Feb 12 10:54:53 2014 +0530
@@ -144,6 +144,8 @@
 pidgin_SOURCES = \
 	pidgin.c
 
+noinst_HEADERS= gtkinternal.h
+
 libpidginincludedir=$(includedir)/pidgin
 libpidgininclude_HEADERS = \
 	$(libpidgin_la_headers)
--- a/pidgin/gtk3compat.h	Tue Feb 11 23:47:33 2014 +0530
+++ b/pidgin/gtk3compat.h	Wed Feb 12 10:54:53 2014 +0530
@@ -31,6 +31,8 @@
  * Also, any public API should not depend on this file.
  */
 
+#include <gtk/gtk.h>
+
 #if !GTK_CHECK_VERSION(3,2,0)
 
 #define GTK_FONT_CHOOSER GTK_FONT_SELECTION_DIALOG
--- a/pidgin/gtkconv.c	Tue Feb 11 23:47:33 2014 +0530
+++ b/pidgin/gtkconv.c	Wed Feb 12 10:54:53 2014 +0530
@@ -231,6 +231,9 @@
 	float scale;
 
 	col = g_array_index(gtkconv->nick_colors, GdkColor, g_str_hash(name) % gtkconv->nick_colors->len);
+
+	g_return_val_if_fail(style != NULL, &col);
+
 #if GTK_CHECK_VERSION(3,0,0)
 	gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &rgba);
 	scale = (1 - LUMINANCE(rgba)) * ((float)0xffff / MAX(MAX(col.red, col.blue), col.green));
--- a/pidgin/gtkmenutray.c	Tue Feb 11 23:47:33 2014 +0530
+++ b/pidgin/gtkmenutray.c	Wed Feb 12 10:54:53 2014 +0530
@@ -23,6 +23,7 @@
 
 #include "gtkmenutray.h"
 
+#include "glibcompat.h"
 #include "gtk3compat.h"
 
 /******************************************************************************
@@ -155,12 +156,11 @@
 	GtkSettings *settings;
 	gint height = -1;
 
-#if GTK_CHECK_VERSION(3,0,0)
-	gtk_widget_set_hexpand(widget, TRUE);
-	gtk_widget_set_halign(widget, GTK_ALIGN_END);
-#else
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+	/* Gtk3 docs says, it should be replaced with gtk_widget_set_hexpand and
+	 * gtk_widget_set_halign. But it doesn't seems to work. */
 	gtk_menu_item_set_right_justified(GTK_MENU_ITEM(menu_tray), TRUE);
-#endif
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 	if(!GTK_IS_WIDGET(menu_tray->tray))
 		menu_tray->tray = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
--- a/pidgin/gtkstatusbox.c	Tue Feb 11 23:47:33 2014 +0530
+++ b/pidgin/gtkstatusbox.c	Wed Feb 12 10:54:53 2014 +0530
@@ -455,8 +455,14 @@
 		return;
 
 	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);
+#else
+	gdk_cursor_unref(statusbox->hand_cursor);
+	gdk_cursor_unref(statusbox->arrow_cursor);
+#endif
 
 	purple_imgstore_unref(statusbox->buddy_icon_img);
 
--- a/pidgin/gtkutils.c	Tue Feb 11 23:47:33 2014 +0530
+++ b/pidgin/gtkutils.c	Wed Feb 12 10:54:53 2014 +0530
@@ -2104,7 +2104,12 @@
 
 	cursor = gdk_cursor_new(cursor_type);
 	gdk_window_set_cursor(gtk_widget_get_window(widget), cursor);
+
+#if GTK_CHECK_VERSION(3,0,0)
 	g_object_unref(cursor);
+#else
+	gdk_cursor_unref(cursor);
+#endif
 
 	gdk_display_flush(gdk_window_get_display(gtk_widget_get_window(widget)));
 }
--- a/pidgin/plugins/unity.c	Tue Feb 11 23:47:33 2014 +0530
+++ b/pidgin/plugins/unity.c	Wed Feb 12 10:54:53 2014 +0530
@@ -17,10 +17,11 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  */
 #include "internal.h"
-#include "version.h"
 #include "account.h"
 #include "savedstatuses.h"
+#include "version.h"
 
+#include "gtk3compat.h"
 #include "gtkplugin.h"
 #include "gtkconv.h"
 #include "gtkutils.h"
@@ -431,13 +432,13 @@
 	GtkWidget *ret = NULL, *frame = NULL;
 	GtkWidget *vbox = NULL, *toggle = NULL;
 
-	ret = gtk_vbox_new(FALSE, 18);
+	ret = gtk_box_new(GTK_ORIENTATION_VERTICAL, 18);
 	gtk_container_set_border_width(GTK_CONTAINER (ret), 12);
 
 	/* Alerts */
 
 	frame = pidgin_make_frame(ret, _("Chatroom alerts"));
-	vbox = gtk_vbox_new(FALSE, 5);
+	vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
 	gtk_container_add(GTK_CONTAINER(frame), vbox);
 
 	toggle = gtk_check_button_new_with_mnemonic(_("Chatroom message alerts _only where someone says your username"));
@@ -450,7 +451,7 @@
 	/* Launcher integration */
 
 	frame = pidgin_make_frame(ret, _("Launcher Icon"));
-	vbox = gtk_vbox_new(FALSE, 5);
+	vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
 	gtk_container_add(GTK_CONTAINER(frame), vbox);
 
 	toggle = gtk_radio_button_new_with_mnemonic(NULL, _("_Disable launcher integration"));
@@ -479,7 +480,7 @@
 	/* Messaging menu integration */
 
 	frame = pidgin_make_frame(ret, _("Messaging Menu"));
-	vbox = gtk_vbox_new(FALSE, 5);
+	vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
 	gtk_container_add(GTK_CONTAINER(frame), vbox);
 
 	toggle = gtk_radio_button_new_with_mnemonic(NULL,

mercurial