@@ -373,6 +373,7 @@ public override void Dispose()
373373
374374 protected override void ProcessArg ( object ? val , IEnumerator e )
375375 {
376+
376377 if ( val is string s && s == Resources . Arg_Input ) {
377378 e . MoveNext ( ) ;
378379 var s2 = e . Current ? . ToString ( ) ;
@@ -385,15 +386,15 @@ protected override void ProcessArg(object? val, IEnumerator e)
385386
386387 #endregion
387388
389+ //note: ideally some of these computations aren't necessary and can be stored as respective fields but this is to ensure program correctness
390+
388391 private bool IsQueryReady ( )
389392 {
390- //note: ideally this computation isn't necessary and can be stored as a bool field but this is to ensure program correctness
391393 return Query != SearchQuery . Null && Url . IsValid ( Query . Upload ) ;
392394 }
393395
394396 private bool IsInputValidIndicator ( )
395397 {
396- //note: ideally this computation isn't necessary and can be stored as a bool field but this is to ensure program correctness
397398 return SearchQuery . IsIndicatorValid ( Tf_Input . Text . ToString ( ) ) ;
398399 }
399400
@@ -402,12 +403,6 @@ private void ApplyConfig()
402403 Integration . KeepOnTop ( Config . OnTop ) ;
403404 }
404405
405- public void SetInfoText ( string s )
406- {
407- Lbl_InputInfo2 . Text = $ "{ s } ";
408- Lbl_InputInfo2 . SetNeedsDisplay ( ) ;
409- }
410-
411406 internal void SetInputText ( ustring s )
412407 {
413408 Tf_Input . Text = s ;
@@ -476,7 +471,8 @@ private bool ClipboardCallback(MainLoop c)
476471 */
477472 if ( Integration . ReadClipboard ( out var str ) && ! IsInputValidIndicator ( ) && ! m_clipboard . Contains ( str ) ) {
478473 SetInputText ( str ) ;
479- Lbl_InputOk . Text = Values . Clp ;
474+ // Lbl_InputOk.Text = Values.Clp;
475+ Lbl_InputInfo . Text = $ "Clipboard data";
480476
481477 m_clipboard . Add ( str ) ;
482478 }
@@ -499,6 +495,10 @@ private bool ClipboardCallback(MainLoop c)
499495 private void OnClear ( )
500496 {
501497 Tf_Input . DeleteAll ( ) ;
498+ Lbl_InputOk . Text = Values . NA ;
499+ Lbl_InputOk . SetNeedsDisplay ( ) ;
500+ Lbl_InputInfo . Text = ustring . Empty ;
501+ Lbl_InputInfo2 . Text = ustring . Empty ;
502502 }
503503
504504 private void OnConfigDialog ( )
@@ -630,32 +630,39 @@ void ReloadDialog()
630630
631631 private void ClearControls ( )
632632 {
633- try {
634- Tf_Input . DeleteAll ( ) ;
635- Tf_Input . ClearHistoryChanges ( ) ;
636- Query = SearchQuery . Null ;
633+ Tf_Input . DeleteAll ( ) ;
634+ Tf_Input . ClearHistoryChanges ( ) ;
637635
638- Lbl_InputOk . Text = Values . NA ;
639- Dt_Results . Clear ( ) ;
636+ Query = SearchQuery . Null ;
637+
638+ Lbl_InputOk . Text = Values . NA ;
639+ Lbl_InputOk . SetNeedsDisplay ( ) ;
640640
641- IsReady . Reset ( ) ;
642- ResultCount = 0 ;
643- Pbr_Status . Fraction = 0 ;
641+ Dt_Results . Clear ( ) ;
644642
645- Lbl_InputInfo . Text = ustring . Empty ;
646- Lbl_QueryUpload . Text = ustring . Empty ;
647- Lbl_InputInfo2 . Text = ustring . Empty ;
648- Lbl_Status . Text = ustring . Empty ;
643+ IsReady . Reset ( ) ;
644+ ResultCount = 0 ;
645+ Pbr_Status . Fraction = 0 ;
649646
650- Tv_Results . SetNeedsDisplay ( ) ;
651- Tf_Input . SetFocus ( ) ;
652- Tf_Input . EnsureFocus ( ) ;
653- Btn_Cancel . Enabled = false ;
647+ Lbl_InputInfo . Text = ustring . Empty ;
648+ Lbl_QueryUpload . Text = ustring . Empty ;
649+ Lbl_InputInfo2 . Text = ustring . Empty ;
650+ Lbl_Status . Text = ustring . Empty ;
651+
652+ Tv_Results . SetNeedsDisplay ( ) ;
653+ Tf_Input . SetFocus ( ) ;
654+ Tf_Input . EnsureFocus ( ) ;
655+ Btn_Cancel . Enabled = false ;
656+
657+ /*Application.MainLoop.Invoke(() =>
658+ { });*/
659+
660+ /*try {
654661 // Application.Refresh();
655662 }
656663 catch (Exception e) {
657664 Debug.WriteLine($"{e.Message}", nameof(ClearControls));
658- }
665+ }*/
659666 }
660667
661668 private void OnRestart ( )
@@ -682,6 +689,8 @@ private void OnRestart()
682689 Tf_Input . SetFocus ( ) ;
683690 Tf_Input . EnsureFocus ( ) ;
684691
692+ /*Application.MainLoop.Invoke(() =>
693+ { });*/
685694 }
686695
687696 private void OnCellActivated ( TableView . CellActivatedEventArgs args )
0 commit comments