Mercurial > pidgin-twitter
changeset 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 |
files | pidgin-twitter.c pidgin-twitter.h |
diffstat | 2 files changed, 14 insertions(+), 3 deletions(-) [+] |
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);
--- 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 "@<a href='http://twitter.com/%s'>%s</a>"