[solang] Moved the Zoomer's functionality to the main Gtk::Toolbar



commit 95c76f1410dca5233444a8d0d28f8ce0ae056697
Author: Debarshi Ray <rishi gnu org>
Date:   Fri Dec 4 18:21:35 2009 +0200

    Moved the Zoomer's functionality to the main Gtk::Toolbar
    
    Replace the Zoomer with a ScaleAction which uses a ScaleToolItem as
    the proxy. Therefore we can move the slider to the main toolbar for a
    more consistent code and UI, and save some space. We no longer need
    the "tree" icons from F-Spot as the ScaleToolItem does not have any.
    
    A new placeholder called PlaceholderMiscToolBar was added to allow
    right-justified Gtk::ToolItems to be added.

 README                                             |    6 -
 data/Makefile.am                                   |    8 +-
 data/solang-browser-renderer.ui                    |    3 +
 data/solang.ui                                     |    1 +
 data/view-far-16.png                               |  Bin 508 -> 0 bytes
 data/view-far-22.png                               |  Bin 643 -> 0 bytes
 data/view-far-24.png                               |  Bin 618 -> 0 bytes
 data/view-near-16.png                              |  Bin 546 -> 0 bytes
 data/view-near-22.png                              |  Bin 664 -> 0 bytes
 data/view-near-24.png                              |  Bin 632 -> 0 bytes
 src/common/Makefile.am                             |    4 +
 src/common/scale-action.cpp                        |  134 +++++++++++++++++
 src/common/scale-action.h                          |   82 ++++++++++
 src/common/scale-tool-item.cpp                     |   78 ++++++++++
 .../zoomer.h => common/scale-tool-item.h}          |   49 ++----
 src/common/types.h                                 |    4 +
 src/renderer/Makefile.am                           |    4 +-
 src/renderer/browser-renderer.cpp                  |   88 +++++++++---
 src/renderer/browser-renderer.h                    |   20 ++-
 src/renderer/zoomer.cpp                            |  156 --------------------
 20 files changed, 408 insertions(+), 229 deletions(-)
---
diff --git a/README b/README
index 08d13bf..5385880 100644
--- a/README
+++ b/README
@@ -112,12 +112,6 @@ originally licensed under the GNU General Public License version 2.
 + data/tag-new-16.png
 + data/tag-new-22.png
 + data/tag-new-24.png
-+ data/view-far-16.png
-+ data/view-far-22.png
-+ data/view-far-24.png
-+ data/view-near-16.png
-+ data/view-near-22.png
-+ data/view-near-24.png
 
 We are thankful to the respective copyright owners for letting us use and
 distribute these files as a part of Solang under our own licensing terms as
diff --git a/data/Makefile.am b/data/Makefile.am
index e8f06e4..fddcbe7 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -40,13 +40,7 @@ pixmap_DATA = \
 	tag-22.png \
 	tag-new-16.png \
 	tag-new-22.png \
-	tag-new-24.png \
-	view-far-16.png \
-	view-far-22.png \
-	view-far-24.png \
-	view-near-16.png \
-	view-near-22.png \
-	view-near-24.png
+	tag-new-24.png
 
 uidir = $(datadir)/$(PACKAGE_TARNAME)/ui
 ui_DATA = \
diff --git a/data/solang-browser-renderer.ui b/data/solang-browser-renderer.ui
index 27ceae7..d21bd3d 100644
--- a/data/solang-browser-renderer.ui
+++ b/data/solang-browser-renderer.ui
@@ -28,5 +28,8 @@
 		<placeholder name="PlaceholderFullScreenToolBar">
 		<toolitem action="ActionViewBrowserSlideshow"/>
 		</placeholder>
+		<placeholder name="PlaceholderMiscToolBar">
+		<toolitem action="ActionViewZoom"/>
+		</placeholder>
 	</toolbar>
 </ui>
diff --git a/data/solang.ui b/data/solang.ui
index b98e557..24b1439 100644
--- a/data/solang.ui
+++ b/data/solang.ui
@@ -53,5 +53,6 @@
 		<toolitem action="ActionViewFullScreen"/>
 		<placeholder name="PlaceholderFullScreenToolBar"/>
 		<separator name="ToolBarSeparatorN" expand="true"/>
