[niepce] Rename LibraryMainViewController -> ModuleShell
- From: Hubert Figuière <hub src gnome org>
- To: svn-commits-list gnome org
- Subject: [niepce] Rename LibraryMainViewController -> ModuleShell
- Date: Sat, 23 May 2009 03:30:15 -0400 (EDT)
commit 2be6ef4870b44e021dda22b2bfd14165375c5b13
Author: Hubert Figuiere <hub figuiere net>
Date: Mon May 18 20:02:38 2009 -0400
Rename LibraryMainViewController -> ModuleShell
LibraryMainView -> ModuleShellWidget
---
ChangeLog | 3 +
doc/mainwindow-ui.svg | 144 +++++++++++++-------
src/niepce/ui/Makefile.am | 4 +-
...brarymainviewcontroller.cpp => moduleshell.cpp} | 23 ++--
...brarymainviewcontroller.hpp => moduleshell.hpp} | 19 ++--
.../{librarymainview.cpp => moduleshellwidget.cpp} | 76 ++++++-----
.../{librarymainview.hpp => moduleshellwidget.hpp} | 12 +-
src/niepce/ui/niepcewindow.cpp | 27 ++--
src/niepce/ui/niepcewindow.hpp | 8 +-
9 files changed, 188 insertions(+), 128 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 956e056..6536017 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2009-05-18 Hubert Figuiere <hub figuiere net>
+ * Rename LibraryMainViewController -> ModuleShell
+ LibraryMainView -> ModuleShellWidget
+
* Refactor / split the library view code
for the modules.
diff --git a/doc/mainwindow-ui.svg b/doc/mainwindow-ui.svg
index 74474a1..315b281 100644
--- a/doc/mainwindow-ui.svg
+++ b/doc/mainwindow-ui.svg
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://web.resource.org/cc/"
+ xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
@@ -12,12 +13,18 @@
height="1052.3622047"
id="svg2"
sodipodi:version="0.32"
- inkscape:version="0.45.1"
- sodipodi:docbase="/home/hub/cvslocal/niepce/doc"
+ inkscape:version="0.46+devel"
sodipodi:docname="mainwindow-ui.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
<defs
id="defs4">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective50" />
<marker
inkscape:stockid="Arrow1Lstart"
orient="auto"
@@ -31,6 +38,26 @@
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
transform="scale(0.8) translate(12.5,0)" />
</marker>
+ <inkscape:perspective
+ id="perspective2842"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <marker
+ inkscape:stockid="Arrow1Lstart"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lstart-4"
+ style="overflow:visible">
+ <path
+ id="path4160-2"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(0.8,0,0,0.8,10,0)" />
+ </marker>
</defs>
<sodipodi:namedview
id="base"
@@ -43,14 +70,15 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.98994949"
- inkscape:cx="339.23371"
- inkscape:cy="609.53074"
+ inkscape:cx="442.01901"
+ inkscape:cy="470.74218"
inkscape:document-units="px"
inkscape:current-layer="layer1"
- inkscape:window-width="1018"
- inkscape:window-height="691"
+ inkscape:window-width="1280"
+ inkscape:window-height="700"
inkscape:window-x="0"
- inkscape:window-y="26" />
+ inkscape:window-y="25"
+ showgrid="false" />
<metadata
id="metadata7">
<rdf:RDF>
@@ -110,17 +138,17 @@
x="388.90872"
y="285.6564" />
<g
- id="g4365">
+ id="g3910">
<path
sodipodi:nodetypes="ccc"
id="path3186"
- d="M 219.27979,592.22451 L 148.41574,652.41846 L 148.41574,652.41846"
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.84663004px;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow1Lstart);stroke-opacity:1" />
+ d="m 219.27979,592.22451 -70.86405,60.19395 0,0"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Lstart);stroke-miterlimit:4;stroke-dasharray:none" />
<text
id="text4357"
y="668.50421"
x="94.954338"
- style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="668.50421"
x="94.954338"
@@ -128,40 +156,40 @@
sodipodi:role="line">Window (niepcewindow)</tspan></text>
</g>
<g
- id="g4372">
+ id="g3902">
<path
sodipodi:nodetypes="cc"
id="path4355"
- d="M 430.23572,571.84642 L 495.06402,654.04524"
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.94627947px;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow1Lstart);stroke-opacity:1;display:inline" />
+ d="m 270.63162,574.87688 64.8283,82.19882"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Lstart);display:inline;stroke-miterlimit:4;stroke-dasharray:none" />
<text
id="text4361"
- y="669.51434"
- x="437.39606"
- style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ y="672.5448"
+ x="277.79196"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
- y="669.51434"
- x="437.39606"
+ y="672.5448"
+ x="277.79196"
id="tspan4363"
sodipodi:role="line">Film strip (filmstripcontroller)</tspan></text>
</g>
<path
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.86790729px;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow1Lstart);stroke-opacity:1;display:inline"
- d="M 781.22454,559.68539 L 845.12106,629.84076"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Lstart);display:inline;stroke-miterlimit:4;stroke-dasharray:none"
+ d="m 781.22454,559.68539 63.89652,70.15537"
id="path4370"
sodipodi:nodetypes="cc" />
<g
- id="g4409">
+ id="g3893">
<path
sodipodi:nodetypes="cc"
id="path4377"
- d="M 195.33093,297.01845 L 109.73512,225.80702"
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0120579px;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow1Lstart);stroke-opacity:1;display:inline" />
+ d="M 195.33093,297.01845 109.73512,225.80702"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Lstart);display:inline;stroke-miterlimit:4;stroke-dasharray:none" />
<text
id="text4379"
y="197.77312"
x="28.284269"
- style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="197.77312"
x="28.284269"
@@ -173,26 +201,26 @@
sodipodi:role="line">(workspacecontroller)</tspan></text>
</g>
<g
- id="g4444">
+ id="g3883">
<path
sodipodi:nodetypes="cc"
id="path4391"
- d="M 609.42014,288.01919 L 657.31116,197.43063"
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.85382313px;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow1Lstart);stroke-opacity:1;display:inline" />
+ d="m 609.42014,288.01919 47.89102,-90.58856"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Lstart);display:inline;stroke-miterlimit:4;stroke-dasharray:none" />
<text
id="text4393"
- y="177.57008"
- x="550.53314"
- style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ y="172.51932"
+ x="632.35547"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
- y="177.57008"
- x="550.53314"
+ y="172.51932"
+ x="632.35547"
id="tspan4395"
sodipodi:role="line">Main View</tspan><tspan
id="tspan4397"
- y="192.57008"
- x="550.53314"
- sodipodi:role="line">(librarymainviewcontroller)</tspan></text>
+ y="187.51932"
+ x="632.35547"
+ sodipodi:role="line">(ModuleShell)</tspan></text>
</g>
</g>
<g
@@ -222,17 +250,17 @@
x="311.12698"
y="324.04221" />
<g
- id="g4434">
+ id="g3867">
<path
sodipodi:nodetypes="cc"
id="path4415"
- d="M 348.47339,333.14129 L 282.87197,176.55219"
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.31383741px;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow1Lstart);stroke-opacity:1;display:inline" />
+ d="M 348.47339,333.14129 282.87197,176.55219"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Lstart);display:inline;stroke-miterlimit:4;stroke-dasharray:none" />
<text
id="text4418"
y="154.33656"
x="217.1828"
- style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="154.33656"
x="217.1828"
@@ -241,20 +269,20 @@
id="tspan4422"
y="169.33656"
x="217.1828"
- sodipodi:role="line">(librarymainviewcontroller)</tspan></text>
+ sodipodi:role="line">(GridViewModule)</tspan></text>
</g>
<g
- id="g4459">
+ id="g3873">
<path
sodipodi:nodetypes="cc"
id="path4450"
- d="M 564.01589,354.59857 L 468.36003,226.81577"
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.43316531px;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow1Lstart);stroke-opacity:1;display:inline" />
+ d="M 564.01589,354.59857 468.36003,226.81577"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Lstart);display:inline;stroke-miterlimit:4;stroke-dasharray:none" />
<text
id="text4453"
y="203.83405"
x="364.66507"
- style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none"
xml:space="preserve"><tspan
y="203.83405"
x="364.66507"
@@ -263,7 +291,7 @@
id="tspan4457"
y="218.83405"
x="364.66507"
- sodipodi:role="line">(librarymainviewcontroller)</tspan></text>
+ sodipodi:role="line">(GridViewModule)</tspan></text>
</g>
</g>
<g
@@ -278,5 +306,27 @@
height="205.06097"
x="305.06607"
y="313.94067" />
+ <g
+ id="g3853">
+ <text
+ id="text2864"
+ y="650.32147"
+ x="608.11188"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:Bitstream Vera Sans"
+ xml:space="preserve"><tspan
+ y="650.32147"
+ x="608.11188"
+ id="tspan2866"
+ sodipodi:role="line">Darkroom</tspan><tspan
+ id="tspan2868"
+ y="665.32147"
+ x="608.11188"
+ sodipodi:role="line">(DarkroomModule)</tspan></text>
+ <path
+ sodipodi:nodetypes="cc"
+ id="path4370-0"
+ d="m 552.11947,509.37731 75.61925,126.32481"
+ style="fill:none;stroke:#000000;stroke-width:0.86799997;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:url(#Arrow1Lstart-4);display:inline" />
+ </g>
</g>
</svg>
diff --git a/src/niepce/ui/Makefile.am b/src/niepce/ui/Makefile.am
index 8e0fa97..9492812 100644
--- a/src/niepce/ui/Makefile.am
+++ b/src/niepce/ui/Makefile.am
@@ -30,9 +30,9 @@ libniepceui_a_SOURCES = \
niepcewindow.hpp niepcewindow.cpp \
niepceapplication.hpp niepceapplication.cpp \
gridviewmodule.hpp gridviewmodule.cpp \
- librarymainview.hpp librarymainview.cpp \
+ moduleshell.hpp moduleshell.cpp \
+ moduleshellwidget.hpp moduleshellwidget.cpp \
librarycellrenderer.hpp librarycellrenderer.cpp \
- librarymainviewcontroller.hpp librarymainviewcontroller.cpp \
imageliststore.hpp imageliststore.cpp\
workspacecontroller.hpp workspacecontroller.cpp \
metadatapanecontroller.hpp metadatapanecontroller.cpp \
diff --git a/src/niepce/ui/librarymainviewcontroller.cpp b/src/niepce/ui/moduleshell.cpp
similarity index 77%
rename from src/niepce/ui/librarymainviewcontroller.cpp
rename to src/niepce/ui/moduleshell.cpp
index 4148964..4ca379c 100644
--- a/src/niepce/ui/librarymainviewcontroller.cpp
+++ b/src/niepce/ui/moduleshell.cpp
@@ -1,5 +1,5 @@
/*
- * niepce - niepce/ui/librarymainviewcontroller.cpp
+ * niepce - niepce/ui/moduleshell.cpp
*
* Copyright (C) 2007-2009 Hubert Figuiere
*
@@ -18,8 +18,6 @@
*/
-#include <gtk/gtk.h>
-
#include <glibmm/i18n.h>
#include <glibmm/ustring.h>
@@ -31,7 +29,7 @@
#include "engine/db/library.hpp"
#include "engine/db/libfile.hpp"
#include "fwk/toolkit/application.hpp"
-#include "librarymainviewcontroller.hpp"
+#include "moduleshell.hpp"
#include "niepcewindow.hpp"
#include "metadatapanecontroller.hpp"
@@ -40,9 +38,8 @@ namespace ui {
-Gtk::Widget * LibraryMainViewController::buildWidget()
+Gtk::Widget * ModuleShell::buildWidget()
{
- m_gridview = GridViewModule::Ptr(new GridViewModule(m_getclient, m_model));
add_library_module(m_gridview, _("Library"));
@@ -52,23 +49,23 @@ Gtk::Widget * LibraryMainViewController::buildWidget()
// TODO PrintModuleController
// add_library_module(, _("Print"));
- return &m_mainview;
+ return &m_shell;
}
-void LibraryMainViewController::add_library_module(const ILibraryModule::Ptr & module,
+void ModuleShell::add_library_module(const ILibraryModule::Ptr & module,
const std::string & label)
{
add(module);
- m_mainview.append_page(*module->widget(), label);
+ m_shell.append_page(*module->widget(), label);
}
-void LibraryMainViewController::on_ready()
+void ModuleShell::on_ready()
{
}
-void LibraryMainViewController::on_selected(int id)
+void ModuleShell::on_selected(int id)
{
DBG_OUT("selected callback %d", id);
if(id > 0) {
@@ -79,14 +76,14 @@ void LibraryMainViewController::on_selected(int id)
}
}
-void LibraryMainViewController::on_image_activated(int id)
+void ModuleShell::on_image_activated(int id)
{
DBG_OUT("on image activated %d", id);
Gtk::TreeIter iter = m_model->get_iter_from_id(id);
if(iter) {
eng::LibFile::Ptr libfile = (*iter)[m_model->columns().m_libfile];
m_darkroom->set_image(libfile);
- m_mainview.activate_page(1);
+ m_shell.activate_page(1);
}
}
diff --git a/src/niepce/ui/librarymainviewcontroller.hpp b/src/niepce/ui/moduleshell.hpp
similarity index 82%
rename from src/niepce/ui/librarymainviewcontroller.hpp
rename to src/niepce/ui/moduleshell.hpp
index 16b30eb..6c25bc2 100644
--- a/src/niepce/ui/librarymainviewcontroller.hpp
+++ b/src/niepce/ui/moduleshell.hpp
@@ -1,5 +1,5 @@
/*
- * niepce - ui/librarymainviewcontroller.h
+ * niepce - ui/moduleshell.hpp
*
* Copyright (C) 2007-2009 Hubert Figuiere
*
@@ -18,12 +18,12 @@
*/
-#ifndef __UI_LIBRARYMAINVIEWCONTROLLER_H__
-#define __UI_LIBRARYMAINVIEWCONTROLLER_H__
+#ifndef __UI_MODULESHELL_HPP__
+#define __UI_MODULESHELL_HPP__
-#include "librarymainview.hpp"
+#include "moduleshellwidget.hpp"
#include "libraryclient/libraryclient.hpp"
#include "fwk/toolkit/controller.hpp"
#include "fwk/toolkit/notification.hpp"
@@ -37,19 +37,20 @@ namespace Gtk {
namespace ui {
-class LibraryMainViewController
+class ModuleShell
: public fwk::Controller
{
public:
- typedef std::tr1::shared_ptr<LibraryMainViewController> Ptr;
- typedef std::tr1::weak_ptr<LibraryMainViewController> WeakPtr;
+ typedef std::tr1::shared_ptr<ModuleShell> Ptr;
+ typedef std::tr1::weak_ptr<ModuleShell> WeakPtr;
- LibraryMainViewController(const sigc::slot<libraryclient::LibraryClient::Ptr> get_client,
+ ModuleShell(const sigc::slot<libraryclient::LibraryClient::Ptr> get_client,
const Glib::RefPtr<Gtk::ActionGroup> & actions,
const Glib::RefPtr<ImageListStore> & store)
: m_getclient(get_client)
, m_actionGroup(actions)
, m_model(store)
+ , m_gridview(new GridViewModule(m_getclient, m_model))
{
}
@@ -74,7 +75,7 @@ private:
Glib::RefPtr<ImageListStore> m_model;
// managed widgets...
- LibraryMainView m_mainview;
+ ModuleShellWidget m_shell;
GridViewModule::Ptr m_gridview;
darkroom::DarkroomModule::Ptr m_darkroom;
diff --git a/src/niepce/ui/librarymainview.cpp b/src/niepce/ui/moduleshellwidget.cpp
similarity index 53%
rename from src/niepce/ui/librarymainview.cpp
rename to src/niepce/ui/moduleshellwidget.cpp
index 295c779..4f46a97 100644
--- a/src/niepce/ui/librarymainview.cpp
+++ b/src/niepce/ui/moduleshellwidget.cpp
@@ -1,7 +1,7 @@
/*
- * niepce - ui/librarymainview.cpp
+ * niepce - ui/moduleshellwidget.cpp
*
- * Copyright (C) 2007 Hubert Figuiere
+ * Copyright (C) 2007-2009 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -20,70 +20,80 @@
#include <gtkmm/togglebutton.h>
#include "fwk/base/debug.hpp"
-#include "ui/librarymainview.hpp"
+#include "ui/moduleshellwidget.hpp"
namespace ui {
- LibraryMainView::LibraryMainView()
+ModuleShellWidget::ModuleShellWidget()
: Gtk::VBox(),
m_currentpage(-1)
- {
+{
set_spacing(4);
m_mainbar.set_layout(Gtk::BUTTONBOX_START);
m_mainbar.set_spacing(4);
m_notebook.set_show_tabs(false);
pack_start(m_mainbar, Gtk::PACK_SHRINK);
pack_start(m_notebook);
- }
+}
- int
- LibraryMainView::append_page(Gtk::Widget & w, const Glib::ustring & label)
- {
+int
+ModuleShellWidget::append_page(Gtk::Widget & w, const Glib::ustring & label)
+{
int idx;
Gtk::ToggleButton* button = Gtk::manage(new Gtk::ToggleButton(label));
m_mainbar.pack_start(*button);
idx = m_notebook.append_page(w, label);
sigc::connection conn = button->signal_toggled().connect(
- sigc::bind(sigc::mem_fun(this, &LibraryMainView::set_current_page),
- idx, button));
+ sigc::bind(sigc::mem_fun(this, &ModuleShellWidget::set_current_page),
+ idx, button));
if(m_currentpage == -1) {
- set_current_page(idx, button);
+ set_current_page(idx, button);
}
if((int)m_buttons.size() < idx + 1) {
- m_buttons.resize(idx + 1);
+ m_buttons.resize(idx + 1);
}
m_buttons[idx] = std::make_pair(button, conn);
return idx;
- }
+}
- void LibraryMainView::activate_page(int idx)
- {
+void ModuleShellWidget::activate_page(int idx)
+{
if(m_currentpage != idx) {
- Gtk::ToggleButton * btn = m_buttons[idx].first;
- set_current_page(idx, btn);
+ Gtk::ToggleButton * btn = m_buttons[idx].first;
+ set_current_page(idx, btn);
}
- }
+}
- void LibraryMainView::set_current_page(int idx, Gtk::ToggleButton * btn)
- {
- if(m_currentpage == idx) {
- // just preempt. Make sure the button is still active.
- // otherwise it cause an infinite loop.
- m_buttons[m_currentpage].second.block();
- m_buttons[m_currentpage].first->set_active(true);
- m_buttons[m_currentpage].second.unblock();
- return;
- }
+void ModuleShellWidget::set_current_page(int idx, Gtk::ToggleButton * btn)
+{
+ if(m_currentpage == idx) {
+ // just preempt. Make sure the button is still active.
+ // otherwise it cause an infinite loop.
+ m_buttons[m_currentpage].second.block();
+ m_buttons[m_currentpage].first->set_active(true);
+ m_buttons[m_currentpage].second.unblock();
+ return;
+ }
m_notebook.set_current_page(idx);
if(m_currentpage >= 0) {
- m_buttons[m_currentpage].second.block();
- m_buttons[m_currentpage].first->set_active(false);
- m_buttons[m_currentpage].second.unblock();
+ m_buttons[m_currentpage].second.block();
+ m_buttons[m_currentpage].first->set_active(false);
+ m_buttons[m_currentpage].second.unblock();
}
btn->set_active(true);
m_currentpage = idx;
- }
}
+}
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0))
+ indent-tabs-mode:nil
+ fill-column:80
+ End:
+*/
diff --git a/src/niepce/ui/librarymainview.hpp b/src/niepce/ui/moduleshellwidget.hpp
similarity index 86%
rename from src/niepce/ui/librarymainview.hpp
rename to src/niepce/ui/moduleshellwidget.hpp
index c220585..6dd7428 100644
--- a/src/niepce/ui/librarymainview.hpp
+++ b/src/niepce/ui/moduleshellwidget.hpp
@@ -1,7 +1,7 @@
/*
- * niepce - ui/librarymainview.h
+ * niepce - ui/moduleshellwidget.hpp
*
- * Copyright (C) 2007 Hubert Figuiere
+ * Copyright (C) 2007-2009 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __LIBRARY_MAIN_VIEW_H__
-#define __LIBRARY_MAIN_VIEW_H__
+#ifndef __MODULE_SHELL_WIDGET_H__
+#define __MODULE_SHELL_WIDGET_H__
#include <vector>
#include <utility>
@@ -34,11 +34,11 @@ namespace Gtk {
namespace ui {
- class LibraryMainView
+ class ModuleShellWidget
: public Gtk::VBox
{
public:
- LibraryMainView();
+ ModuleShellWidget();
int append_page(Gtk::Widget & w, const Glib::ustring & label);
void activate_page(int);
diff --git a/src/niepce/ui/niepcewindow.cpp b/src/niepce/ui/niepcewindow.cpp
index 501f08c..985b052 100644
--- a/src/niepce/ui/niepcewindow.cpp
+++ b/src/niepce/ui/niepcewindow.cpp
@@ -17,7 +17,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <iostream>
#include <string>
#include <boost/bind.hpp>
@@ -102,17 +101,17 @@ NiepceWindow::buildWidget()
&ImageListStore::on_tnail_notification));
// main view
- m_mainviewctrl = LibraryMainViewController::Ptr(
- new LibraryMainViewController(sigc::mem_fun(
- *this, &NiepceWindow::getLibraryClient),
- m_refActionGroup,
- m_selection_controller->list_store()));
+ m_moduleshell = ModuleShell::Ptr(
+ new ModuleShell(sigc::mem_fun(
+ *this, &NiepceWindow::getLibraryClient),
+ m_refActionGroup,
+ m_selection_controller->list_store()));
m_notifcenter->signal_lib_notification
.connect(sigc::mem_fun(
- *m_mainviewctrl->get_gridview(),
+ *m_moduleshell->get_gridview(),
&GridViewModule::on_lib_notification));
- add(m_mainviewctrl);
+ add(m_moduleshell);
// workspace treeview
m_workspacectrl = WorkspaceController::Ptr( new WorkspaceController() );
@@ -123,7 +122,7 @@ NiepceWindow::buildWidget()
m_hbox.set_border_width(4);
m_hbox.pack1(*(m_workspacectrl->widget()), Gtk::EXPAND);
- m_hbox.pack2(*(m_mainviewctrl->widget()), Gtk::EXPAND);
+ m_hbox.pack2(*(m_moduleshell->widget()), Gtk::EXPAND);
m_databinders.add_binder(new fwk::ConfigDataBinder<int>(m_hbox.property_position(),
Application::app()->config(),
"workspace_splitter"));
@@ -145,14 +144,14 @@ NiepceWindow::buildWidget()
m_statusBar.push(Glib::ustring(_("Ready")));
m_selection_controller->add_selectable(m_filmstrip.get());
- m_selection_controller->add_selectable(m_mainviewctrl->get_gridview().get());
+ m_selection_controller->add_selectable(m_moduleshell->get_gridview().get());
m_selection_controller->signal_selected
- .connect(sigc::mem_fun(*m_mainviewctrl,
- &LibraryMainViewController::on_selected));
+ .connect(sigc::mem_fun(*m_moduleshell,
+ &ModuleShell::on_selected));
m_selection_controller->signal_activated
- .connect(sigc::mem_fun(*m_mainviewctrl,
- &LibraryMainViewController::on_image_activated));
+ .connect(sigc::mem_fun(*m_moduleshell,
+ &ModuleShell::on_image_activated));
win.set_size_request(600, 400);
win.show_all_children();
diff --git a/src/niepce/ui/niepcewindow.hpp b/src/niepce/ui/niepcewindow.hpp
index 3861ffe..b5d2e17 100644
--- a/src/niepce/ui/niepcewindow.hpp
+++ b/src/niepce/ui/niepcewindow.hpp
@@ -1,7 +1,7 @@
/*
- * niepce - ui/niepcewindow.h
+ * niepce - ui/niepcewindow.hpp
*
- * Copyright (C) 2007-2008 Hubert Figuiere
+ * Copyright (C) 2007-2009 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@
#include "fwk/toolkit/configdatabinder.hpp"
#include "engine/db/label.hpp"
#include "libraryclient/libraryclient.hpp"
-#include "ui/librarymainviewcontroller.hpp"
+#include "ui/moduleshell.hpp"
#include "ui/workspacecontroller.hpp"
#include "ui/selectioncontroller.hpp"
#include "ui/filmstripcontroller.hpp"
@@ -88,7 +88,7 @@ private:
Gtk::VBox m_vbox;
Gtk::HPaned m_hbox;
- LibraryMainViewController::Ptr m_mainviewctrl; // the main views stacked.
+ ModuleShell::Ptr m_moduleshell; // the main views stacked.
WorkspaceController::Ptr m_workspacectrl;
FilmStripController::Ptr m_filmstrip;
ui::SelectionController::Ptr m_selection_controller;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]