linux: Log status icon type
This commit is contained in:
parent
b5c3005a8b
commit
052181a4d0
|
@ -71,17 +71,7 @@ namespace SparkleShare
|
||||||
|
|
||||||
public void Run (string [] args)
|
public void Run (string [] args)
|
||||||
{
|
{
|
||||||
if (Array.IndexOf (args, "--status-icon=gtk") > -1) {
|
ParseArgs (args);
|
||||||
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
|
|
||||||
|
|
||||||
MethodInfo [] methods = typeof (GLib.Application).GetMethods (BindingFlags.Instance | BindingFlags.Public);
|
MethodInfo [] methods = typeof (GLib.Application).GetMethods (BindingFlags.Instance | BindingFlags.Public);
|
||||||
ParameterInfo [] run_parameters = new ParameterInfo [0];
|
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)
|
void ApplicationActivatedDelegate (object sender, EventArgs args)
|
||||||
{
|
{
|
||||||
if (application.Windows.Length > 0) {
|
if (application.Windows.Length > 0) {
|
||||||
|
|
Loading…
Reference in a new issue