~ubuntu-branches/ubuntu/vivid/guayadeque/vivid

« back to all changes in this revision

Viewing changes to src/.svn/text-base/PodcastsPanel.cpp.svn-base

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2011-02-25 11:59:10 UTC
  • mto: (12.1.1 sid)
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: james.westby@ubuntu.com-20110225115910-9rxgmtmyjyy0o942
Tags: upstream-0.2.9
ImportĀ upstreamĀ versionĀ 0.2.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
125
125
        MainPodcastsSizer = new wxBoxSizer( wxVERTICAL );
126
126
 
127
127
        m_PodcastsListBox = new guPodcastListBox( PodcastsPanel, m_Db );
128
 
        MainPodcastsSizer->Add( m_PodcastsListBox, 1, wxALL|wxEXPAND, 1 );
 
128
        MainPodcastsSizer->Add( m_PodcastsListBox, 1, wxEXPAND, 5 );
129
129
 
130
130
        PodcastsPanel->SetSizer( MainPodcastsSizer );
131
131
        PodcastsPanel->Layout();
252
252
        m_DetailScrolledWindow->SetSizer( m_DetailFlexGridSizer );
253
253
        m_DetailScrolledWindow->Layout();
254
254
        m_DetailFlexGridSizer->Fit( m_DetailScrolledWindow );
255
 
        DetailSizer->Add( m_DetailScrolledWindow, 1, wxEXPAND | wxALL, 5 );
 
255
        DetailSizer->Add( m_DetailScrolledWindow, 1, wxEXPAND|wxALL, 5 );
256
256
 
257
257
        m_DetailMainSizer->Add( DetailSizer, 1, wxEXPAND|wxALL, 5 );
258
258
 
280
280
    Connect( ID_PODCASTS_CHANNEL_ADD, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( guPodcastPanel::AddChannel ), NULL, this );
281
281
    Connect( ID_PODCASTS_CHANNEL_DEL, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( guPodcastPanel::DeleteChannels ), NULL, this );
282
282
    Connect( ID_PODCASTS_CHANNEL_PROPERTIES, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( guPodcastPanel::ChannelProperties ), NULL, this );
283
 
    Connect( ID_PODCASTS_CHANNEL_COPYTO, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( guPodcastPanel::ChannelsCopyTo ), NULL, this );
284
283
    Connect( ID_PODCASTS_CHANNEL_UPDATE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( guPodcastPanel::UpdateChannels ), NULL, this );
 
284
    Connect( ID_PODCASTS_CHANNEL_COPYTO, ID_PODCASTS_CHANNEL_COPYTO + 199, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( guPodcastPanel::ChannelsCopyTo ), NULL, this );
285
285
 
286
286
    Connect( ID_PODCASTS_ITEM_UPDATED, guPodcastEvent, wxCommandEventHandler( guPodcastPanel::OnPodcastItemUpdated ), NULL, this );
287
287
 
296
296
    Connect( ID_PODCASTS_ITEM_ENQUEUE_ASNEXT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( guPodcastPanel::OnPodcastItemEnqueueAsNext ), NULL, this );
297
297
    Connect( ID_PODCASTS_ITEM_DEL, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( guPodcastPanel::OnPodcastItemDelete ), NULL, this );
298
298
    Connect( ID_PODCASTS_ITEM_DOWNLOAD, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( guPodcastPanel::OnPodcastItemDownload ), NULL, this );
299
 
    Connect( ID_PODCASTS_ITEM_COPYTO, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( guPodcastPanel::OnPodcastItemCopyTo ), NULL, this );
 
299
    Connect( ID_PODCASTS_ITEM_COPYTO, ID_PODCASTS_ITEM_COPYTO + 199, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( guPodcastPanel::OnPodcastItemCopyTo ), NULL, this );
300
300
 
301
301
    Connect( ID_CONFIG_UPDATED, guConfigUpdatedEvent, wxCommandEventHandler( guPodcastPanel::OnConfigUpdated ), NULL, this );
302
302
 
319
319
    Disconnect( ID_PODCASTS_CHANNEL_ADD, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( guPodcastPanel::AddChannel ), NULL, this );
320
320
    Disconnect( ID_PODCASTS_CHANNEL_DEL, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( guPodcastPanel::DeleteChannels ), NULL, this );
321
321
    Disconnect( ID_PODCASTS_CHANNEL_PROPERTIES, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( guPodcastPanel::ChannelProperties ), NULL, this );
322
 
    Disconnect( ID_PODCASTS_CHANNEL_COPYTO, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( guPodcastPanel::ChannelsCopyTo ), NULL, this );
 
322
    Disconnect( ID_PODCASTS_CHANNEL_COPYTO, ID_PODCASTS_CHANNEL_COPYTO + 199, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( guPodcastPanel::ChannelsCopyTo ), NULL, this );
323
323
    Disconnect( ID_PODCASTS_CHANNEL_UPDATE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( guPodcastPanel::UpdateChannels ), NULL, this );
324
324
 
325
325
    Disconnect( ID_PODCASTS_ITEM_UPDATED, guPodcastEvent, wxCommandEventHandler( guPodcastPanel::OnPodcastItemUpdated ), NULL, this );
