Check-in Number:
|
3963 | |
Date: |
2003-Jan-29 18:05:31 (local)
2003-Jan-29 17:05:31 (UTC) |
User: | ms |
Branch: | |
Comment: |
Fixed the scroll before show bug, causing a bad data screen position. |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/as/as-gui/ChangeLog 1.16 -> 1.17
--- ChangeLog 2003/01/28 16:41:15 1.16
+++ ChangeLog 2003/01/29 17:05:31 1.17
@@ -1,5 +1,7 @@
Geschichte des OSSP titraq in Vorwaerts Cronordnung
+030129 Fixed the autoscroll before show bug, causing wrong data position
+
030128 Added missing MIME icon entries for synciiop and syncsoap
Implemented initial file loading by shell argument
|
|
ossp-pkg/as/as-gui/as_assist.cpp 1.87 -> 1.88
--- as_assist.cpp 2003/01/28 17:33:55 1.87
+++ as_assist.cpp 2003/01/29 17:05:31 1.88
@@ -1036,47 +1036,31 @@
}
//
-// Check command line arguments, and parse for an existing filename
-// Returns the number of unhandled arguments, possibly multiple filenames
+// Parse command line arguments for an existing filename, and
+// open it to edit the intended (but optional) initial data
//
-int Titraqform::setupCmdargs(void)
+void Titraqform::loadInit(void)
{
// If the user gives a filename argument to the shell, then open that file
int nNumargs = qApp->argc(); // Holds the number of cmd arguments
- int nRet = 0; // Holds the return value
+ int nValid = 0; // Holds the return value
+ QFile Initial; // Initial event data file
if (nNumargs > 1) { // Warm up a nice cascade, to set my mind on four weeks of vacation
for (int nIter = 1; nIter < nNumargs; nIter++) { // Salad in New Zealand
if (QChar(*qApp->argv()[nIter]) != '-') { // Bunuelos in Colombia
this->setFilename(qApp->argv()[nIter]); // Store inital filename
- if (QFile::exists(*getFilename()))
- return ++nRet; // Handled the filename
- else
- ++nRet;
+ Initial.setName(*this->getFilename()); // Initial file to load
+ if (Initial.exists(*getFilename())) {
+ this->loadData(Initial); // Pass to helper method
+ enableIface(true); // Turn on the lights
+ m_pStatbar->message(trUtf8("Loaded document ") + *this->getFilename());
+ }
+ else // The inital file name does not correspond to a file
+ m_pStatbar->message(trUtf8(QString("The file ") + *this->getFilename() + QString(" does not exist.")));
}
}
- if (nRet > 0)
- return -1; // Return a general initial file error
}
- return nRet; // Return the number of unhandled arguments
-}
-
-//
-// Opens an inital event data file if one exists
-//
-void Titraqform::setupInitdata(int nFilearg)
-{
- // Logic left over from setupCmdargs to help decide what our cmd parsing did
- if (nFilearg == 0) // Args handled, no initial file
+ else
m_pStatbar->message(trUtf8("Ready")); // Signal a ready condition
- else if (nFilearg > 0) { // Args handled, found initial file
- QFile Initial; // Initial event data file to edit
- Initial.setName(*this->getFilename()); // Initial file to load
- this->loadData(Initial); // Pass to helper method
- enableIface(true); // Turn on the lights
- m_pStatbar->message(trUtf8("Loaded document ") + *this->getFilename());
- }
- else // The inital file name does not correspond to a file
- m_pStatbar->message(trUtf8(QString("The file ") + *this->getFilename() + QString(" does not exist.")));
-
}
|
|
ossp-pkg/as/as-gui/as_gui.cpp 1.36 -> 1.37
--- as_gui.cpp 2003/01/28 17:33:55 1.36
+++ as_gui.cpp 2003/01/29 17:05:31 1.37
@@ -51,7 +51,6 @@
// Atenzione! Order is very important in the following sequence.
// FIXME: Reorganize this procedural mess into self contained objects
try {
- int nUnhandled; // Holds number of unhandled cmd args
setupPrefs(); // Load general preferences
setupActions(); // Create and initialize actions
setupMenubar(); // Create and initialize menu bar
@@ -62,9 +61,6 @@
setupEditlay(); // Create and initialize edit controls
setupColumns(); // Prepare columns for viewing, sorting
enableIface(false); // Start things off in a empty state
-
- nUnhandled = setupCmdargs(); // Parse the command line, and init file
- setupInitdata(nUnhandled); // Possibly open an inital event data file
}
catch (Genexcept& Genex) {
Genex.reportErr();
|
|
ossp-pkg/as/as-gui/as_gui.h 1.64 -> 1.65
--- as_gui.h 2003/01/28 17:33:55 1.64
+++ as_gui.h 2003/01/29 17:05:31 1.65
@@ -116,6 +116,9 @@
m_szFilename = new QString(Fname);
};
+ // Utility members
+ void loadInit(void); // Parse cmds and open initial file
+
// Top level members
Preferences *m_pPrefs;
@@ -246,8 +249,6 @@
void setupPieces(void); // Assemble widget pieces
void setupColumns(void); // Arrange and configure columns
void enableIface(bool); // [En/dis]able most ui pieces
- int setupCmdargs(void); // Parse the command line args
- void setupInitdata(int); // Opens an inital event data file
// Data processing
void loadAccounts(QFile &); // Load accounts from file
|
|
ossp-pkg/as/as-gui/as_main.cpp 1.12 -> 1.13
--- as_main.cpp 2003/01/28 16:41:16 1.12
+++ as_main.cpp 2003/01/29 17:05:31 1.13
@@ -39,5 +39,6 @@
Titraqform Mainform; // Main app window
App.setMainWidget(&Mainform);
Mainform.show(); // Finally start the show
+ Mainform.loadInit(); // Start with initial data
return App.exec();
}
|
|