Exemple #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();
        }
 public static void Create(DelegateJob callback, string title)
 {
     var job = new AsyncUserJob(callback, title);
     job.Register();
 }
        public static void Create(DelegateJob callback, string title)
        {
            var job = new AsyncUserJob(callback, title);

            job.Register();
        }