+		<placeholder name="PlaceholderMiscToolBar"/>
 	</toolbar>
 </ui>
diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index b572e3f..aba1033 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -43,6 +43,10 @@ libcommon_la_SOURCES = \
 	progress-observer.cpp \
 	progress-observer.h \
 	renderer-selector.h \
+	scale-action.cpp \
+	scale-action.h \
+	scale-tool-item.cpp \
+	scale-tool-item.h \
 	spinner.cpp \
 	spinner.h \
 	spinner-dialog.cpp \
diff --git a/src/common/scale-action.cpp b/src/common/scale-action.cpp
new file mode 100644
index 0000000..653bb04
--- /dev/null
+++ b/src/common/scale-action.cpp
@@ -0,0 +1,134 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * Copyright (C) 2009 Debarshi Ray <rishi gnu org>
+ *
+ * Solang is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Solang is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "scale-action.h"
+#include "scale-tool-item.h"
+
+namespace Solang
+{
+
+ScaleAction::ScaleAction(const Glib::ustring & name,
+                         const Glib::ustring & tooltip,
+                         const Gtk::Adjustment & adjustment) throw() :
+    Gtk::Action(name, Gtk::StockID(),
+                Glib::ustring(), tooltip),
+    adjustment_(adjustment.get_value(),
+                adjustment.get_lower(),
+                adjustment.get_upper(),
+                adjustment.get_step_increment(),
+                adjustment.get_page_increment(),
+                adjustment.get_page_size()),
+    changeValue_(),
+    valueChanged_()
+{
+}
+
+ScaleAction::~ScaleAction() throw()
+{
+}
+
+Glib::RefPtr<ScaleAction>
+ScaleAction::create(const Glib::ustring & name,
+                    const Glib::ustring & tooltip,
+                    const Gtk::Adjustment & adjustment) throw()
+{
+    return Glib::RefPtr<ScaleAction>(new ScaleAction(name,
+                                                     tooltip,
+                                                     adjustment));
+}
+
+void
+ScaleAction::connect_proxy_vfunc(Gtk::Widget * proxy)
+{
+    ScaleToolItem * const scale_tool_item
+                              = dynamic_cast<ScaleToolItem *>(proxy);
+
+    if (0 != scale_tool_item)
+    {
+        scale_tool_item->signal_change_value().connect(
+            sigc::mem_fun(*this,
+                          &ScaleAction::on_delegate_change_value));
+
+        scale_tool_item->signal_value_changed().connect(
+            sigc::mem_fun(*this,
+                          &ScaleAction::on_delegate_value_changed));
+    }
+
+    Action::connect_proxy_vfunc(proxy);
+}
+
+Gtk::Widget *
+ScaleAction::create_tool_item_vfunc()
+{
+    ScaleToolItem * const scale_tool_item
+                              = new ScaleToolItem(adjustment_);
+
+    scale_tool_item->signal_change_value().connect(
+        sigc::mem_fun(*this,
+                      &ScaleAction::on_delegate_change_value));
+
+    scale_tool_item->signal_value_changed().connect(
+        sigc::mem_fun(*this,
+                      &ScaleAction::on_delegate_value_changed));
+
+    return Gtk::manage(scale_tool_item);
+}
+
+double
+ScaleAction::get_value() const throw()
+{
+    return adjustment_.get_value();
+}
+
+bool
+ScaleAction::on_delegate_change_value(Gtk::ScrollType scroll,
+                                      double new_value) throw()
+{
+    changeValue_.emit(scroll, new_value);
+    return false;
+}
+
+void
+ScaleAction::on_delegate_value_changed() throw()
+{
+    valueChanged_.emit();
+}
+
+void
+ScaleAction::set_value(double value) throw()
+{
+    adjustment_.set_value(value);
+}
+
+sigc::signal<void, Gtk::ScrollType, double> &
+ScaleAction::signal_change_value() throw()
+{
+    return changeValue_;
+}
+
+sigc::signal<void> &
+ScaleAction::signal_value_changed() throw()
+{
+    return valueChanged_;
+}
+
+} // namespace Solang
diff --git a/src/common/scale-action.h b/src/common/scale-action.h
new file mode 100644
index 0000000..0d05676
--- /dev/null
+++ b/src/common/scale-action.h
@@ -0,0 +1,82 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * Copyright (C) 2009 Debarshi Ray <rishi gnu org>
+ *
+ * Solang is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Solang is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef SOLANG_SCALE_ACTION_H
+#define SOLANG_SCALE_ACTION_H
+
+#include <glibmm.h>
+#include <gtkmm.h>
+#include <sigc++/sigc++.h>
+
+namespace Solang
+{
+
+class ScaleAction :
+    public Gtk::Action
+{
+    public:
+        virtual
+        ~ScaleAction() throw();
+
+        static Glib::RefPtr<ScaleAction>
+        create(const Glib::ustring & name,
+               const Glib::ustring & tooltip,
+               const Gtk::Adjustment & adjustment) throw();
+
+        double
+        get_value() const throw();
+
+        void
+        set_value(double value) throw();
+
+        sigc::signal<void, Gtk::ScrollType, double> &
+        signal_change_value() throw();
+
+        sigc::signal<void> &
+        signal_value_changed() throw();
+
+    protected:
+        ScaleAction(const Glib::ustring & name,
+                    const Glib::ustring & tooltip,
+                    const Gtk::Adjustment & adjustment) throw();
+
+        virtual void
+        connect_proxy_vfunc(Gtk::Widget * proxy);
+
+        virtual Gtk::Widget *
+        create_tool_item_vfunc();
+
+        bool
+        on_delegate_change_value(Gtk::ScrollType scroll,
+                                 double new_value) throw();
+
+        void
+        on_delegate_value_changed() throw();
+
+        Gtk::Adjustment adjustment_;
+
+        sigc::signal<void, Gtk::ScrollType, double> changeValue_;
+
+        sigc::signal<void> valueChanged_;
+
+    private:
+};
+
+} // namespace Solang
+
+#endif // SOLANG_SCALE_ACTION_H
diff --git a/src/common/scale-tool-item.cpp b/src/common/scale-tool-item.cpp
new file mode 100644
index 0000000..4c22110
--- /dev/null
+++ b/src/common/scale-tool-item.cpp
@@ -0,0 +1,78 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * Copyright (C) 2009 Debarshi Ray <rishi gnu org>
+ *
+ * Solang is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Solang is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif // HAVE_CONFIG_H
+
+#include "scale-tool-item.h"
+
+namespace Solang
+{
+
+ScaleToolItem::ScaleToolItem(Gtk::Adjustment & adjustment) throw() :
+    Gtk::ToolItem(),
+    hScale_(adjustment)
+{
+    add(hScale_);
+    hScale_.set_size_request(132, -1);
+    show_all_children();
+}
+
+ScaleToolItem::~ScaleToolItem() throw()
+{
+}
+
+double
+ScaleToolItem::get_value() const throw()
+{
+    return hScale_.get_value();
+}
+
+void
+ScaleToolItem::on_toolbar_reconfigured() throw()
+{
+    const Gtk::ToolbarStyle toolbar_style = get_toolbar_style();
+
+    switch (toolbar_style)
+    {
+        case Gtk::TOOLBAR_BOTH:
+            hScale_.set_draw_value(true);
+            break;
+
+        default:
+            hScale_.set_draw_value(false);
+            break;
+    }
+
+    Gtk::ToolItem::on_toolbar_reconfigured();
+}
+
+Glib::SignalProxy2<bool, Gtk::ScrollType, double>
+ScaleToolItem::signal_change_value() throw()
+{
+    return hScale_.signal_change_value();
+}
+
+Glib::SignalProxy0<void>
+ScaleToolItem::signal_value_changed() throw()
+{
+    return hScale_.signal_value_changed();
+}
+
+} // namespace Solang
diff --git a/src/renderer/zoomer.h b/src/common/scale-tool-item.h
similarity index 52%
rename from src/renderer/zoomer.h
rename to src/common/scale-tool-item.h
index eb01c26..ad2b3a2 100644
--- a/src/renderer/zoomer.h
+++ b/src/common/scale-tool-item.h
@@ -1,7 +1,6 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
  * Copyright (C) 2009 Debarshi Ray <rishi gnu org>
