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/sourceoutputwidget.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/sourceoutputwidget.h')
-rw-r--r-- | src/sourceoutputwidget.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/sourceoutputwidget.h b/src/sourceoutputwidget.h index 281a897..055acb4 100644 --- a/src/sourceoutputwidget.h +++ b/src/sourceoutputwidget.h @@ -30,16 +30,17 @@ class MainWindow; class SourceOutputWidget : public StreamWidget { public: SourceOutputWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x); - static SourceOutputWidget* create(); + static SourceOutputWidget* create(MainWindow* mainWindow); virtual ~SourceOutputWidget(); + void init(MainWindow* mainWindow); + SourceOutputType type; uint32_t index, clientIndex, sourceIndex; virtual void onDeviceChange(); virtual void onKill(); - MainWindow *mainWindow; Gtk::Menu submenu; Gtk::MenuItem titleMenuItem, killMenuItem; @@ -64,6 +65,10 @@ public: void clearMenu(); void buildMenu(); virtual void prepareMenu(); + +private: + MainWindow *mpMainWindow; + }; #endif |