Page 51 of 299 FirstFirst ... 41495051525361101151 ... LastLast
Results 501 to 510 of 2990

Thread: Mac-style Menu Bar for GTK and Java/Swing applications!

  1. #501
    Join Date
    Apr 2006
    Beans
    Hidden!

    Re: Mac-style Menu Bar for GTK and Java/Swing applications!

    Quote Originally Posted by SkiesOfAzel View Post
    Theoretically yes , you probably have to hack the gtk menu class to do that though.
    After taking a good, long look at the gtk source code, I found this function in gtklabel.c: gtk_label_set_text_with_mnemonic ()

    Code:
    gtk_label_set_text_with_mnemonic (GtkLabel *label,  const gchar *str)
    {
      guint last_keyval;
      
      g_return_if_fail (GTK_IS_LABEL (label));
      g_return_if_fail (str != NULL);
    
      last_keyval = label->mnemonic_keyval;
    
      g_object_freeze_notify (G_OBJECT (label));
    
      gtk_label_set_label_internal (label, g_strdup (str ? str : ""));
      gtk_label_set_use_markup_internal (label, FALSE);
      gtk_label_set_use_underline_internal (label, TRUE);
      
      gtk_label_recalculate (label);
    
      gtk_label_setup_mnemonic (label, last_keyval);
    
      g_object_thaw_notify (G_OBJECT (label));
    
    }
    From the looks of it, we need to just make a slight modification that removes single-underlines from the 'str' variable, while making sure that double-underlines stay in tact. This needs to take place before the gtk_label_set_label_internal (), and then we can set gtk_label_set_use_underline_internal() to FALSE.

    Is there anyone with enough c++ know-how to do this? After a bit of googling, I figured out how to take out single-underlines just fine, but I can't for the life of me figure out how to maintain double-underlines.

  2. #502
    Join Date
    Jun 2006
    Location
    London
    Beans
    215
    Distro
    Kubuntu 6.10 Edgy

    Re: Mac-style Menu Bar for GTK and Java/Swing applications!

    Didn't work for me. I tried these instructions, got to the stage of sudo checkinstall (I did checkinstall instead of make install) and got this error:

    dpkg: error processing gtk+_2.10.11-1_i386.deb (--install):
    trying to overwrite `/usr/bin/ld', which is also in package binutils
    dpkg-deb: subprocess paste killed by signal (Broken pipe)
    Errors were encountered while processing:
    gtk+_2.10.11-1_i386.deb
    Anyone know how to fix?

    EDIT: I just used the --force-overwrite switch and it seemed to work. Felt a bity "dirty" but it seems to be working in most gnome apps (terminal, gedit, nautilus, gaim) doesn't work in firefox but didn't work with firefox in KDE either so meh.

    Its dumb that the Gnome devs are so strongly against this...its unarguably better than the default Gnome/KDE/Windows way.

    Thanks for the patch and the nice instructions SkiesofAzel.

    EDIT2: Damn...just when I thought... I've found a massive (in fact, THE) flaw with this patch, and that is that there is a pixel (or more) at the top which aren't part of the buttons. The idea is that I can flick my mouse upwards and be on the buttons, but actually I have to flick to the top, then down a pixel and I can click on them. This MUST be fixed otherwise, apart from making things look cleaner, this serves no other usability purpose

    -Rashid
    Last edited by Rashid584; April 29th, 2007 at 02:05 PM.

  3. #503
    Join Date
    Apr 2007
    Beans
    284
    Distro
    Gutsy Gibbon Testing

    Re: Mac-style Menu Bar for GTK and Java/Swing applications!

    Rashid: I used to have that little pixel at the top, but it seems to be gone now. I'm not sure how that happened. The only thing I can think of is that I disabled transparency and accidentally overwrote libgtk with the normal version, then I reinstalled the mac menu version.

    BTW I absolutely love this type of menu. I agree that the separate menus things is such a waste of space, and finally something actually uses all the wasted space in the top gnome panel I used to think having one menu at the top was silly, but after having used OS X, it just makes so much sense.

    BTW, I don't think the Gnome devs are against it completely, after having read the bug for this, they just don't want it default. An applet in upstream GNOME would be so nice. Windows, even Vista, can't do this kind of customization stuff at all...

  4. #504
    Join Date
    Jun 2006
    Location
    London
    Beans
    215
    Distro
    Kubuntu 6.10 Edgy

    Re: Mac-style Menu Bar for GTK and Java/Swing applications!

    Quote Originally Posted by jiminycricket View Post
    Rashid: I used to have that little pixel at the top, but it seems to be gone now. I'm not sure how that happened. The only thing I can think of is that I disabled transparency and accidentally overwrote libgtk with the normal version, then I reinstalled the mac menu version.

    BTW I absolutely love this type of menu. I agree that the separate menus things is such a waste of space, and finally something actually uses all the wasted space in the top gnome panel I used to think having one menu at the top was silly, but after having used OS X, it just makes so much sense.

    BTW, I don't think the Gnome devs are against it completely, after having read the bug for this, they just don't want it default. An applet in upstream GNOME would be so nice. Windows, even Vista, can't do this kind of customization stuff at all...
    Hmm well I installed mine yesterday...unless you did yours after I did I dunno how it could make a difference? :S

    Totally with you on the menu...it should be propogated everywhere, and people need to be educated about why its better It is so much better but not enough people know how and why.

    -Rashid

  5. #505
    Join Date
    Apr 2006
    Beans
    Hidden!

    Re: Mac-style Menu Bar for GTK and Java/Swing applications!

    Quote Originally Posted by SkiesOfAzel View Post
    Theoretically yes , you probably have to hack the gtk menu class to do that though.
    Aaaand I've gotten rid of the underlines in the menus. I'm not entirely sure why I'm going further and further with trying to make this computer look like a mac, but nevertheless, if anyone would like to get rid of the underlines in the menus, to make it more like a mac, I can provide the code and where to put it.

  6. #506
    Join Date
    Feb 2006
    Beans
    66
    Distro
    Hardy Heron (Ubuntu Development)

    Re: Mac-style Menu Bar for GTK and Java/Swing applications!

    Quote Originally Posted by boneyjellyfish View Post
    Thanks, SkiesOfAzel, but I'm afraid the problem still isn't solved. Here's what I've done to attempt to solve it:

    1) I installed Angafirith's update using the directions supplied in the INSTALL file. Did nothing, unfortunately.
    2) I downloaded the gtk-patched-menubar file from the same post, but couldn't figure out how to install the gtk2 source that he had, so I just installed the libgtk .deb that he had in there. This didn't do anything (but really, I have no idea what I'm even doing here)
    3) http://ubuntuforums.org/showthread.p...ck#post2535244 - I tried doing this, with no results. In fact, changing to Sans actually moved the label higher in the panel. The only font that I was able to use to make it lower was malayalam, but it's horribly ugly and so I tossed it.
    4) http://ubuntuforums.org/showpost.php...6&postcount=27 - I got rid of Lucida Grande Bold, as this post said, and it still didn't fix it.

    Anyone have any suggestions? I really have no more ideas on what to do.
    Whoops: that is my fault. That "INSTALL" file is not actually mine. The whole reason I screwed around with everything and made the package was because it didn't. I should have deleted that first.

    If you have prevu installed, you can just run that for either gtk or the macmenu applet. If not, use the following command. You may need to install a few packages for it to work:

    Code:
    dpkg-buildpackage -rfakeroot
    Personally, I recommend using prevu for this, since it doesn't clutter your system with unwanted dev packages and such.
    Compaq Presario F700 / Hardy 32

  7. #507
    Join Date
    Jun 2006
    Location
    London
    Beans
    215
    Distro
    Kubuntu 6.10 Edgy

    Re: Mac-style Menu Bar for GTK and Java/Swing applications!

    Quote Originally Posted by boneyjellyfish View Post
    Aaaand I've gotten rid of the underlines in the menus. I'm not entirely sure why I'm going further and further with trying to make this computer look like a mac, but nevertheless, if anyone would like to get rid of the underlines in the menus, to make it more like a mac, I can provide the code and where to put it.
    Can you provide the code for getting rid of the annoying pixel above the menus which means just flicking your mouse upwards doesn't mean you can click on the menu?

    -Rashid

  8. #508
    Join Date
    Apr 2006
    Beans
    Hidden!

    Re: Mac-style Menu Bar for GTK and Java/Swing applications!

    Quote Originally Posted by Rashid584 View Post
    Can you provide the code for getting rid of the annoying pixel above the menus which means just flicking your mouse upwards doesn't mean you can click on the menu?

    -Rashid
    I have no idea what you're talking about.

  9. #509
    Join Date
    Oct 2006
    Beans
    584
    Distro
    Ubuntu

    Re: Mac-style Menu Bar for GTK and Java/Swing applications!

    SkiesOfAzel:
    I want to change the menus aspect in your imetal skin.
    I want them to look like in the cerebro theme.

    The only thing I can't do is to change the background color and the text color.
    How can I change that?

    It seems that is not possible to take a screenshot ot the menus.

  10. #510
    Join Date
    Jun 2006
    Location
    London
    Beans
    215
    Distro
    Kubuntu 6.10 Edgy

    Re: Mac-style Menu Bar for GTK and Java/Swing applications!

    Quote Originally Posted by boneyjellyfish View Post
    I have no idea what you're talking about.
    Lets say you have an app open, and want to open the "file" menu, you move your mouse upwards and left, and you click your left mouse button. (do this very quickly, only move up and left, don't move back down). What happens?

    For me, my mouse pointer goes to the very top of the screen, I click, but nothing happens. No menus appear.

    This is because there's a dead pixel above all the menu entries so clicking there will do nothing. I have to move my mouse down a couple pixels then click to open the menu. This is very annoying.

    I don't know Gtk programming (or any programming at all for that matter ) so I dunno if I could find the necessary value/line in the source code...

    ...I was wondering if you could, seeing as you seem familiar with the source

    -Rashid

Page 51 of 299 FirstFirst ... 41495051525361101151 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •