gnome-scan r533 - in trunk: . src
- From: bersace svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-scan r533 - in trunk: . src
- Date: Wed, 27 Feb 2008 20:40:00 +0000 (GMT)
Author: bersace
Date: Wed Feb 27 20:40:00 2008
New Revision: 533
URL: http://svn.gnome.org/viewvc/gnome-scan?rev=533&view=rev
Log:
About dialog.
Modified:
trunk/ChangeLog
trunk/src/flegita.c
Modified: trunk/src/flegita.c
==============================================================================
--- trunk/src/flegita.c (original)
+++ trunk/src/flegita.c Wed Feb 27 20:40:00 2008
@@ -27,12 +27,58 @@
#include <glib/gprintf.h>
#include <gnome.h>
+#include <glib/gi18n.h>
#include <gnome-scan-init.h>
#include <gnome-scan-dialog.h>
#include <gnome-scan-job.h>
#include <gnome-scan-sink.h>
#include "flegita-sink.h"
+void
+flegita_about(GtkButton *about,
+ GtkWindow *parent)
+{
+ const gchar *authors[] = {
+ "Ãtienne Bersac <bersace03 laposte net>",
+ NULL
+ };
+
+ gtk_show_about_dialog(parent,
+ "modal", TRUE,
+ "authors", authors,
+ "comments", g_strdup_printf("%s\n"
+ "\n"
+ "In Memoriam âMark Finlay",
+ _("Simply scan image")),
+ "copyright", "Copyright  2006-2008 Ãtienne Bersac",
+ "license", "This program 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 3 of "
+ "the License, or (at your option) any later version."
+ "\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"
+ "You should have received a copy of the GNU General "
+ "Public License along with this program; if not, "
+ "write to the Free Software Foundation, Inc., 51 "
+ "Franklin Street, Fifth Floor Boston, MA 02110-1301, "
+ "USA\n",
+ "logo-icon-name", "flegita",
+ "program-name", g_get_application_name (),
+ /* translator : Add you in this field */
+ "translator-credits", _("Not translated"),
+ "version", PACKAGE_VERSION,
+ "website", "http://www.gnome.org/project/gnome-scan/index",
+ "website-label", _("Gnome Scan website"),
+ "wrap-license", TRUE,
+ NULL);
+}
+
gint
main (gint argc, gchar **argv)
{
@@ -40,7 +86,9 @@
GnomeScanJob *job;
GtkWidget *dialog;
GnomeScanSink *sink;
+ GtkWidget *about;
+ /* init */
program = gnome_program_init ("flegita", VERSION,
LIBGNOMEUI_MODULE,
argc, argv,
@@ -54,11 +102,24 @@
gtk_window_set_default_icon_name ("flegita");
gnome_scan_init (&argc, &argv);
+ /* build */
sink = flegita_sink_new();
job = gnome_scan_job_new(NULL, sink);
dialog = gnome_scan_dialog_new (NULL, job);
+
+ /* ABOUT */
+ about = gtk_button_new_from_stock (GTK_STOCK_ABOUT);
+ gtk_box_pack_start (GTK_BOX(GTK_DIALOG(dialog)->action_area), about,
+ FALSE, FALSE, 0);
+ gtk_button_box_set_child_secondary (GTK_BUTTON_BOX(GTK_DIALOG(dialog)->action_area),
+ about, TRUE);
+ g_signal_connect(about, "clicked", G_CALLBACK(flegita_about), dialog);
+ gtk_widget_show(about);
+
+ /* run */
gnome_scan_dialog_run (GNOME_SCAN_DIALOG (dialog));
+ /* free */
gtk_widget_destroy (dialog);
g_object_unref(job);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]