diff pidgin-twitter.c @ 99:f207cc8da6cd

quick hack to make show icon configurable
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Fri, 11 Jul 2008 15:51:27 +0900
parents e460e1978ca3
children ceabb8099bf3
line wrap: on
line diff
--- a/pidgin-twitter.c	Thu Jul 10 20:26:22 2008 +0900
+++ b/pidgin-twitter.c	Fri Jul 11 15:51:27 2008 +0900
@@ -1231,7 +1231,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;
 }
@@ -1660,7 +1662,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");
@@ -1864,6 +1867,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 */
@@ -2021,8 +2029,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);