changeset 128:249174fdd63d

minor fixes.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Mon, 21 Jul 2008 11:42:06 +0900
parents 09bcb6ee5eb5
children 686498cc1e7a
files pidgin-twitter.c pidgin-twitter.h
diffstat 2 files changed, 7 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin-twitter.c	Mon Jul 21 11:24:44 2008 +0900
+++ b/pidgin-twitter.c	Mon Jul 21 11:42:06 2008 +0900
@@ -2436,7 +2436,6 @@
     gchar *filename;
     GtkWidget *window, *notebook, *e;
     const gchar *text;
-    int i;
 
     builder = gtk_builder_new();
 
@@ -2529,8 +2528,6 @@
                                  purple_prefs_get_bool(OPT_SHOW_ICON));
     g_signal_connect(e, "toggled",
                      G_CALLBACK(bool_toggled_cb), &e);
-    purple_prefs_connect_callback(plugin, OPT_ICON_SIZE, //xxx 
-                                  icon_size_prefs_cb, NULL);
 
     /* setup spin */
     e = GTK_WIDGET(gtk_builder_get_object (builder, "utility_icon_size_spin"));
@@ -2541,9 +2538,9 @@
     int value = purple_prefs_get_int(OPT_ICON_SIZE);
     twitter_debug("spin value = %d\n", value);
 
-	GtkAdjustment *adjust = gtk_adjustment_new(value, 16, 128, 4, 1, 1);
-    gtk_spin_button_set_adjustment(spin, adjust);
-    gtk_widget_set_size_request(spin, 50, -1);
+	GtkObject *adjust = gtk_adjustment_new(value, 16, 128, 4, 1, 1);
+    gtk_spin_button_set_adjustment(spin, GTK_ADJUSTMENT(adjust));
+    gtk_widget_set_size_request(GTK_WIDGET(spin), 50, -1);
 
     if(value == 0) {
         value = DEFAULT_ICON_SIZE;
@@ -2552,6 +2549,8 @@
     gtk_spin_button_set_value(GTK_SPIN_BUTTON(e), (gdouble)value);
     g_signal_connect(e, "value-changed",
                      G_CALLBACK(spin_changed_cb), &e);
+    purple_prefs_connect_callback(plugin, OPT_ICON_SIZE,
+                                  icon_size_prefs_cb, NULL);
 
 
 
@@ -2638,6 +2637,7 @@
     return notebook;
 }
 
+#if 0
 static PurplePluginPrefFrame *
 get_plugin_pref_frame(PurplePlugin *plugin)
 {
@@ -2821,7 +2821,6 @@
     return frame;
 }
 
-#if 0
 static PurplePluginUiInfo pref_info = {
     get_plugin_pref_frame
 };
--- a/pidgin-twitter.h	Mon Jul 21 11:24:44 2008 +0900
+++ b/pidgin-twitter.h	Mon Jul 21 11:42:06 2008 +0900
@@ -191,7 +191,7 @@
 static gboolean load_plugin(PurplePlugin *plugin);
 static gboolean unload_plugin(PurplePlugin *plugin);
 static void counter_prefs_cb(const char *name, PurplePrefType type, gconstpointer val, gpointer data);
-static PurplePluginPrefFrame *get_plugin_pref_frame(PurplePlugin *plugin);
+//static PurplePluginPrefFrame *get_plugin_pref_frame(PurplePlugin *plugin);
 static void init_plugin(PurplePlugin *plugin);
 static void remove_marks_func(gpointer key, gpointer value, gpointer user_data);
 static void cancel_fetch_func(gpointer key, gpointer value, gpointer user_data);