diff --git a/MPfm/MPfm.GTK/Classes/LinuxSyncDeviceSpecifications.cs b/MPfm/MPfm.GTK/Classes/LinuxSyncDeviceSpecifications.cs index 300962f0..cbb99089 100644 --- a/MPfm/MPfm.GTK/Classes/LinuxSyncDeviceSpecifications.cs +++ b/MPfm/MPfm.GTK/Classes/LinuxSyncDeviceSpecifications.cs @@ -62,6 +62,11 @@ public string GetIPAddress() return SyncListenerService.GetLocalIPAddress().ToString(); } + public string GetDeviceUniqueId() + { + return string.Empty; + } + public string GetMusicFolderPath() { return Environment.GetFolderPath(Environment.SpecialFolder.MyMusic); diff --git a/MPfm/MPfm.GTK/Classes/Main.cs b/MPfm/MPfm.GTK/Classes/Main.cs index 0f8811f3..ac325583 100644 --- a/MPfm/MPfm.GTK/Classes/Main.cs +++ b/MPfm/MPfm.GTK/Classes/Main.cs @@ -20,12 +20,15 @@ using System.Reflection; using Gtk; using MPfm.MVP; -using MPfm.MVP.Views; -using MPfm.MVP.Navigation; using MPfm.MVP.Bootstrap; +using MPfm.MVP.Navigation; +using MPfm.MVP.Services; +using MPfm.MVP.Views; using MPfm.GTK.Navigation; using MPfm.GTK.Windows; using MPfm.Library; +using MPfm.Library.Services.Interfaces; +using MPfm.MVP.Config.Providers; namespace MPfm.GTK.Classes { @@ -33,12 +36,14 @@ public class MainClass { static NavigationManager navigationManager; - public static void Main (string[] args) - { - // Add view implementations to IoC - Application.Init(); - Bootstrapper.GetContainer().Register().AsSingleton(); + public static void Main(string[] args) + { + // Add view implementations to IoC + Application.Init(); + Bootstrapper.GetContainer().Register().AsSingleton(); Bootstrapper.GetContainer().Register().AsSingleton(); + Bootstrapper.GetContainer().Register().AsSingleton(); + Bootstrapper.GetContainer().Register().AsSingleton(); Bootstrapper.GetContainer().Register().AsMultiInstance(); Bootstrapper.GetContainer().Register().AsMultiInstance(); Bootstrapper.GetContainer().Register().AsMultiInstance(); @@ -48,6 +53,8 @@ public static void Main (string[] args) Bootstrapper.GetContainer().Register().AsMultiInstance(); Bootstrapper.GetContainer().Register().AsMultiInstance(); Bootstrapper.GetContainer().Register().AsMultiInstance(); + Bootstrapper.GetContainer().Register().AsMultiInstance(); + Bootstrapper.GetContainer().Register().AsMultiInstance(); // Create and start navigation manager navigationManager = Bootstrapper.GetContainer().Resolve(); diff --git a/MPfm/MPfm.GTK/MPfm.GTK.csproj b/MPfm/MPfm.GTK/MPfm.GTK.csproj index 02f03813..1753f94a 100644 --- a/MPfm/MPfm.GTK/MPfm.GTK.csproj +++ b/MPfm/MPfm.GTK/MPfm.GTK.csproj @@ -128,6 +128,10 @@ + + + + diff --git a/MPfm/MPfm.GTK/Windows/MainWindow.cs b/MPfm/MPfm.GTK/Windows/MainWindow.cs index 235a4461..dba33c95 100644 --- a/MPfm/MPfm.GTK/Windows/MainWindow.cs +++ b/MPfm/MPfm.GTK/Windows/MainWindow.cs @@ -546,7 +546,6 @@ protected void OnAboutActionActivated(object sender, System.EventArgs e) string text = Title + "\nMPfm: Music Player for Musicians is © 2011-2012 Yanick Castonguay and is released under the GPLv3 license."; text += "\nThe BASS audio library is © 1999-2012 Un4seen Developments."; text += "\nThe BASS.NET audio library is © 2005-2012 radio42."; - MessageDialog md = new MessageDialog(this, DialogFlags.Modal, MessageType.Info, ButtonsType.Ok, text); md.Run(); @@ -632,7 +631,7 @@ protected void OnTreeLibraryBrowserRowExpanded(object sender, Gtk.RowExpandedArg // Check for dummy node _storeLibraryBrowser.IterChildren(out iter, args.Iter); LibraryBrowserEntity entityChildren = (LibraryBrowserEntity)_storeLibraryBrowser.GetValue(iter, 0); - if(entityChildren.Type == LibraryBrowserEntityType.Dummy) + if(entityChildren.EntityType == LibraryBrowserEntityType.Dummy) { OnTreeNodeExpanded(entity, args.Iter); } @@ -682,6 +681,16 @@ protected void OnActionDeleteMarkerActivated(object sender, EventArgs e) { } + protected void OnActionSyncCloudActivated(object sender, EventArgs e) + { + OnOpenSyncCloudWindow(); + } + + protected void OnActionSyncWebBrowserActivated(object sender, EventArgs e) + { + OnOpenSyncWebBrowserWindow(); + } + #endregion private static Gdk.Pixbuf ImageToPixbuf(System.Drawing.Image image) @@ -705,6 +714,8 @@ protected void btnTest_Click(object sender, EventArgs e) public System.Action OnOpenEffectsWindow { get; set; } public System.Action OnOpenPlaylistWindow { get; set; } public System.Action OnOpenSyncWindow { get; set; } + public System.Action OnOpenSyncCloudWindow { get; set; } + public System.Action OnOpenSyncWebBrowserWindow { get; set; } public System.Action> OnAddFilesToLibrary { get; set; } public System.Action OnAddFolderToLibrary { get; set; } @@ -925,7 +936,7 @@ public void RefreshLibraryBrowserNode(LibraryBrowserEntity entity, IEnumerable. + +using System; +using MPfm.GTK.Windows; +using MPfm.MVP.Views; +using MPfm.Library.Objects; +using System.Text; +using Gtk; + +namespace MPfm.GTK +{ + public partial class SyncCloudWindow : BaseWindow, ISyncCloudView + { + public SyncCloudWindow(Action onViewReady) : + base(Gtk.WindowType.Toplevel, onViewReady) + { + this.Build(); + onViewReady(this); + //btnRefreshDeviceList.GrabFocus(); // the list view changes color when focused by default. it annoys me! + this.Center(); + this.Show(); + } + + protected void OnClickCancel(object sender, EventArgs e) + { + } + + #region ISyncCloudView implementation + + public void SyncCloudError(Exception ex) + { + Gtk.Application.Invoke(delegate + { + StringBuilder sb = new StringBuilder(); + sb.AppendLine("An error occured in the SyncCloud component:"); + sb.AppendLine(ex.Message); + sb.AppendLine(); + sb.AppendLine(ex.StackTrace); + MessageDialog md = new MessageDialog( + this, + DialogFlags.Modal, + MessageType.Error, + ButtonsType.Ok, + sb.ToString() + ); + md.Run(); + md.Destroy(); + }); + } + + #endregion + + } +} diff --git a/MPfm/MPfm.GTK/Windows/SyncWebBrowserWindow.cs b/MPfm/MPfm.GTK/Windows/SyncWebBrowserWindow.cs new file mode 100644 index 00000000..7a8d4fa6 --- /dev/null +++ b/MPfm/MPfm.GTK/Windows/SyncWebBrowserWindow.cs @@ -0,0 +1,77 @@ +// Copyright © 2011-2013 Yanick Castonguay +// +// This file is part of MPfm. +// +// MPfm is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// MPfm is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with MPfm. If not, see . + +using System; +using MPfm.GTK.Windows; +using MPfm.MVP.Views; +using MPfm.Library.Objects; +using System.Text; +using Gtk; + +namespace MPfm.GTK +{ + public partial class SyncWebBrowserWindow : BaseWindow, ISyncWebBrowserView + { + public SyncWebBrowserWindow(Action onViewReady) : + base(Gtk.WindowType.Toplevel, onViewReady) + { + this.Build(); + onViewReady(this); + //btnRefreshDeviceList.GrabFocus(); // the list view changes color when focused by default. it annoys me! + this.Center(); + this.Show(); + } + + protected void OnClickCancel(object sender, EventArgs e) + { + } + + #region ISyncWebBrowserView implementation + + public void SyncWebBrowserError(Exception ex) + { + Gtk.Application.Invoke(delegate + { + StringBuilder sb = new StringBuilder(); + sb.AppendLine("An error occured in the SyncCloud component:"); + sb.AppendLine(ex.Message); + sb.AppendLine(); + sb.AppendLine(ex.StackTrace); + MessageDialog md = new MessageDialog( + this, + DialogFlags.Modal, + MessageType.Error, + ButtonsType.Ok, + sb.ToString() + ); + md.Run(); + md.Destroy(); + }); + } + + public void RefreshContent(string url, string authenticationCode) + { + Gtk.Application.Invoke(delegate + { + lblUrl.Text = url; + lblAuthenticationCode.Text = authenticationCode; + }); + } + + #endregion + } +} diff --git a/MPfm/MPfm.GTK/gtk-gui/MPfm.GTK.SyncCloudWindow.cs b/MPfm/MPfm.GTK/gtk-gui/MPfm.GTK.SyncCloudWindow.cs new file mode 100644 index 00000000..42b7b886 --- /dev/null +++ b/MPfm/MPfm.GTK/gtk-gui/MPfm.GTK.SyncCloudWindow.cs @@ -0,0 +1,145 @@ + +// This file has been generated by the GUI designer. Do not modify. +namespace MPfm.GTK +{ + public partial class SyncCloudWindow + { + private global::Gtk.VBox vbox2; + private global::Gtk.Label label2; + private global::Gtk.Label label3; + private global::Gtk.Label label4; + private global::Gtk.Label label5; + private global::Gtk.Label label6; + private global::Gtk.Button btnLogin; + private global::Gtk.Button btnLogout; + private global::Gtk.Button btnPull; + private global::Gtk.Button btnPush; + private global::Gtk.Button btnDelete; + + protected virtual void Build () + { + global::Stetic.Gui.Initialize (this); + // Widget MPfm.GTK.SyncCloudWindow + this.Name = "MPfm.GTK.SyncCloudWindow"; + this.Title = global::Mono.Unix.Catalog.GetString ("SyncCloudWindow"); + this.WindowPosition = ((global::Gtk.WindowPosition)(4)); + // Container child MPfm.GTK.SyncCloudWindow.Gtk.Container+ContainerChild + this.vbox2 = new global::Gtk.VBox (); + this.vbox2.Name = "vbox2"; + this.vbox2.Spacing = 6; + this.vbox2.BorderWidth = ((uint)(6)); + // Container child vbox2.Gtk.Box+BoxChild + this.label2 = new global::Gtk.Label (); + this.label2.Name = "label2"; + this.label2.Xalign = 0F; + this.label2.LabelProp = global::Mono.Unix.Catalog.GetString ("Sync (Cloud)"); + this.vbox2.Add (this.label2); + global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.label2])); + w1.Position = 0; + w1.Expand = false; + w1.Fill = false; + // Container child vbox2.Gtk.Box+BoxChild + this.label3 = new global::Gtk.Label (); + this.label3.Name = "label3"; + this.label3.Xalign = 0F; + this.label3.LabelProp = global::Mono.Unix.Catalog.GetString ("Dropbox"); + this.vbox2.Add (this.label3); + global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.label3])); + w2.Position = 1; + w2.Expand = false; + w2.Fill = false; + // Container child vbox2.Gtk.Box+BoxChild + this.label4 = new global::Gtk.Label (); + this.label4.Name = "label4"; + this.label4.Xalign = 0F; + this.label4.LabelProp = global::Mono.Unix.Catalog.GetString ("Dropbox"); + this.vbox2.Add (this.label4); + global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.label4])); + w3.Position = 2; + w3.Expand = false; + w3.Fill = false; + // Container child vbox2.Gtk.Box+BoxChild + this.label5 = new global::Gtk.Label (); + this.label5.Name = "label5"; + this.label5.Xalign = 0F; + this.label5.LabelProp = global::Mono.Unix.Catalog.GetString ("Dropbox"); + this.vbox2.Add (this.label5); + global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.label5])); + w4.Position = 3; + w4.Expand = false; + w4.Fill = false; + // Container child vbox2.Gtk.Box+BoxChild + this.label6 = new global::Gtk.Label (); + this.label6.Name = "label6"; + this.label6.Xalign = 0F; + this.label6.LabelProp = global::Mono.Unix.Catalog.GetString ("Dropbox"); + this.vbox2.Add (this.label6); + global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.label6])); + w5.Position = 4; + w5.Expand = false; + w5.Fill = false; + // Container child vbox2.Gtk.Box+BoxChild + this.btnLogin = new global::Gtk.Button (); + this.btnLogin.CanFocus = true; + this.btnLogin.Name = "btnLogin"; + this.btnLogin.UseUnderline = true; + this.btnLogin.Label = global::Mono.Unix.Catalog.GetString ("Enable Dropbox Sync"); + this.vbox2.Add (this.btnLogin); + global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.btnLogin])); + w6.Position = 5; + w6.Expand = false; + w6.Fill = false; + // Container child vbox2.Gtk.Box+BoxChild + this.btnLogout = new global::Gtk.Button (); + this.btnLogout.CanFocus = true; + this.btnLogout.Name = "btnLogout"; + this.btnLogout.UseUnderline = true; + this.btnLogout.Label = global::Mono.Unix.Catalog.GetString ("Disable Dropbox Sync"); + this.vbox2.Add (this.btnLogout); + global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.btnLogout])); + w7.Position = 6; + w7.Expand = false; + w7.Fill = false; + // Container child vbox2.Gtk.Box+BoxChild + this.btnPull = new global::Gtk.Button (); + this.btnPull.CanFocus = true; + this.btnPull.Name = "btnPull"; + this.btnPull.UseUnderline = true; + this.btnPull.Label = global::Mono.Unix.Catalog.GetString ("Pull"); + this.vbox2.Add (this.btnPull); + global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.btnPull])); + w8.Position = 7; + w8.Expand = false; + w8.Fill = false; + // Container child vbox2.Gtk.Box+BoxChild + this.btnPush = new global::Gtk.Button (); + this.btnPush.CanFocus = true; + this.btnPush.Name = "btnPush"; + this.btnPush.UseUnderline = true; + this.btnPush.Label = global::Mono.Unix.Catalog.GetString ("Push"); + this.vbox2.Add (this.btnPush); + global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.btnPush])); + w9.Position = 8; + w9.Expand = false; + w9.Fill = false; + // Container child vbox2.Gtk.Box+BoxChild + this.btnDelete = new global::Gtk.Button (); + this.btnDelete.CanFocus = true; + this.btnDelete.Name = "btnDelete"; + this.btnDelete.UseUnderline = true; + this.btnDelete.Label = global::Mono.Unix.Catalog.GetString ("Delete"); + this.vbox2.Add (this.btnDelete); + global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.btnDelete])); + w10.Position = 9; + w10.Expand = false; + w10.Fill = false; + this.Add (this.vbox2); + if ((this.Child != null)) { + this.Child.ShowAll (); + } + this.DefaultWidth = 400; + this.DefaultHeight = 300; + this.Show (); + } + } +} diff --git a/MPfm/MPfm.GTK/gtk-gui/MPfm.GTK.SyncDownloadWindow.cs b/MPfm/MPfm.GTK/gtk-gui/MPfm.GTK.SyncDownloadWindow.cs index 34ac6f16..e4fed5c0 100644 --- a/MPfm/MPfm.GTK/gtk-gui/MPfm.GTK.SyncDownloadWindow.cs +++ b/MPfm/MPfm.GTK/gtk-gui/MPfm.GTK.SyncDownloadWindow.cs @@ -109,7 +109,6 @@ protected virtual void Build () this.hbox2.Spacing = 6; // Container child hbox2.Gtk.Box+BoxChild this.vbox3 = new global::Gtk.VBox (); - this.vbox3.Name = "vbox3"; this.vbox3.Spacing = 6; // Container child vbox3.Gtk.Box+BoxChild this.lblFilesDownloadedValue = new global::Gtk.Label (); diff --git a/MPfm/MPfm.GTK/gtk-gui/MPfm.GTK.SyncMenuWindow.cs b/MPfm/MPfm.GTK/gtk-gui/MPfm.GTK.SyncMenuWindow.cs index fc8d685a..40a6beb2 100644 --- a/MPfm/MPfm.GTK/gtk-gui/MPfm.GTK.SyncMenuWindow.cs +++ b/MPfm/MPfm.GTK/gtk-gui/MPfm.GTK.SyncMenuWindow.cs @@ -208,7 +208,6 @@ protected virtual void Build () this.hbox2.Spacing = 6; // Container child hbox2.Gtk.Box+BoxChild this.vbox3 = new global::Gtk.VBox (); - this.vbox3.Name = "vbox3"; this.vbox3.Spacing = 6; // Container child vbox3.Gtk.Box+BoxChild this.lblTotal = new global::Gtk.Label (); diff --git a/MPfm/MPfm.GTK/gtk-gui/MPfm.GTK.SyncWebBrowserWindow.cs b/MPfm/MPfm.GTK/gtk-gui/MPfm.GTK.SyncWebBrowserWindow.cs new file mode 100644 index 00000000..a62e359c --- /dev/null +++ b/MPfm/MPfm.GTK/gtk-gui/MPfm.GTK.SyncWebBrowserWindow.cs @@ -0,0 +1,105 @@ + +// This file has been generated by the GUI designer. Do not modify. +namespace MPfm.GTK +{ + public partial class SyncWebBrowserWindow + { + private global::Gtk.VBox vbox1; + private global::Gtk.Label label1; + private global::Gtk.Label label3; + private global::Gtk.Label label4; + private global::Gtk.Label lblUrl; + private global::Gtk.Label label5; + private global::Gtk.Label label6; + private global::Gtk.Label lblAuthenticationCode; + + protected virtual void Build () + { + global::Stetic.Gui.Initialize (this); + // Widget MPfm.GTK.SyncWebBrowserWindow + this.Name = "MPfm.GTK.SyncWebBrowserWindow"; + this.Title = global::Mono.Unix.Catalog.GetString ("SyncWebBrowserWindow"); + this.WindowPosition = ((global::Gtk.WindowPosition)(4)); + // Container child MPfm.GTK.SyncWebBrowserWindow.Gtk.Container+ContainerChild + this.vbox1 = new global::Gtk.VBox (); + this.vbox1.Name = "vbox1"; + this.vbox1.Spacing = 6; + this.vbox1.BorderWidth = ((uint)(6)); + // Container child vbox1.Gtk.Box+BoxChild + this.label1 = new global::Gtk.Label (); + this.label1.Name = "label1"; + this.label1.Xalign = 0F; + this.label1.LabelProp = global::Mono.Unix.Catalog.GetString ("Sync (Web Browser)"); + this.vbox1.Add (this.label1); + global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.label1])); + w1.Position = 0; + w1.Expand = false; + w1.Fill = false; + // Container child vbox1.Gtk.Box+BoxChild + this.label3 = new global::Gtk.Label (); + this.label3.Name = "label3"; + this.label3.Xalign = 0F; + this.label3.LabelProp = global::Mono.Unix.Catalog.GetString ("Step 1:"); + this.vbox1.Add (this.label3); + global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.label3])); + w2.Position = 1; + w2.Expand = false; + w2.Fill = false; + // Container child vbox1.Gtk.Box+BoxChild + this.label4 = new global::Gtk.Label (); + this.label4.Name = "label4"; + this.label4.Xalign = 0F; + this.label4.LabelProp = global::Mono.Unix.Catalog.GetString ("Open a web browser and enter the following url in the address bar:"); + this.vbox1.Add (this.label4); + global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.label4])); + w3.Position = 2; + w3.Expand = false; + w3.Fill = false; + // Container child vbox1.Gtk.Box+BoxChild + this.lblUrl = new global::Gtk.Label (); + this.lblUrl.Name = "lblUrl"; + this.lblUrl.LabelProp = global::Mono.Unix.Catalog.GetString ("http://192.168.1.1:53551"); + this.vbox1.Add (this.lblUrl); + global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.lblUrl])); + w4.Position = 3; + w4.Expand = false; + w4.Fill = false; + // Container child vbox1.Gtk.Box+BoxChild + this.label5 = new global::Gtk.Label (); + this.label5.Name = "label5"; + this.label5.Xalign = 0F; + this.label5.LabelProp = global::Mono.Unix.Catalog.GetString ("Step 2:"); + this.vbox1.Add (this.label5); + global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.label5])); + w5.Position = 4; + w5.Expand = false; + w5.Fill = false; + // Container child vbox1.Gtk.Box+BoxChild + this.label6 = new global::Gtk.Label (); + this.label6.Name = "label6"; + this.label6.Xalign = 0F; + this.label6.LabelProp = global::Mono.Unix.Catalog.GetString ("Enter the following authentication code and click on the Login button:"); + this.vbox1.Add (this.label6); + global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.label6])); + w6.Position = 5; + w6.Expand = false; + w6.Fill = false; + // Container child vbox1.Gtk.Box+BoxChild + this.lblAuthenticationCode = new global::Gtk.Label (); + this.lblAuthenticationCode.Name = "lblAuthenticationCode"; + this.lblAuthenticationCode.LabelProp = global::Mono.Unix.Catalog.GetString ("00000"); + this.vbox1.Add (this.lblAuthenticationCode); + global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.lblAuthenticationCode])); + w7.Position = 6; + w7.Expand = false; + w7.Fill = false; + this.Add (this.vbox1); + if ((this.Child != null)) { + this.Child.ShowAll (); + } + this.DefaultWidth = 411; + this.DefaultHeight = 300; + this.Show (); + } + } +} diff --git a/MPfm/MPfm.GTK/gtk-gui/MPfm.GTK.Windows.EffectsWindow.cs b/MPfm/MPfm.GTK/gtk-gui/MPfm.GTK.Windows.EffectsWindow.cs index 8964f0d0..84cefa17 100644 --- a/MPfm/MPfm.GTK/gtk-gui/MPfm.GTK.Windows.EffectsWindow.cs +++ b/MPfm/MPfm.GTK/gtk-gui/MPfm.GTK.Windows.EffectsWindow.cs @@ -109,7 +109,6 @@ protected virtual void Build () this.hboxFaders.Spacing = 6; // Container child hboxFaders.Gtk.Box+BoxChild this.vbox3 = new global::Gtk.VBox (); - this.vbox3.Name = "vbox3"; this.vbox3.Spacing = 6; // Container child vbox3.Gtk.Box+BoxChild this.vscale1 = new global::Gtk.VScale (null); diff --git a/MPfm/MPfm.GTK/gtk-gui/MPfm.GTK.Windows.MainWindow.cs b/MPfm/MPfm.GTK/gtk-gui/MPfm.GTK.Windows.MainWindow.cs index 2ee4c85c..b841158a 100644 --- a/MPfm/MPfm.GTK/gtk-gui/MPfm.GTK.Windows.MainWindow.cs +++ b/MPfm/MPfm.GTK/gtk-gui/MPfm.GTK.Windows.MainWindow.cs @@ -35,6 +35,8 @@ public partial class MainWindow private global::Gtk.Action HelpAction; private global::Gtk.Action actionPlayLoop; private global::Gtk.Action connectAction; + private global::Gtk.Action SyncCloudAction; + private global::Gtk.Action SyncWebBrowserAction; private global::Gtk.VBox vboxMain; private global::Gtk.MenuBar menubarMain; private global::Gtk.Toolbar toolbarMain; @@ -344,6 +346,22 @@ protected virtual void Build () "gtk-connect" ); w1.Add (this.connectAction, null); + this.SyncCloudAction = new global::Gtk.Action ( + "SyncCloudAction", + global::Mono.Unix.Catalog.GetString("Sync (Cloud)"), + null, + null + ); + this.SyncCloudAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Sync (Cloud)"); + w1.Add (this.SyncCloudAction, null); + this.SyncWebBrowserAction = new global::Gtk.Action ( + "SyncWebBrowserAction", + global::Mono.Unix.Catalog.GetString("Sync (Web Browser)"), + null, + null + ); + this.SyncWebBrowserAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Sync (Web Browser)"); + w1.Add (this.SyncWebBrowserAction, null); this.UIManager.InsertActionGroup (w1, 0); this.AddAccelGroup (this.UIManager.AccelGroup); this.Name = "MPfm.GTK.Windows.MainWindow"; @@ -358,7 +376,7 @@ protected virtual void Build () this.vboxMain = new global::Gtk.VBox (); this.vboxMain.Name = "vboxMain"; // Container child vboxMain.Gtk.Box+BoxChild - this.UIManager.AddUiFromString (""); + this.UIManager.AddUiFromString (""); this.menubarMain = ((global::Gtk.MenuBar)(this.UIManager.GetWidget ("/menubarMain"))); this.menubarMain.Name = "menubarMain"; this.vboxMain.Add (this.menubarMain); @@ -476,7 +494,6 @@ protected virtual void Build () w12.Fill = false; // Container child hbox4.Gtk.Box+BoxChild this.vbox3 = new global::Gtk.VBox (); - this.vbox3.Name = "vbox3"; this.vbox3.Spacing = 6; // Container child vbox3.Gtk.Box+BoxChild this.hbox5 = new global::Gtk.HBox (); @@ -1085,6 +1102,8 @@ protected virtual void Build () this.actionAddFolder.Activated += new global::System.EventHandler (this.OnActionAddFolderActivated); this.actionPlayLoop.Activated += new global::System.EventHandler (this.OnActionPlayLoopActivated); this.connectAction.Activated += new global::System.EventHandler (this.OnActionSyncLibrary); + this.SyncCloudAction.Activated += new global::System.EventHandler (this.OnActionSyncCloudActivated); + this.SyncWebBrowserAction.Activated += new global::System.EventHandler (this.OnActionSyncWebBrowserActivated); this.cboSoundFormat.Changed += new global::System.EventHandler (this.OnSoundFormatChanged); this.treeLibraryBrowser.RowActivated += new global::Gtk.RowActivatedHandler (this.OnTreeLibraryBrowserRowActivated); this.treeLibraryBrowser.CursorChanged += new global::System.EventHandler (this.OnTreeLibraryBrowserCursorChanged); diff --git a/MPfm/MPfm.GTK/gtk-gui/gui.stetic b/MPfm/MPfm.GTK/gtk-gui/gui.stetic index 8b84d2cf..ae1947a2 100644 --- a/MPfm/MPfm.GTK/gtk-gui/gui.stetic +++ b/MPfm/MPfm.GTK/gtk-gui/gui.stetic @@ -211,6 +211,18 @@ gtk-connect + + Action + Sync (Cloud) + Sync (Cloud) + + + + Action + Sync (Web Browser) + Sync (Web Browser) + + MPfm: Music Player for Musicians @@ -243,7 +255,10 @@ - + + + + @@ -4185,4 +4200,263 @@ + + + SyncCloudWindow + CenterOnParent + + + + 6 + 6 + + + + 0 + Sync (Cloud) + + + 0 + True + False + False + + + + + + 0 + Dropbox + + + 1 + True + False + False + + + + + + 0 + Dropbox + + + 2 + True + False + False + + + + + + 0 + Dropbox + + + 3 + True + False + False + + + + + + 0 + Dropbox + + + 4 + True + False + False + + + + + + True + TextOnly + Enable Dropbox Sync + True + + + 5 + True + False + False + + + + + + True + TextOnly + Disable Dropbox Sync + True + + + 6 + True + False + False + + + + + + True + TextOnly + Pull + True + + + 7 + True + False + False + + + + + + True + TextOnly + Push + True + + + 8 + True + False + False + + + + + + True + TextOnly + Delete + True + + + 9 + True + False + False + + + + + + + + + + + SyncWebBrowserWindow + CenterOnParent + + + + 6 + 6 + + + + 0 + Sync (Web Browser) + + + 0 + True + False + False + + + + + + 0 + Step 1: + + + 1 + True + False + False + + + + + + 0 + Open a web browser and enter the following url in the address bar: + + + 2 + True + False + False + + + + + + http://192.168.1.1:53551 + + + 3 + True + False + False + + + + + + 0 + Step 2: + + + 4 + True + False + False + + + + + + 0 + Enter the following authentication code and click on the Login button: + + + 5 + True + False + False + + + + + + 00000 + + + 6 + True + False + False + + + + + + + + \ No newline at end of file