Code

Added preference to suppress icon preview frames.
authorJon A. Cruz <jon@joncruz.org>
Sun, 25 Jul 2010 04:58:14 +0000 (21:58 -0700)
committerJon A. Cruz <jon@joncruz.org>
Sun, 25 Jul 2010 04:58:14 +0000 (21:58 -0700)
src/preferences-skeleton.h
src/ui/dialog/icon-preview.cpp

index e117e85a5c7471fdf33e951cf7e67a259af30cfe..d7b93f13f743f0987a60b44e7acaba4c4fb74390 100644 (file)
@@ -394,6 +394,7 @@ static char const preferences_skeleton[] =
 "     id=\"iconpreview\"\n"
 "     pack=\"1\"\n"
 "     selectionHold=\"0\"\n"
+"     showFrames=\"1\"\n"
 "     selectionOnly=\"0\">\n"
 "    <group\n"
 "       id=\"sizes\">\n"
index d3a28d96ff3bb4b5485b0b527d05da6804a5730f..2fb684a38becdec3b8429da2e5965c20cf1c4410 100644 (file)
@@ -171,10 +171,14 @@ IconPreviewPanel::IconPreviewPanel() :
         Glib::ustring label(*labels[i]);
         buttons[i] = new Gtk::ToggleToolButton(label);
         buttons[i]->set_active( i == hot );
-        Gtk::Frame *frame = new Gtk::Frame();
-        frame->set_shadow_type(Gtk::SHADOW_ETCHED_IN);
-        frame->add(*images[i]);
-        buttons[i]->set_icon_widget(*Gtk::manage(frame));
+        if ( prefs->getBool("/iconpreview/showFrames", true) ) {
+            Gtk::Frame *frame = new Gtk::Frame();
+            frame->set_shadow_type(Gtk::SHADOW_ETCHED_IN);
+            frame->add(*images[i]);
+            buttons[i]->set_icon_widget(*Gtk::manage(frame));
+        } else {
+            buttons[i]->set_icon_widget(*images[i]);
+        }
 
         tips.set_tip((*buttons[i]), label);