本文整理汇总了C#中Gtk.MenuItem.ShowAll方法的典型用法代码示例。如果您正苦于以下问题:C# Gtk.MenuItem.ShowAll方法的具体用法?C# Gtk.MenuItem.ShowAll怎么用?C# Gtk.MenuItem.ShowAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.MenuItem
的用法示例。
在下文中一共展示了Gtk.MenuItem.ShowAll方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MenuItemBackend
public MenuItemBackend(Gtk.MenuItem item)
{
this.item = item;
label = (Gtk.Label) item.Child;
item.ShowAll ();
}
示例2: AddCreateItemLabel
void AddCreateItemLabel()
{
HideSpacerItem ();
Gtk.Label emptyLabel = new Gtk.Label ();
emptyLabel.Xalign = 0;
emptyLabel.Markup = "<i><span foreground='darkgrey'>" + Catalog.GetString ("Click to create menu") + "</span></i>";
Gtk.MenuItem mit = new Gtk.MenuItem ();
mit.Child = emptyLabel;
mit.ButtonPressEvent += OnNewItemPress;
Insert (mit, -1);
mit.ShowAll ();
addLabel = mit;
}
示例3: UpdateMenu
void UpdateMenu ()
{
//
// Clear out the old list
//
foreach (Gtk.MenuItem old_item in menu.Children) {
menu.Remove (old_item);
}
//
// Build a new list
//
foreach (BacklinkMenuItem item in GetBacklinkMenuItems ()) {
item.ShowAll ();
menu.Append (item);
}
// If nothing was found, add in a "dummy" item
if (menu.Children.Length == 0) {
// This is a disabled placeholder item for an empty menu
Gtk.MenuItem blank_item = new Gtk.MenuItem (Catalog.GetString ("(none)"));
blank_item.Sensitive = false;
blank_item.ShowAll ();
menu.Append (blank_item);
}
submenu_built = true;
}
示例4: UpdateMenu
void UpdateMenu ()
{
//
// Clear out the old list
//
foreach (Gtk.MenuItem old_item in menu.Children) {
menu.Remove (old_item);
}
Tasque.RemoteControl tasque = GetTasqueRemoteControl ();
string [] taskCategories = null;
if (tasque != null) {
try {
taskCategories = tasque.GetCategoryNames ();
} catch (Exception e) {
Logger.Debug ("Exception calling Tasque.GetCategoryNames (): {0}",
e.Message);
}
}
if (taskCategories != null) {
//
// Build a new list
//
foreach (string category in taskCategories) {
CategoryMenuItem item = new CategoryMenuItem (category);
item.Activated += OnCategoryActivated;
item.ShowAll ();
menu.Append (item);
}
}
// If nothing was found, add in a "dummy" item
if (menu.Children.Length == 0) {
Gtk.MenuItem blankItem =
new Gtk.MenuItem (Catalog.GetString ("--- Tasque is not running ---"));
blankItem.Sensitive = false;
blankItem.ShowAll ();
menu.Append (blankItem);
}
submenuBuilt = true;
}
示例5: MenuItemBackend
public MenuItemBackend()
{
item = new Gtk.ImageMenuItem ("");
label = (Gtk.Label) item.Child;
item.ShowAll ();
}