[Pkg-privacy-commits] [pidgin-otr] 158/255: Avoid a gtk warning by checking for widget existence

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 12:51:38 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch experimental
in repository pidgin-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-privacy/packages/pidgin-otr.git



More information about the Pkg-privacy-commits mailing list