Jim,

You nailed it!

It was a stupid coincident that the Fedora test case didn't work out.
I tried it with the first code example, which was wrong anyway.
Repeated it with the second one and the Fedora test worked out ok.

You're comment on unity made me feel....stupid i didn't think of that myself :-)

So, it worked all along, "hidden" by unity in the global menu. I don't
even like the global menu!

Greetz,
Fred



2011/7/30 Jim Nelson <j...@yorba.org>:
> What occurred to me just now is that under Unity (on Ubuntu) they've patched
> GTK to not show the menubar in the window but across the top of the screen.
>
> But, if you're seeing the same behavior in Fedora 15, I'm fully stumped.  As
> I said, works fine for me.
>
> -- Jim
>
> On Fri, Jul 29, 2011 at 1:31 PM, Fred van Zwieten <fvzwie...@gmail.com>
> wrote:
>>
>> To add a bit to the mystery: I've tried it with Gtk.ToolBar instead of
>> Gtk.MenuBar and that works as expected.
>>
>> Greetz,
>> Fred
>>
>>
>>
>> 2011/7/29 Fred van Zwieten <fvzwie...@gmail.com>:
>> > OK, i'm now on Fedora 15, installed vala and gtk2-devel
>> >
>> > vala-0.12.0-2.fc15.x86_64
>> > gtk2-devel-2.24.4-2.fc15.x86_64
>> >
>> > problem is still here !?!
>> >
>> > Greetz,
>> > Fred
>> >
>> >
>> >
>> > 2011/7/29 Fred van Zwieten <fvzwie...@gmail.com>:
>> >> I'm on Ubuntu 11.04
>> >> I have looked at the libgtk* packages and both 2.0 and 3.0 packages
>> >> are installed. There is only one libgtk2.0-dev.
>> >>
>> >> I have a fedora 15 partition also. I will boot into it and try it
>> >> there.
>> >>
>> >> Keep you posted...
>> >>
>> >> Greetz,
>> >> Fred
>> >>
>> >>
>> >>
>> >> 2011/7/29 Jim Nelson <j...@yorba.org>:
>> >>> Weird.  I guess it could be a version problem, but it's not like your
>> >>> code
>> >>> does anything that's out of the blue.  As I said, I see the File menu
>> >>> and
>> >>> the Quit item and it works fine.
>> >>>
>> >>> I'm using Fedora 15.  What distro and you on and what version of GTK?
>> >>>
>> >>> -- Jim
>> >>>
>> >>> On Fri, Jul 29, 2011 at 12:43 PM, Fred van Zwieten
>> >>> <fvzwie...@gmail.com>
>> >>> wrote:
>> >>>>
>> >>>> Could this be a version / library / bnidings problem?
>> >>>>
>> >>>> Greetz,
>> >>>> Fred
>> >>>>
>> >>>>
>> >>>>
>> >>>> 2011/7/29 Fred van Zwieten <fvzwie...@gmail.com>:
>> >>>> > Hi,
>> >>>> >
>> >>>> > I am seeing absolutely nothing. A white empty window 600x600. No
>> >>>> > menu in
>> >>>> > sight.
>> >>>> >
>> >>>> > About the gtk issue. Well, there is vala code and gtk code, so i'm
>> >>>> > not
>> >>>> > sure what causes it. But great you wanna help out anyways.
>> >>>> >
>> >>>> > Greetz,
>> >>>> > Fred
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> > 2011/7/29 Jim Nelson <j...@yorba.org>:
>> >>>> >> I built it that way.  I see the window and the menu bar.
>> >>>> >>
>> >>>> >> Maybe you should tell me what you're seeing and how that's
>> >>>> >> different
>> >>>> >> than
>> >>>> >> what you expect to see.
>> >>>> >>
>> >>>> >> I should also add that this is technically a GTK problem, not a
>> >>>> >> Vala
>> >>>> >> issue,
>> >>>> >> so I'm answering off-list.
>> >>>> >>
>> >>>> >> -- Jim
>> >>>> >>
>> >>>> >> On Fri, Jul 29, 2011 at 12:32 PM, Fred van Zwieten
>> >>>> >> <fvzwie...@gmail.com>
>> >>>> >> wrote:
>> >>>> >>>
>> >>>> >>> valac --pkg gtk+-2.0 menusystem.vala
>> >>>> >>>
>> >>>> >>> Greetz,
>> >>>> >>> Fred
>> >>>> >>>
>> >>>> >>>
>> >>>> >>>
>> >>>> >>> 2011/7/29 Jim Nelson <j...@yorba.org>:
>> >>>> >>> > It works for me.  Are you sure you're building it correctly?
>> >>>> >>> >
>> >>>> >>> > -- Jim
>> >>>> >>> >
>> >>>> >>> > On Fri, Jul 29, 2011 at 12:26 PM, Fred van Zwieten
>> >>>> >>> > <fvzwie...@gmail.com>
>> >>>> >>> > wrote:
>> >>>> >>> >>
>> >>>> >>> >> Yes,
>> >>>> >>> >>
>> >>>> >>> >> Sorry, that was the first try, of course, but that also
>> >>>> >>> >> doesn't
>> >>>> >>> >> work.
>> >>>> >>> >> Code:
>> >>>> >>> >>
>> >>>> >>> >> using Gtk;
>> >>>> >>> >>
>> >>>> >>> >> class menusystem : Gtk.Window
>> >>>> >>> >> {
>> >>>> >>> >>    public menusystem ()
>> >>>> >>> >>    {
>> >>>> >>> >>        this.title = "Menu System Demo";
>> >>>> >>> >>        this.destroy.connect (Gtk.main_quit);
>> >>>> >>> >>        set_default_size (600, 600);
>> >>>> >>> >>
>> >>>> >>> >>        var menubar = new MenuBar();
>> >>>> >>> >>        var file_menu = new Menu();
>> >>>> >>> >>        var quit_item=new MenuItem.with_mnemonic("_Quit");
>> >>>> >>> >>        file_menu.append(quit_item);
>> >>>> >>> >>        quit_item.activate.connect(Gtk.main_quit);
>> >>>> >>> >>        var file_launcher=new MenuItem.with_mnemonic("_File");
>> >>>> >>> >>        file_launcher.set_submenu(file_menu);
>> >>>> >>> >>        menubar.append(file_launcher);
>> >>>> >>> >>
>> >>>> >>> >>        var vbox = new VBox (false, 0);
>> >>>> >>> >>        vbox.pack_start (menubar,false,false,0);
>> >>>> >>> >>        add (vbox);
>> >>>> >>> >>    }
>> >>>> >>> >>
>> >>>> >>> >>    static int main (string[] args)
>> >>>> >>> >>    {
>> >>>> >>> >>        Gtk.init (ref args);
>> >>>> >>> >>
>> >>>> >>> >>        var mymenu = new menusystem ();
>> >>>> >>> >>        mymenu.show_all();
>> >>>> >>> >>
>> >>>> >>> >>        Gtk.main ();
>> >>>> >>> >>
>> >>>> >>> >>        return 0;
>> >>>> >>> >>    }
>> >>>> >>> >> }
>> >>>> >>> >>
>> >>>> >>> >>
>> >>>> >>> >> Greetz,
>> >>>> >>> >> Fred
>> >>>> >>> >>
>> >>>> >>> >>
>> >>>> >>> >>
>> >>>> >>> >> 2011/7/29 Iven Hsu <ive...@gmail.com>:
>> >>>> >>> >> > I think you should add(vbox), instead of add(menubar).
>> >>>> >>> >> >
>> >>>> >>> >> > 2011/7/30 Fred van Zwieten <fvzwie...@gmail.com>
>> >>>> >>> >> >>
>> >>>> >>> >> >> Hi.
>> >>>> >>> >> >>
>> >>>> >>> >> >> I try to make a menubar, taking examples from vala toolbar
>> >>>> >>> >> >> demo
>> >>>> >>> >> >> and
>> >>>> >>> >> >> a
>> >>>> >>> >> >> pygtk tutorial. I have this sample code:
>> >>>> >>> >> >>
>> >>>> >>> >> >> using Gtk;
>> >>>> >>> >> >>
>> >>>> >>> >> >> class menusystem : Gtk.Window
>> >>>> >>> >> >> {
>> >>>> >>> >> >>    public menusystem ()
>> >>>> >>> >> >>    {
>> >>>> >>> >> >>        this.title = "Menu System Demo";
>> >>>> >>> >> >>        this.destroy.connect (Gtk.main_quit);
>> >>>> >>> >> >>        set_default_size (600, 600);
>> >>>> >>> >> >>
>> >>>> >>> >> >>        var menubar = new MenuBar();
>> >>>> >>> >> >>        var file_menu = new Menu();
>> >>>> >>> >> >>        var quit_item=new MenuItem.with_mnemonic("_Quit");
>> >>>> >>> >> >>        file_menu.append(quit_item);
>> >>>> >>> >> >>        quit_item.activate.connect(Gtk.main_quit);
>> >>>> >>> >> >>        var file_launcher=new
>> >>>> >>> >> >> MenuItem.with_mnemonic("_File");
>> >>>> >>> >> >>        file_launcher.set_submenu(file_menu);
>> >>>> >>> >> >>        menubar.append(file_launcher);
>> >>>> >>> >> >>
>> >>>> >>> >> >>        var vbox = new VBox (false, 0);
>> >>>> >>> >> >>        vbox.pack_start (menubar,false,false,0);
>> >>>> >>> >> >>        add (menubar);
>> >>>> >>> >> >>    }
>> >>>> >>> >> >>
>> >>>> >>> >> >>    static int main (string[] args)
>> >>>> >>> >> >>    {
>> >>>> >>> >> >>        Gtk.init (ref args);
>> >>>> >>> >> >>
>> >>>> >>> >> >>        var mymenu = new menusystem ();
>> >>>> >>> >> >>        mymenu.show_all();
>> >>>> >>> >> >>
>> >>>> >>> >> >>        Gtk.main ();
>> >>>> >>> >> >>
>> >>>> >>> >> >>        return 0;
>> >>>> >>> >> >>    }
>> >>>> >>> >> >> }
>> >>>> >>> >> >>
>> >>>> >>> >> >> The menubar doesn't show up. Why not?
>> >>>> >>> >> >>
>> >>>> >>> >> >> Greetz,
>> >>>> >>> >> >> Fred
>> >>>> >>> >> >> _______________________________________________
>> >>>> >>> >> >> vala-list mailing list
>> >>>> >>> >> >> vala-list@gnome.org
>> >>>> >>> >> >> http://mail.gnome.org/mailman/listinfo/vala-list
>> >>>> >>> >> >
>> >>>> >>> >> >
>> >>>> >>> >> _______________________________________________
>> >>>> >>> >> vala-list mailing list
>> >>>> >>> >> vala-list@gnome.org
>> >>>> >>> >> http://mail.gnome.org/mailman/listinfo/vala-list
>> >>>> >>> >
>> >>>> >>> >
>> >>>> >>
>> >>>> >>
>> >>>> >
>> >>>
>> >>>
>> >>
>> >
>
>
_______________________________________________
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to