Skip to content

Commit f5a983e

Browse files
author
Jeremy Bowman
committed
Proper D-Bus support, more bugfixes and Maemo improvements
1 parent 0d3808a commit f5a983e

32 files changed

+267
-129
lines changed

CHANGES

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
2010-04-30 JMB Proper D-Bus support, more bugfixes and Maemo improvements
2+
3+
Added code to correctly register with D-Bus on Maemo; this allows PortaBase
4+
to be launched by clicking on a file in the file manager, ensures that only
5+
one copy of PortaBase is open, and prevents PortaBase from crashing shortly
6+
after being launched from the menu.
7+
8+
Moved the "None" date button from the row editor to the date picker dialog,
9+
allowing long dates to fit comfortably even on smaller screens. Fixed a
10+
recently-introduced bug in the toggling of column sorting directions. Use
11+
space more efficiently for dialog buttons on Diablo. Clean up files in the
12+
recently used list after they're discovered to no longer exist. Added an
13+
import toolbar button. Hide the redundant new/open/import buttons on Maemo
14+
once there's a recent files list, in order to save screen space. Alternate
15+
row shading in the row viewer, and kinetic scrolling for it in Fremantle.
16+
Use screen space a little more efficiently in the Maemo version of the view
17+
editor dialog. Made image icons in the data table a little bigger for
18+
Maemo. Prepared a few files for the upcoming beta release.
19+
120
2010-04-29 JMB More Fremantle improvements, added some help text
221

322
Fixed the height of several widgets so they look correct on Fremantle.

README.txt

Lines changed: 41 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
PortaBase 1.9 (March 2004)
2-
---------------------------
3-
PortaBase (portable database) is a personal database application originally
4-
written for the Linux-based models of Sharp Zaurus PDA (and should work on
5-
any other Linux PDA using the Qtopia environment.) It can now also be
6-
run as a Linux, Mac OS X, or Windows desktop application.
1+
PortaBase 2.0 beta 1 (May 2010)
2+
-------------------------------
3+
PortaBase (portable database) is a program for conveniently managing one-table
4+
database files. It is available for many platforms, including Linux, Mac OS X,
5+
Windows, and Maemo (Diablo and Fremantle).
76

87
The main features PortaBase currently has are:
98
- One data table per file
@@ -14,7 +13,7 @@ The main features PortaBase currently has are:
1413
- Filter the displayed rows using sets of conditions
1514
- Sort the rows by any combination of columns, each in ascending or descending
1615
order
17-
- Page navigation buttons, with a custom number of rows per page
16+
- Optional page navigation buttons, with a custom number of rows per page
1817
- Add, delete, rearrange, and rename columns at any time
1918
- Specify default values for columns
2019
- View summary statistics for columns (total, average, min, max, etc.)
@@ -24,30 +23,31 @@ The main features PortaBase currently has are:
2423
from MobileDB)
2524
- Data file encryption
2625
- Unicode support
27-
- Pick any available font to use throughout the application
28-
- User-specified alternating row background colors
26+
- Pick any available font to use throughout the application (except on
27+
Mac OS X)
28+
- User-specified alternating row background colors (except on Fremantle)
2929
- Simple calculator widget for entering numeric data
30-
- Customizable menu and toolbar configuration
3130

32-
See the help file (help/html/portabase.html) for more information on features
33-
and usage. This help file is also the online help for the application,
34-
available by clicking the "?" button at the top right of any screen in
35-
PortaBase for the Zaurus, or Help->Help Contents in desktop PortaBase.
31+
See the application's help dialog for more information on features and usage.
3632

