Tue, 06 Aug 2013 16:47:35 +0200
Disable smileys button, if there are no smileys
| pidgin/gtkwebviewtoolbar.c | file | annotate | diff | comparison | revisions |
--- a/pidgin/gtkwebviewtoolbar.c Tue Aug 06 16:11:01 2013 +0200 +++ b/pidgin/gtkwebviewtoolbar.c Tue Aug 06 16:47:35 2013 +0200 @@ -1014,7 +1014,8 @@ 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 @@ /* 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_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