statusicon: simplify status text update code. fixes menu item moving about in appindicator
This commit is contained in:
parent
8b8eefe93c
commit
67f8885cc1
|
@ -310,14 +310,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public void UpdateMenu ()
|
public void UpdateMenu ()
|
||||||
{
|
{
|
||||||
Menu.Remove (Menu.Children [0]);
|
((Menu.Children [0] as MenuItem).Child as Label).Text = StateText;
|
||||||
|
|
||||||
MenuItem status_menu_item = new MenuItem (StateText) {
|
|
||||||
Sensitive = false
|
|
||||||
};
|
|
||||||
|
|
||||||
Menu.Add (status_menu_item);
|
|
||||||
Menu.ReorderChild (status_menu_item, 0);
|
|
||||||
Menu.ShowAll ();
|
Menu.ShowAll ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue