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

List:       kde-commits
Subject:    kdenox/konq-embed/src
From:       Eva Brucherseifer <eva () kde ! org>
Date:       2006-07-16 18:58:37
Message-ID: 1153076317.758940.16467.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 563122 by eva:

ROAD-GUI:
disable menu when switching to fullscreen mode
instead we show a special button to switch off fullscreen


 M  +30 -8     mainwindow_road.cc  
 M  +6 -1      mainwindow_road.h  


--- trunk/kdenox/konq-embed/src/mainwindow_road.cc #563121:563122
@@ -98,7 +98,9 @@
       m_roadcfg("roadrc"),
       m_closeTab( 0 ),
       m_tabCountBtn( 0 ),
-      m_mmCloseView( 0 )
+      m_mmCloseView( 0 ),
+      m_qfullscreenAction( 0 ),
+      m_popupMainMenuAction( 0 )
 {
    KConfig *config = KGlobal::config();
    KConfigGroupSaver saver( config, QString::fromLatin1( "General" ) );
@@ -362,12 +364,26 @@
 void MainWindowRoad::toggleFullScreen( bool isFullScreen )
 {
     if ( isFullScreen )
+    {
 	emit fullscreen();
-    actionCollection()->action( "bookmark_edit" )->setEnabled( !isFullScreen );
-    actionCollection()->action( "options_configure" )->setEnabled( !isFullScreen );
+        m_fullscreenOff->show();
+        m_popupMainMenuAction->setEnabled(false);
+    }
+    else
+    {
+        m_fullscreenOff->hide();
+        m_popupMainMenuAction->setEnabled(true);
+    }
+    //actionCollection()->action( "bookmark_edit" )->setEnabled( !isFullScreen );
+    //actionCollection()->action( "options_configure" )->setEnabled( !isFullScreen \
);  MainWindowBase::toggleFullScreen( isFullScreen );
 }
 
+void MainWindowRoad::fullscreenOff()
+{
+     m_qfullscreenAction->setOn(false);
+}
+
 void MainWindowRoad::setLocationBarURL( const QString &url )
 {
     if ( !m_locationCombo )
@@ -403,13 +419,15 @@
 {
     QToolBar *tb = new QToolBar( this, "mainToolbar" );
 
-    QAction *qa;
-
-    qa = new PopupAction( initMainMenu( this ), QString::null,
+    m_popupMainMenuAction = new PopupAction( initMainMenu( this ), QString::null,
                           getPng( "menu_road" ), QString::null, 
                           CTRL + Key_Down, this );
-    qa->addTo( tb );
+    m_popupMainMenuAction->addTo( tb );
 
+    m_fullscreenOff = new QToolButton( getPng( "nofullscreen" ), QString::null,
+                         QString::null, this, SLOT( fullscreenOff() ), tb, \
"fullscreenOff" ); +    m_fullscreenOff->hide();
+
     m_zoomIn = new QToolButton( getPng( "zoom_in" ), QString::null,
                          QString::null, this, SLOT( zoomIn() ), tb, "zoomIn" );
     m_zoomOut = new QToolButton( getPng( "zoom_out" ), QString::null,
@@ -442,7 +460,11 @@
                             i18n( "&Zoom" ), 0, this );
     qa->addTo( mm );
     if ( s_winStyle != STYLE_FULLSCREEN )
-        createAction( "Full&screen", 0/*Qt::Key_F11*/, "view_fullscreen", true);
+    {
+        m_qfullscreenAction = new QAction( QString::null, "Full&screen", \
0/*Qt::Key_F11*/, m_changeable, "view_fullscreen", true ); +        \
createAction.activate( m_qfullscreenAction ); +    }
+
     createAction( "Autoload Images", 0/*Qt::CTRL+Qt::Key_I*/, \
"view_autoload_images", true );  
     mm->insertSeparator();
--- trunk/kdenox/konq-embed/src/mainwindow_road.h #563121:563122
@@ -74,6 +74,7 @@
     virtual void viewWidgetDestroyed();
     virtual void showPreferences();
     virtual void toggleFullScreen( bool isFullScreen );
+    virtual void fullscreenOff();
     virtual void setLocationBarURL( const QString &url );
 private slots:
     void activateViewWidget( int idx );
@@ -113,6 +114,7 @@
     int m_defaultModeIdx;
     WebSearcher *m_webSearcher;
     QToolButton *m_searchBackward;
+    QToolButton *m_fullscreenOff;
     QToolButton *m_zoomIn;
     QToolButton *m_zoomOut;
     QToolButton *m_showSecurity;
@@ -120,6 +122,8 @@
     QToolButton *m_closeTab;
     OverlayLabelButton *m_tabCountBtn;
     KAction *m_mmCloseView;
+    QAction *m_qfullscreenAction;
+    QAction *m_popupMainMenuAction;
 
     // SecurityLevels correspond to the (unfortunately protected) KHTMLPart enum
     enum SecurityLevels {
@@ -138,8 +142,9 @@
     CreateAction( QWidget *parent, QWidget *addToWidget, KActionCollection \
                *actionCollection);
     KAction *operator() ( const char *text, int accel, const char *name, bool toggle \
                = false );
     KAction *operator() ( const QIconSet &icon, int accel, const char *name, bool \
toggle = false ); +
+    KAction *activate( QAction * );
 private:
-    KAction *activate( QAction * );
     QWidget *m_parent;
     QWidget *m_addToWidget;
     KActionCollection *m_actionCollection;


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

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