Commit 534ccafa authored by Kees Cook's avatar Kees Cook Committed by keescook

Implemented AboutDialog following the Gnome style.

(bzr r7746)
parent 2e1c2701
2005-09-04 Kees Cook <kees@outflux.net>
* TRANSLATORS, Makefile.am, src/verbs.cpp, src/help.cpp,
src/ui/dialog/aboutbox.h, src/ui/dialog/aboutbox.cpp,
src/menus-skeleton.h, src/ui/dialog/Makefile_insert:
Implemented AboutDialog following the Gnome style.
* packaging/win32/inkscape.nsi: added quotes around execution name.
2005-09-04 Michael Wybrow <mjwybrow@users.sourceforge.net>
* src/sp-conn-end-pair.cpp: Fix a crash bug when undoing connectors
......
......@@ -43,6 +43,7 @@ EXTRA_DIST = \
Makefile.mingw.common \
README.txt README.ca.txt README.de.txt README.fr.txt README.it.txt \
HACKING.txt HACKING.de.txt HACKING.fr.txt HACKING.it.txt \
TRANSLATORS \
inkscape.png \
inkscape.ico inkscape16.ico inkscape32.ico inkscape64.ico \
cxxtest/cxxtestgen.pl \
......
Adib Taraben <theadib@yahoo.com>, 2004.
Agradecimientos: zert, softcatala, 2002-2003
Alastair McKinstry <mckinstry@computer.org>, 2000.
Aleksandar Urošević <urke@users.sourceforge.net>
Alessio Frusciante <algol@firenze.linux.it>, 2002, 2003.
Alexandre Prokoudine <alexandre.prokoudine@gmail.com>, 2005.
Alexey Remizov <alexey@remizov.pp.ru>, 2004.
Álvaro Lopes <alvieboy@alvie.com>, 2001, 2002
Andreas Hyden <a.hyden@cyberpoint.se>, 2000.
Arman Aksoy <armish@linux-sevenler.de>, 2003.
Arpad Biro <biro_arpad@yahoo.com>, 2004, 2005.
Benedikt Roth <Benedikt.Roth@gmx.net>, 2000
Boštjan Špetič <igzebedze@cyberpipe.org>, 2004, 2005.
Brisa Francesco <fbrisa@yahoo.it>, 2000.
bulia byak <buliabyak@users.sf.net>, 2004.
Christian Meyer <chrisime@gnome.org>, 2000-2002.
Christian Neumair <chris@gnome-de.org>, 2002, 2003.
Christian Rose <menthos@menthos.com>, 2000, 2001, 2002, 2003.
Christophe Merlet (RedFox) <redfox@redfoxcenter.org>, 2000-2002.
Colin Marquardt <colin@marquardt-home.de>, 2004, 2005.
Daniel Díaz <yosoy@danieldiaz.org>, 2004
Александар Урошевић <urke@users.sourceforge.net>
Didier Conchaudron <conchaudron@free.fr>, 2003.
Duarte Loreto <happyguy_pt@hotmail.com> 2002,2003 (Maintainer)
Fatih Demir <kabalak@gtranslator.org>, 2000.
Francesc Dorca <f.dorca@filnet.es>, 2003. Traducció sodipodi.
Francisco Javier F. Serrador <serrador@arrakis.es>, 2003
Francisco Javier F. Serrador <serrador@arrakis.es>, 2003.
Francisco Xosé Vázquez Grandal <fxvazquez@arrakis.es>, 2001.
Frederic Rodrigo <f.rodrigo free.fr>, 2004-2005.
Ge'ez Frontier Foundation <locales@geez.org>, 2002.
Jörg Müller <jfm@ram-brand.de>, 2005.
Jeroen van der Vegt <ajvdvegt (at) 123mail.org>, 2003, 2005.
Jose Antonio Salgueiro Aquino <developer@telefonica.net>, 2003
Jose Antonio Salgueiro Aquino <developer@telefonica.net>, 2003.
Josef Vybiral <josef.vybiral@gmail.com>, 2005.
Juarez Rudsatz <juarez@correio.com>, 2004
Junichi Uekawa <dancer@debian.org>, 2002.
Kai Lahmann <kailahmann@01019freenet.de>, 2000
Karl Ove Hufthammer <karl@huftis.org>, 2004, 2005.
Keld Simonsen <keld@dkuug.dk>, 2000-2001.
Kjartan Maraas <kmaraas@gnome.org>, 2000-2002.
Kjartan Maraas <kmaraas@online.no>, 2000.
Lauris Kaplinski <lauris@ariman.ee>, 2000
Luca Bruno <luca.br@uno.it>, 2005.
Lucas Vieites Fariña<lucas@asixinformatica.com>, 2003-2005.
Lucas Vieites <lucas@asixinformatica.com>, 2003
Martin Srebotnjak, <miles@filmsi.net>, 2005.
Masatake YAMATO <jet@gyve.org>, 2002.
Matiphas <matiphas _a_ free _point_ fr>, 2004.
Mattias Hultgren <mattias_hultgren@tele2.se>, 2005.
Maxim Dziumanenko <mvd@mylinux.com.ua>, 2004
Mitsuru Oka <oka326@parkcity.ne.jp>, 2002.
Mitsuru Oka <oka@debian.or.jp>, 2001.
Mufit Eribol <meribol@ere.com.tr>, 2000.
Quico Llach <quico@softcatala.org>, 2000. Traducció sodipodi.
Raymond Ostertag <raymond@linuxgraphic.org>, 2002-2003.
shivaken <shivaken@owls-nest.net>, 2004.
Simos Xenitellis <simos@hellug.gr>, 2001.
Takeshi Aihana <aihana@muc.biglobe.ne.jp>, 2000-2001.
Traducido por Jose Antonio Salgueiro <developer@telefonica.net>.
Traducido por Jose Antonio Salgueiro <developer@telefonica.net>.
translators@gnome.pl
Valek Filippov <frob@df.ru>, 2000, 2003.
Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>, 2003.
Vital Khilko <dojlid@mova.org>, 2003
Vitaly Lipatov <lav@altlinux.ru>, 2002, 2004.
Wang Li <charlesw1234@163.com>, 2002
Xavier Conde Rueda <xavi.conde@gmail.com>, 2004, 2005
Yukihiro Nakai <nakai@gnome.gr.jp>, 2000, 2003.
Yuri Syrota <rasta@renome.rovno.ua>, 2000.
Zdenko Podobný <zdpo@mailbox.sk>, 2003, 2004.
......@@ -458,9 +458,9 @@ Section Install
DetailPrint "creating default editor"
ClearErrors
ReadRegStr $0 HKCR ".svg" ""
WriteRegStr HKCR "$0\shell\edit\command" "" '$INSTDIR\Inkscape.exe "%1"'
WriteRegStr HKCR "$0\shell\edit\command" "" '"$INSTDIR\Inkscape.exe" "%1"'
ReadRegStr $0 HKCR ".svgz" ""
WriteRegStr HKCR "$0\shell\edit\command" "" '$INSTDIR\Inkscape.exe "%1"'
WriteRegStr HKCR "$0\shell\edit\command" "" '"$INSTDIR\Inkscape.exe" "%1"'
IfErrors 0 +2
DetailPrint "Uups! Problems creating default editor"
NoEditor:
......@@ -469,9 +469,9 @@ Section Install
DetailPrint "creating default reader"
ClearErrors
ReadRegStr $0 HKCR ".svg" ""
WriteRegStr HKCR "$0\shell\open\command" "" '$INSTDIR\Inkscape.exe "%1"'
WriteRegStr HKCR "$0\shell\open\command" "" '"$INSTDIR\Inkscape.exe" "%1"'
ReadRegStr $0 HKCR ".svgz" ""
WriteRegStr HKCR "$0\shell\open\command" "" '$INSTDIR\Inkscape.exe "%1"'
WriteRegStr HKCR "$0\shell\open\command" "" '"$INSTDIR\Inkscape.exe" "%1"'
IfErrors 0 +2
DetailPrint "Uups! Problems creating default reader"
NoReader:
......@@ -537,7 +537,7 @@ Section Uninstall
ReadRegStr $1 HKCR "$0\shell\edit\command" ""
IfErrors 0 +2
DetailPrint "svg editor is $1"
StrCmp $1 '$INSTDIR\Inkscape.exe "%1"' 0 +3
StrCmp $1 '"$INSTDIR\Inkscape.exe" "%1"' 0 +3
DetailPrint "removing default .svg editor"
DeleteRegKey HKCR "$0\shell\edit\command"
DeleteRegKey /ifempty HKCR "$0\shell\edit"
......@@ -552,7 +552,7 @@ Section Uninstall
ReadRegStr $3 HKCR "$2\shell\edit\command" ""
IfErrors 0 +2
DetailPrint "svgz editor is $1"
StrCmp $3 '$INSTDIR\Inkscape.exe "%1"' 0 +3
StrCmp $3 '"$INSTDIR\Inkscape.exe" "%1"' 0 +3
DetailPrint "removing default .svgz editor"
DeleteRegKey HKCR "$2\shell\edit\command"
DeleteRegKey /ifempty HKCR "$2\shell\edit"
......@@ -566,7 +566,7 @@ Section Uninstall
ReadRegStr $1 HKCR "$0\shell\open\command" ""
IfErrors 0 +2
DetailPrint "svg viewer is $1"
StrCmp $1 '$INSTDIR\Inkscape.exe "%1"' 0 +3
StrCmp $1 '"$INSTDIR\Inkscape.exe" "%1"' 0 +3
DetailPrint "removing default .svg viewer"
DeleteRegKey HKCR "$0\shell\open\command"
DeleteRegKey /ifempty HKCR "$0\shell\open"
......@@ -580,7 +580,7 @@ Section Uninstall
ReadRegStr $3 HKCR "$2\shell\open\command" ""
IfErrors 0 +2
DetailPrint "svgz viewer is $1"
StrCmp $3 '$INSTDIR\Inkscape.exe "%1"' 0 +3
StrCmp $3 '"$INSTDIR\Inkscape.exe" "%1"' 0 +3
DetailPrint "removing default .svgz viewer"
DeleteRegKey HKCR "$2\shell\open\command"
DeleteRegKey /ifempty HKCR "$2\shell\open"
......
......@@ -30,14 +30,9 @@
#include "libnr/nr-macros.h"
#include "inkscape_version.h"
static GtkWidget *w = NULL;
#include "ui/dialog/aboutbox.h"
static gint
sp_help_about_delete (GtkWidget *widget, GdkEvent *event, gpointer data)
{
w = NULL;
return FALSE;
}
static Inkscape::UI::Dialog::AboutBox * aboutbox = NULL;
#define WINDOW_MIN 20
#define WINDOW_MAX INT_MAX
......@@ -55,7 +50,7 @@ sp_help_about (void)
* coordinate with the directory reorganization.
*/
if (!w) {
if (!aboutbox) {
/* TRANSLATORS: This is the filename of the `About Inkscape' picture in
the `screens' directory. Thus the translation of "about.svg" should be
the filename of its translated version, e.g. about.zh.svg for Chinese.
......@@ -78,24 +73,17 @@ sp_help_about (void)
sp_document_ensure_up_to_date (doc);
w = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (w), _("About Inkscape"));
width = static_cast< gint > ( CLAMP( sp_document_width(doc),
WINDOW_MIN, WINDOW_MAX ));
height = static_cast< gint > ( CLAMP( sp_document_height(doc),
WINDOW_MIN, WINDOW_MAX ));
gtk_window_set_default_size ( GTK_WINDOW (w), width, height );
/*
gtk_window_set_position( GTK_WINDOW(w), GTK_WIN_POS_CENTER);
gtk_window_set_policy ( GTK_WINDOW (w), TRUE, TRUE, FALSE);
gtk_signal_connect ( GTK_OBJECT (w), "delete_event",
GTK_SIGNAL_FUNC (sp_help_about_delete), NULL);
*/
v = sp_svg_view_widget_new (doc);
......@@ -105,11 +93,13 @@ sp_help_about (void)
sp_document_unref (doc);
gtk_widget_show (v);
gtk_container_add (GTK_CONTAINER (w), v);
} // close if (!w)
Gtk::Widget * vmm = Glib::wrap(v);
aboutbox = new Inkscape::UI::Dialog::AboutBox(*vmm,height,width);
} // close if (!aboutbox)
gtk_window_present (GTK_WINDOW (w));
aboutbox->show();
} // close sp_help_about()
......
......@@ -205,7 +205,7 @@ static char const menus_skeleton[] =
" </submenu>\n"
" <verb verb-id=\"HelpAboutMemory\" />\n"
" <verb verb-id=\"HelpAbout\" />\n"
" <verb verb-id=\"ShowLicense\" />\n"
//" <verb verb-id=\"ShowLicense\" />\n"
" </submenu>\n"
"</inkscape>\n";
......
......@@ -54,4 +54,6 @@ ui_dialog_libuidialog_a_SOURCES = \
ui/dialog/tree-editor.h \
$(inkboard_dialogs) \
ui/dialog/xml-editor.cpp \
ui/dialog/xml-editor.h
ui/dialog/xml-editor.h \
ui/dialog/aboutbox.cpp \
ui/dialog/aboutbox.h
This diff is collapsed.
/**
* \brief About Widget - Adds the "about" doc to the Gnome::UI::About Class
*
* The standard Gnome::UI::About class doesn't include a place to stuff
* a renderable View that holds the classic Inkscape "about.svg".
*
* Author:
* Kees Cook <kees@outflux.net>
*
* Copyright (C) 2005 Kees Cook
*
* Released under GNU GPL v2+. Read the file 'COPYING' for more information.
*/
#ifndef INKSCAPE_UI_DIALOG_ABOUTBOX_H
#define INKSCAPE_UI_DIALOG_ABOUTBOX_H
#include <gtkmm.h>
namespace Inkscape {
namespace UI {
namespace Dialog {
#define INKSCAPE_ABOUT_CREDITS 1
#define INKSCAPE_ABOUT_LICENSE 2
#define INKSCAPE_ABOUT_CLOSE 3
class AboutBoxChild: public Gtk::Dialog
{
public:
AboutBoxChild::AboutBoxChild(Gtk::Window& parent, gchar * title)
: Gtk::Dialog(title,parent) {};
protected:
virtual void on_response(int response_id);
Gtk::ScrolledWindow& make_scrolled_text(Glib::ustring& contents);
};
class LicenseBox: public AboutBoxChild
{
public:
LicenseBox(Gtk::Window& parent, Glib::ustring& text);
//protected:
// Gtk::ScrolledWindow _scrolled;
// Gtk::TextView _textview;
};
class CreditsBox: public AboutBoxChild
{
public:
CreditsBox(Gtk::Window& parent,
std::vector<Glib::ustring>& authors,
std::vector<Glib::ustring>& translators);
protected:
Gtk::Notebook _notebook;
private:
void flatten_vector(std::vector<Glib::ustring>& list,
Glib::ustring& string);
};
class AboutBox: public Gtk::Dialog
{
public:
AboutBox(Gtk::Widget& about_svg_view, gint width, gint height);
protected:
virtual void on_response(int response_id);
void show_credits(void);
void show_license(void);
LicenseBox * _license;
CreditsBox * _credits;
/*
Gtk::Dialog * _about;
*/
};
} // namespace Dialog
} // namespace UI
} // namespace Inkscape
#endif // INKSCAPE_UI_DIALOG_ABOUTBOX_H
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
......@@ -1619,10 +1619,12 @@ HelpVerb::perform(SPAction *action, void *data, void *pdata)
break;
}
/*
case SP_VERB_SHOW_LICENSE:
// TRANSLATORS: See "tutorial-basic.svg" comment.
sp_help_open_tutorial(NULL, (gpointer) _("gpl-2.svg"));
break;
*/
case SP_VERB_HELP_MEMORY:
dt->_dlg_mgr->showDialog("Memory");
......@@ -2180,8 +2182,8 @@ Verb *Verb::_base_verbs[] = {
N_("About Memory..."), NULL),
new HelpVerb(SP_VERB_HELP_ABOUT, "HelpAbout", N_("_About Inkscape"),
N_("About Inkscape"), /*"help_about"*/"inkscape_options"),
new HelpVerb(SP_VERB_SHOW_LICENSE, "ShowLicense", N_("Modifying or Redistributing Inkscape"),
N_("Show license to modify and/or redistribute Inkscape: GNU GPL"), NULL),
// new HelpVerb(SP_VERB_SHOW_LICENSE, "ShowLicense", N_("Modifying or Redistributing Inkscape"),
// N_("Show license to modify and/or redistribute Inkscape: GNU GPL"), NULL),
/* Tutorials */
new TutorialVerb(SP_VERB_TUTORIAL_BASIC, "TutorialsBasic", N_("Inkscape: _Basic"),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment