[Libreoffice-commits] .: Branch 'feature/unitymenus' - vcl/unx

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Aug 31 03:39:12 PDT 2012


 vcl/unx/gtk/window/glomenu.cxx    |    2 -
 vcl/unx/gtk/window/gtksalmenu.cxx |   60 --------------------------------------
 2 files changed, 62 deletions(-)

New commits:
commit 5b1f90a2b608486a7b34c566372eca3ab24401d4
Author: Antonio Fernandez <antonio.fernandez at aentos.es>
Date:   Fri Aug 31 11:38:35 2012 +0100

    Cleaned up some code.
    
    Change-Id: I47bc6a29a01a2cacd3e77a9ec9ac4f9b6223093f

diff --git a/vcl/unx/gtk/window/glomenu.cxx b/vcl/unx/gtk/window/glomenu.cxx
index 657d0c2..9c0f835 100644
--- a/vcl/unx/gtk/window/glomenu.cxx
+++ b/vcl/unx/gtk/window/glomenu.cxx
@@ -24,8 +24,6 @@
 #include <stdio.h>
 #include <string.h>
 
-#include <unx/gtk/gtksalmenu.hxx>
-
 #include <unx/gtk/glomenu.h>
 
 struct _GLOMenu
diff --git a/vcl/unx/gtk/window/gtksalmenu.cxx b/vcl/unx/gtk/window/gtksalmenu.cxx
index 4f6dda2..ca3e9ef 100644
--- a/vcl/unx/gtk/window/gtksalmenu.cxx
+++ b/vcl/unx/gtk/window/gtksalmenu.cxx
@@ -32,65 +32,6 @@
 
 using namespace std;
 
-//Some menus are special, this is the list of them
-//gboolean
-//isSpecialSubmenu (OUString command)
-//{
-//    const gchar * specialSubmenus[11] = {".uno:CharFontName",
-//                                         ".uno:FontHeight",
-//                                         ".uno:ObjectMenue",
-//                                         ".uno:InsertPageHeader",
-//                                         ".uno:InsertPageFooter",
-//                                         ".uno:ChangeControlType",
-//                                         ".uno:AvailableToolbars",
-//                                         ".uno:ScriptOrganizer",
-//                                         ".uno:RecentFileList",
-//                                         ".uno:AddDirect",
-//                                         ".uno:AutoPilotMenu"};
-
-//    for (gint i = 0; i < 11; i++)
-//    {
-//        if (command.equals (OUString::createFromAscii (specialSubmenus[i])))
-//            return TRUE;
-//    }
-//    return FALSE;
-//}
-
-//static void UpdateNativeMenu( GtkSalMenu* pMenu ) {
-//    if ( pMenu == NULL )
-//        return;
-
-//    Menu* pVCLMenu = pMenu->GetMenu();
-
-//    for ( sal_uInt16 i = 0; i < pMenu->GetItemCount(); i++ ) {
-//        GtkSalMenuItem *pSalMenuItem = pMenu->GetItemAtPos( i );
-//        sal_uInt16 nId = pSalMenuItem->mnId;
-
-//        if ( pSalMenuItem->mnType == MENUITEM_SEPARATOR )
-//            continue;
-
-//        String aText = pVCLMenu->GetItemText( nId );
-//        String aCommand = pVCLMenu->GetItemCommand( nId );
-//        sal_Bool itemEnabled = pVCLMenu->IsItemEnabled( nId );
-//        KeyCode nAccelKey = pVCLMenu->GetAccelKey( nId );
-//        sal_Bool itemChecked = pVCLMenu->IsItemChecked( nId );
-
-//        // Force updating of native menu labels.
-//        pMenu->SetItemCommand( i, pSalMenuItem, aCommand );
-//        pMenu->SetItemText( i, pSalMenuItem, aText );
-//        pMenu->EnableItem( i, itemEnabled );
-//        pMenu->SetAccelerator( i, pSalMenuItem, nAccelKey, nAccelKey.GetName( pMenu->GetFrame()->GetWindow() ) );
-//        pMenu->CheckItem( i, itemChecked );
-
-//        GtkSalMenu* pSubmenu = pSalMenuItem->mpSubMenu;
-
-//        if ( pSubmenu && pSubmenu->GetMenu() ) {
-//            pSubmenu->GetMenu()->Activate();
-//            pSubmenu->GetMenu()->Deactivate();
-//            UpdateNativeMenu( pSubmenu );
-//        }
-//    }
-//}
 
 static void UpdateNativeMenu( GtkSalMenu* pMenu )
 {
@@ -592,7 +533,6 @@ void GtkSalMenu::SetNativeItemCommand( unsigned nSection, unsigned nItemPos, Gtk
 
     if ( aCurrentCommand == NULL || g_strcmp0( aCurrentCommand, aCommand ) != 0 )
     {
-        cout << __FUNCTION__ << endl;
         g_lo_menu_set_command_to_item_in_section( pMenu, nSection, nItemPos, aCommand );
 
         gchar* aItemCommand = g_strconcat("win.", aCommand, NULL );


More information about the Libreoffice-commits mailing list