From: <de...@us...> - 2006-09-04 04:08:14
|
Revision: 17152 http://svn.sourceforge.net/gaim/?rev=17152&view=rev Author: deryni9 Date: 2006-09-03 21:08:07 -0700 (Sun, 03 Sep 2006) Log Message: ----------- I'm not sure how I put these in the wrong place to being with, but this is where they belong. Modified Paths: -------------- trunk/gtk/plugins/perl/common/GtkPluginPref.xs trunk/gtk/plugins/perl/common/GtkPrefs.xs Modified: trunk/gtk/plugins/perl/common/GtkPluginPref.xs =================================================================== --- trunk/gtk/plugins/perl/common/GtkPluginPref.xs 2006-09-04 03:58:23 UTC (rev 17151) +++ trunk/gtk/plugins/perl/common/GtkPluginPref.xs 2006-09-04 04:08:07 UTC (rev 17152) @@ -6,64 +6,7 @@ Gtk::Widget gaim_gtk_plugin_pref_create_frame(frame) Gaim::PluginPref::Frame frame - -Gtk::Widget -gaim_gtk_prefs_checkbox(title, key, page) - const char * title - const char * key - Gtk::Widget page - -Gtk::Widget -gaim_gtk_prefs_labeled_spin_button(page, title, key, min, max, sg) - Gtk::Widget page - const gchar * title - const char * key - int min - int max - Gtk::Size::Group sg - -Gtk::Widget -gaim_gtk_prefs_labeled_entry(page, title, key, sg) - Gtk::Widget page - const gchar * title - const char * key - Gtk::Size::Group sg */ -/* TODO I don't know how to handle this in XS -Gtk::Widget -gaim_gtk_prefs_dropdown(page, title, type, key, ...) - Gtk::Widget page - const gchar * title - Gaim::Pref::Type type - const char * key - -*/ - -/* This can't work at the moment since I don't have a typemap for Gtk::Widget. - * I thought about using the one from libgtk2-perl but wasn't sure how to go - * about doing that. -Gtk::Widget -gaim_gtk_prefs_dropdown_from_list(page, title, type, key, menuitems) - Gtk::Widget page - const gchar * title - Gaim::Pref::Type type - const char * key - SV *menuitems -PREINIT: - GList *t_GL; - int i, t_len; -CODE: - t_GL = NULL; - t_len = av_len((AV *)SvRV(menuitems)); - - for ( i = 0; i < t_len; i++) { - STRLEN t_sl; - t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(menuitems), i, 0), t_sl)); - RETVAL = gaim_gtk_prefs_dropdown_from_list(page, title, type, key, t_GL); -OUTPUT: - RETVAL -*/ - MODULE = Gaim::Gtk::PluginPref PACKAGE = Gaim::Gtk::PluginPref PREFIX = gaim_gtk_plugin_pref_ PROTOTYPES: ENABLE Modified: trunk/gtk/plugins/perl/common/GtkPrefs.xs =================================================================== --- trunk/gtk/plugins/perl/common/GtkPrefs.xs 2006-09-04 03:58:23 UTC (rev 17151) +++ trunk/gtk/plugins/perl/common/GtkPrefs.xs 2006-09-04 04:08:07 UTC (rev 17152) @@ -1,8 +1,74 @@ #include "gtkmodule.h" +/* This can't work at the moment since I don't have a typemap for Gtk::Widget. + * I thought about using the one from libgtk2-perl but wasn't sure how to go + * about doing that. +Gtk::Widget +gaim_gtk_prefs_checkbox(title, key, page) + const char * title + const char * key + Gtk::Widget page + +Gtk::Widget +gaim_gtk_prefs_labeled_spin_button(page, title, key, min, max, sg) + Gtk::Widget page + const gchar * title + const char * key + int min + int max + Gtk::Size::Group sg + +Gtk::Widget +gaim_gtk_prefs_labeled_entry(page, title, key, sg) + Gtk::Widget page + const gchar * title + const char * key + Gtk::Size::Group sg + +TODO Test this carefully, I'm not at all confident in the loop. +Gtk::Widget +gaim_gtk_prefs_dropdown(page, title, type, key, ...) + Gtk::Widget page + const gchar * title + Gaim::Pref::Type type + const char * key +PREINIT: + GList *t_GL; + int i; +CODE: + t_GL = NULL; + for (i = 0; i < items; i++) { + if (type == GAIM_PREF_INT || type == GAIM_PREF_BOOLEAN) { + t_GL = g_list_append(t_GL, SvIV(ST(i+1))); + else { + t_GL = g_list_append(t_GL, SvPV(ST(i+1))); + } + } + +Gtk::Widget +gaim_gtk_prefs_dropdown_from_list(page, title, type, key, menuitems) + Gtk::Widget page + const gchar * title + Gaim::Pref::Type type + const char * key + SV *menuitems +PREINIT: + GList *t_GL; + int i, t_len; +CODE: + t_GL = NULL; + t_len = av_len((AV *)SvRV(menuitems)); + + for ( i = 0; i < t_len; i++) { + STRLEN t_sl; + t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(menuitems), i, 0), t_sl)); + RETVAL = gaim_gtk_prefs_dropdown_from_list(page, title, type, key, t_GL); +OUTPUT: + RETVAL +*/ + MODULE = Gaim::Gtk::Prefs PACKAGE = Gaim::Gtk::Prefs PREFIX = gaim_gtk_prefs_ PROTOTYPES: ENABLE void gaim_gtk_prefs_show() - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |