Code

Adding preference to suppress packing of previews.
authorJon A. Cruz <jon@joncruz.org>
Sun, 25 Jul 2010 01:09:40 +0000 (18:09 -0700)
committerJon A. Cruz <jon@joncruz.org>
Sun, 25 Jul 2010 01:09:40 +0000 (18:09 -0700)
src/preferences-skeleton.h
src/ui/dialog/icon-preview.cpp

index c73cae17f46a1ab61cdb7f044ca044713b6f2d39..283960b807a055fe634b36549fa32f142802a83d 100644 (file)
@@ -391,7 +391,9 @@ static char const preferences_skeleton[] =
 "  </group>\n"
 "\n"
 "  <group\n"
-"     id=\"iconpreview\">\n"
+"     id=\"iconpreview\"\n"
+"     pack=\"1\"\n"
+"     selectionOnly=\"0\">\n"
 "    <group\n"
 "       id=\"sizes\">\n"
 "      <group\n"
index 9a46254abaa39b25a07c127a289b7720e439cd3e..7be667383a82b1c6f445065cae1f8168284a5849 100644 (file)
@@ -96,6 +96,8 @@ IconPreviewPanel::IconPreviewPanel() :
     Inkscape::Preferences *prefs = Inkscape::Preferences::get();
     numEntries = 0;
 
+    bool pack = prefs->getBool("/iconpreview/pack", true);
+
     std::vector<Glib::ustring> pref_sizes = prefs->getAllDirs("/iconpreview/sizes/default");
     std::vector<int> rawSizes;
 
@@ -182,7 +184,7 @@ IconPreviewPanel::IconPreviewPanel() :
         align->add(*buttons[i]);
 
         int pad = 12;
-        if ((avail == 0) && (previous == 0)) {
+        if ( !pack || ( (avail == 0) && (previous == 0) ) ) {
             verts->pack_end(*align, Gtk::PACK_SHRINK);
             previous = sizes[i];
             avail = sizes[i];