]> git.sur5r.net Git - glabels/commitdiff
2005-03-22 Jim Evins <evins@snaught.com>
authorJim Evins <evins@snaught.com>
Wed, 23 Mar 2005 00:48:14 +0000 (00:48 +0000)
committerJim Evins <evins@snaught.com>
Wed, 23 Mar 2005 00:48:14 +0000 (00:48 +0000)
* src/commands.c: (activate_url), (gl_cmd_help_about):
Replaced GnomeAbout with GtkAboutDialog.  Therefore the
development version of glabels now depends on GTK 2.6 and
GNOME 2.10.
* configure.in:
Updated library dependencies.

git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@508 f5e0f49d-192f-0410-a22d-a8d8700d0965

glabels2/ChangeLog
glabels2/configure.in
glabels2/src/commands.c

index f67da5878e7eae2a9a6a8d082ad87166ffb33800..f1903fe1c7486ab9350956040758ec4d0e36a903 100644 (file)
@@ -1,3 +1,12 @@
+2005-03-22  Jim Evins  <evins@snaught.com>
+
+       * src/commands.c: (activate_url), (gl_cmd_help_about):
+               Replaced GnomeAbout with GtkAboutDialog.  Therefore the
+               development version of glabels now depends on GTK 2.6 and
+               GNOME 2.10.
+       * configure.in:
+               Updated library dependencies.
+
 2005-02-28  Jim Evins  <evins@snaught.com>
 
        * AUTHORS:
index 14eccbbe8f0be678d719877c08c9daf32dba0657..ff53de3536e057483091ae0b3e8ce8467d73029e 100644 (file)
@@ -49,17 +49,17 @@ AC_SUBST(LIBGLABELS_VERSION_INFO)
 dnl ---------------------------------------------------------------------------
 dnl - Library dependencies
 dnl ---------------------------------------------------------------------------
-GLIB_REQUIRED=2.2.0
-GTK_REQUIRED=2.0.5
-LIBGNOME_REQUIRED=2.0.1
-LIBGNOMEUI_REQUIRED=2.0.1
-LIBBONOBO_REQUIRED=2.0.0
-LIBBONOBOUI_REQUIRED=2.0.0
-LIBXML_REQUIRED=2.4.23
-LIBGNOMEPRINT_REQUIRED=2.2.0
-LIBGNOMEPRINTUI_REQUIRED=2.2.0
-LIBGNOMECANVAS_REQUIRED=2.0.1
-LIBGLADE_REQUIRED=2.0.1
+GLIB_REQUIRED=2.6.0
+GTK_REQUIRED=2.6.0
+LIBGNOME_REQUIRED=2.10.0
+LIBGNOMEUI_REQUIRED=2.10.0
+LIBBONOBO_REQUIRED=2.8.0
+LIBBONOBOUI_REQUIRED=2.8.0
+LIBXML_REQUIRED=2.6.0
+LIBGNOMEPRINT_REQUIRED=2.10.0
+LIBGNOMEPRINTUI_REQUIRED=2.10.0
+LIBGNOMECANVAS_REQUIRED=2.10.0
+LIBGLADE_REQUIRED=2.5.0
 
 dnl Make above strings available for packaging files (e.g. rpm spec files)
 AC_SUBST(GLIB_REQUIRED)
index b6a706ff87163999a19728b45112b8e2619fd4da..9d68d7208b6464f5d21ace078f095ee10d1358fe 100644 (file)
 
 #include <config.h>
 
+#include <glib/gi18n.h>
 #include <gtk/gtk.h>
-#include <libgnome/libgnome.h>
-#include <libgnomeui/libgnomeui.h>
+#include <libgnome/gnome-help.h>
+#include <libgnome/gnome-url.h>
 
 #include "commands.h"
 #include "view.h"
@@ -368,6 +369,16 @@ gl_cmd_help_contents (BonoboUIComponent *uic,
        }
 }
 
+/*--------------------------------------------------------------------------*/
+/* Private: URL handler.                                                    */
+/*--------------------------------------------------------------------------*/
+static void
+activate_url (GtkAboutDialog *about, const gchar *url, gpointer data)
+{
+       gnome_url_show (url, NULL);
+}
+
+
 /****************************************************************************/
 /* Help->About command.                                                     */
 /****************************************************************************/
