Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

87 lines (70 sloc) 2.433 kb
// 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
// 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;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
#if __MonoCS__
using Gtk;
using Mono.Unix;
using Mono.Unix.Native;
using System.Windows.Forms;
using SparkleLib;
namespace SparkleShare {
public class SparkleUI {
public static SparkleStatusIcon StatusIcon;
public static SparkleEventLog EventLog;
public static SparkleBubbles Bubbles;
public static SparkleSetup Setup;
public static SparkleAbout About;
public static string AssetsPath =
new string [] {Defines.PREFIX, "share", "sparkleshare"}.Combine ();
// Short alias for the translations
public static string _(string s)
return Program._ (s);
public SparkleUI ()
// Initialize the application
#if __MonoCS__
Application.Init ();
// Use translations
Catalog.Init (Defines.GETTEXT_PACKAGE, Defines.LOCALE_DIR);
Setup = new SparkleSetup ();
EventLog = new SparkleEventLog ();
About = new SparkleAbout ();
Bubbles = new SparkleBubbles ();
StatusIcon = new SparkleStatusIcon ();
if (Program.Controller.FirstRun)
Program.Controller.ShowSetupWindow (PageType.Setup);
// Runs the application
public void Run ()
Application.Run ();
#if !__MonoCS__
StatusIcon.Dispose ();
Jump to Line
Something went wrong with that request. Please try again.