@@ -69,10 +69,17 @@ pub enum Move {
6969 Forwards ( String ) ,
7070}
7171
72+ #[ derive( Debug , Clone ) ]
73+ pub enum Editable < T > {
74+ Create ( T ) ,
75+ Delete ( T ) ,
76+ Update { old : T , new : T } ,
77+ }
78+
7279/// The message type that iced uses for actions that can do something
7380#[ derive( Debug , Clone ) ]
7481pub enum Message {
75- WriteConfig ,
82+ WriteConfig ( bool ) ,
7683 UpdateAvailable ,
7784 ResizeWindow ( Id , f32 ) ,
7885 OpenWindow ,
@@ -85,6 +92,7 @@ pub enum Message {
8592 RunFunction ( Function ) ,
8693 OpenFocused ,
8794 SetConfig ( SetConfigFields ) ,
95+ OpenFileDialogue ( String ) ,
8896 ReturnFocus ,
8997 EscKeyPressed ( Id ) ,
9098 ClearSearchResults ,
@@ -93,9 +101,11 @@ pub enum Message {
93101 HideTrayIcon ,
94102 SwitchMode ( String ) ,
95103 ReloadConfig ,
104+ UpdateApps ,
96105 SetSender ( ExtSender ) ,
97106 SwitchToPage ( Page ) ,
98- ClipboardHistory ( ClipBoardContentType ) ,
107+ EditClipboardHistory ( Editable < ClipBoardContentType > ) ,
108+ ClearClipboardHistory ,
99109 ChangeFocus ( ArrowKey , u32 ) ,
100110 FileSearchResult ( Vec < App > ) ,
101111 FileSearchClear ,
@@ -104,6 +114,7 @@ pub enum Message {
104114}
105115
106116#[ derive( Debug , Clone ) ]
117+ #[ allow( unused) ]
107118pub enum SetConfigFields {
108119 ToDefault ,
109120 ToggleHotkey ( String ) ,
@@ -112,16 +123,17 @@ pub enum SetConfigFields {
112123 SearchUrl ( String ) ,
113124 HapticFeedback ( bool ) ,
114125 ShowMenubarIcon ( bool ) ,
115- // Modes(HashMap< String, String>),
116- // Aliases(HashMap< String, String>),
117- // SearchDirs(Vec<String>),
126+ Modes ( Editable < ( String , String ) > ) ,
127+ Aliases ( Editable < ( String , String ) > ) ,
128+ SearchDirs ( Editable < Vec < String > > ) ,
118129 DebounceDelay ( u64 ) ,
119130 SetThemeFields ( SetConfigThemeFields ) ,
120131 SetBufferFields ( SetConfigBufferFields ) ,
121132}
122133
123134#[ derive( Debug , Clone ) ]
124135pub enum SetConfigThemeFields {
136+ ShowScrollBar ( bool ) ,
125137 TextColor ( f32 , f32 , f32 ) ,
126138 BackgroundColor ( f32 , f32 , f32 ) ,
127139 ShowIcons ( bool ) ,
0 commit comments