@@ -376,37 +387,47 @@ gl_cmd_help_about (BonoboUIComponent *uic,
                   gpointer           user_data,
                   const gchar       *verbname)
 {
-       glWindow *window = GL_WINDOW (user_data);
+       glWindow         *window = GL_WINDOW (user_data);
+
        static GtkWidget *about = NULL;
+
        GdkPixbuf        *pixbuf = NULL;
        
-       gchar *copy_text = "Copyright 2001-2003 Jim Evins";
-       gchar *about_text =
-           _("A label and business card creation program for GNOME.\n"
-             " \n"
-             "Glabels is free software; you can redistribute it and/or modify it "
-             "under the terms of the GNU General Public License as published by "
-             "the Free Software Foundation; either version 2 of the License, or "
-             "(at your option) any later version.\n" " \n"
-             "This program is distributed in the hope that it will be useful, but "
-             "WITHOUT ANY WARRANTY; without even the implied warranty of "
-             "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU "
-             "General Public License for more details.\n");
-
-       gchar *authors[] = {
+       const gchar *authors[] = {
                "Jim Evins <evins@snaught.com>",
                " ",
+               "Frederic Ruaudel  <grumz@users.sf.net>",
+               "Wayne Schuller <k_wayne@linuxpower.org>",
+               "Emmanuel Pacaud <emmanuel.pacaud@univ-poitiers.fr>",
+               " ",
                _("See the file AUTHORS for additional credits,"),
                _("or visit http://glabels.sourceforge.net/"),
                NULL
        };
        
-       gchar *documenters[] = {
-               "",
+       const gchar *artists[] = {
+               "Nestor Di <nestordi@usuarios.retecal.es>",
+               "Jim Evins <evins@snaught.com>",
                NULL
        };
+       
+       const gchar *copy_text = "Copyright \xc2\xa9 2001-2005 Jim Evins";
+
+       const gchar *about_text = _("A label and business card creation program.\n");
 
-       gchar *translator_credits = _(" ");
+       const gchar *url = "http://glabels.sourceforge.net";
+
+       const gchar *translator_credits = _("translator-credits");
+
+       const gchar *license = _(
+             "Glabels is free software; you can redistribute it and/or modify it\n"
+             "under the terms of the GNU General Public License as published by\n"
+             "the Free Software Foundation; either version 2 of the License, or\n"
+             "(at your option) any later version.\n" "\n"
+             "This program is distributed in the hope that it will be useful, but\n"
+             "WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+             "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See\n"
+             "the GNU General Public License for more details.\n");
 
        gl_debug (DEBUG_COMMANDS, "");
 
@@ -414,33 +435,46 @@ gl_cmd_help_about (BonoboUIComponent *uic,
 
        if (about != NULL)
        {
-               gdk_window_show (about->window);
-               gdk_window_raise (about->window);
+               gtk_window_set_transient_for (GTK_WINDOW (about),
+                                             GTK_WINDOW (window));
+               gtk_window_present (GTK_WINDOW (about));
                return;
        }
        
        pixbuf = gdk_pixbuf_new_from_file ( LOGO_PIXMAP, NULL);
 
-       about = gnome_about_new (_("glabels"), VERSION,
-                                copy_text,
-                                about_text,
-                               (const char **)authors,
-                               (const char **)NULL,
-                               (const char *)NULL,
-                               pixbuf);
+       gtk_about_dialog_set_url_hook (activate_url, NULL, NULL);
+
+       about = gtk_about_dialog_new ();
+       gtk_about_dialog_set_name      (GTK_ABOUT_DIALOG(about), _("glabels"));
+       gtk_about_dialog_set_version   (GTK_ABOUT_DIALOG(about), VERSION);
+       gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG(about), copy_text);
+       gtk_about_dialog_set_comments  (GTK_ABOUT_DIALOG(about), about_text);
+       gtk_about_dialog_set_website   (GTK_ABOUT_DIALOG(about), url);
+       gtk_about_dialog_set_logo      (GTK_ABOUT_DIALOG(about), pixbuf);
+
+       gtk_about_dialog_set_authors   (GTK_ABOUT_DIALOG(about), authors);
+       gtk_about_dialog_set_artists   (GTK_ABOUT_DIALOG(about), artists);
+       gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG(about),
+                                                translator_credits);
+       gtk_about_dialog_set_license   (GTK_ABOUT_DIALOG(about), license);
+       
+       gtk_window_set_destroy_with_parent (GTK_WINDOW (about), TRUE);
+
+       g_signal_connect (G_OBJECT (about), "response",
+                         G_CALLBACK (gtk_widget_destroy), NULL);
+       g_signal_connect (G_OBJECT (about), "destroy",
+                         G_CALLBACK (gtk_widget_destroyed), &about);
 
        gtk_window_set_transient_for (GTK_WINDOW (about),
                                      GTK_WINDOW (window));
 
-       gtk_window_set_destroy_with_parent (GTK_WINDOW (about), TRUE);
+       gtk_window_present (GTK_WINDOW (about));
 
        if (pixbuf != NULL)
                g_object_unref (pixbuf);
        
-       g_signal_connect (G_OBJECT (about), "destroy",
-                         G_CALLBACK (gtk_widget_destroyed), &about);
        
-       gtk_widget_show (about);
 }