aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Ui/skinned/shortcutdialog.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2020-12-23 18:28:08 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2020-12-23 18:28:08 +0000
commit8fa1aec3cd3413dc6ff0c4049395cc0a70afe15f (patch)
tree32ef553615b7aa67f7b3de7496ae37d16c3a9b47 /src/plugins/Ui/skinned/shortcutdialog.cpp
parent54a428d4294ed7169fded4ae44199b733e4409a4 (diff)
downloadqmmp-8fa1aec3cd3413dc6ff0c4049395cc0a70afe15f.tar.gz
qmmp-8fa1aec3cd3413dc6ff0c4049395cc0a70afe15f.tar.bz2
qmmp-8fa1aec3cd3413dc6ff0c4049395cc0a70afe15f.zip
fixed regression
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9600 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Ui/skinned/shortcutdialog.cpp')
0 files changed, 0 insertions, 0 deletions
0000 hal support (experimental)' href='/qmmp/commit/src/plugins/General/hal/halplugin.cpp?id=95563aa52d1b15be8efcb23c979c40c0515cfa10'>95563aa52
90d3aeb64
278110253

95563aa52



9408303fa
95563aa52





278110253


013ee07b5

11b7655bb

95563aa52


6b2ff2034
278110253
11b7655bb



278110253
95563aa52

95563aa52


























6b2ff2034









95563aa52
278110253







95563aa52

6b2ff2034










832643f42
6b2ff2034


6d6e64be9

6b2ff2034
278110253









6b2ff2034

95563aa52




6b2ff2034
95563aa52

6b2ff2034









95563aa52
6b2ff2034




95563aa52
6b2ff2034



95563aa52
6b2ff2034
95563aa52
d07a2db55










95563aa52
a65bebd9b
278110253
95563aa52

6b2ff2034
95563aa52

6b2ff2034
95563aa52

d184b2ace
278110253
95563aa52







6b2ff2034
24af8da3f
6b2ff2034








b917024aa
6b2ff2034




















b917024aa
95563aa52
278110253


76b31b99f


278110253
76b31b99f

aa167f22d
278110253




76b31b99f
278110253


76b31b99f
278110253







76b31b99f
278110253



aa167f22d
76b31b99f
278110253



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
                                                                            
                                                                            
                                                                            













                                                                            
                                                                            



                                                                             

                       
                            
                               
                                   

                                



                       
                                                       





                                                                                                   


                                                                 

                                                                   

                                                        


                                                                   
                   
                             



                                                                     
                        

 


























                                                                        









                                                                                           
     







                                                                                 

               










                                                                                           
                                                                       


                                                                      

                                                                        
     









                                                                                            

               




                               
                                                

                                         









                                                                                                          
         




                                                                                                           
             



                                                                           
             
                                        
                                      










                                                                                          
                                         
                                                                        
                              

         
                                                   

                                                   
                                

                                            
                                                       
                                                  







                                                                                     
                                             
                                                                              








                                                       
                   




















                                                                                               
                   
 


                                            


                                                                           
     

                           
                                                                         




                                                  
                                                                   


                                                       
                                                                   







                                                                               
                                                                           



                                                    
                                                                          
                                  



                
/***************************************************************************
 *   Copyright (C) 2009-2019 by Ilya Kotov                                 *
 *   forkotov02@ya.ru                                                      *
 *                                                                         *
 *   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  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program 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, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
 ***************************************************************************/

#include <QtDBus>
#include <QActionGroup>
#include <QApplication>
#include <QStyle>
#include <qmmpui/uihelper.h>
#include <qmmpui/mediaplayer.h>
#include <qmmpui/playlistmanager.h>
#include <qmmpui/playlistitem.h>
#include <qmmp/qmmp.h>
#include "haldevice.h"
#include "halmanager.h"
#include "halplugin.h"

HalPlugin::HalPlugin(QObject *parent) : QObject(parent)
{
    m_manager = new HalManager(this);
    m_actions = new QActionGroup(this);
    connect(m_manager,SIGNAL(deviceAdded(const QString &)), SLOT(addDevice(const QString &)));
    connect(m_manager,SIGNAL(deviceRemoved(const QString &)), SLOT(removeDevice(const QString &)));
    connect(m_actions,SIGNAL(triggered (QAction *)), SLOT(processAction(QAction *)));
    //load settings
    QSettings settings(Qmmp::configFile(), QSettings::IniFormat);
    settings.beginGroup("HAL");
    m_detectCDA = settings.value("cda", true).toBool();
    m_detectRemovable = settings.value("removable", true).toBool();
    m_addTracks = false; //do not load tracks on startup
    m_addFiles = false;
    //find existing devices
    QStringList udis = m_manager->findDeviceByCapability("volume");
    foreach(QString udi, udis)
    addDevice(udi);
    //load remaining settings
    m_addTracks = settings.value("add_tracks", false).toBool();
    m_removeTracks = settings.value("remove_tracks", false).toBool();
    m_addFiles = settings.value("add_files", false).toBool();
    m_removeFiles = settings.value("remove_files", false).toBool();
    settings.endGroup();
}

HalPlugin::~HalPlugin()
{
}

void HalPlugin::removeDevice(const QString &udi)
{
    foreach(HalDevice *device, m_devices)
    {
        if (device->udi() == udi)
        {
            m_devices.removeAll(device);
            delete device;
            qDebug("HalPlugin: device \"%s\" removed", qPrintable(udi));
            updateActions();
            break;
        }
    }
}

void HalPlugin::addDevice(const QString &udi)
{
    foreach(HalDevice *device, m_devices) //is it already exists?