# HG changeset patch # User Yoshiki Yazawa # Date 1215759087 -32400 # Node ID f207cc8da6cdd43f112962dfdec113a5e06f2b23 # Parent e460e1978ca3929cf8694199219ba7109af3f2b5 quick hack to make show icon configurable diff -r e460e1978ca3 -r f207cc8da6cd pidgin-twitter.c --- 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); diff -r e460e1978ca3 -r f207cc8da6cd pidgin-twitter.h --- a/pidgin-twitter.h Thu Jul 10 20:26:22 2008 +0900 +++ b/pidgin-twitter.h Fri Jul 11 15:51:27 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 "@%s"