From 528053937deeba8d8ae63078306f1bc951229781 Mon Sep 17 00:00:00 2001 From: pabs Date: Fri, 1 Feb 2008 13:22:28 +0000 Subject: [PATCH] Fix 1678554 and implement 1741220: change the about dialog to a splash screen and implement a new about dialog based on Gtk::AboutDialog. Still need to connect it up to configure.ac though. git-svn-id: http://svn.voria.com/code@1545 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/README | 2 +- synfig-studio/trunk/images/Makefile.am | 8 +- synfig-studio/trunk/images/Makefile.inc | 2 +- synfig-studio/trunk/images/splash_screen.sif | 4 +- synfig-studio/trunk/po/POTFILES.in | 2 + synfig-studio/trunk/po/es.po | 8 +- synfig-studio/trunk/po/fr.po | 8 +- synfig-studio/trunk/src/gtkmm/Makefile.am | 4 +- synfig-studio/trunk/src/gtkmm/about.cpp | 220 ++++++++++++++++++++++ synfig-studio/trunk/src/gtkmm/about.h | 54 ++++++ synfig-studio/trunk/src/gtkmm/app.cpp | 29 ++- synfig-studio/trunk/src/gtkmm/app.h | 2 + synfig-studio/trunk/src/gtkmm/splash.cpp | 52 ++--- synfig-studio/trunk/src/gtkmm/splash.h | 18 +- synfig-studio/trunk/studio.kdevprj | 18 +- synfig-studio/trunk/studio.pbproj/project.pbxproj | 18 +- synfig-studio/trunk/studio.prj | 4 +- 17 files changed, 384 insertions(+), 69 deletions(-) create mode 100644 synfig-studio/trunk/src/gtkmm/about.cpp create mode 100644 synfig-studio/trunk/src/gtkmm/about.h diff --git a/synfig-studio/trunk/README b/synfig-studio/trunk/README index 3984c01..27d492e 100644 --- a/synfig-studio/trunk/README +++ b/synfig-studio/trunk/README @@ -27,7 +27,7 @@ Copyright 2002 Robert B. Quattlebaum Jr. Copyright 2002 Adrian Bentley Copyright 2006 Yue Shi Lai Copyright 2007 Chris Moore -Copyright 2007 Paul Wise +Copyright 2007-2008 Paul Wise Some of the icons are placed in the Public Domain by Chris Norman Some of the icons are placed in the Public Domain by Carlos López González diff --git a/synfig-studio/trunk/images/Makefile.am b/synfig-studio/trunk/images/Makefile.am index fc336cd..671cffe 100644 --- a/synfig-studio/trunk/images/Makefile.am +++ b/synfig-studio/trunk/images/Makefile.am @@ -2,8 +2,8 @@ SYNFIG=synfig EXT=@imageext@ -EXTRA_DIST=installer_logo.sif installer_logo_osx.sif about_dialog.sif about_icon.sif angle_icon.sif bline_icon.sif blinepoint_icon.sif bool_icon.sif canvas_icon.sif canvas_pointer_icon.sif children_icon.sif circle_icon.sif clear_redo_icon.sif clear_undo_icon.sif color_icon.sif curves_icon.sif draw_icon.sif duplicate_icon.sif eyedrop_icon.sif fill_icon.sif gradient_icon.sif group_icon.sif info_icon.sif integer_icon.sif keyframe_icon.sif keyframe_lock_icon.sif layer_icon.sif list_icon.sif logo.sif meta_data_icon.sif mirror_icon.sif navigator_icon.sif normal_icon.sif pastecanvas_icon.sif polygon_icon.sif real_icon.sif rectangle_icon.sif rotate_icon.sif saveall_icon.sif scale_icon.sif segment_icon.sif sif_icon.sif sketch_icon.sif smooth_move_icon.sif string_icon.sif swap_colors_icon.sif synfig_icon.sif time_icon.sif time_track_icon.sif valuenode_icon.sif vector_icon.sif wallpaper.sif width_icon.sif zoom_icon.sif rename_icon.sif -IMAGES=installer_logo.$(EXT) installer_logo_osx.$(EXT) mirror_icon.$(EXT) time_icon.$(EXT) time_track_icon.$(EXT) curves_icon.$(EXT) pastecanvas_icon.$(EXT) group_icon.$(EXT) clear_redo_icon.$(EXT) clear_undo_icon.$(EXT) navigator_icon.$(EXT) info_icon.$(EXT) zoom_icon.$(EXT) meta_data_icon.$(EXT) children_icon.$(EXT) keyframe_icon.$(EXT) swap_colors_icon.$(EXT) rotate_icon.$(EXT) scale_icon.$(EXT) smooth_move_icon.$(EXT) width_icon.$(EXT) rectangle_icon.$(EXT) circle_icon.$(EXT) draw_icon.$(EXT) sketch_icon.$(EXT) fill_icon.$(EXT) normal_icon.$(EXT) sif_icon.$(EXT) synfig_icon.$(EXT) saveall_icon.$(EXT) bool_icon.$(EXT) integer_icon.$(EXT) angle_icon.$(EXT) segment_icon.$(EXT) blinepoint_icon.$(EXT) list_icon.$(EXT) canvas_pointer_icon.$(EXT) string_icon.$(EXT) eyedrop_icon.$(EXT) about_icon.$(EXT) about_dialog.$(EXT) canvas_icon.$(EXT) vector_icon.$(EXT) real_icon.$(EXT) color_icon.$(EXT) valuenode_icon.$(EXT) polygon_icon.$(EXT) bline_icon.$(EXT) layer_icon.$(EXT) duplicate_icon.$(EXT) gradient_icon.$(EXT) keyframe_lock_all.$(EXT) keyframe_lock_past.$(EXT) keyframe_lock_future.$(EXT) keyframe_lock_none.$(EXT) rename_icon.$(EXT) +EXTRA_DIST=installer_logo.sif installer_logo_osx.sif splash_screen.sif about_icon.sif angle_icon.sif bline_icon.sif blinepoint_icon.sif bool_icon.sif canvas_icon.sif canvas_pointer_icon.sif children_icon.sif circle_icon.sif clear_redo_icon.sif clear_undo_icon.sif color_icon.sif curves_icon.sif draw_icon.sif duplicate_icon.sif eyedrop_icon.sif fill_icon.sif gradient_icon.sif group_icon.sif info_icon.sif integer_icon.sif keyframe_icon.sif keyframe_lock_icon.sif layer_icon.sif list_icon.sif logo.sif meta_data_icon.sif mirror_icon.sif navigator_icon.sif normal_icon.sif pastecanvas_icon.sif polygon_icon.sif real_icon.sif rectangle_icon.sif rotate_icon.sif saveall_icon.sif scale_icon.sif segment_icon.sif sif_icon.sif sketch_icon.sif smooth_move_icon.sif string_icon.sif swap_colors_icon.sif synfig_icon.sif time_icon.sif time_track_icon.sif valuenode_icon.sif vector_icon.sif wallpaper.sif width_icon.sif zoom_icon.sif rename_icon.sif +IMAGES=installer_logo.$(EXT) installer_logo_osx.$(EXT) mirror_icon.$(EXT) time_icon.$(EXT) time_track_icon.$(EXT) curves_icon.$(EXT) pastecanvas_icon.$(EXT) group_icon.$(EXT) clear_redo_icon.$(EXT) clear_undo_icon.$(EXT) navigator_icon.$(EXT) info_icon.$(EXT) zoom_icon.$(EXT) meta_data_icon.$(EXT) children_icon.$(EXT) keyframe_icon.$(EXT) swap_colors_icon.$(EXT) rotate_icon.$(EXT) scale_icon.$(EXT) smooth_move_icon.$(EXT) width_icon.$(EXT) rectangle_icon.$(EXT) circle_icon.$(EXT) draw_icon.$(EXT) sketch_icon.$(EXT) fill_icon.$(EXT) normal_icon.$(EXT) sif_icon.$(EXT) synfig_icon.$(EXT) saveall_icon.$(EXT) bool_icon.$(EXT) integer_icon.$(EXT) angle_icon.$(EXT) segment_icon.$(EXT) blinepoint_icon.$(EXT) list_icon.$(EXT) canvas_pointer_icon.$(EXT) string_icon.$(EXT) eyedrop_icon.$(EXT) about_icon.$(EXT) splash_screen.$(EXT) canvas_icon.$(EXT) vector_icon.$(EXT) real_icon.$(EXT) color_icon.$(EXT) valuenode_icon.$(EXT) polygon_icon.$(EXT) bline_icon.$(EXT) layer_icon.$(EXT) duplicate_icon.$(EXT) gradient_icon.$(EXT) keyframe_lock_all.$(EXT) keyframe_lock_past.$(EXT) keyframe_lock_future.$(EXT) keyframe_lock_none.$(EXT) rename_icon.$(EXT) MAINTAINERCLEANFILES=Makefile.in CLEANFILES=$(IMAGES) images.nsh unimages.nsh installer_logo.bmp sif_icon.ico synfig_icon.ico icons.nsh unicons.nsh @@ -73,8 +73,8 @@ keyframe_lock_none.$(EXT): $(srcdir)/keyframe_lock_icon.sif #vector_icon.$(EXT): vector_icon.sif # $(SYNFIG) -q vector_icon.sif -o vector_icon.$(EXT) -w 128 -h 128 --time 0 -#about_dialog.$(EXT): about_dialog.sif -# $(SYNFIG) -q about_dialog.sif -o about_dialog.$(EXT) --time 0 +#splash_screen.$(EXT): splash_screen.sif +# $(SYNFIG) -q splash_screen.sif -o splash_screen.$(EXT) --time 0 #about_icon.$(EXT): about_icon.sif # $(SYNFIG) -q about_icon.sif -o about_icon.$(EXT) -w 128 -h 128 --time 0 diff --git a/synfig-studio/trunk/images/Makefile.inc b/synfig-studio/trunk/images/Makefile.inc index 184b2a1..9736508 100644 --- a/synfig-studio/trunk/images/Makefile.inc +++ b/synfig-studio/trunk/images/Makefile.inc @@ -3,7 +3,7 @@ EXT=png SYNFIG=synfig EXTRA_DIST=studio_about.sif -IMAGES=fill_icon.$(EXT) normal_icon.$(EXT) sif_icon.$(EXT) synfig_icon.$(EXT) saveall_icon.$(EXT) bool_icon.$(EXT) integer_icon.$(EXT) angle_icon.$(EXT) segment_icon.$(EXT) blinepoint_icon.$(EXT) list_icon.$(EXT) canvas_pointer_icon.$(EXT) string_icon.$(EXT) eyedrop_icon.$(EXT) about_icon.$(EXT) about_dialog.$(EXT) canvas_icon.$(EXT) vector_icon.$(EXT) real_icon.$(EXT) color_icon.$(EXT) valuenode_icon.$(EXT) polygon_icon.$(EXT) bline_icon.$(EXT) layer_icon.$(EXT) duplicate_icon.$(EXT) gradient_icon.$(EXT) keyframe_lock_all.$(EXT) keyframe_lock_past.$(EXT) keyframe_lock_future.$(EXT) keyframe_lock_none.$(EXT) +IMAGES=fill_icon.$(EXT) normal_icon.$(EXT) sif_icon.$(EXT) synfig_icon.$(EXT) saveall_icon.$(EXT) bool_icon.$(EXT) integer_icon.$(EXT) angle_icon.$(EXT) segment_icon.$(EXT) blinepoint_icon.$(EXT) list_icon.$(EXT) canvas_pointer_icon.$(EXT) string_icon.$(EXT) eyedrop_icon.$(EXT) about_icon.$(EXT) splash_screen.$(EXT) canvas_icon.$(EXT) vector_icon.$(EXT) real_icon.$(EXT) color_icon.$(EXT) valuenode_icon.$(EXT) polygon_icon.$(EXT) bline_icon.$(EXT) layer_icon.$(EXT) duplicate_icon.$(EXT) gradient_icon.$(EXT) keyframe_lock_all.$(EXT) keyframe_lock_past.$(EXT) keyframe_lock_future.$(EXT) keyframe_lock_none.$(EXT) CLEANFILES=$(IMAGES) diff --git a/synfig-studio/trunk/images/splash_screen.sif b/synfig-studio/trunk/images/splash_screen.sif index b79af7c..4844e6c 100644 --- a/synfig-studio/trunk/images/splash_screen.sif +++ b/synfig-studio/trunk/images/splash_screen.sif @@ -1,7 +1,7 @@ - About Dialog Graphic - This is the about dialog graphic which is displayed when Synfig Studio starts, and when the about dialog is requested. + Splash Screen Graphic + This is the splash screen graphic which is displayed when Synfig Studio starts. diff --git a/synfig-studio/trunk/po/POTFILES.in b/synfig-studio/trunk/po/POTFILES.in index f44d82d..47870e4 100644 --- a/synfig-studio/trunk/po/POTFILES.in +++ b/synfig-studio/trunk/po/POTFILES.in @@ -164,6 +164,8 @@ src/gtkmm/renderer_timecode.cpp src/gtkmm/renderer_timecode.h src/gtkmm/render.h src/gtkmm/smach.h +src/gtkmm/splash.cpp +src/gtkmm/splash.h src/gtkmm/state_bline.cpp src/gtkmm/state_bline.h src/gtkmm/state_circle.cpp diff --git a/synfig-studio/trunk/po/es.po b/synfig-studio/trunk/po/es.po index 5aae9ad..328e23c 100644 --- a/synfig-studio/trunk/po/es.po +++ b/synfig-studio/trunk/po/es.po @@ -16,19 +16,19 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" -#: src/gtkmm/about.cpp:118 +#: src/gtkmm/splash.cpp:118 msgid "ERROR:" msgstr "ERROR:" -#: src/gtkmm/about.cpp:134 +#: src/gtkmm/splash.cpp:134 msgid "WARNING:" msgstr "AVISO:" -#: src/gtkmm/about.cpp:221 +#: src/gtkmm/splash.cpp:221 msgid "Version" msgstr "Versión" -#: src/gtkmm/about.cpp:274 +#: src/gtkmm/splash.cpp:274 msgid "Close" msgstr "Cerrar" diff --git a/synfig-studio/trunk/po/fr.po b/synfig-studio/trunk/po/fr.po index fb3714f..4f0b42a 100644 --- a/synfig-studio/trunk/po/fr.po +++ b/synfig-studio/trunk/po/fr.po @@ -17,19 +17,19 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: KBabel 1.11.4\n" -#: src/gtkmm/about.cpp:118 +#: src/gtkmm/splash.cpp:118 msgid "ERROR:" msgstr "ERREUR :" -#: src/gtkmm/about.cpp:134 +#: src/gtkmm/splash.cpp:134 msgid "WARNING:" msgstr "AVERTISSEMENT :" -#: src/gtkmm/about.cpp:221 +#: src/gtkmm/splash.cpp:221 msgid "Version" msgstr "Version" -#: src/gtkmm/about.cpp:274 +#: src/gtkmm/splash.cpp:274 msgid "Close" msgstr "Fermer" diff --git a/synfig-studio/trunk/src/gtkmm/Makefile.am b/synfig-studio/trunk/src/gtkmm/Makefile.am index 55bf61c..9fe8862 100644 --- a/synfig-studio/trunk/src/gtkmm/Makefile.am +++ b/synfig-studio/trunk/src/gtkmm/Makefile.am @@ -89,12 +89,12 @@ OTHER_HH = compview.h eventkey.h smach.h \ about.h adjust_window.h app.h asyncrenderer.h audiocontainer.h autorecover.h canvasoptions.h \ canvasproperties.h canvasview.h devicetracker.h dialogsettings.h duckmatic.h iconcontroller.h \ instance.h ipc.h keymapsettings.h module.h onemoment.h preview.h renddesc.h render.h \ - statemanager.h toolbox.h valuelink.h workarea.h zoomdial.h \ + splash.h statemanager.h toolbox.h valuelink.h workarea.h zoomdial.h \ OTHER_CC = main.cpp \ about.cpp adjust_window.cpp app.cpp asyncrenderer.cpp audiocontainer.cpp autorecover.cpp canvasoptions.cpp \ canvasproperties.cpp canvasview.cpp devicetracker.cpp dialogsettings.cpp duckmatic.cpp iconcontroller.cpp \ instance.cpp ipc.cpp keymapsettings.cpp module.cpp onemoment.cpp preview.cpp renddesc.cpp render.cpp \ - statemanager.cpp toolbox.cpp valuelink.cpp workarea.cpp zoomdial.cpp + splash.cpp statemanager.cpp toolbox.cpp valuelink.cpp workarea.cpp zoomdial.cpp INCLUDES = -I$(top_srcdir)/src diff --git a/synfig-studio/trunk/src/gtkmm/about.cpp b/synfig-studio/trunk/src/gtkmm/about.cpp new file mode 100644 index 0000000..3d255ad --- /dev/null +++ b/synfig-studio/trunk/src/gtkmm/about.cpp @@ -0,0 +1,220 @@ +/* === S Y N F I G ========================================================= */ +/*! \file about.cpp +** \brief About dialog implementation +** +** $Id$ +** +** \legal +** Copyright 2008 Paul Wise +** +** This package 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. +** +** This package 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. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include + +#include + +#include + +#include + +#include "about.h" +#include "app.h" + +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace studio; + +/* === M A C R O S ========================================================= */ + +#ifndef VERSION +#define VERSION "unknown" +#define PACKAGE "synfigstudio" +#endif + +#ifdef WIN32 +# ifdef IMAGE_DIR +# undef IMAGE_DIR +# define IMAGE_DIR "share\\pixmaps" +# endif +#endif + +#ifndef IMAGE_DIR +# define IMAGE_DIR "/usr/local/share/pixmaps" +#endif + +#ifndef IMAGE_EXT +# define IMAGE_EXT "png" +#endif + +#define stringify_(x) #x +#define stringify(x) stringify_(x) + +/* === G L O B A L S ======================================================= */ + +extern const guint gtk_major_version; +extern const guint gtk_minor_version; +extern const guint gtk_micro_version; +extern const guint gtk_binary_age; +extern const guint gtk_interface_age; + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +About::About() +{ + +#if GTK_CHECK_VERSION (2, 12, 0) + set_program_name(PACKAGE_NAME); +#else + set_name(PACKAGE_NAME); +#endif + set_version(VERSION); + set_comments(_("2D vector animation studio")); + set_website("http://www.synfig.org/"); + set_website_label(_("Visit the Synfig website")); + + set_copyright(_("Copyright 2001-2008\nRobert B. Quattlebaum Jr.,\nAdrian Bentley and Synfig contributors")); + Glib::ustring 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 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\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 or visit: http://www.gnu.org/"; + set_license(license); + set_wrap_license(true); + + std::vector authors; + authors.push_back("Original developers:"); + authors.push_back(""); + authors.push_back("Robert B. Quattlebaum Jr (darco)"); + authors.push_back("Adrian Bentley"); + authors.push_back(""); + authors.push_back("Contributors:"); + authors.push_back(""); + authors.push_back("Adrian Winchell (SnapSilverlight)"); + authors.push_back("Andreas Jochens"); + authors.push_back("Carlos López González (genete)"); + authors.push_back("Chris Moore (dooglus)"); + authors.push_back("Chris Norman (PXEGeek)"); + authors.push_back("Daniel Fort"); + authors.push_back("David Roden (Bombe)"); + authors.push_back("Dmitriy Pomerantsev (Atrus)"); + authors.push_back("Douglas Lau"); + authors.push_back("IL'dar AKHmetgaleev (AkhIL)"); + authors.push_back("Luka Pravica"); + authors.push_back("Martin Michlmayr (tbm)"); + authors.push_back("Miguel Gea Milvaques (xerakko)"); + authors.push_back("Paul Wise (pabs)"); + authors.push_back("Ralf Corsepius"); + authors.push_back("Yue Shi Lai"); + set_authors(authors); + + std::vector artists; + artists.push_back("Robert B. Quattlebaum Jr. (darco)"); + artists.push_back("Carlos López González (genete)"); + artists.push_back("Chris Norman (PXEGeek)"); + set_artists(artists); + + // TRANSLATORS: change this to your name, separate multiple names with \n + set_translator_credits(_("translator-credits")); + + std::string imagepath; +#ifdef WIN32 + imagepath=App::get_base_path()+ETL_DIRECTORY_SEPARATOR+IMAGE_DIR; +#else + imagepath=IMAGE_DIR; +#endif + char* synfig_root=getenv("SYNFIG_ROOT"); + if(synfig_root) { + imagepath=synfig_root; + imagepath+=ETL_DIRECTORY_SEPARATOR; + + imagepath+="share/pixmaps"; + } + imagepath+=ETL_DIRECTORY_SEPARATOR; + + Gtk::Image *Logo = manage(new class Gtk::Image()); + Logo->set(imagepath+"synfig_icon."IMAGE_EXT); + set_logo(Logo->get_pixbuf()); + +#ifdef SHOW_EXTRA_INFO + + string extra_info = get_comments() + "\n"; + + #ifdef DEVEL_VERSION + extra_info += strprintf(_("\nDevelopment version %s %s\n"),VERSION,DEVEL_VERSION); + #endif + + extra_info += "\n"; + + extra_info += strprintf(_("Built on %s at %s\n"), __DATE__, __TIME__); + + extra_info += "\n"; + + extra_info += strprintf(_("Built with:\n"), ETL_VERSION); + extra_info += strprintf(_("ETL %s\n"), ETL_VERSION); + extra_info += strprintf(_("Synfig API %s\n"), stringify(SYNFIG_VERSION)); + extra_info += strprintf(_("Synfig library %d\n"), SYNFIG_LIBRARY_VERSION); + extra_info += strprintf(_("GTK+ %d.%d.%d\n"), GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); + #ifdef __GNUC__ + extra_info += strprintf(_("GNU G++ %d.%d.%d\n"),__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__); + #endif + + extra_info += "\n"; + + extra_info += strprintf(_("Using:\n"), synfig::get_version()); + extra_info += strprintf(_("Synfig %s\n"), synfig::get_version()); + extra_info += strprintf(_("GTK+ %d.%d.%d"),gtk_major_version,gtk_minor_version,gtk_micro_version); + + #ifdef _DEBUG + extra_info += "\n\nDEBUG BUILD"; + #endif + + set_comments(extra_info); + +#endif + + // Hide the dialog when you click close + signal_response().connect(sigc::mem_fun(*this, &About::close)); +} + +void About::close(int){ + hide(); +} diff --git a/synfig-studio/trunk/src/gtkmm/about.h b/synfig-studio/trunk/src/gtkmm/about.h new file mode 100644 index 0000000..f6a47f2 --- /dev/null +++ b/synfig-studio/trunk/src/gtkmm/about.h @@ -0,0 +1,54 @@ +/* === S Y N F I G ========================================================= */ +/*! \file about.h +** \brief About dialog class +** +** $Id$ +** +** \legal +** Copyright 2008 Paul Wise +** +** This package 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. +** +** This package 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. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_GTKMM_ABOUT_H +#define __SYNFIG_GTKMM_ABOUT_H + +/* === H E A D E R S ======================================================= */ + +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +# + +namespace studio { + +class About : public Gtk::AboutDialog +{ +public: + + About(); + void close(int); +}; + +}; // END of namespace studio + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-studio/trunk/src/gtkmm/app.cpp b/synfig-studio/trunk/src/gtkmm/app.cpp index 5fabbbb..c01ee32 100644 --- a/synfig-studio/trunk/src/gtkmm/app.cpp +++ b/synfig-studio/trunk/src/gtkmm/app.cpp @@ -55,6 +55,7 @@ #include "app.h" #include "about.h" +#include "splash.h" #include "instance.h" #include "canvasview.h" #include "dialog_setup.h" @@ -222,6 +223,8 @@ const etl::handle& App::get_ui_interface() { return ui_i etl::handle App::selected_instance; etl::handle App::selected_canvas_view; +studio::About *studio::App::about=NULL; + studio::Toolbox *studio::App::toolbox=NULL; studio::AutoRecover *studio::App::auto_recover=NULL; @@ -1025,13 +1028,13 @@ App::App(int *argc, char ***argv): } Glib::set_application_name(_("Synfig Studio")); - About about_window; - about_window.set_can_self_destruct(false); - about_window.show(); + Splash splash_screen; + splash_screen.set_can_self_destruct(false); + splash_screen.show(); shutdown_in_progress=false; - SuperCallback synfig_init_cb(about_window.get_callback(),0,9000,10000); - SuperCallback studio_init_cb(about_window.get_callback(),9000,10000,10000); + SuperCallback synfig_init_cb(splash_screen.get_callback(),0,9000,10000); + SuperCallback studio_init_cb(splash_screen.get_callback(),9000,10000,10000); // Initialize the Synfig library try { synfigapp_main=etl::smart_ptr(new synfigapp::Main(etl::dirname((*argv)[0]),&synfig_init_cb)); } @@ -1059,6 +1062,9 @@ App::App(int *argc, char ***argv): studio_init_cb.task(_("Init Toolbox...")); toolbox=new studio::Toolbox(); + studio_init_cb.task(_("Init About Dialog...")); + about=new studio::About(); + studio_init_cb.task(_("Init Tool Options...")); dialog_tool_options=new studio::Dialog_ToolOptions(); dock_manager->register_dockable(*dialog_tool_options); @@ -1177,7 +1183,7 @@ App::App(int *argc, char ***argv): if(auto_recover->recovery_needed()) { - about_window.hide(); + splash_screen.hide(); if( get_ui_interface()->yes_no( _("Auto Recovery"), @@ -1200,7 +1206,7 @@ App::App(int *argc, char ***argv): "idea to review them and save them now.") ); } - about_window.show(); + splash_screen.show(); } // Look for any files given on the command line, @@ -1210,10 +1216,10 @@ App::App(int *argc, char ***argv): if((*argv)[*argc] && (*argv)[*argc][0]!='-') { studio_init_cb.task(_("Loading files...")); - about_window.hide(); + splash_screen.hide(); open((*argv)[*argc]); opened_any = true; - about_window.show(); + splash_screen.show(); } // if no file was specified to be opened, create a new document to help new users get started more easily @@ -1257,6 +1263,8 @@ App::~App() delete auto_recover; + delete about; + toolbox->hide(); // studio::App::iteration(false); @@ -2049,7 +2057,8 @@ App::get_instance(etl::handle canvas) void App::dialog_about() { - (new class About())->show(); + if(about) + about->show(); } void diff --git a/synfig-studio/trunk/src/gtkmm/app.h b/synfig-studio/trunk/src/gtkmm/app.h index bd916aa..48dd091 100644 --- a/synfig-studio/trunk/src/gtkmm/app.h +++ b/synfig-studio/trunk/src/gtkmm/app.h @@ -76,6 +76,7 @@ namespace studio { typedef Gtk::UIManager UIManager; +class About; class Toolbox; class Instance; class CanvasView; @@ -181,6 +182,7 @@ public: static synfig::Gamma gamma; + static About *about; static Toolbox *toolbox; static std::list > instance_list; diff --git a/synfig-studio/trunk/src/gtkmm/splash.cpp b/synfig-studio/trunk/src/gtkmm/splash.cpp index e978dc1..3f62635 100644 --- a/synfig-studio/trunk/src/gtkmm/splash.cpp +++ b/synfig-studio/trunk/src/gtkmm/splash.cpp @@ -1,5 +1,5 @@ /* === S Y N F I G ========================================================= */ -/*! \file about.cpp +/*! \file splash.cpp ** \brief writeme ** ** $Id$ @@ -45,7 +45,7 @@ #include -#include "about.h" +#include "splash.h" #include "app.h" #include "general.h" @@ -87,20 +87,20 @@ extern const guint gtk_interface_age; /* === P R O C E D U R E S ================================================= */ -class studio::AboutProgress : public synfig::ProgressCallback +class studio::SplashProgress : public synfig::ProgressCallback { - About &about; + Splash &splash; public: - AboutProgress(About &about):about(about) { } + SplashProgress(Splash &splash):splash(splash) { } virtual bool task(const std::string &task) { - if(about.tasklabel) + if(splash.tasklabel) { - about.tasklabel->set_label(task); - about.tasklabel->show(); + splash.tasklabel->set_label(task); + splash.tasklabel->show(); } else { @@ -113,10 +113,10 @@ public: virtual bool error(const std::string &task) { - if(about.tasklabel) + if(splash.tasklabel) { - about.tasklabel->set_label(_("ERROR:")+task); - about.tasklabel->show(); + splash.tasklabel->set_label(_("ERROR:")+task); + splash.tasklabel->show(); } else { @@ -129,10 +129,10 @@ public: virtual bool warning(const std::string &task) { - if(about.tasklabel) + if(splash.tasklabel) { - about.tasklabel->set_label(_("WARNING:")+task); - about.tasklabel->show(); + splash.tasklabel->set_label(_("WARNING:")+task); + splash.tasklabel->show(); } else { @@ -145,10 +145,10 @@ public: virtual bool amount_complete(int current, int total) { - if(about.progressbar) + if(splash.progressbar) { - about.progressbar->set_fraction((float)current/(float)total); - about.progressbar->show(); + splash.progressbar->set_fraction((float)current/(float)total); + splash.progressbar->show(); } else cerr<set(imagepath+"about_dialog."IMAGE_EXT); + Logo->set(imagepath+"splash_screen."IMAGE_EXT); Logo->set_size_request(image_w,image_h); Logo->set_alignment(0.5,0.5); Logo->set_padding(0,0); @@ -309,17 +309,17 @@ About::About(): fixed1->show(); // Connect relevant signals - CloseButton->signal_clicked().connect(sigc::mem_fun(*this, &About::close)); + CloseButton->signal_clicked().connect(sigc::mem_fun(*this, &Splash::close)); - cb=new AboutProgress(*this); + cb=new SplashProgress(*this); } -About::~About() +Splash::~Splash() { delete cb; } -void About::close() +void Splash::close() { hide(); if(can_self_destruct) @@ -327,7 +327,7 @@ void About::close() } void -About::set_can_self_destruct(bool x) +Splash::set_can_self_destruct(bool x) { can_self_destruct=x; if(x==true) @@ -337,7 +337,7 @@ About::set_can_self_destruct(bool x) } synfig::ProgressCallback * -About::get_callback() +Splash::get_callback() { return cb; } diff --git a/synfig-studio/trunk/src/gtkmm/splash.h b/synfig-studio/trunk/src/gtkmm/splash.h index 2af5ceb..5a20e26 100644 --- a/synfig-studio/trunk/src/gtkmm/splash.h +++ b/synfig-studio/trunk/src/gtkmm/splash.h @@ -1,5 +1,5 @@ /* === S Y N F I G ========================================================= */ -/*! \file about.h +/*! \file splash.h ** \brief Header File ** ** $Id$ @@ -24,8 +24,8 @@ /* === S T A R T =========================================================== */ -#ifndef __SYNFIG_GTKMM_ABOUT_H -#define __SYNFIG_GTKMM_ABOUT_H +#ifndef __SYNFIG_GTKMM_SPLASH_H +#define __SYNFIG_GTKMM_SPLASH_H /* === H E A D E R S ======================================================= */ @@ -46,13 +46,13 @@ namespace synfig { class ProgressCallback; }; namespace studio { -class AboutProgress; +class SplashProgress; -class About : public Gtk::Window +class Splash : public Gtk::Window { - friend class AboutProgress; + friend class SplashProgress; - AboutProgress *cb; + SplashProgress *cb; Gtk::Tooltips _tooltips; @@ -70,8 +70,8 @@ public: void set_can_self_destruct(bool x); - About(); - ~About(); + Splash(); + ~Splash(); }; } diff --git a/synfig-studio/trunk/studio.kdevprj b/synfig-studio/trunk/studio.kdevprj index 5c20f2c..4874f09 100644 --- a/synfig-studio/trunk/studio.kdevprj +++ b/synfig-studio/trunk/studio.kdevprj @@ -160,13 +160,13 @@ type=DATA [images/Makefile.am] dist=true -files=images/studio_about.sif,images/Makefile.am,images/about_dialog.sif,images/about_icon.sif,images/canvas_icon.sif +files=images/studio_about.sif,images/Makefile.am,images/splash_screen.sif,images/about_icon.sif,images/canvas_icon.sif install=false install_location= sub_dirs= type=DATA -[images/about_dialog.sif] +[images/splash_screen.sif] dist=true install=false install_location= @@ -248,7 +248,7 @@ type=HEADER [src/gtkmm/Makefile.am] dist=true -files=src/gtkmm/app.cpp,src/gtkmm/app.h,src/gtkmm/Makefile.am,src/gtkmm/instance.h,src/gtkmm/instance.cpp,src/gtkmm/toolbox.h,src/gtkmm/toolbox.cpp,src/gtkmm/compview.cpp,src/gtkmm/compview.h,src/gtkmm/canvasview.cpp,src/gtkmm/canvasview.h,src/gtkmm/workarea.cpp,src/gtkmm/workarea.h,src/gtkmm/about.h,src/gtkmm/about.cpp +files=src/gtkmm/app.cpp,src/gtkmm/app.h,src/gtkmm/Makefile.am,src/gtkmm/instance.h,src/gtkmm/instance.cpp,src/gtkmm/toolbox.h,src/gtkmm/toolbox.cpp,src/gtkmm/compview.cpp,src/gtkmm/compview.h,src/gtkmm/canvasview.cpp,src/gtkmm/canvasview.h,src/gtkmm/workarea.cpp,src/gtkmm/workarea.h,src/gtkmm/about.h,src/gtkmm/about.cpp,src/gtkmm/splash.h,src/gtkmm/splash.cpp install=false install_location= sharedlib_LDFLAGS=-version-info 0:0:0 @@ -268,6 +268,18 @@ install=false install_location= type=HEADER +[src/gtkmm/splash.cpp] +dist=true +install=false +install_location= +type=SOURCE + +[src/gtkmm/splash.h] +dist=true +install=false +install_location= +type=HEADER + [src/gtkmm/app.cpp] dist=true install=false diff --git a/synfig-studio/trunk/studio.pbproj/project.pbxproj b/synfig-studio/trunk/studio.pbproj/project.pbxproj index b20dc11..73f2b89 100755 --- a/synfig-studio/trunk/studio.pbproj/project.pbxproj +++ b/synfig-studio/trunk/studio.pbproj/project.pbxproj @@ -3827,6 +3827,20 @@ path = src/gtkmm/about.h; refType = 4; }; + F5429FA203A911B301A80006 = { + fileEncoding = 30; + isa = PBXFileReference; + name = splash.cpp; + path = src/gtkmm/splash.cpp; + refType = 4; + }; + F5429FA303A911B301A80006 = { + fileEncoding = 30; + isa = PBXFileReference; + name = about.h; + path = src/gtkmm/splash.h; + refType = 4; + }; F5429FA403A911B301A80006 = { fileEncoding = 30; isa = PBXFileReference; @@ -3930,8 +3944,8 @@ F56E5E4503BCF10B01A80006 = { fileEncoding = 30; isa = PBXFileReference; - name = about_dialog.sif; - path = images/about_dialog.sif; + name = splash_screen.sif; + path = images/splash_screen.sif; refType = 4; }; F56E5E4603BCF10B01A80006 = { diff --git a/synfig-studio/trunk/studio.prj b/synfig-studio/trunk/studio.prj index be68d5a..7270c1c 100644 --- a/synfig-studio/trunk/studio.prj +++ b/synfig-studio/trunk/studio.prj @@ -75,6 +75,7 @@ module.include.files=\ src/gtkmm/trackview.h\ src/gtkmm/workarea.h\ src/gtkmm/about.h\ + src/gtkmm/splash.h\ src/gtkmm/datanode.h\ src/gtkmm/datatype.h\ src/gtkmm/canvasview.h\ @@ -107,6 +108,7 @@ module.source.files=\ src/gtkmm/compview.cpp\ src/gtkmm/instance.cpp\ src/gtkmm/about.cpp\ + src/gtkmm/splash.cpp\ src/actions.cpp\ src/app.cpp\ src/main.cpp\ @@ -126,7 +128,7 @@ module.pixmap.files=\ images/synfig_icon.png\ images/about_icon.png\ images/canvas_icon.png\ - images/about_dialog.png + images/splash_screen.png module.data.name=. module.data.type= -- 2.7.4