summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b0429ce)
raw | patch | inline | side by side (parent: b0429ce)
author | joncruz <joncruz@users.sourceforge.net> | |
Fri, 3 Apr 2009 08:23:20 +0000 (08:23 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Fri, 3 Apr 2009 08:23:20 +0000 (08:23 +0000) |
src/main.cpp | patch | blob | history |
diff --git a/src/main.cpp b/src/main.cpp
index b5ace5405a74fce9f2554446ae427f9f85edefa1..db3255cad750e060643b53a33bfc6c18996f4810 100644 (file)
--- a/src/main.cpp
+++ b/src/main.cpp
gtk_main_do_event (event);
}
+static std::vector<Glib::ustring> getDirectorySet(const gchar* userDir, const gchar* const * systemDirs) {
+ std::vector<Glib::ustring> listing;
+ listing.push_back(userDir);
+ for ( const char* const* cur = systemDirs; *cur; cur++ )
+ {
+ listing.push_back(*cur);
+ }
+ return listing;
+}
+
int
sp_main_gui(int argc, char const **argv)
{
int retVal = sp_common_main( argc, argv, &fl );
g_return_val_if_fail(retVal == 0, 1);
+ // Add possible icon entry directories
+ std::vector<Glib::ustring> dataDirs = getDirectorySet( g_get_user_data_dir(),
+ g_get_system_data_dirs() );
+ for (std::vector<Glib::ustring>::iterator it = dataDirs.begin(); it != dataDirs.end(); ++it)
+ {
+ std::vector<Glib::ustring> listing;
+ listing.push_back(*it);
+ listing.push_back("inkscape");
+ listing.push_back("icons");
+ Glib::ustring dir = Glib::build_filename(listing);
+ gtk_icon_theme_append_search_path(gtk_icon_theme_get_default(), dir.c_str());
+ }
+
// Add our icon directory to the search path for icon theme lookups.
gchar *usericondir = profile_path("icons");
gtk_icon_theme_append_search_path(gtk_icon_theme_get_default(), usericondir);