Nessus Client and GTK 2.4

Marlon Jabbur <[email protected]>
Newsgroups gmane.comp.security.nessus.devel
Message-ID <[email protected]>
Hi,

I've noticed a strange behaviour, at least to me, in nessus version
2.0.12 compiled in a Fedora Core 2 (GTK 2.4). 
When I execute the GUI the main dialog is now a GTKDialog and when 
it's executed it is in a MODAL state so any other nessus window will 
be placed behind it and it will be hidden by the main dialog. 
I've also noticed that the information dialogs (warnings, errors, etc) 
don't have any border so it sounds quite strange, at least to me :).

I've made a patch, attached to this mail, that worked for me but I'm
not sure if it will work in any situation.

Regards,
Marlon

_______________________________________________
Nessus-devel mailing list
[email protected]
http://mail.nessus.org/mailman/listinfo/nessus-devel
nessus-core-2.0.12.patch (text/plain, 2.1 KB)
diff -Naur nessus-core/nessus/error_dialog.c nessus-core-modified/nessus/error_dialog.c
--- nessus-core/nessus/error_dialog.c	2004-04-11 09:29:43.000000000 -0300
+++ nessus-core-modified/nessus/error_dialog.c	2004-08-01 18:30:08.416087144 -0300
@@ -98,16 +98,24 @@
 	name = "Error";
 	break;
   }
- 
-  dialog = gtk_window_new(WINDOW_DIALOG);
+  
+  #if GTK_VERSION < 20 
+    dialog = gtk_window_new(WINDOW_DIALOG);
+  #else
+    dialog = gtk_dialog_new();
+  #endif
   gtk_window_set_title(GTK_WINDOW(dialog), name);
   gtk_signal_connect (GTK_OBJECT (dialog), "delete_event",
 		      GTK_SIGNAL_FUNC (delete_event), NULL); 
   gtk_window_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER);
-  vbox = gtk_vbox_new(FALSE, 15);
-  gtk_container_border_width(GTK_CONTAINER(dialog), 10);
-  gtk_container_add(GTK_CONTAINER(dialog), vbox);
-  gtk_widget_show(vbox);
+  #if GTK_VERSION < 20
+    vbox = gtk_vbox_new(FALSE, 15);
+    gtk_container_border_width(GTK_CONTAINER(dialog), 10);
+    gtk_container_add(GTK_CONTAINER(dialog), vbox);
+    gtk_widget_show(vbox);
+  #else
+    vbox = GTK_DIALOG(dialog)->vbox;
+  #endif
   
   hbox = gtk_hbox_new(FALSE,5);
   gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE,0);
diff -Naur nessus-core/nessus/prefs_dialog/prefs_dialog.c nessus-core-modified/nessus/prefs_dialog/prefs_dialog.c
--- nessus-core/nessus/prefs_dialog/prefs_dialog.c	2003-09-30 22:50:12.000000000 -0300
+++ nessus-core-modified/nessus/prefs_dialog/prefs_dialog.c	2004-08-01 18:15:12.182335384 -0300
@@ -95,11 +95,7 @@
 /*
  * We draw the window ....
  */
-#if GTK_VERSION >= 20
- window = gtk_dialog_new();
-#else 
  window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-#endif 
  gtk_signal_connect(GTK_OBJECT(window), "delete_event",
                      (GtkSignalFunc)close_display,NULL);
                      
@@ -110,13 +106,9 @@
  /*
   * We put a vbox in it...
   */
-#if GTK_VERSION < 20  
  box = gtk_vbox_new(FALSE, 10);
  gtk_container_add(GTK_CONTAINER(window), box);
  gtk_widget_show(box);
-#else
- box = GTK_DIALOG(window)->vbox; 
-#endif 
 /* 
  * We set up the notebook
  */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.