summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bd84cad)
raw | patch | inline | side by side (parent: bd84cad)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Wed, 9 Jan 2008 21:08:56 +0000 (21:08 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Wed, 9 Jan 2008 21:08:56 +0000 (21:08 +0000) |
src/ui/dialog/inkscape-preferences.cpp | patch | blob | history | |
src/ui/dialog/inkscape-preferences.h | patch | blob | history |
index e1219c6eceb669b654faa7c35ee778919fcd27d2..dfbfdcf58660d2f655e15de57e369c773ff98ffc 100644 (file)
* Copyright (C) 2004-2007 Authors
*
* Released under GNU GPL. Read the file 'COPYING' for more information.
- */
+ */
#ifdef HAVE_CONFIG_H
# include <config.h>
#include "display/nr-filter-gaussian.h"
#include "color-profile-fns.h"
#include "display/canvas-grid.h"
-#include "dialogs/rdf.h"
namespace Inkscape {
namespace UI {
InkscapePreferences::InkscapePreferences()
: UI::Widget::Panel ("", "dialogs.preferences", SP_VERB_DIALOG_DISPLAY),
- _max_dialog_width(0),
+ _max_dialog_width(0),
_max_dialog_height(0),
_current_page(0)
-{
+{
//get the width of a spinbutton
Gtk::SpinButton* sb = new Gtk::SpinButton;
sb->set_width_chars(6);
initPageImportExport();
initPageCMS();
initPageGrids();
- initPageMetadata();
- initPageLicense();
initPageMisc();
signalPresent().connect(sigc::mem_fun(*this, &InkscapePreferences::_presentPages));
this->AddPage(_page_grids, _("Grids"), PREFS_PAGE_GRIDS);
}
-void InkscapePreferences::initPageMetadata()
-{
- _metadata_title.init ( "options.defaultmetadata", "title", true);
- _metadata_date.init ( "options.defaultmetadata", "date", true);
- _metadata_format.init ( "options.defaultmetadata", "format", true);
- _metadata_type.init ( "options.defaultmetadata", "type", true);
- _metadata_creator.init ( "options.defaultmetadata", "creator", true);
- _metadata_rights.init ( "options.defaultmetadata", "rights", true);
- _metadata_publisher.init ( "options.defaultmetadata", "publisher", true);
- _metadata_identifier.init ( "options.defaultmetadata", "identifier", true);
- _metadata_source.init ( "options.defaultmetadata", "source", true);
- _metadata_relation.init ( "options.defaultmetadata", "relation", true);
- _metadata_language.init ( "options.defaultmetadata", "language", true);
- _metadata_subject.init ( "options.defaultmetadata", "subject", true);
- _metadata_coverage.init ( "options.defaultmetadata", "coverage", true);
- _metadata_description.init ( "options.defaultmetadata", "description", true);
- _metadata_contributor.init ( "options.defaultmetadata", "contributor", true);
-
- _page_metadata.add_group_header( _("Default metadata that will be used for new documents:"));
-
- _page_metadata.add_line(true, _("Title:"), _metadata_title, "", _("These values will be used as default metadata for new documents"));
- _page_metadata.add_line(true, _("Date:"), _metadata_date, "", _("These values will be used as default metadata for new documents"));
- _page_metadata.add_line(true, _("Format:"), _metadata_format, "", _("These values will be used as default metadata for new documents"));
- _page_metadata.add_line(true, _("Type:"), _metadata_type, "", _("These values will be used as default metadata for new documents"));
- _page_metadata.add_line(true, _("Creator:"), _metadata_creator, "", _("These values will be used as default metadata for new documents"));
- _page_metadata.add_line(true, _("Rights:"), _metadata_rights, "", _("These values will be used as default metadata for new documents"));
- _page_metadata.add_line(true, _("Publisher:"), _metadata_publisher, "", _("These values will be used as default metadata for new documents"));
- _page_metadata.add_line(true, _("Identifier:"), _metadata_identifier, "", _("These values will be used as default metadata for new documents"));
- _page_metadata.add_line(true, _("Source:"), _metadata_source, "", _("These values will be used as default metadata for new documents"));
- _page_metadata.add_line(true, _("Relation:"), _metadata_relation, "", _("These values will be used as default metadata for new documents"));
- _page_metadata.add_line(true, _("Language:"), _metadata_language, "", _("These values will be used as default metadata for new documents"));
- _page_metadata.add_line(true, _("Subject:"), _metadata_subject, "", _("These values will be used as default metadata for new documents"));
- _page_metadata.add_line(true, _("Coverage:"), _metadata_coverage, "", _("These values will be used as default metadata for new documents"));
- _page_metadata.add_line(true, _("Description:"), _metadata_description, "", _("These values will be used as default metadata for new documents"));
- _page_metadata.add_line(true, _("Contributor:"), _metadata_contributor, "", _("These values will be used as default metadata for new documents"));
-
- this->AddPage(_page_metadata, _("Default Metadata"), PREFS_PAGE_METADATA);
-}
-
-void InkscapePreferences::on_license_changed(){
- int i = prefs_get_int_attribute("options.defaultmetadata", "license", 0);
- if (i)
- _license_uri.set_text( rdf_licenses[i - 1].uri );
- else
- _license_uri.set_text("");
-}
-
-void InkscapePreferences::initPageLicense()
-{
- _license_proprietary.init( _("Proprietary"), "options.defaultmetadata", "license", LICENSE_PROPRIETARY, true, 0);
- _license_ccby.init( _("Creative Commons By 3.0"), "options.defaultmetadata", "license", LICENSE_CC_BY, false, &_license_proprietary);
- _license_ccbysa.init( _("Creative Commons By Sa 3.0"), "options.defaultmetadata", "license", LICENSE_CC_BY_SA, false, &_license_proprietary);
- _license_ccbynd.init( _("Creative Commons By Nd 3.0"), "options.defaultmetadata", "license", LICENSE_CC_BY_ND, false, &_license_proprietary);
- _license_ccbync.init( _("Creative Commons By Nc 3.0"), "options.defaultmetadata", "license", LICENSE_CC_BY_NC, false, &_license_proprietary);
- _license_ccbyncsa.init( _("Creative Commons By Nc Sa 3.0"), "options.defaultmetadata", "license", LICENSE_CC_BY_NC_SA, false, &_license_proprietary);
- _license_ccbyncnd.init( _("Creative Commons By Nc Nd 3.0"), "options.defaultmetadata", "license", LICENSE_CC_BY_NC_ND, false, &_license_proprietary);
- _license_pdomain.init( _("Public Domain"), "options.defaultmetadata", "license", LICENSE_PUBLIC_DOMAIN, false, &_license_proprietary);
- _license_freeart.init( _("FreeArt"), "options.defaultmetadata", "license", LICENSE_FREE_ART, false, &_license_proprietary);
- _license_openfont.init( _("Open Font License"), "options.defaultmetadata", "license", LICENSE_OPEN_FONT, false, &_license_proprietary);
- _license_uri.init( "options.defaultmetadata", "license_uri", true);
-
- _license_proprietary.signal_toggled().connect(sigc::mem_fun( *this, &InkscapePreferences::on_license_changed ));
- _license_ccby.signal_toggled().connect(sigc::mem_fun( *this, &InkscapePreferences::on_license_changed));
- _license_ccbysa.signal_toggled().connect(sigc::mem_fun( *this, &InkscapePreferences::on_license_changed));
- _license_ccbynd.signal_toggled().connect(sigc::mem_fun( *this, &InkscapePreferences::on_license_changed));
- _license_ccbync.signal_toggled().connect(sigc::mem_fun( *this, &InkscapePreferences::on_license_changed));
- _license_ccbyncsa.signal_toggled().connect(sigc::mem_fun( *this, &InkscapePreferences::on_license_changed));
- _license_ccbyncnd.signal_toggled().connect(sigc::mem_fun( *this, &InkscapePreferences::on_license_changed));
- _license_pdomain.signal_toggled().connect(sigc::mem_fun( *this, &InkscapePreferences::on_license_changed));
- _license_freeart.signal_toggled().connect(sigc::mem_fun( *this, &InkscapePreferences::on_license_changed));
- _license_openfont.signal_toggled().connect(sigc::mem_fun( *this, &InkscapePreferences::on_license_changed));
-
- _page_license.add_group_header( _("Default Licensing for new documents:"));
-
- _page_license.add_line(true, "", _license_proprietary, "", _("All Rights Reserved"));
- _page_license.add_line(true, "", _license_ccby, "", _("Creative Commons: Attribution"));
- _page_license.add_line(true, "", _license_ccbysa, "", _("Creative Commons: Attribution-ShareAlike"));
- _page_license.add_line(true, "", _license_ccbynd, "", _("Creative Commons: Attribution-NoDerivatives"));
- _page_license.add_line(true, "", _license_ccbync, "", _("Creative Commons: Attribution-NonCommercial"));
- _page_license.add_line(true, "", _license_ccbyncsa, "", _("Creative Commons: Attribution-NonCommercial-ShareAlike"));
- _page_license.add_line(true, "", _license_ccbyncnd, "", _("Creative Commons: Attribution-NonCommercial-NoDerivatives"));
- _page_license.add_line(true, "", _license_pdomain, "", _("Public Domain"));
- _page_license.add_line(true, "", _license_freeart, "", _("Free Art License"));
- _page_license.add_line(true, "", _license_openfont, "", _("Open Font License"));
-
- _page_license.add_line(true, _("URL:"), _license_uri, "", "");
-
- this->AddPage(_page_license, _("Default License"), PREFS_PAGE_LICENSE);
-}
-
-
void InkscapePreferences::initPageMisc()
{
_misc_comment.init( _("Add label comments to printing output"), "printing.debug", "show-label-comments", false);
index 1609e808ce35e8beb29b9a4ab267932ff0dbd6cb..4b62f3947d9edf53cfcf24184cfd4a3e728690f2 100644 (file)
PREFS_PAGE_IMPORTEXPORT,
PREFS_PAGE_CMS,
PREFS_PAGE_GRIDS,
- PREFS_PAGE_METADATA,
- PREFS_PAGE_LICENSE,
PREFS_PAGE_MISC
};
-enum {
- LICENSE_PROPRIETARY = 0,
- LICENSE_CC_BY = 1,
- LICENSE_CC_BY_SA = 2,
- LICENSE_CC_BY_ND = 3,
- LICENSE_CC_BY_NC = 4,
- LICENSE_CC_BY_NC_SA = 5,
- LICENSE_CC_BY_NC_ND = 6,
- LICENSE_PUBLIC_DOMAIN = 7,
- LICENSE_FREE_ART = 8,
- LICENSE_OPEN_FONT = 9
-};
-
using namespace Inkscape::UI::Widget;
namespace Inkscape {
protected:
Gtk::Frame _page_frame;
Gtk::Label _page_title;
- Gtk::TreeView _page_list;
+ Gtk::TreeView _page_list;
Glib::RefPtr<Gtk::TreeStore> _page_list_model;
//Pagelist model columns:
Gtk::TreeModel::Path _path_shapes;
DialogPage _page_mouse, _page_scrolling, _page_steps, _page_tools, _page_windows,
- _page_clones, _page_mask, _page_transforms, _page_filters, _page_select,
- _page_importexport, _page_cms, _page_grids, _page_metadata, _page_license, _page_misc;
+ _page_clones, _page_mask, _page_transforms, _page_filters, _page_select,
+ _page_importexport, _page_cms, _page_grids, _page_misc;
DialogPage _page_selector, _page_node, _page_zoom, _page_shapes, _page_pencil, _page_pen,
_page_calligraphy, _page_text, _page_gradient, _page_connector, _page_dropper;
DialogPage _page_rectangle, _page_3dbox, _page_ellipse, _page_star, _page_spiral, _page_paintbucket;
PrefCheckButton _win_hide_task, _win_zoom_resize , _win_show_close;
// FIXME: Temporary Win32 special code to enable transient dialogs
-#ifdef WIN32
- PrefCheckButton _win_ontop_win32;
-#endif
+#ifdef WIN32
+ PrefCheckButton _win_ontop_win32;
+#endif
PrefCheckButton _calligrapy_use_abs_size;
PrefCheckButton _calligrapy_keep_selected;
PrefCheckButton _connector_ignore_text;
-
+
PrefRadioButton _clone_option_parallel, _clone_option_stay, _clone_option_transform,
_clone_option_unlink, _clone_option_delete;
PrefCheckButton _mask_mask_on_top;
PrefCheckButton _mask_mask_remove;
- PrefEntry _metadata_title, _metadata_date, _metadata_format, _metadata_type, _metadata_creator;
- PrefEntry _metadata_rights, _metadata_publisher, _metadata_identifier, _metadata_source;
- PrefEntry _metadata_relation, _metadata_language, _metadata_subject, _metadata_coverage;
- PrefEntry _metadata_description, _metadata_contributor;
-
- PrefRadioButton _license_ccby, _license_ccbysa, _license_ccbync, _license_ccbynd;
- PrefRadioButton _license_ccbyncsa, _license_ccbyncnd;
- PrefRadioButton _license_freeart, _license_pdomain, _license_openfont, _license_proprietary;
- PrefEntry _license_uri;
- void on_license_changed();
-
PrefRadioButton _blur_quality_best, _blur_quality_better, _blur_quality_normal, _blur_quality_worse, _blur_quality_worst;
PrefCheckButton _trans_scale_stroke, _trans_scale_corner, _trans_gradient,_trans_pattern;
void initPageImportExport();
void initPageCMS();
void initPageGrids();
- void initPageMetadata();
- void initPageLicense();
void initPageMisc();
void _presentPages();