From ed6467ed951fca2b7646e43ba22e214177bc17bc Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Sat, 24 Jul 2010 21:49:41 -0700 Subject: [PATCH] Added preference to suppress icon preview frames. --- src/preferences-skeleton.h | 1 + src/ui/dialog/icon-preview.cpp | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/preferences-skeleton.h b/src/preferences-skeleton.h index e117e85a5..d7b93f13f 100644 --- a/src/preferences-skeleton.h +++ b/src/preferences-skeleton.h @@ -394,6 +394,7 @@ static char const preferences_skeleton[] = " id=\"iconpreview\"\n" " pack=\"1\"\n" " selectionHold=\"0\"\n" +" showFrames=\"1\"\n" " selectionOnly=\"0\">\n" " \n" diff --git a/src/ui/dialog/icon-preview.cpp b/src/ui/dialog/icon-preview.cpp index d3a28d96f..2fb684a38 100644 --- a/src/ui/dialog/icon-preview.cpp +++ b/src/ui/dialog/icon-preview.cpp @@ -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); -- 2.30.2