author | zautrix <zautrix> | 2005-03-10 09:13:29 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-10 09:13:29 (UTC) |
commit | 4b05d69b961309df5d56714889c62ca530580914 (patch) (unidiff) | |
tree | c6b7b0651889a88ffe44c570f7e557523cfa1044 | |
parent | f20f8ca063abd322387a72f3f5a65c480f6a4233 (diff) | |
download | kdepimpi-4b05d69b961309df5d56714889c62ca530580914.zip kdepimpi-4b05d69b961309df5d56714889c62ca530580914.tar.gz kdepimpi-4b05d69b961309df5d56714889c62ca530580914.tar.bz2 |
pwmp fix
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 1 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwm.cpp | 13 |
2 files changed, 13 insertions, 1 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index a7b8530..d4b7971 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,201 +1,202 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 2.0.15 ************ | 3 | ********** VERSION 2.0.15 ************ |
4 | 4 | ||
5 | PwM/Pi: | 5 | PwM/Pi: |
6 | Added keyboard shorcuts for | 6 | Added keyboard shorcuts for |
7 | - toggling summary view (space bar) | 7 | - toggling summary view (space bar) |
8 | - delete item (delete + backspace key) | 8 | - delete item (delete + backspace key) |
9 | - add new item ( i + n key) | 9 | - add new item ( i + n key) |
10 | Fixed length of info in the title. | ||
10 | 11 | ||
11 | KO/Pi-KA/Pi: | 12 | KO/Pi-KA/Pi: |
12 | Changed "ME" menu bar entry to an icon. | 13 | Changed "ME" menu bar entry to an icon. |
13 | 14 | ||
14 | KO/Pi: | 15 | KO/Pi: |
15 | Fixed two minor bugs in displaying todos. | 16 | Fixed two minor bugs in displaying todos. |
16 | 17 | ||
17 | 18 | ||
18 | ********** VERSION 2.0.14 ************ | 19 | ********** VERSION 2.0.14 ************ |
19 | 20 | ||
20 | Made Passwordmanager PwM/Pi more userfriendly: | 21 | Made Passwordmanager PwM/Pi more userfriendly: |
21 | Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. | 22 | Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. |
22 | Fixed bug in KO/Pi todo printing. | 23 | Fixed bug in KO/Pi todo printing. |
23 | Made Qtopia calendar import possible on desktop . | 24 | Made Qtopia calendar import possible on desktop . |
24 | 25 | ||
25 | ********** VERSION 2.0.13 ************ | 26 | ********** VERSION 2.0.13 ************ |
26 | 27 | ||
27 | Fixed a problem in the addressee select dialog and made it more user friendly by adding a minimize splitter. | 28 | Fixed a problem in the addressee select dialog and made it more user friendly by adding a minimize splitter. |
28 | 29 | ||
29 | In the search dialog you can switch now the focus from search line edit to the list view by pressing key "arrow down". | 30 | In the search dialog you can switch now the focus from search line edit to the list view by pressing key "arrow down". |
30 | 31 | ||
31 | OM/Pi: | 32 | OM/Pi: |
32 | Fixed a refresh problem of outgoing/sent/sendfailed folders after sending mails. | 33 | Fixed a refresh problem of outgoing/sent/sendfailed folders after sending mails. |
33 | Added missing German translation. | 34 | Added missing German translation. |
34 | Added warning if path is specified in local folder settings of account config. | 35 | Added warning if path is specified in local folder settings of account config. |
35 | 36 | ||
36 | ********** VERSION 2.0.12 ************ | 37 | ********** VERSION 2.0.12 ************ |
37 | 38 | ||
38 | KO/Pi: | 39 | KO/Pi: |
39 | Fixed a bug in todo start/due date handling for non recurring todos with a start and due date. | 40 | Fixed a bug in todo start/due date handling for non recurring todos with a start and due date. |
40 | Fixed some layout problems in the KO/Pi agenda view when there were many conflicting itmes. | 41 | Fixed some layout problems in the KO/Pi agenda view when there were many conflicting itmes. |
41 | Fixed several problems of the keyboard focus in the desktop versions when opening the search dialog/event viewer. | 42 | Fixed several problems of the keyboard focus in the desktop versions when opening the search dialog/event viewer. |
42 | 43 | ||
43 | Fixed problem in pi-sync mode when wrong password was sent. | 44 | Fixed problem in pi-sync mode when wrong password was sent. |
44 | 45 | ||
45 | OM/Pi: | 46 | OM/Pi: |
46 | Fixed a crash when displaying mails with "Show mail as html" was checked in the config. | 47 | Fixed a crash when displaying mails with "Show mail as html" was checked in the config. |
47 | Added a check before displaying the mail if the mail is in html format, if "Show mail as html" is enabled. | 48 | Added a check before displaying the mail if the mail is in html format, if "Show mail as html" is enabled. |
48 | 49 | ||
49 | ********** VERSION 2.0.11 ************ | 50 | ********** VERSION 2.0.11 ************ |
50 | 51 | ||
51 | Fixed some problems in pi-sync mode | 52 | Fixed some problems in pi-sync mode |
52 | (e.g. details of events were not synced properly) | 53 | (e.g. details of events were not synced properly) |
53 | 54 | ||
54 | ********** VERSION 2.0.10 ************ | 55 | ********** VERSION 2.0.10 ************ |
55 | 56 | ||
56 | KO/Pi: | 57 | KO/Pi: |
57 | In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view. | 58 | In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view. |
58 | This is fixed. | 59 | This is fixed. |
59 | Changed the search dialog a bit to make it more user friendly. | 60 | Changed the search dialog a bit to make it more user friendly. |
60 | (E.g.: Removed message box about "no items found" and set key focus to search line edit after search). | 61 | (E.g.: Removed message box about "no items found" and set key focus to search line edit after search). |
61 | 62 | ||
62 | Added config option to hide the week number in KO/Pi toolbar. | 63 | Added config option to hide the week number in KO/Pi toolbar. |
63 | 64 | ||
64 | ********** VERSION 2.0.9 ************ | 65 | ********** VERSION 2.0.9 ************ |
65 | 66 | ||
66 | Made month view icons for multiday events a bit nicer. | 67 | Made month view icons for multiday events a bit nicer. |
67 | Some minor fixes in KO/Pi | 68 | Some minor fixes in KO/Pi |
68 | (e.g. go to today did not work for new week view properly). | 69 | (e.g. go to today did not work for new week view properly). |
69 | 70 | ||
70 | 71 | ||
71 | ********** VERSION 2.0.8 ************ | 72 | ********** VERSION 2.0.8 ************ |
72 | 73 | ||
73 | Fixed a problem in dependency info in the ipk files for the Zaurus. | 74 | Fixed a problem in dependency info in the ipk files for the Zaurus. |
74 | 75 | ||
75 | Added icon for the stealth new week view and made navigation more user friendly in monthview by adding a prev/next week button to the navigator bar. | 76 | Added icon for the stealth new week view and made navigation more user friendly in monthview by adding a prev/next week button to the navigator bar. |
76 | 77 | ||
77 | Added a "go today" button to the datepicker. | 78 | Added a "go today" button to the datepicker. |
78 | 79 | ||
79 | Added "created" and "last modified" to event/todo viewer (and What'sThis viewer) | 80 | Added "created" and "last modified" to event/todo viewer (and What'sThis viewer) |
80 | and made it configureable to show these values. | 81 | and made it configureable to show these values. |
81 | 82 | ||
82 | Fixed a problem for events (from external iCal files) that do have a duration but no end date. | 83 | Fixed a problem for events (from external iCal files) that do have a duration but no end date. |
83 | 84 | ||
84 | 85 | ||
85 | ********** VERSION 2.0.7 ************ | 86 | ********** VERSION 2.0.7 ************ |
86 | 87 | ||
87 | Added global application font settings | 88 | Added global application font settings |
88 | (for all KDE-Pim/Pi apps) to the general settings. | 89 | (for all KDE-Pim/Pi apps) to the general settings. |
89 | 90 | ||
90 | Fixed a problem in OM/Pi when trying to login to some IMAP servers | 91 | Fixed a problem in OM/Pi when trying to login to some IMAP servers |
91 | (like the IMAP server of Apple: mail.mac.com ) | 92 | (like the IMAP server of Apple: mail.mac.com ) |
92 | 93 | ||
93 | Added recurring todos to KO/Pi. | 94 | Added recurring todos to KO/Pi. |
94 | 95 | ||
95 | 96 | ||
96 | ********** VERSION 2.0.6 ************ | 97 | ********** VERSION 2.0.6 ************ |
97 | 98 | ||
98 | Some bugfixes in the pi-sync mode. | 99 | Some bugfixes in the pi-sync mode. |
99 | Added German translation for pi-sync mode. | 100 | Added German translation for pi-sync mode. |
100 | 101 | ||
101 | KO/Pi: | 102 | KO/Pi: |
102 | Made the todolist using alternate background. | 103 | Made the todolist using alternate background. |
103 | 104 | ||
104 | Other minor fixes in KO/Pi. | 105 | Other minor fixes in KO/Pi. |
105 | 106 | ||
106 | 107 | ||
107 | ********** VERSION 2.0.5 ************ | 108 | ********** VERSION 2.0.5 ************ |
108 | 109 | ||
109 | Bugfixes in KO/Pi. | 110 | Bugfixes in KO/Pi. |
110 | 111 | ||
111 | ********** VERSION 2.0.4 ************ | 112 | ********** VERSION 2.0.4 ************ |
112 | 113 | ||
113 | KO/Pi: | 114 | KO/Pi: |
114 | Fixed problem loading translations for summary/location edit boxes in event/todo editor. | 115 | Fixed problem loading translations for summary/location edit boxes in event/todo editor. |
115 | 116 | ||
116 | Added a general "select week number" to the toolbar. | 117 | Added a general "select week number" to the toolbar. |
117 | 118 | ||
118 | Fixed some small problem of the new features introduced in version 2.0.3. | 119 | Fixed some small problem of the new features introduced in version 2.0.3. |
119 | 120 | ||
120 | Made it possible to specify one specific category as category color, | 121 | Made it possible to specify one specific category as category color, |
121 | if more than one categories are selected. | 122 | if more than one categories are selected. |
122 | 123 | ||
123 | Fixed a bug in saving colors for categories with non-ascii characters. | 124 | Fixed a bug in saving colors for categories with non-ascii characters. |
124 | (Like, e.g. German Umlauts). | 125 | (Like, e.g. German Umlauts). |
125 | Propably you have to set your colors again for those categories. | 126 | Propably you have to set your colors again for those categories. |
126 | 127 | ||
127 | 128 | ||
128 | ********** VERSION 2.0.3 ************ | 129 | ********** VERSION 2.0.3 ************ |
129 | 130 | ||
130 | KO/Pi: | 131 | KO/Pi: |
131 | Added feature for changing alarm settings for many items at once: | 132 | Added feature for changing alarm settings for many items at once: |
132 | Open list view (or search dialog), select the desired items and choose in | 133 | Open list view (or search dialog), select the desired items and choose in |
133 | the popup menu: Set alarm for selected... | 134 | the popup menu: Set alarm for selected... |
134 | 135 | ||
135 | Added to the event/todo viewer the option to send an email to | 136 | Added to the event/todo viewer the option to send an email to |
136 | all attendees or all selected (with RSVP) attendees. | 137 | all attendees or all selected (with RSVP) attendees. |
137 | 138 | ||
138 | Made the week-month mode changing in month view faster. | 139 | Made the week-month mode changing in month view faster. |
139 | 140 | ||
140 | Made month view better useable with keyboard. | 141 | Made month view better useable with keyboard. |
141 | Now TAB key jumps to next cell with an event/todo. | 142 | Now TAB key jumps to next cell with an event/todo. |
142 | Scroll in cell with coursor keys, scroll in time (next week) with | 143 | Scroll in cell with coursor keys, scroll in time (next week) with |
143 | Shift/Control + coursorkeys. | 144 | Shift/Control + coursorkeys. |
144 | 145 | ||
145 | Fixed bug that the todo view flat mode was reset after first view update. | 146 | Fixed bug that the todo view flat mode was reset after first view update. |
146 | 147 | ||
147 | If a todo is displayed closed in the todo view, | 148 | If a todo is displayed closed in the todo view, |
148 | it is now displayed in overdue/due today color depending on the subtodos overdue/due today properties. | 149 | it is now displayed in overdue/due today color depending on the subtodos overdue/due today properties. |
149 | 150 | ||
150 | Added info about the numbers of years to the caption (title) information about a birthday event. | 151 | Added info about the numbers of years to the caption (title) information about a birthday event. |
151 | 152 | ||
152 | Made completion date in todo editor editable. | 153 | Made completion date in todo editor editable. |
153 | 154 | ||
154 | Added possibility to save/load templates for journals. | 155 | Added possibility to save/load templates for journals. |
155 | (Which is just a simple "save text to file" or "insert text from file". | 156 | (Which is just a simple "save text to file" or "insert text from file". |
156 | 157 | ||
157 | ********** VERSION 2.0.2 ************ | 158 | ********** VERSION 2.0.2 ************ |
158 | 159 | ||
159 | KO/Pi: | 160 | KO/Pi: |
160 | Fixed the layout problem of the day label buttons | 161 | Fixed the layout problem of the day label buttons |
161 | of the agenda view introduced in version 2.0.1. | 162 | of the agenda view introduced in version 2.0.1. |
162 | 163 | ||
163 | Added WhatsThis support for the todo view and the list view. | 164 | Added WhatsThis support for the todo view and the list view. |
164 | 165 | ||
165 | Added a quite useful feature to the montview. | 166 | Added a quite useful feature to the montview. |
166 | Just click on the week numbers on the left. | 167 | Just click on the week numbers on the left. |
167 | And in the top right corner of month view/agenda view | 168 | And in the top right corner of month view/agenda view |
168 | there is now a "week number quick selector". | 169 | there is now a "week number quick selector". |
169 | (Click on the black triangle). | 170 | (Click on the black triangle). |
170 | 171 | ||
171 | Made the quite difficult timezone change in KO/Pi easy. | 172 | Made the quite difficult timezone change in KO/Pi easy. |
172 | 173 | ||
173 | OM/Pi: | 174 | OM/Pi: |
174 | Fixed too small icons on desktop. | 175 | Fixed too small icons on desktop. |
175 | Fixed non visible icons in mainwindow on Z with fastload enabled. | 176 | Fixed non visible icons in mainwindow on Z with fastload enabled. |
176 | Added signature file setting to smtp account config. | 177 | Added signature file setting to smtp account config. |
177 | And the signature can be edited and saved in the edit mail dialog. | 178 | And the signature can be edited and saved in the edit mail dialog. |
178 | That does mean: | 179 | That does mean: |
179 | Simply edit the signature for the selected smtp account in the | 180 | Simply edit the signature for the selected smtp account in the |
180 | edit new mail dialog and press the "save signature" button there. | 181 | edit new mail dialog and press the "save signature" button there. |
181 | Then the signature is saved to the file specified in the smtp account settings. | 182 | Then the signature is saved to the file specified in the smtp account settings. |
182 | If there is no file specified, it is saved automatically to the file | 183 | If there is no file specified, it is saved automatically to the file |
183 | kdepim/apps/kopiemail/<accountname>.sig. | 184 | kdepim/apps/kopiemail/<accountname>.sig. |
184 | 185 | ||
185 | 186 | ||
186 | 187 | ||
187 | ********** VERSION 2.0.1 ************ | 188 | ********** VERSION 2.0.1 ************ |
188 | 189 | ||
189 | Oooops ... I forgot to test on the Zaurus 5500 ... | 190 | Oooops ... I forgot to test on the Zaurus 5500 ... |
190 | 191 | ||
191 | Fixed many problems of new (english) strings (and german translations) | 192 | Fixed many problems of new (english) strings (and german translations) |
192 | introduced in the latest versions, where the text was not fitting on the | 193 | introduced in the latest versions, where the text was not fitting on the |
193 | 240x320 display of the Zaurus 5500. | 194 | 240x320 display of the Zaurus 5500. |
194 | 195 | ||
195 | KO/Pi: | 196 | KO/Pi: |
196 | Added a popup menu ( press pen and hold to get popup ) to the agenda view | 197 | Added a popup menu ( press pen and hold to get popup ) to the agenda view |
197 | with many useful items (add event/todo, show next week, two weeks, month, journal). | 198 | with many useful items (add event/todo, show next week, two weeks, month, journal). |
198 | 199 | ||
199 | Added items to the todolist popup menu for: | 200 | Added items to the todolist popup menu for: |
200 | Display all opened, all closed or all todos flat. | 201 | Display all opened, all closed or all todos flat. |
201 | The "flat" view makes is possible to sort all todos after ,e.g., prio or date. | 202 | The "flat" view makes is possible to sort all todos after ,e.g., prio or date. |
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp index a751fce..9c8d12d 100644 --- a/pwmanager/pwmanager/pwm.cpp +++ b/pwmanager/pwmanager/pwm.cpp | |||
@@ -300,385 +300,396 @@ void PwM::initMenubar() | |||
300 | managePopup->insertItem(QIconSet(picons->loadIcon("pencil", KIcon::Small)), | 300 | managePopup->insertItem(QIconSet(picons->loadIcon("pencil", KIcon::Small)), |
301 | i18n("&Add password"), this, | 301 | i18n("&Add password"), this, |
302 | SLOT(addPwd_slot()), 0, | 302 | SLOT(addPwd_slot()), 0, |
303 | BUTTON_POPUP_MANAGE_ADD); | 303 | BUTTON_POPUP_MANAGE_ADD); |
304 | managePopup->insertSeparator(); | 304 | managePopup->insertSeparator(); |
305 | managePopup->insertItem(QIconSet(picons->loadIcon("edit", KIcon::Small)), | 305 | managePopup->insertItem(QIconSet(picons->loadIcon("edit", KIcon::Small)), |
306 | i18n("&Edit"), this, SLOT(editPwd_slot()), 0, | 306 | i18n("&Edit"), this, SLOT(editPwd_slot()), 0, |
307 | BUTTON_POPUP_MANAGE_EDIT); | 307 | BUTTON_POPUP_MANAGE_EDIT); |
308 | managePopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)), | 308 | managePopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)), |
309 | i18n("&Delete"), this, SLOT(deletePwd_slot()), | 309 | i18n("&Delete"), this, SLOT(deletePwd_slot()), |
310 | 0, BUTTON_POPUP_MANAGE_DEL); | 310 | 0, BUTTON_POPUP_MANAGE_DEL); |
311 | managePopup->insertSeparator(); | 311 | managePopup->insertSeparator(); |
312 | managePopup->insertItem(QIconSet(picons->loadIcon("rotate", KIcon::Small)), | 312 | managePopup->insertItem(QIconSet(picons->loadIcon("rotate", KIcon::Small)), |
313 | i18n("Change &Master Password"), this, | 313 | i18n("Change &Master Password"), this, |
314 | SLOT(changeMasterPwd_slot()), 0, | 314 | SLOT(changeMasterPwd_slot()), 0, |
315 | BUTTON_POPUP_MANAGE_CHANGEMP); | 315 | BUTTON_POPUP_MANAGE_CHANGEMP); |
316 | menuBar()->insertItem(i18n("&Manage"), managePopup); | 316 | menuBar()->insertItem(i18n("&Manage"), managePopup); |
317 | // "chipcard" popup menu | 317 | // "chipcard" popup menu |
318 | #ifdef CONFIG_KEYCARD | 318 | #ifdef CONFIG_KEYCARD |
319 | chipcardPopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)), | 319 | chipcardPopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)), |
320 | i18n("&Generate new key-card"), this, | 320 | i18n("&Generate new key-card"), this, |
321 | SLOT(genNewCard_slot()), 0, | 321 | SLOT(genNewCard_slot()), 0, |
322 | BUTTON_POPUP_CHIPCARD_GENNEW); | 322 | BUTTON_POPUP_CHIPCARD_GENNEW); |
323 | chipcardPopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)), | 323 | chipcardPopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)), |
324 | i18n("&Erase key-card"), this, | 324 | i18n("&Erase key-card"), this, |
325 | SLOT(eraseCard_slot()), 0, | 325 | SLOT(eraseCard_slot()), 0, |
326 | BUTTON_POPUP_CHIPCARD_DEL); | 326 | BUTTON_POPUP_CHIPCARD_DEL); |
327 | chipcardPopup->insertItem(QIconSet(picons->loadIcon("", KIcon::Small)), | 327 | chipcardPopup->insertItem(QIconSet(picons->loadIcon("", KIcon::Small)), |
328 | i18n("Read card-&ID"), this, | 328 | i18n("Read card-&ID"), this, |
329 | SLOT(readCardId_slot()), 0, | 329 | SLOT(readCardId_slot()), 0, |
330 | BUTTON_POPUP_CHIPCARD_READID); | 330 | BUTTON_POPUP_CHIPCARD_READID); |
331 | chipcardPopup->insertSeparator(); | 331 | chipcardPopup->insertSeparator(); |
332 | chipcardPopup->insertItem(QIconSet(picons->loadIcon("2rightarrow", KIcon::Small)), | 332 | chipcardPopup->insertItem(QIconSet(picons->loadIcon("2rightarrow", KIcon::Small)), |
333 | i18n("&Make card backup-image"), this, | 333 | i18n("&Make card backup-image"), this, |
334 | SLOT(makeCardBackup_slot()), 0, | 334 | SLOT(makeCardBackup_slot()), 0, |
335 | BUTTON_POPUP_CHIPCARD_SAVEBACKUP); | 335 | BUTTON_POPUP_CHIPCARD_SAVEBACKUP); |
336 | chipcardPopup->insertItem(QIconSet(picons->loadIcon("2leftarrow", KIcon::Small)), | 336 | chipcardPopup->insertItem(QIconSet(picons->loadIcon("2leftarrow", KIcon::Small)), |
337 | i18n("&Replay card backup-image"), this, | 337 | i18n("&Replay card backup-image"), this, |
338 | SLOT(replayCardBackup_slot()), 0, | 338 | SLOT(replayCardBackup_slot()), 0, |
339 | BUTTON_POPUP_CHIPCARD_REPLAYBACKUP); | 339 | BUTTON_POPUP_CHIPCARD_REPLAYBACKUP); |
340 | menuBar()->insertItem(i18n("&Chipcard manager"), chipcardPopup); | 340 | menuBar()->insertItem(i18n("&Chipcard manager"), chipcardPopup); |
341 | #endif // CONFIG_KEYCARD | 341 | #endif // CONFIG_KEYCARD |
342 | // "view" popup menu | 342 | // "view" popup menu |
343 | viewPopup->insertItem(QIconSet(picons->loadIcon("find", KIcon::Small)), | 343 | viewPopup->insertItem(QIconSet(picons->loadIcon("find", KIcon::Small)), |
344 | i18n("&Find"), this, | 344 | i18n("&Find"), this, |
345 | SLOT(find_slot()), 0, BUTTON_POPUP_VIEW_FIND); | 345 | SLOT(find_slot()), 0, BUTTON_POPUP_VIEW_FIND); |
346 | viewPopup->insertSeparator(); | 346 | viewPopup->insertSeparator(); |
347 | viewPopup->insertItem(QIconSet(picons->loadIcon("halfencrypted", KIcon::Small)), | 347 | viewPopup->insertItem(QIconSet(picons->loadIcon("halfencrypted", KIcon::Small)), |
348 | i18n("&Lock all entries"), this, | 348 | i18n("&Lock all entries"), this, |
349 | SLOT(lockWnd_slot()), 0, | 349 | SLOT(lockWnd_slot()), 0, |
350 | BUTTON_POPUP_VIEW_LOCK); | 350 | BUTTON_POPUP_VIEW_LOCK); |
351 | viewPopup->insertItem(QIconSet(picons->loadIcon("encrypted", KIcon::Small)), | 351 | viewPopup->insertItem(QIconSet(picons->loadIcon("encrypted", KIcon::Small)), |
352 | i18n("&Deep-lock all entries"), this, | 352 | i18n("&Deep-lock all entries"), this, |
353 | SLOT(deepLockWnd_slot()), 0, | 353 | SLOT(deepLockWnd_slot()), 0, |
354 | BUTTON_POPUP_VIEW_DEEPLOCK); | 354 | BUTTON_POPUP_VIEW_DEEPLOCK); |
355 | viewPopup->insertItem(QIconSet(picons->loadIcon("decrypted", KIcon::Small)), | 355 | viewPopup->insertItem(QIconSet(picons->loadIcon("decrypted", KIcon::Small)), |
356 | i18n("&Unlock all entries"), this, | 356 | i18n("&Unlock all entries"), this, |
357 | SLOT(unlockWnd_slot()), 0, | 357 | SLOT(unlockWnd_slot()), 0, |
358 | BUTTON_POPUP_VIEW_UNLOCK); | 358 | BUTTON_POPUP_VIEW_UNLOCK); |
359 | menuBar()->insertItem(i18n("&View"), viewPopup); | 359 | menuBar()->insertItem(i18n("&View"), viewPopup); |
360 | // "options" popup menu | 360 | // "options" popup menu |
361 | optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), | 361 | optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), |
362 | i18n("&Configure..."), this, | 362 | i18n("&Configure..."), this, |
363 | SLOT(config_slot()),0, | 363 | SLOT(config_slot()),0, |
364 | BUTTON_POPUP_OPTIONS_CONFIG); | 364 | BUTTON_POPUP_OPTIONS_CONFIG); |
365 | if ( QApplication::desktop()->width() <= 240 ) { | 365 | if ( QApplication::desktop()->width() <= 240 ) { |
366 | managePopup->insertSeparator(); | 366 | managePopup->insertSeparator(); |
367 | managePopup->insertItem(i18n("&Options"), optionsPopup); | 367 | managePopup->insertItem(i18n("&Options"), optionsPopup); |
368 | } else | 368 | } else |
369 | menuBar()->insertItem(i18n("&Options"), optionsPopup); | 369 | menuBar()->insertItem(i18n("&Options"), optionsPopup); |
370 | // "help" popup menu | 370 | // "help" popup menu |
371 | #ifndef PWM_EMBEDDED | 371 | #ifndef PWM_EMBEDDED |
372 | helpPopup = helpMenu(QString::null, false); | 372 | helpPopup = helpMenu(QString::null, false); |
373 | #else | 373 | #else |
374 | optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), | 374 | optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), |
375 | i18n("C&ategories..."), this, | 375 | i18n("C&ategories..."), this, |
376 | SLOT(category_slot()),0, | 376 | SLOT(category_slot()),0, |
377 | BUTTON_POPUP_OPTIONS_CATEGORY); | 377 | BUTTON_POPUP_OPTIONS_CATEGORY); |
378 | 378 | ||
379 | 379 | ||
380 | menuBar()->insertItem(i18n("&Sync"), syncPopup); | 380 | menuBar()->insertItem(i18n("&Sync"), syncPopup); |
381 | 381 | ||
382 | 382 | ||
383 | 383 | ||
384 | 384 | ||
385 | 385 | ||
386 | helpPopup = new KPopupMenu(this); | 386 | helpPopup = new KPopupMenu(this); |
387 | 387 | ||
388 | 388 | ||
389 | helpPopup->insertItem(i18n("&License"), this, | 389 | helpPopup->insertItem(i18n("&License"), this, |
390 | SLOT(showLicense_slot()), 0, | 390 | SLOT(showLicense_slot()), 0, |
391 | BUTTON_POPUP_HELP_LICENSE); | 391 | BUTTON_POPUP_HELP_LICENSE); |
392 | 392 | ||
393 | helpPopup->insertItem(i18n("&Faq"), this, | 393 | helpPopup->insertItem(i18n("&Faq"), this, |
394 | SLOT(faq_slot()), 0, | 394 | SLOT(faq_slot()), 0, |
395 | BUTTON_POPUP_HELP_FAQ); | 395 | BUTTON_POPUP_HELP_FAQ); |
396 | 396 | ||
397 | helpPopup->insertItem(i18n("&About PwManager"), this, | 397 | helpPopup->insertItem(i18n("&About PwManager"), this, |
398 | SLOT(createAboutData_slot()), 0, | 398 | SLOT(createAboutData_slot()), 0, |
399 | BUTTON_POPUP_HELP_ABOUT); | 399 | BUTTON_POPUP_HELP_ABOUT); |
400 | 400 | ||
401 | helpPopup->insertItem(i18n("&Sync HowTo"), this, | 401 | helpPopup->insertItem(i18n("&Sync HowTo"), this, |
402 | SLOT(syncHowTo_slot()), 0, | 402 | SLOT(syncHowTo_slot()), 0, |
403 | BUTTON_POPUP_HELP_SYNC); | 403 | BUTTON_POPUP_HELP_SYNC); |
404 | 404 | ||
405 | helpPopup->insertItem(i18n("&What's New"), this, | 405 | helpPopup->insertItem(i18n("&What's New"), this, |
406 | SLOT(whatsnew_slot()), 0, | 406 | SLOT(whatsnew_slot()), 0, |
407 | BUTTON_POPUP_HELP_WHATSNEW); | 407 | BUTTON_POPUP_HELP_WHATSNEW); |
408 | 408 | ||
409 | #endif | 409 | #endif |
410 | menuBar()->insertItem(i18n("&Help"), helpPopup); | 410 | menuBar()->insertItem(i18n("&Help"), helpPopup); |
411 | 411 | ||
412 | } | 412 | } |
413 | 413 | ||
414 | void PwM::initToolbar() | 414 | void PwM::initToolbar() |
415 | { | 415 | { |
416 | KIconLoader* picons; | 416 | KIconLoader* picons; |
417 | #ifndef PWM_EMBEDDED | 417 | #ifndef PWM_EMBEDDED |
418 | KIconLoader icons; | 418 | KIconLoader icons; |
419 | picons = &icons; | 419 | picons = &icons; |
420 | #else | 420 | #else |
421 | picons = KGlobal::iconLoader(); | 421 | picons = KGlobal::iconLoader(); |
422 | #endif | 422 | #endif |
423 | 423 | ||
424 | #if 0 | 424 | #if 0 |
425 | toolBar()->insertButton(picons->loadIcon("filenew", KIcon::Toolbar), | 425 | toolBar()->insertButton(picons->loadIcon("filenew", KIcon::Toolbar), |
426 | BUTTON_TOOL_NEW, SIGNAL(clicked(int)), this, | 426 | BUTTON_TOOL_NEW, SIGNAL(clicked(int)), this, |
427 | SLOT(new_slot()), true, i18n("New")); | 427 | SLOT(new_slot()), true, i18n("New")); |
428 | #endif | 428 | #endif |
429 | toolBar()->insertButton(picons->loadIcon("fileopen", KIcon::Toolbar), | 429 | toolBar()->insertButton(picons->loadIcon("fileopen", KIcon::Toolbar), |
430 | BUTTON_TOOL_OPEN, SIGNAL(clicked(int)), this, | 430 | BUTTON_TOOL_OPEN, SIGNAL(clicked(int)), this, |
431 | SLOT(open_slot()), true, i18n("Open")); | 431 | SLOT(open_slot()), true, i18n("Open")); |
432 | toolBar()->insertButton(picons->loadIcon("pencil", KIcon::Toolbar), | 432 | toolBar()->insertButton(picons->loadIcon("pencil", KIcon::Toolbar), |
433 | BUTTON_TOOL_ADD, SIGNAL(clicked(int)), this, | 433 | BUTTON_TOOL_ADD, SIGNAL(clicked(int)), this, |
434 | SLOT(addPwd_slot()), true, | 434 | SLOT(addPwd_slot()), true, |
435 | i18n("Add password")); | 435 | i18n("Add password")); |
436 | toolBar()->insertSeparator(); | 436 | toolBar()->insertSeparator(); |
437 | 437 | ||
438 | toolBar()->insertButton(picons->loadIcon("find", KIcon::Toolbar), | 438 | toolBar()->insertButton(picons->loadIcon("find", KIcon::Toolbar), |
439 | BUTTON_TOOL_FIND, SIGNAL(clicked(int)), this, | 439 | BUTTON_TOOL_FIND, SIGNAL(clicked(int)), this, |
440 | SLOT(find_slot()), true, i18n("Find entry")); | 440 | SLOT(find_slot()), true, i18n("Find entry")); |
441 | toolBar()->insertSeparator(); | 441 | toolBar()->insertSeparator(); |
442 | toolBar()->insertButton(picons->loadIcon("filesave", KIcon::Toolbar), | 442 | toolBar()->insertButton(picons->loadIcon("filesave", KIcon::Toolbar), |
443 | BUTTON_TOOL_SAVE, SIGNAL(clicked(int)), this, | 443 | BUTTON_TOOL_SAVE, SIGNAL(clicked(int)), this, |
444 | SLOT(save_slot()), true, i18n("Save")); | 444 | SLOT(save_slot()), true, i18n("Save")); |
445 | #if 0 | 445 | #if 0 |
446 | toolBar()->insertButton(picons->loadIcon("filesaveas", KIcon::Toolbar), | 446 | toolBar()->insertButton(picons->loadIcon("filesaveas", KIcon::Toolbar), |
447 | BUTTON_TOOL_SAVEAS, SIGNAL(clicked(int)), this, | 447 | BUTTON_TOOL_SAVEAS, SIGNAL(clicked(int)), this, |
448 | SLOT(saveAs_slot()), true, i18n("Save as")); | 448 | SLOT(saveAs_slot()), true, i18n("Save as")); |
449 | #endif | 449 | #endif |
450 | 450 | ||
451 | 451 | ||
452 | #if 0 | 452 | #if 0 |
453 | toolBar()->insertButton(picons->loadIcon("fileprint", KIcon::Toolbar), | 453 | toolBar()->insertButton(picons->loadIcon("fileprint", KIcon::Toolbar), |
454 | BUTTON_TOOL_PRINT, SIGNAL(clicked(int)), this, | 454 | BUTTON_TOOL_PRINT, SIGNAL(clicked(int)), this, |
455 | SLOT(print_slot()), true, i18n("Print...")); | 455 | SLOT(print_slot()), true, i18n("Print...")); |
456 | #endif | 456 | #endif |
457 | toolBar()->insertSeparator(); | 457 | toolBar()->insertSeparator(); |
458 | toolBar()->insertButton(picons->loadIcon("edit", KIcon::Toolbar), | 458 | toolBar()->insertButton(picons->loadIcon("edit", KIcon::Toolbar), |
459 | BUTTON_TOOL_EDIT, SIGNAL(clicked(int)), this, | 459 | BUTTON_TOOL_EDIT, SIGNAL(clicked(int)), this, |
460 | SLOT(editPwd_slot()), true, | 460 | SLOT(editPwd_slot()), true, |
461 | i18n("Edit password")); | 461 | i18n("Edit password")); |
462 | toolBar()->insertButton(picons->loadIcon("editdelete", KIcon::Toolbar), | 462 | toolBar()->insertButton(picons->loadIcon("editdelete", KIcon::Toolbar), |
463 | BUTTON_TOOL_DEL, SIGNAL(clicked(int)), this, | 463 | BUTTON_TOOL_DEL, SIGNAL(clicked(int)), this, |
464 | SLOT(deletePwd_slot()), true, | 464 | SLOT(deletePwd_slot()), true, |
465 | i18n("Delete password")); | 465 | i18n("Delete password")); |
466 | toolBar()->insertSeparator(); | 466 | toolBar()->insertSeparator(); |
467 | toolBar()->insertButton(picons->loadIcon("halfencrypted", KIcon::Toolbar), | 467 | toolBar()->insertButton(picons->loadIcon("halfencrypted", KIcon::Toolbar), |
468 | BUTTON_TOOL_LOCK, SIGNAL(clicked(int)), this, | 468 | BUTTON_TOOL_LOCK, SIGNAL(clicked(int)), this, |
469 | SLOT(lockWnd_slot()), true, | 469 | SLOT(lockWnd_slot()), true, |
470 | i18n("Lock all entries")); | 470 | i18n("Lock all entries")); |
471 | toolBar()->insertButton(picons->loadIcon("encrypted", KIcon::Toolbar), | 471 | toolBar()->insertButton(picons->loadIcon("encrypted", KIcon::Toolbar), |
472 | BUTTON_TOOL_DEEPLOCK, SIGNAL(clicked(int)), this, | 472 | BUTTON_TOOL_DEEPLOCK, SIGNAL(clicked(int)), this, |
473 | SLOT(deepLockWnd_slot()), true, | 473 | SLOT(deepLockWnd_slot()), true, |
474 | i18n("Deep-Lock all entries")); | 474 | i18n("Deep-Lock all entries")); |
475 | toolBar()->insertButton(picons->loadIcon("decrypted", KIcon::Toolbar), | 475 | toolBar()->insertButton(picons->loadIcon("decrypted", KIcon::Toolbar), |
476 | BUTTON_TOOL_UNLOCK, SIGNAL(clicked(int)), this, | 476 | BUTTON_TOOL_UNLOCK, SIGNAL(clicked(int)), this, |
477 | SLOT(unlockWnd_slot()), true, | 477 | SLOT(unlockWnd_slot()), true, |
478 | i18n("Unlock all entries")); | 478 | i18n("Unlock all entries")); |
479 | } | 479 | } |
480 | 480 | ||
481 | void PwM::initMetrics() | 481 | void PwM::initMetrics() |
482 | { | 482 | { |
483 | QSize s = conf()->confWndMainWndSize(); | 483 | QSize s = conf()->confWndMainWndSize(); |
484 | if (s.isValid()) | 484 | if (s.isValid()) |
485 | resize(s); | 485 | resize(s); |
486 | else | 486 | else |
487 | resize(DEFAULT_SIZE); | 487 | resize(DEFAULT_SIZE); |
488 | } | 488 | } |
489 | 489 | ||
490 | void PwM::updateCaption() | 490 | void PwM::updateCaption() |
491 | { | 491 | { |
492 | setPlainCaption(curDoc()->getTitle() + " - " PROG_NAME " " PACKAGE_VER); | 492 | QString s = curDoc()->getTitle(); |
493 | int maxlen = 50; | ||
494 | if ( QApplication::desktop()->width() < 640 ) { | ||
495 | if ( QApplication::desktop()->width() < 320 ) | ||
496 | maxlen = 22; | ||
497 | else | ||
498 | maxlen = 35; | ||
499 | } | ||
500 | if ( s.length() > maxlen ) { | ||
501 | s = "..."+s.right(maxlen -3); | ||
502 | } | ||
503 | setPlainCaption( s ); | ||
493 | } | 504 | } |
494 | 505 | ||
495 | void PwM::hideEvent(QHideEvent *) | 506 | void PwM::hideEvent(QHideEvent *) |
496 | { | 507 | { |
497 | if (isMinimized()) { | 508 | if (isMinimized()) { |
498 | if (init->tray()) { | 509 | if (init->tray()) { |
499 | forceMinimizeToTray = true; | 510 | forceMinimizeToTray = true; |
500 | close(); | 511 | close(); |
501 | } | 512 | } |
502 | int mmlock = conf()->confGlobMinimizeLock(); | 513 | int mmlock = conf()->confGlobMinimizeLock(); |
503 | switch (mmlock) { | 514 | switch (mmlock) { |
504 | case 0: // don't lock anything | 515 | case 0: // don't lock anything |
505 | break; | 516 | break; |
506 | case 1: {// normal lock | 517 | case 1: {// normal lock |
507 | curDoc()->lockAll(true); | 518 | curDoc()->lockAll(true); |
508 | break; | 519 | break; |
509 | } case 2: {// deep-lock | 520 | } case 2: {// deep-lock |
510 | curDoc()->deepLock(); | 521 | curDoc()->deepLock(); |
511 | break; | 522 | break; |
512 | } default: | 523 | } default: |
513 | WARN(); | 524 | WARN(); |
514 | } | 525 | } |
515 | } | 526 | } |
516 | } | 527 | } |
517 | 528 | ||
518 | void PwM::setVirgin(bool v) | 529 | void PwM::setVirgin(bool v) |
519 | { | 530 | { |
520 | if (virgin == v) | 531 | if (virgin == v) |
521 | return; | 532 | return; |
522 | virgin = v; | 533 | virgin = v; |
523 | filePopup->setItemEnabled(BUTTON_POPUP_FILE_SAVE, !v); | 534 | filePopup->setItemEnabled(BUTTON_POPUP_FILE_SAVE, !v); |
524 | filePopup->setItemEnabled(BUTTON_POPUP_FILE_SAVEAS, !v); | 535 | filePopup->setItemEnabled(BUTTON_POPUP_FILE_SAVEAS, !v); |
525 | filePopup->setItemEnabled(BUTTON_POPUP_FILE_EXPORT, !v); | 536 | filePopup->setItemEnabled(BUTTON_POPUP_FILE_EXPORT, !v); |
526 | filePopup->setItemEnabled(BUTTON_POPUP_FILE_PRINT, !v); | 537 | filePopup->setItemEnabled(BUTTON_POPUP_FILE_PRINT, !v); |
527 | managePopup->setItemEnabled(BUTTON_POPUP_MANAGE_EDIT, !v); | 538 | managePopup->setItemEnabled(BUTTON_POPUP_MANAGE_EDIT, !v); |
528 | managePopup->setItemEnabled(BUTTON_POPUP_MANAGE_DEL, !v); | 539 | managePopup->setItemEnabled(BUTTON_POPUP_MANAGE_DEL, !v); |
529 | managePopup->setItemEnabled(BUTTON_POPUP_MANAGE_CHANGEMP, !v); | 540 | managePopup->setItemEnabled(BUTTON_POPUP_MANAGE_CHANGEMP, !v); |
530 | viewPopup->setItemEnabled(BUTTON_POPUP_VIEW_LOCK, !v); | 541 | viewPopup->setItemEnabled(BUTTON_POPUP_VIEW_LOCK, !v); |
531 | viewPopup->setItemEnabled(BUTTON_POPUP_VIEW_DEEPLOCK, !v); | 542 | viewPopup->setItemEnabled(BUTTON_POPUP_VIEW_DEEPLOCK, !v); |
532 | viewPopup->setItemEnabled(BUTTON_POPUP_VIEW_UNLOCK, !v); | 543 | viewPopup->setItemEnabled(BUTTON_POPUP_VIEW_UNLOCK, !v); |
533 | viewPopup->setItemEnabled(BUTTON_POPUP_VIEW_FIND, !v); | 544 | viewPopup->setItemEnabled(BUTTON_POPUP_VIEW_FIND, !v); |
534 | toolBar()->setItemEnabled(BUTTON_TOOL_SAVE, !v); | 545 | toolBar()->setItemEnabled(BUTTON_TOOL_SAVE, !v); |
535 | toolBar()->setItemEnabled(BUTTON_TOOL_SAVEAS, !v); | 546 | toolBar()->setItemEnabled(BUTTON_TOOL_SAVEAS, !v); |
536 | toolBar()->setItemEnabled(BUTTON_TOOL_PRINT, !v); | 547 | toolBar()->setItemEnabled(BUTTON_TOOL_PRINT, !v); |
537 | toolBar()->setItemEnabled(BUTTON_TOOL_EDIT, !v); | 548 | toolBar()->setItemEnabled(BUTTON_TOOL_EDIT, !v); |
538 | toolBar()->setItemEnabled(BUTTON_TOOL_DEL, !v); | 549 | toolBar()->setItemEnabled(BUTTON_TOOL_DEL, !v); |
539 | toolBar()->setItemEnabled(BUTTON_TOOL_LOCK, !v); | 550 | toolBar()->setItemEnabled(BUTTON_TOOL_LOCK, !v); |
540 | toolBar()->setItemEnabled(BUTTON_TOOL_DEEPLOCK, !v); | 551 | toolBar()->setItemEnabled(BUTTON_TOOL_DEEPLOCK, !v); |
541 | toolBar()->setItemEnabled(BUTTON_TOOL_UNLOCK, !v); | 552 | toolBar()->setItemEnabled(BUTTON_TOOL_UNLOCK, !v); |
542 | toolBar()->setItemEnabled(BUTTON_TOOL_FIND, !v); | 553 | toolBar()->setItemEnabled(BUTTON_TOOL_FIND, !v); |
543 | } | 554 | } |
544 | 555 | ||
545 | void PwM::new_slot() | 556 | void PwM::new_slot() |
546 | { | 557 | { |
547 | init->createMainWnd(); | 558 | init->createMainWnd(); |
548 | } | 559 | } |
549 | 560 | ||
550 | //US ENH | 561 | //US ENH |
551 | void PwM::open_slot() | 562 | void PwM::open_slot() |
552 | { | 563 | { |
553 | open_slot(""); | 564 | open_slot(""); |
554 | } | 565 | } |
555 | 566 | ||
556 | void PwM::open_slot(QString fn) | 567 | void PwM::open_slot(QString fn) |
557 | { | 568 | { |
558 | openDoc(fn); | 569 | openDoc(fn); |
559 | } | 570 | } |
560 | 571 | ||
561 | PwMDoc * PwM::openDoc(QString filename, bool openDeepLocked) | 572 | PwMDoc * PwM::openDoc(QString filename, bool openDeepLocked) |
562 | { | 573 | { |
563 | if (!isVirgin()) { | 574 | if (!isVirgin()) { |
564 | // open the document in a new window. | 575 | // open the document in a new window. |
565 | PwM *newInstance = init->createMainWnd(); | 576 | PwM *newInstance = init->createMainWnd(); |
566 | PwMDoc *newDoc = newInstance->openDoc(filename, openDeepLocked); | 577 | PwMDoc *newDoc = newInstance->openDoc(filename, openDeepLocked); |
567 | if (!newDoc) { | 578 | if (!newDoc) { |
568 | newInstance->setForceQuit(true); | 579 | newInstance->setForceQuit(true); |
569 | delete_and_null(newInstance); | 580 | delete_and_null(newInstance); |
570 | } | 581 | } |
571 | return newDoc; | 582 | return newDoc; |
572 | } | 583 | } |
573 | 584 | ||
574 | if (!curDoc()->openDocUi(curDoc(), filename, openDeepLocked)) | 585 | if (!curDoc()->openDocUi(curDoc(), filename, openDeepLocked)) |
575 | return 0; | 586 | return 0; |
576 | showStatMsg(i18n("Successfully opened file.")); | 587 | showStatMsg(i18n("Successfully opened file.")); |
577 | updateCaption(); | 588 | updateCaption(); |
578 | setVirgin(false); | 589 | setVirgin(false); |
579 | return curDoc(); | 590 | return curDoc(); |
580 | } | 591 | } |
581 | 592 | ||
582 | PwMView * PwM::makeNewListView(PwMDoc *doc) | 593 | PwMView * PwM::makeNewListView(PwMDoc *doc) |
583 | { | 594 | { |
584 | PwMView *ret = new PwMView(this, this, doc); | 595 | PwMView *ret = new PwMView(this, this, doc); |
585 | ret->setFont(conf()->confGlobEntryFont()); | 596 | ret->setFont(conf()->confGlobEntryFont()); |
586 | ret->show(); | 597 | ret->show(); |
587 | return ret; | 598 | return ret; |
588 | } | 599 | } |
589 | 600 | ||
590 | void PwM::close_slot() | 601 | void PwM::close_slot() |
591 | { | 602 | { |
592 | close(); | 603 | close(); |
593 | } | 604 | } |
594 | 605 | ||
595 | void PwM::quitButton_slot() | 606 | void PwM::quitButton_slot() |
596 | { | 607 | { |
597 | init->shutdownApp(0); | 608 | init->shutdownApp(0); |
598 | } | 609 | } |
599 | 610 | ||
600 | void PwM::save_slot() | 611 | void PwM::save_slot() |
601 | { | 612 | { |
602 | save(); | 613 | save(); |
603 | } | 614 | } |
604 | 615 | ||
605 | bool PwM::save() | 616 | bool PwM::save() |
606 | { | 617 | { |
607 | if (!curDoc()->saveDocUi(curDoc())) | 618 | if (!curDoc()->saveDocUi(curDoc())) |
608 | return false; | 619 | return false; |
609 | showStatMsg(i18n("Successfully saved data.")); | 620 | showStatMsg(i18n("Successfully saved data.")); |
610 | updateCaption(); | 621 | updateCaption(); |
611 | return true; | 622 | return true; |
612 | } | 623 | } |
613 | 624 | ||
614 | void PwM::saveAs_slot() | 625 | void PwM::saveAs_slot() |
615 | { | 626 | { |
616 | saveAs(); | 627 | saveAs(); |
617 | } | 628 | } |
618 | 629 | ||
619 | bool PwM::saveAs() | 630 | bool PwM::saveAs() |
620 | { | 631 | { |
621 | if (!curDoc()->saveAsDocUi(curDoc())) | 632 | if (!curDoc()->saveAsDocUi(curDoc())) |
622 | return false; | 633 | return false; |
623 | showStatMsg(i18n("Successfully saved data.")); | 634 | showStatMsg(i18n("Successfully saved data.")); |
624 | updateCaption(); | 635 | updateCaption(); |
625 | return true; | 636 | return true; |
626 | } | 637 | } |
627 | 638 | ||
628 | //US ENH : changed code to run with older MOC | 639 | //US ENH : changed code to run with older MOC |
629 | void PwM::addPwd_slot() | 640 | void PwM::addPwd_slot() |
630 | { | 641 | { |
631 | addPwd_slot1(0, 0); | 642 | addPwd_slot1(0, 0); |
632 | } | 643 | } |
633 | 644 | ||
634 | void PwM::addPwd_slot1(QString *pw, PwMDoc *_doc) | 645 | void PwM::addPwd_slot1(QString *pw, PwMDoc *_doc) |
635 | { | 646 | { |
636 | PwMDoc *doc; | 647 | PwMDoc *doc; |
637 | if (_doc) { | 648 | if (_doc) { |
638 | doc = _doc; | 649 | doc = _doc; |
639 | } else { | 650 | } else { |
640 | doc = curDoc(); | 651 | doc = curDoc(); |
641 | } | 652 | } |
642 | PWM_ASSERT(doc); | 653 | PWM_ASSERT(doc); |
643 | doc->timer()->getLock(DocTimer::id_autoLockTimer); | 654 | doc->timer()->getLock(DocTimer::id_autoLockTimer); |
644 | #ifndef PWM_EMBEDDED | 655 | #ifndef PWM_EMBEDDED |
645 | AddEntryWndImpl w; | 656 | AddEntryWndImpl w; |
646 | #else | 657 | #else |
647 | AddEntryWndImpl w(doc, this, "addentrywndimpl"); | 658 | AddEntryWndImpl w(doc, this, "addentrywndimpl"); |
648 | #endif | 659 | #endif |
649 | w.setCaption( i18n ("Add new password") ); | 660 | w.setCaption( i18n ("Add new password") ); |
650 | vector<string> catList; | 661 | vector<string> catList; |
651 | doc->getCategoryList(&catList); | 662 | doc->getCategoryList(&catList); |
652 | unsigned i, size = catList.size(); | 663 | unsigned i, size = catList.size(); |
653 | for (i = 0; i < size; ++i) { | 664 | for (i = 0; i < size; ++i) { |
654 | w.addCategory(catList[i].c_str()); | 665 | w.addCategory(catList[i].c_str()); |
655 | } | 666 | } |
656 | w.setCurrCategory(view->getCurrentCategory()); | 667 | w.setCurrCategory(view->getCurrentCategory()); |
657 | if (pw) | 668 | if (pw) |
658 | w.pwLineEdit->setText(*pw); | 669 | w.pwLineEdit->setText(*pw); |
659 | 670 | ||
660 | tryAgain: | 671 | tryAgain: |
661 | w.descLineEdit->setFocus(); | 672 | w.descLineEdit->setFocus(); |
662 | if (w.exec() == 1) | 673 | if (w.exec() == 1) |
663 | { | 674 | { |
664 | PwMDataItem d; | 675 | PwMDataItem d; |
665 | 676 | ||
666 | //US BUG: to initialize all values of curEntr with meaningfulldata, | 677 | //US BUG: to initialize all values of curEntr with meaningfulldata, |
667 | // we call clear on it. Reason: Metadata will be uninitialized otherwise. | 678 | // we call clear on it. Reason: Metadata will be uninitialized otherwise. |
668 | // another option would be to create a constructor for PwMDataItem | 679 | // another option would be to create a constructor for PwMDataItem |
669 | d.clear(true); | 680 | d.clear(true); |
670 | 681 | ||
671 | d.desc = w.getDescription().latin1(); | 682 | d.desc = w.getDescription().latin1(); |
672 | d.name = w.getUsername().latin1(); | 683 | d.name = w.getUsername().latin1(); |
673 | d.pw = w.getPassword().latin1(); | 684 | d.pw = w.getPassword().latin1(); |
674 | d.comment = w.getComment().latin1(); | 685 | d.comment = w.getComment().latin1(); |
675 | d.url = w.getUrl().latin1(); | 686 | d.url = w.getUrl().latin1(); |
676 | d.launcher = w.getLauncher().latin1(); | 687 | d.launcher = w.getLauncher().latin1(); |
677 | PwMerror ret = doc->addEntry(w.getCategory(), &d); | 688 | PwMerror ret = doc->addEntry(w.getCategory(), &d); |
678 | if (ret == e_entryExists) { | 689 | if (ret == e_entryExists) { |
679 | KMessageBox::error(this, | 690 | KMessageBox::error(this, |
680 | i18n | 691 | i18n |
681 | ("An entry with this \"Description\",\n" | 692 | ("An entry with this \"Description\",\n" |
682 | "does already exist.\n" | 693 | "does already exist.\n" |
683 | "Please select another description."), | 694 | "Please select another description."), |
684 | i18n("entry already exists.")); | 695 | i18n("entry already exists.")); |