33using Nickvision . Application . Shared . Controllers ;
44using Nickvision . Application . Shared . Events ;
55using Nickvision . Application . Shared . Models ;
6+ using Nickvision . Application . Shared . Services ;
67using Nickvision . Desktop . Application ;
78using Nickvision . Desktop . Globalization ;
89using Nickvision . Desktop . GNOME . Controls ;
@@ -36,12 +37,12 @@ public class MainWindow : Adw.ApplicationWindow
3637 [ Gtk . Connect ( "pageFiles" ) ]
3738 private Adw . StatusPage ? _pageFiles ;
3839
39- public MainWindow ( IServiceProvider serviceProvider , MainWindowController controller , AppInfo appInfo , ITranslationService translationService , IGtkBuilderFactory builderFactory ) : this ( serviceProvider , controller , appInfo , translationService , builderFactory . Create ( "MainWindow" ) )
40+ public MainWindow ( IServiceProvider serviceProvider , MainWindowController controller , AppInfo appInfo , IEventsService eventsService , ITranslationService translationService , IGtkBuilderFactory builderFactory ) : this ( serviceProvider , controller , appInfo , eventsService , translationService , builderFactory . Create ( "MainWindow" ) )
4041 {
4142
4243 }
4344
44- private MainWindow ( IServiceProvider serviceProvider , MainWindowController controller , AppInfo appInfo , ITranslationService translationService , Gtk . Builder builder ) : base ( new Adw . Internal . ApplicationWindowHandle ( builder . GetPointer ( "root" ) , false ) )
45+ private MainWindow ( IServiceProvider serviceProvider , MainWindowController controller , AppInfo appInfo , IEventsService eventsService , ITranslationService translationService , Gtk . Builder builder ) : base ( new Adw . Internal . ApplicationWindowHandle ( builder . GetPointer ( "root" ) , false ) )
4546 {
4647 var application = serviceProvider . GetRequiredService < Adw . Application > ( ) ;
4748 _serviceProvider = serviceProvider ;
@@ -67,12 +68,12 @@ private MainWindow(IServiceProvider serviceProvider, MainWindowController contro
6768 _pageGreeting ! . Title = _controller . Greeting ;
6869 // Events
6970 OnCloseRequest += Window_OnCloseRequest ;
70- _controller . AppNotificationSent += ( sender , args ) => GLib . Functions . IdleAdd ( 0 , ( ) =>
71+ eventsService . AppNotificationSent += ( sender , args ) => GLib . Functions . IdleAdd ( 0 , ( ) =>
7172 {
7273 Controller_AppNotificationSent ( sender , args ) ;
7374 return false ;
7475 } ) ;
75- _controller . FolderChanged += Controller_FolderChanged ;
76+ eventsService . FolderChanged += Controller_FolderChanged ;
7677 // Drop target
7778 var dropTarget = Gtk . DropTarget . New ( Gio . FileHelper . GetGType ( ) , Gdk . DragAction . Copy ) ;
7879 dropTarget . OnDrop += Window_OnDrop ;
0 commit comments