Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 2160 → Rev 2161

/branches/Version13x/Scribus/scribus/actionmanager.h
50,6 → 50,9
void enableUnicodeActions(bool enabled);
void setPDFActions(ScribusView *);
public slots:
void languageChange();
private:
void initFileMenuActions();
void initEditMenuActions();
/branches/Version13x/Scribus/scribus/actionmanager.cpp
31,6 → 31,7
undoManager = UndoManager::instance();
createActions();
languageChange();
}
 
void ActionManager::createActions()
53,7 → 54,7
void ActionManager::initFileMenuActions()
{
//File Menu
scrActions->insert("fileNew", new ScrAction(QIconSet(loadIcon("DateiNeu16.png"), loadIcon("DateiNeu.xpm")), tr("&New"), CTRL+Key_N, ScApp, "fileNew"));
scrActions->insert("fileNew", new ScrAction(QIconSet(loadIcon("DateiNeu16.png"), loadIcon("DateiNeu.xpm")), "", CTRL+Key_N, ScApp, "fileNew"));
scrActions->insert("fileOpen", new ScrAction(QIconSet(loadIcon("DateiOpen16.png"), loadIcon("DateiOpen.xpm")), tr("&Open..."), CTRL+Key_O, ScApp, "fileOpen"));
scrActions->insert("fileClose", new ScrAction(QIconSet(loadIcon("DateiClos16.png"), loadIcon("DateiClose.png")), tr("&Close"), CTRL+Key_W, ScApp, "fileClose"));
scrActions->insert("fileSave", new ScrAction(QIconSet(loadIcon("DateiSave16.png"), loadIcon("DateiSave2.png")), tr("&Save"), CTRL+Key_S, ScApp, "fileSave"));
722,3 → 723,8
connect( (*scrActions)["itemPDFIsAnnotation"], SIGNAL(activated()), currView, SLOT(ToggleAnnotation()) );
connect( (*scrActions)["itemPDFIsBookmark"], SIGNAL(activated()), currView, SLOT(ToggleBookmark()) );
}
 
void ActionManager::languageChange()
{
(*scrActions)["fileNew"]->setMenuText(tr("&New"));
}
/branches/Version13x/Scribus/scribus/scribus.cpp
174,7 → 174,9
PrefsFile* prefsFile;
 
ScribusApp::ScribusApp()
{} // ScribusApp::ScribusApp()
{
actionManager=NULL;
} // ScribusApp::ScribusApp()
 
/*
* retval 0 - ok, 1 - no fonts, ...
10380,3 → 10382,9
}
}
}
 
void ScribusApp::languageChange()
{
if (actionManager!=NULL)
actionManager->languageChange();
}
/branches/Version13x/Scribus/scribus/scribusapp.h
18,15 → 18,24
#include <qapplication.h>
#include <qstring.h>
 
class ScribusApp;
 
class ScribusQApp : public QApplication
{
Q_OBJECT
 
public:
ScribusQApp ( int & argc, char ** argv );
int init(bool useGUI, bool showSplash, QString lang, QString file);
QStringList getLang(QString lang);
void installTranslators(QStringList langs);
void changeGUILanguage(QString);
public:
ScribusQApp ( int & argc, char ** argv );
int init(bool useGUI, bool showSplash, QString lang, QString file);
QStringList getLang(QString lang);
void installTranslators(QStringList langs);
void changeGUILanguage(QString);
private:
ScribusApp *scribus;
/*
signals:
languageChanged();
*/
};
#endif
/branches/Version13x/Scribus/scribus/scribusapp.cpp
37,7 → 37,7
{
QStringList langs = getLang(QString(lang));
 
ScribusApp *scribus = new ScribusApp();
scribus = new ScribusApp();
if (!scribus)
exit(EXIT_FAILURE);
if (!langs.isEmpty())
141,7 → 141,14
void ScribusQApp::installTranslators(QStringList langs)
{
QString lang = "";
QTranslator *trans= new QTranslator(0);
static QTranslator *trans = 0;
if ( trans )
{
removeTranslator( trans );
delete trans;
}
trans = new QTranslator(0);
QString path = ScPaths::instance().libDir();
path += "scribus";
 
156,7 → 163,7
 
if (loaded)
installTranslator(trans);
 
/* CB TODO, currently disabled, because its broken broken broken
path = ScPaths::instance().pluginDir();
QDir dir(path , "*.*", QDir::Name, QDir::Files | QDir::NoSymLinks);
if (dir.exists() && (dir.count() != 0)) {
169,7 → 176,7
installTranslator(trans);
}
}
}
}*/
}
 
void ScribusQApp::changeGUILanguage(QString newGUILang)
/branches/Version13x/Scribus/scribus/scribus.h
228,6 → 228,7
PluginManager* pluginManager;
 
public slots:
void languageChange();
void specialActionKeyEvent(QString actionName, int unicodevalue);
void newView();
void ToggleAllGuides();