Exemplo n.º 1
0
 public DapContent(DapSource source) : base(source)
 {
     dap = source;
     BuildWidgets();
     BuildActions();
     dap.Properties.PropertyChanged += OnPropertyChanged;
 }
Exemplo n.º 2
0
        public DapInfoBar (DapSource source)
        {
            this.source = source;
            source.Updated += OnSourceUpdated;

            BuildWidget ();
        }
Exemplo n.º 3
0
        public DapInfoBar(DapSource source)
        {
            this.source     = source;
            source.Updated += OnSourceUpdated;

            BuildWidget();
        }
Exemplo n.º 4
0
        public AmazonMp3GroupSource (DapSource parent, String amazon_dir, String amazon_base_dir)
            : base (parent, Catalog.GetString ("Purchased Music"))
        {
            this.amazon_base_dir = amazon_base_dir;

            Properties.SetString ("Icon.Name", "amazon-mp3-source");
            ConditionSql = String.Format ("(CoreTracks.Uri LIKE \"%{0}%\")", amazon_dir);
        }
Exemplo n.º 5
0
        public AmazonMp3GroupSource(DapSource parent, String amazon_dir, String amazon_base_dir)
            : base(parent, Catalog.GetString("Purchased Music"))
        {
            this.amazon_base_dir = amazon_base_dir;

            Properties.SetString("Icon.Name", "amazon-mp3-source");
            ConditionSql = String.Format("(CoreTracks.Uri LIKE \"%{0}%\")", amazon_dir);
        }
Exemplo n.º 6
0
        public AmazonMp3GroupSource(DapSource parent, String amazon_dir, String amazon_base_dir)
            : base(parent, Catalog.GetString("Purchased Music"))
        {
            this.amazon_base_dir = amazon_base_dir;

            Properties.SetString("Icon.Name", "amazon-mp3-source");
            ConditionSql = String.Format("({0} LIKE \"%{1}%\")", Banshee.Query.BansheeQuery.UriField.Column, amazon_dir);
        }
Exemplo n.º 7
0
 protected override void OnDestroyed ()
 {
     base.OnDestroyed ();
     if (source != null) {
         source.Updated -= OnSourceUpdated;
         source = null;
     }
 }
Exemplo n.º 8
0
        public AmazonMp3GroupSource(DapSource parent, String amazon_dir, String amazon_base_dir)
            : base(parent, Catalog.GetString ("Purchased Music"))
        {
            this.amazon_base_dir = amazon_base_dir;

            Properties.SetString ("Icon.Name", "amazon-mp3-source");
            ConditionSql = String.Format ("({0} LIKE \"%{1}%\")", Banshee.Query.BansheeQuery.UriField.Column, amazon_dir);
        }
Exemplo n.º 9
0
        private void OnSyncDap(object o, EventArgs args)
        {
            DapSource dap = Dap;

            if (dap != null)
            {
                dap.Sync.Sync();
            }
        }
Exemplo n.º 10
0
        private void UpdateActions()
        {
            DapSource dap = Dap;

            if (dap != null)
            {
                UpdateAction("SyncDapAction", dap.Sync.Enabled);
            }
        }
 protected override void OnDestroyed()
 {
     base.OnDestroyed();
     if (source != null)
     {
         source.Updated -= OnSourceUpdated;
         source          = null;
     }
 }
Exemplo n.º 12
0
        private void UpdateActions()
        {
            DapSource dap = Dap;

            if (dap != null)
            {
                UpdateAction("SyncDapAction", dap.Sync.Enabled);
                UpdateAction("ClaimDapAction", dap is PotentialSource);
            }
        }
Exemplo n.º 13
0
        internal void UpdateActions()
        {
            DapSource dap = Dap;

            if (dap != null)
            {
                UpdateAction("SyncDapAction", dap.IsConnected && dap.Sync.Enabled);
                UpdateAction("ClaimDapAction", !dap.IsConnected);
            }
        }
