1 /* === S Y N F I G ========================================================= */
3 ** \brief About dialog implementation
8 ** Copyright (c) 2008 Paul Wise
10 ** This package is free software; you can redistribute it and/or
11 ** modify it under the terms of the GNU General Public License as
12 ** published by the Free Software Foundation; either version 2 of
13 ** the License, or (at your option) any later version.
15 ** This package is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ** General Public License for more details.
21 /* ========================================================================= */
23 /* === H E A D E R S ======================================================= */
36 #include <gtkmm/aboutdialog.h>
38 #include <ETL/stringf>
40 #include <synfig/general.h>
42 // This is generated at make time from .svn or .git/svn or autorevision.conf
43 #include <autorevision.h>
52 /* === U S I N G =========================================================== */
56 using namespace studio;
58 /* === M A C R O S ========================================================= */
61 #define VERSION "unknown"
62 #define PACKAGE "synfigstudio"
68 # define IMAGE_DIR "share\\pixmaps"
73 # define IMAGE_DIR "/usr/local/share/pixmaps"
77 # define IMAGE_EXT "png"
80 #define stringify_(x) #x
81 #define stringify(x) stringify_(x)
83 /* === G L O B A L S ======================================================= */
85 extern const guint gtk_major_version;
86 extern const guint gtk_minor_version;
87 extern const guint gtk_micro_version;
88 extern const guint gtk_binary_age;
89 extern const guint gtk_interface_age;
91 /* === P R O C E D U R E S ================================================= */
93 /* === M E T H O D S ======================================================= */
98 #ifdef HAVE_GTK_ABOUTDIALOG_SET_PROGRAM_NAME
99 set_program_name(PACKAGE_NAME);
101 set_name(PACKAGE_NAME);
103 set_version(VERSION);
104 set_comments(_("2D vector animation studio"));
106 set_url_hook(sigc::mem_fun(*this, &About::on_link_clicked));
107 set_website("http://synfig.org/");
108 set_website_label(_("Visit the Synfig website"));
110 set_copyright(_("Copyright 2001-2010\nRobert B. Quattlebaum Jr.,\nAdrian Bentley and Synfig contributors"));
111 Glib::ustring license =
112 "This program is free software; you can redistribute it and/or modify "
113 "it under the terms of the GNU General Public License as published by "
114 "the Free Software Foundation; either version 2 of the License, or "
115 "(at your option) any later version.\n\n"
117 "This program is distributed in the hope that it will be useful, "
118 "but WITHOUT ANY WARRANTY; without even the implied warranty of "
119 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "
120 "GNU General Public License for more details.\n\n"
122 "You should have received a copy of the GNU General Public License along "
123 "with this program; if not, write to the Free Software Foundation, Inc., "
124 "51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or visit: http://www.gnu.org/";
125 set_license(license);
126 #ifdef HAVE_GTK_ABOUTDIALOG_SET_WRAP_LICENSE
127 set_wrap_license(true);
130 std::vector<Glib::ustring> authors;
131 authors.push_back(_("Original developers:"));
132 authors.push_back("");
133 authors.push_back("Robert B. Quattlebaum Jr (darco)");
134 authors.push_back("Adrian Bentley");
135 authors.push_back("");
136 authors.push_back(_("Contributors:"));
137 authors.push_back("");
138 authors.push_back("Adrian Winchell (SnapSilverlight)");
139 authors.push_back("Andreas Jochens");
140 authors.push_back("Brendon Higgins");
141 authors.push_back("Carlos López González (genete)");
142 authors.push_back("Carlos A. Sosa Navarro");
143 authors.push_back("Chris Moore (dooglus)");
144 authors.push_back("Chris Norman (pixelgeek)");
145 authors.push_back("Cyril Brulebois (KiBi)");
146 authors.push_back("Daniel Fort");
147 authors.push_back("Daniel Hornung (rubikcube)");
148 authors.push_back("David Roden (Bombe)");
149 authors.push_back("Dmitriy Pomerantsev (Atrus)");
150 authors.push_back("Douglas Lau");
151 authors.push_back("Gerald Young (Yoyobuae)");
152 authors.push_back("Gerco Ballintijn");
153 authors.push_back("IL'dar AKHmetgaleev (AkhIL)");
154 authors.push_back("Konstantin Dmitriev (zelgadis)");
155 authors.push_back("Luka Pravica");
156 authors.push_back("Nikita Kitaev (nikitakit)");
157 authors.push_back("Martin Michlmayr (tbm)");
158 authors.push_back("Miguel Gea Milvaques (xerakko)");
159 authors.push_back("Paul Wise (pabs)");
160 authors.push_back("Ralf Corsepius");
161 authors.push_back("Ray Frederikson");
162 authors.push_back("Timo Paulssen (timonator)");
163 authors.push_back("Yue Shi Lai");
164 set_authors(authors);
166 std::vector<Glib::ustring> artists;
167 artists.push_back("Aurore D (rore)");
168 artists.push_back("Bertrand Grégoire (berteh)");
169 artists.push_back("Carlos López González (genete)");
170 artists.push_back("Chris Norman (pixelgeek)");
171 artists.push_back("Daniel Hornung (rubikcube)");
172 artists.push_back("David Rylander (rylleman)");
173 artists.push_back("Franco Iacomella (Yaco)");
174 artists.push_back("Gerald Young (Yoyobuae)");
175 artists.push_back("Henrique Lopes Barone");
176 artists.push_back("Konstantin Dmitriev (zelgadis)");
177 artists.push_back("Madeleine Crubellier (mad0)");
178 artists.push_back("Robert B. Quattlebaum Jr. (darco)");
179 artists.push_back("Thimotee Guiet (satrip)");
180 artists.push_back("Yu Chen (jcome)");
181 set_artists(artists);
183 // TRANSLATORS: change this to your name, separate multiple names with \n
184 set_translator_credits(_("translator-credits"));
186 std::string imagepath;
188 imagepath=App::get_base_path()+ETL_DIRECTORY_SEPARATOR+IMAGE_DIR;
192 char* synfig_root=getenv("SYNFIG_ROOT");
194 imagepath=synfig_root;
195 imagepath+=ETL_DIRECTORY_SEPARATOR;
197 imagepath+=ETL_DIRECTORY_SEPARATOR;
198 imagepath+="pixmaps";
200 imagepath+=ETL_DIRECTORY_SEPARATOR;
202 Gtk::Image *Logo = manage(new class Gtk::Image());
203 Logo->set(imagepath+"synfig_icon."IMAGE_EXT);
204 set_logo(Logo->get_pixbuf());
206 #ifdef SHOW_EXTRA_INFO
208 string extra_info = get_comments() + "\n";
211 extra_info += strprintf(_("\nDevelopment version:\n%s\n"),DEVEL_VERSION);
216 extra_info += strprintf(_("Built on %s" /* at %s */ "\n"), __DATE__ /* , __TIME__ */ );
220 extra_info += strprintf(_("Built with:\n"), ETL_VERSION);
221 extra_info += strprintf(_("ETL %s\n"), ETL_VERSION);
222 extra_info += strprintf(_("Synfig API %s\n"), stringify(SYNFIG_VERSION));
223 extra_info += strprintf(_("Synfig library %d\n"), SYNFIG_LIBRARY_VERSION);
224 extra_info += strprintf(_("GTK+ %d.%d.%d\n"), GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
226 extra_info += strprintf(_("GNU G++ %d.%d.%d\n"),__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__);
231 extra_info += strprintf(_("Using:\n"), synfig::get_version());
232 extra_info += strprintf(_("Synfig %s\n"), synfig::get_version());
233 extra_info += strprintf(_("GTK+ %d.%d.%d"),gtk_major_version,gtk_minor_version,gtk_micro_version);
236 extra_info += "\n\nDEBUG BUILD";
239 set_comments(extra_info);
243 // Hide the dialog when you click close
244 signal_response().connect(sigc::mem_fun(*this, &About::close));
247 void About::close(int){
251 void About::on_link_clicked(Gtk::AboutDialog&, const Glib::ustring &url)