View Full Version : Mac-style Menu Bar for GTK and Java/Swing applications!
Pages :
1
2
3
4
5
[
6]
7
8
9
10
11
12
denisesballs
December 10th, 2007, 01:55 AM
Hey guys, all the packages installed fine on my Gutsy install, but all I see when I add the applet is the labels on the task bar and no MacMenu. What am I missing here and why do I see this question like every page with no answer? Shouldn't this be on the wiki?
CyberLine
December 10th, 2007, 06:18 AM
Hey guys, all the packages installed fine on my Gutsy install, but all I see when I add the applet is the labels on the task bar and no MacMenu. What am I missing here and why do I see this question like every page with no answer? Shouldn't this be on the wiki?
same here ...
ayoli
December 10th, 2007, 07:19 AM
same here ...
first, note that the gtk mac menu hack won't work with XUL apps (ie : firefox) Java swing apps (ie : open office) and all kde apps or non gtk apps.
(edit: added this note to the wiki page (https://wiki.ubuntu.com/global_menu))
now, try to open a gtk app (ie nautilus file browser, thunar file browser).
if the menu not detached of his parent window, gtk isn't patched.
timoswe
December 10th, 2007, 03:41 PM
I can't get the Mac Menu to work. I have followed the first installation method and use mac4lin theme. The only additional thing I can see on the bottom panel after i added the Mac Menu is a black text that shows the active application. See below. Have I missed something?
Nevermind, I thought it was another mac like dock, duh.
Anyway, nice work. Keep it up!
sowelie
December 11th, 2007, 02:13 PM
Guys, I have a mess on my hands. I used the first (packages) method to install. I cannot uninstall now. I tried using synaptic to force a version but it just switches back to the hacked version before I can even apply the changes. I also tried downloading the old version of the package and it would not install because of unmet dependencies. Any help is much appreciated!
sowelie
December 11th, 2007, 03:16 PM
I fixed the problem. I didn't realize aptitude was so good at resolving conflicts! I re-installed the human theme through aptitude, and in doing so it fixed my lib gtk conflict by downgrading back to the old one.
ayoli
December 11th, 2007, 05:13 PM
I fixed the problem. I didn't realize aptitude was so good at resolving conflicts! I re-installed the human theme through aptitude, and in doing so it fixed my lib gtk conflict by downgrading back to the old one.
glad you find a way to solve your problem :)
btw, your posts learn us that
aptitude is better than apt (I already known this one)
we should add to the wiki page a section to explain how to force/downgrade version with apt
the wiki methods numers should start a 1 instead of 0
I havent got the time to do this mods tonight, I'll do these tomorrow if anyone have done.
flamelab
December 11th, 2007, 05:20 PM
I just installed the Μac Applet !
It is http://www.adslgr.com/forum/images/smilies/respekt.gif perfect !
cyberbuff
December 12th, 2007, 01:37 AM
What's the dock i should use?
Yuzem
December 12th, 2007, 09:47 AM
The most popular one is AWN (http://awn.wetpaint.com/page/Ubuntu+Feisty+Repository?t=anon)
flamelab
December 12th, 2007, 09:53 AM
The most popular is AWN (http://awn.wetpaint.com/page/Ubuntu+Feisty+Repository?t=anon)
:lolflag: I agree , I've got the same !
I hope it were in the default repos ...:( , even in Gutsy ...
Is there going to be an x64 bit mac applet ? I wanted that when I used x64 Gutsy once ...
mangar
December 12th, 2007, 10:44 AM
please note that there are several questions on gnome's bugzilla,
regarding this patch
http://bugzilla.gnome.org/show_bug.cgi?id=353076
please answer them (if you have answers).
shuttleworthwannabe
December 13th, 2007, 05:58 AM
Thank you all for the great work on getting this theme to work. I was thinking if there was a central place where all the latest development have been laid out step-by-step for a noobie to folow to install and use the theme. Also if there is a single *.deb file thatone could click on that would take care of all the contingencies and issues discussed here.
Thanks
PS: I am not programmer, but wish to ry out new things all the time.
Many thanks again,.S
lsd
December 14th, 2007, 12:59 PM
Anybody (pre)compiled DEBs for XFCE in Gutsy? It seems that there's only GNOME in the world!
isaacj87
December 14th, 2007, 01:15 PM
Wow,
Apparently I've come into the game a little late! Anywho, this project looks fantastic...Quick question before I install...Can someone show me/tell me where I can see a lot of screenshots of this applet in action? For example, I'd like to see a lot of pics with the drop-down menu in action...
Thanks!
EDIT: Nevermind! I found a good video on YouTube.
ondope
December 17th, 2007, 04:20 PM
A few hundred pages back, someone wrote something about having the menu not to display GNOME but a standard menu instead with File, Edit etc.. Anyone who remembers that? How did Aqd accomplish that?
rainwoodman
December 18th, 2007, 12:09 AM
Hi, everyone,
In case this will be usefull:
I made a patch for gnome-menubar-applet. It will add two buttons for scrolling the menu, if it is too long for the panel.
The idea is to embed the GNotebook widget into a GLayout widget.
The patch is against the aur source:
http://aur.archlinux.org/packages.php?do_Details=1&ID=13071&O=0&L=0&C=0&K=gnome-macmenu-applet&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd
I also attached the patched c code.
I also attached a rpm file for building it in Fedora 8.
then I attach the spec file for building gtk2-aqd under Fedora 8.
You'll need to install gtk2-2.12.1-5.fc8.src.rpm and download the patch from http://aur.archlinux.org/packages.php?do_Details=1&ID=13002&O=0&L=0&C=0&K=gtk2-aqd&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd
to build it.
The new package will be named as gtk2-aqd. It obsoletes the original gtk2 package.
faical117
December 18th, 2007, 10:44 AM
wow !!!! thanks
mangar
December 20th, 2007, 05:54 AM
@rainwoodman
do you mind updating the wiki?
https://wiki.ubuntu.com/global_menu
thank you!
Tiede
December 20th, 2007, 01:06 PM
Hey! I love your work but unfortunatey, it seem to have a few kinks...
Gnome's Macmenu application seems to break xaralx.
Could it be some weird conflicting dependencies?
XaraLX crash dump:
sample@ubuntu:~$ xaralx
(xaralx:8564): Gdk-CRITICAL **: gdk_window_get_origin: assertion `GDK_IS_WINDOW (window)' failed
(xaralx:8564): Gdk-CRITICAL **: gdk_window_get_origin: assertion `GDK_IS_WINDOW (window)' failed
(xaralx:8564): Gdk-CRITICAL **: gdk_window_get_origin: assertion `GDK_IS_WINDOW (window)' failed
*** glibc detected *** xaralx: double free or corruption (out): 0x0a8949c0 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb7646d65]
/lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb764a800]
/usr/lib/libglib-2.0.so.0(g_free+0x31)[0xb7864961]
xaralx[0x8c18958]
xaralx[0x8c18e46]
xaralx[0x8c5c9ce]
xaralx[0x8cfa33d]
xaralx[0x8cf87f2]
xaralx[0x8c9c100]
xaralx[0x8c9d597]
xaralx[0x8105df4]
xaralx[0x8107569]
xaralx[0x80629bb]
xaralx[0x89a3863]
xaralx[0x88e4857]
xaralx[0x84f42f8]
xaralx[0x8675893]
xaralx[0x8091a0a]
xaralx[0x806e498]
xaralx[0x8d1c408]
xaralx[0x8dab558]
xaralx[0x8daaadc]
xaralx[0x8dab6dd]
xaralx[0x8c6170d]
xaralx[0x8dab67d]
xaralx[0x8c3095c]
/usr/lib/libgobject-2.0.so.0(g_cclosure_marshal_VOID__VOID+0x49)[0xb790cc09]
/usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x122)[0xb78ff772]
/usr/lib/libgobject-2.0.so.0[0xb7910323]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x8c7)[0xb7911847]
/usr/lib/libgobject-2.0.so.0(g_signal_emit+0x29)[0xb7911a09]
/usr/lib/libgtk-x11-2.0.so.0(gtk_widget_activate+0x58)[0xb7e8d758]
/usr/lib/libgtk-x11-2.0.so.0(gtk_menu_shell_activate_item+0x14a)[0xb7d77afa]
/usr/lib/libgtk-x11-2.0.so.0[0xb7d79698]
/usr/lib/libgtk-x11-2.0.so.0[0xb7d702c8]
/usr/lib/libgtk-x11-2.0.so.0(_gtk_marshal_BOOLEAN__BOXED+0x5e)[0xb7d6a32e]
/usr/lib/libgobject-2.0.so.0[0xb78fdf89]
/usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x122)[0xb78ff772]
/usr/lib/libgobject-2.0.so.0[0xb7910973]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x68f)[0xb791160f]
/usr/lib/libgobject-2.0.so.0(g_signal_emit+0x29)[0xb7911a09]
/usr/lib/libgtk-x11-2.0.so.0[0xb7e88c08]
/usr/lib/libgtk-x11-2.0.so.0(gtk_propagate_event+0x14f)[0xb7d634bf]
/usr/lib/libgtk-x11-2.0.so.0(gtk_main_do_event+0x307)[0xb7d646d7]
/usr/lib/libgdk-x11-2.0.so.0[0xb7bcfb9a]
/usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x17c)[0xb785d11c]
/usr/lib/libglib-2.0.so.0[0xb786055f]
/usr/lib/libglib-2.0.so.0(g_main_loop_run+0x1a9)[0xb7860909]
/usr/lib/libgtk-x11-2.0.so.0(gtk_main+0xb4)[0xb7d64b34]
xaralx[0x8cf7279]
xaralx[0x8c4ba52]
xaralx[0x8c4bb8a]
xaralx[0x8d5a6cd]
xaralx[0x805f43b]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0)[0xb75f3050]
xaralx[0x805ee91]
======= Memory map: ========
08048000-092cf000 r-xp 00000000 08:05 1735008 /usr/bin/xaralx
092cf000-093e4000 rw-p 01287000 08:05 1735008 /usr/bin/xaralx
093e4000-0a8cb000 rw-p 093e4000 00:00 0 [heap]
b5a00000-b5a21000 rw-p b5a00000 00:00 0
b5a21000-b5b00000 ---p b5a21000 00:00 0
b5bbd000-b5cd5000 r-xp 00000000 08:05 1733497 /usr/lib/libxml2.so.2.6.30
b5cd5000-b5cda000 rw-p 00118000 08:05 1733497 /usr/lib/libxml2.so.2.6.30
b5cda000-b5cdb000 rw-p b5cda000 00:00 0
b5cdb000-b5d0d000 r-xp 00000000 08:05 1734213 /usr/lib/libcroco-0.6.so.3.0.1
b5d0d000-b5d10000 rw-p 00031000 08:05 1734213 /usr/lib/libcroco-0.6.so.3.0.1
b5d10000-b5d40000 r-xp 00000000 08:05 1733469 /usr/lib/libgsf-1.so.114.0.7
b5d40000-b5d43000 rw-p 0002f000 08:05 1733469 /usr/lib/libgsf-1.so.114.0.7
b5d43000-b5d44000 rw-p b5d43000 00:00 0
b5d44000-b5d74000 r-xp 00000000 08:05 1734630 /usr/lib/librsvg-2.so.2.18.2
b5d74000-b5d75000 rw-p 00030000 08:05 1734630 /usr/lib/librsvg-2.so.2.18.2
b5d75000-b5dcf000 r--p 00000000 08:05 2389165 /home/sample/.fonts/arial.ttf
b5dcf000-b5dd3000 r-xp 00000000 08:05 1815274 /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so
b5dd3000-b5dd4000 rw-p 00003000 08:05 1815274 /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so
b5dd5000-b5e60000 r--p 00000000 08:05 1945903 /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf
b5e60000-b631c000 rw-p b5e60000 00:00 0
b631c000-b637c000 rw-s 00000000 00:08 19824657 /SYSV00000000 (deleted)
b637c000-b63cc000 r--p 00000000 08:05 1947699 /usr/share/fonts/truetype/freefont/FreeSerifItalic.ttf
b63cc000-b63ce000 r-xp 00000000 08:05 1929600 /usr/lib/pango/1.6.0/modules/pango-basic-fc.so
b63ce000-b63cf000 rw-p 00001000 08:05 1929600 /usr/lib/pango/1.6.0/modules/pango-basic-fc.so
b63cf000-b63d5000 r--p 00000000 08:05 2404Abandon (core dumped)
sample@ubuntu:~$
Steps to repeat: with macmenu installed,
fire up xaralx.
Select an option that requires a dialog box (File->Page Options; File->Print Options; Utilites->Options)
Strangely, the "import", "export", and "open file" dialogs work fine...
Observation: XaraLX closes without warning.
I want to blame libpango for it, but obviously I don't know the inner workings of Gnome...
If it's not libpango, it might be libgtk2.0-0, but trying to downgrade it back to 'gutsy' messes a lot of things that have nothing to do with the macmenu at all... like beep-media-player, for example...
Anyone knows what libraries are affected by macmenu that could have this adverse effect?
ayoli
December 20th, 2007, 04:35 PM
Hey! I love your work but unfortunatey, it seem to have a few kinks...
Gnome's Macmenu application seems to break xaralx.
Could it be some weird conflicting dependencies?
XaraLX crash dump:
sample@ubuntu:~$ xaralx
(xaralx:8564): Gdk-CRITICAL **: gdk_window_get_origin: assertion `GDK_IS_WINDOW (window)' failed
(xaralx:8564): Gdk-CRITICAL **: gdk_window_get_origin: assertion `GDK_IS_WINDOW (window)' failed
(xaralx:8564): Gdk-CRITICAL **: gdk_window_get_origin: assertion `GDK_IS_WINDOW (window)' failed
*** glibc detected *** xaralx: double free or corruption (out): 0x0a8949c0 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb7646d65]
/lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb764a800]
/usr/lib/libglib-2.0.so.0(g_free+0x31)[0xb7864961]
xaralx[0x8c18958]
xaralx[0x8c18e46]
xaralx[0x8c5c9ce]
xaralx[0x8cfa33d]
xaralx[0x8cf87f2]
xaralx[0x8c9c100]
xaralx[0x8c9d597]
xaralx[0x8105df4]
xaralx[0x8107569]
xaralx[0x80629bb]
xaralx[0x89a3863]
xaralx[0x88e4857]
xaralx[0x84f42f8]
xaralx[0x8675893]
xaralx[0x8091a0a]
xaralx[0x806e498]
xaralx[0x8d1c408]
xaralx[0x8dab558]
xaralx[0x8daaadc]
xaralx[0x8dab6dd]
xaralx[0x8c6170d]
xaralx[0x8dab67d]
xaralx[0x8c3095c]
/usr/lib/libgobject-2.0.so.0(g_cclosure_marshal_VOID__VOID+0x49)[0xb790cc09]
/usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x122)[0xb78ff772]
/usr/lib/libgobject-2.0.so.0[0xb7910323]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x8c7)[0xb7911847]
/usr/lib/libgobject-2.0.so.0(g_signal_emit+0x29)[0xb7911a09]
/usr/lib/libgtk-x11-2.0.so.0(gtk_widget_activate+0x58)[0xb7e8d758]
/usr/lib/libgtk-x11-2.0.so.0(gtk_menu_shell_activate_item+0x14a)[0xb7d77afa]
/usr/lib/libgtk-x11-2.0.so.0[0xb7d79698]
/usr/lib/libgtk-x11-2.0.so.0[0xb7d702c8]
/usr/lib/libgtk-x11-2.0.so.0(_gtk_marshal_BOOLEAN__BOXED+0x5e)[0xb7d6a32e]
/usr/lib/libgobject-2.0.so.0[0xb78fdf89]
/usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x122)[0xb78ff772]
/usr/lib/libgobject-2.0.so.0[0xb7910973]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x68f)[0xb791160f]
/usr/lib/libgobject-2.0.so.0(g_signal_emit+0x29)[0xb7911a09]
/usr/lib/libgtk-x11-2.0.so.0[0xb7e88c08]
/usr/lib/libgtk-x11-2.0.so.0(gtk_propagate_event+0x14f)[0xb7d634bf]
/usr/lib/libgtk-x11-2.0.so.0(gtk_main_do_event+0x307)[0xb7d646d7]
/usr/lib/libgdk-x11-2.0.so.0[0xb7bcfb9a]
/usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x17c)[0xb785d11c]
/usr/lib/libglib-2.0.so.0[0xb786055f]
/usr/lib/libglib-2.0.so.0(g_main_loop_run+0x1a9)[0xb7860909]
/usr/lib/libgtk-x11-2.0.so.0(gtk_main+0xb4)[0xb7d64b34]
xaralx[0x8cf7279]
xaralx[0x8c4ba52]
xaralx[0x8c4bb8a]
xaralx[0x8d5a6cd]
xaralx[0x805f43b]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0)[0xb75f3050]
xaralx[0x805ee91]
======= Memory map: ========
08048000-092cf000 r-xp 00000000 08:05 1735008 /usr/bin/xaralx
092cf000-093e4000 rw-p 01287000 08:05 1735008 /usr/bin/xaralx
093e4000-0a8cb000 rw-p 093e4000 00:00 0 [heap]
b5a00000-b5a21000 rw-p b5a00000 00:00 0
b5a21000-b5b00000 ---p b5a21000 00:00 0
b5bbd000-b5cd5000 r-xp 00000000 08:05 1733497 /usr/lib/libxml2.so.2.6.30
b5cd5000-b5cda000 rw-p 00118000 08:05 1733497 /usr/lib/libxml2.so.2.6.30
b5cda000-b5cdb000 rw-p b5cda000 00:00 0
b5cdb000-b5d0d000 r-xp 00000000 08:05 1734213 /usr/lib/libcroco-0.6.so.3.0.1
b5d0d000-b5d10000 rw-p 00031000 08:05 1734213 /usr/lib/libcroco-0.6.so.3.0.1
b5d10000-b5d40000 r-xp 00000000 08:05 1733469 /usr/lib/libgsf-1.so.114.0.7
b5d40000-b5d43000 rw-p 0002f000 08:05 1733469 /usr/lib/libgsf-1.so.114.0.7
b5d43000-b5d44000 rw-p b5d43000 00:00 0
b5d44000-b5d74000 r-xp 00000000 08:05 1734630 /usr/lib/librsvg-2.so.2.18.2
b5d74000-b5d75000 rw-p 00030000 08:05 1734630 /usr/lib/librsvg-2.so.2.18.2
b5d75000-b5dcf000 r--p 00000000 08:05 2389165 /home/sample/.fonts/arial.ttf
b5dcf000-b5dd3000 r-xp 00000000 08:05 1815274 /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so
b5dd3000-b5dd4000 rw-p 00003000 08:05 1815274 /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so
b5dd5000-b5e60000 r--p 00000000 08:05 1945903 /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf
b5e60000-b631c000 rw-p b5e60000 00:00 0
b631c000-b637c000 rw-s 00000000 00:08 19824657 /SYSV00000000 (deleted)
b637c000-b63cc000 r--p 00000000 08:05 1947699 /usr/share/fonts/truetype/freefont/FreeSerifItalic.ttf
b63cc000-b63ce000 r-xp 00000000 08:05 1929600 /usr/lib/pango/1.6.0/modules/pango-basic-fc.so
b63ce000-b63cf000 rw-p 00001000 08:05 1929600 /usr/lib/pango/1.6.0/modules/pango-basic-fc.so
b63cf000-b63d5000 r--p 00000000 08:05 2404Abandon (core dumped)
sample@ubuntu:~$
Steps to repeat: with macmenu installed,
fire up xaralx.
Select an option that requires a dialog box (File->Page Options; File->Print Options; Utilites->Options)
Strangely, the "import", "export", and "open file" dialogs work fine...
Observation: XaraLX closes without warning.
I want to blame libpango for it, but obviously I don't know the inner workings of Gnome...
If it's not libpango, it might be libgtk2.0-0, but trying to downgrade it back to 'gutsy' messes a lot of things that have nothing to do with the macmenu at all... like beep-media-player, for example...
Anyone knows what libraries are affected by macmenu that could have this adverse effect?
No, I don't know what libs could be related to this.
But you can disable macmenu for this app using the GTK_MENUBAR_NO_MAC environment variable.
Tiede
December 21st, 2007, 12:53 PM
Thanks for the quick reply, ayoli.
Unfortunately, using that does not undo the damage...
I may need to uninstall macmenu completely and deal with the broken packages myself afterwards.
What I did:
created a file named .gnomerc in my home folder.
edited the file with the text export GTK_MENUBAR_NO_MAC=1
logged out and back in gnome.
result:No change, xaralx still crashes.
I'm wondering whether i am blaming the wrong app, but the problem is that was the only thing I added and/or updated before the app started acting weird... Should I file a bug against xaralx, macmenu, both?
***EDIT***
The problem aforementioned is entirely unrelated to macmenus, and was a mistake on my part. Thanks ayoli for helping me figure it out. Besides, an entry about my problem is posted elsewhere on the forums (http://ubuntuforums.org/showthread.php?t=600659)...
ayoli
December 21st, 2007, 01:02 PM
Thanks for the quick reply, ayoli.
Unfortunately, using that does not undo the damage...
I may need to uninstall macmenu completely and deal with the broken packages myself afterwards.
What I did:
created a file named .gnomerc in my home folder.
edited the file with the text export GTK_MENUBAR_NO_MAC=1
logged out and back in gnome.
result:No change, xaralx still crashes.
I'm wondering whether i am blaming the wrong app, but the problem is that was the only thing I added and/or updated before the app started acting weird... Should I file a bug against xaralx, macmenu, both?
Using a patched gtk with GTK_MENUBAR_NO_MAC=1 is like using a non patched gtk so, the bug must come from the app I mean xaralx).
teolemon
December 22nd, 2007, 09:49 AM
Good news, a testing process is being done as part of the Google Highly Open Participation Contest.
http://code.google.com/p/google-highly-open-participation-gnome/issues/detail?id=75&colspec=ID%20Status%20ClaimedBy%20Summary
rainwoodman
December 22nd, 2007, 05:59 PM
@mangar
Sorry, I can't modify the wiki. I am not a ubuntu user and I don't have a launchpad account.
Kimmik
December 22nd, 2007, 07:02 PM
AAHHH!!!
Warning!
I used the howto in the wiki to install the .debs and it messed my system up!!
Before installing the .debs make sure that you have activated the backports in synaptic! Because you need libpango1.0-0 version 1.18.3.
Zoasterboy
December 22nd, 2007, 08:30 PM
Hi folks!
I'm doing the testing on the Global Menu Bar for the Google Highly Open Participation Contest.
Rather than sort through all 100+ pages of this thread, I thought I'd ask what some common problems/bugs people have seen with the Menu Bar so I can try and replicate em'.
I already have a short list of my own:
The Mac Menu Bar and the User Switch applet do not agree with each other
The far right side of the Menu is statically attached to the right side of the Panel
The height of the menu is static, so when the Panel is too large it leaves space around the menu buttons (A problem shown by Fits' Law)
Menu does not show at all when the panel is on the right or left side of the screen.
The right side of the menu distorts when being moved
Changing the background of the panel has no effect on the menu.
Also, I just followed the instructions (click here) (https://wiki.ubuntu.com/global_menu) to install. Is this the latest version, or have any patches been created?
with a little work, this could be a very solid and useful piece of software. I hope I can help!
rainwoodman
December 22nd, 2007, 09:28 PM
Hi everyone,
I located a few bugs and made
some fixes for gnome-macmenu-applet with scrolling:
* Fixed the random seg faults when removing the applet from panel. (hopefully)
+when quiting, disconnect signals(desktop signals and socket signals) before destroying private data structures.
* Fixed the dull app title label(last time it always display GNOME)
* Move the menubar a little bit higher, so that clicking the top of the screen will also emit the menus.
The patched source and a source rpm is provided.
mangar
December 23rd, 2007, 02:52 AM
wiki edited, thanks rainwoodman!
we really need some sort of svn/ git/ whatever...
preliminary code review:
1. hard coded application name exceptions are bad..
2. MacMenu --> GlobalMenu.
3. some functions are too big.
rainwoodman
December 23rd, 2007, 03:14 AM
@mangar
Yes. you are right, a svn will be very helpful.
I am going to learn some XML programming and see if I can remove the hard code part.
I know nothing about XFCE developing, so the XFCE part of the code perhaps have already been messed up.
Another big problem is gtk_socket_steal is inherently unreliable and is deprecated, according to the gtk documentation. A fix for it requires modifying the gtk-menubar patch, making it to expose the menubar through a hidden GtkPlug object, and to store plug's window id somewhere where gnome-macmenu-applet can access(perhaps by calling a dbus method exposed by the applet?). I can't find a easy way to debug gtk2, so this fix will be impossible by now.
I wonder if a rewriting of gnome-macmenu-applet(rename to gnome-globalmenu-applet, wipe out the XFCE code, XMLize the name translation, leave space for GtkPlug) is necessary.
Also, it is very annoying that I can't read the stderr and stdout of the applet. Even if I start gnome-panel from a terminal, it outputs nothing. Do you/anybody else have some idea to reach the streams?
teolemon
December 23rd, 2007, 06:48 AM
There is also one pending question regarding design: -should it display the nautilus menus while on desktop, or the traditionnal menus (apps, places ,system) or both ?
-I don't think it's really beaking the rules to tell you as well so frequent problems: firefox, java apps do not work, nor does xaralx.
-I'd say test it with all the default programs of big distros, as well as popular proprietary ones (Skype, Opera...)
-as you've said skinning would be pretty cool.
-can you dig the pango issue raised higher
-it needs a clean uninstall procedure (removing the applet leaves the menus litteraly in the air)
I haven't tested the patch yet, but I'd really like to thank you for giving love to the global menu.
rainwoodman
December 23rd, 2007, 04:49 PM
here is also one pending question regarding design: -should it display the nautilus menus while on desktop, or the traditionnal menus (apps, places ,system) or both ?
: nautilus doesn't register a menu for the desktop window. So We can NOT display a menu for desktop, unless we modify nautilus.
-I don't think it's really beaking the rules to tell you as well so frequent problems: firefox, java apps do not work, nor does xaralx.
A: firefox and OOo use a different way to construct menus. They draw their own widgets which looks exactly the same as native ones. The reason that they can't have GlobalMenu is because gtk don't know they have menubar. On the other hand, at least some SWT programs works sweetly, eg, TuxGuitar.(The long menu of TuxGuitar pushed me to make the global menu scrollable). I will attach a screenshot.
-I'd say test it with all the default programs of big distros, as well as popular proprietary ones (Skype, Opera...)
A: Skype dont have a menu and is a QT app. Opera is another QT app. Gtk knows nothing about QT. However, if QT apps can have global menu, our globalmenu-applet should respect them and deal with it correctly.
-as you've said skinning would be pretty cool.
A: skinning will (possibly) break the consistence with the panel.
-can you dig the pango issue raised higher
-it needs a clean uninstall procedure (removing the applet leaves the menus litteraly in the air)
A: Another possibility is removing the applet disappears all the menus. Unfortunately I can't see a way to let the menus reappear *in* the applications on the fly. Since we are adopting a global menu, if the global menubar daemon(applet) dies, it is expected that all applications will malfunction before restarted in a non-global menu mode.
teolemon
December 23rd, 2007, 05:44 PM
By skinning i meant being transparent (i.e. we only see the panel itself, any any panel skinning won't be hidden by the global menu, which I experienced)
For the desktop, I guess it would be nice to have Nautilus in the long term register menus for the desktop, even if not shown by default. On the short term, it might just be to have global menu display optionally Apps/Places/System (because as shown in your screenshot some user prefer to keep this full menu all the time while some other keep the small one with just an icon)
I was wondering whether there was a long-term solution for Qt, Java, Xul .. apps. Would it mean modifying GTK or modifying those respective toolkits ?
Finally for the uninstall procedure, if I remember well (have removed the global menu two weeks ago), rebooting or restarting GNOME doesn't solve the problem in the old version of the patch.
I feel that I'll install soon your new patched version which seems to bring in a number of improvements.
rainwoodman
December 23rd, 2007, 09:17 PM
Currently the architecture of GlobalMenu is
1. Patched gtk-menubar creates new window which only contains a menubar widget and with a name "GTK MENUBAR". The window belongs to the application.
2. macmenu-applet searches all the window with a name "GTK MENUBAR" and steal them into GtkSockets. GtkSockets move a remote window into macmenu-applet's interface.
Thus the menubars are remote(the owner is still another process), although they appear in the applet. To improve the appearance, more patches to gtk2 is necessary. I am trying to do this. But not sure whether I can achieve some improvmeent.
I am cleaning up the code and begun to rewrite the entire applet.
The Attachment applet is a beginning. However I am possible to debug both GTK-aqd and the applet now.
1. working under a un-hacked gtk2
2. compile the panel in a standalone mode (-DSTANDALONE).
3. compile the hacked gtk2 in a local direcectory (eg /home/rainwoodman/gtk2-aqd/src/.libs )
4. launch app use env LD_LIBRARY_PATH=/home/rainwoodman/gtk2-aqd/src/.libs {app name here}
BTW: I this 'applet' also tries to load an icon for the current window.
I hope anjuta has put everything in the tarball.
Where can I setup an CVS/SVN for this?
teolemon
December 24th, 2007, 06:13 AM
For the cvs/svn, I guess you have quite a few choices:
-require a gnome svn directory and account (I don't know if there are any criteria)
-use Google Code (very easy to set up, svn system, bug tracking and wiki pages..)
-use Sourceforge.net (more functionality, but a visual and usability pain, plus historically some svn downtimes)
-use Launchpad (Ubuntu's integrated system, but it uses bzr afaik)
I'd be for the time being for Google Code ( http://code.google.com/hosting ) given the current scale of the project (but that's my two cents)
rainwoodman
December 24th, 2007, 05:46 PM
It took me some time to figure out how to use svn.
anyway, a svn is set up at:
http://gnome2-globalmenu.googlecode.com/svn/branches/1.0/trunk/
This is the latest stable release.
However, patching gtk2 and installing still needs a lot of manual work.
# Non-members may check out a read-only working copy anonymously over HTTP.
svn checkout http://gnome2-globalmenu.googlecode.com/svn/branches/1.0/trunk/ gnome2-globalmenu-read-only
Note /trunk contains a new written applet and doesn't work well now.
ayoli
December 24th, 2007, 05:52 PM
It took me some time to figure out how to use svn.
anyway, a svn is set up at:
http://gnome2-globalmenu.googlecode.com/svn/branches/1.0/trunk/
This is the latest stable release.
However, patching gtk2 and installing still needs a lot of manual work.
Hi,
Welcome here and thank you for your coding effort :) (also merry xmas !)
I'm thinking about launching a globalmenu blog soon, are you ALL interested ?
If yes I'll launch it in the first days of 2008 :)
see ya
rainwoodman
December 24th, 2007, 09:42 PM
Sure!
Merry Chirsmas!
Neo4
December 24th, 2007, 09:43 PM
hy people,
i've hacked my gtkrc file so i can have the same image background as my panel but when the mac menu is empty or with pidgin it was no image on the background but the color system...
anyone knows what is needed to change to have both working?
Thanks a lot!
rainwoodman
December 25th, 2007, 10:01 AM
Now the gtk2-aqd in
http://gnome2-globalmenu.googlecode.com/svn/trunk/
supports Alt key and F10 shortcuts!
The key is don't remove the key_press_handler after the
menubar is reparented from orig_toplevel_win.
instead, reconnect the signal after remove_from_window,
and use mbar_window as a parameter.
After that, in the handler,
call gtk_window_activate_key on the mbar_toplevel_window with the
I also provided a make file for compiling on Fedora.
make sure you've set up your rpmbuild tree by
rpmdev-setuptree
then check out the source and make rpm
I don't have ubuntu. If any one can provide an auto install script for gtk2-aqd on ubuntu, please let me know.
svn checkout http://gnome2-globalmenu.googlecode.com/svn/trunk/ gnome2-globalmenu-read-only
cd gnome2-globalmenu-read-only/gtk2-aqd
env RPMDEVROOT=~/rpmbuild make setup
make patch
rpmbuild -ba gtk2-aqd.spec
Trying out the new gnome2-globalmenu-applet is also welcomed. (lacking functionality, though)
cd gnome2-globalmenu-applet/src
make
cd ../..
cd gnome2-globalmenu-test/src
make
cd ../..
./runtest.sh
teolemon
December 25th, 2007, 01:37 PM
Although I feel a bit helpless due to my technical limitations, I wanted to offer help for translations, wikification, promotion or help of any kind (although I'll be back to school assignments tomorrow, I can find some time during the evenings).
I just want to thank you for the work being done, and I was wondering if you would adopt this project after the ghop task is finished. If so, count me in for French translations, wordsmithing, communication, relations with other projects and promotion (that's what I study at school, among other things) or any other task (I can learn or do various tasks as I did with Cheese, the GNOME photobooth application).
rainwoodman
December 25th, 2007, 03:46 PM
@teolemon,
Thank you for the offer!
the applet and the patch does'nt have any string resources now.
But surely in the futher it will have some.
How to add you to the project list? perhaps I need your google account? I'll add some gconf and a bonobo .server file today, then make a pre-2.0 branch. and the whole thing will be usable for users.
rainwoodman
December 26th, 2007, 04:07 AM
Gnome2-globalmenu 0.2.1 is out.
New features:
+Press Alt and F10 in application window will invoke menus
+New look and feel for scrolling long menubars
+Added Application Icon, and application title appears as a tooltip.
+Automatic gtk2-aqd build tool for fedora with guide README
+Sample bonobo .server file for the Applet
+Standalone mode applet for easy debugging
-Removed application title's label
-Doesn't respect KDE's floating menubars.
http://gnome2-globalmenu.googlecode.com/svn/branches/0.2.1/
lacks ubuntu Installation guide
christmas gift?
Hope you will enjoy it!
v1ncent
December 26th, 2007, 11:12 AM
Hi everyone... Im about to install this Mac-style bar, and i need to know something:
Immediately after i install it, the menu bar (from the windows) disappear, right? and that happen whit all users or only whit me?
Because this system have other users, and they don't want this mac-style menu. What do i have to do to install this menu only for me?
Another thing: i just download the packages to install this mac-style bar, and i see 10 .DEBs under the GTK folder, i have to install them all?
I suppose i do, but i ask it anyway
Thank you very much! =)
Neo4
December 26th, 2007, 11:55 AM
it would be great if anyone could make deb packages of this new version!
echelon89
December 26th, 2007, 12:33 PM
it would be great if anyone could make deb packages of this new version!
et voią! :)
http://echelon89.altervista.org/download/gtk-patchate/view-category.htmll
I am going to create a repository....
Neo4
December 26th, 2007, 02:02 PM
mediafire will be better because it isn't necessary to register to download...
it's only the gobalmenu 0.2 deb needed? if so i can upload it on mediafire.
thanks a lot!
edit: i've installed the deb and nothing changed to me from the other version.. still no icon on the topbar menu etc... and iv' restarted with ctrl+alt+backspace
echelon89
December 26th, 2007, 03:45 PM
wait a minute...
which is the source of the macmenu-applet?
however, the debian folder T've used is here...
You can build your own deb adding this folder to the sources and running these commands:
./configure --prefix=/usr
debuild binary
and sorry for my bad english :(
rainwoodman
December 26th, 2007, 04:04 PM
Added some downloads.
http://code.google.com/p/gnome2-globalmenu/downloads/list
+ Fedora 8 RPMs (Which successfully installed on my computer) for gdk2-aqd and gnome2-globalmenu-applet
+ a buildable tarball (anjuta's default one is unbuildable!)
Neo4
December 26th, 2007, 04:38 PM
sorry but i'm not understanding... i've followed the wiki to install the previouse version.. what should i do to install this new one?
rainwoodman
December 26th, 2007, 04:41 PM
better than mine, though. :)
rainwoodman
December 26th, 2007, 04:43 PM
Wait for some debian installation guide. I cann't write that since I am no debian user. sorry.
I have written a Fedora guide at
[http://code.google.com/p/gnome2-globalmenu/wiki/FedoraInstallationGuide]
Hope it will be helpfull.
sorry but i'm not understanding... i've followed the wiki to install the previouse version.. what should i do to install this new one?
teolemon
December 26th, 2007, 05:06 PM
Ok, so I've taken the plunge with the tarball.
./configure outputs this:
pierre@slamtwo:~/gnome2-globalmenu-applet-0.2$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
pierre@slamtwo:~/gnome2-globalmenu-applet-0.2$
Here is the config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by gnome2-globalmenu-applet configure 0.2, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ ./configure
## --------- ##
## Platform. ##
## --------- ##
hostname = mycomputer
uname -m = i686
uname -r = 2.6.22-14-generic
uname -s = Linux
uname -v = #1 SMP Tue Dec 18 08:02:57 UTC 2007
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2042: checking for a BSD-compatible install
configure:2098: result: /usr/bin/install -c
configure:2109: checking whether build environment is sane
configure:2152: result: yes
configure:2180: checking for a thread-safe mkdir -p
configure:2219: result: /bin/mkdir -p
configure:2232: checking for gawk
configure:2262: result: no
configure:2232: checking for mawk
configure:2248: found /usr/bin/mawk
configure:2259: result: mawk
configure:2270: checking whether make sets $(MAKE)
configure:2291: result: yes
configure:2481: checking whether to enable maintainer-specific portions of Makefiles
configure:2490: result: no
configure:2516: checking for style of include used by make
configure:2544: result: GNU
configure:2614: checking for gcc
configure:2630: found /usr/bin/gcc
configure:2641: result: gcc
configure:2879: checking for C compiler version
configure:2886: gcc --version >&5
gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2889: $? = 0
configure:2896: gcc -v >&5
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.1.3 --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
configure:2899: $? = 0
configure:2906: gcc -V >&5
gcc: '-V' option must have argument
configure:2909: $? = 1
configure:2932: checking for C compiler default output file name
configure:2959: gcc conftest.c >&5
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure:2962: $? = 1
configure:3000: result:
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "gnome2-globalmenu-applet"
| #define PACKAGE_TARNAME "gnome2-globalmenu-applet"
| #define PACKAGE_VERSION "0.2"
| #define PACKAGE_STRING "gnome2-globalmenu-applet 0.2"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "gnome2-globalmenu-applet"
| #define VERSION "0.2"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3007: error: C compiler cannot create executables
See `config.log' for more details.
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_F77_set=
ac_cv_env_F77_value=
ac_cv_env_FFLAGS_set=
ac_cv_env_FFLAGS_value=
ac_cv_env_GNOME2_GLOBALMENU_APPLET_CFLAGS_set=
ac_cv_env_GNOME2_GLOBALMENU_APPLET_CFLAGS_value=
ac_cv_env_GNOME2_GLOBALMENU_APPLET_LIBS_set=
ac_cv_env_GNOME2_GLOBALMENU_APPLET_LIBS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_PKG_CONFIG_set=
ac_cv_env_PKG_CONFIG_value=
ac_cv_env_TEST_CLIENT_CFLAGS_set=
ac_cv_env_TEST_CLIENT_CFLAGS_value=
ac_cv_env_TEST_CLIENT_LIBS_set=
ac_cv_env_TEST_CLIENT_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=mawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} /home/pierre/gnome2-globalmenu-applet-0.2/missing --run aclocal-1.10'
ALL_LINGUAS=''
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='${SHELL} /home/pierre/gnome2-globalmenu-applet-0.2/missing --run tar'
AR=''
AUTOCONF='${SHELL} /home/pierre/gnome2-globalmenu-applet-0.2/missing --run autoconf'
AUTOHEADER='${SHELL} /home/pierre/gnome2-globalmenu-applet-0.2/missing --run autoheader'
AUTOMAKE='${SHELL} /home/pierre/gnome2-globalmenu-applet-0.2/missing --run automake-1.10'
AWK='mawk'
CATALOGS=''
CATOBJEXT=''
CC='gcc'
CCDEPMODE=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CXX=''
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS=''
CYGPATH_W='echo'
DATADIRNAME=''
DEFS=''
DEPDIR='.deps'
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
F77=''
FFLAGS=''
GETTEXT_PACKAGE=''
GMOFILES=''
GMSGFMT=''
GNOME2_GLOBALMENU_APPLET_CFLAGS=''
GNOME2_GLOBALMENU_APPLET_LIBS=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
INSTOBJEXT=''
INTLLIBS=''
INTLTOOL_CAVES_RULE=''
INTLTOOL_DESKTOP_RULE=''
INTLTOOL_DIRECTORY_RULE=''
INTLTOOL_EXTRACT=''
INTLTOOL_KBD_RULE=''
INTLTOOL_KEYS_RULE=''
INTLTOOL_MERGE=''
INTLTOOL_OAF_RULE=''
INTLTOOL_PERL=''
INTLTOOL_POLICY_RULE=''
INTLTOOL_PONG_RULE=''
INTLTOOL_PROP_RULE=''
INTLTOOL_SCHEMAS_RULE=''
INTLTOOL_SERVER_RULE=''
INTLTOOL_SERVICE_RULE=''
INTLTOOL_SHEET_RULE=''
INTLTOOL_SOUNDLIST_RULE=''
INTLTOOL_THEME_RULE=''
INTLTOOL_UI_RULE=''
INTLTOOL_UPDATE=''
INTLTOOL_XAM_RULE=''
INTLTOOL_XML_NOMERGE_RULE=''
INTLTOOL_XML_RULE=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LN_S=''
LTLIBOBJS=''
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO='${SHELL} /home/pierre/gnome2-globalmenu-applet-0.2/missing --run makeinfo'
MKINSTALLDIRS=''
MSGFMT=''
MSGFMT_OPTS=''
OBJEXT=''
PACKAGE='gnome2-globalmenu-applet'
PACKAGE_BUGREPORT=''
PACKAGE_NAME='gnome2-globalmenu-applet'
PACKAGE_STRING='gnome2-globalmenu-applet 0.2'
PACKAGE_TARNAME='gnome2-globalmenu-applet'
PACKAGE_VERSION='0.2'
PATH_SEPARATOR=':'
PKG_CONFIG=''
POFILES=''
POSUB=''
PO_IN_DATADIR_FALSE=''
PO_IN_DATADIR_TRUE=''
RANLIB=''
SED=''
SET_MAKE=''
SHELL='/bin/bash'
STRIP=''
TEST_CLIENT_CFLAGS=''
TEST_CLIENT_LIBS=''
USE_NLS=''
VERSION='0.2'
XGETTEXT=''
ac_ct_CC='gcc'
ac_ct_CXX=''
ac_ct_F77=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include='include'
am__isrc=''
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='$(SHELL) /home/pierre/gnome2-globalmenu-applet-0.2/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='/bin/mkdir -p'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE_NAME "gnome2-globalmenu-applet"
#define PACKAGE_TARNAME "gnome2-globalmenu-applet"
#define PACKAGE_VERSION "0.2"
#define PACKAGE_STRING "gnome2-globalmenu-applet 0.2"
#define PACKAGE_BUGREPORT ""
#define PACKAGE "gnome2-globalmenu-applet"
#define VERSION "0.2"
configure: exit 77
I was wondering which additional librairies were needed (with developpement files, -dev packages)
rainwoodman
December 26th, 2007, 05:25 PM
/usr/bin/ld: crt1.o: No such file: No such file or directory ?
I am also wondering..
Looks like a compiler configuration bug. can you compile any other programs?
The problem I have for 0.2 branch is intltool related. I have solved it, but the version numbers are now completely messy.
I am now correcting them.
it requires libwnck, gtk2/gtk2-aqd to build. (and their dependencies, also)
teolemon
December 26th, 2007, 06:23 PM
Yes... stupid mistake...I had a fresh install and I haven't compiled anything on this install to keep it clean (I find compiling intellectually unsatisfactory as opposed to packages :-D).
Installing libgtk2.0-dev and the dependancies it requires already solved a bunch of problems.
Now it spits the following
checking for intltool >= 0.35.0... awk: cannot open ./intltool-update.in (No such file or directory)
awk: cannot open ./intltool-update.in (No such file or directory)
found
./configure: line 7515: test: : integer expression expected
configure: error: Your intltool is too old. You need intltool 0.35.0 or later.
pierre@slamtwo:~/gnome2-globalmenu-applet-0.2$
I'm trying to avoid installing all the packages required on the current tuto as it's not a minimal list, and I'd like to nail down what packages we really need to build.
Can you give some precisions on the problems you encountered with intltool?
EDIT: I'm really tired, solving the pb myself.
EDIT2: Nope, still the same pb after installing intltool. Btw, shouldn't it spit a different error message if intltool isn't installed, and if a too old version is installed ?
rainwoodman
December 26th, 2007, 06:33 PM
Just try this new tarball
http://gnome2-globalmenu.googlecode.com/files/gnome2-globalmenu-applet-0.2.1.tar.gz
or checkout the svn 0.2.1
It was a bug of anjuta and intltool. I have to manually edit the .am file and add
intltool_in_files = intltool-extract.in\
intltool-merge.in\
intltool-update.in
intltool_files = intltool-extract intltool-merge intltool-update
EXTRA_DIST = $(gnome2_globalmenu_appletdoc_DATA) $(intltool_in_files)
DISTCLEANFILES = $(intltool_files)
teolemon
December 26th, 2007, 06:52 PM
It seems I could compile. Now for the reality test... Relaunching Gnome..
teolemon
December 26th, 2007, 07:07 PM
So basically I did everything I've written on the wiki, that is to say configure and compile the tarball. Nothing shows up in the applet selection window. So basically i guess gtk2-aqd was needed too ? Or was it included in the package ?
rainwoodman
December 26th, 2007, 08:14 PM
Well I don't think you need to relaunch gnome.
To have the applet, you also need a bonobo's .server file at /usr/lib/bonobo/servers or somewhere else.
A sample .server file is included in the tarball. You have to replace "APP_LOCATION" with the actual location where the executable stays.
After put the .server file in the correct location, the applet will
appear in the applet list.
A make install doesn't install the .server file for 2 reasons:
1. I don't know how to do it with autotools
2. The location for bonobo/servers varies on different distributions.
gtk2-aqd is part of globalmenu project now. (http://gnome2-globalmenu.googlecode.com/svn/branches/0.2.1/gtk2-aqd/)
You have to install it systemwidely to make all your gtk application respect a global menubar. Or you can compile the library and override the particular application's gtk-libraries by setting the env LD_LIBRARY_PATH
(actually this is how I debug the aqd patch). The way to do this is covered in the FedoraInstallation guide.
v1ncent
December 26th, 2007, 08:17 PM
Could someone answer me, please? =)
http://ubuntuforums.org/showpost.php?p=4017276&postcount=1294
I would like to install this, but i need to know that^ things first.
rainwoodman
December 26th, 2007, 08:37 PM
You have to add globalmenu applet to you gnome panel.
I think there is no easy way to install the gtk2-aqd systemwidely while disabling it for other uses, at present.
However you can compile the source of gtk2-aqd yourself and
put the compiled libraries in your home folder,
then add into (maybe your .gnomerc)
export LD_LIBRARY_PATH=(your_gtk2-aqd_build_root/gtk/.libs)
This may or may not be helpful since I didn't test the gnomerc part myself. (though I am actually using a similar trick to debug gtk2-aqd)
Hi everyone... Im about to install this Mac-style bar, and i need to know something:
Immediately after i install it, the menu bar (from the windows) disappear, right? and that happen whit all users or only whit me?
Because this system have other users, and they don't want this mac-style menu. What do i have to do to install this menu only for me?
Another thing: i just download the packages to install this mac-style bar, and i see 10 .DEBs under the GTK folder, i have to install them all?
I suppose i do, but i ask it anyway
Thank you very much! =)
killbill
December 26th, 2007, 09:57 PM
Hi, rainwoodman,
Could you please give me some info on how to compile gtk2-aqd from svn for gutsy ?
Coz it seems firendly for rpm users only.
Ie tried the .debs and compile and apt build. But still no changes--The menubar remains attached to itś window. Do I need gtk2.12.1?
rainwoodman
December 26th, 2007, 10:42 PM
I really know nothing about gutsy. But I can try to give some hints,
First, download the gtk2 source package, and apply the distribution's patches. suppose the source directory of gtk2 is ~/sources/gtk2
Second, download the gtkmenubar.patch from svn and put it in ~/sources/gtk2/
Third,
cd ~/sources/gtk2
patch -p0 -b .globalmenubar < gtkmenubar.patch
then follow the ordinary steps for compiling and installing gtk2 in your distribution,
usually you have to find out what parameters you should use
for ./configure .
Hi, rainwoodman,
Could you please give me some info on how to compile gtk2-aqd from svn for gutsy ?
Coz it seems firendly for rpm users only.
Ie tried the .debs and compile and apt build. But still no changes--The menubar remains attached to itś window. Do I need gtk2.12.1?
I have cleaned up the patch, and I think it will work for most current gtk2 versions. I am currently patching against gtk2-2.12.3-3
Hork
December 26th, 2007, 11:36 PM
Hi I'm using Gutsy Gibbon and came across a weird error while doing this
I posted about it here if you would like to help me http://ubuntuforums.org/showthread.php?p=4020574#post4020574
I'd really love it if you did :)
rainwoodman
December 26th, 2007, 11:41 PM
Hi I'm using Gutsy Gibbon and came across a weird error while doing this
I posted about it here if you would like to help me http://ubuntuforums.org/showthread.php?p=4020574#post4020574
I'd really love it if you did :)
I think it is a dependency problem of the .deb package.
someone should make the package claims to provide gtk2
I don't know how to do this for .deb, but I've did it for the .rpm s.
teolemon
December 27th, 2007, 07:02 AM
Ok, so I had it make a deb, installed the server file and the applet is showing on my desktop, but no menus for the moment as I haven't installed gtk2-aqd yet.
I've added experimental deb as a download on the website as well as the .server file and I've updated the tuto.
Please test it and provide me with some feedback.
killbill
December 27th, 2007, 07:14 AM
Ie compiled gtk2.12.1 with gtk-aqd myself.
Itś working now,
Thanks, guys.
teolemon
December 27th, 2007, 07:20 AM
Can you detail how you patched gtk (did you follow the old instructions, some others, did you use the new or the old source code ?)
teolemon
December 27th, 2007, 07:40 AM
Alien doesn't work because the created deb conflicts with GTK
male81
December 27th, 2007, 09:58 AM
By skinning i meant being transparent (i.e. we only see the panel itself, any any panel skinning won't be hidden by the global menu, which I experienced)
The menubar can be set clear, and remain certified to the panel, using Compiz-Fusion (I hope it and others features will be possible also the new Metacity..) and appropriate parameters (in General Options> Opacity Settings-> add (dock) &! (class = Avant-window-navigator) and the value of transparency you want).
The problem is to use a theme that checks the same color to the panel and bg_color windows (or pass an appropriate parameter in the "menubar-theme" and use an image for the panel).
Bye.
:D
teolemon
December 27th, 2007, 10:20 AM
Ok added that bit to the Ubuntu wiki. We'll have to update it once I've finished the procedure with the new version.
killbill
December 27th, 2007, 08:41 PM
Can you detail how you patched gtk (did you follow the old instructions, some others, did you use the new or the old source code ?)
I just downloaded the gtk2.12.1 source and unzipped in a folder with http://gnome2-globalmenu.googlecode.com/svn/branches/1.0/trunk/gtk2-aqd/
Then run these: (each line as a command).
patch -p0 < ../gtkmenubar.patch
patch -Np1 -i ../gdkscreen-check.patch
patch -Np1 -i ../gtkclipboard-check.patch
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-xinput=yes --with-included-loaders=yes --disable-dependency-tracking
make
sudo make install
rainwoodman
December 28th, 2007, 03:53 AM
I suggest you also apply your distribution's patches.
gdkscreen-check.patch, gtkclipboard-check.patch doesn't seems to be related with global menu bar, as far as I can see.
I just downloaded the gtk2.12.1 source and unzipped in a folder with http://gnome2-globalmenu.googlecode.com/svn/branches/1.0/trunk/gtk2-aqd/
Then run these: (each line as a command).
patch -p0 < ../gtkmenubar.patch
patch -Np1 -i ../gdkscreen-check.patch
patch -Np1 -i ../gtkclipboard-check.patch
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-xinput=yes --with-included-loaders=yes --disable-dependency-tracking
make
sudo make install
rainwoodman
December 28th, 2007, 04:33 AM
I have almost finished rewritting gtk2-aqd patch with GdkWindows stuff. The new patch works almost like an GtkHandleBox.
Instead of overriding gtk_widget_map, I overrided these functions:
gtk_widget_realize,
gtk_widget_unrealize,
gtk_widget_size_request,
gtk_widget_size_allocate,
gtk_menu_shell_insert,
gtk_widget_map,
gtk_widget_unmap
as well as having associated 3 GdkWindows with a menubar:
container_window,
float_window, with a title "GTK MENUBAR2"
widget->window, inside the application
container_window contains the menuitems, while itself is a child of float_window/widget->window
This is exactly how GtkHandlebox is working. so I personally consider the new patch closer to a gtk acceptable patch.
By setting a variable
GtkMenuBarPrivate->globalized
the menubar can float out or go back into the application window.
For the applet server, I am trying to avoid socket_steal, by replacing it with
gdk_window_foreign_new
gdk_window_reparent
The reason is
(1) I still cannot find out how to have GtkMenuBar both inherited form GtkMenuShell and GtkPlug.
(2) Fortunately, we only need the size reallocation part of the GTK XEmbed protocol, via a X's ConfigureEvent.
(3) After studying the source code, GtkSocket will potentially do some unwilling work for our window. Most badly, it prefers to destroy the window when the socket is destoryed, which cause the client application with my new patch dies. This is the unfinished part.
I am still thinking about creating a MenuBarServer toplevel window for gtk2-aqd applications to detect whether a MenuBarServer is running and decide whether to float their menubars.
Also, I have another completely different idea for global menu:
(1) rename the widget class GtkMenuBar to _GtkMenuBar,
(2) define new widget class GtkMenuBar, which: has a GtkPlug
as its child, and a _GtkMenuBar as GtkPlug's child.
(3) implement every method of _GtkMenuBar in GtkMenuBar and pass the calling to _GtkMenuBar's method.
(4) when realizing GtkMenuBar, check if a global menu server is running. If running, ask for a new GtkSocket's native windowId, then connect to it. If either fails, just leave the plug unplugged.
The only difficult part is (4), 'ask for a new GtkSocket's native window id'. How to ask? How to get the response? How to do interprocess communication in X? How to deal with possibly competition? What will happen if an application have many menu bars? I can not solve the problems yet. If anyone of you have any ideas, PLEASE LET ME KNOW. Thank you.
teolemon
December 28th, 2007, 07:03 AM
That's my 2 cents, but I guess there will be a higher concentration in GTK wizard in bugzilla or on the GHOP issue tracker than on this thread (although some actually lurk here)
They may have the solution in a matter of seconds.
tL0z
December 28th, 2007, 08:20 AM
I would like to have the mac-style menu bar but I don't know where and how to start. Can anyone help me? I'm using Debian Testing 64bits.
teolemon
December 28th, 2007, 08:49 AM
You can either use the old version at https://wiki.ubuntu.com/global_menu
or the new one (see the wiki) at http://code.google.com/p/gnome2-globalmenu/
The latter is not finished, and if you have additionnal knowledge to bring on it, make sure to comment.
tL0z
December 29th, 2007, 07:53 AM
Can anyone make a binary package for amd64?
legolas_w
December 29th, 2007, 08:10 AM
Hi
thank you for reading my post
Is there any all in one package or update center or something like that which allow me to change the look and feel of Ubuntu 7.10 to something similar to this thread screen shots?
It looks that installation is tricky for new users. An update center can do the trick.
My hardware is CPU Intel 3.0 Gig 32 bit, if any one has the complete package installable to ubuntu please share it with me.
Thanks.
teolemon
December 29th, 2007, 12:54 PM
For the moment, we don't have any packages for the new gtk-aqd version, only a x86 (that's the arch I have) for the new version of the applet itself.
On the other hand if you use the old version and the instructions from https://wiki.ubuntu.com/global_menu, you should be able to install it.
Anyone able to contribute to the tuto for the new version (http://code.google.com/p/gnome2-globalmenu/wiki/InstallingonUbuntu)
and/or debs (32 and or 64 bit) is heartfully welcome
rainwoodman
December 30th, 2007, 10:49 PM
I would really appreiciate if somebody check the _0.3 version of svn and see if it compiles.
http://gnome2-globalmenu.googlecode.com/svn/branches/_0.3/
I've rewritten the entire project in X messaging and gdk, with respect to the specification I wrote in
http://code.google.com/p/gnome2-globalmenu/wiki/GlobalMenuBarSpecification
I added one source file gtkmenuembed.h, which is shared between patched gtk2 and the menu server applet. So possibly it will stop others from compiling it.
Supporing of scrolling long menubar is missing in _0.3 now, but I plan to move this part of job to GtkMenuBar it self, which will also benefit non-global menu programs.
The GtkNotebook is removed, so we are also closer to solving top-edge-of-screen in a clean way(without any theme hacking). (DONE, by setting widget->style->ythickness properly)
Whenever a gtkmnubar is created, it will try to find a menu server.
If it fails, the menubar will stay in the application window.
Both gtk2-aqd patch and gnome2-globalmenu-applet are updated, so please compile both.
Frak
December 31st, 2007, 03:12 AM
In case anybody needs a reference, I took a pic of my Mac to show an example to develop and customize against.
rainwoodman
December 31st, 2007, 03:53 AM
Thank you for your screenshot!
But it reminds me a major difference between osx and gnome.
In gnome the top left corner is gnome menu bar(applications places system). It is much longer and more significant than Mac's 'Apple Icon'. If we simply copy mac's global menubar, (also provides an application's title), it will be difficult to distinguish the title and gnome's menu, since both of them are text. Also, what popup menu shall we connect the label with? Current window's window menu(the one you get by press alt-space)? In mac, the associated menu is an application-wide menu, not an window-wide menu.
Although we can have a global menu bar for gtk applications, gnome is still application-centered. What we do is to provide a methode for the applications to show their menubar in a different position, out of their own windows.
On the other hand, OSX is document-centered. the windowing system can be considered as a document viewer. any program can are plugins for this big document viewer to support different file types. Since there is only one application, mac's menubar is the only menu you can have for the only 'true application'-the docuemnt viewer, rather than a global menu for different applications.
Anyway, Mac's design is a good reference. But the question is, we need some new way (what I don't know yet) to understand what a global menu means for gnome. It should not be a plagiarism of OSX's interface.
I also tried to figure out what mac will do if the menu bar is too long to display in the top panel. However the mac to which I have access doesn't have a suitable program for me to test this. I wonder if you would help me to figure this out.
In case anybody needs a reference, I took a pic of my Mac to show an example to develop and customize against.
mangar
December 31st, 2007, 04:31 AM
The programs with the longest menu bar, as far as I know, are:
1. Eclipse
2. openoffice.
The rest just don't need that many menu options..
using 800x600 resolution may give a better indication.
teolemon
December 31st, 2007, 05:31 AM
They are two menu availables in GNOME: the long one (menu) with the icon and apps/places/system and the short one (main menu) with only the icons (apps/places/system then unfold with clicking on this icon)
andrek
December 31st, 2007, 08:25 AM
I'm just downloading gnome packages on my debian and I will try to compile and install the 0.3 version..
legolas_w
December 31st, 2007, 08:50 AM
I'm just downloading gnome packages on my debian and I will try to compile and install the 0.3 version..
Are you going to test the entire packages that change the look and feel to MacOS look and feel?
If so, Can you put your compiled packages in an update center usable for Ubuntu 7.10?
Thank you.
andrek
December 31st, 2007, 09:50 AM
Well I got stuck on very early stage..
I've done:
apt-get source gtk+2.0
which downloaded gtk+-2.12.3 folder
svn checkout http://gnome2-globalmenu.googlecode.com/svn/branches/_0.3/gtk2-aqd/
cd gtk2-aqd
patch -p0 < ../gtkmenubar.patch
bash: ../gtkmenubar.patch: No such file or directory
patch.sh gives me
patch.sh: line 3: RPMDEVROOT: Define RPMDEVROOT before use
setup.sh gives me
setup.sh: line 3: RPMDEVROOT: Define RPMDEVROOT before use
andrek
December 31st, 2007, 12:03 PM
I tried that method with every release, from 0.1 up to 0.3 and it gives me THE SAME error. What the heck?
rainwoodman
December 31st, 2007, 12:42 PM
try to use ./ instead of ../
Well I got stuck on very early stage..
I've done:
apt-get source gtk+2.0
which downloaded gtk+-2.12.3 folder
svn checkout http://gnome2-globalmenu.googlecode.com/svn/branches/_0.3/gtk2-aqd/
cd gtk2-aqd
patch -p0 < ../gtkmenubar.patch
bash: ../gtkmenubar.patch: No such file or directory
patch.sh gives me
patch.sh: line 3: RPMDEVROOT: Define RPMDEVROOT before use
setup.sh gives me
setup.sh: line 3: RPMDEVROOT: Define RPMDEVROOT before use
andrek
December 31st, 2007, 12:46 PM
Now it's:
andrzej@debian:~/gtk2-aqd$ patch -p0 < ./gtkmenubar.patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- gtk/gtkmenubar.orig 2007-12-31 02:24:49.000000000 -0500
|+++ gtk/gtkmenubar.c 2007-12-31 02:26:24.000000000 -0500
--------------------------
File to patch:
edit:
I patched the gtkmenubar.c file, now the tutorial says that i should build it.. yeah, but the ./configure doesn't work as there's no config file in gtk2-aqd folder :)
and as I said before, setup.sh doesn't work either.
rainwoodman
December 31st, 2007, 01:02 PM
I wrote a new script in gtk2-aqd/patchsource.sh
Usage:
suppose you have downloaded and compiled gtk2 source at ~/gtk-2.13.3, before you make install,
cd gtk2-aqd
env SOURCEROOT=~/gtk-2.13.3 patchsource.sh
the patched gtk binary will be linked to gtk2-aqd/libs
you can also go back to make install, but I didn't test whether installing works by myself.
rainwoodman
December 31st, 2007, 01:05 PM
I am really sorry but setup.sh and patch.sh only works for fedora/rpm builds
try the new patchsource.sh. also remember to remove the entire gtk2-aqd and re-checkout before doing this. since I removed several file in the way.
Now it's:
andrzej@debian:~/gtk2-aqd$ patch -p0 < ./gtkmenubar.patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- gtk/gtkmenubar.orig 2007-12-31 02:24:49.000000000 -0500
|+++ gtk/gtkmenubar.c 2007-12-31 02:26:24.000000000 -0500
--------------------------
File to patch:
edit:
I patched the gtkmenubar.c file, now the tutorial says that i should build it.. yeah, but the ./configure doesn't work as there's no config file in gtk2-aqd folder :)
and as I said before, setup.sh doesn't work either.
andrek
December 31st, 2007, 01:17 PM
Where can I get 'patchsource.sh' file?
But anyway, the tutorial is called 'Installing on ubuntu'
So how the hell can i install it under ubuntu as there's no config file and the *.sh's work only with fedora?
Dawudd
December 31st, 2007, 02:13 PM
On the other hand, OSX is document-centered. the windowing system can be considered as a document viewer. any program can are plugins for this big document viewer to support different file types. Since there is only one application, mac's menubar is the only menu you can have for the only 'true application'-the docuemnt viewer, rather than a global menu for different applications.
Anyway, Mac's design is a good reference. But the question is, we need some new way (what I don't know yet) to understand what a global menu means for gnome. It should not be a plagiarism of OSX's interface.
How about differentiating GNOME by making it more document-centric, more of a big document viewer. I had previously suggested (http://ubuntuforums.org/showthread.php?p=3063961#post3063961) that toolbars should also be removed from document windows and appended to global menu bar. Just as the menu changes when switching applications, so would the toolbars. Thus, windows would contain only documents, and the only toolbars visible would be the ones relevant to the focused document.
Such a change might be outside the scope of you current efforts (for which I am very thankful and excited!), but you might want to keep it in mind for future enhancements.
rainwoodman
December 31st, 2007, 03:24 PM
Hi, man. I am stupid!
I forgot to submit the shell script to the SVN!
now it is there.
Where can I get 'patchsource.sh' file?
But anyway, the tutorial is called 'Installing on ubuntu'
So how the hell can i install it under ubuntu as there's no config file and the *.sh's work only with fedora?
rainwoodman
December 31st, 2007, 03:43 PM
But where should we put the global toolbars, (supposing we have made them global?)
1) If they also attaches to the panel, then the size of the panel will changes when different document window has focus. This won't be a big problem if the document window has been maximized. But if it is not, resizing the panels requires resizing the desktop and shifting all of the desktop icons, which is not desired.
2) If they floats out of the document window, (as Word for mac), it is even worse than landing them in window, since they will curtain some of area of the document window, causing difficulty for users to read the content of the document.
Another question: what shall we do if a GtkWindow creates two menubars? Have you ever seen such programs?
The 0.2 version simply core dumps, (perhaps because a window with two menubars are too silly :-) ).
The _0.3 version shall, hopefully(since by design it doesn't deal with extra menubars), silently hide the second menubar, whereas the shortcuts and mnemonic keys still works.
How about differentiating GNOME by making it more document-centric, more of a big document viewer. I had previously suggested (http://ubuntuforums.org/showthread.php?p=3063961#post3063961) that toolbars should also be removed from document windows and appended to global menu bar. Just as the menu changes when switching applications, so would the toolbars. Thus, windows would contain only documents, and the only toolbars visible would be the ones relevant to the focused document.
Such a change might be outside the scope of you current efforts (for which I am very thankful and excited!), but you might want to keep it in mind for future enhancements.
SkiesOfAzel
January 1st, 2008, 12:25 AM
Happy new year guys :).
I've tried version 3 in gutsy and it unfortunately doesn't compile. The patch didn't apply cleanly on the gtk version included in Gutsy so i modified it a bit (just changed some line numbers) but the compiler gave me this gcc -Wall -g -O2 -o .libs/gtk-query-immodules-2.0 queryimmodules.o ./.libs/libgtk-directfb-2.0.so ../gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so ../gdk/.libs/libgdk-directfb-2.0.so
./.libs/libgtk-directfb-2.0.so: undefined reference to `XFree'
./.libs/libgtk-directfb-2.0.so: undefined reference to `XGetWindowProperty'
./.libs/libgtk-directfb-2.0.so: undefined reference to `gdk_x11_drawable_get_xid'
./.libs/libgtk-directfb-2.0.so: undefined reference to `gdk_x11_lookup_xdisplay'
./.libs/libgtk-directfb-2.0.so: undefined reference to `gdk_x11_display_get_xdisplay'
./.libs/libgtk-directfb-2.0.so: undefined reference to `XSendEvent'
./.libs/libgtk-directfb-2.0.so: undefined reference to `gdk_x11_get_xatom_by_name_for_display'
./.libs/libgtk-directfb-2.0.so: undefined reference to `XQueryTree'
collect2: ld returned 1 exit status
make[5]: *** [gtk-query-immodules-2.0] Error 1
I used the dpkg-buildpackage -rfakeroot method to build some debs so it might not do this with a simple ./configure make make install procedure, but i think debs are allot safer when you are dealing with bug hunting.
Anyways, i have attached the patch in case someone else wants to try.
Thank you for your efforts btw, version 3 seems just brilliant :). I'd like to suggest though to merge the global menu with the main menu applet . There are several reasons for this:
1) Some apps don't have their own menubar or simply aren't native gtk, so the default menu can cover the empty space. The nautilus menu would show up only when the desktop has focus if i am not mistaken. when the focused app has a menubar the applet can simply hide the main menu and show the former instead.
2) Easier inclusion by default in gtk. It makes more sense to have one applet that handles all the menubars on the panel and it's more efficient if all the menubars use the same space.
Of course this would require some more customization options like always show the main menu or hide the main menu icon for uniformity etc.
Another simpler request is to give us the option of disabling the application icon on the current applet.
Thanks again for your hard work , we really appreciate it :).
jslmg
January 1st, 2008, 08:43 AM
How do we install the wxgtk-aqd patch? I believe this is supposed to fix the global menu presence of apps like Firefox?
jamaisvu
January 1st, 2008, 10:46 AM
Completely unsurprisingly, this program doesn't work quite right in KDE (I actually only noticed the wrongness by having a play with the latest version of GNOME in a fit of boredom, getting fed up, switching back into KDE and then running Inkscape).
Probably more surprising is how *almost* right it gets it:
1) It removes the menu bar from GTK apps' windows.
2) It floats the menu bar in the top left corner of the screen, right below the empty KDE "Mac-style" menu bar, obscuring the title bar of maximized windows.
3) One further slight weirdness is that it stays on top of not only the window in question, but also all other windows.
I therefore suspect that it would probably be fairly trivial to get it to float on top of the menu bar instead of the title bar, but somewhat harder to sort out the problem outlined in (3) above.
I appreciate that what I managed to produce on my testing box was not what the programmers intended this program to be used for, but it seems so close to being usably wrong (and not *that* far from being right) that it might well be a profitable avenue for future development.
jamaisvu
January 1st, 2008, 11:33 AM
Completely unsurprisingly, this program doesn't work quite right in KDE (I actually only noticed the wrongness by having a play with the latest version of GNOME in a fit of boredom, getting fed up, switching back into KDE and then running Inkscape).
Probably more surprising is how *almost* right it gets it:
1) It removes the menu bar from GTK apps' windows.
2) It floats the menu bar in the top left corner of the screen, right below the empty KDE "Mac-style" menu bar, obscuring the title bar of maximized windows.
3) One further slight weirdness is that it stays on top of not only the window in question, but also all other windows.
I therefore suspect that it would probably be fairly trivial to get it to float on top of the menu bar instead of the title bar, but somewhat harder to sort out the problem outlined in (3) above.
I appreciate that what I managed to produce on my testing box was not what the programmers intended this program to be used for, but it seems so close to being usably wrong (and not *that* far from being right) that it might well be a profitable avenue for future development.
Here is a screenshot of what happens when this tries to live alongside KDE, if anyone's interested:
http://james.dowden.googlepages.com/screenie99.png
jslmg
January 1st, 2008, 12:59 PM
jamaisvu, are you running the macmenu applet? In Ubuntu, at least, if you have the GTK hack installed, but don't run the macmenu applet, the menus will appear as you have them now.
Dawudd
January 1st, 2008, 04:26 PM
But where should we put the global toolbars, (supposing we have made them global?)
1) If they also attaches to the panel, then the size of the panel will changes when different document window has focus. This won't be a big problem if the document window has been maximized. But if it is not, resizing the panels requires resizing the desktop and shifting all of the desktop icons, which is not desired.
2) If they floats out of the document window, (as Word for mac), it is even worse than landing them in window, since they will curtain some of area of the document window, causing difficulty for users to read the content of the document.
I was thinking more along the lines of #2. The toolbars wouldnt be floating but more attached to the panel, taking up only as much space as needed. Regarding the problems that might cause, I can think of a few possible solutions:
Add a collapse toolbars button at the right edge of the global menu bar, similar to the lozenge on the Macs title bars. This would allow hiding the toolbars when not needed or when obstructing windows, and it would also serve as a separator between the global menu and the rest of the panel.
Make sure that each new window, with no previous position, is created below its applications toolbars (when not hidden), the way new windows avoid appearing below the top panel.
Make windows display on top of their own toolbars. (But Im not sure if thats a such good idea.)
What does Word for Mac (http://www.penmachine.com/images/word_toolbars.jpg) do? I dont think the toolbars should be movable, but perhaps it would be a good idea to allow them to merge, as the full width of the screen would now be available to them.
This all sounds very complex. I dont know how much is possible without modifying the window manager. Clearly, this should be reserved for future work. Generally, what do you think of the idea?
rainwoodman
January 1st, 2008, 05:28 PM
Hi,
did you compile gtk2 before apply the patch?
I think the problem is because you are compiling the directfb version of gtk. However the patch works only on X11 version.
I will add some #define s to make directfb (as well as other targets) happy.
What kind of adjustment did you make? before I saw your patch I wrote more code and it seems difficult to merge your patch now.
In the latest svn of _0.3 (rev. 150) menubar can movesin and out the application when a menu server starts or quits.
OK, in rev 152, I wrapped every piece of global menu code with GNOME_GLOBAL_MENU, which is define only on GDK_WINDOWING_X11
targets.
Happy new year guys :).
I've tried version 3 in gutsy and it unfortunately doesn't compile. The patch didn't apply cleanly on the gtk version included in Gutsy so i modified it a bit (just changed some line numbers) but the compiler gave me this gcc -Wall -g -O2 -o .libs/gtk-query-immodules-2.0 queryimmodules.o ./.libs/libgtk-directfb-2.0.so ../gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so ../gdk/.libs/libgdk-directfb-2.0.so
./.libs/libgtk-directfb-2.0.so: undefined reference to `XFree'
./.libs/libgtk-directfb-2.0.so: undefined reference to `XGetWindowProperty'
./.libs/libgtk-directfb-2.0.so: undefined reference to `gdk_x11_drawable_get_xid'
./.libs/libgtk-directfb-2.0.so: undefined reference to `gdk_x11_lookup_xdisplay'
./.libs/libgtk-directfb-2.0.so: undefined reference to `gdk_x11_display_get_xdisplay'
./.libs/libgtk-directfb-2.0.so: undefined reference to `XSendEvent'
./.libs/libgtk-directfb-2.0.so: undefined reference to `gdk_x11_get_xatom_by_name_for_display'
./.libs/libgtk-directfb-2.0.so: undefined reference to `XQueryTree'
collect2: ld returned 1 exit status
make[5]: *** [gtk-query-immodules-2.0] Error 1
I used the dpkg-buildpackage -rfakeroot method to build some debs so it might not do this with a simple ./configure make make install procedure, but i think debs are allot safer when you are dealing with bug hunting.
Anyways, i have attached the patch in case someone else wants to try.
Thank you for your efforts btw, version 3 seems just brilliant :). I'd like to suggest though to merge the global menu with the main menu applet . There are several reasons for this:
1) Some apps don't have their own menubar or simply aren't native gtk, so the default menu can cover the empty space. The nautilus menu would show up only when the desktop has focus if i am not mistaken. when the focused app has a menubar the applet can simply hide the main menu and show the former instead.
2) Easier inclusion by default in gtk. It makes more sense to have one applet that handles all the menubars on the panel and it's more efficient if all the menubars use the same space.
Of course this would require some more customization options like always show the main menu or hide the main menu icon for uniformity etc.
Another simpler request is to give us the option of disabling the application icon on the current applet.
Thanks again for your hard work , we really appreciate it :).
rainwoodman
January 1st, 2008, 05:31 PM
Well, Word for Mac (http://www.penmachine.com/images/word_toolbars.jpg) is just too messy.
Is there any reasonable reason to associate the document with toolbars? (So that the toolbars can always shows in the document window)
If we have to move the toolbars out, the second should be the best solution. Unfortunately, that means, modifying wm is also needed.
I was thinking more along the lines of #2. The toolbars wouldnt be floating but more attached to the panel, taking up only as much space as needed. Regarding the problems that might cause, I can think of a few possible solutions:
Add a collapse toolbars button at the right edge of the global menu bar, similar to the lozenge on the Macs title bars. This would allow hiding the toolbars when not needed or when obstructing windows, and it would also serve as a separator between the global menu and the rest of the panel.
Make sure that each new window, with no previous position, is created below its applications toolbars (when not hidden), the way new windows avoid appearing below the top panel.
Make windows display on top of their own toolbars. (But Im not sure if thats a such good idea.)
What does Word for Mac (http://www.penmachine.com/images/word_toolbars.jpg) do? I dont think the toolbars should be movable, but perhaps it would be a good idea to allow them to merge, as the full width of the screen would now be available to them.
This all sounds very complex. I dont know how much is possible without modifying the window manager. Clearly, this should be reserved for future work. Generally, what do you think of the idea?
Dawudd
January 1st, 2008, 06:02 PM
Well, Word for Mac (http://www.penmachine.com/images/word_toolbars.jpg) is just too messy.
Is there any reasonable reason to associate the document with toolbars? (So that the toolbars can always shows in the document window)
Yes, it is quite messy. Tabbed toolbars (such as with Sugar or the Ribbon) would be more idealbut that would require the menu bar and toolbars to be together. And it does not seem reasonable to me to have a bunch of document windows displaying each with its own set of toolbars. It creates the illusion that the toolbars are part of the document. Its even more confusing if the menu bar is separated from the toolbars.
If we have to move the toolbars out, the second should be the best solution. Unfortunately, that means, modifying wm is also needed.
Thats what I feared. :(
rainwoodman
January 1st, 2008, 06:18 PM
What are Sugar and Ribbon?
Why can't toolbars be part of the document? e.g, An interactive document, as a web page?
Should toolbars by definition to be a shortcut way of invoking menu operations?Iif it is a shortcut for menu operations, then, it should be tied with the menu.
Yes, it is quite messy. Tabbed toolbars (such as with Sugar or the Ribbon) would be more idealbut that would require the menu bar and toolbars to be together. And it does not seem reasonable to me to have a bunch of document windows displaying each with its own set of toolbars. It creates the illusion that the toolbars are part of the document. Its even more confusing if the menu bar is separated from the toolbars.
Thats what I feared. :(
rainwoodman
January 1st, 2008, 06:39 PM
1) Some apps don't have their own menubar or simply aren't native gtk, so the default menu can cover the empty space. The nautilus menu would show up only when the desktop has focus if i am not mistaken. when the focused app has a menubar the applet can simply hide the main menu and show the former instead.
The default behavior for alien windows and windows without menubar is a very important issue! However, can't understand this long english sentence. would you make it more clear? what does 'show the former' means?
2) Easier inclusion by default in gtk. It makes more sense to have one applet that handles all the menubars on the panel and it's more efficient if all the menubars use the same space.
Of course this would require some more customization options like always show the main menu or hide the main menu icon for uniformity etc.
You are right, sharing one header(with function implements) between gtk and the menu server applet sucks. However I don't think we can move the applet-code into gtk, for several reasons:
1) gtk is a library and doesn't intent to provide executable
2) the applet is, though it can be started as a standalone program,
no more than an applet for gnome-panels;
3) the applet introduces dependence of libwnck, which is not stable yet, and which should never be a dependence of gtk. (since they are almost completely irelated)
My plan to solve is to implement a new object GtkMenuServer in gtk(perhaps inherits directly from GObject), and build the menu server upon this new object. (for 0.4) However since the winter break almost ends, I dont think i will have time to do that until long next break.
Another simpler request is to give us the option of disabling the application icon on the current applet.
I am still focusing to land the code-base of the protocol(as a connectless protocol, it is almost stable, but with some little defective issues in implementing) and find bugs, since it is a completely new thing to this project. So is Xlib and Gtk programing to me.
However the ui part and the protocol part of the applet is separated, so if you want to, let me know how to add you to the project.
The applet still lacks functionality, but I might be lacking time to improve it when the new semester begins.
SkiesOfAzel
January 1st, 2008, 07:55 PM
The default behavior for alien windows and windows without menubar is a very important issue! However, can't understand this long english sentence. would you make it more clear? what does 'show the former' means?
Well you have a point about the sentence not making sence. I always forget not to post about technical stuff when i am drunk :P .
What i was trying to say is that main menu would be a very good fallback for applications that dont provide their own menu to the server. You had also proposed the nautilus menu for that purpose but i think that it would require allot more work (hacking nautilus to have a menu when providing the desktop) and would require the user to focus on the desktop to see it , leaving apps like firefox without a menu. Even if it did show up with non gtk apps (it's doable but not a good practice imo), it would still be too specific .
As for the bahavior i was trying to describe , the main menu would only show when the desktop or an app that doesn't provide a menu takes focus.
My easier inclusion in gtk comment was sponcored by a bottle of Absolut, what i meant to say was easier inclusion in gnome, and as the main menu applet is the default top level menu, it makes sense (to me at least :P ) to use it as the default for global menu too.
Hi,
did you compile gtk2 before apply the patch?
I think the problem is because you are compiling the directfb version of gtk. However the patch works only on X11 version.
I will add some #define s to make directfb (as well as other targets) happy.
i just apt-get source libgtk2.0-0 added the patch to the debian folder and tried to create a deb with the dpkg-buildpackage command . I thought that gtk always runs on top of X in linux and the fb is used in windows but i am not an expert as you can see. I also can't understand how applying the patch after the compilation can affect the produced binary , please explain if you have the time.
What kind of adjustment did you make? before I saw your patch I wrote more code and it seems difficult to merge your patch now.
In the latest svn of _0.3 (rev. 150) menubar can movesin and out the application when a menu server starts or quits.
OK, in rev 152, I wrapped every piece of global menu code with GNOME_GLOBAL_MENU, which is define only on GDK_WINDOWING_X11
targets.
The reason the patch didn't apply cleanly was that some lines of code (mainly the gtk_menu_bar_init function) are found in different lines on the Gutsy version of gtk. I just change those lines to point to the correct places for the Gutsy version. The reason that you can't merge the patches is probably that Gutsy's version of gtk is different to the one you use.
ilektrik
January 1st, 2008, 08:40 PM
does this style work on gusty? i would love to have my ubuntu look like a mac. so the illusion of having a macbook pro becomes perfect :D
rainwoodman
January 1st, 2008, 08:48 PM
I also drunked at the new year's eve!
Would you attach the gtkmenubar.c of gusty?
so do you mean that 'main menu' is the gnome's ((foot) application places system) menu? Then your suggestion makes great sense.
But there is another issue. If the main menu is replace by active windows menubar, how can I get to main menu?
I've just tried to install the new patch system-widely in my computer. To my surprise I discovered that Gnome's main menu will disappear if I start the menu server. That suggests basically that is main menu is also a menubar! I'll fix this bug first.
Well you have a point about the sentence not making sence. I always forget not to post about technical stuff when i am drunk :P .
What i was trying to say is that main menu would be a very good fallback for applications that dont provide their own menu to the server. You had also proposed the nautilus menu for that purpose but i think that it would require allot more work (hacking nautilus to have a menu when providing the desktop) and would require the user to focus on the desktop to see it , leaving apps like firefox without a menu. Even if it did show up with non gtk apps (it's doable but not a good practice imo), it would still be too specific .
As for the bahavior i was trying to describe , the main menu would only show when the desktop or an app that doesn't provide a menu takes focus.
My easier inclusion in gtk comment was sponcored by a bottle of Absolut, what i meant to say was easier inclusion in gnome, and as the main menu applet is the default top level menu, it makes sense (to me at least :P ) to use it as the default for global menu too.
i just apt-get source libgtk2.0-0 added the patch to the debian folder and tried to create a deb with the dpkg-buildpackage command . I thought that gtk always runs on top of X in linux and the fb is used in windows but i am not an expert as you can see. I also can't understand how applying the patch after the compilation can affect the produced binary , please explain if you have the time.
The reason the patch didn't apply cleanly was that some lines of code (mainly the gtk_menu_bar_init function) are found in different lines on the Gutsy version of gtk. I just change those lines to point to the correct places for the Gutsy version. The reason that you can't merge the patches is probably that Gutsy's version of gtk is different to the one you use.
SkiesOfAzel
January 1st, 2008, 09:42 PM
In order to get to the main menu you just have to click on the desktop. I know it sounds weird but that's the way it works on a mac or a kde setup too. You could also use the menubar applet along with the global menu and/or give the user the option to have the main menu always visible. Options are always good imo.
I've attached the file that you asked, hope that helps :).
rainwoodman
January 1st, 2008, 10:42 PM
That file looks so weird. I compared it with the original gtkmenubar.c.
See this( from your file):
GList *menubars = get_menu_bars (window);
menubars = g_object_get_data (G_OBJECT (window),
"gtk-menu-bar-list");
It is obviously a piece of wrong code. Why to assign menubars twice? Which version of gtk are you patching against? 2.12/2.11?
The position of _init and class_init is different in my file and your file.
In the attachment is my original gtkmenubar.c.
There are two choices to set 'gnome main menu bar' as the default one.
one way: make the menubar of the 'gnome main menu bar' applet a global one and treat it specially in the applet.
another way: implement the main menu bar inside the menu server applet.
The first way is dirty and quick.
The second way will lead us a possibility to replace the original 'gnome main menu bar' in the future. I will do the second way, since
I have access to the source code
[http://svn.gnome.org/viewvc/gnome-panel/trunk/gnome-panel/panel-menu-bar.c?revision=10508&view=markup]
.
configurability is good, once the project is workable, I will focus on the configurability.
I would really appreciate if you provide a list for options we are going to have. I'll keep them in mind.
In order to get to the main menu you just have to click on the desktop. I know it sounds weird but that's the way it works on a mac or a kde setup too. You could also use the menubar applet along with the global menu and/or give the user the option to have the main menu always visible. Options are always good imo.
I've attached the file that you asked, hope that helps :).
jslmg
January 1st, 2008, 10:43 PM
Back to my original question... the one which revived this thread:
How do we install the wxgtk-aqd patch? I believe this is supposed to fix the global menu presence of apps like Firefox?
Actually, I can revise that question a bit. I might not need that patch if I can just get OpenOffice, Firefox, and Thunderbird to show their menus in the menubar. Those are the only three important Apps in my collection that don't have them.
Anybody here succeeded at getting the menus of OpenOffice, Firefox, and Thunderbird into the macmenu applet?
If so, how did you do it?
rainwoodman
January 1st, 2008, 10:52 PM
Well, the latest development is still not strong enough for everyday use.
but there are some .deb s and installation guide available for the older versions.
One of my friend has a MacBook Pro, and its battery drains even if the laptop is completely turned off. It IS troublesome! Mac's UI design is good, though.
I would suggest ThinkPad+Ubuntu+GlobalMenu patch, just don't even imagine to have a macbook pro.
Apple has already renamed from 'Apple Computers' to Apple.
does this style work on gusty? i would love to have my ubuntu look like a mac. so the illusion of having a macbook pro becomes perfect :D
rainwoodman
January 1st, 2008, 10:56 PM
no wxgtk-aqd doesn't fix firefox Ooo.
wxgtk-aqd fix wxWindow windows.
firefox(and other mozilla stuffs), OOo are not, (ordinary) gtk programs. Gtk don't know if they have a menubar or not. Or, in other words, they have menubars, but thost menubars ain't 'GtkMenuBar's. Thus It is out of our effort to make their menubar global.
However, once the global menu patch enters gtk's official release, and the global-menu-applet enters gnome's official release,
the developers of those apps will begin to solve the issue.
Not Hopeless, but we are still very far away.
Back to my original question... the one which revived this thread:
How do we install the wxgtk-aqd patch? I believe this is supposed to fix the global menu presence of apps like Firefox?
Actually, I can revise that question a bit. I might not need that patch if I can just get OpenOffice, Firefox, and Thunderbird to show their menus in the menubar. Those are the only three important Apps in my collection that don't have them.
Anybody here succeeded at getting the menus of OpenOffice, Firefox, and Thunderbird into the macmenu applet?
If so, how did you do it?
jslmg
January 1st, 2008, 11:04 PM
Thanks for that, Rainwoodman. I kind of thought that might be the case, actually.
So, the option for now is to run: Abiword and Gnumeric, not OpenOffice; Epiphany, not Firefox; Evolution, not Thunderbird. Those three replacements (Evolution is actually Ubuntu's default mailer, happily) are GTK apps.
BTW, if I'm going to be running Epiphany--which looks better anyway, IMHO--how do I make that my default system web browser, so that if I click a web link in Evolution, for example, Epiphany opens?
Any ideas...?
no wxgtk-aqd doesn't fix firefox Ooo.
wxgtk-aqd fix wxWindow windows.
firefox(and other mozilla stuffs), OOo are not, (ordinary) gtk programs. Gtk don't know if they have a menubar or not. Or, in other words, they have menubars, but thost menubars ain't 'GtkMenuBar's. Thus It is out of our effort to make their menubar global.
However, once the global menu patch enters gtk's official release, and the global-menu-applet enters gnome's official release,
the developers of those apps will begin to solve the issue.
Not Hopeless, but we are still very far away.
rainwoodman
January 1st, 2008, 11:10 PM
try to set these gconf keys.
/desktop/gnome/applications/browser/exec
/desktop/gnome/url-handlers/https/command
/desktop/gnome/url-handlers/unknown/command
/desktop/gnome/url-handlers/about/command
/desktop/gnome/url-handlers/http/command
I am using FF3beta, so I set them to
/home/rainwoodman/Applications/firefox/firefox %s
just replace it with ephinay's path. Not sure if it works.
Thanks for that, Rainwoodman. I kind of thought that might be the case, actually.
So, the option for now is to run: Abiword and Gnumeric, not OpenOffice; Epiphany, not Firefox; Evolution, not Thunderbird. Those three replacements (Evolution is actually Ubuntu's default mailer, happily) are GTK apps.
BTW, if I'm going to be running Epiphany--which looks better anyway, IMHO--how do I make that my default system web browser, so that if I click a web link in Evolution, for example, Epiphany opens?
Any ideas...?
jslmg
January 1st, 2008, 11:32 PM
Sorry, rainwoodman. I'm still quite new at Linux. Could you tell me a bit more about how to set gconf keys? Terminal commands, or using Gedit? What's the code for it?
try to set these gconf keys.
/desktop/gnome/applications/browser/exec
/desktop/gnome/url-handlers/https/command
/desktop/gnome/url-handlers/unknown/command
/desktop/gnome/url-handlers/about/command
/desktop/gnome/url-handlers/http/command
I am using FF3beta, so I set them to
/home/rainwoodman/Applications/firefox/firefox %s
just replace it with ephinay's path. Not sure if it works.
rainwoodman
January 2nd, 2008, 12:05 AM
You have to launch gconf-editor.
It is located at Application->system tools->Configuration Editor.
on my computer.
If it is not there, try to ask some other gusty users where it is or how to install.
It is more or less similiar to registery editor of windows.
Sorry, rainwoodman. I'm still quite new at Linux. Could you tell me a bit more about how to set gconf keys? Terminal commands, or using Gedit? What's the code for it?
jslmg
January 2nd, 2008, 12:17 AM
You have to launch gconf-editor.
It is located at Application->system tools->Configuration Editor.
on my computer.
If it is not there, try to ask some other gusty users where it is or how to install.
OK, I found it. I had to add "System Tools" through the menu editor. Thanks again!
It is more or less similiar to registery editor of windows.
Yuck! I wouldn't go there! :tongue:
rainwoodman
January 2nd, 2008, 12:49 AM
No! I studied the source code of panel-menu-bar.c . It overrided several essential functions of global GtkMenuBar(size_request and size_allocate) in order to align the menu items vertically. It cannot work very well if we make it globalized directly.
It will be difficult and (a waste of coding) to implement a same one.
So I add another choice: to move the applet inside gnome-panel by patching panel-menu-bar.c.
But it will be quite annoying patching two packages.
That file looks so weird. I compared it with the original gtkmenubar.c.
See this( from your file):
GList *menubars = get_menu_bars (window);
menubars = g_object_get_data (G_OBJECT (window),
"gtk-menu-bar-list");
It is obviously a piece of wrong code. Why to assign menubars twice? Which version of gtk are you patching against? 2.12/2.11?
The position of _init and class_init is different in my file and your file.
In the attachment is my original gtkmenubar.c.
There are two choices to set 'gnome main menu bar' as the default one.
one way: make the menubar of the 'gnome main menu bar' applet a global one and treat it specially in the applet.
another way: implement the main menu bar inside the menu server applet.
The first way is dirty and quick.
The second way will lead us a possibility to replace the original 'gnome main menu bar' in the future. I will do the second way, since
I have access to the source code
[http://svn.gnome.org/viewvc/gnome-panel/trunk/gnome-panel/panel-menu-bar.c?revision=10508&view=markup]
.
configurability is good, once the project is workable, I will focus on the configurability.
I would really appreciate if you provide a list for options we are going to have. I'll keep them in mind.
~LoKe
January 2nd, 2008, 02:24 AM
I've tried this in the past but had horrible experiences with panel errors and whatnot.
Is there a post in all this mess that's been updated with the exact required packages and steps to take?
msandersen
January 2nd, 2008, 02:39 AM
I've tried this in the past but had horrible experiences with panel errors and whatnot.
Is there a post in all this mess that's been updated with the exact required packages and steps to take?
https://wiki.ubuntu.com/global_menu
jslmg
January 2nd, 2008, 02:40 AM
I followed the Ubuntu wiki given at the top of the thread... no problems for me. Everything was up to date as of yesterday. I only use this thread for help from developers and such.
https://wiki.ubuntu.com/global_menu
msandersen
January 2nd, 2008, 02:46 AM
Personally I'd like to see Gnome fully integrated with the GnuStep framework, but for that, a solution for the menu like this is needed. I think the Etoile (http://www.etoile-project.org/etoile/mediawiki/index.php?title=Main_Page) project is working on something similar. It could mean easier porting of OSX apps, which would work in Gnome, and allow for an easy way to install/remove consumer apps without repositories. Apt is great for the system, not so much for consumer apps, especially for Shareware/commercial vendors.
It could also help projects like The Gimp, which doesn't know what to do with its menus; They want all the windows and palettes to be free-floating without a containing window like in Windows, but they have nowhere to stick the menus, so each window and tool palette gets one. A bad solution. A GnuStep version could have one place at the top to put them. Fitts' Law.
~LoKe
January 2nd, 2008, 02:48 AM
https://wiki.ubuntu.com/global_menu
Thanks!
Dawudd
January 2nd, 2008, 02:10 PM
What are Sugar and Ribbon?
Sugar (http://wiki.laptop.org/images/6/6f/Toolbars.png) and the Ribbon (http://upload.wikimedia.org/wikipedia/en/4/4c/Office2007ribbon.png) both have tabbed toolbars, where the menu and the toolbars have been fully integrated. They illustrate how putting the menu bar and toolbars together allows for some interesting innovations in the future.
Why can't toolbars be part of the document? e.g, An interactive document, as a web page?
Should toolbars by definition to be a shortcut way of invoking menu operations?Iif it is a shortcut for menu operations, then, it should be tied with the menu.
Youre absolutely right. Some application elements definitely work better when placed with the documents. The GIMPs rulers immediately come to mind as an example. Many web pages (not all) are a further example, as you point out. Standard toolbars, however, as far as I have seen, are nothing more than lists of shortcuts for application functions, and they almost always correspond to items in the menu. They belong more to the running application than to any particular displayed document. That is why I believe that toolbars logically do not differ from the menu bar, and, thus, belong with it.
In any case, I dont want to distract you any further from your important work. Please continue. :)
SkiesOfAzel
January 2nd, 2008, 02:53 PM
That file looks so weird. I compared it with the original gtkmenubar.c.
See this( from your file):
GList *menubars = get_menu_bars (window);
menubars = g_object_get_data (G_OBJECT (window),
"gtk-menu-bar-list");
It is obviously a piece of wrong code. Why to assign menubars twice? Which version of gtk are you patching against? 2.12/2.11?
2.12.0
There are two choices to set 'gnome main menu bar' as the default one.
one way: make the menubar of the 'gnome main menu bar' applet a global one and treat it specially in the applet.
another way: implement the main menu bar inside the menu server applet.
The first way is dirty and quick.
The second way will lead us a possibility to replace the original 'gnome main menu bar' in the future. I will do the second way, since
I have access to the source code
[http://svn.gnome.org/viewvc/gnome-panel/trunk/gnome-panel/panel-menu-bar.c?revision=10508&view=markup]
.
The second way was my suggestion too.
configurability is good, once the project is workable, I will focus on the configurability.
I would really appreciate if you provide a list for options we are going to have. I'll keep them in mind.
Maybe we could make a poll or something, different users need different things.
Btw, i tried version 3 (revision 158 i think) . Great work !!! The only serious problem that i found has to do with skinning and it's very important to solve it in order to push the patch upstream. To be more specific , the menubar should be able to inherit the panel style when it sits on the global menu applet. You can maybe make a wrapper with a different name for the panel embedded menubars, or instead of stealing the menubar and plugging it to the applet, hack gtkmenubar so that i creates a regular menubar and another one (different object with a different class name) for the applet.
[EDIT]
I lust found another bug : When i add the applet to the panel, any application i'd already opened loses its menubar (as it should) but the menubar doesn't go to the applet. In simpler terms, every app already opened when i add the global menu applet , completely looses its menubar or the menubar on the applet isn't visible. If i remove the applet though, the menubars reappears as it should.
teolemon
January 2nd, 2008, 03:05 PM
SkiesOfAzel (http://ubuntuforums.org/member.php?u=236752), can you post the steps you did to have the svn working so that I can update the wiki on the Global Menu project page (the one on Google Code)
Neo4
January 2nd, 2008, 03:42 PM
I Guess the 0.2.1 version is already on the wiki right? the problem is that I've an old version installed and if i try to install the new version nothing happens...
I've tried to remove the old version but using the synaptic mode gives me an an error...
anyone can help? thanks
rainwoodman
January 2nd, 2008, 04:06 PM
2.12.0
The second way was my suggestion too.
Maybe we could make a poll or something, different users need different things.
Btw, i tried version 3 (revision 158 i think) . Great work !!! The only serious problem that i found has to do with skinning and it's very important to solve it in order to push the patch upstream. To be more specific , the menubar should be able to inherit the panel style when it sits on the global menu applet. You can maybe make a wrapper with a different name for the panel embedded menubars, or instead of stealing the menubar and plugging it to the applet, hack gtkmenubar so that i creates a regular menubar and another one (different object with a different class name) for the applet.
[EDIT]
I lust found another bug : When i add the applet to the panel, any application i'd already opened loses its menubar (as it should) but the menubar doesn't go to the applet. In simpler terms, every app already opened when i add the global menu applet , completely looses its menubar or the menubar on the applet isn't visible. If i remove the applet though, the menubars reappears as it should.
The skinning. gtk_rc_xxx are so messy to me, but I'll try to figure it out, tonight.
It will be very difficult to duplicate panel-menu-bar, it depends on a undocumented gnome class: GMenuTree in (lib)gnome-menus. Also, the panel menus support drag and drop, which is also difficult to implement. The DnD of panel-menu-items also reminds me to find a test case where some application support dragging menu item into toolbar for defining a new toolbar button.
I also confirmed the bug this morning. I think I know where it comes: I made the menu bar hidden immediately after they are globalized to avoid it visible to user, but when the menu server picks it up, gdk_window_show seems to malfunction. Something is broken with the function calling flow. I'll go into it tonight.
rainwoodman
January 2nd, 2008, 04:17 PM
It's OK, not a distraction. We can leave the discussion in this thread and hopefully it can inspire some others' work.
Ribbon is just Office 2007, isn't it? It is a revolution! Although I can't get accustomed with it at all, I am sure the UI makes great sense.
Sugar (http://wiki.laptop.org/images/6/6f/Toolbars.png) and the Ribbon (http://upload.wikimedia.org/wikipedia/en/4/4c/Office2007ribbon.png) both have tabbed toolbars, where the menu and the toolbars have been fully integrated. They illustrate how putting the menu bar and toolbars together allows for some interesting innovations in the future.
Youre absolutely right. Some application elements definitely work better when placed with the documents. The GIMPs rulers immediately come to mind as an example. Many web pages (not all) are a further example, as you point out. Standard toolbars, however, as far as I have seen, are nothing more than lists of shortcuts for application functions, and they almost always correspond to items in the menu. They belong more to the running application than to any particular displayed document. That is why I believe that toolbars logically do not differ from the menu bar, and, thus, belong with it.
In any case, I dont want to distract you any further from your important work. Please continue. :)
rainwoodman
January 2nd, 2008, 04:19 PM
emm, would you tell me what is the difference/relation between Gnome and GnuStep?
What is the relation between GnuStep framework and freedesktop's standards?
Gnustep is not based on gtk, isn't it?
Personally I'd like to see Gnome fully integrated with the GnuStep framework, but for that, a solution for the menu like this is needed. I think the Etoile (http://www.etoile-project.org/etoile/mediawiki/index.php?title=Main_Page) project is working on something similar. It could mean easier porting of OSX apps, which would work in Gnome, and allow for an easy way to install/remove consumer apps without repositories. Apt is great for the system, not so much for consumer apps, especially for Shareware/commercial vendors.
It could also help projects like The Gimp, which doesn't know what to do with its menus; They want all the windows and palettes to be free-floating without a containing window like in Windows, but they have nowhere to stick the menus, so each window and tool palette gets one. A bad solution. A GnuStep version could have one place at the top to put them. Fitts' Law.
rainwoodman
January 2nd, 2008, 04:21 PM
just a hint, try to remove gtk2-aqd and install gtk2 in the same run.
don't knwo if it will help.
I Guess the 0.2.1 version is already on the wiki right? the problem is that I've an old version installed and if i try to install the new version nothing happens...
I've tried to remove the old version but using the synaptic mode gives me an an error...
anyone can help? thanks
SkiesOfAzel
January 2nd, 2008, 05:20 PM
SkiesOfAzel (http://ubuntuforums.org/member.php?u=236752), can you post the steps you did to have the svn working so that I can update the wiki on the Global Menu project page (the one on Google Code)
Sure :
mkdir packages
cd packages
mkdir gtk-aqd-3
cd gtk-aqd-3
apt-get source libgtk2.0-0
sudo apt-get build-dep libgtk2.0-0
sudo apt-get install fakeroot
Get the attached gtkmenubar.patch and put it inside the debian/patches folder of the gtk source you just downloaded. Open the series file found on the same folder and add a new line containing
gtkmenubar.patch
save and exit.
now on the terminal
cd gtk+2.0-2.12.0
dpkg-buildpackage -rfakeroot
That's it.
I can also provide some debs if you like.
SkiesOfAzel
January 2nd, 2008, 05:41 PM
The skinning. gtk_rc_xxx are so messy to me, but I'll try to figure it out, tonight.
The problem is simple really. The class name and path of the menubar doesn't change when the menubar is plugged to the applet (the path stays the same probably because the gtkmenubar isn't really a part of the applet but it is just plugged there). We need something to different the 2 states of the menubar through class name or path.
It will be very difficult to duplicate panel-menu-bar, it depends on a undocumented gnome class: GMenuTree in (lib)gnome-menus. Also, the panel menus support drag and drop, which is also difficult to implement. The DnD of panel-menu-items also reminds me to find a test case where some application support dragging menu item into toolbar for defining a new toolbar button.
You don't need to duplicate panel-menu-bar (at least i don't think so :P), just hack the global menu into it. Add the global menu into the same Gtkbox and you just need to hide the menu bar when it's not supposed to show up.
rainwoodman
January 2nd, 2008, 06:09 PM
The problem is simple really. The class name and path of the menubar doesn't change when the menubar is plugged to the applet (the path stays the same probably because the gtkmenubar isn't really a part of the applet but it is just plugged there). We need something to different the 2 states of the menubar through class name or path.
You are at some point right. But actually neither of them owns the menubar in the very fundamental languages. My understanding is that, the window of the menubar (float_window) lives in X, whereas two processes, menu-client and menu-server both have access to it(handle the events, set window properties, eg, position, size) via GDK.
The client creates the Xwindow with gdk_window_new(GDK_WINDOW_TEMP), the server wraps the Xwindow with gdk_window_foreign_new (GDK_WINDOW_FOREIGN). On the server side, the GdkWindow is not associated with any widget, and thus no signal is emitted upon Xevents' arrival. On the client side, the float_window is associated with the menubar widget, and event's of the float_window is propagated to the menubar widget. In that sense, the float_window is owned by the menu-client.(or application, in your context)
In order to judge this shared resource(kinda of a competition), we need to introduce a way to communicate between menu-client and menu-server, and that protocol is based on GlobalMenuSocket, which create one GDK_INPUT_ONLY window for each socket and pass messages on top of XClientMessage.
How to set the class name and path of the menubar? The owner process gets an notification when a menuserver starts, and prepare the menubar to be globalized. So if we want to change the class name and path, we'd better do it at this stage.
There is a seconde place to do that. The function of gtk_menu_bar_ensure_style when ever the menu bar widget request its widget->style. In current(svn 158?) that function simply pass the request to gtk_widget_ensure_style and make a few adjustments if the menubar is globalized. perhaps I should go into the source of gtk_widget_ensure_style and get some inspirations.
You don't need to duplicate panel-menu-bar (at least i don't think so :P), just hack the global menu into it. Add the global menu into the same Gtkbox and you just need to hide the menu bar when it's not supposed to show up.
So I'll need to create a widget, global-menu-server-widget, and merge it into gnome-panel's source.
SkiesOfAzel
January 2nd, 2008, 08:50 PM
You are at some point right. But actually neither of them owns the menubar in the very fundamental languages. My understanding is that, the window of the menubar (float_window) lives in X, whereas two processes, menu-client and menu-server both have access to it(handle the events, set window properties, eg, position, size) via GDK.
The client creates the Xwindow with gdk_window_new(GDK_WINDOW_TEMP), the server wraps the Xwindow with gdk_window_foreign_new (GDK_WINDOW_FOREIGN). On the server side, the GdkWindow is not associated with any widget, and thus no signal is emitted upon Xevents' arrival. On the client side, the float_window is associated with the menubar widget, and event's of the float_window is propagated to the menubar widget. In that sense, the float_window is owned by the menu-client.(or application, in your context)
In order to judge this shared resource(kinda of a competition), we need to introduce a way to communicate between menu-client and menu-server, and that protocol is based on GlobalMenuSocket, which create one GDK_INPUT_ONLY window for each socket and pass messages on top of XClientMessage.
How to set the class name and path of the menubar? The owner process gets an notification when a menuserver starts, and prepare the menubar to be globalized. So if we want to change the class name and path, we'd better do it at this stage.
There is a seconde place to do that. The function of gtk_menu_bar_ensure_style when ever the menu bar widget request its widget->style. In current(svn 158?) that function simply pass the request to gtk_widget_ensure_style and make a few adjustments if the menubar is globalized. perhaps I should go into the source of gtk_widget_ensure_style and get some inspirations.
Thank you for a very informative post.
When you want to skin the same widget with a different style there are 2 ways to do it. The first is to wrap the object (struct) inside another, effectively changing its name , the second, skinning by absolute path is as you said unusable.
So maybe you can make a wrapper that gets the GtkMenuBar inside it when the menuserver starts. The name of that wrapper should be enough to skin it.
gtk_widget_ensure_style is useless and changing it would be a pain imo. Maybe you could use gtk_widget_get_style to get the panel_menu_bar style and gtk_widget_set_style to apply it to the menubars .
[EDIT] I've also noticed that when you change the current theme, the menubar doesn't get refreshed (it keeps using the previously assigned style) .
[EDIT2] Try nautilus or thunar with the clearlooks theme, you will notice that the menubar isn't properly skinned. It has probably something to do with the fact that both of these programs use wrappers for most of their widgets (i will dl the source and have a look for custom menubars just to be sure).
Dawudd
January 2nd, 2008, 09:45 PM
It's OK, not a distraction. We can leave the discussion in this thread and hopefully it can inspire some others' work.
Ribbon is just Office 2007, isn't it? It is a revolution! Although I can't get accustomed with it at all, I am sure the UI makes great sense.
I havent used it myself. From what I can see, OLPCs Sugar is more clever in some regards, since it inverts the tabbed toolbars, thus taking advantage of Fitts Law. However, putting the toolbars on top of the menu bar seems even more logistically difficult within GNOME.
And thanks. I do hope these ideas can serve as inspiration to someone.
rainwoodman
January 3rd, 2008, 03:22 AM
[EDIT] I've also noticed that when you change the current theme, the menubar doesn't get refreshed (it keeps using the previously assigned style) .
[EDIT2] Try nautilus or thunar with the clearlooks theme, you will notice that the menubar isn't properly skinned. It has probably something to do with the fact that both of these programs use wrappers for most of their widgets (i will dl the source and have a look for custom menubars just to be sure).
I think now (160) [Edit1] works.
I'll test [Edit2]. I think it also should be solved. nautilus uses ordinary gtkmenubar.
Yes. Nautilus is happy.
However ythickness auto-tweak is lost in svn 160, since I can't find a good place to make it. perhaps just tell the size realloator to completely ignore thickness hint when the menubar is globalized will be a solution.
For skinning supporting of in-panel mode, I found a way but I'll have to wait until I have time to deal with it.
We shouldn't use style. gnome-panel breaks styling by introducing it's own background color and background image(for transparency). Even panel-menu-bar calls gtk_rc_parse with a hard coded string, to load it's own theme. Luckily it provides a 'change-background' signal, with a gtkpixmap. then we can forward this signal to the active menuclient through our messaging protocol. then we store this pixmap and use it as a background(instead of the theme's) at gtk_menu_bar_expose or gtk_menu_bar_paint.
SkiesOfAzel
January 3rd, 2008, 11:37 AM
http://img108.imageshack.us/img108/8328/screenshot1jz5.png
This (the white line above the toolbar) shows up when the menuserver grabs the menubar of an already opened app.
http://img108.imageshack.us/img108/612/screenshot2ye8.png
This happens to the menubar when changing themes.
rainwoodman
January 3rd, 2008, 12:11 PM
http://img108.imageshack.us/img108/8328/screenshot1jz5.png
This (the white line above the toolbar) shows up when the menuserver grabs the menubar of an already opened app.
http://img108.imageshack.us/img108/612/screenshot2ye8.png
This happens to the menubar when changing themes.
for 1, Does this still occur in svn 160? It looks like there are some drawing or background setting for widget->window. It the white line never shows when I change within the default themes shipped with fedora.
For 2, Does the theme change font size? it looks like a problem of not invoking _gtk_menu_bar_size_allocate when theme changes. Yes it is. I triggered this bug once by myself. the reason should, The children tries to queue_size, and then menubar's size_allocate is invoked. However if the menubar is globalized, size_allocate will do nothing. I'll figure out how gtkhandlebox solve this problem.
jslmg
January 3rd, 2008, 12:39 PM
SkiesOfAzel, just wanna say thank you for that great imetal theme. Works seamlessly in Ubuntu with the macmenubar. Other similar themes, like mac4lin, don't load in my appearances preference pane, but imetal does.
I was wondering: Would it be possible at this point to install GTK patches and Macmenu applet for one user only, so that I could set up another user account that didn't have it? It would be cool to switch between my Mac-style desktop and a default Ubuntu one.
SkiesOfAzel
January 3rd, 2008, 01:20 PM
for 1, Does this still occur in svn 160?
The screenshot was taken while using v 160. v158 didn't have this problem.
[EDIT]
The line is the topmost pixel of the menubar, that's why the problem isn't apparent with the fedora default themes .Their menubars have the same color with the toolbar (and usually the whole gtkwindow).
SkiesOfAzel
January 3rd, 2008, 01:23 PM
SkiesOfAzel, just wanna say thank you for that great imetal theme. Works seamlessly in Ubuntu with the macmenubar. Other similar themes, like mac4lin, don't load in my appearances preference pane, but imetal does.
I was wondering: Would it be possible at this point to install GTK patches and Macmenu applet for one user only, so that I could set up another user account that didn't have it? It would be cool to switch between my Mac-style desktop and a default Ubuntu one.
It's possible using a .gnomerc file inside the home folder of the user that doesn't want to use macmenu. Create the file, add export GTK_MENUBAR_NO_MAC=1 save and exit.
rainwoodman
January 3rd, 2008, 05:46 PM
The screenshot was taken while using v 160. v158 didn't have this problem.
[EDIT]
The line is the topmost pixel of the menubar, that's why the problem isn't apparent with the fedora default themes .Their menubars have the same color with the toolbar (and usually the whole gtkwindow).
Yes. Since one cant set the original widget window as small as 0. the smallest height is 1. it is also impossible to hide widget->window: if I hide it ,the menu items won't work. it is strange, I don't know why even after examined the source code of gtkmenushell carefully.
Now I took a workaround by setting widget->window 's y coordinate to -2. since the height is 1 and the origin is -2, the window is out of the clipping region of its parent and wont show up.
the clipped title problem is also solved, it is because gtk_menu_bar_size_allocate don't use the newest size requisition but use a cached one, assuming gtk_menu_bar_size_allocate is always called after a gtk_menu_bar_size_request. However, if our menubar is grabbed by the server, server sents an SizeAllocate notify without querying the menubar's requisition, and the cached one will be out-of-date. A workaround is let size_allocate use uncached child requisition instead.
Perhaps let the server care about menubar's requisition will be a good solution. however, since the communication is connectionless and asynchronous, it is difficult to have such a query-response scheme reliably working.
svn: 162
teolemon
January 3rd, 2008, 06:25 PM
Sure :
mkdir packages
cd packages
mkdir gtk-aqd-3
cd gtk-aqd-3
apt-get source libgtk2.0-0
sudo apt-get build-dep libgtk2.0-0
sudo apt-get install fakerootGet the attached gtkmenubar.patch and put it inside the debian/patches folder of the gtk source you just downloaded. Open the series file found on the same folder and add a new line containing
gtkmenubar.patchsave and exit.
now on the terminal
cd gtk+2.0-2.12.0
dpkg-buildpackage -rfakerootThat's it.
I can also provide some debs if you like.
thanks for those clear instructions ( I'll try to update it this weekend (school has started again and is eating all my time)).
Debs are welcome as well so that there's two version just like in the old one
Rainwoodman, I think you could promote others enthusiasts in the project for I won't be truly available until the end of february (that is excepted on weekends)
SkiesOfAzel
January 3rd, 2008, 07:07 PM
Yes. Since one cant set the original widget window as small as 0. the smallest height is 1. it is also impossible to hide widget->window: if I hide it ,the menu items won't work. it is strange, I don't know why even after examined the source code of gtkmenushell carefully.
Now I took a workaround by setting widget->window 's y coordinate to -2. since the height is 1 and the origin is -2, the window is out of the clipping region of its parent and wont show up.
the clipped title problem is also solved, it is because gtk_menu_bar_size_allocate don't use the newest size requisition but use a cached one, assuming gtk_menu_bar_size_allocate is always called after a gtk_menu_bar_size_request. However, if our menubar is grabbed by the server, server sents an SizeAllocate notify without querying the menubar's requisition, and the cached one will be out-of-date. A workaround is let size_allocate use uncached child requisition instead.
Perhaps let the server care about menubar's requisition will be a good solution. however, since the communication is connectionless and asynchronous, it is difficult to have such a query-response scheme reliably working.
svn: 162
I wanted to ask, is there a way to exclude some menubars from being stolen ? Especially menubars belonging to applets (besides the menu bar applet)?
SkiesOfAzel
January 3rd, 2008, 07:08 PM
thanks for those clear instructions ( I'll try to update it this weekend (school has started again and is eating all my time)).
Debs are welcome as well so that there's two version just like in the old one
Rainwoodman, I think you could promote others enthusiasts in the project for I won't be truly available until the end of february (that is excepted on weekends)
I will provide the latest patch for ubuntu and some debs in a few hours.
jslmg
January 3rd, 2008, 10:28 PM
It's possible using a .gnomerc file inside the home folder of the user that doesn't want to use macmenu. Create the file, add export GTK_MENUBAR_NO_MAC=1 save and exit.
Wow! That was too easy! ;)
Cheers!
LavianoTS386
January 4th, 2008, 12:53 PM
Could someone point me to the correct way to install the Macmenu applet on xubuntu 7.10? I was able to separate the menu using the gtk scripts on page 97, but could not figure out how to install the applet. There's way too many different explanations regarding this, and I'm not sure which is the correct way.
I'm using an Asus Eee 8G, and this hack would be very helpful for use with the panel on auto hide.
ayoli
January 4th, 2008, 06:01 PM
@rainwoodman:
I strongly support your work even if I don't have time to help atm.
I'm really happy to see how the thread is busy since you started to work on this patch.
I haven't tried your work yet but I will soon. Keep it up :)
You're on the highway to force gtk dev to accept this maybe !
SkiesOfAzel
January 4th, 2008, 08:05 PM
Could someone point me to the correct way to install the Macmenu applet on xubuntu 7.10? I was able to separate the menu using the gtk scripts on page 97, but could not figure out how to install the applet. There's way too many different explanations regarding this, and I'm not sure which is the correct way.
I'm using an Asus Eee 8G, and this hack would be very helpful for use with the panel on auto hide.
Extract the attached file. Copy xfce-macmenu-plugin to /usr/lib/xfce4/panel-plugins and xfce-macmenu-plugin.desktop to /usr/share/xfce4/panel-plugins .
You can also compile it yourself, instructions can be found here (http://ubuntuforums.org/showpost.php?p=2526334&postcount=458).
SkiesOfAzel
January 4th, 2008, 08:17 PM
I've build some debs from version 3 163 , is anyone willing to host?
I've also attached the patch for gutsy.
rainwoodman
January 5th, 2008, 12:06 AM
I've build some debs from version 3 163 , is anyone willing to host?
I've also attached the patch for gutsy.
Hi, SkiesOfAzel, I think I can add you to the google project and then you can put the deb there.
Just message me your google account. Or maybe you can ask talemeon to do that(he is already in the project)
It's better to host project files in the project website.
New semester begins. I received a project from my advisor, and won't have much time on the global menu project.
In the code on my computer, skinning of menubar partially works, but there are some other issues(the menubar size is calculated wrongly again!)
Perhaps i'd better not submit it to the svn then.
rainwoodman
January 5th, 2008, 12:22 AM
Thank you for your support!
But I have to pause for about one week(at least) since I have some researching stuff to do.
the entire solution for the global menu bar still need 2 steps of re-construction in order to make it a robust, clear, and acceptable one.
1) move menu server code into gtk, create new classes for GtkEmbeddingSocket(for communication, based on GObject, primarily code in gtkmenuembed-x11.h), GtkMenuServer(currently menuserver.c in the applet directory) and GtkMenuClient(currently spread in gtkmenubar.c) , both based on GObject and wraps GtkEmbeddingSocket).
Define new class GtkGlobalMenubar(based on GtkMenuBar, primarily the code of patched gtkmenubar.c) and modify GtkMenubar to make it's constructor returns a GtkGlobalMenubar as a workaround for old gtk programs(also provide some setting keys or environment veriables to disable this). Newer programs should create their menubar as GtkGlobalMenubar. (also provides future integrate of GtkPlug and GtkSocket with GtkEmbeddingSocket)
2) rewrite the menu applet, by basing it on GtkMenuServer. move the menu applet code into gnome-panel, replace panel-menu-bar. Provide gconf keys for toggling the behaivor of panel-menu-bar, and modify gnome-window-properties to expose the gconf key to user.
@rainwoodman:
I strongly support your work even if I don't have time to help atm.
I'm really happy to see how the thread is busy since you started to work on this patch.
I haven't tried your work yet but I will soon. Keep it up :)
You're on the highway to force gtk dev to accept this maybe !
rainwoodman
January 5th, 2008, 12:44 AM
If the menubar don't belong to a toplevel window, then the application won't throw it to the menuserver.(panel applets don't have a toplevel window). Does this criteria make some sense?
Basically there are two necessary steps for a menubar become global. first, the application throw the menubar to root window; second, menu server steal it.
Actually there is no clear way for the menu server to distinguish menubars that we want to float and ones we don't. Every thrown menubar should be managed by the server. It is upto the application to determine which menubar is global and which is not. Anyway we don't want to have such dirty reversed dependence in GTK.
So I think the best solution is to make the patch stronger, push it into GTK with a new class GtkGlobalMenuBar, and then hope gnome programs will use GtkGlobalMenuBar for global menu bar s.
At the same time provide some trigger in environment variables to make gtk_menu_bar_new returns a GtkGlobalMenuBar, and disable it by default. That is also why I initial the google project with name gnome2-global-menu, instead of gtk-global-menu.
The global menu look and feel is for a desktop environment, rather than for a gui toolkit. Gui toolkit should provides a possibility for building a global menu look and feel. But it is entirely upto DEs to take advantages of the new techs.
If gtk don't accept the new patch or gnome don't patch their programs with globalmenubar, then perhaps we will have to provide our own distribution with all patched gnome applications(and even XFCE since it is also based on gtk). It will be terrible, though not impractical. The global menu is then, by no meaning, a hack.
I am just an idealist.
I wanted to ask, is there a way to exclude some menubars from being stolen ? Especially menubars belonging to applets (besides the menu bar applet)?
SkiesOfAzel
January 5th, 2008, 11:38 AM
Hi, SkiesOfAzel, I think I can add you to the google project and then you can put the deb there.
Just message me your google account. Or maybe you can ask talemeon to do that(he is already in the project)
It's better to host project files in the project website.
Check your PM's :) .
I usually up the gtk version a little so that updates won't restore the unpatched gtk, but that makes reverting to the default gtk a little harder . Should i do the same with the debs i will provide? I also remove the underlines from the menubars (this also should be made an option for when the menubar goes to the panel) .
If the menubar don't belong to a toplevel window, then the application won't throw it to the menuserver.(panel applets don't have a toplevel window). Does this criteria make some sense?
I've tested this with my old macmenu applet that has a default menu and the menubar got stolen (v167).
the entire solution for the global menu bar still need 2 steps of re-construction in order to make it a robust, clear, and acceptable one.
1) move menu server code into gtk, create new classes for GtkEmbeddingSocket(for communication, based on GObject, primarily code in gtkmenuembed-x11.h), GtkMenuServer(currently menuserver.c in the applet directory) and GtkMenuClient(currently spread in gtkmenubar.c) , both based on GObject and wraps GtkEmbeddingSocket).
Define new class GtkGlobalMenubar(based on GtkMenuBar, primarily the code of patched gtkmenubar.c) and modify GtkMenubar to make it's constructor returns a GtkGlobalMenubar as a workaround for old gtk programs(also provide some setting keys or environment veriables to disable this). Newer programs should create their menubar as GtkGlobalMenubar. (also provides future integrate of GtkPlug and GtkSocket with GtkEmbeddingSocket)
Is it possible to create a GtkPanelMenuBar and modify GtkMenuBar to create a regular GtkWindowMenuBar and a hidden GtkPanelMenuBar ?
[EDIT]
Nevermind. No use mixing gtk with gnome libraries . . .
If gtk don't accept the new patch or gnome don't patch their programs with globalmenubar, then perhaps we will have to provide our own distribution with all patched gnome applications(and even XFCE since it is also based on gtk). It will be terrible, though not impractical. The global menu is then, by no meaning, a hack.
I am just an idealist.
I wouldn't worry too much about that. When the patch is finished , even if the gtk and gnome guys won't accept it there will be some distros that will use it. There are allot of experimental distros out there.
teolemon
January 5th, 2008, 12:30 PM
I've started to divide the page in two parts to prepare for the debs.
I couldn't add you myself cause I can't access the administer panel ;-)
SkiesOfAzel
January 5th, 2008, 12:38 PM
I've started to divide the page in two parts to prepare for the debs.
I couldn't add you myself cause I can't access the administer panel ;-)
Thanks !
What do you think about version numbering , underlines etc ?
teolemon
January 5th, 2008, 12:50 PM
Not much, I just now that version numbering is a pain (we might just ask them to force the version ?)
As for underlining, that would be nice as long as it doesn't introduce problems.
But you're clearly wiser than me on the subject (I study political science :) )
SkiesOfAzel
January 5th, 2008, 12:55 PM
A weird thing i've noticed is that version 168 and version 172 seem identical , that's what diff tells me anyway. Did i miss something?
teolemon
January 5th, 2008, 01:46 PM
That might just be some modifications on the wiki pages.
LavianoTS386
January 5th, 2008, 02:08 PM
Extract the attached file. Copy xfce-macmenu-plugin to /usr/lib/xfce4/panel-plugins and xfce-macmenu-plugin.desktop to /usr/share/xfce4/panel-plugins .
You can also compile it yourself, instructions can be found here (http://ubuntuforums.org/showpost.php?p=2526334&postcount=458).
After I copy the files over, I right click on the panel, and look to add the new panel applet and it is not there.
SkiesOfAzel
January 5th, 2008, 02:26 PM
Logout and relogin or restart your panel to refresh the applets list.
teolemon
January 5th, 2008, 03:20 PM
As it's taking a little time , you may send to my mailbox the debs once they're made so that they can be added without waiting for rainwoodman to approve you. (and more selfishly to test it as I'm too lazy to test the tutorial :-D)
SkiesOfAzel
January 5th, 2008, 04:09 PM
As it's taking a little time , you may send to my mailbox the debs once they're made so that they can be added without waiting for rainwoodman to approve you. (and more selfishly to test it as I'm too lazy to test the tutorial :-D)
Sending right now...
teolemon
January 5th, 2008, 05:10 PM
Two packages are broken here:
libgtk-directfb-2.0.0
libgtk-directfb-2.0-dev
Just repairing them right now with Synaptic to see if it works.
Also uploaded the debs and updated the wiki.
teolemon
January 5th, 2008, 05:16 PM
Ok doesn't work any better, and after relaunching gnome completely, it complains with a drmc (or dmrc ? don't remember) file it will ignore in order to log in.
I'm going to rebuild a newer version of the global menu just to be sure, but I guess it shouldn't fix much of the problem
SkiesOfAzel
January 5th, 2008, 05:41 PM
Two packages are broken here:
libgtk-directfb-2.0.0
libgtk-directfb-2.0-dev
Just repairing them right now with Synaptic to see if it works.
Also uploaded the debs and updated the wiki.
These were included in the second mail i sent you.
teolemon
January 5th, 2008, 05:46 PM
Yup I know but it seems they were broken. Don't really know why though.
SkiesOfAzel
January 5th, 2008, 06:17 PM
I zipped them all together and uploaded them to rapidshare (http://rapidshare.com/files/81563125/lbgtk2.0-0-aqd-v3.172.tar.bz2.html).
Unzip and install with sudo dpkg -i *.deb
I've also mailed you the applet.
teolemon
January 5th, 2008, 06:33 PM
Hosted it on dl.free.fr.
It's a direct link and you don't have to wait. Clicking on the link will directly download the file:
http://dl.free.fr/k7pB06EsP/lbgtk2.0-0-aqd-v3.172.tar.bz2
teolemon
January 5th, 2008, 08:28 PM
Here's a new wiki page with a really simple way to install the latest version on x86 , Gutsy Gibbon ONLY.
http://code.google.com/p/gnome2-globalmenu/wiki/QuickInstallonUbuntu
It has been tested.
64 bit packages welcome.
We'll try to simplify it even further by putting the two files that still have to be installed manually directly into a deb file.
But I'd say it's now as simple as the old version, and waaay cleaner (you now only have to remove the applet from your panel if you don't want the mac style menus, without having to relaunch or delete anything)
LavianoTS386
January 5th, 2008, 08:47 PM
Logout and relogin or restart your panel to refresh the applets list.
I did try that and I'm finding no luck.
rainwoodman
January 6th, 2008, 11:27 PM
Thanks !
What do you think about version numbering , underlines etc ?
My suggestion is to use a different package name, and claims in the package that it (1) provides gtk - version , (2) obsoletes gtk with the same version.
Then the package manager will automatically remove old gtk. And auto update of gtk won't work. What we do is to make a new patched version whenever the distribution updates.
But it will be better if we can also show the patch version in the package version, so when either gtk or the patch updates, we can release a new package and the manager will help the users do the update. I can't find a place though. Can we use the release number field and replace it with our svn number?
It seems the size allocation still have some problems. I am planning to finish it this weekend.(Done!). Skinning still have troubles, but we are close to it: messages are forwarded to clients(SVN 183). After that I'll move to the new architecture.
I am thinking about the possibility to build the entire global menu stuff in to one new library(contains the communication protocol and GtkGlobalMenuBar or GtkMainMenuBar whatever) at first, and merge it into gtk afterward. It will be easier to debug.
Our patch for GtkMenuBar will be only a working around for tranditional gnome applications that use GtkMenuBar instead of GtkGlobalMenuBar.(of course, then the patch will by definition be a hacking).
Once all the applications changes into GtkGlobalMenuBar, we won't even need to patch for GtkMenuBar anymore.
jslmg
January 7th, 2008, 10:30 AM
I had a major difficulty with the Menubar system today. No doubt it was due to my own actions. But as these problems were unexpected, I thought I'd report them.
I'm not sure which of my actions most likely caused them. Basically, I lost all global menus, and wound up re-installing everything. That's when things got really weird.
I did two major things today with Ubuntu and the Macmenu system:
(1) I attempted to install the alpha version of gnome-globalmenu that teolomon and SkiesOfAzel are discussing. Given that there was no warning NOT to do so, plus the prospect of future improved compatibility with certain apps, I thought I'd give it a try. The instructions http://code.google.com/p/gnome2-globalmenu/wiki/QuickInstallonUbuntu seemed clear enough.
The installation failed, however, at:
sudo cp /usr/lib/bonobo/servers/GNOME_GlobalMenuApplet.server
All seemed fine til that point. The output said it could not stat GNOME_GlobalMenuApplet.server.
I abandoned the installation and moved the downloaded files to the trash.
(2) The second thing was that, earlier in the day, I installed KDE.
To re-install the mac menubar system, I returned to the instructions on the Global Menu wiki. I removed macmenu-applet through Synaptic, then started over from scratch.
When it came time to install the three components, nothing new was installed. However, 189 KDE packages were removed. :shock:
Happily, after that, I restarted the computer and had the macmenubar back.
Are there known incompatibilties with KDE, or was this due to problems with the installation of the gnome-globalmenu, or a combination? Any ideas about this, or similar experiences?
rainwoodman
January 7th, 2008, 05:13 PM
sudo cp /usr/lib/bonobo/servers/GNOME_GlobalMenuApplet.server
is not a valid cp command.
I had a major difficulty with the Menubar system today. No doubt it was due to my own actions. But as these problems were unexpected, I thought I'd report them.
I'm not sure which of my actions most likely caused them. Basically, I lost all global menus, and wound up re-installing everything. That's when things got really weird.
I did two major things today with Ubuntu and the Macmenu system:
(1) I attempted to install the alpha version of gnome-globalmenu that teolomon and SkiesOfAzel are discussing. Given that there was no warning NOT to do so, plus the prospect of future improved compatibility with certain apps, I thought I'd give it a try. The instructions http://code.google.com/p/gnome2-globalmenu/wiki/QuickInstallonUbuntu seemed clear enough.
The installation failed, however, at:
sudo cp /usr/lib/bonobo/servers/GNOME_GlobalMenuApplet.server
All seemed fine til that point. The output said it could not stat GNOME_GlobalMenuApplet.server.
I abandoned the installation and moved the downloaded files to the trash.
(2) The second thing was that, earlier in the day, I installed KDE.
To re-install the mac menubar system, I returned to the instructions on the Global Menu wiki. I removed macmenu-applet through Synaptic, then started over from scratch.
When it came time to install the three components, nothing new was installed. However, 189 KDE packages were removed. :shock:
Happily, after that, I restarted the computer and had the macmenubar back.
Are there known incompatibilties with KDE, or was this due to problems with the installation of the gnome-globalmenu, or a combination? Any ideas about this, or similar experiences?
teolemon
January 7th, 2008, 05:19 PM
Was my instruction right from the beginning , dit you have to fix it ?
It's true that I forgot to copy paste the warning, but I'd say it shouldn't really kill kittens anymore provided you follow carefully the instructions.
This is however beta software, but it's running smoothly here.
HotCocoa
January 7th, 2008, 05:56 PM
Wow! I would love to use this, but I'm running Gutsy! Any chance for Gutsy debs soon?
rainwoodman
January 7th, 2008, 06:28 PM
@teolemon,
I found a easier way to connect one page to the mainpage
Just add the tag 'featured` to it.
I've copied _0.3 branch to 0.3 branch, considering it as a release, milestone or whatever for the 0.3 version.
rainwoodman
January 7th, 2008, 06:29 PM
I wrote a Roadmap(draft for 0.4 as well) at http://code.google.com/p/gnome2-globalmenu/wiki/DevelopmentHome .
Comments are welcomed.
LavianoTS386
January 7th, 2008, 07:31 PM
I switched to gnome to get the old macmenu applet.
If we want to try out the new global menu, do we have to uninstall the old macmenu gtk hack?
PS I also noticed that on the google wiki "sudo cp GNOME_GlobalMenuApplet.server /usr/lib/bonobo/servers/GNOME_GlobalMenuApplet.server", should have a "cd applet" before it.
rainwoodman
January 7th, 2008, 07:37 PM
@teolemon,
An introduction to the debian control file .
in case it is useful
http://www.debian.org/doc/maint-guide/ch-dreq.en.html
*
Provides:
For some types of packages where there are multiple alternatives virtual names have been defined. You can get the full list in the /usr/share/doc/debian-policy/virtual-package-names-list.txt.gz file. Use this if your program provides a function of an existing virtual package.
*
Replaces:
Use this when your program replaces files from another package, or completely replaces another package (used in conjunction with Conflicts:). Files from the named packages will be overwritten with the files from your package
Maybe you can generate the .server file for ubuntu in so called rules file:
http://www.debian.org/doc/maint-guide/ch-dreq.en.html#s-rules
I really cannot understand these documents. It looks too different from rpm s.
rainwoodman
January 7th, 2008, 07:53 PM
I suggest you remove the old version.
Things are at an early stage, updating is not reliable (if it exists).
I switched to gnome to get the old macmenu applet.
If we want to try out the new global menu, do we have to uninstall the old macmenu gtk hack?
PS I also noticed that on the google wiki "sudo cp GNOME_GlobalMenuApplet.server /usr/lib/bonobo/servers/GNOME_GlobalMenuApplet.server", should have a "cd applet" before it.
jslmg
January 7th, 2008, 09:43 PM
sudo cp /usr/lib/bonobo/servers/GNOME_GlobalMenuApplet.server
is not a valid cp command.
Right. The full command I entered was:
sudo cp GNOME_GlobalMenuApplet.server /usr/lib/bonobo/servers/GNOME_GlobalMenuApplet.server, straight from the wiki.
Laviano has pointed out:
PS I also noticed that on the google wiki "sudo cp GNOME_GlobalMenuApplet.server /usr/lib/bonobo/servers/GNOME_GlobalMenuApplet.ser ver", should have a "cd applet" before it.
That is probably why it didn't install, then?
What about the KDE issue--189 KDE packages removed in order to re-install the patch. No big loss to me, since I don't use KDE that much, but still, any idea why?
jslmg
January 7th, 2008, 10:01 PM
Was my instruction right from the beginning , dit you have to fix it ?
It's true that I forgot to copy paste the warning, but I'd say it shouldn't really kill kittens anymore provided you follow carefully the instructions.
This is however beta software, but it's running smoothly here.
No kittens have been killed, I promise....;)
rainwoodman
January 7th, 2008, 10:11 PM
Right. The full command I entered was:
sudo cp GNOME_GlobalMenuApplet.server /usr/lib/bonobo/servers/GNOME_GlobalMenuApplet.server, straight from the wiki.
Laviano has pointed out:
That is probably why it didn't install, then?
What about the KDE issue--189 KDE packages removed in order to re-install the patch. No big loss to me, since I don't use KDE that much, but still, any idea why?
Perhaps, but I know nothing about deb packaging.
rainwoodman
January 7th, 2008, 10:12 PM
No kittens have been killed, I promise....;)
I also copied the sentence to the project main page. :)
rainwoodman
January 7th, 2008, 11:48 PM
in svn 220, generating .server file for different distos is supposed to work.
Can you test if it works on ubuntu? After the following steps,
the .server should be placed in /usr/lib/bonobo/servers .
I've checked the generated rpm file on Fedora and the file exists.
svn checkout https://gnome2-globalmenu.googlecode.com/svn/branches/0.3 gnome2-globalmenu-0.3
cd gnome2-globalmenu-0.3
cd gnome2-globalmenu-applet
aclocal
autoconf
./configure --build=i686-redhat-linux-gnu --host=i686-redhat-linux-gnu \
--target=i386-redhat-linux-gnu \
--program-prefix= \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--sysconfdir=/etc \
--datadir=/usr/share \
--includedir=/usr/include \
--libdir=/usr/lib \
--libexecdir=/usr/libexec \
--localstatedir=/var \
--sharedstatedir=/usr/com \
--mandir=/usr/share/man \
--infodir=/usr/share/info
make;
#(perhaps) sudo make install;
teolemon
January 8th, 2008, 08:55 AM
I' a "bit" (read "a lot") busy right now due to school. I'll try to have a look and catch up on this this weekend if nobody can do it faster than me ;-)
I apologize for the inconvenience, but I'm trying to put college work first.
rainwoodman
January 8th, 2008, 03:27 PM
I' a "bit" (read "a lot") busy right now due to school. I'll try to have a look and catch up on this this weekend if nobody can do it faster than me ;-)
I apologize for the inconvenience, but I'm trying to put college work first.
That makes sense. College work is firstly important. I am in grad school.
:popcorn:
jslmg
January 9th, 2008, 04:10 AM
About that "GTK_MENUBAR_NO_MAC" config:
Where, exactly, do I need to make that .gnomerc file? is it in /home/jslmg (my user folder), or in /home (the top level of the home folder)?
I currently have it in /home/jslmg/. I opened the .gnomerc file with sudo gedit, then changed the value to GTK_MENUBAR_NO_MAC=1. I restarted the computer, but I still have the macmenubar.
The reason I want to turn it off is that I need to check on an app I'm having trouble with, specifically Real Player/Helix Player. That app (both versions, actually) is crashing when I click on any item in its menubar. I want to know if macmenu is causing the crash.
BTW, does anyone here have experience using Real Player or Helix Player with macmenu installed and running?
LavianoTS386
January 9th, 2008, 02:32 PM
Is there anyway to hide the ugly scroll buttons?
Sathaten
January 9th, 2008, 05:05 PM
Just out of curiosity, what is the benefit of having a global menu bar?
snakeeyes
January 9th, 2008, 06:18 PM
Just out of curiosity, what is the benefit of having a global menu bar?
Hi, well there r 4 advantages I can think of:
1. It saves screen space cause the menu bar will always be in one location so application windows r slightly smaller.
2. I have noticed it makes ur application windows look better cause the menu bar on some windows makes them look ugly.
3. SInce the menu bar will always be on one location then it makes reaching it easier.
4. It completes the Mac look, OS X uses it and people trying to make gnome look like OS X need it to completely transform their desktop's look.
SkiesOfAzel
January 9th, 2008, 09:19 PM
About that "GTK_MENUBAR_NO_MAC" config:
Where, exactly, do I need to make that .gnomerc file? is it in /home/jslmg (my user folder), or in /home (the top level of the home folder)?
I currently have it in /home/jslmg/. I opened the .gnomerc file with sudo gedit, then changed the value to GTK_MENUBAR_NO_MAC=1. I restarted the computer, but I still have the macmenubar.
The reason I want to turn it off is that I need to check on an app I'm having trouble with, specifically Real Player/Helix Player. That app (both versions, actually) is crashing when I click on any item in its menubar. I want to know if macmenu is causing the crash.
BTW, does anyone here have experience using Real Player or Helix Player with macmenu installed and running?
To completely disable the old macmenu version you insert export GTK_MENUBAR_NO_MAC=1
into .gnomerc *the .gnomerc must be inside your user folder). If you want to disable macmenu for a specific app, open the up and then on a terminal :
xprop|grep WM_CLASS|cut -d\" -f4
click on that app and this will return a name on the terminal. Comment out (put an # in front of the line) or delete the export GTK_MENUBAR_NO_MAC=1 line if you've added it into your gnomerc and add instead export GTK_MENUBAR_NO_MAC="classname" (substitute classname with the name you got on the terminal).
SkiesOfAzel
January 9th, 2008, 09:22 PM
Is there anyway to hide the ugly scroll buttons?
Try this applet instead:
jslmg
January 9th, 2008, 11:17 PM
Hi, well there r 4 advantages I can think of:
1. It saves screen space cause the menu bar will always be in one location so application windows r slightly smaller.
2. I have noticed it makes ur application windows look better cause the menu bar on some windows makes them look ugly.
3. SInce the menu bar will always be on one location then it makes reaching it easier.
4. It completes the Mac look, OS X uses it and people trying to make gnome look like OS X need it to completely transform their desktop's look.
Yes, I agree with all that. I'd add that basically, a global menu increases usability and makes the desktop feel more unified, more intuitive. Most people who use Macs would probably agree. After trying both the default menubar system, and the global menubar system, I'll be very reluctant to go back to the default. Global just feels so much more comfortable.
BTW, you don't have to make it look like a Mac... Run the global menu, but keep the Gnome bottom panel and taskbar, if you like.
jslmg
January 9th, 2008, 11:52 PM
To completely disable the old macmenu version you insert export GTK_MENUBAR_NO_MAC=1
into .gnomerc *the .gnomerc must be inside your user folder). If you want to disable macmenu for a specific app, open the up and then on a terminal :
xprop|grep WM_CLASS|cut -d\" -f4
click on that app and this will return a name on the terminal. Comment out (put an # in front of the line) or delete the export GTK_MENUBAR_NO_MAC=1 line if you've added it into your gnomerc and add instead export GTK_MENUBAR_NO_MAC="classname" (substitute classname with the name you got on the terminal).
yep, easy once you have the right command!
I can now report that Real Player and Helix Player will not work under the macmenu. Though they have global menus, they crash when the user clicks on anything in the menubar. I disabled macmenu, and Helix worked fine. Would anyone else like to try this out on their system, to verify?
I'll be working toward getting Gxine configured and running on my Ubuntu instead, scrapping Real and Helix.
rainwoodman
January 10th, 2008, 12:18 AM
Hi, well there r 4 advantages I can think of:
1. It saves screen space cause the menu bar will always be in one location so application windows r slightly smaller.
2. I have noticed it makes ur application windows look better cause the menu bar on some windows makes them look ugly.
3. SInce the menu bar will always be on one location then it makes reaching it easier.
4. It completes the Mac look, OS X uses it and people trying to make gnome look like OS X need it to completely transform their desktop's look.
Hi, can I put these sentences to the global menu project's web page?
rainwoodman
January 10th, 2008, 12:31 AM
RealPlayer Gold 10 works with new global menu bar (version 0.3) on Fedora. I've just tested it several hours ago.
wxWindow programs doesn't work in 0.3 without the wxWindow-aqd patch. and it is even worse than in the old mac menu version(0.1. Instead of having a blank at where the menu should be, it paints a big black area at that location which completely ruins the UI of wxWindow.
I think we'll need some basic test cases for global menubar, eg, a set of programs that a milestone version should got them work without (obvious) problems.
I don't want the list to be too long, (or it will be difficult to carry out the test), so it's better to choose only the programs that have caused problems
The list I currently have is
Programs that should respect global menubar:
GIMP(The most native GTK program)
evolution(The new email window will reinsert Edit menu)
GHex2(As one of trivial gnome programs)
--I test the above programs in every new svn.
gnome-panel, (panel-menu-bar is a subclass of gtk menu bar) --
--I don't carry out above test until I make an RPM and install it.
TuxGuitar
--I don't carry out the test very often. It is a JAVA SWT program.
perhaps I should Add RealPlayer, too?(don't know what hack they use, since they are close source. the closed source will make difficulty for tracing the bug if it crashes)
yep, easy once you have the right command!
I can now report that Real Player and Helix Player will not work under the macmenu. Though they have global menus, they crash when the user clicks on anything in the menubar. I disabled macmenu, and Helix worked fine. Would anyone else like to try this out on their system, to verify?
I'll be working toward getting Gxine configured and running on my Ubuntu instead, scrapping Real and Helix.
snakeeyes
January 10th, 2008, 04:14 AM
Hi, can I put these sentences to the global menu project's web page?
Yeah sure, why not?
jslmg
January 12th, 2008, 09:22 AM
PS I also noticed that on the google wiki "sudo cp GNOME_GlobalMenuApplet.server /usr/lib/bonobo/servers/GNOME_GlobalMenuApplet.server", should have a "cd applet" before it.
Could you explain this command a bit more? What "applet" do I need to cd to? Perhaps a fuller path would help...
jslmg
January 12th, 2008, 10:00 AM
My macmenubar just crashed again. I believe this is a result of downloading, but not successfully installing, the new gnome2-globalmenu.
The last time this happened (see post #1428 ), I had to uninstall and reinstall the patch and the applet to get it all back.
Do I have to do that again, or is there another way to activate that patch again?
I do still have the macmenu applet, just no global menus.
Thanks.
nesh87
January 13th, 2008, 03:41 AM
hey guys, i remember there was a hacked version or a patched that had a menu even when i was at the desktop. It was able to launch some applications from the menu, and basically imitated the OSX menu. It wasnt fully functional but had the looks. Anyone know where i can find it.. i read like 30 pages or more.. couldnt find..
Oh i just downgraded to feisty..
LavianoTS386
January 13th, 2008, 10:28 AM
Could you explain this command a bit more? What "applet" do I need to cd to? Perhaps a fuller path would help...
applet is the name a directory (folder) that is present when you uncompress the tarball.
jslmg
January 13th, 2008, 11:54 AM
applet is the name a directory (folder) that is present when you uncompress the tarball.
Are you sure that is correct?
I extracted the tarball to my desktop, then got a folder called lbgtk2.0-0-aqd-v3.172. I cd'd into that folder and did "sudo dpkg -i *.deb".
After completing the dpkg, I'm already inside the directory lbgtk2.0-0-aqd-v3.172.
So, is further cd'ing necessary?
Here is my complete terminal output for this process, from first cd through the cp command:
macubuntu@Ubuntu:~/Desktop$ cd /home/jslmg/Desktop/lbgtk2.0-0-aqd-v3.172
macubuntu@Ubuntu:~/Desktop/lbgtk2.0-0-aqd-v3.172$ sudo dpkg -i *.deb
(Reading database ... 151226 files and directories currently installed.)
Preparing to replace gtk2.0-examples 2.12.0-1ubuntu3.1 (using gtk2.0-examples_2.12.0-1ubuntu3.1_i386.deb) ...
Unpacking replacement gtk2.0-examples ...
Preparing to replace gtk2-engines-pixbuf 2.12.0-1ubuntu3.1 (using gtk2-engines-pixbuf_2.12.0-1ubuntu3.1_i386.deb) ...
Unpacking replacement gtk2-engines-pixbuf ...
Preparing to replace libgtk2.0-0 2.12.0-1ubuntu3.1 (using libgtk2.0-0_2.12.0-1ubuntu3.1_i386.deb) ...
Unpacking replacement libgtk2.0-0 ...
Preparing to replace libgtk2.0-0-dbg 2.12.0-1ubuntu3.1 (using libgtk2.0-0-dbg_2.12.0-1ubuntu3.1_i386.deb) ...
Unpacking replacement libgtk2.0-0-dbg ...
Preparing to replace libgtk2.0-bin 2.12.0-1ubuntu3.1 (using libgtk2.0-bin_2.12.0-1ubuntu3.1_all.deb) ...
Unpacking replacement libgtk2.0-bin ...
Preparing to replace libgtk2.0-common 2.12.0-1ubuntu3.1 (using libgtk2.0-common_2.12.0-1ubuntu3.1_all.deb) ...
Unpacking replacement libgtk2.0-common ...
Preparing to replace libgtk2.0-dev 2.12.0-1ubuntu3.1 (using libgtk2.0-dev_2.12.0-1ubuntu3.1_i386.deb) ...
Unpacking replacement libgtk2.0-dev ...
Preparing to replace libgtk2.0-doc 2.12.0-1ubuntu3.1 (using libgtk2.0-doc_2.12.0-1ubuntu3.1_all.deb) ...
Ignoring nonregistered document gtk
Unpacking replacement libgtk2.0-doc ...
Preparing to replace libgtk-directfb-2.0-0 2.12.0-1ubuntu3.1 (using libgtk-directfb-2.0-0_2.12.0-1ubuntu3.1_i386.deb) ...
Unpacking replacement libgtk-directfb-2.0-0 ...
Preparing to replace libgtk-directfb-2.0-dev 2.12.0-1ubuntu3.1 (using libgtk-directfb-2.0-dev_2.12.0-1ubuntu3.1_i386.deb) ...
Unpacking replacement libgtk-directfb-2.0-dev ...
Setting up libgtk2.0-common (2.12.0-1ubuntu3.1) ...
Setting up libgtk2.0-doc (2.12.0-1ubuntu3.1) ...
Setting up libgtk2.0-0 (2.12.0-1ubuntu3.1) ...
Setting up libgtk2.0-0-dbg (2.12.0-1ubuntu3.1) ...
Setting up libgtk2.0-bin (2.12.0-1ubuntu3.1) ...
Setting up libgtk2.0-dev (2.12.0-1ubuntu3.1) ...
Setting up libgtk-directfb-2.0-0 (2.12.0-1ubuntu3.1) ...
Setting up libgtk-directfb-2.0-dev (2.12.0-1ubuntu3.1) ...
Setting up gtk2.0-examples (2.12.0-1ubuntu3.1) ...
Setting up gtk2-engines-pixbuf (2.12.0-1ubuntu3.1) ...
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
macubuntu@Ubuntu:~/Desktop/lbgtk2.0-0-aqd-v3.172$ sudo cp GNOME_GlobalMenuApplet.server /usr/lib/bonobo/servers/GNOME_GlobalMenuApplet.server
cp: cannot stat `GNOME_GlobalMenuApplet.server': No such file or directory
andrek
January 13th, 2008, 03:13 PM
Ok guys I'm back on gnome and I followed that instruction:
http://code.google.com/p/gnome2-globalmenu/wiki/InstallingonUbuntu
(installing from SVN)
and I got stuck on part:
# Open the series file found on the same folder
sudo gedit <name of the series file>
# Add a new line containing gtkmenubar.patch
# Save and exit Gedit.
I don't get it. What do I have to open? I've got gtkmenubar.patch, Makefile and patch.diff from the svn and I've got no clue what to do next.
Cyris
January 13th, 2008, 08:09 PM
can you install this on hardy heron alpha 3. because I cant install this in feisty fawn or gusty gibbon it keeps telling me Error: Dependency is not satisfiable: libgtk2.0-0. do I need to uninstall my current one and install the one from the global menu install. if I do that it will uninstall just about everything on my computer. I've tried these instruction here http://code.google.com/p/gnome2-globalmenu/wiki/InstallingonUbuntu
but about 60% of his commands dont even exist.
LavianoTS386
January 13th, 2008, 09:30 PM
Are you sure that is correct?
I extracted the tarball to my desktop, then got a folder called lbgtk2.0-0-aqd-v3.172. I cd'd into that folder and did "sudo dpkg -i *.deb".
Inside that folder is a folder called "applet."
Runebluefeather
January 13th, 2008, 09:46 PM
Hi..this was probably mentioned waaaay back when, but is there a way to make the mac-style menubar applet look the same as the menu bar itself, the fact that they don't match just looks a little odd.
jslmg
January 14th, 2008, 12:58 AM
Ok guys I'm back on gnome and I followed that instruction:
http://code.google.com/p/gnome2-globalmenu/wiki/InstallingonUbuntu
(installing from SVN)
and I got stuck on part:
I don't get it. What do I have to open? I've got gtkmenubar.patch, Makefile and patch.diff from the svn and I've got no clue what to do next.
I think the big uppercase warning at the top of that page indicates something: It's still a draft. I plan to wait a while before trying this again. Hopefully these developers will take our comments here into consideration.
jslmg
January 14th, 2008, 01:06 AM
Hi..this was probably mentioned waaaay back when, but is there a way to make the mac-style menubar applet look the same as the menu bar itself, the fact that they don't match just looks a little odd.
You might try SkyOfAzel's iMetal theme, available here:
http://skiesofazel.deviantart.com/art/imetal-for-gnome-53789181
That will unify most apps and make the menubar uniform, though not all. There may be other themes, as well, that will do the same thing.
nikoPSK
January 14th, 2008, 01:09 AM
Anybody know what mac like doc there is to go along with this? Like a bubble maximize effect?
Best,
nikoPSK
jslmg
January 14th, 2008, 01:10 AM
Inside that folder is a folder called "applet."
Do you mean, inside the directory that I extracted to my desktop, before I ran the dpkg? Or is there a new directory that was created somewhere by the dpkg command?
If you mean the one on my desktop, well, there is no such "applet" folder in there.
Did you take a look at my terminal output? Perhaps you can confirm whether the process is going as you'd expect, or is something missing?
Runebluefeather
January 14th, 2008, 09:05 AM
Thank you so much, worked like a charm. Luckily I also had a Emerald theme on so it didn't change the look of my close min max buttons. It also made the drop down menus look a lot better too!.
nesh87
January 16th, 2008, 04:06 AM
hey guys, i remember there was a hacked version or a patched that had a menu even when i was at the desktop. It was able to launch some applications from the menu, and basically imitated the OSX menu. It wasnt fully functional but had the looks. Anyone know where i can find it.. i read like 30 pages or more.. couldnt find..
Oh i just downgraded to feisty..
anyone know what im talking about..
jslmg
January 16th, 2008, 04:16 AM
anyone know what im talking about..
Not sure. Are you talking about something other than the macmenu patch and applet at the start of this thread?
KDE has a Mac-style global menu option already installed, too, with a menu for the desktop. It only works for KDE apps. I don't suppose that's what you're referring too.
One of SkyOfAzel's screenshots of macmenu shows the "Gnome" label with menus after it. I've been wondering how to get that.
nesh87
January 16th, 2008, 06:47 AM
Not sure. Are you talking about something other than the macmenu patch and applet at the start of this thread?
KDE has a Mac-style global menu option already installed, too, with a menu for the desktop. It only works for KDE apps. I don't suppose that's what you're referring too.
One of SkyOfAzel's screenshots of macmenu shows the "Gnome" label with menus after it. I've been wondering how to get that.
Yes its the macmenu, im not sure who provided a patch to the applet that would have a menu at the Desktop. It was a bunch of shortcuts to the Home folder and other places. It wasnt fully functional but had the basics and looked good. You mind showing me that screenshot.. ive been over this thread a lot.
camay
January 17th, 2008, 12:10 AM
Hello I need your help... :(
I can install all of this, but what if I want to remove?
Can anyone explain to me how to remove this?
Be honest i dont like how looks this menu, I prefer the classic one :(
Thanks a lot
(Sorry for my english)
jslmg
January 17th, 2008, 01:04 AM
I can install all of this, but what if I want to remove?
Can anyone explain to me how to remove this?
Be honest i dont like how looks this menu, I prefer the classic one :(
Thanks a lot
(Sorry for my english)
Two steps:
1) Remove Macmenu-applet from the top gnome panel. It will stay in your "Add Applet" menu for a time when you may decide to use it later. But if you really want to remove it, open Synaptic and search for macmenu. When you have it, select "complete removal."
2)To restore the classic, application-window menus do this: in your home folder (/home/<your username>/) create a new simple text document . In the new document paste this:
export GTK_MENUBAR_NO_MAC=1
Save the document as .gnomerc (the "dot" in front is crucial--makes the document a hidden config file). This simple config disables the global menu. I don't know how to remove the patch completely, but this will restore your application-window menus.
Then, reboot the computer. All should now be as you want it.
camay
January 17th, 2008, 06:32 PM
WOW Thanks, Thanks a lot it is really work :)
No i got the classic aplication windows menus :)
Thanks jslmg
See you!
nesh87
January 17th, 2008, 10:06 PM
Here is the hacked macmenu with the default menu. It's nothing much and most of the menu entries don't work (i haven't implemented their funtions yet). I also have to say , that i haven't tested it much, so there are most probably going to be bugs, so be WARNED ;) . The main reason i post this is that i am going to be very busy for the next month (exams) so i won't have time to work on this till October. So if anyone is interested to play with the code, here it is :) .
In order for this to work, extract the macmenu_scripts archive inside your home folder (so that you have a new .macmenu folder in there ).
Most of the entries that do work, do that through scripts for now (zenity).
What works:
-The whole file menu except from Connect to Server.
-The preferences entry in the Edit menu.
-The only view menu entry (special characters).
-The whole go menu except the clear history option.
-The help menu (yes i know, a tough one :P ).
Future plans:
-Fix the rest of the entries.
-Add a nautilus history menu entry to the Go menu.
-Add a window list to the Windows menu.
-Add entries for maximizing and minimizing windows to the Windows menu.
-Change the menu icons to better looking (non stock) versions.
I haven't decided yet what to do with the view menu, suggestions for entries are welcome and encouraged.
Hey SkiesofAzel,
this is the hack i have been talking about. Is this installable in gutsy? I installed the applet from the wiki, then replaced it with the one you attached, but i kept getting the OAFIID error and had to delete it. Any ideas?
nesh87
January 23rd, 2008, 03:41 AM
bumping..
ayoli
January 23rd, 2008, 10:17 AM
bumping..
Are you using a 64bits gutsy ? If so, you need to compile yourself the applet (binaries were made for 32 bits only).
You can find instructions on the wiki page (https://wiki.ubuntu.com/global_menu#compile) for that.
rainwoodman
January 23rd, 2008, 12:26 PM
Hey SkiesofAzel,
this is the hack i have been talking about. Is this installable in gutsy? I installed the applet from the wiki, then replaced it with the one you attached, but i kept getting the OAFIID error and had to delete it. Any ideas?
Sorry, nesh87. the OAFIID issue is a bug related to deployment. I've fixed it in recent svns.
stiffler_zzz
January 25th, 2008, 05:29 AM
Hi,
I have debian lenny (for amd64) and when I get the libgtk2 source I obtain an higher version. When I try to patch it it's success for 4/5. Then ./configure is good but make leaves with 2 errors. There is a patch for the newer version? Sorry for my bad english and thanks for the answare.
rainwoodman
January 25th, 2008, 09:49 AM
Please tell me which patch did you get and
which libgtk2 source did you get, and
attach the .rej file,
and the make errors.
With all of these information,
I'll be more than happy to figure it out.
Hi,
I have debian lenny (for amd64) and when I get the libgtk2 source I obtain an higher version. When I try to patch it it's success for 4/5. Then ./configure is good but make leaves with 2 errors. There is a patch for the newer version? Sorry for my bad english and thanks for the answare.
ayoli
January 25th, 2008, 07:58 PM
@rainwoodman :
hi, could it be possible to have an option in the future versions to disable the arrows in the applet (ie enabled by default but can be disabled with an option thru gconf or another way) ?
btw, your work is fantastic, keep it up :)
rainwoodman
January 25th, 2008, 08:07 PM
@rainwoodman :
hi, could it be possible to have an option in the future versions to disable the arrows in the applet (ie enabled by default but can be disabled with an option thru gconf or another way) ?
btw, your work is fantastic, keep it up :)
Hi ayoli.
I think it is already done in the svn, but I didn't have time to announce it. there is too much work to do these weeks.
ayoli
January 25th, 2008, 08:14 PM
Hi ayoli.
I think it is already done in the svn, but I didn't have time to announce it. there is too much work to do these weeks.
Great, i'll wait a bit for new packages, or maybe try to build the svn version (got much work also and not much time to play with that).
stiffler_zzz
January 26th, 2008, 09:02 AM
Hi, I'm on debian etch with this libgtk2.0 source:
gtk+2.0-2.8.20 gtk+2.0_2.8.20-7.dsc
gtk+2.0_2.8.20-7.diff.gz gtk+2.0_2.8.20.orig.tar.gz
Wich pach I must download for make it works?
ayoli
January 26th, 2008, 09:22 AM
Hi, I'm on debian etch with this libgtk2.0 source:
gtk+2.0-2.8.20 gtk+2.0_2.8.20-7.dsc
gtk+2.0_2.8.20-7.diff.gz gtk+2.0_2.8.20.orig.tar.gz
Wich pach I must download for make it works?
wow, that's a really old version of gtk, there was a patch for gtk2 2.8 version, but adq's link to it is dead. the oldest patch you can found is the patch for 2.10 on gnome bugzilla (http://bugzilla.gnome.org/show_bug.cgi?id=353076) but I guess it won't work with 2.8
Maybe if you upgrade to debian lenny you'll get a more recent gtk (2.10 or 2.12)
stiffler_zzz
January 26th, 2008, 09:25 AM
If I upgrade to lenny I obtain a 2.12.1 version that is not yet patchable!!!
ayoli
January 26th, 2008, 09:32 AM
If I upgrade to lenny I obtain a 2.12.1 version that is not yet patchable!!!
2.12 is patchable, I have it patched. Maybe the global menu from rainwoodman will also work on 2.12.1 , shouldn't have major differences between 2.12.0 and 2.12.1
stiffler_zzz
January 26th, 2008, 10:12 AM
I'm upgrading to lenny, so can you tell me the wiki to install it? I must compile it from source, compile with apt-build or are there some packages for lenny?
ayoli
January 26th, 2008, 10:28 AM
I'm upgrading to lenny, so can you tell me the wiki to install it? I must compile it from source, compile with apt-build or are there some packages for lenny?
the latest code and instructions for global menu (aka mac menu) can be found here : http://code.google.com/p/gnome2-globalmenu/
I think you'll have to compile from source because packages were made only for ubuntu gutsy 32 bits and fedora (see downloads for the gtk patch and applet source, or from svn). You should find instructions in the wiki.
stiffler_zzz
January 26th, 2008, 11:34 AM
I have upgraded to lenny and now I have the 2.12.5, when I try to patch it from source I obtain:
debian:/home/buzz/gtk/gtk+2.0-2.12.5# patch -p0 < ../gtk+-2.12.0-r2-gtkmenubar.diff
patching file gtk/gtkmenubar.c
Hunk #3 succeeded at 230 with fuzz 2 (offset 128 lines).
Hunk #4 FAILED at 400.
1 out of 4 hunks FAILED -- saving rejects to file gtk/gtkmenubar.c.rej
This is .rej:
***************
*** 400,406 ****
widget_class->size_allocate = gtk_menu_bar_size_allocate;
widget_class->expose_event = gtk_menu_bar_expose;
widget_class->hierarchy_changed = gtk_menu_bar_hierarchy_changed;
- widget_class->map = gtk_menu_bar_map;
menu_shell_class->submenu_placement = GTK_TOP_BOTTOM;
menu_shell_class->get_popup_delay = gtk_menu_bar_get_popup_delay;
--- 242,247 ----
widget_class->size_allocate = gtk_menu_bar_size_allocate;
widget_class->expose_event = gtk_menu_bar_expose;
widget_class->hierarchy_changed = gtk_menu_bar_hierarchy_changed;
menu_shell_class->submenu_placement = GTK_TOP_BOTTOM;
menu_shell_class->get_popup_delay = gtk_menu_bar_get_popup_delay;
rainwoodman
January 26th, 2008, 11:59 AM
I have upgraded to lenny and now I have the 2.12.5, when I try to patch it from source I obtain:
debian:/home/buzz/gtk/gtk+2.0-2.12.5# patch -p0 < ../gtk+-2.12.0-r2-gtkmenubar.diff
patching file gtk/gtkmenubar.c
Hunk #3 succeeded at 230 with fuzz 2 (offset 128 lines).
Hunk #4 FAILED at 400.
1 out of 4 hunks FAILED -- saving rejects to file gtk/gtkmenubar.c.rej
This is .rej:
***************
*** 400,406 ****
widget_class->size_allocate = gtk_menu_bar_size_allocate;
widget_class->expose_event = gtk_menu_bar_expose;
widget_class->hierarchy_changed = gtk_menu_bar_hierarchy_changed;
- widget_class->map = gtk_menu_bar_map;
menu_shell_class->submenu_placement = GTK_TOP_BOTTOM;
menu_shell_class->get_popup_delay = gtk_menu_bar_get_popup_delay;
--- 242,247 ----
widget_class->size_allocate = gtk_menu_bar_size_allocate;
widget_class->expose_event = gtk_menu_bar_expose;
widget_class->hierarchy_changed = gtk_menu_bar_hierarchy_changed;
menu_shell_class->submenu_placement = GTK_TOP_BOTTOM;
menu_shell_class->get_popup_delay = gtk_menu_bar_get_popup_delay;
make sure widget_class->map = gtk_menu_bar_map; exists in the patched file.
BTW: seems that you're applying the very old aqd patch which requires `gnome-macmenu-applet` to make it work.
stiffler_zzz
January 26th, 2008, 12:05 PM
Can you give me a link (or if you can upload...) of a working patch?
stiffler_zzz
January 26th, 2008, 12:17 PM
This is the patch i try
--- gtk/gtkmenubar.c.old 2007-09-13 16:35:40.000000000 -0400
+++ gtk/gtkmenubar.c 2007-10-17 22:23:56.000000000 -0400
@@ -38,7 +38,18 @@
#include "gtkwindow.h"
#include "gtkprivate.h"
#include "gtkalias.h"
-
+// For mac menubar
+#include "gdk/x11/gdkx.h"
+#include "gdk/x11/gdkwindow-x11.h"
+#include "gtkbox.h"
+#include "gtkdrawingarea.h"
+#include "gtkhbox.h"
+#include "gtklabel.h"
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <X11/Xatom.h>
+#include <X11/Xlib.h>
#define BORDER_SPACING 0
#define DEFAULT_IPADDING 1
@@ -55,6 +66,8 @@
{
GtkPackDirection pack_direction;
GtkPackDirection child_pack_direction;
+ GtkWindow* orig_toplevel_win; // original window, obtained in map()
+ GtkWindow* mbar_toplevel_win; // could be NULL, if disabled
};
#define GTK_MENU_BAR_GET_PRIVATE(o) \
@@ -89,9 +102,154 @@
G_DEFINE_TYPE (GtkMenuBar, gtk_menu_bar, GTK_TYPE_MENU_SHELL)
+
+/*
+ * Mac Menubar options
+ */
+
+static gboolean option_no_mac()
+{
+ static gboolean no_mac_set = FALSE;
+ static gboolean no_mac = FALSE;
+ char* env = NULL;
+ if (no_mac_set) return no_mac;
+ env = getenv("GTK_MENUBAR_NO_MAC");
+ if (env == NULL)
+ env = "acroread gnome-macmenu-applet gnome-panel xfce4-macmenu-plugin xfce4-panel";
+ if (strcmp(env, "1") == 0)
+ no_mac = TRUE;
+ else
+ {
+ // check for GTK_MENUBAR_NO_MAC
+ gchar** no_mac_prgs = g_strsplit(env, " ", 0);
+ gchar** p = no_mac_prgs;
+ gchar* prg = g_get_prgname();
+ while (*p != NULL)
+ {
+ if (strcmp(*p, prg) == 0)
+ {
+ no_mac = TRUE;
+ break;
+ }
+ p ++;
+ }
+ g_strfreev(no_mac_prgs);
+ }
+ if (! no_mac)
+ {
+ // check for mozplugger
+ char scmd[255];
+ char buffer[1024];
+ sprintf(scmd, "ps -o comm= -p `ps -o ppid= -p %d`", getpid());
+ FILE* f = popen(scmd, "r");
+ int len = fread(buffer, 1, 1023, f);
+ if (len > 0)
+ {
+ char* p;
+ buffer[len] = 0;
+ if ((p = index(buffer, '\n')) != NULL)
+ *p = 0;
+ if (strcmp(buffer, "mozplugger-help") == 0)
+ no_mac = TRUE;
+ }
+ else
+ {
+ fprintf(stderr, "failed to check for mozplugger by \"%s\"\n", scmd);
+ }
+ pclose(f);
+ }
+ no_mac_set = TRUE;
+ return no_mac;
+}
+
+/*
+ * Mac Menubar event handlers/callbacks
+ */
+
+static gboolean orig_toplevel_on_destroy (GtkWidget *widget, gpointer my_data)
+{
+ GtkMenuBar* menubar = (GtkMenuBar*) my_data;
+ GtkMenuBarPrivate* priv = GTK_MENU_BAR_GET_PRIVATE (menubar);
+ if (priv->mbar_toplevel_win)
+ {
+ gtk_widget_destroy (GTK_WIDGET (priv->mbar_toplevel_win));
+ priv->mbar_toplevel_win = NULL;
+ priv->orig_toplevel_win = NULL;
+ }
+ return FALSE;
+}
+
+static void orig_toplevel_on_event_after (GtkWidget* widget,
+ GdkEvent* event,
+ gpointer my_data)
+{
+ GtkMenuBar* menubar = (GtkMenuBar*) my_data;
+ GtkMenuBarPrivate* priv = GTK_MENU_BAR_GET_PRIVATE (menubar);
+ if (! priv->mbar_toplevel_win) return;
+ if (event->type == GDK_FOCUS_CHANGE && event->focus_change.in)
+ gtk_widget_show (GTK_WIDGET (priv->mbar_toplevel_win));
+}
+
+static void gtk_menu_bar_map (GtkWidget *widget)
+{
+ GtkMenuBar* menubar = GTK_MENU_BAR (widget);
+ GtkMenuBarPrivate* priv = GTK_MENU_BAR_GET_PRIVATE (menubar);
+
+ if (!priv->mbar_toplevel_win && !option_no_mac())
+ {
+ Atom typehints[2];
+ GdkGeometry geometry;
+ GtkRcStyle *mbarstyle;
+ // Setup menubar's original top-level window
+ priv->orig_toplevel_win
+ = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (menubar)));
+ g_signal_connect (GTK_WIDGET (priv->orig_toplevel_win), "destroy",
+ G_CALLBACK (orig_toplevel_on_destroy), menubar);
+ g_signal_connect (GTK_WIDGET (priv->orig_toplevel_win), "event-after",
+ G_CALLBACK (orig_toplevel_on_event_after), menubar);
+ // Create new top-level window for menubar
+ priv->mbar_toplevel_win
+ = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
+ gtk_window_set_transient_for (priv->mbar_toplevel_win, priv->orig_toplevel_win);
+ gtk_window_set_title (priv->mbar_toplevel_win, "GTK MENUBAR");
+ gtk_window_set_resizable (priv->mbar_toplevel_win, FALSE);
+ gtk_window_set_decorated (priv->mbar_toplevel_win, FALSE);
+ gtk_window_set_type_hint (priv->mbar_toplevel_win,
+ GDK_WINDOW_TYPE_HINT_DOCK);
+ // Set geometry hints
+ geometry.max_width = geometry.min_width = -1;
+ geometry.max_height = geometry.min_height = -1;
+ gtk_window_set_geometry_hints (priv->mbar_toplevel_win,
+ GTK_WIDGET (priv->mbar_toplevel_win),
+ &geometry,
+ GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE);
+ gtk_window_stick (priv->mbar_toplevel_win);
+ g_signal_connect (GTK_WIDGET (priv->mbar_toplevel_win), "delete-event",
+ G_CALLBACK (gtk_widget_hide_on_delete), menubar);
+ // Menubar
+ gtk_widget_reparent (GTK_WIDGET (menubar),
+ GTK_WIDGET (priv->mbar_toplevel_win));
+ // Show everything!
+ gtk_widget_show_all (GTK_WIDGET (priv->mbar_toplevel_win));
+ typehints[0] = XInternAtom (gdk_display, "_KDE_NET_WM_WINDOW_TYPE_TOPMENU", FALSE);
+ typehints[1] = XInternAtom (gdk_display, "_NET_WM_WINDOW_TYPE_DOCK", FALSE);
+ XChangeProperty (gdk_display,
+ GDK_WINDOW_XID(GTK_WIDGET (priv->mbar_toplevel_win)->window),
+ XInternAtom (gdk_display, "_NET_WM_WINDOW_TYPE", FALSE),
+ XA_ATOM, 32, PropModeReplace,
+ (const guchar *) typehints, 2);
+ gtk_window_move (priv->mbar_toplevel_win, 0, 0);
+ }
+
+ (* GTK_WIDGET_CLASS (gtk_menu_bar_parent_class)->map) (GTK_WIDGET (menubar));
+}
+
static void
gtk_menu_bar_init (GtkMenuBar *object)
{
+ GtkMenuBarPrivate* priv = GTK_MENU_BAR_GET_PRIVATE (object);
+ priv->mbar_toplevel_win = 0;
+ priv->orig_toplevel_win = 0;
}
static void
@@ -114,6 +272,7 @@
widget_class->size_allocate = gtk_menu_bar_size_allocate;
widget_class->expose_event = gtk_menu_bar_expose;
widget_class->hierarchy_changed = gtk_menu_bar_hierarchy_changed;
+ widget_class->map = gtk_menu_bar_map;
menu_shell_class->submenu_placement = GTK_TOP_BOTTOM;
menu_shell_class->get_popup_delay = gtk_menu_bar_get_popup_delay;
rainwoodman
January 26th, 2008, 02:11 PM
This file might interest you if you want a new global menu instead of the old mac-menu one.
http://gnome2-globalmenu.googlecode.com/svn/branches/0.3/gtk2-aqd/patch.diff
or maybe this one,
http://gnome2-globalmenu.googlecode.com/files/gtkmenubar.patch.tar.bz2
stiffler_zzz
January 26th, 2008, 03:19 PM
This file might interest you if you want a new global menu instead of the old mac-menu one.
http://gnome2-globalmenu.googlecode.com/svn/branches/0.3/gtk2-aqd/patch.diff
or maybe this one,
http://gnome2-globalmenu.googlecode.com/files/gtkmenubar.patch.tar.bz2
First patch give this output:
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: gtk+-aqd/gtk/gtkmenubar.c
|================================================= ==================
|--- gtk+-aqd/gtk/gtkmenubar.c (revision 19373)
|+++ gtk+-aqd/gtk/gtkmenubar.c (working copy)
--------------------------
File to patch:
stiffler_zzz
January 26th, 2008, 03:37 PM
I have one error while patching second patch that you link me. Now I have installed the patched libgtk. I must install also the gnome-panel-applet?
stiffler_zzz
January 26th, 2008, 04:53 PM
I've install macmenu-applet, I have added it to panel and I can only see the name of the applications that is run, the other things such as file, settings ecc are in the application itself... So nothing changed!!! Any other ideas?
ayoli
January 26th, 2008, 05:18 PM
I've install macmenu-applet, I have added it to panel and I can only see the name of the applications that is run, the other things such as file, settings ecc are in the application itself... So nothing changed!!! Any other ideas?
looks like your libgtk hasn't been patched (maybe due to the error you saw).
About the first patch you tried you may need to change these lines at the top of the file:
Index: gtk+-aqd/gtk/gtkmenubar.c
================================================== =================
--- gtk+-aqd/gtk/gtkmenubar.c (revision 19373)
+++ gtk+-aqd/gtk/gtkmenubar.c (working copy)
with something like this:
--- gtk+-aqd/gtk/gtkmenubar.c.old 2007-09-13 16:35:40.000000000 -0400
+++ gtk+-aqd/gtk/gtkmenubar.c 2007-10-17 22:23:56.000000000 -0400
stiffler_zzz
January 26th, 2008, 08:25 PM
looks like your libgtk hasn't been patched (maybe due to the error you saw).
About the first patch you tried you may need to change these lines at the top of the file:
Index: gtk+-aqd/gtk/gtkmenubar.c
================================================== =================
--- gtk+-aqd/gtk/gtkmenubar.c (revision 19373)
+++ gtk+-aqd/gtk/gtkmenubar.c (working copy)
with something like this:
--- gtk+-aqd/gtk/gtkmenubar.c.old 2007-09-13 16:35:40.000000000 -0400
+++ gtk+-aqd/gtk/gtkmenubar.c 2007-10-17 22:23:56.000000000 -0400
I have changed the lines, but it patch 4of 5 hunk. Then I install it and I have only the name of the app on the panel. Now I came back to etch, and with a third repository now I have the 2.10 libgtk.
rainwoodman
January 26th, 2008, 10:04 PM
I have changed the lines, but it patch 4of 5 hunk. Then I install it and I have only the name of the app on the panel. Now I came back to etch, and with a third repository now I have the 2.10 libgtk.
So would you attach which hunk is rejected?(i.e. the .rej file)
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.