Changeset 434
- Timestamp:
- 10/22/10 17:16:26 (19 months ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
QtMPCui.rc (modified) (1 diff)
-
gui/main_window.cpp (modified) (5 diffs)
-
gui/main_window.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/QtMPCui.rc
r355 r434 4 4 <MenuBar> 5 5 <Menu name="actions"> 6 <text>Actions</text> 7 <Action name="updatedatabase" /> 8 <Action name="showstatistics" /> 9 </Menu> 6 <text>Actions</text> 7 <Action name="updatedatabase" /> 8 <Action name="showstatistics" /> 9 </Menu> 10 <Menu name="output_menu"> 11 <text>Outputs</text> 12 <ActionList name="outputs_list" /> 13 </Menu> 10 14 </MenuBar> 11 15 </gui> -
trunk/gui/main_window.cpp
r433 r434 38 38 #include <kaboutapplicationdialog.h> 39 39 #include <klineedit.h> 40 #include <kxmlguifactory.h> 40 41 #endif 41 42 … … 187 188 188 189 action_Copy_song_info = new KAction(this); 189 action_Copy_song_info->setText(i l18n("Copy song info"));190 action_Copy_song_info->setText(i18n("Copy song info")); 190 191 actionCollection()->addAction("copysonginfo", action_Copy_song_info); 191 192 … … 449 450 // Outputs 450 451 connect(&mpd, SIGNAL(outputsUpdated(const QList<Output *>)), this, SLOT(updateOutpus(const QList<Output *>))); 451 connect(menu_Outputs, SIGNAL(triggered(QAction *)), this, SLOT(outputChanged(QAction *))); 452 #ifdef ENABLE_KDE_SUPPORT 453 QMenu *m = (QMenu *)factory()->container("output_menu", this); 454 connect(m, SIGNAL(triggered(QAction *)), this, SLOT(outputChanged(QAction *))); 455 #else 456 connect(menu_Outputs, SIGNAL(triggered(QAction *)), this, SLOT(outputChanged(QAction *))); 457 #endif 452 458 453 459 mpd.outputs(); … … 1305 1311 void MainWindow::updateOutpus(const QList<Output *> outputs) 1306 1312 { 1313 #ifndef ENABLE_KDE_SUPPORT 1314 1307 1315 menu_Outputs->clear(); 1308 1316 … … 1317 1325 menu_Outputs->addAction(a); 1318 1326 } 1327 1328 #else 1329 1330 QList<QAction *> actions; 1331 1332 for (int i = 0; i < outputs.size(); i++) { 1333 Output *o = outputs.at(i); 1334 1335 QAction *a = new QAction(o->name, this); 1336 a->setCheckable(true); 1337 a->setChecked(o->enabled); 1338 a->setData(o->id); 1339 1340 actions << a; 1341 } 1342 1343 unplugActionList( "outputs_list" ); 1344 plugActionList( "outputs_list", actions); 1345 1346 #endif 1319 1347 } 1320 1348 -
trunk/gui/main_window.h
r433 r434 177 177 KAction *action_Remove_from_playlist; 178 178 KAction *action_Clear_playlist; 179 KAction *action_Copy_song_info; 179 180 KAction *quitAction; 180 181 #else
Note: See TracChangeset
for help on using the changeset viewer.
