From ac40d1226ad4b0170dc3df567074c54ca20d9469 Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Sun, 22 Aug 2010 21:33:18 +0200 Subject: i18n. Context cleanup (context|string replaced with C_). (bzr r9722) --- src/ui/dialog/document-properties.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (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 33fdf8327..e14779163 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -103,11 +103,8 @@ DocumentProperties::DocumentProperties() _rcp_hgui(_("_Highlight color:"), _("Highlighted guideline color"), _("Color of a guideline when it is under mouse"), "guidehicolor", "guidehiopacity", _wr), //--------------------------------------------------------------- _grids_label_crea("", Gtk::ALIGN_LEFT), - //TRANSLATORS: only translate "string" in "context|string". - // For more details, see http://developer.gnome.org/doc/API/2.0/glib/glib-I18N.html#Q-:CAPS - // "New" refers to grid - _grids_button_new(Q_("Grid|_New"), _("Create new grid.")), - _grids_button_remove(_("_Remove"), _("Remove selected grid.")), + _grids_button_new(C_("Grid", "_New"), _("Create new grid.")), + _grids_button_remove(C_("Grid", "_Remove"), _("Remove selected grid.")), _grids_label_def("", Gtk::ALIGN_LEFT) //--------------------------------------------------------------- { -- cgit v1.2.3 From 1d1fdab9933218f4d59b390ac74392fbc2caaf7b Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Sun, 17 Oct 2010 23:37:36 -0700 Subject: Unified and cleaned up locating icc profiles, including adding missing OS X location. Fixes bug 494932, bug 494940 and bug 551162. Fixed bugs: - https://launchpad.net/bugs/494932 - https://launchpad.net/bugs/494940 - https://launchpad.net/bugs/551162 (bzr r9834) --- src/ui/dialog/document-properties.cpp | 61 ++++++++++++----------------------- 1 file changed, 20 insertions(+), 41 deletions(-) (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 e14779163..0dfac0c7d 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -333,49 +333,28 @@ DocumentProperties::populate_available_profiles(){ delete(*it2); } - std::list sources = ColorProfile::getProfileDirs(); - - // Use this loop to iterate through a list of possible document locations. - for ( std::list::const_iterator it = sources.begin(); it != sources.end(); ++it ) { - if ( Inkscape::IO::file_test( it->c_str(), G_FILE_TEST_EXISTS ) - && Inkscape::IO::file_test( it->c_str(), G_FILE_TEST_IS_DIR )) { - GError *err = 0; - GDir *directory = g_dir_open(it->c_str(), 0, &err); - if (!directory) { - gchar *safeDir = Inkscape::IO::sanitizeString(it->c_str()); - g_warning(_("Color profiles directory (%s) is unavailable."), safeDir); - g_free(safeDir); - } else { - gchar *filename = 0; - 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; - lcms_profile_get_name(hProfile, &name); - Gtk::MenuItem* mi = manage(new Gtk::MenuItem()); - mi->set_data("filepath", g_strdup(full)); - mi->set_data("name", g_strdup(name)); - Gtk::HBox *hbox = manage(new Gtk::HBox()); - hbox->show(); - Gtk::Label* lbl = manage(new Gtk::Label(name)); - lbl->show(); - hbox->pack_start(*lbl, true, true, 0); - mi->add(*hbox); - mi->show_all(); - _menu.append(*mi); - // g_free((void*)name); - cmsCloseProfile(hProfile); - } - } - g_free(full); - } - g_dir_close(directory); - } + std::list files = ColorProfile::getProfileFiles(); + for ( std::list::const_iterator it = files.begin(); it != files.end(); ++it ) { + cmsHPROFILE hProfile = cmsOpenProfileFromFile(it->c_str(), "r"); + if ( hProfile ){ + const gchar* name = 0; + lcms_profile_get_name(hProfile, &name); + Gtk::MenuItem* mi = manage(new Gtk::MenuItem()); + mi->set_data("filepath", g_strdup(it->c_str())); + mi->set_data("name", g_strdup(name)); + Gtk::HBox *hbox = manage(new Gtk::HBox()); + hbox->show(); + Gtk::Label* lbl = manage(new Gtk::Label(name)); + lbl->show(); + hbox->pack_start(*lbl, true, true, 0); + mi->add(*hbox); + mi->show_all(); + _menu.append(*mi); +// g_free((void*)name); + cmsCloseProfile(hProfile); } } + _menu.show_all(); } -- cgit v1.2.3 From 144819c918dc761641c3cb5a490205fb73194ee3 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Wed, 17 Nov 2010 13:12:56 +1100 Subject: Super duper mega (fun!) commit: replaced encoding=utf-8 with fileencoding=utf-8 in all 1074 Vim modelines. The reason for this is that (a) setting the encoding isn't nice, and (b) Vim 7.3 (with modeline enabled) disallows it and pops up an error whenever you open any file with it ("invalid modeline"). Also corrected five deviant modestrings: * src/ui/widget/dock.cpp and src/ui/widget/dock.h: missing colon at the end * src/ui/dialog/tile.cpp: removed gratuitous second colon at the end * src/helper/units-test.h: removed gratuitous space before a colon * share/extensions/export_gimp_palette.py: missing textwidth=99 That's my geekiest commit yet. (bzr r9900) --- 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 0dfac0c7d..f22509496 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -979,4 +979,4 @@ DocumentProperties::onRemoveGrid() fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : -- cgit v1.2.3