From 048b095b6031adf91a6dc2fb300270f78ca44cbf Mon Sep 17 00:00:00 2001 From: Felipe Corr??a da Silva Sanches Date: Fri, 14 Aug 2009 03:52:51 +0000 Subject: a quick workaround in order to avoid some invalid names for icc profiles. A complete sanitizer should be implemented later. (bzr r8050.1.10) --- src/ui/dialog/document-properties.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/ui/dialog/document-properties.cpp') diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index bb9ab4d02..c21f64629 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -381,6 +381,17 @@ DocumentProperties::populate_available_profiles(){ _menu.show_all(); } +//this is a quick workaround: +static gchar* sanitize_name(gchar* name){ + gchar* c=name; + while (*c != '\0'){ + if (*c == ' ') *c = '-'; + if (*c == '_') *c = '-'; + c++; + } + return name; +} + void DocumentProperties::linkSelectedProfile() { @@ -396,7 +407,8 @@ DocumentProperties::linkSelectedProfile() } Inkscape::XML::Document *xml_doc = sp_document_repr_doc(desktop->doc()); Inkscape::XML::Node *cprofRepr = xml_doc->createElement("svg:color-profile"); - cprofRepr->setAttribute("name", (gchar*) _menu.get_active()->get_data("name")); +// cprofRepr->setAttribute("inkscape:name", (gchar*) _menu.get_active()->get_data("name")); + cprofRepr->setAttribute("name", sanitize_name((gchar*) _menu.get_active()->get_data("name"))); cprofRepr->setAttribute("xlink:href", (gchar*) _menu.get_active()->get_data("filepath")); // Checks whether there is a defs element. Creates it when needed -- cgit v1.2.3 From 73cd5b89883ba845125ae0a022ac8e50a6f7ebce Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Thu, 31 Dec 2009 02:04:42 -0800 Subject: Document properties now treats lcms file load failures as non-fatal. Fixes bug #501782 Fixed bugs: - https://launchpad.net/bugs/501782 (bzr r8930) --- src/ui/dialog/document-properties.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/ui/dialog/document-properties.cpp') diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index 982fb3415..a7241ea40 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -353,6 +353,7 @@ DocumentProperties::populate_available_profiles(){ while ((filename = (gchar *)g_dir_read_name(directory)) != NULL) { gchar* full = g_build_filename(it->c_str(), filename, NULL); if ( !Inkscape::IO::file_test( full, G_FILE_TEST_IS_DIR ) ) { + cmsErrorAction( LCMS_ERROR_SHOW ); cmsHPROFILE hProfile = cmsOpenProfileFromFile(full, "r"); if (hProfile != NULL){ const gchar* name; -- cgit v1.2.3 From 59ac8467a1a2655b42c04e92d10d3283bab17205 Mon Sep 17 00:00:00 2001 From: Josh Andler Date: Thu, 7 Jan 2010 21:43:33 -0800 Subject: Patch by Alex Leone to add margins to resize page options in Document Properties (bzr r8952) --- src/ui/dialog/document-properties.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ui/dialog/document-properties.cpp') diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index a7241ea40..86baa85cd 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -222,7 +222,7 @@ DocumentProperties::build_page() Gtk::Label* label_bor = manage (new Gtk::Label); label_bor->set_markup (_("Border")); Gtk::Label *label_for = manage (new Gtk::Label); - label_for->set_markup (_("Format")); + label_for->set_markup (_("Page Size")); _page_sizer.init(); Gtk::Widget *const widget_array[] = -- cgit v1.2.3