335
335
    Disconnect( ID_PODCASTS_ITEM_ENQUEUE_ASNEXT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( guPodcastPanel::OnPodcastItemEnqueueAsNext ), NULL, this );
336
336
    Disconnect( ID_PODCASTS_ITEM_DEL, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( guPodcastPanel::OnPodcastItemDelete ), NULL, this );
337
337
    Disconnect( ID_PODCASTS_ITEM_DOWNLOAD, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( guPodcastPanel::OnPodcastItemDownload ), NULL, this );
338
 
    Disconnect( ID_PODCASTS_ITEM_COPYTO, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( guPodcastPanel::OnPodcastItemCopyTo ), NULL, this );
 
338
    Disconnect( ID_PODCASTS_ITEM_COPYTO, ID_PODCASTS_ITEM_COPYTO + 199, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( guPodcastPanel::OnPodcastItemCopyTo ), NULL, this );
339
339
 
340
340
    Disconnect( ID_CONFIG_UPDATED, guConfigUpdatedEvent, wxCommandEventHandler( guPodcastPanel::OnConfigUpdated ), NULL, this );
341
341
 
528
528
        }
529
529
    }
530
530
 
531
 
    event.SetId( ID_MAINFRAME_COPYTO );
 
531
    Index = event.GetId() - ID_PODCASTS_CHANNEL_COPYTO;
 
532
    if( Index > 99 )
 
533
    {
 
534
        Index -= 100;
 
535
        event.SetId( ID_MAINFRAME_COPYTODEVICE_TRACKS );
 
536
    }
 
537
    else
 
538
    {
 
539
        event.SetId( ID_MAINFRAME_COPYTO );
 
540
    }
 
541
    event.SetInt( Index );
532
542
    event.SetClientData( ( void * ) Tracks );
533
543
    wxPostEvent( m_MainFrame, event );
534
544
}
859
869
    guTrackArray * Tracks = new guTrackArray();
860
870
    m_PodcastsListBox->GetSelectedSongs( Tracks );
861
871
 
862
 
    event.SetId( ID_MAINFRAME_COPYTO );
 
872
 
 
873
    int Index = event.GetId() - ID_PODCASTS_ITEM_COPYTO;
 
874
    if( Index > 99 )
 
875
    {
 
876
        Index -= 100;
 
877
        event.SetId( ID_MAINFRAME_COPYTODEVICE_TRACKS );
 
878
    }
 
879
    else
 
880
    {
 
881
        event.SetId( ID_MAINFRAME_COPYTO );
 
882
    }
 
883
    event.SetInt( Index );
863
884
    event.SetClientData( ( void * ) Tracks );
864
885
    wxPostEvent( wxTheApp->GetTopWindow(), event );
865
886
}
1021
1042
        }
1022
1043
 
1023
1044
        Menu->AppendSeparator();
1024
 
        MenuItem = new wxMenuItem( Menu, ID_PODCASTS_CHANNEL_COPYTO, _( "Copy to..." ), _( "Copy the current selected podcasts to a directory or device" ) );
1025
 
        MenuItem->SetBitmap( guImage( guIMAGE_INDEX_edit_copy ) );
1026
 
        Menu->Append( MenuItem );
 
1045
//        MenuItem = new wxMenuItem( Menu, ID_PODCASTS_CHANNEL_COPYTO, _( "Copy to..." ), _( "Copy the current selected podcasts to a directory or device" ) );
 
1046
//        MenuItem->SetBitmap( guImage( guIMAGE_INDEX_edit_copy ) );
 
1047
//        Menu->Append( MenuItem );
 
1048
        guMainFrame * MainFrame = ( guMainFrame * ) wxTheApp->GetTopWindow();
 
1049
        MainFrame->CreateCopyToMenu( Menu, ID_PODCASTS_CHANNEL_COPYTO );
1027
1050
    }
1028
1051
}
1029
1052
 
1284
1307
        Menu->Append( MenuItem );
1285
1308
 
1286
1309
        Menu->AppendSeparator();
1287
 
        MenuItem = new wxMenuItem( Menu, ID_PODCASTS_ITEM_COPYTO, _( "Copy to..." ), _( "Copy the current selected podcasts to a directory or device" ) );
1288
 
        MenuItem->SetBitmap( guImage( guIMAGE_INDEX_edit_copy ) );
1289
 
        Menu->Append( MenuItem );
 
1310
//        MenuItem = new wxMenuItem( Menu, ID_PODCASTS_ITEM_COPYTO, _( "Copy to..." ), _( "Copy the current selected podcasts to a directory or device" ) );
 
1311
//        MenuItem->SetBitmap( guImage( guIMAGE_INDEX_edit_copy ) );
 
1312
//        Menu->Append( MenuItem );
 
1313
        guMainFrame * MainFrame = ( guMainFrame * ) wxTheApp->GetTopWindow();
 
1314
        MainFrame->CreateCopyToMenu( Menu, ID_PODCASTS_ITEM_COPYTO );
1290
1315
    }
1291
1316
    else
1292
1317
    {