/pidgin/main: 800cf8ff15f8: Disable smileys button, if there are...
Tomasz Wasilczyk
tomkiewicz at cpw.pidgin.im
Tue Aug 6 10:47:41 EDT 2013
Changeset: 800cf8ff15f8de8ea249d9eef1d4a37c66d40813
Author: Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date: 2013-08-06 16:47 +0200
Branch: default
URL: https://hg.pidgin.im/pidgin/main/rev/800cf8ff15f8
Description:
Disable smileys button, if there are no smileys
diffstat:
pidgin/gtkwebviewtoolbar.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diffs (33 lines):
diff --git a/pidgin/gtkwebviewtoolbar.c b/pidgin/gtkwebviewtoolbar.c
--- a/pidgin/gtkwebviewtoolbar.c
+++ b/pidgin/gtkwebviewtoolbar.c
@@ -1014,7 +1014,8 @@ update_buttons_cb(GtkWebView *webview, G
gtk_action_set_sensitive(priv->image, buttons & GTK_WEBVIEW_IMAGE);
gtk_action_set_sensitive(priv->link, buttons & GTK_WEBVIEW_LINK);
- gtk_action_set_sensitive(priv->smiley, buttons & GTK_WEBVIEW_SMILEY);
+ gtk_action_set_sensitive(priv->smiley, (buttons & GTK_WEBVIEW_SMILEY) &&
+ pidgin_themes_get_proto_smileys(priv->sml));
}
/* we call this when we want to _set_active the toggle button, it'll
@@ -1522,6 +1523,9 @@ gtk_webviewtoolbar_init(GtkWebViewToolba
/* set attention button to be greyed out until we get a conversation */
gtk_action_set_sensitive(priv->attention, FALSE);
+ gtk_action_set_sensitive(priv->smiley,
+ (gboolean)pidgin_themes_get_proto_smileys(NULL));
+
purple_prefs_connect_callback(toolbar,
PIDGIN_PREFS_ROOT "/conversations/toolbar/wide",
webviewtoolbar_view_pref_changed, toolbar);
@@ -1621,6 +1625,9 @@ gtk_webviewtoolbar_switch_active_convers
gtk_action_set_sensitive(priv->attention,
conv && prpl && purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM &&
PURPLE_PLUGIN_PROTOCOL_INFO(prpl)->send_attention != NULL);
+
+ gtk_action_set_sensitive(priv->smiley,
+ (gboolean)pidgin_themes_get_proto_smileys(priv->sml));
}
void
More information about the Commits
mailing list