Results 1 to 4 of 4

Thread: ctrl+alt+t to toggle menubar

  1. #1
    Registered User
    Join Date
    Sep 2003
    Posts
    105

    ctrl+alt+t to toggle menubar

    This seems to have stopped functioning in the manar I expected it to.

    Since the addition of the tool menu, the tool menu becomes selected. In version 4.3.12 it seems to do nothing. If I remember correct, I could be wrong, it used to take the menu bar itself and hide it thus giving you a little more realestate for the map and lists to use.

    Is this broken and is so rarely used it slipped through the cracks or does it actually do something different than I'm expecting.

    searching for ctrl+alt+t produced unrelated threads
    searching for "toggle AND menubar" produced no matches

    grep in the src directory reveals:
    Code:
    #grep -n "menubar" *.cpp
    editor.cpp:22:#include <qmenubar.h>
    interface.cpp:848:   pInterfaceMenu->insertItem("Hide MenuBar", this, SLOT(toggle_view_menubar()));
    interface.cpp:1578:   accel->connectItem( accel->insertItem(CTRL+ALT+Key_T), this, SLOT(toggle_view_menubar()));
    interface.cpp:1585:                                                 "ShowEQ - Main (ctrl+alt+t to toggle menubar)"));
    interface.cpp:5001:void EQInterface::toggle_view_menubar()
    m_interface.cpp:456:    static const QUMethod slot_136 = {"toggle_view_menubar", 0, 0 };
    m_interface.cpp:661:    { "toggle_view_menubar()", &slot_136, QMetaData::Private },
    m_interface.cpp:1005:    case 136: toggle_view_menubar(); break;

    From the looks of interface.cpp ctrl+alt+s should also remove the status bar from the bottom of the window, this doesn't appear to happen either.

    It seems like SEQ isn't getting the ctrl+alt+t/s signals properly because you can go to the inferface menu and click them and it will turn them off and it will even turn the status bar back on but when you turn off the menu bar, it won't turn back on cause you can no long use the menu to turn it on.

    Something else odd as I am playing with it, alt+i doesn't pull open the interface menu, all other menus pull up according to their underlined letter properly.

    So if someone knows right where to go to fix this, great, go for it. I will try and find where the keyboard inputs are processed and see if I can't track down why these things might be broken. My guess is that it is in the m_interface.cpp so that will be the first place I go.

    current version I'm running is 4.3.14

    ~ TK

  2. #2
    Registered User
    Join Date
    Sep 2003
    Posts
    105
    After opening m_interface.cpp it does not appear to be the proper place to begin my search since it is a meta generated file.

    Will do a little poking around interface.cpp.

    Through digging some more I found the relative code. Did some research on QAccel and determined based on the code that is must be an opperator error.

    Evidently my CTRL key on the left side of my KB is not functioning.

    While my opperator error explains why the toggle menu bar didn't work (for me specificly), it doesn't explain why the "interface" menu doesn't pop up with an ALT+Key_I.

    ~ TK

  3. #3
    Registered User
    Join Date
    Sep 2003
    Posts
    105
    Fix for the problem I was having with Interface menu not coming up when I pressed ALT+I

    change
    Code:
    interface.cpp:846:   menuBar()->insertItem( "&Interface" , pInterfaceMenu);
    
    to
    
    interface.cpp:846:   menuBar()->insertItem( "Interfac&e" , pInterfaceMenu);
    It isn't a pretty fix, and I'll admit it is just a bad hack work around but it worked for me.

    I attempted to force the shortcut key to be set but couldn't seem to figure out how to opperate the QPopupMenu class properly effectively. A better fix might be to change the line to read something like ---- menuBar()->insertItem( "Interface", pInterfaceMenu, ????, tr("ALT+I")); ---- Problem is I don't know what to put into the ???? area to make it work properly. I also tried to use the setAccel function but it required the same thing I assume the ???? would be.

    Is it just me or are other people having the problem?

    to note:
    ALT+I stuff works in other menus (like view->spawn list->info and networks->IP Address)... just not off the main menu/menubar.

    ~ TK

  4. #4
    Registered User Zaphod's Avatar
    Join Date
    Dec 2001
    Posts
    648
    Originally posted by Tor K'tal
    Fix for the problem I was having with Interface menu not coming up when I pressed ALT+I

    change
    Code:
    interface.cpp:846:   menuBar()->insertItem( "&Interface" , pInterfaceMenu);
    
    to
    
    interface.cpp:846:   menuBar()->insertItem( "Interfac&e" , pInterfaceMenu);
    It isn't a pretty fix, and I'll admit it is just a bad hack work around but it worked for me.

    I attempted to force the shortcut key to be set but couldn't seem to figure out how to opperate the QPopupMenu class properly effectively. A better fix might be to change the line to read something like ---- menuBar()->insertItem( "Interface", pInterfaceMenu, ????, tr("ALT+I")); ---- Problem is I don't know what to put into the ???? area to make it work properly. I also tried to use the setAccel function but it required the same thing I assume the ???? would be.

    Is it just me or are other people having the problem?

    to note:
    ALT+I stuff works in other menus (like view->spawn list->info and networks->IP Address)... just not off the main menu/menubar.

    ~ TK
    Ok, for some odd reason someone set ALT+I to be the accelerator for "Debug"->"List Filters". That will be fixed in my next CVS commit to use CTRL+ALT+Key_F to be more in line with the rest of the items on that menu. This will also remove the conflict that is preventing ALT+Key_I from bringing up the Interface menu.

    Also, another culprit from the debug menu, "Debug"->"List Spawns" was using ALT+CTRL+Key_S and its usage was overriding the other accelerator while the menubar was visible. That will be fixed in my next CVS commit to use CTRL+ALT+Key_P, and to mainain the symetry "Dump Spawns" will be changed to CTRL+ALT+SHIFT+Key_P). This will allow CTRL+ALT+Key_S to show/hide the status bar.

    From my testing CTRL+ALT+Key_T does toggle the menu bar like it is supposed to.

    Enjoy,
    Zaphod (dohpaZ)
    Chief Software Engineer of the Apocalypse.
    http://showeq.doomed.to/
    SourceForge.net user: dohpaz.

    Personal thank you donations are now accepted.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

You may post new threads
You may post replies
You may post attachments
You may edit your posts
HTML code is Off
vB code is On
Smilies are On
[IMG] code is On