Exemplo n.º 14
0
        private void UpdateActions()
        {
            DapSource dap = Dap;

            if (dap != null)
            {
                UpdateAction("SyncDapAction", dap.Sync.Enabled && !dap.Sync.AutoSync);
                /* Translators: {0} is the name of the digital audio player */
                this["SyncDapAction"].Label = String.Format(Catalog.GetString("Synchronize {0}"), dap.Name);
            }
        }
Exemplo n.º 15
0
        private void OnActiveSourceChanged(EventArgs args)
        {
            if (previous_dap != null)
            {
                previous_dap.Sync.Updated -= OnSyncUpdated;
            }

            previous_dap = ActiveSource as DapSource;

            if (previous_dap != null)
            {
                previous_dap.Sync.Updated += OnSyncUpdated;
            }
        }
Exemplo n.º 16
0
 public DapPropertiesDisplay(DapSource source) : base(0.5f, 0.35f, 0.0f, 0.0f)
 {
     AppPaintable = true;
     this.source  = source;
 }
Exemplo n.º 17
0
 public void ResetSource()
 {
     source = null;
 }
Exemplo n.º 18
0
        /*private void BuildPropertyTable ()
         * {
         *  MessagePane pane = new MessagePane ();
         *  pane.HeaderIcon =
         *  pane.HeaderMarkup = String.Format ("<big><b>{0}</b></big>", GLib.Markup.EscapeText (source.Name));
         *
         *  Button properties_button = new Button (String.Format (Catalog.GetString ("{0} Properties"), source.GenericName));
         *  pane.Append (properties_button);
         *
         *  Add (pane);
         * }*/

        #region ISourceContents

        public bool SetSource(ISource src)
        {
            this.source = source as DapSource;
            return(this.source != null);
        }
Exemplo n.º 19
0
 public DapPropertiesDisplay(DapSource source)
     : base(0.5f, 0.35f, 0.0f, 0.0f)
 {
     AppPaintable = true;
     this.source = source;
 }
Exemplo n.º 20
0
 public void ResetSource()
 {
     source = null;
 }
Exemplo n.º 21
0
 public bool SetSource(ISource src)
 {
     this.source = source as DapSource;
     return this.source != null;
 }
Exemplo n.º 22
0
 // TODO: Support dropping files onto this playlist to copy into the ringtones directory
 public RingtonesGroupSource(DapSource parent)
     : base(parent, Catalog.GetString("Ringtones"))
 {
     ConditionSql = "(CoreTracks.Uri LIKE \"%ringtones/%\")";
 }
Exemplo n.º 23
0
 // TODO: Support dropping files onto this playlist to copy into the ringtones directory
 public RingtonesGroupSource (DapSource parent)
     : base (parent, Catalog.GetString ("Ringtones"))
 {
     ConditionSql = "(CoreTracks.Uri LIKE \"%ringtones/%\")";
 }
Exemplo n.º 24
0
 // TODO: Support dropping files onto this playlist to copy into the ringtones directory
 public RingtonesGroupSource(DapSource parent)
     : base(parent, Catalog.GetString("Ringtones"))
 {
     ConditionSql = String.Format("({0} LIKE \"%ringtones/%\")", Banshee.Query.BansheeQuery.UriField.Column);
 }
Exemplo n.º 25
0
 // TODO: Support dropping files onto this playlist to copy into the ringtones directory
 public RingtonesGroupSource(DapSource parent)
     : base(parent, Catalog.GetString ("Ringtones"))
 {
     ConditionSql = String.Format ("({0} LIKE \"%ringtones/%\")", Banshee.Query.BansheeQuery.UriField.Column);
 }
Exemplo n.º 26
0
 public InactiveDapContent(DapSource dapSource) : base(dapSource)
 {
     dapSource.Properties.PropertyChanged += OnPropertyChanged;
     BuildWidgets();
 }