author | zecke <zecke> | 2002-06-17 13:47:54 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-06-17 13:47:54 (UTC) |
commit | 77ec78630c69c80a3d8bad7f7feb9cc9f18ab346 (patch) (unidiff) | |
tree | e8dca2e2fe6bae5fc814758f5edc8c0f66528a79 | |
parent | 282007e58a8a038a0db042341528510e73ac80fc (diff) | |
download | opie-77ec78630c69c80a3d8bad7f7feb9cc9f18ab346.zip opie-77ec78630c69c80a3d8bad7f7feb9cc9f18ab346.tar.gz opie-77ec78630c69c80a3d8bad7f7feb9cc9f18ab346.tar.bz2 |
fix overlapping
-rw-r--r-- | core/pim/todo/mainwindow.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index 1358f1c..fa9c221 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp | |||
@@ -30,96 +30,97 @@ | |||
30 | #include <opie/tododb.h> | 30 | #include <opie/tododb.h> |
31 | #include <opie/todovcalresource.h> | 31 | #include <opie/todovcalresource.h> |
32 | #include <opie/ofontmenu.h> | 32 | #include <opie/ofontmenu.h> |
33 | 33 | ||
34 | #include <qpe/qpeapplication.h> | 34 | #include <qpe/qpeapplication.h> |
35 | #include <qpe/config.h> | 35 | #include <qpe/config.h> |
36 | #include <qpe/finddialog.h> | 36 | #include <qpe/finddialog.h> |
37 | #include <qpe/global.h> | 37 | #include <qpe/global.h> |
38 | #include <qpe/ir.h> | 38 | #include <qpe/ir.h> |
39 | #include <qpe/qpemenubar.h> | 39 | #include <qpe/qpemenubar.h> |
40 | #include <qpe/qpemessagebox.h> | 40 | #include <qpe/qpemessagebox.h> |
41 | #include <qpe/resource.h> | 41 | #include <qpe/resource.h> |
42 | //#include <qpe/task.h> | 42 | //#include <qpe/task.h> |
43 | #include <qpe/qpetoolbar.h> | 43 | #include <qpe/qpetoolbar.h> |
44 | 44 | ||
45 | #include <qaction.h> | 45 | #include <qaction.h> |
46 | #include <qarray.h> | 46 | #include <qarray.h> |
47 | #include <qdatastream.h> | 47 | #include <qdatastream.h> |
48 | #include <qdatetime.h> | 48 | #include <qdatetime.h> |
49 | #include <qfile.h> | 49 | #include <qfile.h> |
50 | #include <qmessagebox.h> | 50 | #include <qmessagebox.h> |
51 | #include <qpopupmenu.h> | 51 | #include <qpopupmenu.h> |
52 | #include <qwidgetstack.h> | 52 | #include <qwidgetstack.h> |
53 | 53 | ||
54 | #include <sys/stat.h> | 54 | #include <sys/stat.h> |
55 | #include <sys/types.h> | 55 | #include <sys/types.h> |
56 | #include <fcntl.h> | 56 | #include <fcntl.h> |
57 | #include <unistd.h> | 57 | #include <unistd.h> |
58 | 58 | ||
59 | #include <stdlib.h> | 59 | #include <stdlib.h> |
60 | 60 | ||
61 | static QString todolistXMLFilename() | 61 | static QString todolistXMLFilename() |
62 | { | 62 | { |
63 | return Global::applicationFileName("todolist","todolist.xml"); | 63 | return Global::applicationFileName("todolist","todolist.xml"); |
64 | } | 64 | } |
65 | 65 | ||
66 | static QString categoriesXMLFilename() | 66 | static QString categoriesXMLFilename() |
67 | { | 67 | { |
68 | return Global::applicationFileName("todolist","categories.xml"); | 68 | return Global::applicationFileName("todolist","categories.xml"); |
69 | } | 69 | } |
70 | 70 | ||
71 | TodoWindow::TodoWindow( QWidget *parent, const char *name, WFlags f ) : | 71 | TodoWindow::TodoWindow( QWidget *parent, const char *name, WFlags f ) : |
72 | QMainWindow( parent, name, f ), syncing(FALSE) | 72 | QMainWindow( parent, name, f ), syncing(FALSE) |
73 | { | 73 | { |
74 | // QTime t; | 74 | // QTime t; |
75 | // t.start(); | 75 | // t.start(); |
76 | mView = 0l; | 76 | mView = 0l; |
77 | mStack = new QWidgetStack(this, "main stack"); | 77 | mStack = new QWidgetStack(this, "main stack"); |
78 | setCentralWidget( mStack ); | ||
78 | setCaption( tr("Todo") ); | 79 | setCaption( tr("Todo") ); |
79 | QString str; | 80 | QString str; |
80 | table = new TodoTable( this ); | 81 | table = new TodoTable( this ); |
81 | table->setColumnWidth( 2, 10 ); | 82 | table->setColumnWidth( 2, 10 ); |
82 | table->setPaintingEnabled( FALSE ); | 83 | table->setPaintingEnabled( FALSE ); |
83 | table->setUpdatesEnabled( FALSE ); | 84 | table->setUpdatesEnabled( FALSE ); |
84 | table->viewport()->setUpdatesEnabled( FALSE ); | 85 | table->viewport()->setUpdatesEnabled( FALSE ); |
85 | 86 | ||
86 | { | 87 | { |
87 | str = todolistXMLFilename(); | 88 | str = todolistXMLFilename(); |
88 | if ( str.isNull() ) | 89 | if ( str.isNull() ) |
89 | QMessageBox::critical( this, | 90 | QMessageBox::critical( this, |
90 | tr("Out of Space"), | 91 | tr("Out of Space"), |
91 | tr("Unable to create startup files\n" | 92 | tr("Unable to create startup files\n" |
92 | "Free up some space\n" | 93 | "Free up some space\n" |
93 | "before you enter any data") ); | 94 | "before you enter any data") ); |
94 | else | 95 | else |
95 | table->load( str ); | 96 | table->load( str ); |
96 | } | 97 | } |
97 | 98 | ||
98 | // repeat for categories... | 99 | // repeat for categories... |
99 | str = categoriesXMLFilename(); | 100 | str = categoriesXMLFilename(); |
100 | if ( str.isNull() ) | 101 | if ( str.isNull() ) |
101 | QMessageBox::critical( this, | 102 | QMessageBox::critical( this, |
102 | tr( "Out of Space" ), | 103 | tr( "Out of Space" ), |
103 | tr( "Unable to create startup files\n" | 104 | tr( "Unable to create startup files\n" |
104 | "Free up some space\n" | 105 | "Free up some space\n" |
105 | "before you enter any data") ); | 106 | "before you enter any data") ); |
106 | 107 | ||
107 | mStack->addWidget(table, 1 ); | 108 | mStack->addWidget(table, 1 ); |
108 | mStack->raiseWidget( 1 ); | 109 | mStack->raiseWidget( 1 ); |
109 | setCentralWidget( mStack ); | 110 | setCentralWidget( mStack ); |
110 | setToolBarsMovable( FALSE ); | 111 | setToolBarsMovable( FALSE ); |
111 | 112 | ||
112 | // qDebug("after load: t=%d", t.elapsed() ); | 113 | // qDebug("after load: t=%d", t.elapsed() ); |
113 | 114 | ||
114 | Config config( "todo" ); | 115 | Config config( "todo" ); |
115 | config.setGroup( "View" ); | 116 | config.setGroup( "View" ); |
116 | bool complete = config.readBoolEntry( "ShowComplete", true ); | 117 | bool complete = config.readBoolEntry( "ShowComplete", true ); |
117 | table->setShowCompleted( complete ); | 118 | table->setShowCompleted( complete ); |
118 | 119 | ||
119 | bool showdeadline = config.readBoolEntry("ShowDeadLine", true); | 120 | bool showdeadline = config.readBoolEntry("ShowDeadLine", true); |
120 | table->setShowDeadline (showdeadline); | 121 | table->setShowDeadline (showdeadline); |
121 | 122 | ||
122 | QString category = config.readEntry( "Category", QString::null ); | 123 | QString category = config.readEntry( "Category", QString::null ); |
123 | table->setShowCategory( category ); | 124 | table->setShowCategory( category ); |
124 | 125 | ||
125 | QPEToolBar *bar = new QPEToolBar( this ); | 126 | QPEToolBar *bar = new QPEToolBar( this ); |