author | leseb <leseb> | 2002-07-09 14:45:24 (UTC) |
---|---|---|
committer | leseb <leseb> | 2002-07-09 14:45:24 (UTC) |
commit | f7faf1381c556f1b20e2fd91390d31db5a8ea17b (patch) (unidiff) | |
tree | e227f7c9cb7118e3f1be915a74c59a45f19c3bd0 | |
parent | 2d3147a590a150773b84ce6e0aa65f7515a1f178 (diff) | |
download | opie-f7faf1381c556f1b20e2fd91390d31db5a8ea17b.zip opie-f7faf1381c556f1b20e2fd91390d31db5a8ea17b.tar.gz opie-f7faf1381c556f1b20e2fd91390d31db5a8ea17b.tar.bz2 |
Change some pics directory (Fix bug #107)
-rw-r--r-- | core/pim/datebook/datebook.cpp | 4 | ||||
-rw-r--r-- | core/pim/datebook/opie-datebook.control | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp index 76260e2..c0a744a 100644 --- a/core/pim/datebook/datebook.cpp +++ b/core/pim/datebook/datebook.cpp | |||
@@ -67,149 +67,149 @@ | |||
67 | #include <sys/types.h> | 67 | #include <sys/types.h> |
68 | #include <fcntl.h> | 68 | #include <fcntl.h> |
69 | #include <unistd.h> | 69 | #include <unistd.h> |
70 | 70 | ||
71 | #include <stdlib.h> | 71 | #include <stdlib.h> |
72 | 72 | ||
73 | #define DAY 1 | 73 | #define DAY 1 |
74 | #define WEEK 2 | 74 | #define WEEK 2 |
75 | #define WEEKLST 4 | 75 | #define WEEKLST 4 |
76 | #define MONTH 3 | 76 | #define MONTH 3 |
77 | 77 | ||
78 | 78 | ||
79 | DateBook::DateBook( QWidget *parent, const char *, WFlags f ) | 79 | DateBook::DateBook( QWidget *parent, const char *, WFlags f ) |
80 | : QMainWindow( parent, "datebook", f ), | 80 | : QMainWindow( parent, "datebook", f ), |
81 | aPreset( FALSE ), | 81 | aPreset( FALSE ), |
82 | presetTime( -1 ), | 82 | presetTime( -1 ), |
83 | startTime( 8 ), // an acceptable default | 83 | startTime( 8 ), // an acceptable default |
84 | rowStyle( 0 ), | 84 | rowStyle( 0 ), |
85 | bJumpToCurTime(FALSE), | 85 | bJumpToCurTime(FALSE), |
86 | syncing(FALSE), | 86 | syncing(FALSE), |
87 | inSearch(FALSE), | 87 | inSearch(FALSE), |
88 | alarmCounter(0) | 88 | alarmCounter(0) |
89 | { | 89 | { |
90 | bool needEvilHack= false; // if we need an Evil Hack | 90 | bool needEvilHack= false; // if we need an Evil Hack |
91 | QTime t; | 91 | QTime t; |
92 | t.start(); | 92 | t.start(); |
93 | db = new DateBookDBHack; | 93 | db = new DateBookDBHack; |
94 | qDebug("loading db t=%d", t.elapsed() ); | 94 | qDebug("loading db t=%d", t.elapsed() ); |
95 | loadSettings(); | 95 | loadSettings(); |
96 | setCaption( tr("Calendar") ); | 96 | setCaption( tr("Calendar") ); |
97 | setIcon( Resource::loadPixmap( "datebook_icon" ) ); | 97 | setIcon( Resource::loadPixmap( "datebook_icon" ) ); |
98 | 98 | ||
99 | setToolBarsMovable( FALSE ); | 99 | setToolBarsMovable( FALSE ); |
100 | 100 | ||
101 | views = new QWidgetStack( this ); | 101 | views = new QWidgetStack( this ); |
102 | setCentralWidget( views ); | 102 | setCentralWidget( views ); |
103 | 103 | ||
104 | dayView = 0; | 104 | dayView = 0; |
105 | weekView = 0; | 105 | weekView = 0; |
106 | weekLstView = 0; | 106 | weekLstView = 0; |
107 | monthView = 0; | 107 | monthView = 0; |
108 | 108 | ||
109 | QPEToolBar *bar = new QPEToolBar( this ); | 109 | QPEToolBar *bar = new QPEToolBar( this ); |
110 | bar->setHorizontalStretchable( TRUE ); | 110 | bar->setHorizontalStretchable( TRUE ); |
111 | 111 | ||
112 | QPEMenuBar *mb = new QPEMenuBar( bar ); | 112 | QPEMenuBar *mb = new QPEMenuBar( bar ); |
113 | mb->setMargin( 0 ); | 113 | mb->setMargin( 0 ); |
114 | 114 | ||
115 | QPEToolBar *sub_bar = new QPEToolBar(this); | 115 | QPEToolBar *sub_bar = new QPEToolBar(this); |
116 | 116 | ||
117 | QPopupMenu *view = new QPopupMenu( this ); | 117 | QPopupMenu *view = new QPopupMenu( this ); |
118 | QPopupMenu *settings = new QPopupMenu( this ); | 118 | QPopupMenu *settings = new QPopupMenu( this ); |
119 | 119 | ||
120 | mb->insertItem( tr( "View" ), view ); | 120 | mb->insertItem( tr( "View" ), view ); |
121 | mb->insertItem( tr( "Settings" ), settings ); | 121 | mb->insertItem( tr( "Settings" ), settings ); |
122 | 122 | ||
123 | QActionGroup *g = new QActionGroup( this ); | 123 | QActionGroup *g = new QActionGroup( this ); |
124 | g->setExclusive( TRUE ); | 124 | g->setExclusive( TRUE ); |
125 | 125 | ||
126 | QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), | 126 | QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), |
127 | QString::null, 0, this, 0 ); | 127 | QString::null, 0, this, 0 ); |
128 | connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) ); | 128 | connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) ); |
129 | a->addTo( sub_bar ); | 129 | a->addTo( sub_bar ); |
130 | 130 | ||
131 | a = new QAction( tr( "Today" ), Resource::loadPixmap( "to_day" ), QString::null, 0, g, 0 ); | 131 | a = new QAction( tr( "Today" ), Resource::loadPixmap( "datebook/to_day" ), QString::null, 0, g, 0 ); |
132 | connect( a, SIGNAL( activated() ), this, SLOT( slotToday() ) ); | 132 | connect( a, SIGNAL( activated() ), this, SLOT( slotToday() ) ); |
133 | a->addTo( sub_bar ); | 133 | a->addTo( sub_bar ); |
134 | a->addTo( view ); | 134 | a->addTo( view ); |
135 | 135 | ||
136 | a = new QAction( tr( "Day" ), Resource::loadPixmap( "day" ), QString::null, 0, g, 0 ); | 136 | a = new QAction( tr( "Day" ), Resource::loadPixmap( "day" ), QString::null, 0, g, 0 ); |
137 | connect( a, SIGNAL( activated() ), this, SLOT( viewDay() ) ); | 137 | connect( a, SIGNAL( activated() ), this, SLOT( viewDay() ) ); |
138 | a->addTo( sub_bar ); | 138 | a->addTo( sub_bar ); |
139 | a->addTo( view ); | 139 | a->addTo( view ); |
140 | a->setToggleAction( TRUE ); | 140 | a->setToggleAction( TRUE ); |
141 | a->setOn( TRUE ); | 141 | a->setOn( TRUE ); |
142 | dayAction = a; | 142 | dayAction = a; |
143 | 143 | ||
144 | a = new QAction( tr( "Week" ), Resource::loadPixmap( "week" ), QString::null, 0, g, 0 ); | 144 | a = new QAction( tr( "Week" ), Resource::loadPixmap( "week" ), QString::null, 0, g, 0 ); |
145 | connect( a, SIGNAL( activated() ), this, SLOT( viewWeek() ) ); | 145 | connect( a, SIGNAL( activated() ), this, SLOT( viewWeek() ) ); |
146 | a->addTo( sub_bar ); | 146 | a->addTo( sub_bar ); |
147 | a->addTo( view ); | 147 | a->addTo( view ); |
148 | a->setToggleAction( TRUE ); | 148 | a->setToggleAction( TRUE ); |
149 | weekAction = a; | 149 | weekAction = a; |
150 | 150 | ||
151 | a = new QAction( tr( "WeekLst" ), Resource::loadPixmap( "weeklst" ), QString::null, 0, g, 0 ); | 151 | a = new QAction( tr( "WeekLst" ), Resource::loadPixmap( "datebook/weeklst" ), QString::null, 0, g, 0 ); |
152 | connect( a, SIGNAL( activated() ), this, SLOT( viewWeekLst() ) ); | 152 | connect( a, SIGNAL( activated() ), this, SLOT( viewWeekLst() ) ); |
153 | a->addTo( sub_bar ); | 153 | a->addTo( sub_bar ); |
154 | a->addTo( view ); | 154 | a->addTo( view ); |
155 | a->setToggleAction( TRUE ); | 155 | a->setToggleAction( TRUE ); |
156 | weekLstAction = a; | 156 | weekLstAction = a; |
157 | 157 | ||
158 | a = new QAction( tr( "Month" ), Resource::loadPixmap( "month" ), QString::null, 0, g, 0 ); | 158 | a = new QAction( tr( "Month" ), Resource::loadPixmap( "month" ), QString::null, 0, g, 0 ); |
159 | connect( a, SIGNAL( activated() ), this, SLOT( viewMonth() ) ); | 159 | connect( a, SIGNAL( activated() ), this, SLOT( viewMonth() ) ); |
160 | a->addTo( sub_bar ); | 160 | a->addTo( sub_bar ); |
161 | a->addTo( view ); | 161 | a->addTo( view ); |
162 | a->setToggleAction( TRUE ); | 162 | a->setToggleAction( TRUE ); |
163 | monthAction = a; | 163 | monthAction = a; |
164 | 164 | ||
165 | a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ), QString::null, 0, g, 0 ); | 165 | a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ), QString::null, 0, g, 0 ); |
166 | connect( a, SIGNAL(activated()), this, SLOT(slotFind()) ); | 166 | connect( a, SIGNAL(activated()), this, SLOT(slotFind()) ); |
167 | a->addTo( sub_bar ); | 167 | a->addTo( sub_bar ); |
168 | 168 | ||
169 | a = new QAction( tr( "Alarm and Start Time..." ), QString::null, 0, 0 ); | 169 | a = new QAction( tr( "Alarm and Start Time..." ), QString::null, 0, 0 ); |
170 | connect( a, SIGNAL( activated() ), this, SLOT( slotSettings() ) ); | 170 | connect( a, SIGNAL( activated() ), this, SLOT( slotSettings() ) ); |
171 | a->addTo( settings ); | 171 | a->addTo( settings ); |
172 | 172 | ||
173 | QPopupMenu *default_view = new QPopupMenu(this); | 173 | QPopupMenu *default_view = new QPopupMenu(this); |
174 | settings->insertItem( tr( "Default View" ),default_view ); | 174 | settings->insertItem( tr( "Default View" ),default_view ); |
175 | default_view->setCheckable(TRUE); | 175 | default_view->setCheckable(TRUE); |
176 | 176 | ||
177 | Config config("DateBook"); | 177 | Config config("DateBook"); |
178 | config.setGroup("Main"); | 178 | config.setGroup("Main"); |
179 | int current=config.readNumEntry("defaultview", DAY); | 179 | int current=config.readNumEntry("defaultview", DAY); |
180 | 180 | ||
181 | QActionGroup *ag = new QActionGroup(this); | 181 | QActionGroup *ag = new QActionGroup(this); |
182 | a = new QAction( tr( "Day" ), QString::null, 0, 0, 0, true ); | 182 | a = new QAction( tr( "Day" ), QString::null, 0, 0, 0, true ); |
183 | if (current==DAY) a->setOn(true), viewDay(); | 183 | if (current==DAY) a->setOn(true), viewDay(); |
184 | ag->insert(a); | 184 | ag->insert(a); |
185 | a = new QAction( tr( "Week" ), QString::null, 0, 0, 0, true ); | 185 | a = new QAction( tr( "Week" ), QString::null, 0, 0, 0, true ); |
186 | if (current==WEEK) a->setOn(true), /*viewWeek(),*/ needEvilHack = true; | 186 | if (current==WEEK) a->setOn(true), /*viewWeek(),*/ needEvilHack = true; |
187 | ag->insert(a); | 187 | ag->insert(a); |
188 | a = new QAction( tr( "WeekLst" ), QString::null, 0, 0, 0, true ); | 188 | a = new QAction( tr( "WeekLst" ), QString::null, 0, 0, 0, true ); |
189 | if (current==WEEKLST) a->setOn(true), viewWeekLst(); | 189 | if (current==WEEKLST) a->setOn(true), viewWeekLst(); |
190 | ag->insert(a); | 190 | ag->insert(a); |
191 | a = new QAction( tr( "Month" ), QString::null, 0, 0, 0, true ); | 191 | a = new QAction( tr( "Month" ), QString::null, 0, 0, 0, true ); |
192 | if (current==MONTH) a->setOn(true), viewMonth(); | 192 | if (current==MONTH) a->setOn(true), viewMonth(); |
193 | ag->insert(a); | 193 | ag->insert(a); |
194 | 194 | ||
195 | ag->addTo(default_view); | 195 | ag->addTo(default_view); |
196 | connect(ag, SIGNAL( selected ( QAction * ) ), | 196 | connect(ag, SIGNAL( selected ( QAction * ) ), |
197 | this, SLOT( newDefaultView(QAction *) ) | 197 | this, SLOT( newDefaultView(QAction *) ) |
198 | ); | 198 | ); |
199 | 199 | ||
200 | connect( qApp, SIGNAL(clockChanged(bool)), | 200 | connect( qApp, SIGNAL(clockChanged(bool)), |
201 | this, SLOT(changeClock(bool)) ); | 201 | this, SLOT(changeClock(bool)) ); |
202 | connect( qApp, SIGNAL(weekChanged(bool)), | 202 | connect( qApp, SIGNAL(weekChanged(bool)), |
203 | this, SLOT(changeWeek(bool)) ); | 203 | this, SLOT(changeWeek(bool)) ); |
204 | 204 | ||
205 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) | 205 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) |
206 | connect( qApp, SIGNAL(appMessage(const QCString&, const QByteArray&)), | 206 | connect( qApp, SIGNAL(appMessage(const QCString&, const QByteArray&)), |
207 | this, SLOT(appMessage(const QCString&, const QByteArray&)) ); | 207 | this, SLOT(appMessage(const QCString&, const QByteArray&)) ); |
208 | #endif | 208 | #endif |
209 | 209 | ||
210 | // listen on QPE/System | 210 | // listen on QPE/System |
211 | #if defined(Q_WS_QWS) | 211 | #if defined(Q_WS_QWS) |
212 | #if !defined(QT_NO_COP) | 212 | #if !defined(QT_NO_COP) |
213 | QCopChannel *channel = new QCopChannel( "QPE/System", this ); | 213 | QCopChannel *channel = new QCopChannel( "QPE/System", this ); |
214 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), | 214 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), |
215 | this, SLOT(receive(const QCString&, const QByteArray&)) ); | 215 | this, SLOT(receive(const QCString&, const QByteArray&)) ); |
diff --git a/core/pim/datebook/opie-datebook.control b/core/pim/datebook/opie-datebook.control index 9bef119..6cd96ff 100644 --- a/core/pim/datebook/opie-datebook.control +++ b/core/pim/datebook/opie-datebook.control | |||
@@ -1,9 +1,9 @@ | |||
1 | Files: bin/datebook apps/Applications/datebook.desktop | 1 | Files: bin/datebook apps/Applications/datebook.desktop pics/datebook |
2 | Priority: optional | 2 | Priority: optional |
3 | Section: opie/applications | 3 | Section: opie/applications |
4 | Maintainer: Warwick Allison <warwick@trolltech.com> | 4 | Maintainer: Warwick Allison <warwick@trolltech.com> |
5 | Architecture: arm | 5 | Architecture: arm |
6 | Version: $QPE_VERSION-$SUB_VERSION | 6 | Version: $QPE_VERSION-$SUB_VERSION |
7 | Depends: opie-base ($QPE_VERSION), libopie ($QPE_VERSION) | 7 | Depends: opie-base ($QPE_VERSION), libopie ($QPE_VERSION) |
8 | Description: A datebook/appointment manager | 8 | Description: A datebook/appointment manager |
9 | A datebook/appointment manager for the Opie environment. | 9 | A datebook/appointment manager for the Opie environment. |