/pidgin/main: 4252b2882889: Fix some remaining GTK_* macros as E...

Ankit Vani a at nevitus.org
Sun Feb 9 16:42:18 EST 2014


Changeset: 4252b2882889fb70d37aec5a017cf96ceece1d23
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2014-02-10 03:11 +0530
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/4252b2882889

Description:

Fix some remaining GTK_* macros as Elliott noticed

diffstat:

 pidgin/gtkdebug.c          |   2 +-
 pidgin/gtkutils.c          |   2 +-
 pidgin/gtkwebview.c        |   8 ++++----
 pidgin/gtkwebview.h        |  12 ++++++------
 pidgin/gtkwebviewtoolbar.c |   6 +++---
 pidgin/gtkwebviewtoolbar.h |  12 ++++++------
 6 files changed, 21 insertions(+), 21 deletions(-)

diffs (131 lines):

diff --git a/pidgin/gtkdebug.c b/pidgin/gtkdebug.c
--- a/pidgin/gtkdebug.c
+++ b/pidgin/gtkdebug.c
@@ -344,7 +344,7 @@ regex_filter_toggled_cb(GtkToggleToolBut
 
 	purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/debug/filter", active);
 
-	if (!GTK_IS_WEBVIEW(win->text))
+	if (!PIDGIN_IS_WEBVIEW(win->text))
 		return;
 
 	regex_toggle_filter(win, active);
diff --git a/pidgin/gtkutils.c b/pidgin/gtkutils.c
--- a/pidgin/gtkutils.c
+++ b/pidgin/gtkutils.c
@@ -100,7 +100,7 @@ void
 pidgin_setup_webview(GtkWidget *webview)
 {
 	g_return_if_fail(webview != NULL);
-	g_return_if_fail(GTK_IS_WEBVIEW(webview));
+	g_return_if_fail(PIDGIN_IS_WEBVIEW(webview));
 
 	pidgin_themes_smiley_themeize(webview);
 
diff --git a/pidgin/gtkwebview.c b/pidgin/gtkwebview.c
--- a/pidgin/gtkwebview.c
+++ b/pidgin/gtkwebview.c
@@ -40,7 +40,7 @@
 #define PIDGIN_WEBVIEW_MAX_PROCESS_TIME 100000 /* microseconds */
 
 #define PIDGIN_WEBVIEW_GET_PRIVATE(obj) \
-	(G_TYPE_INSTANCE_GET_PRIVATE((obj), GTK_TYPE_WEBVIEW, PidginWebViewPriv))
+	(G_TYPE_INSTANCE_GET_PRIVATE((obj), PIDGIN_TYPE_WEBVIEW, PidginWebViewPriv))
 
 enum {
 	LOAD_HTML,
@@ -351,7 +351,7 @@ pidgin_webview_associate_smiley(PidginWe
 	PidginWebViewPriv *priv;
 
 	g_return_if_fail(webview != NULL);
-	g_return_if_fail(GTK_IS_WEBVIEW(webview));
+	g_return_if_fail(PIDGIN_IS_WEBVIEW(webview));
 
 	priv = PIDGIN_WEBVIEW_GET_PRIVATE(webview);
 
@@ -931,7 +931,7 @@ webview_find_protocol(const char *url, g
 	PidginWebViewProtocol *proto = NULL;
 	gssize length = reverse ? (gssize)strlen(url) : -1;
 
-	klass = g_type_class_ref(GTK_TYPE_WEBVIEW);
+	klass = g_type_class_ref(PIDGIN_TYPE_WEBVIEW);
 	for (iter = klass->protocols; iter; iter = iter->next) {
 		proto = iter->data;
 		if (g_ascii_strncasecmp(url, proto->name, reverse ? MIN(length, proto->length) : proto->length) == 0) {
@@ -1962,7 +1962,7 @@ pidgin_webview_class_register_protocol(c
 
 	g_return_val_if_fail(name, FALSE);
 
-	klass = g_type_class_ref(GTK_TYPE_WEBVIEW);
+	klass = g_type_class_ref(PIDGIN_TYPE_WEBVIEW);
 	g_return_val_if_fail(klass, FALSE);
 
 	if ((proto = webview_find_protocol(name, TRUE))) {
diff --git a/pidgin/gtkwebview.h b/pidgin/gtkwebview.h
--- a/pidgin/gtkwebview.h
+++ b/pidgin/gtkwebview.h
@@ -35,12 +35,12 @@
 #include <gtk/gtk.h>
 #include <webkit/webkit.h>
 
-#define GTK_TYPE_WEBVIEW            (pidgin_webview_get_type())
-#define PIDGIN_WEBVIEW(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_WEBVIEW, PidginWebView))
-#define PIDGIN_WEBVIEW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_WEBVIEW, PidginWebViewClass))
-#define GTK_IS_WEBVIEW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_WEBVIEW))
-#define GTK_IS_WEBVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_WEBVIEW))
-#define PIDGIN_WEBVIEW_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_WEBVIEW, PidginWebViewClass))
+#define PIDGIN_TYPE_WEBVIEW            (pidgin_webview_get_type())
+#define PIDGIN_WEBVIEW(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), PIDGIN_TYPE_WEBVIEW, PidginWebView))
+#define PIDGIN_WEBVIEW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), PIDGIN_TYPE_WEBVIEW, PidginWebViewClass))
+#define PIDGIN_IS_WEBVIEW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), PIDGIN_TYPE_WEBVIEW))
+#define PIDGIN_IS_WEBVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PIDGIN_TYPE_WEBVIEW))
+#define PIDGIN_WEBVIEW_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), PIDGIN_TYPE_WEBVIEW, PidginWebViewClass))
 
 typedef enum {
 	PIDGIN_WEBVIEW_BOLD          = 1 << 0,
diff --git a/pidgin/gtkwebviewtoolbar.c b/pidgin/gtkwebviewtoolbar.c
--- a/pidgin/gtkwebviewtoolbar.c
+++ b/pidgin/gtkwebviewtoolbar.c
@@ -41,7 +41,7 @@
 #include "gtk3compat.h"
 
 #define PIDGIN_WEBVIEWTOOLBAR_GET_PRIVATE(obj) \
-	(G_TYPE_INSTANCE_GET_PRIVATE((obj), GTK_TYPE_WEBVIEWTOOLBAR, PidginWebViewToolbarPriv))
+	(G_TYPE_INSTANCE_GET_PRIVATE((obj), PIDGIN_TYPE_WEBVIEWTOOLBAR, PidginWebViewToolbarPriv))
 
 /******************************************************************************
  * Structs
@@ -1580,9 +1580,9 @@ pidgin_webviewtoolbar_attach(PidginWebVi
 	PidginWebViewButtons buttons;
 
 	g_return_if_fail(toolbar != NULL);
-	g_return_if_fail(GTK_IS_WEBVIEWTOOLBAR(toolbar));
+	g_return_if_fail(PIDGIN_IS_WEBVIEWTOOLBAR(toolbar));
 	g_return_if_fail(webview != NULL);
-	g_return_if_fail(GTK_IS_WEBVIEW(webview));
+	g_return_if_fail(PIDGIN_IS_WEBVIEW(webview));
 
 	toolbar->webview = webview;
 	g_signal_connect(G_OBJECT(webview), "allowed-formats-updated",
diff --git a/pidgin/gtkwebviewtoolbar.h b/pidgin/gtkwebviewtoolbar.h
--- a/pidgin/gtkwebviewtoolbar.h
+++ b/pidgin/gtkwebviewtoolbar.h
@@ -35,12 +35,12 @@
 
 #define PIDGIN_DEFAULT_FONT_FACE "Helvetica 12"
 
-#define GTK_TYPE_WEBVIEWTOOLBAR            (pidgin_webviewtoolbar_get_type())
-#define PIDGIN_WEBVIEWTOOLBAR(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_WEBVIEWTOOLBAR, PidginWebViewToolbar))
-#define PIDGIN_WEBVIEWTOOLBAR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_WEBVIEWTOOLBAR, PidginWebViewToolbarClass))
-#define GTK_IS_WEBVIEWTOOLBAR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_WEBVIEWTOOLBAR))
-#define GTK_IS_WEBVIEWTOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_WEBVIEWTOOLBAR))
-#define PIDGIN_WEBVIEWTOOLBAR_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_WEBVIEWTOOLBAR, PidginWebViewToolbarClass))
+#define PIDGIN_TYPE_WEBVIEWTOOLBAR            (pidgin_webviewtoolbar_get_type())
+#define PIDGIN_WEBVIEWTOOLBAR(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), PIDGIN_TYPE_WEBVIEWTOOLBAR, PidginWebViewToolbar))
+#define PIDGIN_WEBVIEWTOOLBAR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), PIDGIN_TYPE_WEBVIEWTOOLBAR, PidginWebViewToolbarClass))
+#define PIDGIN_IS_WEBVIEWTOOLBAR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), PIDGIN_TYPE_WEBVIEWTOOLBAR))
+#define PIDGIN_IS_WEBVIEWTOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PIDGIN_TYPE_WEBVIEWTOOLBAR))
+#define PIDGIN_WEBVIEWTOOLBAR_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), PIDGIN_TYPE_WEBVIEWTOOLBAR, PidginWebViewToolbarClass))
 
 typedef struct _PidginWebViewToolbar PidginWebViewToolbar;
 typedef struct _PidginWebViewToolbarClass PidginWebViewToolbarClass;



More information about the Commits mailing list