From bbc587ee9af2aa29a5313679044fbdf0948e7895 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20K=C3=BCmmel?= Date: Tue, 13 Jun 2006 08:24:43 +0000 Subject: [PATCH] coding style and readability corrections Index: frontends/qt3/lyx_gui.C =================================================================== --- frontends/qt3/lyx_gui.C (revision 14088) +++ frontends/qt3/lyx_gui.C (working copy) @@ -222,12 +222,12 @@ void start(string const & batch, vector const & files, - unsigned int width, unsigned int height, int posx, int posy, bool isMax) + unsigned int width, unsigned int height, int posx, int posy, bool maximize) { // this can't be done before because it needs the Languages object initEncodings(); - boost::shared_ptr view_ptr(new QtView(width, height, isMax)); + boost::shared_ptr view_ptr(new QtView(width, height, maximize)); LyX::ref().addLyXView(view_ptr); QtView & view = *view_ptr.get(); Index: frontends/qt3/QtView.C =================================================================== --- frontends/qt3/QtView.C (revision 14088) +++ frontends/qt3/QtView.C (working copy) @@ -55,12 +55,12 @@ -QtView::QtView(unsigned int width, unsigned int height, bool isMax) +QtView::QtView(unsigned int width, unsigned int height, bool maximize) : QMainWindow(), LyXView(), commandbuffer_(0) { resize(width, height); - if(isMax) + if (maximize) this->setWindowState(WindowMaximized); qApp->setMainWidget(this); @@ -164,7 +164,7 @@ void QtView::closeEvent(QCloseEvent *) { LyX::ref().session().saveSessionInfo("WindowIsMaximized", (this->isMaximized() ? "yes" : "no")); - //don't save maximized values + // don't save maximized values this->showNormal(); // save windows size and position LyX::ref().session().saveSessionInfo("WindowWidth", convert(width())); Index: frontends/qt3/QtView.h =================================================================== --- frontends/qt3/QtView.h (revision 14088) +++ frontends/qt3/QtView.h (working copy) @@ -37,7 +37,7 @@ Q_OBJECT public: /// create a main window of the given dimensions - QtView(unsigned int w, unsigned int h, bool isMax); + QtView(unsigned int w, unsigned int h, bool maximize); ~QtView(); Index: frontends/qt4/lyx_gui.C =================================================================== --- frontends/qt4/lyx_gui.C (revision 14088) +++ frontends/qt4/lyx_gui.C (working copy) @@ -228,12 +228,12 @@ void start(string const & batch, vector const & files, - unsigned int width, unsigned int height, int posx, int posy, bool isMax) + unsigned int width, unsigned int height, int posx, int posy, bool maximize) { // this can't be done before because it needs the Languages object initEncodings(); - boost::shared_ptr view_ptr(new QtView(width, height, isMax)); + boost::shared_ptr view_ptr(new QtView(width, height, maximize)); LyX::ref().addLyXView(view_ptr); QtView & view = *view_ptr.get(); Index: frontends/qt4/QtView.C =================================================================== --- frontends/qt4/QtView.C (revision 14088) +++ frontends/qt4/QtView.C (working copy) @@ -70,12 +70,12 @@ } // namespace anon -QtView::QtView(unsigned int width, unsigned int height, bool isMax) +QtView::QtView(unsigned int width, unsigned int height, bool maximize) : QMainWindow(), LyXView(), commandbuffer_(0) { resize(width, height); - if(isMax) + if (maximize) this->setWindowState(Qt::WindowMaximized); mainWidget_ = this; Index: frontends/qt4/QtView.h =================================================================== --- frontends/qt4/QtView.h (revision 14088) +++ frontends/qt4/QtView.h (working copy) @@ -47,7 +47,7 @@ Q_OBJECT public: /// create a main window of the given dimensions - QtView(unsigned int w, unsigned int h, bool isMax); + QtView(unsigned int w, unsigned int h, bool maximize); ~QtView(); Index: frontends/lyx_gui.h =================================================================== --- frontends/lyx_gui.h (revision 14088) +++ frontends/lyx_gui.h (working copy) @@ -57,7 +57,7 @@ * batch commands, and loading the given documents */ void start(std::string const & batch, std::vector const & files, - unsigned int width, unsigned int height, int posx, int posy, bool isMax); + unsigned int width, unsigned int height, int posx, int posy, bool maximize); /** * Enter the main event loop (\sa LyX::exec2) Index: lyx_main.C =================================================================== --- lyx_main.C (revision 14088) +++ lyx_main.C (working copy) @@ -307,7 +307,7 @@ // initial geometry unsigned int width = 690; unsigned int height = 510; - bool isMax = false; + bool maximize = false; // first try lyxrc if (lyxrc.geometry_width != 0 && lyxrc.geometry_height != 0 ) { width = lyxrc.geometry_width; @@ -322,7 +322,7 @@ if (!val.empty()) height = convert(val); if (session().loadSessionInfo("WindowIsMaximized") == "yes") - isMax = true; + maximize = true; } // if user wants to restore window position int posx = -1; @@ -335,7 +335,7 @@ if (!val.empty()) posy = convert(val); } - lyx_gui::start(batch_command, files, width, height, posx, posy, isMax); + lyx_gui::start(batch_command, files, width, height, posx, posy, maximize); } else { // Something went wrong above quitLyX(false); git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14089 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/lyx_gui.h | 2 +- src/frontends/qt3/QtView.C | 6 +++--- src/frontends/qt3/QtView.h | 2 +- src/frontends/qt3/lyx_gui.C | 4 ++-- src/frontends/qt4/QtView.C | 4 ++-- src/frontends/qt4/QtView.h | 2 +- src/frontends/qt4/lyx_gui.C | 4 ++-- src/lyx_main.C | 6 +++--- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/frontends/lyx_gui.h b/src/frontends/lyx_gui.h index 340f98d364..0d637453f2 100644 --- a/src/frontends/lyx_gui.h +++ b/src/frontends/lyx_gui.h @@ -57,7 +57,7 @@ void parse_lyxrc(); * batch commands, and loading the given documents */ void start(std::string const & batch, std::vector const & files, - unsigned int width, unsigned int height, int posx, int posy, bool isMax); + unsigned int width, unsigned int height, int posx, int posy, bool maximize); /** * Enter the main event loop (\sa LyX::exec2) diff --git a/src/frontends/qt3/QtView.C b/src/frontends/qt3/QtView.C index 7be868cf70..843f609c1a 100644 --- a/src/frontends/qt3/QtView.C +++ b/src/frontends/qt3/QtView.C @@ -55,12 +55,12 @@ int const statusbar_timer_value = 3000; -QtView::QtView(unsigned int width, unsigned int height, bool isMax) +QtView::QtView(unsigned int width, unsigned int height, bool maximize) : QMainWindow(), LyXView(), commandbuffer_(0) { resize(width, height); - if(isMax) + if (maximize) this->setWindowState(WindowMaximized); qApp->setMainWidget(this); @@ -164,7 +164,7 @@ bool QtView::hasFocus() const void QtView::closeEvent(QCloseEvent *) { LyX::ref().session().saveSessionInfo("WindowIsMaximized", (this->isMaximized() ? "yes" : "no")); - //don't save maximized values + // don't save maximized values this->showNormal(); // save windows size and position LyX::ref().session().saveSessionInfo("WindowWidth", convert(width())); diff --git a/src/frontends/qt3/QtView.h b/src/frontends/qt3/QtView.h index 0a5f62a15d..eab76c803f 100644 --- a/src/frontends/qt3/QtView.h +++ b/src/frontends/qt3/QtView.h @@ -37,7 +37,7 @@ class QtView : public QMainWindow, public LyXView { Q_OBJECT public: /// create a main window of the given dimensions - QtView(unsigned int w, unsigned int h, bool isMax); + QtView(unsigned int w, unsigned int h, bool maximize); ~QtView(); diff --git a/src/frontends/qt3/lyx_gui.C b/src/frontends/qt3/lyx_gui.C index 3a56c5e467..f064613a45 100644 --- a/src/frontends/qt3/lyx_gui.C +++ b/src/frontends/qt3/lyx_gui.C @@ -222,12 +222,12 @@ void parse_lyxrc() void start(string const & batch, vector const & files, - unsigned int width, unsigned int height, int posx, int posy, bool isMax) + unsigned int width, unsigned int height, int posx, int posy, bool maximize) { // this can't be done before because it needs the Languages object initEncodings(); - boost::shared_ptr view_ptr(new QtView(width, height, isMax)); + boost::shared_ptr view_ptr(new QtView(width, height, maximize)); LyX::ref().addLyXView(view_ptr); QtView & view = *view_ptr.get(); diff --git a/src/frontends/qt4/QtView.C b/src/frontends/qt4/QtView.C index 4cbf3a7a2e..b242d65444 100644 --- a/src/frontends/qt4/QtView.C +++ b/src/frontends/qt4/QtView.C @@ -70,12 +70,12 @@ int const statusbar_timer_value = 3000; } // namespace anon -QtView::QtView(unsigned int width, unsigned int height, bool isMax) +QtView::QtView(unsigned int width, unsigned int height, bool maximize) : QMainWindow(), LyXView(), commandbuffer_(0) { resize(width, height); - if(isMax) + if (maximize) this->setWindowState(Qt::WindowMaximized); mainWidget_ = this; diff --git a/src/frontends/qt4/QtView.h b/src/frontends/qt4/QtView.h index 639947dce4..e74d41fa3e 100644 --- a/src/frontends/qt4/QtView.h +++ b/src/frontends/qt4/QtView.h @@ -47,7 +47,7 @@ class QtView : public QMainWindow, public LyXView { Q_OBJECT public: /// create a main window of the given dimensions - QtView(unsigned int w, unsigned int h, bool isMax); + QtView(unsigned int w, unsigned int h, bool maximize); ~QtView(); diff --git a/src/frontends/qt4/lyx_gui.C b/src/frontends/qt4/lyx_gui.C index e5951ad3a6..15e5c2280c 100644 --- a/src/frontends/qt4/lyx_gui.C +++ b/src/frontends/qt4/lyx_gui.C @@ -228,12 +228,12 @@ void parse_lyxrc() void start(string const & batch, vector const & files, - unsigned int width, unsigned int height, int posx, int posy, bool isMax) + unsigned int width, unsigned int height, int posx, int posy, bool maximize) { // this can't be done before because it needs the Languages object initEncodings(); - boost::shared_ptr view_ptr(new QtView(width, height, isMax)); + boost::shared_ptr view_ptr(new QtView(width, height, maximize)); LyX::ref().addLyXView(view_ptr); QtView & view = *view_ptr.get(); diff --git a/src/lyx_main.C b/src/lyx_main.C index 91674f147f..7443434b3b 100644 --- a/src/lyx_main.C +++ b/src/lyx_main.C @@ -307,7 +307,7 @@ void LyX::exec2(int & argc, char * argv[]) // initial geometry unsigned int width = 690; unsigned int height = 510; - bool isMax = false; + bool maximize = false; // first try lyxrc if (lyxrc.geometry_width != 0 && lyxrc.geometry_height != 0 ) { width = lyxrc.geometry_width; @@ -322,7 +322,7 @@ void LyX::exec2(int & argc, char * argv[]) if (!val.empty()) height = convert(val); if (session().loadSessionInfo("WindowIsMaximized") == "yes") - isMax = true; + maximize = true; } // if user wants to restore window position int posx = -1; @@ -335,7 +335,7 @@ void LyX::exec2(int & argc, char * argv[]) if (!val.empty()) posy = convert(val); } - lyx_gui::start(batch_command, files, width, height, posx, posy, isMax); + lyx_gui::start(batch_command, files, width, height, posx, posy, maximize); } else { // Something went wrong above quitLyX(false); -- 2.39.5