Exemplo n.º 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();
        }
Exemplo n.º 2
0
 public static void Create(DelegateJob callback, string title)
 {
     var job = new AsyncUserJob(callback, title);
     job.Register();
 }
Exemplo n.º 3
0
        public static void Create(DelegateJob callback, string title)
        {
            var job = new AsyncUserJob(callback, title);

            job.Register();
        }