Mailing List Archive

NessusClient/nessus/prefs_dialog prefs_dialog_plugins_prefs.c, 1.17, 1.18
Update of /usr/local/cvs/NessusClient/nessus/prefs_dialog
In directory raccoon.nessus.org:/tmp/cvs-serv77830/nessus/prefs_dialog

Modified Files:
prefs_dialog_plugins_prefs.c
Log Message:
It can happen that the plugin prefs note book page is insensitive even
though it shouldn't. It turned out to that for some reason the
GTK_PARENT_SENSITIVE flag is unset even if the parents are sensitive.
This commit works around that problem.


Index: prefs_dialog_plugins_prefs.c
===================================================================
RCS file: /usr/local/cvs/NessusClient/nessus/prefs_dialog/prefs_dialog_plugins_prefs.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- prefs_dialog_plugins_prefs.c 25 Apr 2006 15:36:10 -0000 1.17
+++ prefs_dialog_plugins_prefs.c 3 Jul 2006 14:04:53 -0000 1.18
@@ -294,8 +294,25 @@
}
}
gtk_container_add(GTK_CONTAINER(frame), plugin_prefs);
+ /* It can happen that the GTK_PARENT_SENSITIVE flag is not set for the
+ * children of plugin_prefs even though all parents are sensitive.
+ * The effect of that is that the plugin prefs are insensitive even
+ * though they shouldn't be. Changing the sensitivity of plugin_prefs
+ * twice fixes that.
+ * It's not clear exactly why GTK_PARENT_SENSITIVE might be unset bit
+ * is probably has to do with the gtk_container_add and
+ * gtk_container_remove that done in this function and the fact that
+ * the sensitivity of the parent widgets of plugin_prefs changes over
+ * time. This might be a GTK bug */
+ gtk_widget_set_sensitive(plugin_prefs, FALSE);
+ gtk_widget_set_sensitive(plugin_prefs, TRUE);
gtk_widget_show(plugin_prefs);
+
gtk_container_add(GTK_CONTAINER(cred_frame), cred_s_window);
+ /* cred_frame's children may also have an unset GTK_PARENT_SENSITIVE
+ * flag so work around it in the same manner as above for plugin_prefs */
+ gtk_widget_set_sensitive(cred_frame, FALSE);
+ gtk_widget_set_sensitive(cred_frame, TRUE);
gtk_widget_show(cred_s_window);
}


_______________________________________________
Nessus-cvs mailing list
Nessus-cvs@list.nessus.org
http://mail.nessus.org/mailman/listinfo/nessus-cvs