changeset 12874:e65a7a7eabaf

[gaim-migrate @ 15226] Remove some stuff that's not being used anymore, and finish making gtk pref frames work like plugin pref frames. Note: the gtk pref stuff hasn't been tested by me because all it does is crash and I haven't quite figured out why yet, but I think my changes should be fine. It was crashing before I made them as well. committer: Tailor Script <tailor@pidgin.im>
author Etan Reisner <pidgin@unreliablesource.net>
date Sat, 14 Jan 2006 09:06:40 +0000
parents 96d611ab3fcb
children 7a432c828225
files plugins/perl/perl-handlers.c
diffstat 1 files changed, 7 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/perl/perl-handlers.c	Sat Jan 14 08:32:01 2006 +0000
+++ b/plugins/perl/perl-handlers.c	Sat Jan 14 09:06:40 2006 +0000
@@ -6,8 +6,6 @@
 
 static GList *timeout_handlers = NULL;
 static GList *signal_handlers = NULL;
-static char *perl_plugin_pref_cb;
-static char *perl_gtk_plugin_pref_cb;
 extern PerlInterpreter *my_perl;
 
 /* perl < 5.8.0 doesn't define PERL_MAGIC_ext */
@@ -63,32 +61,22 @@
 	return gl;
 }
 
-
-GaimGtkPluginUiInfo *
-gaim_perl_gtk_plugin_pref(const char * frame_cb)
-{
-	GaimGtkPluginUiInfo *ui_info;
-
-	ui_info = g_new0(GaimGtkPluginUiInfo, 1);
-	perl_gtk_plugin_pref_cb = g_strdup(frame_cb);
-	ui_info->get_config_frame = gaim_perl_gtk_get_plugin_frame;
-
-	return ui_info;
-}
-
 GtkWidget *
 gaim_perl_gtk_get_plugin_frame(GaimPlugin *plugin)
 {
 	SV * sv;
-	GtkWidget *ret;
+	int count;
 	MAGIC *mg;
+	GtkWidget *ret;
+	GaimPerlScript *gps;
 	dSP;
-	int count;
+
+	gps = (GaimPerlScript *)plugin->info->extra_info;
 
 	ENTER;
 	SAVETMPS;
 
-	count = call_pv(perl_gtk_plugin_pref_cb, G_SCALAR | G_NOARGS);
+	count = call_pv(gps->gtk_prefs_sub, G_SCALAR | G_NOARGS);
 	if (count != 1)
 		croak("call_pv: Did not return the correct number of values.\n");
 
@@ -98,7 +86,7 @@
 	/* We have a Gtk2::Frame on top of the stack */
 	sv = POPs;
 
-	/* The magic field hides the pointer to the actuale GtkWidget */
+	/* The magic field hides the pointer to the actual GtkWidget */
 	mg = mg_find(SvRV(sv), PERL_MAGIC_ext);
 	ret = (GtkWidget *)mg->mg_ptr;
 
@@ -109,22 +97,6 @@
 	return ret;
 }
 
-/* Called to create a pointer to GaimPluginUiInfo for the GaimPluginInfo */
-/* It will then in turn create ui_info with the C function pointer       */
-/* that will eventually do a call_pv to call a perl functions so users   */
-/* can create their own frames in the prefs                              */
-GaimPluginUiInfo *
-gaim_perl_plugin_pref(const char * frame_cb)
-{
-	GaimPluginUiInfo *ui_info;
-
-	ui_info = g_new0(GaimPluginUiInfo, 1);
-	perl_plugin_pref_cb = g_strdup(frame_cb);
-	ui_info->get_plugin_pref_frame = gaim_perl_get_plugin_frame;
-
-	return ui_info;
-}
-
 GaimPluginPrefFrame *
 gaim_perl_get_plugin_frame(GaimPlugin *plugin)
 {