File: OpeningClosingDatabases.html

package info (click to toggle)
passwordsafe 1.22.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 31,772 kB
  • sloc: cpp: 85,462; ansic: 1,704; xml: 1,616; makefile: 597; perl: 463; sh: 388; javascript: 48
file content (371 lines) | stat: -rw-r--r-- 11,169 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
	<TITLE>Opening/Closing databases</TITLE>
	<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.1  (Linux)">
	<META NAME="CREATED" CONTENT="0;0">
	<META NAME="CHANGEDBY" CONTENT="Saurav Ghosh">
	<META NAME="CHANGED" CONTENT="20100708;17145700">
	<STYLE TYPE="text/css">
	<!--
		TD P { font-family: "arial", sans-serif }
		P { font-family: "arial", sans-serif }
		A:link { color: #0000cc }
	-->
	</STYLE>
</HEAD>
<BODY LANG="en-US" LINK="#0000cc" DIR="LTR">
<P STYLE="margin-bottom: 0in"><FONT SIZE=5><B>Opening/Closing
databases</B></FONT><BR><FONT SIZE=2>8 messages</FONT> 
</P>
<HR>
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
	<COL WIDTH=93*>
	<COL WIDTH=163*>
	<TR>
		<TD WIDTH=36%>
			<P><FONT SIZE=2><B>Saurav Ghosh </B></FONT>
			</P>
		</TD>
		<TD WIDTH=64%>
			<P ALIGN=RIGHT><FONT SIZE=2><B>Tue, Jul 6, 2010 at 2:13 PM </B></FONT>
			</P>
		</TD>
	</TR>
	<TR>
		<TD COLSPAN=2 WIDTH=100%>
			<P STYLE="margin-bottom: 0in"><FONT SIZE=2>To: David Kelvin, ronys
			</FONT>
			</P>
			<TABLE WIDTH=100% BORDER=0 CELLPADDING=12 CELLSPACING=0>
				<TR>
					<TD>
						<P><FONT SIZE=2>While opening or closing a DB, should the
						UI<BR><BR>1. Ask the core to read the DB, and if successful,
						enumerate over the DB items and add them to the UI element
						(tree or grid). &nbsp;Similarly, when closing a DB, ask the
						core to clear all items and then remove all items from the UI
						element.<BR><BR>or<BR><BR>2. Ask the core to read/close the DB
						and add/remove the DB items on getting notifications from
						core?<BR><BR>Is the UIInterface interface class written for
						(2), or does it only serve to update the GUI when an item is
						edited/added/deleted individually?</FONT></P>
					</TD>
				</TR>
			</TABLE>
			<P><BR><BR>
			</P>
		</TD>
	</TR>
	<TR>
		<TD COLSPAN=2 WIDTH=100%></TD>
	</TR>
</TABLE>
<HR>
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
	<TR>
		<TD>
			<P><FONT SIZE=2><B>ronys </B></FONT>
			</P>
		</TD>
		<TD>
			<P ALIGN=RIGHT><FONT SIZE=2><B>Thu, Jul 8, 2010 at 2:49 AM </B></FONT>
			</P>
		</TD>
	</TR>
	<TR>
		<TD COLSPAN=2>
			<P STYLE="margin-bottom: 0in"><FONT SIZE=2>To: Saurav Ghosh </FONT>
			</P>
			<P STYLE="margin-bottom: 0in"><FONT SIZE=2>Cc: David Kelvin </FONT>
			</P>
			<TABLE WIDTH=100% BORDER=0 CELLPADDING=12 CELLSPACING=0>
				<TR>
					<TD>
						<P STYLE="margin-bottom: 0in"><BR>
						</P>
						<P STYLE="margin-bottom: 0in"><FONT SIZE=2>(2) would be the
						correct approach. I'd disable updates for the duration, though,
						in order to prevent lots of annoying flashing when adding
						entries one after the other.</FONT></P>
						<P STYLE="margin-bottom: 0in"><BR>
						</P>
						<P STYLE="margin-bottom: 0in"><FONT SIZE=2>Keep in mind that
						the UIInterface was added retroactively, mainly to support
						undo/redo, so some of the older code, including opening/closing
						the db, might not have been adapted to it.</FONT></P>
						<P STYLE="margin-bottom: 0in"><BR>
						</P>
						<P><FONT SIZE=2>BTW - I've a decent .deb file that should allow
						non-developers to run pwsafe on Debian and Ubuntu platforms. Do
						you see any reason not to release this as an &quot;early beta&quot;
						say, over the weekend?</FONT></P>
					</TD>
				</TR>
			</TABLE>
			<P><BR><BR>
			</P>
		</TD>
	</TR>
	<TR>
		<TD COLSPAN=2></TD>
	</TR>
</TABLE>
<HR>
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
	<TR>
		<TD>
			<P><FONT SIZE=2><B>Saurav Ghosh </B></FONT>
			</P>
		</TD>
		<TD>
			<P ALIGN=RIGHT><FONT SIZE=2><B>Thu, Jul 8, 2010 at 12:24 PM </B></FONT>
			</P>
		</TD>
	</TR>
	<TR>
		<TD COLSPAN=2>
			<P STYLE="margin-bottom: 0in"><FONT SIZE=2>To: ronys </FONT>
			</P>
			<P STYLE="margin-bottom: 0in"><FONT SIZE=2>Cc: David Kelvin </FONT>
			</P>
			<TABLE WIDTH=100% BORDER=0 CELLPADDING=12 CELLSPACING=0>
				<TR>
					<TD>
						<P><FONT SIZE=2>If (2) should be the correct approach, we
						probably need another method in the UIInterface to notify the
						UI that a new DB has been loaded.&nbsp; I had earlier thought
						that the DatabaseModified() function was actually serving that
						notification, but as per David's earlier email, its not
						so.<BR><BR>David - am I correct here?<BR><BR>Reg: the .deb
						file, I don't think the Linux build is very stable yet.&nbsp;
						Deleting entries in the grid definitely crashes pwsafe, and
						there also seems to be other problems adding/removing new
						entries from both grid and tree views.&nbsp; Also, I have never
						tested the undo/redo functionality on Linux at all.&nbsp; I
						think we should release the Linux build only after this much
						functionality works reliably.<BR><BR>Plus, we don't have the
						import/export support yet, so users using any other password
						manager will not be able to import their data into pwsafe to
						actually use it (or go back to their older PW manager if they
						create a new db). <BR></FONT><BR>
						</P>
					</TD>
				</TR>
			</TABLE>
			<P><BR><BR>
			</P>
		</TD>
	</TR>
	<TR>
		<TD COLSPAN=2></TD>
	</TR>
</TABLE>
<HR>
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
	<TR>
		<TD>
			<P><FONT SIZE=2><B>David Kelvin </B></FONT>
			</P>
		</TD>
		<TD>
			<P ALIGN=RIGHT><FONT SIZE=2><B>Thu, Jul 8, 2010 at 12:33 PM </B></FONT>
			</P>
		</TD>
	</TR>
	<TR>
		<TD COLSPAN=2>
			<P STYLE="margin-bottom: 0in"><FONT SIZE=2>To: Saurav Ghosh </FONT>
			</P>
			<P STYLE="margin-bottom: 0in"><FONT SIZE=2>Cc: ronys </FONT>
			</P>
			<TABLE WIDTH=100% BORDER=0 CELLPADDING=12 CELLSPACING=0>
				<TR>
					<TD>
						<P STYLE="margin-bottom: 0in"><FONT SIZE=2>There is no need for
						an extra call as the UI is the driver of opening a new database
						and therefore knows full well that it is a new database.
						&nbsp;Remember, the UI drives the actions. &nbsp;core does
						what it is told and tells the UI when things are changed due to
						its actions.</FONT></P>
						<P STYLE="margin-bottom: 0in"><BR>
						</P>
						<P><FONT SIZE=2>core will not open a new database without
						being told to do so by the UI.</FONT></P>
					</TD>
				</TR>
			</TABLE>
			<P><BR><BR>
			</P>
		</TD>
	</TR>
	<TR>
		<TD COLSPAN=2></TD>
	</TR>
</TABLE>
<HR>
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
	<TR>
		<TD>
			<P><FONT SIZE=2><B>Saurav Ghosh </B></FONT>
			</P>
		</TD>
		<TD>
			<P ALIGN=RIGHT><FONT SIZE=2><B>Thu, Jul 8, 2010 at 12:40 PM </B></FONT>
			</P>
		</TD>
	</TR>
	<TR>
		<TD COLSPAN=2>
			<P STYLE="margin-bottom: 0in"><FONT SIZE=2>To: David Kelvin </FONT>
			</P>
			<P STYLE="margin-bottom: 0in"><FONT SIZE=2>Cc: ronys </FONT>
			</P>
			<TABLE WIDTH=100% BORDER=0 CELLPADDING=12 CELLSPACING=0>
				<TR>
					<TD>
						<P><FONT SIZE=2>In that case, (1) below (and not 2) in my first
						message is the preferred approach?<BR><BR>I am ok either way,
						but I need to know which one is the supported/expected way of
						doing things.&nbsp; Right now, the Linux build is a mix of both
						approaches (and therefore crashes).<BR><BR>How about importing
						and merging databases?</FONT></P>
					</TD>
				</TR>
			</TABLE>
			<P><BR><BR>
			</P>
		</TD>
	</TR>
	<TR>
		<TD COLSPAN=2></TD>
	</TR>
</TABLE>
<HR>
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
	<TR>
		<TD>
			<P><FONT SIZE=2><B>David Kelvin </B></FONT>
			</P>
		</TD>
		<TD>
			<P ALIGN=RIGHT><FONT SIZE=2><B>Thu, Jul 8, 2010 at 12:54 PM </B></FONT>
			</P>
		</TD>
	</TR>
	<TR>
		<TD COLSPAN=2>
			<P STYLE="margin-bottom: 0in"><FONT SIZE=2>To: Saurav Ghosh </FONT>
			</P>
			<P STYLE="margin-bottom: 0in"><FONT SIZE=2>Cc: ronys </FONT>
			</P>
			<TABLE WIDTH=100% BORDER=0 CELLPADDING=12 CELLSPACING=0>
				<TR>
					<TD>
						<P STYLE="margin-bottom: 0in"><FONT SIZE=2>Last point first -
						import and merge are still driven by the UI. &nbsp;In fact, ALL
						actions are driven by the UI but the UI does not necessarily
						know if an action it has initiated has caused any change to the
						database.</FONT></P>
						<P STYLE="margin-bottom: 0in"><BR>
						</P>
						<P STYLE="margin-bottom: 0in"><FONT SIZE=2>Looking at the MFC
						code, during Open, core opens the database and, on success,
						the UI does the initial load of the UI (Tree/List).</FONT></P>
						<P STYLE="margin-bottom: 0in"><BR>
						</P>
						<P STYLE="margin-bottom: 0in"><FONT SIZE=2><U>core has no
						knowledge of the UI - only of the entries in the database</U>.
						&nbsp;After Open, when one or more entries change, it uses
						the&nbsp;<FONT FACE="arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 9pt">UIInterface
						to tell the UI that it might have to change what the user sees.
						&nbsp;For example, a field might have been changed but the user
						currently doesn't display it in the List view - for example the
						RunCommand field - so core tells the UI that it has changed
						and the UI decides whether the what the user sees needs
						updating.</FONT></FONT></FONT></P>
						<P STYLE="margin-bottom: 0in"><BR>
						</P>
						<P><FONT SIZE=2>So - (1) is probably correct.</FONT></P>
					</TD>
				</TR>
			</TABLE>
			<P><BR><BR>
			</P>
		</TD>
	</TR>
	<TR>
		<TD COLSPAN=2></TD>
	</TR>
</TABLE>
<HR>
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
	<TR>
		<TD>
			<P><FONT SIZE=2><B>Saurav Ghosh</B></FONT></P>
		</TD>
		<TD>
			<P ALIGN=RIGHT><FONT SIZE=2><B>Thu, Jul 8, 2010 at 1:01 PM </B></FONT>
			</P>
		</TD>
	</TR>
	<TR>
		<TD COLSPAN=2>
			<P STYLE="margin-bottom: 0in"><FONT SIZE=2>To: David Kelvin</FONT></P>
			<P STYLE="margin-bottom: 0in"><FONT SIZE=2>Cc: ronys</FONT></P>
			<TABLE WIDTH=100% BORDER=0 CELLPADDING=12 CELLSPACING=0>
				<TR>
					<TD>
						<P><FONT SIZE=2>Ok.&nbsp; That settles things for me.&nbsp; (1)
						is the way to go.&nbsp; I will probably document this in the
						'docs' directory.&nbsp; May be just archive this email thread
						there, to begin with.<BR><BR>I have some other questions
						regarding the UIInterface also which I will send you later,
						once I have stabilized the Linux build.<BR><BR>Rony - you
						concur?</FONT></P>
					</TD>
				</TR>
			</TABLE>
			<P><BR><BR>
			</P>
		</TD>
	</TR>
	<TR>
		<TD COLSPAN=2></TD>
	</TR>
</TABLE>
<HR>
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
	<TR>
		<TD>
			<P><FONT SIZE=2><B>ronys</B></FONT></P>
		</TD>
		<TD>
			<P ALIGN=RIGHT><FONT SIZE=2><B>Thu, Jul 8, 2010 at 1:07 PM </B></FONT>
			</P>
		</TD>
	</TR>
	<TR>
		<TD COLSPAN=2>
			<P STYLE="margin-bottom: 0in"><FONT SIZE=2>To: Saurav Ghosh</FONT></P>
			<P STYLE="margin-bottom: 0in"><FONT SIZE=2>Cc: David Kelvin</FONT></P>
			<TABLE WIDTH=100% BORDER=0 CELLPADDING=12 CELLSPACING=0>
				<TR>
					<TD>
						<P><FONT SIZE=2>Yes, I concur - David worked in this area more
						recently than I did, so his memory is probably more accurate.</FONT></P>
					</TD>
				</TR>
			</TABLE>
			<P><BR><BR>
			</P>
		</TD>
	</TR>
	<TR>
		<TD COLSPAN=2></TD>
	</TR>
</TABLE>
<HR>
</BODY>
</HTML>