[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebase/konqueror
From: Alexander Neundorf <neundorf () kde ! org>
Date: 2004-01-04 19:06:05
Message-ID: 20040104190605.0DB2593EA () office ! kde ! org
[Download RAW message or body]
CVS commit by neundorf:
Add support for specifying different xmlui files in different konqy
profiles, approved by David
http://lists.kde.org/?l=kfm-devel&m=107324000909333&w=2
This makes it possible to use a simpler xmlui-file for the browser
profile and a file management-specialized xmlui-file for the (guess what)
file management profile. I think this might be a big step for KDE, since
many
people claim that "simple" webbrowsers are better suited for many users
(Galeon, Firebird), and with this patch we can provide konqy also as a simple \
webbrowser. In order to do this,a n entry like the following has to be added to the \
profile file:
[Profile]
XMLUIFile=konqweb.rc
Without this entry, the patch doesn't change the behaviour in any way.
Alex
M +4 -3 konq_mainwindow.cc 1.1273
M +1 -1 konq_mainwindow.h 1.423
M +7 -2 konq_misc.cc 1.55
--- kdebase/konqueror/konq_mainwindow.cc #1.1272:1.1273
@@ -135,5 +135,5 @@ KonqExtendedBookmarkOwner::KonqExtendedB
}
-KonqMainWindow::KonqMainWindow( const KURL &initialURL, bool openInitialURL, const \
char *name ) +KonqMainWindow::KonqMainWindow( const KURL &initialURL, bool \
openInitialURL, const char *name, const QString& xmluiFile) : KParts::MainWindow( \
NoDCOPObject, 0L, name, WDestructiveClose | WStyle_ContextHelp ) {
@@ -218,5 +218,6 @@ KonqMainWindow::KonqMainWindow( const KU
connect( kapp, SIGNAL( kdisplayFontChanged()), SLOT(slotReconfigure()));
- setXMLFile( "konqueror.rc" );
+ //load the xmlui file specified in the profile or the default konqueror.rc
+ setXMLFile( xmluiFile );
setStandardToolBarMenuEnabled( true );
@@ -1203,5 +1204,5 @@ void KonqMainWindow::slotDuplicateWindow
m_pViewManager->saveViewProfile( config, true, true );
- KonqMainWindow *mainWindow = new KonqMainWindow( KURL(), false );
+ KonqMainWindow *mainWindow = new KonqMainWindow( KURL(), false, 0, xmlFile());
mainWindow->viewManager()->loadViewProfile( config, \
m_pViewManager->currentProfile() ); if (mainWindow->currentView())
--- kdebase/konqueror/konq_mainwindow.h #1.422:1.423
@@ -96,5 +96,5 @@ public:
enum ComboAction { ComboClear, ComboAdd, ComboRemove };
- KonqMainWindow( const KURL &initialURL = KURL(), bool openInitialURL = true, const \
char *name = 0 ); + KonqMainWindow( const KURL &initialURL = KURL(), bool \
openInitialURL = true, const char *name = 0, const QString& \
xmluiFile="konqueror.rc"); ~KonqMainWindow();
--- kdebase/konqueror/konq_misc.cc #1.54:1.55
@@ -136,5 +136,10 @@ KonqMainWindow * KonqMisc::createBrowser
else
{
- mainWindow = new KonqMainWindow( KURL(), false );
+ KConfig cfg( path, true );
+ cfg.setDollarExpansion( true );
+ cfg.setGroup( "Profile" );
+ QString xmluiFile=cfg.readEntry("XMLUIFile","konqueror.rc");
+
+ mainWindow = new KonqMainWindow( KURL(), false, 0, xmluiFile );
if ( forbidUseHTML )
mainWindow->setShowHTML( false );
@@ -142,5 +147,5 @@ KonqMainWindow * KonqMisc::createBrowser
KonqOpenURLRequest req;
req.args = args;
- mainWindow->viewManager()->loadViewProfile( path, filename, url, req );
+ mainWindow->viewManager()->loadViewProfile( cfg, filename, url, req );
}
mainWindow->setInitialFrameName( args.frameName );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic