windows linux: Make UI components non-static
This commit is contained in:
parent
08f2588d48
commit
5ec4c6cf26
|
@ -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);
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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!";
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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"));
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -361,7 +361,7 @@ namespace SparkleShare {
|
|||
|
||||
public void LinkClicked (string url)
|
||||
{
|
||||
SparkleUI.EventLog.Controller.LinkClicked (url);
|
||||
Program.UI.EventLog.Controller.LinkClicked (url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@ namespace SparkleShare {
|
|||
|
||||
cancel_button.Click += delegate {
|
||||
Dispatcher.BeginInvoke ((Action) delegate {
|
||||
SparkleUI.StatusIcon.Dispose ();
|
||||
Program.UI.StatusIcon.Dispose ();
|
||||
Controller.SetupPageCancelled ();
|
||||
});
|
||||
};
|
||||
|
|
|
@ -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 ()
|
||||
|
|
Loading…
Reference in a new issue