[gnome-mud] About Patch



This patches in the about window.  I switched us from the deprecated
GnomeAbout to the hipper, newer GtkAboutDialog.  

This patch applies on top of my cplugin.patch.  (See? I do love you
Jordi ;) )

Les 
diff -Naur gnome-mud/src/mud-window.c gnome-mud-priv/src/mud-window.c
--- gnome-mud/src/mud-window.c	2005-12-28 16:34:45.000000000 -0800
+++ gnome-mud-priv/src/mud-window.c	2005-12-28 19:35:09.000000000 -0800
@@ -3,12 +3,7 @@
 #endif
 
 #include <glade/glade.h>
-#include <gtk/gtkdialog.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtknotebook.h>
-#include <gtk/gtkwidget.h>
+#include <gtk/gtk.h>
 #include <libgnome/gnome-i18n.h>
 #include <stdlib.h>
 
@@ -150,6 +145,22 @@
 }
 
 static void
+mud_window_about_cb(GtkWidget *widget, MudWindow *window)
+{
+	GtkWidget *dialog;
+	GladeXML *glade;
+	
+	glade = glade_xml_new(GLADEDIR "/main.glade", "about_window", "about_window");
+	dialog = glade_xml_get_widget(glade, "about_window");
+
+	gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), "0.10.9");
+	gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(dialog), "GNOME-Mud Homepage");
+	gtk_dialog_run(GTK_DIALOG(dialog));
+	
+	g_object_unref(glade);	
+}
+
+static void
 mud_window_mconnect_dialog(GtkWidget *widget, MudWindow *window)
 {
 	GtkWidget *mywig;
@@ -282,6 +293,8 @@
 	/* preferences window button */
 	g_signal_connect(glade_xml_get_widget(glade, "menu_preferences"), "activate", G_CALLBACK(mud_window_preferences_cb), window);
 	
+	g_signal_connect(glade_xml_get_widget(glade, "menu_about"), "activate", G_CALLBACK(mud_window_about_cb), window);
+	
 	/* other objects */
 	window->priv->notebook = glade_xml_get_widget(glade, "notebook");
 	g_signal_connect(window->priv->notebook, "switch-page", G_CALLBACK(mud_window_notebook_page_change), window);
diff -Naur gnome-mud/ui/main.glade gnome-mud-priv/ui/main.glade
--- gnome-mud/ui/main.glade	2005-12-28 17:23:08.000000000 -0800
+++ gnome-mud-priv/ui/main.glade	2005-12-28 19:36:31.000000000 -0800
@@ -6,11 +6,11 @@
 
 <widget class="GtkWindow" id="main_window">
   <property name="visible">True</property>
-  <property name="title" translatable="yes">GnomeMud</property>
+  <property name="title" translatable="yes">GNOME-Mud</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
   <property name="window_position">GTK_WIN_POS_NONE</property>
   <property name="modal">False</property>
-  <property name="default_width">500</property>
+  <property name="default_width">503</property>
   <property name="default_height">400</property>
   <property name="resizable">True</property>
   <property name="destroy_with_parent">False</property>
@@ -478,45 +478,6 @@
   </child>
 </widget>
 
-<widget class="GnomeAbout" id="about_window">
-  <property name="border_width">5</property>
-  <property name="visible">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="copyright" translatable="yes">� 1998-2005 Robin Ericsson</property>
-  <property name="comments" translatable="yes">A Multi-User Dungeon (MUD) client for GNOME.</property>
-  <property name="authors">Jordi Mallach &lt;jordi debian org&gt;
-Daniel Patton &lt;seven-nation army com&gt;
-Les Harris &lt;lescom comcast net&gt;
-
-David Zanetti &lt;dave lynx co nz&gt;
-Ben Gertzfield &lt;che debian org&gt;
-Will Schenk &lt;chilly psu edu&gt;
-desaster &lt;desaster sci fi&gt;
-Paul Cameron &lt;thrase progsoc uts edu au&gt;
-Abigail Brady &lt;morwen evilmagic org&gt;
-Bret Robideaux &lt;fayd alliances org&gt;
-Maxim Kiselev &lt;max hostel nstu ru&gt;
-Benjamin Curtis
-J�n Kosche 
-Jeroen Ruigrok &lt;asmodai wxs nl&gt;
-Jorge Garcia &lt;Jorge Garcia uv es&gt;
-Benjamin Geiger &lt;bgeiger ithink net&gt;
-Petter E. Stokke
-Vashti &lt;vashti jml net&gt;
-Sjoerd Simons &lt;sjoerd beast luon net&gt;
-Remi Bonnet</property>
-  <property name="documenters">Jordi Mallach &lt;jordi debian org&gt;</property>
-  <property name="translator_credits" translatable="yes">Jordi Mallach &lt;jordi debian org&gt;
-Martin Quinson
-J�n Kosche </property>
-</widget>
-
 <widget class="GtkDialog" id="preferences_window">
   <property name="visible">True</property>
   <property name="title" translatable="yes">Preferences</property>
@@ -1904,4 +1865,41 @@
   </child>
 </widget>
 
+<widget class="GtkAboutDialog" id="about_window">
+  <property name="visible">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="name" translatable="yes">GNOME-Mud</property>
+  <property name="copyright" translatable="yes">� 1998-2005 Robin Ericsson</property>
+  <property name="comments" translatable="yes">A Multi-User Dungeon (MUD) client for GNOME.</property>
+  <property name="wrap_license">False</property>
+  <property name="website">http://amcl.sourceforge.net/</property>
+  <property name="website_label" translatable="yes">GNOME-Mud Homepage</property>
+  <property name="authors">Jordi Mallach &lt;jordi debian org&gt;
+Daniel Patton &lt;seven-nation army com&gt;
+Les Harris &lt;lescom comcast net&gt;
+
+David Zanetti &lt;dave lynx co nz&gt;
+Ben Gertzfield &lt;che debian org&gt;
+Will Schenk &lt;chilly psu edu&gt;
+desaster &lt;desaster sci fi&gt;
+Paul Cameron &lt;thrase progsoc uts edu au&gt;
+Abigail Brady &lt;morwen evilmagic org&gt;
+Bret Robideaux &lt;fayd alliances org&gt;
+Maxim Kiselev &lt;max hostel nstu ru&gt;
+Benjamin Curtis
+J�n Kosche 
+Jeroen Ruigrok &lt;asmodai wxs nl&gt;
+Jorge Garcia &lt;Jorge Garcia uv es&gt;
+Benjamin Geiger &lt;bgeiger ithink net&gt;
+Petter E. Stokke
+Vashti &lt;vashti jml net&gt;
+Sjoerd Simons &lt;sjoerd beast luon net&gt;
+Remi Bonnet</property>
+  <property name="documenters">Jordi Mallach &lt;jordi debian org&gt;</property>
+  <property name="artists">Daniel Patton &lt;seven-nation army com&gt;</property>
+  <property name="translator_credits" translatable="yes" comments="TRANSLATORS: Replace this string with your names, one name per line.">Jordi Mallach &lt;jordi debian org&gt;
+Martin Quinson
+J�n Kosche </property>
+</widget>
+
 </glade-interface>
diff -Naur gnome-mud/ui/main.glade.bak gnome-mud-priv/ui/main.glade.bak
--- gnome-mud/ui/main.glade.bak	2005-12-28 17:23:08.000000000 -0800
+++ gnome-mud-priv/ui/main.glade.bak	2005-12-28 19:36:18.000000000 -0800
@@ -6,11 +6,11 @@
 
 <widget class="GtkWindow" id="main_window">
   <property name="visible">True</property>
-  <property name="title" translatable="yes">GnomeMud</property>
+  <property name="title" translatable="yes">GNOME-Mud</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
   <property name="window_position">GTK_WIN_POS_NONE</property>
   <property name="modal">False</property>
-  <property name="default_width">500</property>
+  <property name="default_width">503</property>
   <property name="default_height">400</property>
   <property name="resizable">True</property>
   <property name="destroy_with_parent">False</property>
@@ -478,45 +478,6 @@
   </child>
 </widget>
 
-<widget class="GnomeAbout" id="about_window">
-  <property name="border_width">5</property>
-  <property name="visible">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="copyright" translatable="yes">� 1998-2005 Robin Ericsson</property>
-  <property name="comments" translatable="yes">A Multi-User Dungeon (MUD) client for GNOME.</property>
-  <property name="authors">Jordi Mallach &lt;jordi debian org&gt;
-Daniel Patton &lt;seven-nation army com&gt;
-Les Harris &lt;lescom comcast net&gt;
-
-David Zanetti &lt;dave lynx co nz&gt;
-Ben Gertzfield &lt;che debian org&gt;
-Will Schenk &lt;chilly psu edu&gt;
-desaster &lt;desaster sci fi&gt;
-Paul Cameron &lt;thrase progsoc uts edu au&gt;
-Abigail Brady &lt;morwen evilmagic org&gt;
-Bret Robideaux &lt;fayd alliances org&gt;
-Maxim Kiselev &lt;max hostel nstu ru&gt;
-Benjamin Curtis
-J�n Kosche 
-Jeroen Ruigrok &lt;asmodai wxs nl&gt;
-Jorge Garcia &lt;Jorge Garcia uv es&gt;
-Benjamin Geiger &lt;bgeiger ithink net&gt;
-Petter E. Stokke
-Vashti &lt;vashti jml net&gt;
-Sjoerd Simons &lt;sjoerd beast luon net&gt;
-Remi Bonnet</property>
-  <property name="documenters">Jordi Mallach &lt;jordi debian org&gt;</property>
-  <property name="translator_credits" translatable="yes">Jordi Mallach &lt;jordi debian org&gt;
-Martin Quinson
-J�n Kosche </property>
-</widget>
-
 <widget class="GtkDialog" id="preferences_window">
   <property name="visible">True</property>
   <property name="title" translatable="yes">Preferences</property>
@@ -1904,4 +1865,41 @@
   </child>
 </widget>
 
+<widget class="GtkAboutDialog" id="about_window">
+  <property name="visible">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="name" translatable="yes">GNOME-Mud</property>
+  <property name="copyright" translatable="yes">� 1998-2005 Robin Ericsson</property>
+  <property name="comments" translatable="yes">A Multi-User Dungeon (MUD) client for GNOME.</property>
+  <property name="wrap_license">False</property>
+  <property name="website">http://amcl.sourceforge.net/</property>
+  <property name="website_label" translatable="yes">GNOME-Mud Homepage</property>
+  <property name="authors">Jordi Mallach &lt;jordi debian org&gt;
+Daniel Patton &lt;seven-nation army com&gt;
+Les Harris &lt;lescom comcast net&gt;
+
+David Zanetti &lt;dave lynx co nz&gt;
+Ben Gertzfield &lt;che debian org&gt;
+Will Schenk &lt;chilly psu edu&gt;
+desaster &lt;desaster sci fi&gt;
+Paul Cameron &lt;thrase progsoc uts edu au&gt;
+Abigail Brady &lt;morwen evilmagic org&gt;
+Bret Robideaux &lt;fayd alliances org&gt;
+Maxim Kiselev &lt;max hostel nstu ru&gt;
+Benjamin Curtis
+J�n Kosche 
+Jeroen Ruigrok &lt;asmodai wxs nl&gt;
+Jorge Garcia &lt;Jorge Garcia uv es&gt;
+Benjamin Geiger &lt;bgeiger ithink net&gt;
+Petter E. Stokke
+Vashti &lt;vashti jml net&gt;
+Sjoerd Simons &lt;sjoerd beast luon net&gt;
+Remi Bonnet</property>
+  <property name="documenters">Jordi Mallach &lt;jordi debian org&gt;</property>
+  <property name="artists">Daniel Patton &lt;seven-nation army com&gt;</property>
+  <property name="translator_credits" translatable="yes" comments="TRANSLATORS: Replace this string with your names, one name per line.">Jordi Mallach &lt;jordi debian org&gt;
+Martin Quinson
+J�n Kosche </property>
+</widget>
+
 </glade-interface>


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