about box patch final version



Hi jpr,

Here's the (hopefully) the final version.

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/28 18:21:12
@@ -38,15 +38,44 @@
 	gtk_main_quit ();
 }
 
+static void
+about_cmd_destroy (GtkWidget *w, gpointer data)
+{
+	GtkWidget **about = (GtkWidget **)data;
+	*about = NULL;
+}
 
+static void
+about_cmd (GtkWidget *w, GideWindow *window)
+{
+	static const gchar *authors[] = {"Steffen Kern",
+		"JP Rosevear",
+		"Dirk Vangestel",
+		NULL};
+	
+	static GtkWidget *about = NULL;
+	if (!about) {
+		about = gnome_about_new ( _("gIDE"), 
+			VERSION,
+			_("Copyright Steffen Kern (C) 1998-2000"),
+			authors,
+			"A Gnome based IDE", 
+			NULL);
+		gtk_signal_connect (GTK_OBJECT (about), "destroy",
+				    about_cmd_destroy, &about);
+		gtk_widget_show (about);
+	} else
+		gdk_window_raise (GTK_WIDGET (about)->window);
+}
+
 /* Menu verbs */
 static BonoboUIVerb verbs [] = {
 	BONOBO_UI_UNSAFE_VERB ("FileExit", tmp_exit),
 #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_cmd),
 	
 	BONOBO_UI_VERB_END
 };


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