author | simon <simon> | 2002-12-11 13:06:35 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-11 13:06:35 (UTC) |
commit | 84d92e2298605f4d4f9a9209731f62c2b10e54e4 (patch) (unidiff) | |
tree | 9742dc8490da1a2ff1b2af2484fc87b1f218ca36 /noncore/multimedia/opieplayer2/mediawidget.cpp | |
parent | aa9623e53bd86c2645103ebacc81262f372b73d7 (diff) | |
download | opie-84d92e2298605f4d4f9a9209731f62c2b10e54e4.zip opie-84d92e2298605f4d4f9a9209731f62c2b10e54e4.tar.gz opie-84d92e2298605f4d4f9a9209731f62c2b10e54e4.tar.bz2 |
- minor cleanup
Diffstat (limited to 'noncore/multimedia/opieplayer2/mediawidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp index 6b304ec..0d1c8b6 100644 --- a/noncore/multimedia/opieplayer2/mediawidget.cpp +++ b/noncore/multimedia/opieplayer2/mediawidget.cpp | |||
@@ -62,34 +62,32 @@ MediaWidget::Button MediaWidget::setupButton( const SkinButtonInfo &buttonInfo, | |||
62 | Button button; | 62 | Button button; |
63 | button.command = buttonInfo.command; | 63 | button.command = buttonInfo.command; |
64 | button.type = buttonInfo.type; | 64 | button.type = buttonInfo.type; |
65 | button.mask = skin.buttonMaskImage( buttonInfo.fileName ); | 65 | button.mask = skin.buttonMaskImage( buttonInfo.fileName ); |
66 | 66 | ||
67 | return button; | 67 | return button; |
68 | } | 68 | } |
69 | 69 | ||
70 | void MediaWidget::loadDefaultSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &fileNameInfix ) | 70 | void MediaWidget::loadDefaultSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &fileNameInfix ) |
71 | { | 71 | { |
72 | Config cfg( "OpiePlayer" ); | 72 | Config cfg( "OpiePlayer" ); |
73 | cfg.setGroup( "Options" ); | 73 | cfg.setGroup( "Options" ); |
74 | QString skin = cfg.readEntry( "Skin","default" ); | 74 | QString name = cfg.readEntry( "Skin","default" ); |
75 | 75 | ||
76 | loadSkin( skinInfo, buttonCount, skin, fileNameInfix ); | 76 | Skin skin( name, fileNameInfix ); |
77 | loadSkin( skinInfo, buttonCount, skin ); | ||
77 | } | 78 | } |
78 | 79 | ||
79 | void MediaWidget::loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &name, const QString &fileNameInfix ) | 80 | void MediaWidget::loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const Skin &skin ) |
80 | { | 81 | { |
81 | Skin skin( name, fileNameInfix ); | ||
82 | |||
83 | QString skinPath = "opieplayer2/skins/" + name; | ||
84 | backgroundPixmap = skin.backgroundImage(); | 82 | backgroundPixmap = skin.backgroundImage(); |
85 | buttonUpImage = skin.buttonUpImage(); | 83 | buttonUpImage = skin.buttonUpImage(); |
86 | buttonDownImage = skin.buttonDownImage(); | 84 | buttonDownImage = skin.buttonDownImage(); |
87 | 85 | ||
88 | setupButtons( skinInfo, buttonCount, skin ); | 86 | setupButtons( skinInfo, buttonCount, skin ); |
89 | } | 87 | } |
90 | 88 | ||
91 | void MediaWidget::closeEvent( QCloseEvent * ) | 89 | void MediaWidget::closeEvent( QCloseEvent * ) |
92 | { | 90 | { |
93 | mediaPlayerState.setList(); | 91 | mediaPlayerState.setList(); |
94 | } | 92 | } |
95 | 93 | ||