--- a/ChangeLog Sun Dec 06 16:59:09 2009 -0500
+++ b/ChangeLog Sun Dec 06 20:39:32 2009 -0500
@@ -1,6 +1,8 @@
* Add support for limiting the number of bytes of history displayed by
the Enhanced History plugin.
+ * Add a preference to the Google plugin to allow users to specify a + Google domain to use. For example, www.google.com or www.google.fr. * Fix the "Set User Modes On Connect" and "Unset User Modes On Connect"
settings provided by irc-more on IRC accounts.
* Fix Message Splitter so that it builds on Windows.
--- a/google/google.c Sun Dec 06 16:59:09 2009 -0500
+++ b/google/google.c Sun Dec 06 20:39:32 2009 -0500
@@ -33,6 +33,8 @@
#define GOOGLE_URL_FORMAT "http://%s/search?q=%s&btnI=I%%27m+Feeling+Lucky"
+#define GOOGLE_DOMAIN_PREF "/core/plugins/core-plugin_pack-google/domain" /******************************************************************************
*****************************************************************************/
@@ -230,8 +232,11 @@
GoogleFetchUrlData *gfud = NULL;
PurplePlugin *plugin = (PurplePlugin *)data;
+ const gchar *pref = NULL; - url = g_strdup_printf(GOOGLE_URL_FORMAT, "www.google.com",
+ pref = purple_prefs_get_string(GOOGLE_DOMAIN_PREF); + url = g_strdup_printf(GOOGLE_URL_FORMAT, + pref ? pref : "www.google.com", purple_url_encode(args[0]));
gfud = google_fetch_url_data_new(url);
@@ -256,6 +261,21 @@
/******************************************************************************
+ *****************************************************************************/ +static PurplePluginPrefFrame * +google_pref_frame(PurplePlugin *plugin) { + PurplePluginPrefFrame *frame = purple_plugin_pref_frame_new(); + PurplePluginPref *pref = + purple_plugin_pref_new_with_name_and_label(GOOGLE_DOMAIN_PREF, + _("Google Domain (i.e. www.google.com)")); + purple_plugin_pref_frame_add(frame, pref); +/****************************************************************************** *****************************************************************************/
@@ -278,6 +298,16 @@
+static PurplePluginUiInfo google_prefs_info = { static PurplePluginInfo info = {
@@ -302,7 +332,7 @@
@@ -320,6 +350,12 @@
info.summary = _("Returns the url for a Google \"I'm feeling lucky\" search");
info.description = info.summary;
+ purple_prefs_add_none("/core"); + purple_prefs_add_none("/core/plugins"); + purple_prefs_add_none("/core/plugins/core-plugin_pack-google"); + purple_prefs_add_string(GOOGLE_DOMAIN_PREF, "www.google.com"); PURPLE_INIT_PLUGIN(google, init_plugin, info)