Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 0fa5fe91 authored by Tomas Mecir's avatar Tomas Mecir

The base app now compiles (though it doesn't start)

parent a0fa36f8
......@@ -13,7 +13,7 @@ include(KDEFrameworkCompilerSettings)
include(ECMInstallIcons)
find_package(Qt5 REQUIRED COMPONENTS Core Gui Widgets Script Multimedia)
find_package(KF5 REQUIRED COMPONENTS Config CoreAddons WidgetsAddons I18n KIO KDELibs4Support KCMUtils XmlGui Parts Service)
find_package(KF5 REQUIRED COMPONENTS Config CoreAddons WidgetsAddons I18n KIO KDELibs4Support KCMUtils XmlGui Parts Service IconThemes)
find_package(MXP)
if (MXP_FOUND)
......
......@@ -50,7 +50,7 @@ set(kmuddy_SRCS
add_executable(kmuddy ${kmuddy_SRCS})
set (KMUDDY_LIBRARIES kmuddycore dialogs KF5::KDELibs4Support KF5::I18n KF5::Parts z )
set (KMUDDY_LIBRARIES kmuddycore dialogs KF5::KDELibs4Support KF5::I18n KF5::Parts KF5::IconThemes z )
if (MXP_FOUND)
set (KMUDDY_LIBRARIES ${KMUDDY_LIBRARIES} ${MXP_LIBRARIES})
endif (MXP_FOUND)
......
......@@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QLabel>
#include <QTabWidget>
#include <kicondialog.h>
#include <KIconButton>
#include <klineedit.h>
#include <klocale.h>
......
......@@ -28,6 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QKeyEvent>
#include <QFontDatabase>
#include <QTextBlock>
//maximum number of lines ...
#define MAXLINES 10
......@@ -37,9 +38,8 @@ cMultiInputLine::cMultiInputLine (int sess, QWidget *parent)
{
setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Fixed);
setTextFormat (Qt::PlainText);
setWrapMode (QTextOption::WrapAtWordBoundaryOrAnywhere);
setAcceptRichText (false);
setWordWrapMode (QTextOption::WrapAtWordBoundaryOrAnywhere);
//height: 2 lines
setLinesHeight (2);
......@@ -128,19 +128,17 @@ void cMultiInputLine::setLinesHeight (int lines)
void cMultiInputLine::updateHeight()
{
setLinesHeight (lines ());
setLinesHeight (document()->lineCount());
}
void cMultiInputLine::sendCommands ()
{
int pars = paragraphs();
cCmdQueues *queues = (cCmdQueues *) object ("cmdqueues");
if (!queues) return;
// create a command queue with all the commands
cCmdQueue *queue = new cCmdQueue (sess());
for (int i = 0; i < pars; i++)
queue->addCommand (text (i));
for (QTextBlock block = document()->begin(); block.isValid(); block = block.next())
queue->addCommand (block.text());
queues->addQueue (queue);
//delete text if not needed
......
......@@ -113,7 +113,7 @@ void cMXPManager::processText (const QString &text)
return;
//give the text to the library
mxpProcessText (h, text.toLocal8Bit());
mxpProcessText (h, text.toLocal8Bit().data());
//process each result
while (mxpHasResults (h)) {
......@@ -320,7 +320,7 @@ QColor cMXPManager::toColor (RGB mxpColor)
void cMXPManager::sendDefaultFont ()
{
const char *name = deffont.family ().toLatin1();
const char *name = deffont.family ().toLatin1().data();
int size = deffont.pointSize ();
bool bold = deffont.bold ();
bool italics = deffont.italic ();
......
......@@ -33,16 +33,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <kapplication.h>
#include <kdialog.h>
#include <kicon.h>
#include <klocale.h>
#include <QIcon>
struct cSessionManagerPrivate {
cTabWidget *widget;
cActionManager *am;
/** icons for the tab bar */
KIcon iconOk, iconNo, iconFlag;
QIcon iconOk, iconNo, iconFlag;
/** should the tab bar be displayed even if there is only one connection? */
bool wantTabBar;
......@@ -58,9 +59,9 @@ cSessionManager::cSessionManager () : cActionBase ("session-manager", 0)
d->am = cActionManager::self();
//icons for tabs
d->iconOk = KIcon ("dialog-ok");
d->iconNo = KIcon ("dialog-cancel");
d->iconFlag = KIcon ("flag");
d->iconOk = QIcon::fromTheme ("dialog-ok");
d->iconNo = QIcon::fromTheme ("dialog-cancel");
d->iconFlag = QIcon::fromTheme ("flag");
addGlobalEventHandler ("global-settings-changed", 50, PT_NOTHING);
}
......@@ -302,7 +303,7 @@ void cSessionManager::setAlwaysTabBar (bool value)
void cSessionManager::setIcon (int sess, ProfileIcon icon)
{
int tab = getTabBySession (sess);
KIcon i;
QIcon i;
switch (icon) {
case IconOk: i = d->iconOk; break;
case IconNo: i = d->iconNo; break;
......
......@@ -46,10 +46,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <klocale.h>
#include <kmessagebox.h>
#include <knuminput.h>
#include <KServiceTypeTrader>
#include <ktextedit.h>
#include <kregexpeditorinterface.h>
#include <kparts/componentfactory.h>
struct cTriggerEditor::Private {
// Basic
......@@ -728,7 +728,7 @@ void cTriggerEditor::updateColorizationsList ()
void cTriggerEditor::browseForSoundFile ()
{
//open some file and place its name to the edit box
QString fName = KFileDialog::getOpenFileName (QString(),
QString fName = KFileDialog::getOpenFileName (QUrl(),
"audio/x-wav audio/mpeg audio/ogg", this, i18n ("Choose sound file"));
if (!(fName.isEmpty()))
d->edsoundname->setText (fName);
......
......@@ -60,8 +60,7 @@ void cWindowList::eventNothingHandler (QString event, int)
if (event == "global-settings-changed") {
cGlobalSettings *gs = cGlobalSettings::self();
adjustFonts (gs->getFont ("console-font"));
applySettings (gs->getBool ("allow-blink"), gs->getBool ("word-wrap"),
gs->getInt ("wrap-pos"), gs->getInt ("indent"), gs->getBool ("force-redraw"));
applySettings (gs->getBool ("allow-blink"), gs->getInt ("indent"), gs->getBool ("force-redraw"));
}
}
......@@ -189,7 +188,7 @@ void cWindowList::load ()
name.replace("KMuddywin_", QString());
if(!add(name, true))
return;
windows[name]->setInitialSize(g.readEntry("Size", QSize()));
windows[name]->setMinimumSize(g.readEntry("Size", QSize()));
pos = g.readEntry("Position", QPoint());
windows[name]->move(pos);
vis = g.readEntry("Visible", true);
......
......@@ -67,8 +67,7 @@ public:
void save ();
void adjustFonts(QFont font);
void applySettings (bool allowblinking, bool wordwrapping, int wrappos,
int indentvalue, int forceredraw);
void applySettings (bool allowblinking, int indentvalue, int forceredraw);
protected:
void load ();
......
......@@ -29,7 +29,6 @@
dlgMultiLine::dlgMultiLine (QWidget *parent) : QDockWidget (parent)
{
//initial size
// setInitialSize (QSize (400, 250));
setWindowTitle (i18n ("Multi-line input"));
//main widget
......@@ -93,6 +92,11 @@ dlgMultiLine::~dlgMultiLine ()
{
}
QSize dlgMultiLine::sizeHint() const
{
return QSize (400, 250);
}
void dlgMultiLine::setFont (const QFont &font)
{
editor->setFont (font);
......
......@@ -62,10 +62,10 @@
#include <QAction>
#include <QDesktopWidget>
#include <QIcon>
#include <QKeyEvent>
#include <QMenu>
#include <QMenuBar>
#include <QTimer>
#include <QKeyEvent>
#include <kaboutapplicationdialog.h>
#include <kactioncollection.h>
......@@ -73,6 +73,7 @@
#include <kapplication.h>
#include <khelpmenu.h>
#include <kinputdialog.h>
#include <KIconLoader>
#include <klocale.h>
#include <kmessagebox.h>
#include <kshortcut.h>
......@@ -80,8 +81,8 @@
#include <ktoggleaction.h>
#include <ktoolbar.h>
#include <kwindowsystem.h>
#include <ksystemtrayicon.h>
#include <kpassivepopup.h>
#include <KSystemTrayIcon>
#include <kdebug.h>
KMuddy *KMuddy::_self = 0;
......@@ -606,8 +607,6 @@ void KMuddy::prepareObjects ()
menu->plug (pluginsconfig, "settings-slot3");
//menu Help
//make About Kmuddy work (I have no idea why it doesn't work immediately)
connect (helpMenu, SIGNAL (showAboutApplication ()), this, SLOT (aboutApp ()));
// global actions are tied to the main window
addAction (lineup);
......@@ -916,13 +915,6 @@ QString KMuddy::reconnectText ()
return i18n ("To reconnect, press %1 or use Connection / Reconnect.", reconnect->shortcut().toString());;
}
void KMuddy::aboutApp ()
{
KAboutApplicationDialog *dlg = new KAboutApplicationDialog (KGlobal::activeComponent().aboutData(), this);
dlg->exec ();
delete dlg;
}
void KMuddy::updateWindows ()
{
// TODO: the windows could react on events and update themselves ...
......
......@@ -28,6 +28,7 @@ class QMenu;
class QTimer;
class KHelpMenu;
class QMenuBar;
class KSystemTrayIcon;
class KToolBar;
class dlgConnect;
......@@ -39,7 +40,6 @@ class dlgStatistics;
class cActionManager;
class cTabWidget;
class KSystemTrayIcon;
/** KMuddy is the base class of the project */
class KMuddy : public KMainWindow, public cActionBase
......@@ -131,7 +131,6 @@ protected slots:
void pasteInput ();
void changeSession (int tab);
void aboutApp ();
/** lots of slots that handle menus; were handled by slots in objects,
now we have cSession, so we have to handle them here */
......
This diff is collapsed.
......@@ -27,49 +27,54 @@
#include "kmuddy.h"
#include "cglobalsettings.h"
#define DESCRIPTION ki18n("KMuddy is a MUD (Multi-User Dungeon) client for KDE with a variety of features.")
#define DESCRIPTION i18n("KMuddy is a MUD (Multi-User Dungeon) client for KDE with a variety of features.")
int main(int argc, char *argv[])
{
KAboutData aboutData ("kmuddy", "", ki18n("KMuddy"),
VERSION, DESCRIPTION, KAboutData::License_GPL,
ki18n("(c) 2002-2009, Tomas Mecir"), KLocalizedString(), "http://www.kmuddy.com/", "kmuddy@kmuddy.com");
aboutData.addAuthor(ki18n ("Tomas Mecir"),
ki18n("Main developer and maintainer"), "kmuddy@kmuddy.com");
aboutData.addCredit(ki18n("Alex Bache"),
ki18n("Many improvements in external scripting, internal script parser, output view and aliases/triggers, bugfixes"), "alex.bache@ntlworld.com");
aboutData.addCredit(ki18n("Alsherok staff"),
ki18n("for releasing AFKMud codebase, used to test MCCP/MSP"));
aboutData.addCredit(ki18n("Andrea Cascio"),
ki18n("SuSE RPMs, speed-walking improvements"), "hacksaw@triangolo.it");
aboutData.addCredit(ki18n("Orion Elder"),
ki18n("KMuddy forum, many ideas"), "orion@mudplanet.org");
aboutData.addCredit(ki18n("Scott Monachello"),
ki18n("Improvements in scripting, bugfixes"), "smonachello@yahoo.com");
aboutData.addCredit(ki18n("Tyler Montbriand"),
ki18n("Help with SDL support"), "tsm@accesscomm.ca");
aboutData.addCredit(ki18n("Marco Mastroddi"),
ki18n("Tick timers"), "marco.mastroddi@libero.it");
aboutData.addCredit (ki18n("Henrikki Almusa"),
ki18n("Commands to enable/disable groups"), "hena@iki.fi");
aboutData.addCredit(ki18n("Drossos Stamboulakis"),
ki18n("Selection improvements, full screen mode, cross-tab commands"), "adsluard@tpg.com.au");
aboutData.addCredit (ki18n("Antonio J. Soler Sanchez"),
ki18n("Spanish translation"), "redtony@telefonica.net");
aboutData.addCredit(ki18n("lontau"),
ki18n("Code to access KMuddy variables in Ruby"));
aboutData.addCredit (ki18n("Magnus Lundborg"), ki18n("Tab-expansion improvements"), "lundborg.magnus@gmail.com");
aboutData.addCredit(ki18n("Vladimir Lazarenko"),
ki18n("Many improvements. Hosting KMuddy CVS."), "vlad@lazarenko.net");
aboutData.addCredit(ki18n("Stuart Henshall"),
ki18n("Speed improvements."), "shenshall@blueyonder.co.uk");
aboutData.addCredit(ki18n("Vadim Peretokin"),
ki18n("Many improvements, website"), "vadimuses@gmail.com");
aboutData.addCredit(ki18n("Heiko Koehn"),
ki18n("Scripting improvements"), "koehnheiko@googlemail.com");
aboutData.addCredit(ki18n("Robert Marmorstein"),
ki18n("Systray icon support"), "robertandbeth@gmail.com");
QApplication a (argc, argv);
KLocalizedString::setApplicationDomain("foo");
QApplication::setApplicationDisplayName(i18n("KMuddy"));
KAboutData aboutData ("kmuddy", i18n("KMuddy"),
VERSION, DESCRIPTION, KAboutLicense::GPL,
i18n("(c) 2002-2018, Tomas Mecir"), QString(), "http://www.kmuddy.com/", "mecirt@gmail.com");
aboutData.addAuthor(i18n ("Tomas Mecir"),
i18n("Main developer and maintainer"), "mecirt@gmail.com");
aboutData.addCredit(i18n("Alex Bache"),
i18n("Many improvements in external scripting, internal script parser, output view and aliases/triggers, bugfixes"), "alex.bache@ntlworld.com");
aboutData.addCredit(i18n("Alsherok staff"),
i18n("for releasing AFKMud codebase, used to test MCCP/MSP"));
aboutData.addCredit(i18n("Andrea Cascio"),
i18n("SuSE RPMs, speed-walking improvements"), "hacksaw@triangolo.it");
aboutData.addCredit(i18n("Orion Elder"),
i18n("KMuddy forum, many ideas"), "orion@mudplanet.org");
aboutData.addCredit(i18n("Scott Monachello"),
i18n("Improvements in scripting, bugfixes"), "smonachello@yahoo.com");
aboutData.addCredit(i18n("Tyler Montbriand"),
i18n("Help with SDL support"), "tsm@accesscomm.ca");
aboutData.addCredit(i18n("Marco Mastroddi"),
i18n("Tick timers"), "marco.mastroddi@libero.it");
aboutData.addCredit (i18n("Henrikki Almusa"),
i18n("Commands to enable/disable groups"), "hena@iki.fi");
aboutData.addCredit(i18n("Drossos Stamboulakis"),
i18n("Selection improvements, full screen mode, cross-tab commands"), "adsluard@tpg.com.au");
aboutData.addCredit (i18n("Antonio J. Soler Sanchez"),
i18n("Spanish translation"), "redtony@telefonica.net");
aboutData.addCredit(i18n("lontau"),
i18n("Code to access KMuddy variables in Ruby"));
aboutData.addCredit (i18n("Magnus Lundborg"), i18n("Tab-expansion improvements"), "lundborg.magnus@gmail.com");
aboutData.addCredit(i18n("Vladimir Lazarenko"),
i18n("Many improvements. Hosting KMuddy CVS."), "vlad@lazarenko.net");
aboutData.addCredit(i18n("Stuart Henshall"),
i18n("Speed improvements."), "shenshall@blueyonder.co.uk");
aboutData.addCredit(i18n("Vadim Peretokin"),
i18n("Many improvements, website"), "vadimuses@gmail.com");
aboutData.addCredit(i18n("Heiko Koehn"),
i18n("Scripting improvements"), "koehnheiko@googlemail.com");
aboutData.addCredit(i18n("Robert Marmorstein"),
i18n("Systray icon support"), "robertandbeth@gmail.com");
KAboutData::setApplicationData (aboutData);
QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("kmuddy")));
//alarm signal is sometimes causing KMuddy to terminate incorrectly
//when switching tabs using Alt+number - ignoring the signal, hoping
......@@ -84,8 +89,6 @@ int main(int argc, char *argv[])
migrator.setUiFiles(QStringList() << QStringLiteral("kmuddymapperpart.rc"));
migrator.migrate();
KApplication a (argc, argv );
QApplication::setApplicationDisplayName(i18n("KMuddy"));
KMuddy *kmuddy = 0;
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment