[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdegraphics/kolourpaint
From:       Albert Astals Cid <tsdgeos () terra ! es>
Date:       2008-10-19 20:22:41
Message-ID: 1224447761.789609.30826.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 873614 by aacid:

do not leave things up to translators, they will always mess, just do it yourself


 M  +1 -1      kolourpaintui.rc  
 M  +5 -7      mainWindow/kpMainWindow.cpp  


--- trunk/KDE/kdegraphics/kolourpaint/kolourpaintui.rc #873613:873614
@@ -119,7 +119,7 @@
     </Menu>
 
     <!-- HACK: See kpmainwindow.cpp:kpMainWindow::createGUI(). -->
-    <Menu name="toolToolBarHiddenMenu"><text>DO NOT TRANSLATE, JUST LEAVE AS IS: \
toolToolBarHiddenMenu</text> +    <Menu name="toolToolBarHiddenMenu">
         <Action name="tool_brush" />
         <Action name="tool_color_eraser" />
         <Action name="tool_color_picker" />
--- trunk/KDE/kdegraphics/kolourpaint/mainWindow/kpMainWindow.cpp #873613:873614
@@ -39,6 +39,7 @@
 #include <kdebug.h>
 #include <kglobal.h>
 #include <klocale.h>
+#include <KMenu>
 #include <KMenuBar>
 #include <kmessagebox.h>
 #include <krecentfilesaction.h>
@@ -178,14 +179,11 @@
     //
     //       In kolourpaintui.rc, we get around this by plugging them into
     //       a fake menu.  Here, we hide that fake menu.
-    Q_ASSERT (menuBar ());
-    foreach (QAction *action, menuBar ()->actions ())
+    const QList<KMenu *> menuToHide = findChildren<KMenu \
*>("toolToolBarHiddenMenu"); +    // should only contain one but...
+    foreach (KMenu *menu, menuToHide)
     {
-        if (action->text () == "DO NOT TRANSLATE, JUST LEAVE AS IS: \
                toolToolBarHiddenMenu")
-        {
-            action->setVisible (false);
-            break;
-        }
+        menu->menuAction()->setVisible(false);
     }
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic