~ubuntu-branches/ubuntu/saucy/gnomescan/saucy

« back to all changes in this revision

Viewing changes to src/flegita.c

  • Committer: Bazaar Package Importer
  • Author(s): Devid Antonio Filoni
  • Date: 2009-06-29 21:59:52 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090629215952-pkuzs5p6j0zewmvp
Tags: 0.6.2-0ubuntu1
* New upstream release 0.6.2 (0.7.1 seems to crash and still doesn't have
  all 0.6.2 features).
* Fix debhelper-but-no-misc-depends lintian warnings.
* Fix substvar-source-version-is-deprecated lintian warnings.
* Bump Standards-Version to 3.8.2.
* Fix binary-control-field-duplicates-source lintian infos.
* Fix duplicate-short-description lintian infos.
* debian/control: add libgegl-0.0-dev (>= 0.0.21) to Build-Depends field.
* Don't provide libgnomescanui* packages, upstream doesn't ship
  libgnomescanui files anymore.
* Update debian/watch file.
* debian/rules: do not include simple-patchsys.mk.
* debian/control: adjust dependencies.
* debian/control: add libglade2-dev (>= 2.6) to Build-Depends field.
* Update debian/copyright.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *            main.c
 
3
 *
 
4
 *  Tue Mar 13 13:40:25 2007
 
5
 *  Copyright  2007  Étienne Bersac <bersace03@laposte.net>
 
6
 ****************************************************************************/
 
7
 
 
8
/*
 
9
 * This program is free software; you can redistribute it and/or modify
 
10
 * it under the terms of the GNU General Public License as published by
 
11
 * the Free Software Foundation; either version 2 of the License, or
 
12
 * (at your option) any later version.
 
13
 * 
 
14
 * This program is distributed in the hope that it will be useful,
 
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
 * GNU Library General Public License for more details.
 
18
 * 
 
19
 * You should have received a copy of the GNU General Public License
 
20
 * along with this program; if not, write to the Free Software
 
21
 * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
 
22
 */
 
23
 
 
24
#ifdef HAVE_CONFIG_H
 
25
#include <config.h>
 
26
#endif
 
27
 
 
28
#include <glib/gprintf.h>
 
29
#include <glib/gi18n.h>
 
30
#include <gnome-scan-init.h>
 
31
#include <gnome-scan-dialog.h>
 
32
#include <gnome-scan-job.h>
 
33
#include <gnome-scan-sink.h>
 
34
#include "flegita-sink.h"
 
35
 
 
36
void
 
37
flegita_about(GtkButton *about,
 
38
                          GtkWindow *parent)
 
39
{
 
40
        const gchar *authors[] = {
 
41
                "Étienne Bersac <bersace03@laposte.net>",
 
42
                "Ross Burton <ross@burtonini.com>",
 
43
                NULL
 
44
        };
 
45
        
 
46
        gtk_show_about_dialog(parent,
 
47
                                                  "modal", TRUE,
 
48
                                                  "authors", authors,
 
49
                                                  "comments", g_strdup_printf("%s\n"
 
50
                                                                                                          "\n"
 
51
                                                                                                          "In Memoriam †Mark Finlay",
 
52
                                                                                                          _("Simply scan images")),
 
53
                                                  "copyright", "Copyright © 2006-2008 Étienne Bersac",
 
54
                                                  "license", "This program is free software; you can "
 
55
                                                  "redistribute it and/or modify it under the terms of "
 
56
                                                  "the GNU General Public License as published by "
 
57
                                                  "the Free Software Foundation; either version 3 of "
 
58
                                                  "the License, or (at your option) any later version."
 
59
                                                  "\n\n"
 
60
                                                  " This program is distributed in the hope that it "
 
61
                                                  "will be useful, but WITHOUT ANY WARRANTY; without "
 
62
                                                  "even the implied warranty of MERCHANTABILITY or "
 
63
                                                  "FITNESS FOR A PARTICULAR PURPOSE. See the GNU "
 
64
                                                  "General Public License for more details."
 
65
                                                  "\n\n"
 
66
                                                  "You should have received a copy of the GNU General "
 
67
                                                  "Public License along with this program; if not, "
 
68
                                                  "write to the Free Software Foundation, Inc., 51 "
 
69
                                                  "Franklin Street, Fifth Floor Boston, MA 02110-1301, "
 
70
                                                  "USA\n\n",
 
71
                                                  "logo-icon-name", "flegita",
 
72
                                                  /* Translators: Add your names here with one name per
 
73
                                                   line, like
 
74
                                                     "John Smith <email1@example.com>\n
 
75
                                                      Robert Foo <email2@example.com>" */
 
76
                                                  "translator-credits", _("translator-credit"),
 
77
                                                  "version", PACKAGE_VERSION,
 
78
                                                  "website", "http://www.gnome.org/project/gnome-scan/index",
 
79
                                                  "website-label", _("Gnome Scan website"),
 
80
                                                  "wrap-license", TRUE,
 
81
                                                  NULL);
 
82
}
 
83
 
 
84
gint
 
85
main (gint argc, gchar **argv)
 
86
{
 
87
        GnomeScanJob *job;
 
88
        GtkWidget *dialog;
 
89
        GnomeScanSink *sink;
 
90
        GtkWidget *about;
 
91
        
 
92
        textdomain (GETTEXT_PACKAGE);
 
93
 
 
94
        gtk_init (&argc, &argv);
 
95
        gnome_scan_init (&argc, &argv);
 
96
 
 
97
        gtk_window_set_default_icon_name ("flegita");
 
98
        g_set_application_name (_("Scanner Utility"));
 
99
        
 
100
        /* build */
 
101
        sink = flegita_sink_new();
 
102
        job = gnome_scan_job_new(NULL, sink);
 
103
        dialog = gnome_scan_dialog_new (NULL, job);
 
104
        
 
105
        /* ABOUT */
 
106
        about = gtk_button_new_from_stock (GTK_STOCK_ABOUT);
 
107
        gtk_box_pack_start (GTK_BOX(GTK_DIALOG(dialog)->action_area), about,
 
108
                                                FALSE, FALSE, 0);
 
109
        gtk_button_box_set_child_secondary (GTK_BUTTON_BOX(GTK_DIALOG(dialog)->action_area),
 
110
                                                                                about, TRUE);
 
111
        g_signal_connect(about, "clicked", G_CALLBACK(flegita_about), dialog);
 
112
        gtk_widget_show(about);
 
113
        
 
114
        /* run */
 
115
        gnome_scan_dialog_run (GNOME_SCAN_DIALOG (dialog));
 
116
        
 
117
        /* free */
 
118
        gtk_widget_destroy (dialog);
 
119
        g_object_unref(job);
 
120
        
 
121
        gnome_scan_exit ();
 
122
        
 
123
        return (0);
 
124
}