コード例 #1
0
        public MusicSource()
            : base("Google Music", "Google Music", 30)
        {
            api = new Google.Music.Api();
            downloadWrapper = new MusicDownloadWrapper(api);
            downloadWrapper.Start();

            TypeUniqueId = "google-music";
            Properties.Set<Gdk.Pixbuf>("Icon.Pixbuf_16", Gdk.Pixbuf.LoadFromResource("google-music-favicon"));

            var win = new Gtk.Window("Google Music Login");
            var loginWidget = new LoginWidget();
            loginWidget.UserLoggedIn += (cookies) => {
                api.SetCookies(cookies);
                AsyncUserJob.Create(() => {
                    Refetch();
                }, "Fetching playlist");

                win.Destroy();
            };
            win.Add(loginWidget);
            win.ShowAll();
        }
コード例 #2
0
        public MusicSource() : base("Google Music", "Google Music", 30)
        {
            api             = new Google.Music.Api();
            downloadWrapper = new MusicDownloadWrapper(api);
            downloadWrapper.Start();

            TypeUniqueId = "google-music";
            Properties.Set <Gdk.Pixbuf>("Icon.Pixbuf_16", Gdk.Pixbuf.LoadFromResource("google-music-favicon"));

            var win         = new Gtk.Window("Google Music Login");
            var loginWidget = new LoginWidget();

            loginWidget.UserLoggedIn += (cookies) => {
                api.SetCookies(cookies);
                AsyncUserJob.Create(() => {
                    Refetch();
                }, "Fetching playlist");

                win.Destroy();
            };
            win.Add(loginWidget);
            win.ShowAll();
        }