A small patch



Attached is a small patch to:
* re-work the about dialog's destruction/creation as discussed with
Jeroen and Dave on #devel-apps.
* fix the UTF-8 encoding in the about box. Not sure if this is correct,
but I was told to keep it in the patch after gEdit did edits behind my
back.  Don't blame me.

Ross
-- 
Ross Burton                                 mail: ross burtonini com
                                       jabber: rossburton jabber org
                        diary: http://advogato.org/person/RossBurton
 PGP Fingerprint: 1A21 F5B0 D8D0 CFE3 81D4 E25A 2D09 E447 D0B4 33DF
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/anjuta2/ChangeLog,v
retrieving revision 1.209
diff -u -r1.209 ChangeLog
--- ChangeLog	2002/05/30 22:15:23	1.209
+++ ChangeLog	2002/05/31 12:28:43
@@ -1,3 +1,8 @@
+2002-05-31  Ross Burton  <ross burtonini com>
+
+	* src/window.c: Re-work the signal handling to use weak references
+	instead of callbacks; and fix some UTF-8 encoding.
+
 2002-05-30  Ross Burton  <ross burtonini com>
 
 	* src/window.c: Tell the about dialog who its parent is so that it
Index: src/window.c
===================================================================
RCS file: /cvs/gnome/anjuta2/src/window.c,v
retrieving revision 1.59
diff -u -r1.59 window.c
--- src/window.c	2002/05/30 22:15:25	1.59
+++ src/window.c	2002/05/31 12:28:43
@@ -54,13 +54,6 @@
 }
 
 static void
-about_cmd_destroy (GtkWidget *w, gpointer data)
-{
-	GtkWidget **about = (GtkWidget **)data;
-	*about = NULL;
-}
-
-static void
 about_cmd (GtkWidget *w, AnjutaWindow *window)
 {
 	static const gchar *authors[] = {
@@ -69,7 +62,7 @@
 		"Dirk Vangestel",
 		"Naba Kumar",
 		"Jeroen Zwartepoorte",
-		"Gustavo Giráldez",
+		"Gustavo Giráldez",
 		NULL};
 	static GtkWidget *about = NULL;
 
@@ -90,9 +83,8 @@
 			 VERSION,
 			 _("Copyright Various Authors (C) 1998-2001"),
 			 "A Gnome based IDE", authors, NULL, NULL, NULL);
-		gtk_window_set_transient_for (GTK_WINDOW(about), GTK_WINDOW(window));
-		g_signal_connect(GTK_OBJECT (about), "destroy",
-				 G_CALLBACK (about_cmd_destroy), &about);
+		gtk_window_set_transient_for (GTK_WINDOW (about), GTK_WINDOW (window));
+		g_object_add_weak_pointer (G_OBJECT (about), &about);
 		gtk_widget_show (about);
 	} else
 		gdk_window_raise (GTK_WIDGET (about)->window);


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