about box patch 2nd try



Hi all,

This one doesn't show multiple about boxes at once. It brings the
existing one to front (gdk_window_raise).

Jeroen

Index: src/gI_window.c
===================================================================
RCS file: /cvs/gnome/gIDE/src/gI_window.c,v
retrieving revision 1.32
diff -u -r1.32 gI_window.c
--- src/gI_window.c	2001/06/21 03:01:33	1.32
+++ src/gI_window.c	2001/06/27 18:07:14
@@ -38,6 +38,26 @@
 	gtk_main_quit ();
 }
 
+static void
+about_gide (GtkWidget *w, GideWindow *window)
+{
+	static const gchar *authors[] = {"Steffen Kern",
+		"JP Rosevear",
+		"Dirk Vangestel",
+		NULL};
+	
+	static GtkWidget *about;
+	if (!GTK_IS_WIDGET (about)) {
+		about = gnome_about_new ( _("gIDE"), 
+			VERSION,
+			_("Copyright Stefan Kern (C) 1998-2000"),
+			authors,
+			"A Gnome based IDE", 
+			NULL);
+		gtk_widget_show (about);
+	} else
+		gdk_window_raise (GTK_WIDGET (about)->window);
+}
 
 /* Menu verbs */
 static BonoboUIVerb verbs [] = {
@@ -45,8 +65,8 @@
 #if 0
 	BONOBO_UI_UNSAFE_VERB ("ToolsPlugins", dialog_plugin_manager),
 	BONOBO_UI_UNSAFE_VERB ("SettingsSettings", dialog_prefs_cb),
-	BONOBO_UI_UNSAFE_VERB ("HelpAbout", about_gide),
 #endif
+	BONOBO_UI_UNSAFE_VERB ("HelpAbout", about_gide),
 	
 	BONOBO_UI_VERB_END
 };






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]