changeset 101:ceabb8099bf3

merged
author mikanbako <maoutwo@gmail.com>
date Fri, 11 Jul 2008 19:25:55 +0900
parents 86772af940ce (current diff) f207cc8da6cd (diff)
children 55c466028d48
files pidgin-twitter.c
diffstat 2 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin-twitter.c	Fri Jul 11 14:01:20 2008 +0900
+++ b/pidgin-twitter.c	Fri Jul 11 19:25:55 2008 +0900
@@ -1232,7 +1232,9 @@
     }
 
     /* insert icon actually */
-    gtk_imhtml_insert_image_at_iter(target_imhtml, icon_id, &insertion_point);
+    if(purple_prefs_get_bool(OPT_SHOW_ICON))
+        gtk_imhtml_insert_image_at_iter(target_imhtml,
+                                        icon_id, &insertion_point);
     gtk_text_buffer_delete_mark(target_buffer, requested_mark);
     requested_mark = NULL;
 }
@@ -1661,7 +1663,8 @@
     }
 
     /* if we have icon for this user, insert icon immediately */
-    gtk_imhtml_insert_image_at_iter(imhtml, icon_id, &insertion_point);
+    if(purple_prefs_get_bool(OPT_SHOW_ICON))
+        gtk_imhtml_insert_image_at_iter(imhtml, icon_id, &insertion_point);
     g_free(user_name); user_name = NULL;
 
     twitter_debug("reach end of function\n");
@@ -1865,6 +1868,11 @@
                                                       "Suppress oops message");
     purple_plugin_pref_frame_add(frame, pref);
 
+    /* show icon */
+    pref = purple_plugin_pref_new_with_name_and_label(OPT_SHOW_ICON,
+                                                      "Show icon");
+    purple_plugin_pref_frame_add(frame, pref);
+
 
     /*****************/
     /* sound heading */
@@ -2022,8 +2030,10 @@
 
     purple_prefs_add_bool(OPT_COUNTER, TRUE);
     purple_prefs_add_bool(OPT_SUPPRESS_OOPS, TRUE);
+    purple_prefs_add_bool(OPT_PREVENT_NOTIFICATION, FALSE);
+    purple_prefs_add_bool(OPT_SHOW_ICON, TRUE);
 
-    purple_prefs_add_bool(OPT_PREVENT_NOTIFICATION, FALSE);
+
 
     purple_prefs_add_bool(OPT_API_BASE_POST, FALSE);
     purple_prefs_add_string(OPT_SCREEN_NAME, EMPTY);
--- a/pidgin-twitter.h	Fri Jul 11 14:01:20 2008 +0900
+++ b/pidgin-twitter.h	Fri Jul 11 19:25:55 2008 +0900
@@ -48,6 +48,7 @@
 #define OPT_API_BASE_POST       OPT_PIDGINTWITTER "/api_base_post"
 #define OPT_SCREEN_NAME         OPT_PIDGINTWITTER "/screen_name"
 #define OPT_PASSWORD            OPT_PIDGINTWITTER "/password"
+#define OPT_SHOW_ICON           OPT_PIDGINTWITTER "/show_icon"
 
 /* formats and templates */
 #define RECIPIENT_FORMAT_TWITTER "@<a href='http://twitter.com/%s'>%s</a>"