Commit 3ece9041 authored by Olivier Teulière's avatar Olivier Teulière

* all: Unified behaviours using "action list" objects

parent fd94f31b
...@@ -277,7 +277,7 @@ object AboutDlg: TAboutDlg ...@@ -277,7 +277,7 @@ object AboutDlg: TAboutDlg
WordWrap = True WordWrap = True
end end
object Label3: TLabel object Label3: TLabel
Left = 38 Left = 30
Top = 80 Top = 80
Width = 227 Width = 227
Height = 13 Height = 13
...@@ -290,7 +290,7 @@ object AboutDlg: TAboutDlg ...@@ -290,7 +290,7 @@ object AboutDlg: TAboutDlg
Height = 49 Height = 49
end end
object Label5: TLabel object Label5: TLabel
Left = 82 Left = 83
Top = 96 Top = 96
Width = 121 Width = 121
Height = 13 Height = 13
......
...@@ -64,7 +64,7 @@ bool ControlPlay( TObject *Sender ) ...@@ -64,7 +64,7 @@ bool ControlPlay( TObject *Sender )
vlc_object_find( p_intfGlobal, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ); vlc_object_find( p_intfGlobal, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if( p_playlist == NULL ) if( p_playlist == NULL )
{ {
p_intfGlobal->p_sys->p_window->MenuOpenFileClick( Sender ); p_intfGlobal->p_sys->p_window->OpenFileActionExecute( Sender );
return false; return false;
} }
...@@ -79,7 +79,7 @@ bool ControlPlay( TObject *Sender ) ...@@ -79,7 +79,7 @@ bool ControlPlay( TObject *Sender )
{ {
vlc_mutex_unlock( &p_playlist->object_lock ); vlc_mutex_unlock( &p_playlist->object_lock );
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
p_intfGlobal->p_sys->p_window->MenuOpenFileClick( Sender ); p_intfGlobal->p_sys->p_window->OpenFileActionExecute( Sender );
} }
return true; return true;
......
...@@ -46,14 +46,12 @@ __fastcall TDiscDlg::TDiscDlg( TComponent* Owner ) ...@@ -46,14 +46,12 @@ __fastcall TDiscDlg::TDiscDlg( TComponent* Owner )
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TDiscDlg::FormShow( TObject *Sender ) void __fastcall TDiscDlg::FormShow( TObject *Sender )
{ {
p_intfGlobal->p_sys->p_window->MenuOpenDisc->Checked = true; p_intfGlobal->p_sys->p_window->OpenDiscAction->Checked = true;
p_intfGlobal->p_sys->p_window->PopupOpenDisc->Checked = true;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TDiscDlg::FormHide( TObject *Sender ) void __fastcall TDiscDlg::FormHide( TObject *Sender )
{ {
p_intfGlobal->p_sys->p_window->MenuOpenDisc->Checked = false; p_intfGlobal->p_sys->p_window->OpenDiscAction->Checked = false;
p_intfGlobal->p_sys->p_window->PopupOpenDisc->Checked = false;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TDiscDlg::BitBtnCancelClick( TObject *Sender ) void __fastcall TDiscDlg::BitBtnCancelClick( TObject *Sender )
......
This diff is collapsed.
This diff is collapsed.
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <AppEvnts.hpp> #include <AppEvnts.hpp>
#include <ExtCtrls.hpp> #include <ExtCtrls.hpp>
#include "CSPIN.h" #include "CSPIN.h"
#include <ActnList.hpp>
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
class TMainFrameDlg : public TForm class TMainFrameDlg : public TForm
{ {
...@@ -72,7 +73,6 @@ __published: // IDE-managed Components ...@@ -72,7 +73,6 @@ __published: // IDE-managed Components
TMenuItem *MenuAngle; TMenuItem *MenuAngle;
TMenuItem *N3; TMenuItem *N3;
TMenuItem *MenuPlaylist; TMenuItem *MenuPlaylist;
TMenuItem *MenuModules;
TMenuItem *MenuMessages; TMenuItem *MenuMessages;
TMenuItem *MenuSettings; TMenuItem *MenuSettings;
TMenuItem *MenuAudio; TMenuItem *MenuAudio;
...@@ -90,10 +90,8 @@ __published: // IDE-managed Components ...@@ -90,10 +90,8 @@ __published: // IDE-managed Components
TMenuItem *PopupBack; TMenuItem *PopupBack;
TMenuItem *PopupSlow; TMenuItem *PopupSlow;
TMenuItem *PopupFast; TMenuItem *PopupFast;
TMenuItem *N5;
TMenuItem *PopupToggleInterface; TMenuItem *PopupToggleInterface;
TMenuItem *PopupFullscreen; TMenuItem *PopupFullscreen;
TMenuItem *N6;
TMenuItem *PopupNext; TMenuItem *PopupNext;
TMenuItem *PopupPrev; TMenuItem *PopupPrev;
TMenuItem *PopupJump; TMenuItem *PopupJump;
...@@ -136,55 +134,63 @@ __published: // IDE-managed Components ...@@ -136,55 +134,63 @@ __published: // IDE-managed Components
TMenuItem *N9; TMenuItem *N9;
TCSpinEdit *SpinEditChannel; TCSpinEdit *SpinEditChannel;
TToolButton *ToolButton1; TToolButton *ToolButton1;
TActionList *ActionList1;
TAction *OpenFileAction;
TAction *OpenDiscAction;
TAction *NetworkStreamAction;
TAction *PlayAction;
TAction *PauseAction;
TAction *StopAction;
TAction *EjectAction;
TAction *SlowAction;
TAction *FastAction;
TAction *PreviousAction;
TAction *NextAction;
TAction *BackAction;
TAction *PlaylistAction;
TAction *ExitAction;
TAction *FullscreenAction;
TAction *PreferencesAction;
TAction *MessagesAction;
TAction *AboutAction;
TMenuItem *Control1;
TMenuItem *N5;
TMenuItem *N6;
TMenuItem *N10;
TAction *PrevTitleAction;
TAction *NextTitleAction;
TAction *PrevChapterAction;
TAction *NextChapterAction;
void __fastcall TimerManageTimer( TObject *Sender ); void __fastcall TimerManageTimer( TObject *Sender );
void __fastcall TrackBarChange( TObject *Sender ); void __fastcall TrackBarChange( TObject *Sender );
void __fastcall FormClose( TObject *Sender, TCloseAction &Action ); void __fastcall FormClose( TObject *Sender, TCloseAction &Action );
void __fastcall MenuOpenFileClick( TObject *Sender );
void __fastcall MenuOpenDiscClick( TObject *Sender );
void __fastcall MenuNetworkStreamClick( TObject *Sender );
void __fastcall MenuExitClick( TObject *Sender );
void __fastcall MenuHideinterfaceClick( TObject *Sender ); void __fastcall MenuHideinterfaceClick( TObject *Sender );
void __fastcall MenuFullscreenClick( TObject *Sender );
void __fastcall MenuPlaylistClick( TObject *Sender );
void __fastcall MenuMessagesClick( TObject *Sender );
void __fastcall MenuPreferencesClick( TObject *Sender );
void __fastcall MenuAboutClick( TObject *Sender );
void __fastcall ToolButtonFileClick( TObject *Sender );
void __fastcall ToolButtonDiscClick( TObject *Sender );
void __fastcall ToolButtonNetClick( TObject *Sender );
void __fastcall ToolButtonPlaylistClick( TObject *Sender );
void __fastcall ToolButtonBackClick( TObject *Sender );
void __fastcall ToolButtonStopClick( TObject *Sender );
void __fastcall ToolButtonPlayClick( TObject *Sender );
void __fastcall ToolButtonPauseClick( TObject *Sender );
void __fastcall ToolButtonSlowClick( TObject *Sender );
void __fastcall ToolButtonFastClick( TObject *Sender );
void __fastcall ToolButtonPrevClick( TObject *Sender );
void __fastcall ToolButtonNextClick( TObject *Sender );
void __fastcall ToolButtonEjectClick( TObject *Sender );
void __fastcall PopupCloseClick( TObject *Sender ); void __fastcall PopupCloseClick( TObject *Sender );
void __fastcall PopupPlayClick( TObject *Sender );
void __fastcall PopupPauseClick( TObject *Sender );
void __fastcall PopupStopClick( TObject *Sender );
void __fastcall PopupBackClick( TObject *Sender );
void __fastcall PopupSlowClick( TObject *Sender );
void __fastcall PopupFastClick( TObject *Sender );
void __fastcall PopupToggleInterfaceClick( TObject *Sender ); void __fastcall PopupToggleInterfaceClick( TObject *Sender );
void __fastcall PopupFullscreenClick( TObject *Sender );
void __fastcall PopupNextClick( TObject *Sender );
void __fastcall PopupPrevClick( TObject *Sender );
void __fastcall PopupJumpClick( TObject *Sender ); void __fastcall PopupJumpClick( TObject *Sender );
void __fastcall PopupPlaylistClick( TObject *Sender );
void __fastcall PopupPreferencesClick( TObject *Sender );
void __fastcall PopupExitClick( TObject *Sender );
void __fastcall PopupOpenFileClick( TObject *Sender );
void __fastcall PopupOpenDiscClick( TObject *Sender );
void __fastcall PopupNetworkStreamClick( TObject *Sender );
void __fastcall ButtonTitlePrevClick( TObject *Sender );
void __fastcall ButtonTitleNextClick( TObject *Sender );
void __fastcall ButtonChapterPrevClick( TObject *Sender );
void __fastcall ButtonChapterNextClick( TObject *Sender );
void __fastcall ButtonGoClick( TObject *Sender ); void __fastcall ButtonGoClick( TObject *Sender );
void __fastcall OpenFileActionExecute( TObject *Sender );
void __fastcall OpenDiscActionExecute( TObject *Sender );
void __fastcall NetworkStreamActionExecute( TObject *Sender );
void __fastcall BackActionExecute( TObject *Sender );
void __fastcall PlayActionExecute( TObject *Sender );
void __fastcall PauseActionExecute( TObject *Sender );
void __fastcall StopActionExecute( TObject *Sender );
void __fastcall SlowActionExecute( TObject *Sender );
void __fastcall FastActionExecute( TObject *Sender );
void __fastcall PlaylistActionExecute( TObject *Sender );
void __fastcall ExitActionExecute( TObject *Sender );
void __fastcall PreviousActionExecute( TObject *Sender );
void __fastcall NextActionExecute( TObject *Sender );
void __fastcall FullscreenActionExecute( TObject *Sender );
void __fastcall PreferencesActionExecute( TObject *Sender );
void __fastcall MessagesActionExecute( TObject *Sender );
void __fastcall AboutActionExecute( TObject *Sender );
void __fastcall EjectActionExecute( TObject *Sender );
void __fastcall PrevTitleActionExecute( TObject *Sender );
void __fastcall NextTitleActionExecute( TObject *Sender );
void __fastcall PrevChapterActionExecute( TObject *Sender );
void __fastcall NextChapterActionExecute( TObject *Sender );
private: // User declarations private: // User declarations
public: // User declarations public: // User declarations
TStringList *StringListPref; /* stores config dialogs */ TStringList *StringListPref; /* stores config dialogs */
......
...@@ -49,12 +49,12 @@ void __fastcall TMessagesDlg::ButtonOKClick( TObject *Sender ) ...@@ -49,12 +49,12 @@ void __fastcall TMessagesDlg::ButtonOKClick( TObject *Sender )
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TMessagesDlg::FormHide( TObject *Sender ) void __fastcall TMessagesDlg::FormHide( TObject *Sender )
{ {
p_intfGlobal->p_sys->p_window->MenuMessages->Checked = false; p_intfGlobal->p_sys->p_window->MessagesAction->Checked = false;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TMessagesDlg::FormShow( TObject *Sender ) void __fastcall TMessagesDlg::FormShow( TObject *Sender )
{ {
p_intfGlobal->p_sys->p_window->MenuMessages->Checked = true; p_intfGlobal->p_sys->p_window->MessagesAction->Checked = true;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TMessagesDlg::UpdateLog() void __fastcall TMessagesDlg::UpdateLog()
...@@ -80,10 +80,10 @@ void __fastcall TMessagesDlg::UpdateLog() ...@@ -80,10 +80,10 @@ void __fastcall TMessagesDlg::UpdateLog()
RichEditMessages->SelAttributes->Color = clRed; RichEditMessages->SelAttributes->Color = clRed;
break; break;
case VLC_MSG_WARN: case VLC_MSG_WARN:
RichEditMessages->SelAttributes->Color = clBlack; RichEditMessages->SelAttributes->Color = clBlue;
break; break;
default: default:
RichEditMessages->SelAttributes->Color = clBlue; RichEditMessages->SelAttributes->Color = clBlack;
break; break;
} }
......
...@@ -69,14 +69,12 @@ __fastcall TNetworkDlg::TNetworkDlg( TComponent* Owner ) ...@@ -69,14 +69,12 @@ __fastcall TNetworkDlg::TNetworkDlg( TComponent* Owner )
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TNetworkDlg::FormShow( TObject *Sender ) void __fastcall TNetworkDlg::FormShow( TObject *Sender )
{ {
p_intfGlobal->p_sys->p_window->MenuNetworkStream->Checked = true; p_intfGlobal->p_sys->p_window->NetworkStreamAction->Checked = true;
p_intfGlobal->p_sys->p_window->PopupNetworkStream->Checked = true;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TNetworkDlg::FormHide( TObject *Sender ) void __fastcall TNetworkDlg::FormHide( TObject *Sender )
{ {
p_intfGlobal->p_sys->p_window->MenuNetworkStream->Checked = false; p_intfGlobal->p_sys->p_window->NetworkStreamAction->Checked = false;
p_intfGlobal->p_sys->p_window->PopupNetworkStream->Checked = false;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TNetworkDlg::BitBtnCancelClick( TObject *Sender ) void __fastcall TNetworkDlg::BitBtnCancelClick( TObject *Sender )
......
...@@ -68,16 +68,12 @@ char * __fastcall TPlaylistDlg::rindex( char *s, char c ) ...@@ -68,16 +68,12 @@ char * __fastcall TPlaylistDlg::rindex( char *s, char c )
****************************************************************************/ ****************************************************************************/
void __fastcall TPlaylistDlg::FormShow( TObject *Sender ) void __fastcall TPlaylistDlg::FormShow( TObject *Sender )
{ {
p_intfGlobal->p_sys->p_window->MenuPlaylist->Checked = true; p_intfGlobal->p_sys->p_window->PlaylistAction->Checked = true;
p_intfGlobal->p_sys->p_window->PopupPlaylist->Checked = true;
p_intfGlobal->p_sys->p_window->ToolButtonPlaylist->Down = true;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TPlaylistDlg::FormHide( TObject *Sender ) void __fastcall TPlaylistDlg::FormHide( TObject *Sender )
{ {
p_intfGlobal->p_sys->p_window->MenuPlaylist->Checked = false; p_intfGlobal->p_sys->p_window->PlaylistAction->Checked = false;
p_intfGlobal->p_sys->p_window->PopupPlaylist->Checked = false;
p_intfGlobal->p_sys->p_window->ToolButtonPlaylist->Down = false;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TPlaylistDlg::BitBtnOkClick( TObject *Sender ) void __fastcall TPlaylistDlg::BitBtnOkClick( TObject *Sender )
...@@ -85,7 +81,7 @@ void __fastcall TPlaylistDlg::BitBtnOkClick( TObject *Sender ) ...@@ -85,7 +81,7 @@ void __fastcall TPlaylistDlg::BitBtnOkClick( TObject *Sender )
Hide(); Hide();
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TPlaylistDlg::ListViewPlaylistDblClick( TObject *Sender ) void __fastcall TPlaylistDlg::PlayStreamActionExecute( TObject *Sender )
{ {
TListItem *Item; TListItem *Item;
TListItem *ItemStart; TListItem *ItemStart;
...@@ -125,13 +121,13 @@ void __fastcall TPlaylistDlg::ListViewPlaylistKeyDown( TObject *Sender, ...@@ -125,13 +121,13 @@ void __fastcall TPlaylistDlg::ListViewPlaylistKeyDown( TObject *Sender,
/* 'suppr' or 'backspace' */ /* 'suppr' or 'backspace' */
if( ( Key == VK_DELETE ) || ( Key == VK_BACK ) ) if( ( Key == VK_DELETE ) || ( Key == VK_BACK ) )
{ {
MenuDeleteSelectedClick( Sender ); DeleteSelectionActionExecute( Sender );
} }
/* 'enter' */ /* 'enter' */
if( Key == VK_RETURN ) if( Key == VK_RETURN )
{ {
PopupPlayClick( Sender ); PlayStreamActionExecute( Sender );
} }
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -157,21 +153,21 @@ void __fastcall TPlaylistDlg::ListViewPlaylistCustomDrawItem( ...@@ -157,21 +153,21 @@ void __fastcall TPlaylistDlg::ListViewPlaylistCustomDrawItem(
/***************************************************************************** /*****************************************************************************
* Menu callbacks * Menu and popup callbacks
****************************************************************************/ ****************************************************************************/
void __fastcall TPlaylistDlg::MenuAddFileClick( TObject *Sender ) void __fastcall TPlaylistDlg::MenuAddFileClick( TObject *Sender )
{ {
p_intfGlobal->p_sys->p_window->MenuOpenFileClick( Sender ); p_intfGlobal->p_sys->p_window->OpenFileActionExecute( Sender );
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TPlaylistDlg::MenuAddDiscClick( TObject *Sender ) void __fastcall TPlaylistDlg::MenuAddDiscClick( TObject *Sender )
{ {
p_intfGlobal->p_sys->p_window->MenuOpenDiscClick( Sender ); p_intfGlobal->p_sys->p_window->OpenDiscActionExecute( Sender );
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TPlaylistDlg::MenuAddNetClick( TObject *Sender ) void __fastcall TPlaylistDlg::MenuAddNetClick( TObject *Sender )
{ {
p_intfGlobal->p_sys->p_window->MenuNetworkStreamClick( Sender ); p_intfGlobal->p_sys->p_window->NetworkStreamActionExecute( Sender );
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TPlaylistDlg::MenuAddUrlClick( TObject *Sender ) void __fastcall TPlaylistDlg::MenuAddUrlClick( TObject *Sender )
...@@ -179,7 +175,7 @@ void __fastcall TPlaylistDlg::MenuAddUrlClick( TObject *Sender ) ...@@ -179,7 +175,7 @@ void __fastcall TPlaylistDlg::MenuAddUrlClick( TObject *Sender )
/* TODO */ /* TODO */
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TPlaylistDlg::MenuDeleteSelectedClick( TObject *Sender ) void __fastcall TPlaylistDlg::DeleteSelectionActionExecute( TObject *Sender )
{ {
#if 0 /* PLAYLIST TARASS */ #if 0 /* PLAYLIST TARASS */
/* user wants to delete a file in the queue */ /* user wants to delete a file in the queue */
...@@ -205,7 +201,7 @@ void __fastcall TPlaylistDlg::MenuDeleteSelectedClick( TObject *Sender ) ...@@ -205,7 +201,7 @@ void __fastcall TPlaylistDlg::MenuDeleteSelectedClick( TObject *Sender )
#endif #endif
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TPlaylistDlg::MenuDeleteAllClick( TObject *Sender ) void __fastcall TPlaylistDlg::DeleteAllActionExecute( TObject *Sender )
{ {
#if 0 /* PLAYLIST TARASS */ #if 0 /* PLAYLIST TARASS */
int i_pos; int i_pos;
...@@ -227,7 +223,7 @@ void __fastcall TPlaylistDlg::MenuDeleteAllClick( TObject *Sender ) ...@@ -227,7 +223,7 @@ void __fastcall TPlaylistDlg::MenuDeleteAllClick( TObject *Sender )
#endif #endif
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TPlaylistDlg::MenuSelectionInvertClick( TObject *Sender ) void __fastcall TPlaylistDlg::InvertSelectionActionExecute( TObject *Sender )
{ {
#if 0 /* PLAYLIST TARASS */ #if 0 /* PLAYLIST TARASS */
#define NOT( var ) ( (var) ? false : true ) #define NOT( var ) ( (var) ? false : true )
...@@ -244,40 +240,10 @@ void __fastcall TPlaylistDlg::MenuSelectionInvertClick( TObject *Sender ) ...@@ -244,40 +240,10 @@ void __fastcall TPlaylistDlg::MenuSelectionInvertClick( TObject *Sender )
#endif #endif
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TPlaylistDlg::MenuSelectionCropClick( TObject *Sender ) void __fastcall TPlaylistDlg::CropSelectionActionExecute( TObject *Sender )
{ {
MenuSelectionInvertClick( Sender ); InvertSelectionActionExecute( Sender );
MenuDeleteSelectedClick( Sender ); DeleteSelectionActionExecute( Sender );
}
//---------------------------------------------------------------------------
/*****************************************************************************
* Popup callbacks
****************************************************************************/
void __fastcall TPlaylistDlg::PopupPlayClick( TObject *Sender )
{
ListViewPlaylistDblClick( Sender );
}
//---------------------------------------------------------------------------
void __fastcall TPlaylistDlg::PopupInvertSelectionClick( TObject *Sender )
{
MenuSelectionInvertClick( Sender );
}
//---------------------------------------------------------------------------
void __fastcall TPlaylistDlg::PopupCropSelectionClick( TObject *Sender )
{
MenuSelectionCropClick( Sender );
}
//---------------------------------------------------------------------------
void __fastcall TPlaylistDlg::PopupDeleteSelectedClick( TObject *Sender )
{
MenuDeleteSelectedClick( Sender );
}
//---------------------------------------------------------------------------
void __fastcall TPlaylistDlg::PopupDeleteAllClick( TObject *Sender )
{
MenuDeleteAllClick( Sender );
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
......
object PlaylistDlg: TPlaylistDlg object PlaylistDlg: TPlaylistDlg
Left = 447 Left = 162
Top = 197 Top = 364
Width = 335 Width = 335
Height = 436 Height = 436
Caption = 'Playlist' Caption = 'Playlist'
...@@ -51,11 +51,11 @@ object PlaylistDlg: TPlaylistDlg ...@@ -51,11 +51,11 @@ object PlaylistDlg: TPlaylistDlg
TabOrder = 1 TabOrder = 1
ViewStyle = vsReport ViewStyle = vsReport
OnCustomDrawItem = ListViewPlaylistCustomDrawItem OnCustomDrawItem = ListViewPlaylistCustomDrawItem
OnDblClick = ListViewPlaylistDblClick OnDblClick = PlayStreamActionExecute
OnKeyDown = ListViewPlaylistKeyDown OnKeyDown = ListViewPlaylistKeyDown
end end
object MainMenuPlaylist: TMainMenu object MainMenuPlaylist: TMainMenu
Left = 24 Left = 8
Top = 352 Top = 352
object MenuAdd: TMenuItem object MenuAdd: TMenuItem
Caption = '&Add' Caption = '&Add'
...@@ -80,54 +80,79 @@ object PlaylistDlg: TPlaylistDlg ...@@ -80,54 +80,79 @@ object PlaylistDlg: TPlaylistDlg
object MenuDelete: TMenuItem object MenuDelete: TMenuItem
Caption = '&Delete' Caption = '&Delete'
object MenuDeleteAll: TMenuItem object MenuDeleteAll: TMenuItem
Caption = '&All' Action = DeleteAllAction
OnClick = MenuDeleteAllClick
end end
object MenuDeleteSelected: TMenuItem object MenuDeleteSelected: TMenuItem
Caption = '&Selected' Action = DeleteSelectionAction
OnClick = MenuDeleteSelectedClick Caption = '&Selection'
end end
end end
object MenuSelection: TMenuItem object MenuSelection: TMenuItem
Caption = '&Selection' Caption = '&Selection'
object MenuSelectionCrop: TMenuItem object MenuSelectionCrop: TMenuItem
Caption = '&Crop' Action = CropSelectionAction
OnClick = MenuSelectionCropClick
end end
object MenuSelectionInvert: TMenuItem object MenuSelectionInvert: TMenuItem
Caption = '&Invert' Action = InvertSelectionAction
OnClick = MenuSelectionInvertClick
end end
end end
end end
object PopupMenuPlaylist: TPopupMenu object PopupMenuPlaylist: TPopupMenu
Left = 272 Left = 40
Top = 352 Top = 352
object PopupPlay: TMenuItem object PopupPlay: TMenuItem
Caption = '&Play' Action = PlayStreamAction
OnClick = PopupPlayClick
end end
object N1: TMenuItem object N1: TMenuItem
Caption = '-' Caption = '-'
end end
object PopupInvertSelection: TMenuItem object PopupInvertSelection: TMenuItem
Action = InvertSelectionAction
Caption = '&Invert selection' Caption = '&Invert selection'
OnClick = PopupInvertSelectionClick
end end
object PopupCropSelection: TMenuItem object PopupCropSelection: TMenuItem
Action = CropSelectionAction
Caption = '&Crop selection' Caption = '&Crop selection'
OnClick = PopupCropSelectionClick
end end
object N2: TMenuItem object N2: TMenuItem
Caption = '-' Caption = '-'
end end
object PopupDeleteSelected: TMenuItem object PopupDeleteSelected: TMenuItem
Caption = '&Delete selected' Action = DeleteSelectionAction
OnClick = PopupDeleteSelectedClick Caption = '&Delete selection'
end end
object PopupDeleteAll: TMenuItem object PopupDeleteAll: TMenuItem
Action = DeleteAllAction
Caption = 'Delete &all' Caption = 'Delete &all'
OnClick = PopupDeleteAllClick end
end
object ActionList1: TActionList
Left = 264
Top = 352
object InvertSelectionAction: TAction
Caption = 'Invert'
Hint = 'Invert selection'
OnExecute = InvertSelectionActionExecute
end
object CropSelectionAction: TAction
Caption = 'Crop'
Hint = 'Crop selection'
OnExecute = CropSelectionActionExecute
end
object DeleteSelectionAction: TAction
Caption = 'Delete'
Hint = 'Delete selection'
OnExecute = DeleteSelectionActionExecute
end
object DeleteAllAction: TAction
Caption = 'All'
Hint = 'Delete all items'
OnExecute = DeleteAllActionExecute
end
object PlayStreamAction: TAction
Caption = 'Play'
Hint = 'Play the selected stream'
OnExecute = PlayStreamActionExecute
end end
end end
end end
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <Menus.hpp> #include <Menus.hpp>
#include <Grids.hpp> #include <Grids.hpp>
#include <ComCtrls.hpp> #include <ComCtrls.hpp>
#include <ActnList.hpp>
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
class TPlaylistDlg : public TForm class TPlaylistDlg : public TForm
...@@ -58,10 +59,15 @@ __published: // IDE-managed Components ...@@ -58,10 +59,15 @@ __published: // IDE-managed Components
TMenuItem *N2; TMenuItem *N2;
TMenuItem *PopupInvertSelection; TMenuItem *PopupInvertSelection;
TMenuItem *PopupCropSelection; TMenuItem *PopupCropSelection;
TActionList *ActionList1;
TAction *InvertSelectionAction;
TAction *CropSelectionAction;
TAction *DeleteSelectionAction;
TAction *DeleteAllAction;
TAction *PlayStreamAction;
void __fastcall FormShow( TObject *Sender ); void __fastcall FormShow( TObject *Sender );
void __fastcall FormHide( TObject *Sender ); void __fastcall FormHide( TObject *Sender );
void __fastcall BitBtnOkClick( TObject *Sender ); void __fastcall BitBtnOkClick( TObject *Sender );
void __fastcall ListViewPlaylistDblClick( TObject *Sender );
void __fastcall ListViewPlaylistKeyDown( TObject *Sender, WORD &Key, void __fastcall ListViewPlaylistKeyDown( TObject *Sender, WORD &Key,
TShiftState Shift ); TShiftState Shift );
void __fastcall ListViewPlaylistCustomDrawItem( TCustomListView *Sender, void __fastcall ListViewPlaylistCustomDrawItem( TCustomListView *Sender,
...@@ -70,15 +76,11 @@ __published: // IDE-managed Components ...@@ -70,15 +76,11 @@ __published: // IDE-managed Components
void __fastcall MenuAddDiscClick( TObject *Sender ); void __fastcall MenuAddDiscClick( TObject *Sender );
void __fastcall MenuAddNetClick( TObject *Sender ); void __fastcall MenuAddNetClick( TObject *Sender );
void __fastcall MenuAddUrlClick( TObject *Sender ); void __fastcall MenuAddUrlClick( TObject *Sender );
void __fastcall MenuDeleteSelectedClick( TObject *Sender ); void __fastcall InvertSelectionActionExecute( TObject *Sender );
void __fastcall MenuDeleteAllClick( TObject *Sender ); void __fastcall CropSelectionActionExecute( TObject *Sender );
void __fastcall MenuSelectionInvertClick( TObject *Sender ); void __fastcall DeleteSelectionActionExecute( TObject *Sender );
void __fastcall MenuSelectionCropClick( TObject *Sender ); void __fastcall DeleteAllActionExecute( TObject *Sender );
void __fastcall PopupPlayClick( TObject *Sender ); void __fastcall PlayStreamActionExecute( TObject *Sender );
void __fastcall PopupInvertSelectionClick( TObject *Sender );
void __fastcall PopupCropSelectionClick( TObject *Sender );
void __fastcall PopupDeleteSelectedClick( TObject *Sender );
void __fastcall PopupDeleteAllClick( TObject *Sender );
private: // User declarations private: // User declarations
char * __fastcall rindex( char *s, char c ); char * __fastcall rindex( char *s, char c );
public: // User declarations public: // User declarations
......
...@@ -334,16 +334,14 @@ void __fastcall TPreferencesDlg::FormClose( TObject *Sender, ...@@ -334,16 +334,14 @@ void __fastcall TPreferencesDlg::FormClose( TObject *Sender,
void __fastcall TPreferencesDlg::FormShow( TObject *Sender ) void __fastcall TPreferencesDlg::FormShow( TObject *Sender )
{ {
/* /*
p_intfGlobal->p_sys->p_window->MenuPreferences->Checked = true; p_intfGlobal->p_sys->p_window->PreferencesAction->Checked = true;
p_intfGlobal->p_sys->p_window->PopupPreferences->Checked = true;
*/ */
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TPreferencesDlg::FormHide( TObject *Sender ) void __fastcall TPreferencesDlg::FormHide( TObject *Sender )
{ {
/* /*
p_intfGlobal->p_sys->p_window->MenuPreferences->Checked = false; p_intfGlobal->p_sys->p_window->PreferencesAction->Checked = false;
p_intfGlobal->p_sys->p_window->PopupPreferences->Checked = false;
*/ */
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment