diff options
author | Sorvival <sorvival@tutanota.com> | 2021-11-25 01:23:25 -0600 |
---|---|---|
committer | Sorvival <sorvival@tutanota.com> | 2021-11-25 01:23:25 -0600 |
commit | 23cccea969194f06a7811ee31446218fadec7c70 (patch) | |
tree | befaca479cec624a90140f19cd75f326d26a557c /pidgin/plugins | |
parent | 13cc2ac3fee42ca3ace0720afb7168522eb256b7 (diff) | |
download | pidgin-23cccea969194f06a7811ee31446218fadec7c70.tar.gz |
Remove usage of pidgin_conv_is_hidden from transparency plugin
This plugin is only used on Windows so that's probably why we didn't notice
that it used this function when we deprecated it a few weeks ago.
Testing Done:
Compiled on Windows and verified the plugin can be enabled without crashing. Couldn't test it with a conversation since Pidgin3 on Windows crashes for me when I try to add a new account.
Reviewed at https://reviews.imfreedom.org/r/1139/
Diffstat (limited to 'pidgin/plugins')
-rw-r--r-- | pidgin/plugins/transparency.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pidgin/plugins/transparency.c b/pidgin/plugins/transparency.c index a5c9ac6acc..1836067283 100644 --- a/pidgin/plugins/transparency.c +++ b/pidgin/plugins/transparency.c @@ -353,7 +353,7 @@ conv_updated_cb(PurpleConversation *conv, PurpleConversationUpdateType type) { PidginConversation *pconv = PIDGIN_CONVERSATION(conv); PidginConvWindow *win = pidgin_conv_get_window(pconv); - if (type == PURPLE_CONVERSATION_UPDATE_UNSEEN && !pidgin_conv_is_hidden(pconv) + if(type == PURPLE_CONVERSATION_UPDATE_UNSEEN && pconv->unseen_state == PIDGIN_UNSEEN_NONE && pidgin_conv_window_get_gtkconv_count(win) == 1) { GtkWidget *window = win->window; @@ -361,10 +361,11 @@ conv_updated_cb(PurpleConversation *conv, PurpleConversationUpdateType type) { g_object_get(G_OBJECT(window), "has-toplevel-focus", &has_focus, NULL); - if (!has_focus || !purple_prefs_get_bool(OPT_WINTRANS_IM_ONFOCUS)) + if(!has_focus || !purple_prefs_get_bool(OPT_WINTRANS_IM_ONFOCUS)) { set_conv_window_trans(NULL, win); + } - if (g_signal_handler_find(G_OBJECT(window), G_SIGNAL_MATCH_FUNC, + if(g_signal_handler_find(G_OBJECT(window), G_SIGNAL_MATCH_FUNC, 0, 0, NULL, G_CALLBACK(focus_conv_win_cb), NULL) == 0) { g_signal_connect(G_OBJECT(window), "focus_in_event", G_CALLBACK(focus_conv_win_cb), window); @@ -380,7 +381,7 @@ new_conversation_cb(PurpleConversation *conv) { /* If it is the first conversation in the window, * add the sliders, and set transparency */ - if (!pidgin_conv_is_hidden(PIDGIN_CONVERSATION(conv)) && pidgin_conv_window_get_gtkconv_count(win) == 1) { + if(pidgin_conv_window_get_gtkconv_count(win) == 1) { GtkWidget *window = win->window; set_conv_window_trans(NULL, win); |