[pkg-otr-team] [irssi-plugin-otr] 158/167: Avoid a gtk warning by checking for widget existence
Holger Levsen
holger at moszumanska.debian.org
Mon Mar 3 21:55:41 UTC 2014
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to tag 4.0.0
in repository irssi-plugin-otr.
commit 97de6edc0fb901a32170f12ebed0ccef1d229960
Author: Ian Goldberg <iang at cs.uwaterloo.ca>
Date: Thu Aug 23 09:21:54 2012 -0400
Avoid a gtk warning by checking for widget existence
clist_all_unselected() was marking the four buttons in the OTR
"Known fingerprints" configuration as unselectable, but sometimes before
they existed. Check for existence first.
---
gtk-ui.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/gtk-ui.c b/gtk-ui.c
index 6088b06..80261e7 100644
--- a/gtk-ui.c
+++ b/gtk-ui.c
@@ -138,10 +138,18 @@ static void account_menu_added_removed_cb(PurpleAccount *account, void *data)
static void clist_all_unselected(void)
{
- gtk_widget_set_sensitive(ui_layout.connect_button, 0);
- gtk_widget_set_sensitive(ui_layout.disconnect_button, 0);
- gtk_widget_set_sensitive(ui_layout.forget_button, 0);
- gtk_widget_set_sensitive(ui_layout.verify_button, 0);
+ if (ui_layout.connect_button) {
+ gtk_widget_set_sensitive(ui_layout.connect_button, 0);
+ }
+ if (ui_layout.disconnect_button) {
+ gtk_widget_set_sensitive(ui_layout.disconnect_button, 0);
+ }
+ if (ui_layout.forget_button) {
+ gtk_widget_set_sensitive(ui_layout.forget_button, 0);
+ }
+ if (ui_layout.verify_button) {
+ gtk_widget_set_sensitive(ui_layout.verify_button, 0);
+ }
ui_layout.selected_fprint = NULL;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-otr/packages/irssi-plugin-otr.git
More information about the Pkg-otr-team
mailing list