Example #1
0
        public BaseClientWindow(string title, WindowConfiguration windowConfiguration)
            : base(title)
        {
            elements_service = ServiceManager.Get<GtkElementsService> ();
            action_service = ServiceManager.Get<InterfaceActionService> ();

            ConfigureWindow ();

            window_controller = new PersistentWindowController (this, windowConfiguration, WindowPersistOptions.All);
            window_controller.Restore ();

            elements_service.PrimaryWindow = this;

            AddAccelGroup (action_service.UIManager.AccelGroup);

            InitializeWindow ();

            try {
                if (System.IO.File.Exists (accel_map_file)) {
                    Gtk.AccelMap.Load (accel_map_file);
                }
            } catch (Exception e) {
                Hyena.Log.Exception ("Failed to load custom AccelMap", e);
            }
        }
        public PersistentWindowController(Gtk.Window window, WindowConfiguration windowConfig, WindowPersistOptions options)
        {
            this.window = window;
            this.options = options;
            this.window_config = windowConfig;

            window.ConfigureEvent += OnChanged;
            window.WindowStateEvent += OnChanged;
            window.DestroyEvent += OnDestroy;
        }
        public PersistentWindowController(Gtk.Window window, WindowConfiguration windowConfig, WindowPersistOptions options)
        {
            this.window        = window;
            this.options       = options;
            this.window_config = windowConfig;

            window.ConfigureEvent   += OnChanged;
            window.WindowStateEvent += OnChanged;
            window.DestroyEvent     += OnDestroy;
        }
Example #4
0
        protected BaseClientWindow(string title, WindowConfiguration windowConfiguration) : base(title)
        {
            elements_service = ServiceManager.Get <GtkElementsService> ();
            action_service   = ServiceManager.Get <InterfaceActionService> ();

            ConfigureWindow(windowConfiguration);

            elements_service.PrimaryWindow = this;

            AddAccelGroup(action_service.UIManager.AccelGroup);

            InitializeWindow();

            try {
                if (System.IO.File.Exists(accel_map_file))
                {
                    Gtk.AccelMap.Load(accel_map_file);
                }
            } catch (Exception e) {
                Log.Error("Failed to load custom AccelMap", e);
            }
        }
Example #5
0
        protected BaseClientWindow(string title, WindowConfiguration windowConfiguration)
            : base(title)
        {
            elements_service = ServiceManager.Get<GtkElementsService> ();
            action_service = ServiceManager.Get<InterfaceActionService> ();

            ConfigureWindow (windowConfiguration);

            elements_service.PrimaryWindow = this;

            AddAccelGroup (action_service.UIManager.AccelGroup);

            InitializeWindow ();

            try {
                if (System.IO.File.Exists (accel_map_file)) {
                    Gtk.AccelMap.Load (accel_map_file);
                }
            } catch (Exception e) {
                Log.Error ("Failed to load custom AccelMap", e);
            }
        }
Example #6
0
        public BaseDialog(PlaylistSource queue, string title, WindowConfiguration windowConfig)
            : base(title)
        {
            this.queue = queue;
            VBox.Spacing = 6;

            HBox filter_box = new HBox ();
            filter_box.Spacing = 6;

            Label search_label = new Label ("_Search:");
            filter_box.PackStart (search_label, false, false, 0);

            search_entry = new MuinsheeSearchEntry ();
            search_entry.Show ();
            search_entry.Changed += OnFilterChanged;
            search_entry.Ready = true;
            OnFilterChanged (null, null);
            filter_box.PackStart (search_entry, true, true, 0);

            VBox.PackStart (filter_box, false, false, 0);

            Hyena.Widgets.ScrolledWindow sw = new Hyena.Widgets.ScrolledWindow ();
            sw.Add (GetItemWidget ());
            VBox.PackStart (sw, true, true, 0);

            AddDefaultCloseButton ();

            Button queue_button = new ImageButton (Catalog.GetString ("En_queue"), "gtk-add");
            AddActionWidget (queue_button, Gtk.ResponseType.Apply);

            Button play_button = new ImageButton (Catalog.GetString ("_Play"), "media-playback-start");
            AddButton (play_button, Gtk.ResponseType.Ok, true);

            window_controller = new PersistentWindowController (this, windowConfig, WindowPersistOptions.Size);
            window_controller.Restore ();
            ShowAll ();

            Response += OnResponse;
        }
Example #7
0
 private void ConfigureWindow(WindowConfiguration windowConfiguration)
 {
     window_controller = new PersistentWindowController(this, windowConfiguration, WindowPersistOptions.All);
     window_controller.Restore();
 }
Example #8
0
 private void ConfigureWindow(WindowConfiguration windowConfiguration)
 {
     window_controller = new PersistentWindowController (this, windowConfiguration, WindowPersistOptions.All);
     window_controller.Restore ();
 }