コード例 #1
0
        // Constructor
        public InfoWindow(string title) : base(IntPtr.Zero)
        {
            Glade.XML gxml = new Glade.XML(null, "InfoWindow.glade", "window", null);
            gxml.Autoconnect(this);

            Raw = window.Handle;

            window.Title = title;

            int width  = (int)Muine.GetGConfValue(GConfKeyWidth, GConfDefaultWidth);
            int height = (int)Muine.GetGConfValue(GConfKeyHeight, GConfDefaultHeight);

            window.SetDefaultSize(width, height);

            window.SizeAllocated += OnSizeAllocated;

            cover_image = new CoverImage();
            ((Container)gxml ["cover_image_container"]).Add(cover_image);

            // Keynav
            box.FocusHadjustment = scrolledwindow.Hadjustment;
            box.FocusVadjustment = scrolledwindow.Vadjustment;

            // White background
//			viewport.EnsureStyle ();
//			viewport.ModifyBg (StateType.Normal, viewport.Style.Base (StateType.Normal));
        }
コード例 #2
0
ファイル: AddAlbumWindow.cs プロジェクト: NattyNarwhal/muine
        // Handlers :: OnDragDataReceived
        /// <summary>Handler called when Drag-and-Drop data is
        ///   received.</summary>
        /// <remarks>External covers may be Drag-and-Dropped onto an
        ///   album.</remarks>
        private void OnDragDataReceived
            (object o, Gtk.DragDataReceivedArgs args)
        {
            Album album = GetAlbum(args.X, args.Y);
            Song  song  = (Song)album.Songs [0];

            CoverImage.HandleDrop(song, args);
        }