windows linux: Make UI components non-static

This commit is contained in:
Hylke Bons 2012-08-04 18:19:48 +02:00
parent c7b5d65bb7
commit 0502139d96
9 changed files with 18 additions and 20 deletions

View file

@ -44,7 +44,7 @@ namespace SparkleShare {
Title = "About SparkleShare";
AppPaintable = true;
string image_path = new string [] { SparkleUI.AssetsPath, "pixmaps", "about.png" }.Combine ();
string image_path = new string [] { Program.UI.AssetsPath, "pixmaps", "about.png" }.Combine ();
Realize ();
Gdk.Pixbuf buf = new Gdk.Pixbuf (image_path);

View file

@ -246,8 +246,8 @@ namespace SparkleShare {
if (html == null)
return;
string pixmaps_path = IO.Path.Combine (SparkleUI.AssetsPath, "pixmaps");
string icons_path = new string [] {SparkleUI.AssetsPath, "icons",
string pixmaps_path = IO.Path.Combine (Program.UI.AssetsPath, "pixmaps");
string icons_path = new string [] {Program.UI.AssetsPath, "icons",
"hicolor", "12x12", "status"}.Combine ();
html = html.Replace ("<!-- $body-font-size -->", (double) (Style.FontDescription.Size / 1024 + 3) + "px");

View file

@ -689,7 +689,7 @@ namespace SparkleShare {
string title = "Your shared project is ready!";
string subtext = "You can find the files in your SparkleShare folder.";
SparkleUI.Bubbles.Controller.ShowBubble (title, subtext, null);
Program.UI.Bubbles.Controller.ShowBubble (title, subtext, null);
}
Header = "Your shared project is ready!";

View file

@ -24,12 +24,11 @@ namespace SparkleShare {
public class SparkleUI {
// TODO: These don't need to be static
public static SparkleStatusIcon StatusIcon;
public static SparkleEventLog EventLog;
public static SparkleBubbles Bubbles;
public static SparkleSetup Setup;
public static SparkleAbout About;
public SparkleStatusIcon StatusIcon;
public SparkleEventLog EventLog;
public SparkleBubbles Bubbles;
public SparkleSetup Setup;
public SparkleAbout About;
public static string AssetsPath = Defines.INSTALL_DIR;

View file

@ -28,7 +28,7 @@ namespace SparkleShare {
{
IconTheme icon_theme = new IconTheme ();
icon_theme.AppendSearchPath (Path.Combine (SparkleUI.AssetsPath, "icons"));
icon_theme.AppendSearchPath (Path.Combine (Program.UI.AssetsPath, "icons"));
icon_theme.AppendSearchPath (
Path.Combine (Path.GetDirectoryName (SparkleConfig.DefaultConfig.FullPath), "icons"));

View file

@ -29,7 +29,7 @@ namespace SparkleShare {
Controller.ShowBubbleEvent += delegate (string title,
string subtext, string image_path) {
SparkleUI.StatusIcon.ShowBalloon (title, subtext, image_path);
Program.UI.StatusIcon.ShowBalloon (title, subtext, image_path);
};
}
}

View file

@ -361,7 +361,7 @@ namespace SparkleShare {
public void LinkClicked (string url)
{
SparkleUI.EventLog.Controller.LinkClicked (url);
Program.UI.EventLog.Controller.LinkClicked (url);
}
}
}

View file

@ -141,7 +141,7 @@ namespace SparkleShare {
cancel_button.Click += delegate {
Dispatcher.BeginInvoke ((Action) delegate {
SparkleUI.StatusIcon.Dispose ();
Program.UI.StatusIcon.Dispose ();
Controller.SetupPageCancelled ();
});
};

View file

@ -22,12 +22,11 @@ namespace SparkleShare {
public class SparkleUI {
// TODO: These don't need to be static
public static SparkleSetup Setup;
public static SparkleEventLog EventLog;
public static SparkleBubbles Bubbles;
public static SparkleStatusIcon StatusIcon;
public static SparkleAbout About;
public SparkleSetup Setup;
public SparkleEventLog EventLog;
public SparkleBubbles Bubbles;
public SparkleStatusIcon StatusIcon;
public SparkleAbout About;
public SparkleUI ()