windows statusicon: implement link code item. closes #1129
This commit is contained in:
parent
008736d229
commit
c228337e1b
|
@ -621,7 +621,7 @@ namespace SparkleShare {
|
|||
}
|
||||
|
||||
case 4: {
|
||||
Header = "Here's your unique link code";
|
||||
Header = "Here's your unique client ID";
|
||||
Description = "You'll need it whenever you want to link this computer to a host. " +
|
||||
"You can also find it in the status icon menu.";
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ namespace SparkleShare {
|
|||
});
|
||||
};
|
||||
|
||||
MenuItem link_code_item = new MenuItem ("Link Code");
|
||||
MenuItem link_code_item = new MenuItem ("Client ID");
|
||||
|
||||
if (Controller.LinkCodeItemEnabled) {
|
||||
link_code_item.Submenu = new Menu ();
|
||||
|
|
|
@ -657,7 +657,7 @@ namespace SparkleShare {
|
|||
}
|
||||
|
||||
case 4: {
|
||||
Header = "Here's your unique link code";
|
||||
Header = "Here's your unique client ID";
|
||||
Description = "You'll need it whenever you want to link this computer to a host. " +
|
||||
" You can also find it in the status icon menu.";
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ namespace SparkleShare {
|
|||
};
|
||||
|
||||
this.link_code_item = new NSMenuItem ();
|
||||
this.link_code_item.Title = "Link Code";
|
||||
this.link_code_item.Title = "Client ID";
|
||||
|
||||
if (Controller.LinkCodeItemEnabled) {
|
||||
this.link_code_submenu = new NSMenu ();
|
||||
|
|
|
@ -903,7 +903,7 @@ namespace SparkleShare {
|
|||
}
|
||||
|
||||
case 4: {
|
||||
Header = "Here's your unique link code";
|
||||
Header = "Here's your unique client ID";
|
||||
Description = "You'll need it whenever you want to link this computer to a host. " +
|
||||
"You can also find it in the status icon menu.";
|
||||
|
||||
|
|
|
@ -132,6 +132,20 @@ namespace SparkleShare {
|
|||
IsEnabled = Controller.RecentEventsItemEnabled
|
||||
};
|
||||
|
||||
SparkleMenuItem link_code_item = new SparkleMenuItem () { Header = "Client ID" };
|
||||
|
||||
if (Controller.LinkCodeItemEnabled) {
|
||||
SparkleMenuItem code_item = new SparkleMenuItem ();
|
||||
code_item.Header = Program.Controller.CurrentUser.PublicKey.Substring (0, 20) + "...";
|
||||
|
||||
SparkleMenuItem copy_item = new SparkleMenuItem () { Header = "Copy to Clipboard" };
|
||||
copy_item.Click += delegate { Controller.CopyToClipboardClicked (); };
|
||||
|
||||
link_code_item.Items.Add (code_item);
|
||||
link_code_item.Items.Add (new Separator);
|
||||
link_code_item.Items.Add (this.copy_item);
|
||||
}
|
||||
|
||||
CheckBox notify_check_box = new CheckBox () {
|
||||
Margin = new Thickness (6, 0, 0, 0),
|
||||
IsChecked = Program.Controller.NotificationsEnabled
|
||||
|
@ -219,6 +233,8 @@ namespace SparkleShare {
|
|||
folder_item.Items.Add (new Separator ());
|
||||
folder_item.Items.Add (notify_item);
|
||||
folder_item.Items.Add (new Separator ());
|
||||
folder_item.Items.Add (link_code_item);
|
||||
folder_item.Items.Add (new Separator ());
|
||||
folder_item.Items.Add (about_item);
|
||||
|
||||
this.context_menu.Items.Add (new Separator ());
|
||||
|
|
Loading…
Reference in a new issue