Re: Mac-style Menu Bar for GTK and Java/Swing applications!
Quote:
Originally Posted by
sunilsattiraju
Hi.. these screenshots looks great..
i am trying to do this on my Edgy..but i am having problem (cos i am newbie)
i compile and installed everything according to your steps but how do i edit the below values??
There are some environment variables to customize the menubar:
- GTK_MENUBAR_INACTIVE_OPACITY - value from 0.0 to 1.0, menubar opacity (default 0.66666...)
- GTK_MENUBAR_ACTIVE_OPACITY - value from 0.0 to 1.0, menubar opacity when the mouse hovers it (default 1.0)
- GTK_MENUBAR_NO_MAC - set to 1 to disable mac-style menubar (required by acrobat reader 7)
- GTK_MENUBAR_TITLE_WIDTH - width (in pixel) of the gradient title label, next to menubar (default 0). THIS DOESN'T WORK WITH gtk+ 2.8.x.
- GTK_MENUBAR_TITLE_FONT - text font family name for the gradient title label, (default "Times")
Hi! You can set an environment variables in 3 ways: - Set in your ~/.bashrc for yourself or add a script /etc/profile.d/gtk2-mac.sh for everyone (permission 755). They will take effect after an user re-login, and may be overrided by next two methods.
Code:
export GTK_MENUBAR_INACTIVE_OPACITY=0.75
export GTK_MENUBAR_ACTIVE_OPACITY=0.95
- Set in current shell or a script such as ~/.xinitrc, same as above, except for that it only affects a program later started from the shell or script. From shell it's just like
Code:
[user ~]$ export GTK_MENUBAR_INACTIVE_OPACITY=0.75
- Set when a program starts from shell, syntax like:
Code:
[user ~]$ GTK_MENUBAR_NO_MAC=1 bluefish
or
Code:
[user ~]$ GTK_MENUBAR_TITLE_WIDTH=150 GTK_MENUBAR_TITLE_FONT="Apple Garamond" exec bluefish
PS: you need to have a x compositor or Xgl/compiz to make the menubar transparent.
Quote:
Originally Posted by
sunilsattiraju
------------------------------------------------------------------
Java/Swing mac menubar
Similar to the GTK one
i cant find the below directory on my edgy
su to root and make a backup of /opt/java/jre/lib/rt.jar
please help
Ah, obviously ubuntu doesn't install java to the same place as we do ;)
If you have java installed, you can find the jre directory by running "which java"
BTW the java patch is not as good as the gtk one. And if you have trouble using it with any application, please tell me.
Re: Mac-style Menu Bar for GTK and Java/Swing applications!
Quote:
Originally Posted by
Robor
I'm confused and/or doing something wrong here. I'm on Dapper and trying to install this. I've got the pre-built binary downloaded. I'm trying to do the Java portion and here's what's happening.
robor007@Home-T42-Ubuntu:~/Themes/OS_X_Style_MenuBar$ javac javax/swing/JRootPane.java
bash: javac: command not found
robor007@Home-T42-Ubuntu:~/Themes/OS_X_Style_MenuBar$ javac javax/swing/JRootPane.patch
bash: javac: command not found
How do I 'run' the file to do this? :confused: Sorry, I'm not very good in Linux.
Hi! You need to install the JDK to compile a java file. (JRootPane.patch is not java source but a patch to the original javax/swing/JRootPane.java from JDK source)
Re: Mac-style Menu Bar for GTK and Java/Swing applications!
Quote:
Originally Posted by
AqD
Hi! You need to install the JDK to compile a java file. (JRootPane.patch is not java source but a patch to the original javax/swing/JRootPane.java from JDK source)
Okay, I installed the JDK and when I retry I get this:
robor007@Home-T42-Ubuntu:~/Themes/OS_X_Style_MenuBar$ javac javax/swing/JRootPane.java
Note: javax/swing/JRootPane.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
If I try the same with the .patch file instead I get this:
robor007@Home-T42-Ubuntu:~/Themes/OS_X_Style_MenuBar$ javac javax/swing/JRootPane.patch
javac: invalid flag: javax/swing/JRootPane.patch
Usage: javac <options> <source files>
Maybe this is over my head and I should just leave well enough alone?
Re: Mac-style Menu Bar for GTK and Java/Swing applications!
Quote:
Originally Posted by
Robor
Okay, I installed the JDK and when I retry I get this:
robor007@Home-T42-Ubuntu:~/Themes/OS_X_Style_MenuBar$ javac javax/swing/JRootPane.java
Note: javax/swing/JRootPane.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
It's just an useless warning, not error :)
Re: Mac-style Menu Bar for GTK and Java/Swing applications!
Okay, I think I have a partially installed menubar now and I can't get X to start anymore. If I look in ~./xsession-errors there's a spew of warnings like this:
'Gtk-CRITICAL **: gtk_widget_set_sensitive: assertion 'GTK_IS_WIDGET (widget)' failed'
I did update my kernel and xorg but I've since reinstalled the ATI fglrx drivers. However, an 'fglrxinfo' reports 'Error: unable to open display :0'
:(
Re: Mac-style Menu Bar for GTK and Java/Swing applications!
Quote:
Originally Posted by
Robor
Okay, I think I have a partially installed menubar now and I can't get X to start anymore. If I look in ~./xsession-errors there's a spew of warnings like this:
'Gtk-CRITICAL **: gtk_widget_set_sensitive: assertion 'GTK_IS_WIDGET (widget)' failed'
I did update my kernel and xorg but I've since reinstalled the ATI fglrx drivers. However, an 'fglrxinfo' reports 'Error: unable to open display :0'
:(
Can you tell the exact application that throws this error?
Re: Mac-style Menu Bar for GTK and Java/Swing applications!
@AqD, for GNOME users ~/.gnomerc is better place to put the envs IMO.
And, I just added code for GTK_MENUBAR_TITLE_FONT_SCALE (like as =0.5) to your thread on compiz.net. Would you include if it's OK to you? :)
Re: Mac-style Menu Bar for GTK and Java/Swing applications!
Ah, one more, applying the patch directly to gtk+2.0 source surely not a good idea since in that case Ubuntu users will lose package's patches so I'd like to say that "use source package" with this patch is proper.
Re: Mac-style Menu Bar for GTK and Java/Swing applications!
Quote:
Originally Posted by
AqD
Can you tell the exact application that throws this error?
It is this exact error:
(gnome-panel:5100): Gtk-CRITICAL **: gtk_widget_set_sensitive: assertion 'GTI_IS_WIDGET (widget)' failed
(gnome-panel:5100): Gtk-CRITICAL **: gtk_widget_set_sensitive: assertion 'GTI_IS_WIDGET (widget)' failed
ALSA: underrun, at least 0ms.
(gnome-panel:5100): Gtk-CRITICAL **: gtk_widget_set_sensitive: assertion 'GTI_IS_WIDGET (widget)' failed
(gnome-panel:5100): Gtk-CRITICAL **: gtk_widget_set_sensitive: assertion 'GTI_IS_WIDGET (widget)' failed
(gnome-panel:5100): Gtk-CRITICAL **: gtk_widget_set_sensitive: assertion 'GTI_IS_WIDGET (widget)' failed
Cutting log (size: 101938, max 100000)make transparent again
make transparent again
make transparent again
make transparent again
The application 'nautilus' lost its connection to the display :0.0;
most likely the X server was shut down or you killed/destroyed the application
gdesklets-daemon: Fatal IO error 104 (Connection reset by peer) on X server :0.0.
gnome-panel: Fatal IO error 104 (Connection reset by peer) on X server :0.0.
gnome-terminal: Fatal IO error 104 (Connection reset by peer) on X server :0.0.
update-notifier: Fatal IO error 104 (Connection reset by peer) on X server :0.0.
nm-applet: Fatal IO error 104 (Connection reset by peer) on X server :0.0.
Window manager warning: Lost connection to the display ' :0.0':
most likely the X server was shut down or you killed/destroyed the window manager
The application 'gnome-cups-icon' lost its connection to the display :0.0;
most likely the X server was shut down or you killed/destroyed the application
(nautilus:13367): Gnome-CRITICAL **: gnome_program_get_app_version: assertion 'program !=NULL' failed
Re: Mac-style Menu Bar for GTK and Java/Swing applications!
Quote:
Originally Posted by
atie
@AqD, for GNOME users ~/.gnomerc is better place to put the envs IMO.
And, I just added code for GTK_MENUBAR_TITLE_FONT_SCALE (like as =0.5) to your thread on compiz.net. Would you include if it's OK to you? :)
Ah!
You forgot to align the title text ;)