- * Copyright (C) 2009 Santanu Sinha <santanu sinha gmail com>
  *
  * Solang is free software: you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -17,58 +16,42 @@
  * with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef SOLANG_ZOOMER_H
-#define SOLANG_ZOOMER_H
+#ifndef SOLANG_SCALE_TOOL_ITEM_H
+#define SOLANG_SCALE_TOOL_ITEM_H
 
+#include <glibmm.h>
 #include <gtkmm.h>
 
-#include "types.h"
-
 namespace Solang
 {
 
-class Zoomer :
-    public Gtk::HBox
+class ScaleToolItem :
+    public Gtk::ToolItem
 {
     public:
-        Zoomer(guint min, guint max, guint mid, guint step) throw();
+        ScaleToolItem(Gtk::Adjustment & adjustment) throw();
 
         virtual
-        ~Zoomer() throw();
+        ~ScaleToolItem() throw();
 
-        const ActionPtr &
-        action_zoom_in() throw();
+        double
+        get_value() const throw();
 
-        const ActionPtr &
-        action_zoom_out() throw();
+        Glib::SignalProxy2<bool, Gtk::ScrollType, double>
+        signal_change_value() throw();
 
-        Gtk::HScale &
-        get_scale() throw();
+        Glib::SignalProxy0<void>
+        signal_value_changed() throw();
 
     protected:
-        bool
-        on_action_view_zoom_in(GdkEventButton * event) throw();
-
-        bool
-        on_action_view_zoom_out(GdkEventButton * event) throw();
-
-        ActionPtr actionZoomIn_;
-
-        ActionPtr actionZoomOut_;
-
-        Gtk::EventBox zoomOutEventBox_;
-
-        Gtk::Image zoomOutImage_;
+        virtual void
+        on_toolbar_reconfigured() throw();
 
         Gtk::HScale hScale_;
 
-        Gtk::EventBox zoomInEventBox_;
-
-        Gtk::Image zoomInImage_;
-
     private:
 };
 
 } // namespace Solang
 
