diff --git a/SparkleShare/Linux/Makefile.am b/SparkleShare/Linux/Makefile.am index 5410ef99..a9a590bd 100644 --- a/SparkleShare/Linux/Makefile.am +++ b/SparkleShare/Linux/Makefile.am @@ -28,7 +28,6 @@ SOURCES = \ SparkleEventLog.cs \ SparkleSetup.cs \ SparkleSetupWindow.cs \ - SparkleSpinner.cs \ SparkleStatusIcon.cs \ SparkleUI.cs \ SparkleUIHelpers.cs diff --git a/SparkleShare/Linux/Pixmaps/icons/Makefile.am b/SparkleShare/Linux/Pixmaps/icons/Makefile.am index 175667c1..c6dd2af2 100755 --- a/SparkleShare/Linux/Pixmaps/icons/Makefile.am +++ b/SparkleShare/Linux/Pixmaps/icons/Makefile.am @@ -23,7 +23,6 @@ system_theme_icons = \ status,process-syncing-error-48.png app_theme_icons = \ - animations,process-working-22.png \ status,document-added-12.png \ status,document-edited-12.png \ status,document-deleted-12.png \ diff --git a/SparkleShare/Linux/Pixmaps/icons/process-working-22.png b/SparkleShare/Linux/Pixmaps/icons/process-working-22.png deleted file mode 100755 index 1b90a034..00000000 Binary files a/SparkleShare/Linux/Pixmaps/icons/process-working-22.png and /dev/null differ diff --git a/SparkleShare/Linux/SparkleEventLog.cs b/SparkleShare/Linux/SparkleEventLog.cs index b72363da..a731e013 100755 --- a/SparkleShare/Linux/SparkleEventLog.cs +++ b/SparkleShare/Linux/SparkleEventLog.cs @@ -39,7 +39,8 @@ namespace SparkleShare { private EventBox content_wrapper; private ScrolledWindow scrolled_window; // private WebView web_view; - private SparkleSpinner spinner; + private VBox spinner_wrapper; + private Spinner spinner; public SparkleEventLog () : base ("") @@ -86,27 +87,29 @@ namespace SparkleShare { layout_sizes.Add (this.history_label); VBox layout_vertical = new VBox (false, 0); - this.spinner = new SparkleSpinner (22); + this.spinner = new Spinner (); + this.spinner_wrapper = new VBox (); this.content_wrapper = new EventBox (); this.scrolled_window = new ScrolledWindow (); this.content_wrapper.OverrideBackgroundColor (StateFlags.Normal, new Gdk.RGBA () { Red = 1, Green = 1, Blue=1, Alpha = 1 }); -/* - this.web_view = new WebView () { - Editable = false - }; +// this.web_view = new WebView () { Editable = false }; +// this.web_view.NavigationRequested += WebViewNavigationRequested; - - this.web_view.NavigationRequested += WebViewNavigationRequested; -*/ -// this.scrolled_window.Add (this.web_view); +// this.scrolled_window.Add (this.web_view); this.scrolled_window.AddWithViewport (new Button ("WebView")); - this.content_wrapper.Add (this.spinner); - + + this.spinner_wrapper = new VBox (false, 0); + this.spinner_wrapper.PackStart (new Label(""), true, true, 0); + this.spinner_wrapper.PackStart (this.spinner, false, false, 0); + this.spinner_wrapper.PackStart (new Label(""), true, true, 0); + this.spinner.SetSizeRequest (24, 24); this.spinner.Start (); + this.content_wrapper.Add (this.spinner_wrapper); + this.layout_horizontal = new HBox (true, 0); this.layout_horizontal.PackStart (layout_sizes, true, true, 12); @@ -157,15 +160,11 @@ namespace SparkleShare { }; Controller.UpdateChooserEnablementEvent += delegate (bool enabled) { - Application.Invoke (delegate { - this.combo_box.Sensitive = enabled; - }); + Application.Invoke (delegate { this.combo_box.Sensitive = enabled; }); }; Controller.UpdateContentEvent += delegate (string html) { - Application.Invoke (delegate { - UpdateContent (html); - }); + Application.Invoke (delegate { UpdateContent (html); }); }; Controller.ContentLoadingEvent += delegate { @@ -173,7 +172,7 @@ namespace SparkleShare { if (this.content_wrapper.Child != null) this.content_wrapper.Remove (this.content_wrapper.Child); - this.content_wrapper.Add (this.spinner); + this.content_wrapper.Add (this.spinner_wrapper); this.spinner.Start (); this.content_wrapper.ShowAll (); }); diff --git a/SparkleShare/Linux/SparkleSpinner.cs b/SparkleShare/Linux/SparkleSpinner.cs deleted file mode 100755 index 84ab3b10..00000000 --- a/SparkleShare/Linux/SparkleSpinner.cs +++ /dev/null @@ -1,76 +0,0 @@ -// SparkleShare, a collaboration and sharing tool. -// Copyright (C) 2010 Hylke Bons -// -// This program 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. -// -// This program 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 this program. If not, see . - - -using System.Timers; -using Gtk; - -namespace SparkleShare { - - // This is a close implementation of GtkSpinner - public class SparkleSpinner : Image { - - private Timer timer; - - - public SparkleSpinner (int size) : base () - { - int current_frame = 0; - Gdk.Pixbuf spinner_gallery = SparkleUIHelpers.GetIcon ("process-working", size); - int frames_in_width = spinner_gallery.Width / size; - int frames_in_height = spinner_gallery.Height / size; - int frame_count = (frames_in_width * frames_in_height) - 1; - Gdk.Pixbuf [] frames = new Gdk.Pixbuf [frame_count]; - - int i = 0; - for (int y = 0; y < frames_in_height; y++) { - for (int x = 0; x < frames_in_width; x++) { - if (!(y == 0 && x == 0)) { - frames [i] = new Gdk.Pixbuf (spinner_gallery, x * size, y * size, size, size); - i++; - } - } - } - - timer = new Timer () { - Interval = 600 / frame_count - }; - - timer.Elapsed += delegate { - if (current_frame < frame_count - 1) - current_frame++; - else - current_frame = 0; - - Application.Invoke (delegate { - Pixbuf = frames [current_frame]; - }); - }; - } - - - public void Start () - { - timer.Start (); - } - - - public void Stop () - { - timer.Stop (); - } - } -}