diff options
author | Colin Guthrie <cguthrie@mandriva.org> | 2009-03-16 20:18:01 +0000 |
---|---|---|
committer | Colin Guthrie <cguthrie@mandriva.org> | 2009-06-17 08:54:11 +0100 |
commit | d617c39a0814401714df6bd983579c204ab49d82 (patch) | |
tree | 9aec58841b7412264d9a1d537e303099958d7a3a /src/sinkinputwidget.h | |
parent | 7b7a12f1d2e6e02b11b7649b394d2122eec57813 (diff) |
Set the mainwindow pointer via an init() method rather than directly via public member variable.
This allows us to perform other general initialisation task (such as setting the tree model on the device combo)
Diffstat (limited to 'src/sinkinputwidget.h')
-rw-r--r-- | src/sinkinputwidget.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/sinkinputwidget.h b/src/sinkinputwidget.h index f7b5101..6cb91a8 100644 --- a/src/sinkinputwidget.h +++ b/src/sinkinputwidget.h @@ -30,9 +30,11 @@ class MainWindow; class SinkInputWidget : public StreamWidget { public: SinkInputWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x); - static SinkInputWidget* create(); + static SinkInputWidget* create(MainWindow* mainWindow); virtual ~SinkInputWidget(); + void init(MainWindow* mainWindow); + SinkInputType type; uint32_t index, clientIndex, sinkIndex; @@ -42,7 +44,6 @@ public: virtual void onKill(); virtual void prepareMenu(); - MainWindow *mainWindow; Gtk::Menu submenu; Gtk::MenuItem titleMenuItem, killMenuItem; @@ -66,6 +67,10 @@ public: void clearMenu(); void buildMenu(); + +private: + MainWindow *mpMainWindow; + }; #endif |