-#endif // SOLANG_ZOOMER_H
+#endif // SOLANG_SPINNER_TOOL_ITEM_H
diff --git a/src/common/types.h b/src/common/types.h
index 848ff0d..26d40f2 100644
--- a/src/common/types.h
+++ b/src/common/types.h
@@ -169,6 +169,10 @@ typedef std::tr1::shared_ptr<const IStorage> ConstIStoragePtr;
 typedef std::tr1::shared_ptr<IStorage> IStoragePtr;
 typedef std::vector<IStoragePtr> IStorageList;
 
+class ScaleAction;
+typedef Glib::RefPtr<const ScaleAction> ConstScaleActionPtr;
+typedef Glib::RefPtr<ScaleAction> ScaleActionPtr;
+
 class SlideshowWindow;
 typedef std::tr1::shared_ptr<const SlideshowWindow>
     ConstSlideshowWindowPtr;
diff --git a/src/renderer/Makefile.am b/src/renderer/Makefile.am
index b131725..5534e67 100644
--- a/src/renderer/Makefile.am
+++ b/src/renderer/Makefile.am
@@ -20,9 +20,7 @@ librenderer_la_SOURCES = \
 	slideshow-window.cpp \
 	slideshow-window.h \
 	thumbnail-view.h \
-	thumbnail-view.cpp \
-	zoomer.cpp \
-	zoomer.h
+	thumbnail-view.cpp
 
 AM_CPPFLAGS = \
 	-DPACKAGE_LOCALE_DIR=\""${datadir}/locale"\" \
diff --git a/src/renderer/browser-renderer.cpp b/src/renderer/browser-renderer.cpp
index 6f2293f..62e0091 100644
--- a/src/renderer/browser-renderer.cpp
+++ b/src/renderer/browser-renderer.cpp
@@ -36,6 +36,7 @@
 #include "main-window.h"
 #include "photo.h"
 #include "photo-search-criteria.h"
