|
|
@ -154,7 +154,7 @@ K3bMainWindow::K3bMainWindow()
|
|
|
|
|
|
|
|
|
|
|
|
setPlainCaption( i18n("K3b - The CD and DVD Kreator") );
|
|
|
|
setPlainCaption( i18n("K3b - The CD and DVD Kreator") );
|
|
|
|
|
|
|
|
|
|
|
|
m_config = kapp->config();
|
|
|
|
m_config = tdeApp->config();
|
|
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////////
|
|
|
|
// call inits to invoke all other construction parts
|
|
|
|
// call inits to invoke all other construction parts
|
|
|
@ -380,7 +380,7 @@ void K3bMainWindow::initView()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// setup main docking things
|
|
|
|
// setup main docking things
|
|
|
|
mainDock = createDockWidget( "project_view", SmallIcon("idea"), 0,
|
|
|
|
mainDock = createDockWidget( "project_view", SmallIcon("idea"), 0,
|
|
|
|
kapp->makeStdCaption( i18n("Project View") ), i18n("Project View") );
|
|
|
|
tdeApp->makeStdCaption( i18n("Project View") ), i18n("Project View") );
|
|
|
|
mainDock->setDockSite( KDockWidget::DockCorner );
|
|
|
|
mainDock->setDockSite( KDockWidget::DockCorner );
|
|
|
|
mainDock->setEnableDocking( KDockWidget::DockNone );
|
|
|
|
mainDock->setEnableDocking( KDockWidget::DockNone );
|
|
|
|
setView( mainDock );
|
|
|
|
setView( mainDock );
|
|
|
@ -419,7 +419,7 @@ void K3bMainWindow::initView()
|
|
|
|
|
|
|
|
|
|
|
|
// --- Directory Dock --------------------------------------------------------------------------
|
|
|
|
// --- Directory Dock --------------------------------------------------------------------------
|
|
|
|
m_dirTreeDock = createDockWidget( "directory_tree", SmallIcon("folder"), 0,
|
|
|
|
m_dirTreeDock = createDockWidget( "directory_tree", SmallIcon("folder"), 0,
|
|
|
|
kapp->makeStdCaption( i18n("Sidepanel") ), i18n("Sidepanel") );
|
|
|
|
tdeApp->makeStdCaption( i18n("Sidepanel") ), i18n("Sidepanel") );
|
|
|
|
m_dirTreeDock->setEnableDocking( KDockWidget::DockCorner );
|
|
|
|
m_dirTreeDock->setEnableDocking( KDockWidget::DockCorner );
|
|
|
|
|
|
|
|
|
|
|
|
K3bFileTreeView* sidePanel = new K3bFileTreeView( m_dirTreeDock );
|
|
|
|
K3bFileTreeView* sidePanel = new K3bFileTreeView( m_dirTreeDock );
|
|
|
@ -433,7 +433,7 @@ void K3bMainWindow::initView()
|
|
|
|
|
|
|
|
|
|
|
|
// --- Contents Dock ---------------------------------------------------------------------------
|
|
|
|
// --- Contents Dock ---------------------------------------------------------------------------
|
|
|
|
m_contentsDock = createDockWidget( "contents_view", SmallIcon("idea"), 0,
|
|
|
|
m_contentsDock = createDockWidget( "contents_view", SmallIcon("idea"), 0,
|
|
|
|
kapp->makeStdCaption( i18n("Contents View") ), i18n("Contents View") );
|
|
|
|
tdeApp->makeStdCaption( i18n("Contents View") ), i18n("Contents View") );
|
|
|
|
m_contentsDock->setEnableDocking( KDockWidget::DockCorner );
|
|
|
|
m_contentsDock->setEnableDocking( KDockWidget::DockCorner );
|
|
|
|
m_dirView = new K3bDirView( sidePanel/*->fileTreeView()*/, m_contentsDock );
|
|
|
|
m_dirView = new K3bDirView( sidePanel/*->fileTreeView()*/, m_contentsDock );
|
|
|
|
m_contentsDock->setWidget( m_dirView );
|
|
|
|
m_contentsDock->setWidget( m_dirView );
|
|
|
@ -616,7 +616,7 @@ void K3bMainWindow::readOptions()
|
|
|
|
void K3bMainWindow::saveProperties( TDEConfig* c )
|
|
|
|
void K3bMainWindow::saveProperties( TDEConfig* c )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// 1. put saved projects in the config
|
|
|
|
// 1. put saved projects in the config
|
|
|
|
// 2. save every modified project in "~/.trinity/share/apps/k3b/sessions/" + KApp->sessionId()
|
|
|
|
// 2. save every modified project in "~/.trinity/share/apps/k3b/sessions/" + TDEApp->sessionId()
|
|
|
|
// 3. save the url of the project (might be something like "AudioCD1") in the config
|
|
|
|
// 3. save the url of the project (might be something like "AudioCD1") in the config
|
|
|
|
// 4. save the status of every project (modified/saved)
|
|
|
|
// 4. save the status of every project (modified/saved)
|
|
|
|
|
|
|
|
|
|
|
@ -673,7 +673,7 @@ void K3bMainWindow::readProperties( TDEConfig* c )
|
|
|
|
// 1. read all projects from the config
|
|
|
|
// 1. read all projects from the config
|
|
|
|
// 2. simply open all of themg
|
|
|
|
// 2. simply open all of themg
|
|
|
|
// 3. reset the saved urls and the modified state
|
|
|
|
// 3. reset the saved urls and the modified state
|
|
|
|
// 4. delete "~/.trinity/share/apps/k3b/sessions/" + KApp->sessionId()
|
|
|
|
// 4. delete "~/.trinity/share/apps/k3b/sessions/" + TDEApp->sessionId()
|
|
|
|
|
|
|
|
|
|
|
|
TQString saveDir = TDEGlobal::dirs()->saveLocation( "appdata", "sessions/" + tqApp->sessionId() + "/", true );
|
|
|
|
TQString saveDir = TDEGlobal::dirs()->saveLocation( "appdata", "sessions/" + tqApp->sessionId() + "/", true );
|
|
|
|
|
|
|
|
|
|
|
@ -795,7 +795,7 @@ bool K3bMainWindow::queryClose()
|
|
|
|
// if we are closed by the session manager everything is fine since we store the
|
|
|
|
// if we are closed by the session manager everything is fine since we store the
|
|
|
|
// current state in saveProperties
|
|
|
|
// current state in saveProperties
|
|
|
|
//
|
|
|
|
//
|
|
|
|
if( kapp->sessionSaving() )
|
|
|
|
if( tdeApp->sessionSaving() )
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
|
|
// FIXME: do not close the docs here. Just ask for them to be saved and return false
|
|
|
|
// FIXME: do not close the docs here. Just ask for them to be saved and return false
|
|
|
|