/pidgin/main: 86f6c431da7b: Hide some reserved plugin fields

Tomasz Wasilczyk twasilczyk at pidgin.im
Wed Oct 23 15:58:41 EDT 2013


Changeset: 86f6c431da7b7acab964cfd66e6ebe4b9cec65eb
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2013-10-23 21:58 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/86f6c431da7b

Description:

Hide some reserved plugin fields

diffstat:

 finch/plugins/gnttinyurl.c                     |  2 --
 libpurple/plugin.h                             |  4 +---
 libpurple/plugins/autoaccept.c                 |  2 --
 libpurple/plugins/joinpart.c                   |  2 --
 libpurple/plugins/log_reader.c                 |  2 --
 libpurple/plugins/newline.c                    |  2 --
 libpurple/plugins/offlinemsg.c                 |  2 --
 libpurple/plugins/perl/perl.c                  |  2 --
 libpurple/plugins/pluginpref_example.c         |  2 --
 libpurple/plugins/psychic.c                    |  2 --
 libpurple/plugins/statenotify.c                |  2 --
 pidgin/gtkplugin.c                             |  8 ++++----
 pidgin/gtkplugin.h                             |  2 --
 pidgin/plugins/contact_priority.c              |  1 -
 pidgin/plugins/convcolors.c                    |  1 -
 pidgin/plugins/extplacement.c                  |  2 --
 pidgin/plugins/gestures/gestures.c             |  1 -
 pidgin/plugins/markerline.c                    |  2 --
 pidgin/plugins/musicmessaging/musicmessaging.c |  1 -
 pidgin/plugins/notify.c                        |  1 -
 pidgin/plugins/pidginrc.c                      |  1 -
 pidgin/plugins/spellchk.c                      |  1 -
 22 files changed, 5 insertions(+), 40 deletions(-)

diffs (279 lines):

diff --git a/finch/plugins/gnttinyurl.c b/finch/plugins/gnttinyurl.c
--- a/finch/plugins/gnttinyurl.c
+++ b/finch/plugins/gnttinyurl.c
@@ -465,8 +465,6 @@ get_plugin_pref_frame(PurplePlugin *plug
 
 static PurplePluginUiInfo prefs_info = {
   get_plugin_pref_frame,
-  0,    /* page_num (Reserved) */
-  NULL, /* frame (Reserved) */
 
   /* padding */
   NULL,
diff --git a/libpurple/plugin.h b/libpurple/plugin.h
--- a/libpurple/plugin.h
+++ b/libpurple/plugin.h
@@ -160,6 +160,7 @@ struct _PurplePlugin
 	void *extra;                           /**< Plugin-specific data.     */
 	gboolean unloadable;                   /**< Unloadable                */
 	GList *dependent_plugins;              /**< Plugins depending on this */
+	gpointer ui_data;                      /**< The UI data. */
 
 	void (*_purple_reserved1)(void);
 	void (*_purple_reserved2)(void);
@@ -173,9 +174,6 @@ struct _PurplePlugin
 struct _PurplePluginUiInfo {
 	PurplePluginPrefFrame *(*get_plugin_pref_frame)(PurplePlugin *plugin);
 
-	int page_num;                                         /**< Reserved */
-	PurplePluginPrefFrame *frame;                           /**< Reserved */
-
 	void (*_purple_reserved1)(void);
 	void (*_purple_reserved2)(void);
 	void (*_purple_reserved3)(void);
diff --git a/libpurple/plugins/autoaccept.c b/libpurple/plugins/autoaccept.c
--- a/libpurple/plugins/autoaccept.c
+++ b/libpurple/plugins/autoaccept.c
@@ -298,8 +298,6 @@ get_plugin_pref_frame(PurplePlugin *plug
 
 static PurplePluginUiInfo prefs_info = {
 	get_plugin_pref_frame,
-	0,
-	NULL,
 
 	/* padding */
 	NULL,
diff --git a/libpurple/plugins/joinpart.c b/libpurple/plugins/joinpart.c
--- a/libpurple/plugins/joinpart.c
+++ b/libpurple/plugins/joinpart.c
@@ -252,8 +252,6 @@ get_plugin_pref_frame(PurplePlugin *plug
 
 static PurplePluginUiInfo prefs_info = {
 	get_plugin_pref_frame,
-	0,   /* page_num (reserved) */
-	NULL, /* frame (reserved) */
 
 	/* padding */
 	NULL,
diff --git a/libpurple/plugins/log_reader.c b/libpurple/plugins/log_reader.c
--- a/libpurple/plugins/log_reader.c
+++ b/libpurple/plugins/log_reader.c
@@ -2909,8 +2909,6 @@ get_plugin_pref_frame(PurplePlugin *plug
 
 static PurplePluginUiInfo prefs_info = {
 	get_plugin_pref_frame,
-	0,   /* page_num (reserved) */
-	NULL, /* frame (reserved) */
 
 	/* padding */
 	NULL,
diff --git a/libpurple/plugins/newline.c b/libpurple/plugins/newline.c
--- a/libpurple/plugins/newline.c
+++ b/libpurple/plugins/newline.c
@@ -80,8 +80,6 @@ plugin_load(PurplePlugin *plugin)
 
 static PurplePluginUiInfo prefs_info = {
 	get_plugin_pref_frame,
-	0,   /* page_num (Reserved) */
-	NULL, /* frame (Reserved) */
 	/* Padding */
 	NULL,
 	NULL,
diff --git a/libpurple/plugins/offlinemsg.c b/libpurple/plugins/offlinemsg.c
--- a/libpurple/plugins/offlinemsg.c
+++ b/libpurple/plugins/offlinemsg.c
@@ -207,8 +207,6 @@ get_plugin_pref_frame(PurplePlugin *plug
 
 static PurplePluginUiInfo prefs_info = {
 	get_plugin_pref_frame,
-	0,
-	NULL,
 
 	/* padding */
 	NULL,
diff --git a/libpurple/plugins/perl/perl.c b/libpurple/plugins/perl/perl.c
--- a/libpurple/plugins/perl/perl.c
+++ b/libpurple/plugins/perl/perl.c
@@ -117,8 +117,6 @@ struct _PurplePerlInfoStrings
 static PurplePluginUiInfo ui_info =
 {
 	purple_perl_get_plugin_frame,
-	0,   /* page_num (Reserved) */
-	NULL, /* frame (Reserved)    */
 	/* Padding */
 	NULL,
 	NULL,
diff --git a/libpurple/plugins/pluginpref_example.c b/libpurple/plugins/pluginpref_example.c
--- a/libpurple/plugins/pluginpref_example.c
+++ b/libpurple/plugins/pluginpref_example.c
@@ -109,8 +109,6 @@ get_plugin_pref_frame(PurplePlugin *plug
 
 static PurplePluginUiInfo prefs_info = {
 	get_plugin_pref_frame,
-	0,   /* page_num (Reserved) */
-	NULL, /* frame (Reserved) */
 	/* Padding */
 	NULL,
 	NULL,
diff --git a/libpurple/plugins/psychic.c b/libpurple/plugins/psychic.c
--- a/libpurple/plugins/psychic.c
+++ b/libpurple/plugins/psychic.c
@@ -125,8 +125,6 @@ plugin_load(PurplePlugin *plugin) {
 
 static PurplePluginUiInfo prefs_info = {
   get_plugin_pref_frame,
-  0,    /* page_num (Reserved) */
-  NULL, /* frame (Reserved) */
 
   /* padding */
   NULL,
diff --git a/libpurple/plugins/statenotify.c b/libpurple/plugins/statenotify.c
--- a/libpurple/plugins/statenotify.c
+++ b/libpurple/plugins/statenotify.c
@@ -136,8 +136,6 @@ plugin_load(PurplePlugin *plugin)
 static PurplePluginUiInfo prefs_info =
 {
 	get_plugin_pref_frame,
-	0,   /* page_num (Reserved) */
-	NULL, /* frame (Reserved) */
 
 	/* padding */
 	NULL,
diff --git a/pidgin/gtkplugin.c b/pidgin/gtkplugin.c
--- a/pidgin/gtkplugin.c
+++ b/pidgin/gtkplugin.c
@@ -91,7 +91,7 @@ pidgin_plugin_get_config_frame(PurplePlu
 
 		config = pidgin_plugin_pref_create_frame(frame);
 
-		plugin->info->prefs_info->frame = frame;
+		plugin->ui_data = frame;
 	}
 
 	return config;
@@ -227,9 +227,9 @@ static void pref_dialog_response_cb(GtkW
 		}
 		gtk_widget_destroy(d);
 
-		if (plug->info->prefs_info && plug->info->prefs_info->frame) {
-			purple_plugin_pref_frame_destroy(plug->info->prefs_info->frame);
-			plug->info->prefs_info->frame = NULL;
+		if (plug->info->prefs_info && plug->ui_data) {
+			purple_plugin_pref_frame_destroy(plug->ui_data);
+			plug->ui_data = NULL;
 		}
 
 		break;
diff --git a/pidgin/gtkplugin.h b/pidgin/gtkplugin.h
--- a/pidgin/gtkplugin.h
+++ b/pidgin/gtkplugin.h
@@ -38,8 +38,6 @@ struct _PidginPluginUiInfo
 {
 	GtkWidget *(*get_config_frame)(PurplePlugin *plugin);
 
-	int page_num;                                         /**< Reserved */
-
 	/* padding */
 	void (*_pidgin_reserved1)(void);
 	void (*_pidgin_reserved2)(void);
diff --git a/pidgin/plugins/contact_priority.c b/pidgin/plugins/contact_priority.c
--- a/pidgin/plugins/contact_priority.c
+++ b/pidgin/plugins/contact_priority.c
@@ -165,7 +165,6 @@ get_config_frame(PurplePlugin *plugin)
 static PidginPluginUiInfo ui_info =
 {
 	get_config_frame,
-	0, /* page_num (Reserved) */
 	/* Padding */
 	NULL,
 	NULL,
diff --git a/pidgin/plugins/convcolors.c b/pidgin/plugins/convcolors.c
--- a/pidgin/plugins/convcolors.c
+++ b/pidgin/plugins/convcolors.c
@@ -386,7 +386,6 @@ get_config_frame(PurplePlugin *plugin)
 static PidginPluginUiInfo ui_info =
 {
 	get_config_frame,
-	0,
 
 	/* padding */
 	NULL,
diff --git a/pidgin/plugins/extplacement.c b/pidgin/plugins/extplacement.c
--- a/pidgin/plugins/extplacement.c
+++ b/pidgin/plugins/extplacement.c
@@ -122,8 +122,6 @@ get_plugin_pref_frame(PurplePlugin *plug
 
 static PurplePluginUiInfo prefs_info = {
 	get_plugin_pref_frame,
-	0,   /* page_num (Reserved) */
-	NULL, /* frame (Reserved) */
 
 	/* padding */
 	NULL,
diff --git a/pidgin/plugins/gestures/gestures.c b/pidgin/plugins/gestures/gestures.c
--- a/pidgin/plugins/gestures/gestures.c
+++ b/pidgin/plugins/gestures/gestures.c
@@ -259,7 +259,6 @@ get_config_frame(PurplePlugin *plugin)
 static PidginPluginUiInfo ui_info =
 {
 	get_config_frame,
-	0, /* page_num (Reserved) */
 
 	/* padding */
 	NULL,
diff --git a/pidgin/plugins/markerline.c b/pidgin/plugins/markerline.c
--- a/pidgin/plugins/markerline.c
+++ b/pidgin/plugins/markerline.c
@@ -219,8 +219,6 @@ get_plugin_pref_frame(PurplePlugin *plug
 
 static PurplePluginUiInfo prefs_info = {
 	get_plugin_pref_frame,
-	0,
-	NULL,
 
 	/* padding */
 	NULL,
diff --git a/pidgin/plugins/musicmessaging/musicmessaging.c b/pidgin/plugins/musicmessaging/musicmessaging.c
--- a/pidgin/plugins/musicmessaging/musicmessaging.c
+++ b/pidgin/plugins/musicmessaging/musicmessaging.c
@@ -665,7 +665,6 @@ get_config_frame(PurplePlugin *plugin)
 static PidginPluginUiInfo ui_info =
 {
 	get_config_frame,
-	0, /* page_num (reserved) */
 
 	/* padding */
 	NULL,
diff --git a/pidgin/plugins/notify.c b/pidgin/plugins/notify.c
--- a/pidgin/plugins/notify.c
+++ b/pidgin/plugins/notify.c
@@ -893,7 +893,6 @@ plugin_unload(PurplePlugin *plugin)
 static PidginPluginUiInfo ui_info =
 {
 	get_config_frame,
-	0, /* page_num (Reserved) */
 
 	/* padding */
 	NULL,
diff --git a/pidgin/plugins/pidginrc.c b/pidgin/plugins/pidginrc.c
--- a/pidgin/plugins/pidginrc.c
+++ b/pidgin/plugins/pidginrc.c
@@ -600,7 +600,6 @@ purplerc_get_config_frame(PurplePlugin *
 static PidginPluginUiInfo purplerc_ui_info =
 {
 	purplerc_get_config_frame,
-	0, /* page_num (Reserved) */
 
 	/* padding */
 	NULL,
diff --git a/pidgin/plugins/spellchk.c b/pidgin/plugins/spellchk.c
--- a/pidgin/plugins/spellchk.c
+++ b/pidgin/plugins/spellchk.c
@@ -2319,7 +2319,6 @@ get_config_frame(PurplePlugin *plugin)
 static PidginPluginUiInfo ui_info =
 {
 	get_config_frame,
-	0, /* page_num (Reserved) */
 
 	/* padding */
 	NULL,



More information about the Commits mailing list