linux: Log status icon type
This commit is contained in:
parent
07e9943f06
commit
a906be5d39
|
@ -71,17 +71,7 @@ namespace SparkleShare
|
|||
|
||||
public void Run (string [] args)
|
||||
{
|
||||
if (Array.IndexOf (args, "--status-icon=gtk") > -1) {
|
||||
StatusIcon.use_appindicator = false;
|
||||
Logger.LogInfo ("Environment", "Arguments: --status-icon=gtk");
|
||||
}
|
||||
|
||||
#if HAVE_APPINDICATOR
|
||||
if (Array.IndexOf (args, "--status-icon=appindicator") > -1) {
|
||||
StatusIcon.use_appindicator = true;
|
||||
Logger.LogInfo ("Environment", "Arguments: --status-icon=appindicator");
|
||||
}
|
||||
#endif
|
||||
ParseArgs (args);
|
||||
|
||||
MethodInfo [] methods = typeof (GLib.Application).GetMethods (BindingFlags.Instance | BindingFlags.Public);
|
||||
ParameterInfo [] run_parameters = new ParameterInfo [0];
|
||||
|
@ -110,6 +100,26 @@ namespace SparkleShare
|
|||
}
|
||||
|
||||
|
||||
void ParseArgs (string [] args)
|
||||
{
|
||||
if (args.Length > 0)
|
||||
Logger.LogInfo ("Environment", "Arguments: " + string.Join (" ", args));
|
||||
|
||||
if (Array.IndexOf (args, "--status-icon=gtk") > -1)
|
||||
StatusIcon.use_appindicator = false;
|
||||
|
||||
#if HAVE_APPINDICATOR
|
||||
if (Array.IndexOf (args, "--status-icon=appindicator") > -1)
|
||||
StatusIcon.use_appindicator = true;
|
||||
#endif
|
||||
|
||||
if (StatusIcon.use_appindicator)
|
||||
Logger.LogInfo ("Environment", "Status Icon: AppIndicator");
|
||||
else
|
||||
Logger.LogInfo ("Environment", "Status Icon: GtkStatusIcon");
|
||||
}
|
||||
|
||||
|
||||
void ApplicationActivatedDelegate (object sender, EventArgs args)
|
||||
{
|
||||
if (application.Windows.Length > 0) {
|
||||
|
|
Loading…
Reference in a new issue