Changeset 434


Ignore:
Timestamp:
10/22/10 17:16:26 (19 months ago)
Author:
roeland
Message:

Now #7 is also fixed for our KDE users!

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/QtMPCui.rc

    r355 r434  
    44  <MenuBar> 
    55    <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> 
    1014  </MenuBar> 
    1115</gui> 
  • trunk/gui/main_window.cpp

    r433 r434  
    3838#include <kaboutapplicationdialog.h> 
    3939#include <klineedit.h> 
     40#include <kxmlguifactory.h> 
    4041#endif 
    4142 
     
    187188     
    188189    action_Copy_song_info = new KAction(this); 
    189     action_Copy_song_info->setText(il18n("Copy song info")); 
     190    action_Copy_song_info->setText(i18n("Copy song info")); 
    190191    actionCollection()->addAction("copysonginfo", action_Copy_song_info); 
    191192 
     
    449450    // Outputs 
    450451    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 
    452458 
    453459    mpd.outputs(); 
     
    13051311void MainWindow::updateOutpus(const QList<Output *> outputs) 
    13061312{ 
     1313    #ifndef ENABLE_KDE_SUPPORT 
     1314     
    13071315    menu_Outputs->clear(); 
    13081316     
     
    13171325        menu_Outputs->addAction(a); 
    13181326    } 
     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 
    13191347} 
    13201348 
  • trunk/gui/main_window.h

    r433 r434  
    177177        KAction *action_Remove_from_playlist; 
    178178        KAction *action_Clear_playlist; 
     179        KAction *action_Copy_song_info; 
    179180        KAction *quitAction; 
    180181#else 
Note: See TracChangeset for help on using the changeset viewer.