Esempio n. 1
0
    public static OpenWithMenu AppendMenuTo(Gtk.Menu menu, MimeFetcher mime_fetcher, bool with_icon)
    {
        Gtk.MenuItem open_with;

        if (with_icon)
        {
            Gtk.ImageMenuItem img_item = new Gtk.ImageMenuItem(menu_text);
            img_item.Image = new Gtk.Image("gtk-open", Gtk.IconSize.Menu);
            open_with      = img_item;
        }
        else
        {
            open_with = new Gtk.MenuItem(menu_text);
        }

        OpenWithMenu app_menu = new OpenWithMenu(mime_fetcher);

        open_with.Submenu = app_menu;
        open_with.ShowAll();
        open_with.Activated += app_menu.Populate;
        menu.Append(open_with);

        return(app_menu);
    }
	public static OpenWithMenu AppendMenuTo (Gtk.Menu menu, MimeFetcher mime_fetcher, bool with_icon)
	{
		Gtk.MenuItem open_with;
        
        if (with_icon) {
            Gtk.ImageMenuItem img_item = new Gtk.ImageMenuItem (menu_text);
            img_item.Image = new Gtk.Image ("gtk-open", Gtk.IconSize.Menu);
            open_with = img_item;
        } else {
            open_with = new Gtk.MenuItem (menu_text);
        }

		OpenWithMenu app_menu = new OpenWithMenu (mime_fetcher);
		open_with.Submenu = app_menu;
		open_with.ShowAll ();
		open_with.Activated += app_menu.Populate;
		menu.Append (open_with);

		return app_menu;
	}
	public static OpenWithMenu AppendMenuTo (Gtk.Menu menu, MimeFetcher mime_fetcher)
    {
        return AppendMenuTo (menu, mime_fetcher, false);
    }
	public OpenWithMenu (MimeFetcher mime_fetcher)
	{
		this.mime_fetcher = mime_fetcher;
	}
Esempio n. 5
0
 public OpenWithMenu(MimeFetcher mime_fetcher)
 {
     this.mime_fetcher = mime_fetcher;
 }
Esempio n. 6
0
 public static OpenWithMenu AppendMenuTo(Gtk.Menu menu, MimeFetcher mime_fetcher)
 {
     return(AppendMenuTo(menu, mime_fetcher, false));
 }