+#include "scale-action.h"
 #include "thumbbuf-maker.h"
 
 namespace Solang
@@ -46,6 +47,7 @@ static const guint higherZoomValue = 100;
 static const guint initialZoomValue
                        = lowerZoomValue
                          + (higherZoomValue - lowerZoomValue) / 2;
+static const guint stepZoomValue = 5;
 
 static const gint thumbnailRendererWidth = 168;
 static const gint thumbnailRendererHeight = 130;
@@ -83,10 +85,10 @@ BrowserRenderer::BrowserRenderer() throw() :
     hBox_(false, 12),
     paginationBar_(),
     dummyLabel_(),
-    zoomer_(lowerZoomValue, higherZoomValue, initialZoomValue, 5.0),
     scrolledWindow_(),
     treeModelFilter_(),
     thumbnailView_(thumbnailRendererWidth, thumbnailRendererHeight),
+    zoomValue_(initialZoomValue),
     pageNum_(-1),
     signalInitEnd_(),
     signalListStoreChangeBegin_(),
@@ -145,13 +147,53 @@ BrowserRenderer::BrowserRenderer() throw() :
         sigc::mem_fun(*this,
                       &BrowserRenderer::on_action_view_slideshow));
 
-    actionGroup_->add(
-        zoomer_.action_zoom_in(),
-        Gtk::AccelKey("<control>plus"));
-
-    actionGroup_->add(
-        zoomer_.action_zoom_out(),
-        Gtk::AccelKey("<control>minus"));
+    {
+        const Glib::RefPtr<ScaleAction> scale_action
+            = ScaleAction::create(
+                  "ActionViewZoom",
+                  _("Enlarge or shrink the thumbnails"),
+                  Gtk::Adjustment(initialZoomValue,
+                                  lowerZoomValue,
+                                  higherZoomValue,
+                                  stepZoomValue,
+                                  10 * stepZoomValue,
+                                  0));
+
+        scale_action->reference();
+
+        actionGroup_->add(scale_action);
+
+        scale_action->signal_value_changed().connect(
+            sigc::bind(
+                sigc::mem_fun(
+                    *this,
+                    &BrowserRenderer::on_action_view_zoom_changed),
+                scale_action));
+
+        actionGroup_->add(
+            Gtk::Action::create(
+                "ActionViewZoomIn", Gtk::Stock::ZOOM_IN,
+                _("_Zoom In"),
+                _("Enlarge the thumbnails")),
+            Gtk::AccelKey("<control>plus"),
+            sigc::bind(
+                sigc::mem_fun(
+                    *this,
+                    &BrowserRenderer::on_action_view_zoom_in),
+                scale_action));
+
+        actionGroup_->add(
+            Gtk::Action::create(
+                "ActionViewZoomOut", Gtk::Stock::ZOOM_OUT,
+                _("_Zoom Out"),
+                _("Shrink the thumbnails")),
+            Gtk::AccelKey("<control>minus"),
+            sigc::bind(
+                sigc::mem_fun(
+                    *this,
+                    &BrowserRenderer::on_action_view_zoom_out),
+                scale_action));
+    }
 
     actionGroup_->add(Gtk::Action::create(
         "ActionViewEdit", Gtk::Stock::EDIT, _("_Edit"),
@@ -179,8 +221,6 @@ BrowserRenderer::BrowserRenderer() throw() :
         Gtk::AccelKey("<alt>End"));
 
     hBox_.pack_start(paginationBar_, Gtk::PACK_SHRINK, 0);
-    hBox_.pack_start(dummyLabel_, Gtk::PACK_EXPAND_PADDING, 0);
-    hBox_.pack_start(zoomer_, Gtk::PACK_SHRINK, 0);
 
     vBox_.pack_start(hBox_, Gtk::PACK_SHRINK, 0);
 
@@ -202,10 +242,6 @@ BrowserRenderer::BrowserRenderer() throw() :
         sigc::mem_fun(*this,
                       &BrowserRenderer::on_limits_changed));
 
-    zoomer_.get_scale().signal_value_changed().connect(
-        sigc::mem_fun(*this,
-                      &BrowserRenderer::on_signal_value_changed));
-
     const UIManagerPtr & ui_manager = thumbnailView_.get_ui_manager();
     uiIDThumbnail_ = ui_manager->add_ui_from_file(uiFileThumbnail);
 
@@ -395,15 +431,14 @@ BrowserRenderer::generate_thumbnails() throw()
         return;
     }
 
-    const guint zoom_value = zoomer_.get_scale().get_value();
     const guint thumbnail_width
                     = static_cast<guint>(
                           ratioWidth
-                          * static_cast<double>(zoom_value));
+                          * static_cast<double>(zoomValue_));
     const guint thumbnail_height
                     = static_cast<guint>(
                           ratioHeight
-                          * static_cast<double>(zoom_value));
+                          * static_cast<double>(zoomValue_));
 
     thumbnailView_.set_thumbnail_width(thumbnail_width + 12);
     thumbnailView_.set_thumbnail_height(thumbnail_height + 12);
@@ -633,8 +668,11 @@ BrowserRenderer::on_list_store_change_end(Application & application)
 }
 
 void
-BrowserRenderer::on_signal_value_changed() throw()
+BrowserRenderer::on_action_view_zoom_changed(
+                     const ScaleActionPtr & scale_action) throw()
 {
+    zoomValue_ = scale_action->get_value();
+
     static sigc::connection connection;
 
     connection.disconnect();
@@ -647,6 +685,20 @@ BrowserRenderer::on_signal_value_changed() throw()
 }
 
 void
+BrowserRenderer::on_action_view_zoom_in(
+                     const ScaleActionPtr & scale_action) throw()
+{
+    scale_action->set_value(zoomValue_ + stepZoomValue);
+}
+
+void
+BrowserRenderer::on_action_view_zoom_out(
+                     const ScaleActionPtr & scale_action) throw()
+{
+    scale_action->set_value(zoomValue_ - stepZoomValue);
+}
+
+void
 BrowserRenderer::on_switch_page(GtkNotebookPage * notebook_page,
                                 guint page_num) throw()
 {
diff --git a/src/renderer/browser-renderer.h b/src/renderer/browser-renderer.h
index 54cf230..7ec2eec 100644
--- a/src/renderer/browser-renderer.h
+++ b/src/renderer/browser-renderer.h
@@ -31,7 +31,6 @@
 #include "pagination-bar.h"
 #include "thumbnail-view.h"
 #include "types.h"
-#include "zoomer.h"
 
 namespace Solang
 {
@@ -91,6 +90,18 @@ class BrowserRenderer :
         on_action_view_slideshow() throw();
 
         void
+        on_action_view_zoom_changed(
+            const ScaleActionPtr & scale_action) throw();
+
+        void
+        on_action_view_zoom_in(const ScaleActionPtr & scale_action)
+                               throw();
+
+        void
+        on_action_view_zoom_out(const ScaleActionPtr & scale_action)
+                                throw();
+
+        void
         on_item_activated(const Gtk::TreeModel::Path & path) throw();
 
         void
@@ -103,9 +114,6 @@ class BrowserRenderer :
         on_list_store_change_end(Application & application) throw();
 
         void
-        on_signal_value_changed() throw();
-
-        void
         on_switch_page(GtkNotebookPage * notebook_page, guint page_num)
                        throw();
 
@@ -145,14 +153,14 @@ class BrowserRenderer :
 
         Gtk::Label dummyLabel_;
 
-        Zoomer zoomer_;
-    
         Gtk::ScrolledWindow scrolledWindow_;
 
         TreeModelFilterPtr treeModelFilter_;
 
         ThumbnailView thumbnailView_;
 
+        double zoomValue_;
+
         gint pageNum_;
 
         sigc::connection signalInitEnd_;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]