37-
Zaurus Upgrades
38-
---------------
39-
To upgrade from a previous version of PortaBase, do the following:
40-
41-
1) uninstall libmetakit1 (if upgrading from 1.5 or earlier) and portabase
42-
(your data files will be left alone)
43-
2) install the new portabase .ipk file
44-
3) delete the .ipk file (you don't have to, but it frees up space)
33+
Note for Zaurus Users
34+
---------------------
35+
The complete lack of new releases of Qt or Qtopia for the Zaurus has made it
36+
impractical to continue developing for it; every single feature would need to
37+
be implemented separately for two different codebases. However, there are no
38+
file format changes for PortaBase 2.0; files can still be moved freely between
39+
the new release and PortaBase 1.9 on the Zaurus. A future PortaBase 2.1
40+
release is likely to end this compatibility, however. Maemo (as used on the
41+
Nokia N810 and N900) is recommended for people who want to continue using
42+
PortaBase on a pocketable device. Ports to Windows Mobile, Symbian S60,
43+
and/or webOS may be forthcoming as well.
4544

46-
IMPORTANT NOTE: Metakit is no longer installed as a separate library.
47-
PortaBase now also uses the BeeCrypt and libjpeg libraries, and installing
48-
each library separately makes things more complicated than most people
49-
would prefer. All these libraries are now compiled into the PortaBase
50-
executable.
45+
Maemo Installation
46+
------------------
47+
PortaBase is being submitted to the extras-devel repository, you should be
48+
able to download and install it from there. In time, it should make its way
49+
to the extras-testing and extras repositories as well, for users who are a
50+
little less adventurous.
5151

5252
Windows Installation and Upgrades
5353
---------------------------------
@@ -57,27 +57,26 @@ just follow the directions.
5757
Mac OS X Installation
5858
---------------------
5959
Extract the application bundle from the downloaded archive and put it where
60-
you want it.
60+
you want it (usually your Applications folder).
6161

6262
Technical Info and Acknowledgements
6363
-----------------------------------
64-
PortaBase is written in C++, using the Qt and Qtopia libraries for GUI widgets,
65-
data structures, and communication with the PDA environment. It also uses:
66-
- the Metakit (http://www.equi4.com/metakit) embedded database library for data
67-
storage and manipulation
68-
- an enhanced version of the QtaDatePicker widget developed by John McDonald,
69-
available from http://prdownloads.sourceforge.net/zaurus/
64+
PortaBase is written in C++, using the Qt 4 library for GUI widgets, data
65+
structures, and communication with the operating system. It also uses:
66+
67+
- The Metakit (http://www.equi4.com/metakit) embedded database library for data
68+
storage and manipulation
69+
- The Randomkit library (http://js2007.free.fr/code/index.html#RandomKit) for
70+
cryptographic-strength random number generation
71+
- The Color Picker Qt Solution
72+
(http://qt.nokia.com/products/appdev/add-on-products/catalog/4/Widgets/qtcolorpicker)
7073
- MobileDB import code based on code from ZReader
71-
(http://www.codecubed.com/zreader/index.html)
74+
(http://www.killefiz.de/zaurus/showdetail.php?app=751)
7275
- CSV import code based on code from KSpread (http://www.koffice.org/kspread/)
73-
- the BeeCrypt library (http://www.virtualunlimited.com/products/beecrypt/)
74-
for encryption algorithms and good random number generation
75-
- the color picker dialog from HTML@Zaurus
76-
(http://www.codefactor.de/htmlAtZaurus.html), itself based on Qt's QColorDialog
76+
- Blowfish block cipher code based on the BeeCrypt library
77+
(http://beecrypt.sourceforge.net/)
7778
- a modified version of the calculator widget from KMyMoney2
78-
(http://kmymoney2.sourceforge.net/)
79-
- libjpeg (http://www.ijg.org) for efficient loading and manipulation of JPEG
80-
image files
79+
(http://kmymoney2.sourceforge.net/)
8180

8281
License
8382
-------

datedialog.cpp

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* datedialog.cpp
33
*
4-
* (c) 2009 by Jeremy Bowman <[email protected]>
4+
* (c) 2009-2010 by Jeremy Bowman <[email protected]>
55
*
66
* This program is free software; you can redistribute it and/or modify
77
* it under the terms of the GNU General Public License as published by
@@ -29,12 +29,15 @@
2929
* @param parent This dialog's parent widget
3030
*/
3131
DateDialog::DateDialog(const QDate &date, QWidget *parent)
32-
: PBDialog(tr("Select a date"), parent)
32+
: PBDialog(tr("Select a date"), parent), noneSelected(false)
3333
{
3434
if (!date.isValid()) {
3535
reject();
3636
}
3737
calendar = new QCalendarWidget(this);
38+
#if defined(Q_WS_MAEMO_5)
39+
calendar->setStyleSheet("alternate-background-color: darkblue");
40+
#endif
3841
// date limits are for backwards compatibility
3942
calendar->setMinimumDate(QDate(1752, 9, 15));
4043
calendar->setMaximumDate(QDate(7000, 12, 31));
@@ -54,6 +57,9 @@ DateDialog::DateDialog(const QDate &date, QWidget *parent)
5457
QPushButton *todayButton = new QPushButton(tr("Today"));
5558
buttonBox->addButton(todayButton, QDialogButtonBox::ActionRole);
5659
connect(todayButton, SIGNAL(clicked()), this, SLOT(gotoToday()));
60+
QPushButton *noneButton = new QPushButton(tr("None"));
61+
buttonBox->addButton(noneButton, QDialogButtonBox::ActionRole);
62+
connect(noneButton, SIGNAL(clicked()), this, SLOT(selectNone()));
5763
}
5864

5965
/**
@@ -63,7 +69,12 @@ DateDialog::DateDialog(const QDate &date, QWidget *parent)
6369
*/
6470
QDate DateDialog::selectedDate()
6571
{
66-
return calendar->selectedDate();
72+
if (noneSelected) {
73+
return QDate(1752, 9, 14);
74+
}
75+
else {
76+
return calendar->selectedDate();
77+
}
6778
}
6879

6980
/**
@@ -74,3 +85,13 @@ void DateDialog::gotoToday()
7485
{
7586
calendar->setSelectedDate(QDate::currentDate());
7687
}
88+
89+
/**
90+
* Select the "None" date and close the dialog. Called when the "None" button
91+
* is clicked.
92+
*/
93+
void DateDialog::selectNone()
94+
{
95+
noneSelected = true;
96+
accept();
97+
}

datedialog.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* datedialog.h
33
*
4-
* (c) 2009 by Jeremy Bowman <[email protected]>
4+
* (c) 2009-2010 by Jeremy Bowman <[email protected]>
55
*
66
* This program is free software; you can redistribute it and/or modify
77
* it under the terms of the GNU General Public License as published by
@@ -34,10 +34,12 @@ class DateDialog: public PBDialog
3434
QDate selectedDate();
3535

3636
private slots:
37-
void gotoToday(); /**< Today' button handler */
37+
void gotoToday(); /**< 'Today' button handler */
38+
void selectNone(); /**< 'None' button handler */
3839

3940
private:
4041
QCalendarWidget *calendar; /**< Calendar display widget */
42+
bool noneSelected; /**< True if the 'None' button was clicked */
4143
};
4244

4345
#endif

datewidget.cpp

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,8 @@ DateWidget::DateWidget(QWidget *parent)
3939
layout->addWidget(button);
4040

4141
display = new QLabel(toString(dateObj), this);
42-
display->setAlignment(Qt::AlignCenter);
42+
display->setAlignment(Qt::AlignLeft | Qt::AlignVCenter);
4343
layout->addWidget(display, 1);
44-
45-
noneButton = new QPushButton(tr("None"), this);
46-
connect(noneButton, SIGNAL(clicked()), this, SLOT(setToNone()));
47-
layout->addWidget(noneButton);
4844
}
4945

5046
/**
@@ -96,11 +92,10 @@ void DateWidget::updateDisplay()
9692
{
9793
if (isNoneDate(dateObj)) {
9894
display->setText(" ");
99-
noneButton->setEnabled(false);
10095
}
10196
else {
102-
display->setText(toString(dateObj));
103-
noneButton->setEnabled(true);
97+
QString text(" %1");
98+
display->setText(text.arg(toString(dateObj)));
10499
}
105100
}
106101

@@ -136,16 +131,6 @@ bool DateWidget::isNoneDate(const QDate &date)
136131
return (date.year() == 1752 && date.month() == 9 && date.day() == 14);
137132
}
138133

139-
/**
140-
* Set the selected date to the special "None" value (the first day supported
141-
* in earlier versions of QDate). Called when the "None" button is clicked.
142-
*/
143-
void DateWidget::setToNone()
144-
{
145-
dateObj.setYMD(1752, 9, 14);
146-
updateDisplay();
147-
}
148-
149134
/**
150135
* Launches a DateDialog which is preset to the currently selected date,
151136
* and uses the new selection from the dialog as the new date selection if

datewidget.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ class QPushButton;
2525

2626
/**
2727
* A widget for selecting and displaying a single date. It consists of a
28-
* row of sub-widgets: a button which launches a date selection dialog,
29-
* a text label showing the currently selected date, and a button to reset
30-
* the date selection to "None" (blank). Used by CalcDateEditor,
28+
* row of sub-widgets: a text label showing the currently selected date and a
29+
* button which launches a date selection dialog. Used by CalcDateEditor,
3130
* ConditionEditor, and RowEditor.
3231
* <p>
3332
* Note that some of this class's methods use an integer representation for
@@ -47,7 +46,6 @@ class DateWidget: public QWidget
4746

4847
private slots:
4948
void launchSelector();
50-
void setToNone();
5149

5250
private:
5351
bool isNoneDate(const QDate &date);
@@ -57,7 +55,6 @@ private slots:
5755
private:
5856
QDate dateObj; /**< The date currently being shown */
5957
QLabel *display; /**< The text label showing the date */
60-
QPushButton *noneButton; /**< Button to set the date to "None" */
6158
};
6259

6360
#endif

dbeditor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ DBEditor::DBEditor(QWidget *parent)
4040
{
4141
stack = new QStackedWidget(this);
4242
vbox->addWidget(stack, 1);
43-
QString text("<center>%1<br>%2</center>");
43+
QString text("<center>%1<br><br>%2</center>");
4444
text = text.arg(tr("No columns defined"));
4545
text = text.arg(tr("Press the \"Add\" button to create one"));
4646
noColumns = new QLabel(text, stack);

debian/changelog

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
portabase (2.0-1) unstable; urgency=low
1+
portabase (2.0~beta1-1) unstable; urgency=low
22

33
* New upstream version
44

5-
-- Jeremy Bowman <[email protected]> Wed, 21 Apr 2010 09:45:33 -0500
5+
-- Jeremy Bowman <[email protected]> Wed, 29 Apr 2010 09:45:33 -0500
66

77
portabase (1.9-1) unstable; urgency=low
88

enumeditor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ EnumEditor::EnumEditor(QWidget *parent)
6161

6262
stack = new QStackedWidget(this);
6363
vbox->addWidget(stack, 1);
64-
QString text("<center>%1<br>%2<br>%3</center>");
64+
QString text("<center>%1<br><br>%2</center>");
6565
text = text.arg(tr("No options defined for this enumeration type"));
66-
text = text.arg(tr("Press the \"Add\" button to create one, or press"));
67-
text = text.arg(tr("the \"Import\" button to load lines from a text file"));
66+
QString extraText = tr("Press the \"Add\" button to create one, or press\nthe \"Import\" button to load lines from a text file");
67+
text = text.arg(extraText.replace("\n", "<br>"));
6868
noOptions = new QLabel(text, stack);
6969
stack->addWidget(noOptions);
7070

enummanager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ EnumManager::EnumManager(Database *dbase, QWidget *parent)
3737
{
3838
stack = new QStackedWidget(this);
3939
vbox->addWidget(stack, 1);
40-
QString text("<center>%1<br>%2</center>");
40+
QString text("<center>%1<br><br>%2</center>");
4141
text = text.arg(tr("No enumerated column types defined"));
4242
text = text.arg(tr("Press the \"Add\" button to create one"));
4343
noEnums = new QLabel(text, stack);

0 commit comments

Comments
 (0)