|
|
*/ | */ |
| |
#include <qdir.h> | #include <qdir.h> |
|
#include <qfile.h> |
#include <qmap.h> | #include <qmap.h> |
| |
#include <kaboutdata.h> | #include <kaboutdata.h> |
|
|
*/ | */ |
KPopupMenu* menu = contextMenu(); | KPopupMenu* menu = contextMenu(); |
| |
( new KAction( i18n( "Textdocument" ), |
if ( QFile::exists( QDir::homeDirPath() + QDir::separator() + ".xversionrc" ) ) { |
"ooo_writer", 0, this, |
( new KAction( i18n( "Textdocument" ), |
SLOT( startWriter() ), this ) ) ->plug( menu ); |
"ximian-openoffice-writer", 0, this, |
( new KAction( i18n( "Spreadsheet" ), |
SLOT( startWriter() ), this ) ) ->plug( menu ); |
"ooo_calc", 0, this, |
( new KAction( i18n( "Spreadsheet" ), |
SLOT( startCalc() ), this ) ) ->plug( menu ); |
"ximian-openoffice-calc", 0, this, |
( new KAction( i18n( "Presentation" ), |
SLOT( startCalc() ), this ) ) ->plug( menu ); |
"ooo_impress", 0, this, |
( new KAction( i18n( "Presentation" ), |
SLOT( startImpress() ), this ) ) ->plug( menu ); |
"ximian-openoffice-impress", 0, this, |
( new KAction( i18n( "Drawing" ), |
SLOT( startImpress() ), this ) ) ->plug( menu ); |
"ooo_draw", 0, this, |
( new KAction( i18n( "Drawing" ), |
SLOT( startDraw() ), this ) ) ->plug( menu ); |
"ximian-openoffice-draw", 0, this, |
( new KAction( i18n( "From Template" ), |
SLOT( startDraw() ), this ) ) ->plug( menu ); |
"wizard", 0, this, |
} else { |
SLOT( startTemplate() ), this ) ) ->plug( menu ); |
( new KAction( i18n( "Textdocument" ), |
|
"ooo_writer", 0, this, |
|
SLOT( startWriter() ), this ) ) ->plug( menu ); |
|
( new KAction( i18n( "Spreadsheet" ), |
|
"ooo_calc", 0, this, |
|
SLOT( startCalc() ), this ) ) ->plug( menu ); |
|
( new KAction( i18n( "Presentation" ), |
|
"ooo_impress", 0, this, |
|
SLOT( startImpress() ), this ) ) ->plug( menu ); |
|
( new KAction( i18n( "Drawing" ), |
|
"ooo_draw", 0, this, |
|
SLOT( startDraw() ), this ) ) ->plug( menu ); |
|
} |
|
( new KAction( i18n( "From Template" ), |
|
"wizard", 0, this, |
|
SLOT( startTemplate() ), this ) ) ->plug( menu ); |
menu->insertSeparator(); | menu->insertSeparator(); |
( new KAction( i18n( "Open Document" ), | ( new KAction( i18n( "Open Document" ), |
"fileopen", 0, this, | "fileopen", 0, this, |
|
|
Try to autodetect settings if they aren't found in our own config. | Try to autodetect settings if they aren't found in our own config. |
*/ | */ |
if ( _exec.length() < 2 ) { | if ( _exec.length() < 2 ) { |
oooConfig = new KSimpleConfig( |
if ( QFile::exists( QDir::homeDirPath() + QDir::separator() + ".xversionrc" ) ) { |
QDir::homeDirPath() + QDir::separator() |
oooConfig = new KSimpleConfig( |
+ ".sversionrc", true ); |
QDir::homeDirPath() + QDir::separator() |
|
+ ".xversionrc", true ); |
|
} else { |
|
oooConfig = new KSimpleConfig( |
|
QDir::homeDirPath() + QDir::separator() |
|
+ ".sversionrc", true ); |
|
} |
oooConfig->setGroup( "Versions" ); | oooConfig->setGroup( "Versions" ); |
versions = oooConfig->entryMap( "Versions" ); | versions = oooConfig->entryMap( "Versions" ); |
/** | /** |