# HG changeset patch # User hh150184 # Date 1149580929 0 # Node ID 609397372f4004c264765cdb205e75b9fa7e85e5 # Parent dd6bce4363fba0c9ae6f88a720f0e59db74e9315 * gnome-pilot.spec: Add build depend for gob2. * gob2.spec: New module for GOB. * patches/gnome-pilot-01-all-in-one.diff, patches/gnome-pilot-01-configure-in.diff, patches/gnome-pilot-02-all-in-one.diff, patches/gnome-pilot-02-pilot-link-version.diff, patches/gnome-pilot-03-capplet-install.diff, patches/gnome-pilot-03-pilot-link-version.diff, patches/gnome-pilot-04-capplet-install.diff: Remove patch gnome-pilot-01-configure-in.diff and reorder. * Solaris/SUNWgnome-pilot.spec: Add build depend for SUNWgob2. * Solaris/SUNWgob2.spec: New module. diff -r dd6bce4363fb -r 609397372f40 ChangeLog --- a/ChangeLog Tue Jun 06 05:46:05 2006 +0000 +++ b/ChangeLog Tue Jun 06 08:02:09 2006 +0000 @@ -1,3 +1,16 @@ +2006-06-06 Halton Huo + + * gnome-pilot.spec: Add build depend for gob2. + * gob2.spec: New module for GOB. + * patches/gnome-pilot-01-all-in-one.diff, + patches/gnome-pilot-01-configure-in.diff, + patches/gnome-pilot-02-all-in-one.diff, + patches/gnome-pilot-02-pilot-link-version.diff, + patches/gnome-pilot-03-capplet-install.diff, + patches/gnome-pilot-03-pilot-link-version.diff, + patches/gnome-pilot-04-capplet-install.diff: + Remove patch gnome-pilot-01-configure-in.diff and reorder. + 2006-06-06 Brian Cameron * gdm.spec, patches/gdm-01-branding-defaults-solaris.diff, diff -r dd6bce4363fb -r 609397372f40 Solaris/ChangeLog --- a/Solaris/ChangeLog Tue Jun 06 05:46:05 2006 +0000 +++ b/Solaris/ChangeLog Tue Jun 06 08:02:09 2006 +0000 @@ -1,3 +1,8 @@ +2006-06-06 Halton Huo + + * SUNWgnome-pilot.spec: Add build depend for SUNWgob2. + * SUNWgob2.spec: New module. + 2006-06-06 Glynn Foster * patches/printman-01-menu-entry.diff: Update tooltip. diff -r dd6bce4363fb -r 609397372f40 Solaris/SUNWgnome-pilot.spec --- a/Solaris/SUNWgnome-pilot.spec Tue Jun 06 05:46:05 2006 +0000 +++ b/Solaris/SUNWgnome-pilot.spec Tue Jun 06 08:02:09 2006 +0000 @@ -46,6 +46,7 @@ BuildRequires: SUNWgnome-vfs-devel BuildRequires: SUNWpltlk BuildRequires: SUNWsfwhea +BuildRequires: SUNWgob2 BuildConflicts: SUNWgnome-pilot-link BuildConflicts: SUNWgnome-pilot-link-root BuildConflicts: SUNWgnome-pilot-link-share @@ -196,6 +197,8 @@ %defattr (-, root, other) %changelog +* Tue Jun 06 2006 - halton.huo@sun.com +- Add build depend SUNWgob2. * Fri Jun 2 2006 - laca@sun.com - use post/preun scripts to install schemas into the merged gconf files * Thu Jun 01 2006 - damien.carbery@sun.com diff -r dd6bce4363fb -r 609397372f40 Solaris/SUNWgob2.spec --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Solaris/SUNWgob2.spec Tue Jun 06 08:02:09 2006 +0000 @@ -0,0 +1,60 @@ +# +# spec file for package SUNWgob2 +# +# includes module(s): gob2 +# +# Copyright (c) 2004 Sun Microsystems, Inc. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# + +%include Solaris.inc +%use gob2 = gob2.spec + +Name: SUNWgob2 +Summary: %{gob2.summary} +Version: %{gob2.version} +SUNW_BaseDir: %{_prefix} +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%include default-depend.inc +Requires: SUNWlibC +Requires: SUNWlibms +Requires: SUNWlibmsr + +%prep +rm -rf %name-%version +mkdir -p %name-%version +%gob2.prep -d %name-%version + +%build +export CXX="$CXX -norunpath" +export CFLAGS="%optflags" +export LDFLAGS="%_ldflags -lCrun -lm" +export CXXFLAGS="%cxx_optflags -staticlib=stlport4" +export MSGFMT="/usr/bin/msgfmt" +%gob2.build -d %name-%version + +%install +%gob2.install -d %name-%version + +%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT} + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr (-, root, bin) +%dir %attr (0755, root, bin) %{_bindir} +%{_bindir}/* +%dir %attr(0755, root, bin) %{_mandir} +%dir %attr(0755, root, bin) %{_mandir}/* +%{_mandir}/*/* +%defattr (-, root, other) +%dir %attr(0755, root, sys) %{_datadir} +%dir %attr(0755, root, other) %{_datadir}/aclocal +%{_datadir}/aclocal/* + +%changelog +* Tue Jun 06 2006 - halton.huo@sun.com +- Initial version created. + diff -r dd6bce4363fb -r 609397372f40 gnome-pilot.spec --- a/gnome-pilot.spec Tue Jun 06 05:46:05 2006 +0000 +++ b/gnome-pilot.spec Tue Jun 06 08:02:09 2006 +0000 @@ -16,10 +16,9 @@ Source: http://ftp.gnome.org/pub/GNOME/sources/%{name}/2.0/%{name}-%{version}.tar.bz2 Source1: gpilot-install-file.1.gz Source2: gpilotd-control-applet.1.gz -Patch1: gnome-pilot-01-configure-in.diff -Patch2: gnome-pilot-02-all-in-one.diff -Patch3: gnome-pilot-03-pilot-link-version.diff -Patch4: gnome-pilot-04-capplet-install.diff +Patch1: gnome-pilot-01-all-in-one.diff +Patch2: gnome-pilot-02-pilot-link-version.diff +Patch3: gnome-pilot-03-capplet-install.diff URL: http://ftp.gnome.org/pub/GNOME/sources/gnome-pilot BuildRoot: %{_tmppath}/%{name}-%{version}-root Docdir: %{_defaultdocdir}/gnome-pilot @@ -56,7 +55,6 @@ %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch4 -p1 %build %ifos linux @@ -142,6 +140,10 @@ %{_libdir}/*.so %changelog +* Tue Jun 06 2006 - halton.huo@sun.com +- Remove patch gnome-pilot-01-configure-in.diff and reorder, + build require gob2. + * Mon Mar 20 2006 - glynn.foster@sun.com - Install capplet in the right directory - #313203 diff -r dd6bce4363fb -r 609397372f40 gob2.spec --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gob2.spec Tue Jun 06 08:02:09 2006 +0000 @@ -0,0 +1,78 @@ +# +# spec file for package gob2 +# +# Copyright (c) 2005 Sun Microsystems, Inc. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +Name: gob2 +License: GPL +Group: Development/Libraries/GNOME +Version: 2.0.14 +Release: 1 +Distribution: java-desktop-system +Vendor: Sun Microsystems, Inc. +Summary: GOB2, The GObject Builder +Source: http://ftp.gnome.org/pub/GNOME/sources/%{name}/2.0/%{name}-%{version}.tar.bz2 +Url: http://www.5z.com/jirka/gob.html +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Docdir: %{_defaultdocdir}/doc +Autoreqprov: on +Prereq: /sbin/ldconfig + +%description +GOB is a simple preprocessor for making GObject objects (glib objects). +It makes objects from a single file which has inline C code so that +you don't have to edit the generated files. Syntax is somewhat inspired +by java and yacc. It supports generating C++ code + +%prep +%setup -q + +%build + +%ifos linux +if [ -x /usr/bin/getconf ]; then + CPUS=`getconf _NPROCESSORS_ONLN` +fi +%else + CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '` +%endif +if test "x$CPUS" = "x" -o $CPUS = 0; then + CPUS=1 +fi + +aclocal $ACLOCAL_FLAGS +libtoolize --force +glib-gettextize --force --copy +intltoolize --force --automake +autoheader +automake -a -f -c --gnu +autoconf +./configure --prefix=%{_prefix} \ + --bindir=%{_bindir} \ + --mandir=%{_mandir} + +make -j$CPUS + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT mkdir_p="mkdir -p" +find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';' +find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';' + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-, root, root) +%doc README AUTHORS COPYING NEWS TODO ChangeLog +%doc examples +%{_bindir}/* +%{_mandir}/man1/* +%{_datadir}/aclocal/* + +%changelog +* Tue Jun 06 2006 - halton.huo@sun.com +- Initial version created. + diff -r dd6bce4363fb -r 609397372f40 patches/gnome-pilot-01-all-in-one.diff --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/gnome-pilot-01-all-in-one.diff Tue Jun 06 08:02:09 2006 +0000 @@ -0,0 +1,2791 @@ +diff -u -r gnome-pilot-2.0.13/ChangeLog ../sun/gnome-pilot/ChangeLog +--- gnome-pilot-2.0.13/ChangeLog 2005-04-09 12:29:56.000000000 +0800 ++++ ../sun/gnome-pilot/ChangeLog 2005-12-16 10:58:42.479709000 +0800 +@@ -1,3 +1,77 @@ ++2005-12-15 Calvin Liu ++ ++ Fix bug 6354707 ++ * capplet/gpilotd-capplet.glade, add accessible name ++ ++2005-12-15 Calvin Liu ++ ++ Fix bug 6354682, 6354711 ++ * conduits/backup/backup_conduit.c, add mnemonic names ++ ++2005-11-21 Calvin Liu ++ ++ Fix bug 6338059, together with patch for bug 6338086, 6338096. ++ * capplet/gpilotd-capplet.glade ++ * capplet/gnome-pilot-druid.c ++ ++2005-11-16 Calvin Liu ++ ++ Fix bug 6338086, 6338096, change labels in glade files. ++ * applet/pilot-applet.glade ++ * capplet/gpilotd-capplet.glade ++ ++2005-11-15 Jijun Yu ++ * capplet/util.c: add a device type to check when checking device ++ settings ++ ++2005-11-15 Jijun Yu ++ * gpilotd/gnome-pilot-structures.h: add two members to a structure ++ * gpilotd/gnome-pilot-structures.c: free the allocated memory for ++ the added member in a structure ++ * capplet/util.c: add two function definitions ++ * capplet/gnome-pilot-ddialog.c: restore the original value when ++ checking that device settings are invalid ++ ++2005-11-10 Jijun Yu ++ * conduits/backup/backup_conduit.h: add a member to a structure ++ * conduits/backup/backup_conduit.c: restore the original value when ++ checking that an invalid backup directory is set ++ ++2005-11-10 Jijun Yu ++ * gpilotd/gnome-pilot-structures.h: add a member to a structure ++ * capplet/util.h: change the type of a function from void to gboolean ++ * capplet/util.c: add two function definitions ++ * capplet/gnome-pilot-pdialog.c: restore the original value when ++ checking that an invalid base directory is set ++ ++2005-10-28 Jijun Yu ++ * conduits/backup/backup_conduit.c: include the definition of ++ ENABLE_NLS ++ ++2005-10-28 Jijun Yu ++ * configure.in : support a language 'zh_HK' ++ * intltool-update.in : add conduits specific ++ * po/POTFILES.in: support i18n for conduits ++ * conduits/backup/backup.conduit.in : support i18n for the ++ description of backup conduit ++ * conduits/file/file.conduit.in : support i18n for the description ++ of file conduit ++ * conduits/test/test.conduit.in : suppot i18n for the description ++ of test conduit ++ ++2005-10-24 Jijun Yu ++ * capplet/gnome-pilot-ddialog.c : modify the save type of the ++ modified settings after a Error message in Pilot Settings -> ++ Device Settings ++ ++2005-10-21 Jijun Yu ++ ++ * capplet/gnome-pilot-druid.c : change the default type to "USB" ++ * capplet/util.c : change the default port to "usb:" ++ * capplet/gpilotd-capplet.glade : add a new lable "usb:" ++ in port list ++ ++ + 2005-04-09 JP Rosevear + + * configure.in: bump version +diff -u -r gnome-pilot-2.0.13/applet/Makefile.am ../sun/gnome-pilot/applet/Makefile.am +--- gnome-pilot-2.0.13/applet/Makefile.am 2005-04-09 12:13:01.000000000 +0800 ++++ ../sun/gnome-pilot/applet/Makefile.am 2005-08-12 18:10:14.000000000 +0800 +@@ -15,7 +15,8 @@ + $(NULL) + + %.c %.h: %.gob +- $(GOB2) --always-private-header -w $< ++ if test $(GOB2) != "no" ; then \ ++ $(GOB2) --always-private-header -w $< ; fi + + gpilot_applet_SOURCES = \ + $(GOB_BUILT_SRCS) \ +diff -u -r gnome-pilot-2.0.13/applet/Makefile.in ../sun/gnome-pilot/applet/Makefile.in +--- gnome-pilot-2.0.13/applet/Makefile.in 2005-04-09 12:15:02.000000000 +0800 ++++ ../sun/gnome-pilot/applet/Makefile.in 2005-08-12 18:10:14.000000000 +0800 +@@ -672,7 +672,9 @@ + + + %.c %.h: %.gob +- $(GOB2) --always-private-header -w $< ++ if test $(GOB2) != "no" ; then \ ++ $(GOB2) --always-private-header -w $< ; fi ++ + $(server_in_files:.server.in.in=.server.in): $(server_in_files) + sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" $< > $@ + +diff -u -r gnome-pilot-2.0.13/applet/pilot-applet.glade ../sun/gnome-pilot/applet/pilot-applet.glade +--- gnome-pilot-2.0.13/applet/pilot-applet.glade 2005-03-27 12:31:35.000000000 +0800 ++++ ../sun/gnome-pilot/applet/pilot-applet.glade 2005-11-16 11:00:32.000000000 +0800 +@@ -10,6 +10,12 @@ + False + True + False ++ True ++ False ++ False ++ GDK_WINDOW_TYPE_HINT_DIALOG ++ GDK_GRAVITY_NORTH_WEST ++ True + True + + +@@ -31,6 +37,7 @@ + gtk-ok + True + GTK_RELIEF_NORMAL ++ True + 0 + + +@@ -43,6 +50,7 @@ + gtk-cancel + True + GTK_RELIEF_NORMAL ++ True + 0 + + +@@ -89,6 +97,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + label_item +@@ -114,6 +126,12 @@ + 500 + True + False ++ True ++ False ++ False ++ GDK_WINDOW_TYPE_HINT_DIALOG ++ GDK_GRAVITY_NORTH_WEST ++ True + True + + +@@ -135,6 +153,7 @@ + gtk-cancel + True + GTK_RELIEF_NORMAL ++ True + 0 + + +@@ -167,6 +186,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -180,7 +203,8 @@ + True + GTK_PROGRESS_LEFT_TO_RIGHT + 0 +- 0.1 ++ 0.10000000149 ++ PANGO_ELLIPSIZE_NONE + + + 0 +@@ -194,7 +218,8 @@ + True + GTK_PROGRESS_LEFT_TO_RIGHT + 0 +- 0.1 ++ 0.10000000149 ++ PANGO_ELLIPSIZE_NONE + + + 0 +@@ -221,6 +246,8 @@ + True + True + False ++ False ++ True + GTK_JUSTIFY_LEFT + GTK_WRAP_WORD + True +@@ -261,6 +288,12 @@ + False + True + False ++ True ++ False ++ False ++ GDK_WINDOW_TYPE_HINT_DIALOG ++ GDK_GRAVITY_NORTH_WEST ++ True + True + + +@@ -282,6 +315,7 @@ + gtk-ok + True + GTK_RELIEF_NORMAL ++ True + -5 + + +@@ -294,6 +328,7 @@ + gtk-cancel + True + GTK_RELIEF_NORMAL ++ True + -6 + + +@@ -326,8 +361,8 @@ + + + True +- Directory +- False ++ _Directory ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -336,6 +371,11 @@ + 0.5 + 0 + 0 ++ dir_entry ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -351,8 +391,8 @@ + + True + False +- Pilot ID +- False ++ _Pilot ID ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -361,6 +401,11 @@ + 0.5 + 0 + 0 ++ pilotid_entry ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -375,8 +420,8 @@ + + + True +- Sync cradle +- False ++ _Sync cradle ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -385,6 +430,11 @@ + 0.5 + 0 + 0 ++ device_menu ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -405,7 +455,7 @@ + 0 + + True +- * ++ * + False + + +@@ -427,7 +477,7 @@ + 0 + + True +- * ++ * + False + + +@@ -481,6 +531,12 @@ + False + True + False ++ True ++ False ++ False ++ GDK_WINDOW_TYPE_HINT_DIALOG ++ GDK_GRAVITY_NORTH_WEST ++ True + True + + +@@ -493,6 +549,7 @@ + + True + GTK_BUTTONBOX_END ++ + + + True +@@ -501,11 +558,11 @@ + gtk-help + True + GTK_RELIEF_NORMAL ++ True + -11 + + + +- + + + True +@@ -514,6 +571,7 @@ + gtk-close + True + GTK_RELIEF_NORMAL ++ True + -7 + + +@@ -539,8 +597,8 @@ + + + True +- Execute when clicked +- False ++ _Execute when clicked ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -549,6 +607,11 @@ + 0.5 + 0 + 0 ++ exec_entry ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -563,8 +626,8 @@ + + + True +- Display notices +- False ++ _Display notices ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -573,6 +636,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -593,7 +660,7 @@ + 0 + + True +- * ++ * + False + + +@@ -609,6 +676,7 @@ + + True + GTK_RELIEF_NORMAL ++ True + False + False + True +diff -u -r gnome-pilot-2.0.13/capplet/gnome-pilot-ddialog.c ../sun/gnome-pilot/capplet/gnome-pilot-ddialog.c +--- gnome-pilot-2.0.13/capplet/gnome-pilot-ddialog.c 2004-07-08 21:20:15.000000000 +0800 ++++ ../sun/gnome-pilot/capplet/gnome-pilot-ddialog.c 2005-11-15 19:02:03.000000000 +0800 +@@ -126,7 +126,6 @@ + ; + } + +- + + GtkObject * + gnome_pilot_ddialog_new (GPilotDevice *device) +@@ -230,6 +229,8 @@ + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->device_network), + priv->device->type == PILOT_DEVICE_NETWORK); + } ++ ++ backup_old_device_config (priv->device); + } + + gboolean +@@ -242,15 +243,30 @@ + + gnome_dialog_set_parent (GNOME_DIALOG (priv->dialog), parent); + btn = gnome_dialog_run (GNOME_DIALOG (priv->dialog)); +- +- if (btn == 0) ++ ++ if (btn == 0){ + read_device_config (GTK_OBJECT (gpdd), priv->device); +- +- gnome_dialog_close (GNOME_DIALOG (priv->dialog)); ++ gnome_dialog_close (GNOME_DIALOG (priv->dialog)); + +- if (btn == 0) +- check_device_settings (priv->device); ++ while(!check_device_settings (priv->device)){ ++ restore_old_device_config (priv->device); ++ gtk_entry_set_text (GTK_ENTRY (priv->device_port), priv->device->port); ++ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->device_serial), priv->device->type == PILOT_DEVICE_SERIAL); ++ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->device_usb), priv->device->type == PILOT_DEVICE_USB_VISOR); ++ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->device_irda), priv->device->type == PILOT_DEVICE_IRDA); ++ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->device_network), priv->device->type == PILOT_DEVICE_NETWORK); ++ ++ btn = gnome_dialog_run (GNOME_DIALOG (priv->dialog)); ++ if(btn){ ++ break; ++ } else { ++ read_device_config (GTK_OBJECT (gpdd), priv->device); ++ gnome_dialog_close (GNOME_DIALOG (priv->dialog)); ++ } ++ } ++ } + ++ gnome_dialog_close (GNOME_DIALOG (priv->dialog)); + return btn == 0 ? TRUE : FALSE; + } + +diff -u -r gnome-pilot-2.0.13/capplet/gnome-pilot-druid.c ../sun/gnome-pilot/capplet/gnome-pilot-druid.c +--- gnome-pilot-2.0.13/capplet/gnome-pilot-druid.c 2005-03-29 01:33:04.000000000 +0800 ++++ ../sun/gnome-pilot/capplet/gnome-pilot-druid.c 2005-11-21 16:11:17.000000000 +0800 +@@ -224,18 +224,21 @@ + priv->page_conduits = GW ("druidpage_conduits"); + priv->page_finish = GW ("druidpage_finish"); + +- priv->device_name = GW ("device_name_entry"); +- priv->device_port = GW ("device_port_entry"); +- priv->device_speed = GW ("device_speed_menu"); ++ priv->device_name = GW ("device_name_entry_druid"); ++ priv->device_port = GW ("device_port_entry_druid"); ++ priv->device_speed = GW ("device_speed_menu_druid"); + priv->device_timeout = GW ("device_timeout_spinner"); + priv->device_usb = GW ("usb_radio"); ++ ++ gtk_toggle_button_set_active ((GtkToggleButton *)priv->device_usb, TRUE); ++ + priv->device_irda = GW ("irda_radio"); + priv->device_network = GW ("network_radio"); + + priv->pilot_info = GW ("pilot_user_frame"); + priv->pilot_info_no = GW ("no_radio_button"); +- priv->pilot_username = GW ("pilot_username_entry"); +- priv->pilot_id = GW ("pilot_id_entry"); ++ priv->pilot_username = GW ("pilot_username_entry_druid"); ++ priv->pilot_id = GW ("pilot_id_entry_druid"); + + /* FIXME: is this a libglade bug or what? if sync_label + is constructed in .glade it is not properly redrawn the first time. */ +diff -u -r gnome-pilot-2.0.13/capplet/gnome-pilot-pdialog.c ../sun/gnome-pilot/capplet/gnome-pilot-pdialog.c +--- gnome-pilot-2.0.13/capplet/gnome-pilot-pdialog.c 2004-09-04 00:09:23.000000000 +0800 ++++ ../sun/gnome-pilot/capplet/gnome-pilot-pdialog.c 2005-11-10 16:16:02.000000000 +0800 +@@ -148,7 +148,6 @@ + ; + } + +- + + GtkObject * + gnome_pilot_pdialog_new (GnomePilotClient *gpc, PilotState *state, GPilotPilot *pilot) +@@ -268,10 +267,19 @@ + priv = gppd->priv; + + gnome_dialog_set_parent (GNOME_DIALOG (priv->dialog), parent); ++ backup_old_basedir (priv->pilot); + btn = gnome_dialog_run (GNOME_DIALOG (priv->dialog)); + +- if (btn == 0) +- read_pilot_config (GTK_OBJECT (gppd), priv->pilot); ++ if (btn == 0){ ++ while(!read_pilot_config (GTK_OBJECT (gppd), priv->pilot)){ ++ btn = gnome_dialog_run (GNOME_DIALOG (priv->dialog)); ++ if (btn){ ++ restore_old_basedir (priv->pilot); ++ break; ++ } ++ } ++ } ++ + + gnome_dialog_close (GNOME_DIALOG (priv->dialog)); + +diff -u -r gnome-pilot-2.0.13/capplet/gpilotd-capplet.glade ../sun/gnome-pilot/capplet/gpilotd-capplet.glade +--- gnome-pilot-2.0.13/capplet/gpilotd-capplet.glade 2003-05-06 03:50:20.000000000 +0800 ++++ ../sun/gnome-pilot/capplet/gpilotd-capplet.glade 2005-12-15 20:37:55.145079000 +0800 +@@ -11,6 +11,12 @@ + False + True + False ++ True ++ False ++ False ++ GDK_WINDOW_TYPE_HINT_NORMAL ++ GDK_GRAVITY_NORTH_WEST ++ True + + + +@@ -55,9 +61,10 @@ + True + True + True +- Add... ++ _Add... + True + GTK_RELIEF_NORMAL ++ True + + + +@@ -66,9 +73,10 @@ + True + True + True +- Edit... ++ _Edit... + True + GTK_RELIEF_NORMAL ++ True + + + +@@ -77,9 +85,10 @@ + True + True + True +- Delete ++ De_lete + True + GTK_RELIEF_NORMAL ++ True + + + +@@ -99,8 +108,8 @@ + + + True +- Pilots +- False ++ _Pilots ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -109,6 +118,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + tab +@@ -148,9 +161,10 @@ + True + True + True +- Add... ++ _Add... + True + GTK_RELIEF_NORMAL ++ True + + + +@@ -159,9 +173,10 @@ + True + True + True +- Edit... ++ _Edit... + True + GTK_RELIEF_NORMAL ++ True + + + +@@ -170,9 +185,10 @@ + True + True + True +- Delete ++ De_lete + True + GTK_RELIEF_NORMAL ++ True + + + +@@ -192,8 +208,8 @@ + + + True +- Devices +- False ++ _Devices ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -202,6 +218,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + tab +@@ -227,8 +247,8 @@ + + + True +- Pilot Name: +- False ++ Pilot _Name: ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -237,6 +257,11 @@ + 0.5 + 0 + 0 ++ pilots_menu ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -261,6 +286,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -307,6 +336,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 1 +@@ -345,9 +378,10 @@ + True + True + True +- Enable ++ _Enable + True + GTK_RELIEF_NORMAL ++ True + + + +@@ -356,9 +390,10 @@ + True + True + True +- Disable ++ D_isable + True + GTK_RELIEF_NORMAL ++ True + + + +@@ -367,9 +402,10 @@ + True + True + True +- Settings... ++ _Settings... + True + GTK_RELIEF_NORMAL ++ True + + + +@@ -403,6 +439,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + +@@ -419,6 +459,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + label_item +@@ -466,8 +510,8 @@ + + + True +- Conduits +- False ++ C_onduits ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -476,6 +520,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + tab +@@ -492,6 +540,12 @@ + True + False + False ++ True ++ False ++ False ++ GDK_WINDOW_TYPE_HINT_DIALOG ++ GDK_GRAVITY_NORTH_WEST ++ True + False + True + +@@ -514,6 +568,7 @@ + gtk-ok + True + GTK_RELIEF_NORMAL ++ True + + + +@@ -525,6 +580,7 @@ + gtk-cancel + True + GTK_RELIEF_NORMAL ++ True + + + +@@ -562,8 +618,8 @@ + + + True +- Name +- False ++ _Name ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -572,6 +628,11 @@ + 0.5 + 0 + 0 ++ device_name_entry ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -586,8 +647,8 @@ + + + True +- Port +- False ++ _Port ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -596,6 +657,11 @@ + 0.5 + 0 + 0 ++ device_port_entry ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -610,8 +676,8 @@ + + + True +- Speed +- False ++ _Speed ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -620,6 +686,11 @@ + 0.5 + 0 + 0 ++ device_speed_menu ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -639,6 +710,9 @@ + False + True + False ++ ++ Port ++ + + + +@@ -649,7 +723,7 @@ + 0 + + True +- * ++ * + False + + +@@ -660,6 +734,32 @@ + GTK_SELECTION_BROWSE + + ++ ++ True ++ ++ ++ ++ True ++ usb: ++ False ++ False ++ GTK_JUSTIFY_LEFT ++ False ++ False ++ 0 ++ 0.5 ++ 0 ++ 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 ++ ++ ++ ++ ++ ++ + + True + +@@ -676,6 +776,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + +@@ -698,6 +802,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + +@@ -720,6 +828,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + +@@ -742,6 +854,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + +@@ -764,6 +880,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + +@@ -786,6 +906,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + +@@ -808,6 +932,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + +@@ -855,7 +983,7 @@ + 0 + + True +- * ++ * + False + + +@@ -880,6 +1008,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -901,9 +1033,10 @@ + + True + True +- Serial ++ S_erial + True + GTK_RELIEF_NORMAL ++ True + True + False + True +@@ -919,9 +1052,10 @@ + + True + True +- USB ++ _USB + True + GTK_RELIEF_NORMAL ++ True + False + False + True +@@ -938,9 +1072,10 @@ + + True + True +- IrDA ++ _IrDA + True + GTK_RELIEF_NORMAL ++ True + False + False + True +@@ -957,9 +1092,10 @@ + + True + True +- Network ++ Net_work + True + GTK_RELIEF_NORMAL ++ True + False + False + True +@@ -985,8 +1121,8 @@ + + + True +- Timeout +- False ++ _Timeout ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -995,6 +1131,11 @@ + 0.5 + 0 + 0 ++ timeout_spinner ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -1042,6 +1183,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + label_item +@@ -1077,6 +1222,12 @@ + True + False + False ++ True ++ False ++ False ++ GDK_WINDOW_TYPE_HINT_DIALOG ++ GDK_GRAVITY_NORTH_WEST ++ True + False + True + +@@ -1099,6 +1250,7 @@ + gtk-ok + True + GTK_RELIEF_NORMAL ++ True + + + +@@ -1110,6 +1262,7 @@ + gtk-cancel + True + GTK_RELIEF_NORMAL ++ True + + + +@@ -1153,8 +1306,8 @@ + + + True +- User Name +- False ++ User _Name ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -1163,6 +1316,11 @@ + 0.5 + 0 + 0 ++ pilot_username_entry ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -1183,7 +1341,7 @@ + 0 + + True +- * ++ * + False + + +@@ -1198,8 +1356,8 @@ + + + True +- ID +- False ++ _ID ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -1208,6 +1366,11 @@ + 0.5 + 0 + 0 ++ pilot_id_entry ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -1228,7 +1391,7 @@ + 0 + + True +- * ++ * + False + + +@@ -1259,9 +1422,10 @@ + True + Get User Name and ID from existing pilot that was used before. + True +- Get from pilot ++ _Get from pilot + True + GTK_RELIEF_NORMAL ++ True + + + 0 +@@ -1275,9 +1439,10 @@ + True + Set User Name and ID to a new pilot. + True +- Send to pilot ++ _Send to pilot + True + GTK_RELIEF_NORMAL ++ True + + + 0 +@@ -1308,6 +1473,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + label_item +@@ -1341,8 +1510,8 @@ + + + True +- Pilot Name +- False ++ _Pilot Name ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -1351,6 +1520,11 @@ + 0.5 + 0 + 0 ++ pilot_name_entry ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -1371,7 +1545,7 @@ + 0 + + True +- * ++ * + False + + +@@ -1386,8 +1560,8 @@ + + + True +- Local basedir +- False ++ _Local basedir ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -1396,6 +1570,11 @@ + 0.5 + 0 + 0 ++ pilot_basedir_entry ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -1416,7 +1595,7 @@ + 0 + + True +- * ++ * + False + + +@@ -1443,6 +1622,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + label_item +@@ -1478,6 +1661,12 @@ + False + False + False ++ True ++ False ++ False ++ GDK_WINDOW_TYPE_HINT_DIALOG ++ GDK_GRAVITY_NORTH_WEST ++ True + False + True + +@@ -1500,6 +1689,7 @@ + gtk-ok + True + GTK_RELIEF_NORMAL ++ True + + + +@@ -1511,6 +1701,7 @@ + gtk-cancel + True + GTK_RELIEF_NORMAL ++ True + + + +@@ -1556,6 +1747,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + label_item +@@ -1584,6 +1779,12 @@ + True + True + False ++ True ++ False ++ False ++ GDK_WINDOW_TYPE_HINT_NORMAL ++ GDK_GRAVITY_NORTH_WEST ++ True + + + +@@ -1632,8 +1833,8 @@ + + + True +- Name +- False ++ _Name ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -1642,6 +1843,11 @@ + 0.5 + 0 + 0 ++ device_name_entry_druid ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -1656,8 +1862,8 @@ + + + True +- Port +- False ++ _Port ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -1666,6 +1872,14 @@ + 0.5 + 0 + 0 ++ device_port_entry_druid ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 ++ ++ ++ + + + 0 +@@ -1680,8 +1894,8 @@ + + + True +- Speed +- False ++ _Speed ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -1690,6 +1904,11 @@ + 0.5 + 0 + 0 ++ device_speed_menu_druid ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -1709,9 +1928,12 @@ + False + True + False ++ ++ Port ++ + + +- ++ + True + True + True +@@ -1719,7 +1941,7 @@ + 0 + + True +- * ++ * + False + + +@@ -1730,6 +1952,32 @@ + GTK_SELECTION_BROWSE + + ++ ++ True ++ ++ ++ ++ True ++ usb: ++ False ++ False ++ GTK_JUSTIFY_LEFT ++ False ++ False ++ 0 ++ 0.5 ++ 0 ++ 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 ++ ++ ++ ++ ++ ++ + + True + +@@ -1746,6 +1994,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + +@@ -1768,6 +2020,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + +@@ -1790,6 +2046,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + +@@ -1812,6 +2072,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + +@@ -1834,6 +2098,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + +@@ -1856,6 +2124,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + +@@ -1873,7 +2145,7 @@ + + + +- ++ + True + True + -1 +@@ -1895,7 +2167,7 @@ + + + +- ++ + True + True + True +@@ -1903,7 +2175,7 @@ + 0 + + True +- * ++ * + False + + +@@ -1925,9 +2197,10 @@ + + True + True +- Serial ++ S_erial + True + GTK_RELIEF_NORMAL ++ True + True + False + True +@@ -1943,9 +2216,10 @@ + + True + True +- USB ++ _USB + True + GTK_RELIEF_NORMAL ++ True + False + False + True +@@ -1962,9 +2236,10 @@ + + True + True +- IrDA ++ _IrDA + True + GTK_RELIEF_NORMAL ++ True + False + False + True +@@ -1981,9 +2256,10 @@ + + True + True +- Network ++ Net_work + True + GTK_RELIEF_NORMAL ++ True + False + False + True +@@ -2018,6 +2294,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -2032,8 +2312,8 @@ + + + True +- Timeout +- False ++ _Timeout ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -2042,6 +2322,11 @@ + 0.5 + 0 + 0 ++ device_timeout_spinner ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -2108,9 +2393,10 @@ + + + True +- Yes, I've used sync software with this pilot before. ++ _Yes, I've used sync software with this pilot before. + True + GTK_RELIEF_NORMAL ++ True + True + False + True +@@ -2125,9 +2411,10 @@ + + + True +- No, I've never used sync software with this pilot before. ++ _No, I've never used sync software with this pilot before. + True + GTK_RELIEF_NORMAL ++ True + False + False + True +@@ -2161,8 +2448,8 @@ + + + True +- User Name +- False ++ _User Name ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -2171,6 +2458,11 @@ + 0.5 + 0 + 0 ++ pilot_username_entry_druid ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -2185,8 +2477,8 @@ + + + True +- ID +- False ++ _ID ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -2195,6 +2487,11 @@ + 0.5 + 0 + 0 ++ pilot_id_entry_druid ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -2207,7 +2504,7 @@ + + + +- ++ + True + Enter user name you want stored on your pilot + True +@@ -2216,7 +2513,7 @@ + 0 + + True +- * ++ * + False + + +@@ -2229,7 +2526,7 @@ + + + +- ++ + True + This integer ID identifies your pilot and must be unique between different pilots that you use. + True +@@ -2238,7 +2535,7 @@ + 0 + + True +- * ++ * + False + + +@@ -2265,6 +2562,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + label_item +@@ -2336,8 +2637,8 @@ + + + True +- Pilot Name +- False ++ _Pilot Name ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -2346,6 +2647,11 @@ + 0.5 + 0 + 0 ++ pilot_name_entry ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -2367,7 +2673,7 @@ + 0 + + True +- * ++ * + False + + +@@ -2382,8 +2688,8 @@ + + + True +- Local basedir +- False ++ _Local basedir ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -2392,6 +2698,11 @@ + 0.5 + 0 + 0 ++ pilot_basedir_entry ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -2413,7 +2724,7 @@ + 0 + + True +- * ++ * + False + + +@@ -2461,6 +2772,12 @@ + False + False + False ++ True ++ False ++ False ++ GDK_WINDOW_TYPE_HINT_DIALOG ++ GDK_GRAVITY_NORTH_WEST ++ True + False + True + +@@ -2483,6 +2800,7 @@ + gtk-ok + True + GTK_RELIEF_NORMAL ++ True + + + +@@ -2494,6 +2812,7 @@ + gtk-cancel + True + GTK_RELIEF_NORMAL ++ True + + + +@@ -2556,8 +2875,8 @@ + + + True +- Action: +- False ++ _Action: ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -2566,6 +2885,11 @@ + 0.5 + 0 + 0 ++ sync_actions_menu ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -2580,8 +2904,8 @@ + + + True +- One Time Action: +- False ++ _One Time Action: ++ True + False + GTK_JUSTIFY_CENTER + False +@@ -2590,6 +2914,11 @@ + 0.5 + 0 + 0 ++ sync_one_actions_menu ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + 0 +@@ -2646,6 +2975,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + label_item +@@ -2684,6 +3017,10 @@ + 0.5 + 0 + 0 ++ PANGO_ELLIPSIZE_NONE ++ -1 ++ False ++ 0 + + + label_item +diff -u -r gnome-pilot-2.0.13/capplet/util.c ../sun/gnome-pilot/capplet/util.c +--- gnome-pilot-2.0.13/capplet/util.c 2004-09-04 00:09:23.000000000 +0800 ++++ ../sun/gnome-pilot/capplet/util.c 2005-11-15 22:25:39.000000000 +0800 +@@ -259,9 +259,9 @@ + GPilotDevice *device = g_new0 (GPilotDevice, 1); + + device->name = next_cradle_name (state); +- device->port = g_strdup ("/dev/pilot"); ++ device->port = g_strdup ("usb:"); + device->speed = speedList[DEFAULT_SPEED_INDEX]; +- device->type = PILOT_DEVICE_SERIAL; ++ device->type = PILOT_DEVICE_USB_VISOR; + device->timeout = 2; + + return device; +@@ -316,14 +316,21 @@ + const gchar *curname; + + curname = gtk_entry_get_text (GTK_ENTRY (editable)); ++ ++ /* pilot-link with libusb support need to use "usb:" as the port "name", ++ so no need to check if the initial character is "/" ++ */ ++ + if (*curname == '\0' && len > 0) { ++ /* + if (text[0]!='/') { + gtk_signal_emit_stop_by_name (GTK_OBJECT (editable), "insert_text"); + return; + } ++ */ + } else { + for (i =0;iold_port = g_strdup (device->port); ++ device->old_type = device->type; ++} ++ ++void ++restore_old_device_config (GPilotDevice* device) ++{ ++ if (device->port) ++ g_free (device->port); ++ device->port = g_strdup (device->old_port); ++ ++ device->type = device->old_type; ++} ++ ++void + read_device_config (GtkObject *object, GPilotDevice* device) + { + GtkWidget *port_entry, *speed_menu, *item, *name_entry; +@@ -532,7 +556,18 @@ + device->timeout = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (timeout_spinner)); + } + +-void ++void backup_old_basedir (GPilotPilot *pilot) ++{ ++ pilot->sync_options.old_basedir = g_strdup (pilot->sync_options.basedir); ++} ++ ++void restore_old_basedir (GPilotPilot *pilot) ++{ ++ g_free (pilot->sync_options.basedir); ++ pilot->sync_options.basedir = g_strdup (pilot->sync_options.old_basedir); ++} ++ ++gboolean + read_pilot_config (GtkObject *object, GPilotPilot *pilot) + { + GtkWidget *id, *name, *pname, *basedir, *menu; +@@ -561,6 +596,8 @@ + if (pilot->sync_options.basedir) + g_free (pilot->sync_options.basedir); + pilot->sync_options.basedir = g_strdup (gtk_entry_get_text (GTK_ENTRY (basedir))); ++ ++ return check_base_directory(gtk_entry_get_text(GTK_ENTRY(basedir))); + } + + void +@@ -589,5 +626,15 @@ + } + } + ++ if (device->type == PILOT_DEVICE_USB_VISOR) { ++ g_message ("checking port on %s", device->port); ++ if (strcmp(device->port, "usb:")) { ++ str = g_strdup_printf ("%s\n", _("USB connection MUST use port \"usb:\"")); ++ error_dialog (NULL, str); ++ g_free (str); ++ return FALSE; ++ } ++ } ++ + return TRUE; + } +diff -u -r gnome-pilot-2.0.13/capplet/util.h ../sun/gnome-pilot/capplet/util.h +--- gnome-pilot-2.0.13/capplet/util.h 2003-04-23 05:14:10.000000000 +0800 ++++ ../sun/gnome-pilot/capplet/util.h 2005-11-10 16:16:02.000000000 +0800 +@@ -64,7 +64,7 @@ + + /* Configuration routines */ + void read_device_config (GtkObject *object, GPilotDevice* device); +-void read_pilot_config (GtkObject *object, GPilotPilot *pilot); ++gboolean read_pilot_config (GtkObject *object, GPilotPilot *pilot); + + void save_config_and_restart (GnomePilotClient *gpc, PilotState *state); + +diff -u -r gnome-pilot-2.0.13/conduits/backup/backup.conduit.in ../sun/gnome-pilot/conduits/backup/backup.conduit.in +--- gnome-pilot-2.0.13/conduits/backup/backup.conduit.in 2001-03-01 06:43:02.000000000 +0800 ++++ ../sun/gnome-pilot/conduits/backup/backup.conduit.in 2005-10-28 11:23:11.000000000 +0800 +@@ -1,7 +1,7 @@ + + + +- ++ + + + +diff -u -r gnome-pilot-2.0.13/conduits/backup/backup_conduit.c ../sun/gnome-pilot/conduits/backup/backup_conduit.c +--- gnome-pilot-2.0.13/conduits/backup/backup_conduit.c 2003-03-18 23:12:25.000000000 +0800 ++++ ../sun/gnome-pilot/conduits/backup/backup_conduit.c 2005-12-16 10:13:12.000000000 +0800 +@@ -263,6 +265,7 @@ + g_list_foreach ((*c)->exclude_files,(GFunc)g_free,NULL); + g_list_free ((*c)->exclude_files); + g_free ((*c)->backup_dir); ++ g_free ((*c)->old_backup_dir); + g_free (*c); + *c = NULL; + } +@@ -387,7 +390,7 @@ + int keep_reading; + int entries; + int err; +- unsigned char *buffer; ++ pi_buffer_t *buffer = NULL; + PilotRecord remote; + int wrote; + +@@ -473,21 +476,24 @@ + goto db_close; + } + +- buffer = g_new0 (unsigned char, 0xffff); +- remote.buffer = buffer; ++ buffer = pi_buffer_new(DLP_BUF_SIZE); ++ if(buffer == NULL){ ++ result = pi_set_error(dbinfo->pilot_socket, PI_ERR_GENERIC_MEMORY); ++ } + + { + int l; + l = dlp_ReadAppBlock (dbinfo->pilot_socket, + dbinfo->db_handle, + 0, +- buffer, +- 0xffff); ++ DLP_BUF_SIZE, ++ buffer); + if (l>0) { +- pi_file_set_app_info (f, buffer, l); ++ pi_file_set_app_info (f, buffer->data, l); + } + } + ++ remote.buffer = buffer; + + index = 0; + keep_reading = 1; +@@ -500,19 +506,18 @@ + keep_reading = (dlp_ReadResourceByIndex (dbinfo->pilot_socket, + dbinfo->db_handle, + index, +- remote.buffer, ++ buffer, + &type, +- &id, +- &remote.len) >= 0); ++ &id) >= 0); + #ifdef DEBUG_REC_IO + g_message ("read resource %d, type = %s, size %d, , index %d/%d", +- id, pi_unmktag (type), remote.len, +- index, entries); ++ id, pi_unmktag (type), buffer->used, ++ index, entries); + #endif + if (keep_reading) { + err = pi_file_append_resource (f, +- remote.buffer, +- remote.len, ++ buffer->data, ++ buffer->used, + type, + id); + if (err < 0) { +@@ -521,7 +526,7 @@ + wrote++; + #ifdef DEBUG_REC_IO + g_message ("write resource %d, type = %s, size %d, index %d/%d", +- id, pi_unmktag (type), remote.len, ++ id, pi_unmktag (type), buffer->used, + index, entries); + #endif + } +@@ -530,22 +535,21 @@ + keep_reading = (dlp_ReadRecordByIndex (dbinfo->pilot_socket, + dbinfo->db_handle, + index, +- remote.buffer, ++ buffer, + &remote.recID, +- &remote.len, + &remote.flags, + &remote.catID) >= 0); + + #ifdef DEBUG_REC_IO + g_message ("read record %d, size %d, index %d/%d", +- remote.recID, remote.len, ++ remote.recID, buffer->used, + index, entries); + #endif + + if (keep_reading) { + err = pi_file_append_record (f, +- remote.buffer, +- remote.len, ++ buffer->data, ++ buffer->used, + remote.flags, + remote.catID, + remote.recID); +@@ -555,7 +559,7 @@ + wrote++; + #ifdef DEBUG_REC_IO + g_message ("write record %d, size %d, index %d/%d", +- id, remote.len, ++ id, buffer->used, + index, entries); + #endif + } +@@ -569,8 +573,8 @@ + index); + } while (keep_reading && index < entries); + +- g_free (buffer); +- ++ pi_buffer_free (buffer); ++ + if (pi_file_close (f) < 0) { + g_warning("backup conduit can't write file"); + gnome_pilot_conduit_send_error(GNOME_PILOT_CONDUIT(conduit), +@@ -760,6 +764,8 @@ + GtkWidget *button, *spin; + GtkObject *adjustment; + ++ AtkObject *atk_widget; ++ + vbox = gtk_vbox_new(FALSE, GNOME_PAD); + + table = gtk_table_new(2, 4, FALSE); +@@ -767,7 +773,7 @@ + gtk_table_set_col_spacings(GTK_TABLE(table), 10); + gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, GNOME_PAD); + +- label = gtk_label_new(_("Backup directory")); ++ label = gtk_label_new_with_mnemonic (_("_Backup directory")); + gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 0, 1); + + entry = gtk_entry_new_with_max_length(128); +@@ -777,21 +783,33 @@ + GTK_SIGNAL_FUNC(insert_dir_callback), + NULL); + +- label = gtk_label_new(_("Only backup changed bases")); ++ gtk_label_set_mnemonic_widget (GTK_LABEL(label), entry); ++ atk_widget = gtk_widget_get_accessible (entry); ++ atk_object_set_name (atk_widget, _("Backup directory")); ++ ++ label = gtk_label_new_with_mnemonic (_("O_nly backup changed bases")); + gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 1,2); + + button = gtk_check_button_new(); + gtk_object_set_data(GTK_OBJECT(vbox), "only_changed", button); + gtk_table_attach_defaults(GTK_TABLE(table), button, 1, 2, 1,2); + +- label = gtk_label_new(_("Remove local base if deleted on pilot")); ++ gtk_label_set_mnemonic_widget (GTK_LABEL(label), button); ++ atk_widget = gtk_widget_get_accessible (button); ++ atk_object_set_name (atk_widget, _("Only backup changed bases")); ++ ++ label = gtk_label_new_with_mnemonic(_("_Remove local base if deleted on pilot")); + gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 2,3); + + button = gtk_check_button_new(); + gtk_object_set_data(GTK_OBJECT(vbox), "remove_local", button); + gtk_table_attach_defaults(GTK_TABLE(table), button, 1, 2, 2,3); + +- label = gtk_label_new(_("# of old backups to keep")); ++ gtk_label_set_mnemonic_widget (GTK_LABEL(label), button); ++ atk_widget = gtk_widget_get_accessible (button); ++ atk_object_set_name (atk_widget, _("Remove local base if deleted on pilot")); ++ ++ label = gtk_label_new_with_mnemonic (_("# of old backups to _keep")); + gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 3,4); + + adjustment = gtk_adjustment_new (0, 0, 100, 1, 1, 1); +@@ -799,9 +817,76 @@ + gtk_object_set_data(GTK_OBJECT(vbox), "no_of_backups", adjustment); + gtk_table_attach_defaults(GTK_TABLE(table), spin, 1, 2, 3, 4); + ++ gtk_label_set_mnemonic_widget (GTK_LABEL(label), spin); ++ atk_widget = gtk_widget_get_accessible (spin); ++ atk_object_set_name (atk_widget, _("# of old backups to keep")); ++ + return vbox; + } + ++void ++error_dialog (GtkWindow *parent, gchar *mesg, ...) ++{ ++ GtkWidget *dlg; ++ char *tmp; ++ va_list ap; ++ ++ va_start (ap,mesg); ++ tmp = g_strdup_vprintf (mesg,ap); ++ ++ dlg = gtk_message_dialog_new (parent, GTK_DIALOG_DESTROY_WITH_PARENT, ++ GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, tmp); ++ gtk_dialog_run (GTK_DIALOG (dlg)); ++ gtk_widget_destroy (dlg); ++ ++ va_end (ap); ++ g_free (tmp); ++} ++ ++gboolean ++check_base_directory (const gchar *dir_name) ++{ ++ gboolean ret = TRUE; ++ /* check basedir validity */ ++ ++ if (mkdir (dir_name, 0700) < 0 ) { ++ struct stat buf; ++ gchar *errstr; ++ switch (errno) { ++ case EEXIST: ++ stat (dir_name, &buf); ++ if (S_ISDIR (buf.st_mode)) { ++ if (!(buf.st_mode & (S_IRUSR | S_IWUSR |S_IXUSR))) { ++ error_dialog (NULL, _("The specified backup directory exists but has the wrong permissions.\n" ++ "Please fix or choose another directory")); ++ ret = FALSE; ++ } ++ } else { ++ error_dialog (NULL, _("The specified backup directory exists but is not a directory.\n" ++ "Please make it a directory or choose another directory")); ++ ret = FALSE; ++ } ++ break; ++ ++ case EACCES: ++ error_dialog (NULL, _("It wasn't possible to create the specified backup directory.\n" ++ "Please verify the permissions on the specified path or choose another directory")); ++ ret = FALSE; ++ break; ++ case ENOENT: ++ error_dialog (NULL, _("The path specified for the backup directory is invalid.\n" ++ "Please choose another directory")); ++ ret = FALSE; ++ break; ++ default: ++ errstr = strerror (errno); ++ error_dialog (NULL, errstr); ++ ret = FALSE; ++ } ++ } ++ return ret; ++} ++ + static void + setOptionsCfg(GtkWidget *pilotcfg, ConduitCfg *state) + { +@@ -817,8 +902,10 @@ + g_assert(updated_only!=NULL); + g_assert(remove_deleted!=NULL); + g_assert(adj!=NULL); ++ ++ state->old_backup_dir = g_strdup(state->backup_dir); + +- gtk_entry_set_text(GTK_ENTRY(dir), state->backup_dir); ++ gtk_entry_set_text(GTK_ENTRY(dir), state->old_backup_dir); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(updated_only), state->updated_only); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(remove_deleted), state->remove_deleted); + gtk_adjustment_set_value (GTK_ADJUSTMENT(adj), state->no_of_backups); +@@ -836,7 +923,14 @@ + remove_deleted = gtk_object_get_data(GTK_OBJECT(pilotcfg), "remove_local"); + adj = gtk_object_get_data(GTK_OBJECT(pilotcfg), "no_of_backups"); + +- state->backup_dir = g_strdup(gtk_entry_get_text(GTK_ENTRY(dir))); ++ if(state->backup_dir) ++ g_free(state->backup_dir); ++ if(check_base_directory ( gtk_entry_get_text (GTK_ENTRY (dir)))){ ++ state->backup_dir = g_strdup(gtk_entry_get_text(GTK_ENTRY(dir))); ++ } else { ++ state->backup_dir = g_strdup(state->old_backup_dir); ++ gtk_entry_set_text(GTK_ENTRY(dir), state->old_backup_dir); ++ } + state->updated_only = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(updated_only)); + state->remove_deleted = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(remove_deleted)); + state->no_of_backups = GTK_ADJUSTMENT(adj)->value; +diff -u -r gnome-pilot-2.0.13/conduits/backup/backup_conduit.h ../sun/gnome-pilot/conduits/backup/backup_conduit.h +--- gnome-pilot-2.0.13/conduits/backup/backup_conduit.h 2001-03-02 04:20:49.000000000 +0800 ++++ ../sun/gnome-pilot/conduits/backup/backup_conduit.h 2005-11-10 18:50:22.000000000 +0800 +@@ -38,6 +38,7 @@ + + typedef struct ConduitCfg { + gchar *backup_dir; ++ gchar *old_backup_dir; /* restore the original value if users set an invalid backup directory */ + GList *exclude_files; + GList *files_in_backup; /* contains the file in backup, any entries when + destroy is called are considered deleted on PDA */ +diff -u -r gnome-pilot-2.0.13/conduits/file/file.conduit.in ../sun/gnome-pilot/conduits/file/file.conduit.in +--- gnome-pilot-2.0.13/conduits/file/file.conduit.in 2001-03-01 06:43:04.000000000 +0800 ++++ ../sun/gnome-pilot/conduits/file/file.conduit.in 2005-10-28 11:23:12.000000000 +0800 +@@ -1,7 +1,7 @@ + + + +- ++ + + + +diff -u -r gnome-pilot-2.0.13/conduits/test/test.conduit ../sun/gnome-pilot/conduits/test/test.conduit +--- gnome-pilot-2.0.13/conduits/test/test.conduit 2005-04-09 12:15:49.000000000 +0800 ++++ ../sun/gnome-pilot/conduits/test/test.conduit 2005-12-15 18:25:05.977894000 +0800 +@@ -1,9 +1,9 @@ + +- ++ + +- ++ + + + +- ++ + +diff -u -r gnome-pilot-2.0.13/conduits/test/test.conduit.in ../sun/gnome-pilot/conduits/test/test.conduit.in +--- gnome-pilot-2.0.13/conduits/test/test.conduit.in 2001-03-01 06:43:08.000000000 +0800 ++++ ../sun/gnome-pilot/conduits/test/test.conduit.in 2005-10-28 11:23:12.000000000 +0800 +@@ -1,7 +1,7 @@ + + + +- ++ + + + +diff -u -r gnome-pilot-2.0.13/gpilotd/Makefile.am ../sun/gnome-pilot/gpilotd/Makefile.am +--- gnome-pilot-2.0.13/gpilotd/Makefile.am 2005-04-09 12:14:27.000000000 +0800 ++++ ../sun/gnome-pilot/gpilotd/Makefile.am 2005-08-12 18:10:15.000000000 +0800 +@@ -68,7 +68,9 @@ + $(NULL) + + %.c %.h: %.gob +- $(GOB) --always-private-header -w $< ++ if test $(GOB) != "no" ; then \ ++ $(GOB) --always-private-header -w $< ;fi ++ + + #$(GOB_BUILT_SRCS): $(gobfiles) + # @for GF in $(gobfiles); do (echo -n "$(GOB) -w $$GF..." && $(GOB) -w $$GF && echo " ok"); done; +diff -u -r gnome-pilot-2.0.13/gpilotd/Makefile.in ../sun/gnome-pilot/gpilotd/Makefile.in +--- gnome-pilot-2.0.13/gpilotd/Makefile.in 2005-04-09 12:15:03.000000000 +0800 ++++ ../sun/gnome-pilot/gpilotd/Makefile.in 2005-08-12 18:10:15.000000000 +0800 +@@ -963,8 +963,8 @@ + && rm -f xgen-gmc + + %.c %.h: %.gob +- $(GOB) --always-private-header -w $< +- ++ if test $(GOB) != "no" ; then \ ++ $(GOB) --always-private-header -w $< ;fi + $(CORBA_SRCLIST): $(idl_files) + $(ORBIT_IDL) $(idl_files) + $(server_in_files:.server.in.in=.server.in): $(server_in_files) +diff -u -r gnome-pilot-2.0.13/gpilotd/gnome-pilot-conduit-backup.c ../sun/gnome-pilot/gpilotd/gnome-pilot-conduit-backup.c +--- gnome-pilot-2.0.13/gpilotd/gnome-pilot-conduit-backup.c 2005-04-05 05:26:20.000000000 +0800 ++++ ../sun/gnome-pilot/gpilotd/gnome-pilot-conduit-backup.c 2005-08-12 17:56:07.000000000 +0800 +@@ -1,4 +1,4 @@ +-/* Generated by GOB (v2.0.11) on Mon Apr 4 17:26:20 2005 ++/* Generated by GOB (v2.0.11) on Mon Aug 1 14:55:46 2005 + (do not edit directly) */ + + /* End world hunger, donate to the World Food Programme, http://www.wfp.org */ +diff -u -r gnome-pilot-2.0.13/gpilotd/gnome-pilot-conduit-file.c ../sun/gnome-pilot/gpilotd/gnome-pilot-conduit-file.c +--- gnome-pilot-2.0.13/gpilotd/gnome-pilot-conduit-file.c 2005-04-05 05:26:20.000000000 +0800 ++++ ../sun/gnome-pilot/gpilotd/gnome-pilot-conduit-file.c 2005-08-12 17:56:08.000000000 +0800 +@@ -1,4 +1,4 @@ +-/* Generated by GOB (v2.0.11) on Mon Apr 4 17:26:20 2005 ++/* Generated by GOB (v2.0.11) on Mon Aug 1 14:55:46 2005 + (do not edit directly) */ + + /* End world hunger, donate to the World Food Programme, http://www.wfp.org */ +diff -u -r gnome-pilot-2.0.13/gpilotd/gnome-pilot-conduit-standard-abs.c ../sun/gnome-pilot/gpilotd/gnome-pilot-conduit-standard-abs.c +--- gnome-pilot-2.0.13/gpilotd/gnome-pilot-conduit-standard-abs.c 2004-08-27 04:21:13.000000000 +0800 ++++ ../sun/gnome-pilot/gpilotd/gnome-pilot-conduit-standard-abs.c 2005-08-12 17:56:07.000000000 +0800 +@@ -438,7 +438,6 @@ + index, + remote.record, + &remote.ID, +- &remote.length, + &remote.attr, + &remote.category) >= 0) { + standard_abs_compute_attr_field(&remote); +@@ -1085,7 +1084,6 @@ + local->ID, + remote->record, + &index, +- &remote->length, + &remote->attr, + &remote->category); + remote->ID = local->ID; +@@ -1442,7 +1440,6 @@ + index, + remote.record, + &remote.ID, +- &remote.length, + &remote.attr, + &remote.category) >= 0) { + standard_abs_compute_attr_field(&remote); +@@ -1481,7 +1478,6 @@ + index, + remote.record, + &remote.ID, +- &remote.length, + &remote.attr, + &remote.category) >= 0) { + standard_abs_compute_attr_field(&remote); +@@ -1521,7 +1517,6 @@ + remote.record, + &remote.ID, + &index, +- &remote.length, + &remote.attr, + &remote.category) >= 0) { + standard_abs_compute_attr_field(&remote); +diff -u -r gnome-pilot-2.0.13/gpilotd/gnome-pilot-conduit-standard.c ../sun/gnome-pilot/gpilotd/gnome-pilot-conduit-standard.c +--- gnome-pilot-2.0.13/gpilotd/gnome-pilot-conduit-standard.c 2005-04-05 05:26:20.000000000 +0800 ++++ ../sun/gnome-pilot/gpilotd/gnome-pilot-conduit-standard.c 2005-08-12 17:56:08.000000000 +0800 +@@ -1,4 +1,4 @@ +-/* Generated by GOB (v2.0.11) on Mon Apr 4 17:26:20 2005 ++/* Generated by GOB (v2.0.11) on Mon Aug 1 14:55:46 2005 + (do not edit directly) */ + + /* End world hunger, donate to the World Food Programme, http://www.wfp.org */ +diff -u -r gnome-pilot-2.0.13/gpilotd/gnome-pilot-structures.c ../sun/gnome-pilot/gpilotd/gnome-pilot-structures.c +--- gnome-pilot-2.0.13/gpilotd/gnome-pilot-structures.c 2003-04-24 00:55:16.000000000 +0800 ++++ ../sun/gnome-pilot/gpilotd/gnome-pilot-structures.c 2005-11-15 19:02:02.000000000 +0800 +@@ -322,6 +322,7 @@ + } + g_free (device->name); + g_free (device->port); ++ g_free (device->old_port); + gpilot_hdb_uucp_unlock (device); + } + +@@ -885,6 +886,7 @@ + g_free (pilot->passwd); + g_free (pilot->pilot_username); + g_free (pilot->sync_options.basedir); ++ g_free (pilot->sync_options.old_basedir); + g_list_foreach (pilot->trusted_users, (GFunc) g_free, NULL); + g_list_free (pilot->trusted_users); + g_free (pilot); +diff -u -r gnome-pilot-2.0.13/gpilotd/gnome-pilot-structures.h ../sun/gnome-pilot/gpilotd/gnome-pilot-structures.h +--- gnome-pilot-2.0.13/gpilotd/gnome-pilot-structures.h 2003-04-28 22:23:58.000000000 +0800 ++++ ../sun/gnome-pilot/gpilotd/gnome-pilot-structures.h 2005-11-15 19:02:02.000000000 +0800 +@@ -43,6 +43,7 @@ + struct _GPilotSyncOpt { + GnomePilotConduitSyncType default_sync_action; /* Unused, but exists for bin compat */ + gchar *basedir; ++ gchar *old_basedir; /* Restore the original value if users set an invalid base directory */ + }; + typedef struct _GPilotSyncOpt GPilotSyncOpt; + +@@ -86,6 +87,7 @@ + struct _GPilotDevice { + gchar *name; /* symbolic name */ + gchar *port; /* device */ ++ gchar *old_port; /* restore old value when an invalid port is set */ + guint speed; /* speed (for serial) */ + + /* These are used for network (man c++ is soo much cooler) */ +@@ -104,6 +106,7 @@ + + gint timeout; + GPilotDeviceType type; ++ GPilotDeviceType old_type; /* restore old value when an invalid type is set */ + gboolean device_exists : 1; /* whether the usb cradle is active */ + }; + typedef struct _GPilotDevice GPilotDevice; +diff -u -r gnome-pilot-2.0.13/gpilotd/gpilotd.c ../sun/gnome-pilot/gpilotd/gpilotd.c +--- gnome-pilot-2.0.13/gpilotd/gpilotd.c 2004-09-02 23:43:47.000000000 +0800 ++++ ../sun/gnome-pilot/gpilotd/gpilotd.c 2005-08-12 17:56:07.000000000 +0800 +@@ -168,7 +168,8 @@ + + strcpy (addr.pi_device,device->port); + +- ret = pi_bind (listen_sd, (struct sockaddr*)&addr, sizeof (addr)); ++ ret = pi_bind (listen_sd, addr.pi_device); ++ + if (ret == -1) { + g_warning (_("Unable to bind to pilot")); + if (error) +@@ -198,7 +199,11 @@ + + if (error) + *error = 0; +- pi_close(listen_sd); ++ ++ if(listen_sd == sd) ++ g_message("gpilotd_connect listen_socket_id equals accept_socket_id"); ++ else ++ pi_close(listen_sd); + + return sd; + } +@@ -789,7 +794,7 @@ + #endif /* WITH_NETWORK */ + + #ifdef WITH_USB_VISOR +-#ifdef linux ++//#ifdef linux + static GPtrArray *vendor_product_ids = NULL; + static GArray *product_net = NULL; + +@@ -880,7 +885,8 @@ + return FALSE; + + load_devices_xml (); +- ++ ++#ifdef linux + /* Check /proc/bus/usb/devices for a usb device */ + f = fopen ("/proc/bus/usb/devices", "r"); + if (!f) +@@ -903,11 +909,19 @@ + } + + fclose (f); +- ++ ++#else /* could be Solaris */ ++ visor_exists = TRUE; ++#endif /* linux */ ++ + if (visor_exists) { + l = context->devices; + while (l) { ++ struct stat dummy; + device = l->data; ++ ++ /*todo: make sure usb device exist*/ ++ + if (device->type == PILOT_DEVICE_USB_VISOR) { + if (!visor_net) + device->type = PILOT_DEVICE_SERIAL; +@@ -928,7 +942,6 @@ + } + + #endif +-#endif + + void monitor_channel (GPilotDevice *dev,GPilotContext *context) + { +@@ -959,16 +972,16 @@ + #endif /* WITH_NETWORK */ + } if (dev->type == PILOT_DEVICE_USB_VISOR) { + #ifdef WITH_USB_VISOR +-#ifdef linux ++//#ifdef linux + /* We want to watch the /proc/bus/usb/devices file once + * per context, and then check all devices each time it is + * woken up. */ + if (visor_timeout_id == -1) { + visor_timeout_id = g_timeout_add (2000, visor_devices_timeout, context); + } +-#else /* linux*/ +- g_assert_not_reached (); +-#endif /* linux */ ++//#else /* linux*/ ++// g_assert_not_reached (); ++//#endif /* linux */ + #endif /* WITH_USB_VISOR */ + dev->device_exists = FALSE; + } +diff -u -r gnome-pilot-2.0.13/gpilotd/manager.c ../sun/gnome-pilot/gpilotd/manager.c +--- gnome-pilot-2.0.13/gpilotd/manager.c 2004-09-03 02:42:29.000000000 +0800 ++++ ../sun/gnome-pilot/gpilotd/manager.c 2005-08-12 17:56:07.000000000 +0800 +@@ -292,6 +292,7 @@ + GnomePilotConduit *conduit = NULL; + GSList *db_list = NULL; + GPilotPilot *pilot_info; ++ pi_buffer_t * buffer; + int error = 0; + int index = 0; + +@@ -299,22 +300,27 @@ + + orbed_notify_daemon_message (pilot_info->name, NULL, _("Collecting synchronization info...")); + ++ buffer = pi_buffer_new(sizeof(struct DBInfo)); ++ + while (1) { + GnomePilotDBInfo *dbinfo; + + dbinfo = g_new0 (GnomePilotDBInfo, 1); + /* load next dbinfo block */ +- if (dlp_ReadDBList (pfd, 0, dlpDBListRAM, index, PI_DBINFO (dbinfo)) < 0) { +- /* is <0, there are no more databases, break ++ if (dlp_ReadDBList (pfd, 0, dlpDBListRAM, index, buffer) < 0) { ++ /* is <0, there are no more databases, break + out so we can save the list */ + break; + } ++ memcpy(& (dbinfo->pisock_dbinfo), buffer->data, sizeof(struct DBInfo)); + + index = PI_DBINFO (dbinfo)->index + 1; + + dbs = g_list_append (dbs, dbinfo); + } + ++ pi_buffer_free(buffer); ++ + index = 1; + for (iterator = dbs; iterator; iterator = g_list_next (iterator)) { + GnomePilotDBInfo *dbinfo = GNOME_PILOT_DBINFO (iterator->data); +diff -u -r gnome-pilot-2.0.13/intltool-update.in ../sun/gnome-pilot/intltool-update.in +--- gnome-pilot-2.0.13/intltool-update.in 2005-03-04 23:10:21.000000000 +0800 ++++ ../sun/gnome-pilot/intltool-update.in 2005-10-28 11:23:09.000000000 +0800 +@@ -71,6 +71,7 @@ + "sheet(?:\\.in)+|". # ? + "schemas(?:\\.in)+|". # GConf specific + "pong(?:\\.in)+|". # DEPRECATED: PONG is not used [by GNOME] any longer. ++"conduit(?:\\.in)+|". # conduits specific + "kbd(?:\\.in)+"; # GOK specific. + + my $ini_support = +diff -u -r gnome-pilot-2.0.13/libgpilotdCM/Makefile.am ../sun/gnome-pilot/libgpilotdCM/Makefile.am +--- gnome-pilot-2.0.13/libgpilotdCM/Makefile.am 2002-11-23 00:04:01.000000000 +0800 ++++ ../sun/gnome-pilot/libgpilotdCM/Makefile.am 2005-08-12 18:10:16.000000000 +0800 +@@ -26,7 +26,8 @@ + $(srcdir)/gnome-pilot-conduit-config.gob + + %.c %.h: %.gob +- $(GOB) --always-private-header -w $< ++ if test $(GOB) != "no" ; then \ ++ $(GOB) --always-private-header -w $< ;fi + + gpilotdcmlibsdir=$(libdir)/ + +diff -u -r gnome-pilot-2.0.13/libgpilotdCM/Makefile.in ../sun/gnome-pilot/libgpilotdCM/Makefile.in +--- gnome-pilot-2.0.13/libgpilotdCM/Makefile.in 2005-04-09 12:15:05.000000000 +0800 ++++ ../sun/gnome-pilot/libgpilotdCM/Makefile.in 2005-08-12 18:10:16.000000000 +0800 +@@ -589,7 +589,9 @@ + + + %.c %.h: %.gob +- $(GOB) --always-private-header -w $< ++ if test $(GOB) != "no" ; then \ ++ $(GOB) --always-private-header -w $< ;fi ++ + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: +diff -u -r gnome-pilot-2.0.13/po/POTFILES.in ../sun/gnome-pilot/po/POTFILES.in +--- gnome-pilot-2.0.13/po/POTFILES.in 2005-04-09 12:13:12.000000000 +0800 ++++ ../sun/gnome-pilot/po/POTFILES.in 2005-10-28 11:23:10.000000000 +0800 +@@ -43,3 +43,7 @@ + libgpilotdCM/gnome-pilot-conduit-management.gob + utils/gpilotd-client.c + utils/gpilotdcm-client.c ++libgpilotdCM/gnome-pilot-conduit-management.c ++conduits/backup/backup.conduit.in ++conduits/file/file.conduit.in ++conduits/test/test.conduit.in +diff -u -r gnome-pilot-2.0.13/utils/make-password.c ../sun/gnome-pilot/utils/make-password.c +--- gnome-pilot-2.0.13/utils/make-password.c 2002-09-17 01:08:11.000000000 +0800 ++++ ../sun/gnome-pilot/utils/make-password.c 2005-08-12 17:56:06.000000000 +0800 +@@ -45,7 +45,8 @@ + addr.pi_family = PI_AF_PILOT; + strcpy(addr.pi_device,argv[1]); + +- ret = pi_bind(sd, (struct sockaddr*)&addr, sizeof(addr)); ++ ret = pi_bind(sd, addr.pi_device); ++ + if(ret == -1) { + perror("pi_bind"); + exit(1); diff -r dd6bce4363fb -r 609397372f40 patches/gnome-pilot-01-configure-in.diff --- a/patches/gnome-pilot-01-configure-in.diff Tue Jun 06 05:46:05 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -diff -urN gnome-pilot-2.0.13/configure.in gnome-pilot-2.0.13-hacked/configure.in ---- gnome-pilot-2.0.13/configure.in 2005-04-05 09:28:57.000000000 +1200 -+++ gnome-pilot-2.0.13-hacked/configure.in 2006-01-17 20:44:23.257018000 +1300 -@@ -146,8 +146,6 @@ - else - AC_MSG_ERROR([GOB2 not found and the gob outputfiles are not present, check http://www.5z.com/jirka/gob.html and read the HACKING file]) - fi --else -- GOB2_CHECK(2.0.3) - fi - - dnl *********** diff -r dd6bce4363fb -r 609397372f40 patches/gnome-pilot-02-all-in-one.diff --- a/patches/gnome-pilot-02-all-in-one.diff Tue Jun 06 05:46:05 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2791 +0,0 @@ -diff -u -r gnome-pilot-2.0.13/ChangeLog ../sun/gnome-pilot/ChangeLog ---- gnome-pilot-2.0.13/ChangeLog 2005-04-09 12:29:56.000000000 +0800 -+++ ../sun/gnome-pilot/ChangeLog 2005-12-16 10:58:42.479709000 +0800 -@@ -1,3 +1,77 @@ -+2005-12-15 Calvin Liu -+ -+ Fix bug 6354707 -+ * capplet/gpilotd-capplet.glade, add accessible name -+ -+2005-12-15 Calvin Liu -+ -+ Fix bug 6354682, 6354711 -+ * conduits/backup/backup_conduit.c, add mnemonic names -+ -+2005-11-21 Calvin Liu -+ -+ Fix bug 6338059, together with patch for bug 6338086, 6338096. -+ * capplet/gpilotd-capplet.glade -+ * capplet/gnome-pilot-druid.c -+ -+2005-11-16 Calvin Liu -+ -+ Fix bug 6338086, 6338096, change labels in glade files. -+ * applet/pilot-applet.glade -+ * capplet/gpilotd-capplet.glade -+ -+2005-11-15 Jijun Yu -+ * capplet/util.c: add a device type to check when checking device -+ settings -+ -+2005-11-15 Jijun Yu -+ * gpilotd/gnome-pilot-structures.h: add two members to a structure -+ * gpilotd/gnome-pilot-structures.c: free the allocated memory for -+ the added member in a structure -+ * capplet/util.c: add two function definitions -+ * capplet/gnome-pilot-ddialog.c: restore the original value when -+ checking that device settings are invalid -+ -+2005-11-10 Jijun Yu -+ * conduits/backup/backup_conduit.h: add a member to a structure -+ * conduits/backup/backup_conduit.c: restore the original value when -+ checking that an invalid backup directory is set -+ -+2005-11-10 Jijun Yu -+ * gpilotd/gnome-pilot-structures.h: add a member to a structure -+ * capplet/util.h: change the type of a function from void to gboolean -+ * capplet/util.c: add two function definitions -+ * capplet/gnome-pilot-pdialog.c: restore the original value when -+ checking that an invalid base directory is set -+ -+2005-10-28 Jijun Yu -+ * conduits/backup/backup_conduit.c: include the definition of -+ ENABLE_NLS -+ -+2005-10-28 Jijun Yu -+ * configure.in : support a language 'zh_HK' -+ * intltool-update.in : add conduits specific -+ * po/POTFILES.in: support i18n for conduits -+ * conduits/backup/backup.conduit.in : support i18n for the -+ description of backup conduit -+ * conduits/file/file.conduit.in : support i18n for the description -+ of file conduit -+ * conduits/test/test.conduit.in : suppot i18n for the description -+ of test conduit -+ -+2005-10-24 Jijun Yu -+ * capplet/gnome-pilot-ddialog.c : modify the save type of the -+ modified settings after a Error message in Pilot Settings -> -+ Device Settings -+ -+2005-10-21 Jijun Yu -+ -+ * capplet/gnome-pilot-druid.c : change the default type to "USB" -+ * capplet/util.c : change the default port to "usb:" -+ * capplet/gpilotd-capplet.glade : add a new lable "usb:" -+ in port list -+ -+ - 2005-04-09 JP Rosevear - - * configure.in: bump version -diff -u -r gnome-pilot-2.0.13/applet/Makefile.am ../sun/gnome-pilot/applet/Makefile.am ---- gnome-pilot-2.0.13/applet/Makefile.am 2005-04-09 12:13:01.000000000 +0800 -+++ ../sun/gnome-pilot/applet/Makefile.am 2005-08-12 18:10:14.000000000 +0800 -@@ -15,7 +15,8 @@ - $(NULL) - - %.c %.h: %.gob -- $(GOB2) --always-private-header -w $< -+ if test $(GOB2) != "no" ; then \ -+ $(GOB2) --always-private-header -w $< ; fi - - gpilot_applet_SOURCES = \ - $(GOB_BUILT_SRCS) \ -diff -u -r gnome-pilot-2.0.13/applet/Makefile.in ../sun/gnome-pilot/applet/Makefile.in ---- gnome-pilot-2.0.13/applet/Makefile.in 2005-04-09 12:15:02.000000000 +0800 -+++ ../sun/gnome-pilot/applet/Makefile.in 2005-08-12 18:10:14.000000000 +0800 -@@ -672,7 +672,9 @@ - - - %.c %.h: %.gob -- $(GOB2) --always-private-header -w $< -+ if test $(GOB2) != "no" ; then \ -+ $(GOB2) --always-private-header -w $< ; fi -+ - $(server_in_files:.server.in.in=.server.in): $(server_in_files) - sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" $< > $@ - -diff -u -r gnome-pilot-2.0.13/applet/pilot-applet.glade ../sun/gnome-pilot/applet/pilot-applet.glade ---- gnome-pilot-2.0.13/applet/pilot-applet.glade 2005-03-27 12:31:35.000000000 +0800 -+++ ../sun/gnome-pilot/applet/pilot-applet.glade 2005-11-16 11:00:32.000000000 +0800 -@@ -10,6 +10,12 @@ - False - True - False -+ True -+ False -+ False -+ GDK_WINDOW_TYPE_HINT_DIALOG -+ GDK_GRAVITY_NORTH_WEST -+ True - True - - -@@ -31,6 +37,7 @@ - gtk-ok - True - GTK_RELIEF_NORMAL -+ True - 0 - - -@@ -43,6 +50,7 @@ - gtk-cancel - True - GTK_RELIEF_NORMAL -+ True - 0 - - -@@ -89,6 +97,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - label_item -@@ -114,6 +126,12 @@ - 500 - True - False -+ True -+ False -+ False -+ GDK_WINDOW_TYPE_HINT_DIALOG -+ GDK_GRAVITY_NORTH_WEST -+ True - True - - -@@ -135,6 +153,7 @@ - gtk-cancel - True - GTK_RELIEF_NORMAL -+ True - 0 - - -@@ -167,6 +186,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -180,7 +203,8 @@ - True - GTK_PROGRESS_LEFT_TO_RIGHT - 0 -- 0.1 -+ 0.10000000149 -+ PANGO_ELLIPSIZE_NONE - - - 0 -@@ -194,7 +218,8 @@ - True - GTK_PROGRESS_LEFT_TO_RIGHT - 0 -- 0.1 -+ 0.10000000149 -+ PANGO_ELLIPSIZE_NONE - - - 0 -@@ -221,6 +246,8 @@ - True - True - False -+ False -+ True - GTK_JUSTIFY_LEFT - GTK_WRAP_WORD - True -@@ -261,6 +288,12 @@ - False - True - False -+ True -+ False -+ False -+ GDK_WINDOW_TYPE_HINT_DIALOG -+ GDK_GRAVITY_NORTH_WEST -+ True - True - - -@@ -282,6 +315,7 @@ - gtk-ok - True - GTK_RELIEF_NORMAL -+ True - -5 - - -@@ -294,6 +328,7 @@ - gtk-cancel - True - GTK_RELIEF_NORMAL -+ True - -6 - - -@@ -326,8 +361,8 @@ - - - True -- Directory -- False -+ _Directory -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -336,6 +371,11 @@ - 0.5 - 0 - 0 -+ dir_entry -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -351,8 +391,8 @@ - - True - False -- Pilot ID -- False -+ _Pilot ID -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -361,6 +401,11 @@ - 0.5 - 0 - 0 -+ pilotid_entry -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -375,8 +420,8 @@ - - - True -- Sync cradle -- False -+ _Sync cradle -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -385,6 +430,11 @@ - 0.5 - 0 - 0 -+ device_menu -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -405,7 +455,7 @@ - 0 - - True -- * -+ * - False - - -@@ -427,7 +477,7 @@ - 0 - - True -- * -+ * - False - - -@@ -481,6 +531,12 @@ - False - True - False -+ True -+ False -+ False -+ GDK_WINDOW_TYPE_HINT_DIALOG -+ GDK_GRAVITY_NORTH_WEST -+ True - True - - -@@ -493,6 +549,7 @@ - - True - GTK_BUTTONBOX_END -+ - - - True -@@ -501,11 +558,11 @@ - gtk-help - True - GTK_RELIEF_NORMAL -+ True - -11 - - - -- - - - True -@@ -514,6 +571,7 @@ - gtk-close - True - GTK_RELIEF_NORMAL -+ True - -7 - - -@@ -539,8 +597,8 @@ - - - True -- Execute when clicked -- False -+ _Execute when clicked -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -549,6 +607,11 @@ - 0.5 - 0 - 0 -+ exec_entry -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -563,8 +626,8 @@ - - - True -- Display notices -- False -+ _Display notices -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -573,6 +636,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -593,7 +660,7 @@ - 0 - - True -- * -+ * - False - - -@@ -609,6 +676,7 @@ - - True - GTK_RELIEF_NORMAL -+ True - False - False - True -diff -u -r gnome-pilot-2.0.13/capplet/gnome-pilot-ddialog.c ../sun/gnome-pilot/capplet/gnome-pilot-ddialog.c ---- gnome-pilot-2.0.13/capplet/gnome-pilot-ddialog.c 2004-07-08 21:20:15.000000000 +0800 -+++ ../sun/gnome-pilot/capplet/gnome-pilot-ddialog.c 2005-11-15 19:02:03.000000000 +0800 -@@ -126,7 +126,6 @@ - ; - } - -- - - GtkObject * - gnome_pilot_ddialog_new (GPilotDevice *device) -@@ -230,6 +229,8 @@ - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->device_network), - priv->device->type == PILOT_DEVICE_NETWORK); - } -+ -+ backup_old_device_config (priv->device); - } - - gboolean -@@ -242,15 +243,30 @@ - - gnome_dialog_set_parent (GNOME_DIALOG (priv->dialog), parent); - btn = gnome_dialog_run (GNOME_DIALOG (priv->dialog)); -- -- if (btn == 0) -+ -+ if (btn == 0){ - read_device_config (GTK_OBJECT (gpdd), priv->device); -- -- gnome_dialog_close (GNOME_DIALOG (priv->dialog)); -+ gnome_dialog_close (GNOME_DIALOG (priv->dialog)); - -- if (btn == 0) -- check_device_settings (priv->device); -+ while(!check_device_settings (priv->device)){ -+ restore_old_device_config (priv->device); -+ gtk_entry_set_text (GTK_ENTRY (priv->device_port), priv->device->port); -+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->device_serial), priv->device->type == PILOT_DEVICE_SERIAL); -+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->device_usb), priv->device->type == PILOT_DEVICE_USB_VISOR); -+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->device_irda), priv->device->type == PILOT_DEVICE_IRDA); -+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->device_network), priv->device->type == PILOT_DEVICE_NETWORK); -+ -+ btn = gnome_dialog_run (GNOME_DIALOG (priv->dialog)); -+ if(btn){ -+ break; -+ } else { -+ read_device_config (GTK_OBJECT (gpdd), priv->device); -+ gnome_dialog_close (GNOME_DIALOG (priv->dialog)); -+ } -+ } -+ } - -+ gnome_dialog_close (GNOME_DIALOG (priv->dialog)); - return btn == 0 ? TRUE : FALSE; - } - -diff -u -r gnome-pilot-2.0.13/capplet/gnome-pilot-druid.c ../sun/gnome-pilot/capplet/gnome-pilot-druid.c ---- gnome-pilot-2.0.13/capplet/gnome-pilot-druid.c 2005-03-29 01:33:04.000000000 +0800 -+++ ../sun/gnome-pilot/capplet/gnome-pilot-druid.c 2005-11-21 16:11:17.000000000 +0800 -@@ -224,18 +224,21 @@ - priv->page_conduits = GW ("druidpage_conduits"); - priv->page_finish = GW ("druidpage_finish"); - -- priv->device_name = GW ("device_name_entry"); -- priv->device_port = GW ("device_port_entry"); -- priv->device_speed = GW ("device_speed_menu"); -+ priv->device_name = GW ("device_name_entry_druid"); -+ priv->device_port = GW ("device_port_entry_druid"); -+ priv->device_speed = GW ("device_speed_menu_druid"); - priv->device_timeout = GW ("device_timeout_spinner"); - priv->device_usb = GW ("usb_radio"); -+ -+ gtk_toggle_button_set_active ((GtkToggleButton *)priv->device_usb, TRUE); -+ - priv->device_irda = GW ("irda_radio"); - priv->device_network = GW ("network_radio"); - - priv->pilot_info = GW ("pilot_user_frame"); - priv->pilot_info_no = GW ("no_radio_button"); -- priv->pilot_username = GW ("pilot_username_entry"); -- priv->pilot_id = GW ("pilot_id_entry"); -+ priv->pilot_username = GW ("pilot_username_entry_druid"); -+ priv->pilot_id = GW ("pilot_id_entry_druid"); - - /* FIXME: is this a libglade bug or what? if sync_label - is constructed in .glade it is not properly redrawn the first time. */ -diff -u -r gnome-pilot-2.0.13/capplet/gnome-pilot-pdialog.c ../sun/gnome-pilot/capplet/gnome-pilot-pdialog.c ---- gnome-pilot-2.0.13/capplet/gnome-pilot-pdialog.c 2004-09-04 00:09:23.000000000 +0800 -+++ ../sun/gnome-pilot/capplet/gnome-pilot-pdialog.c 2005-11-10 16:16:02.000000000 +0800 -@@ -148,7 +148,6 @@ - ; - } - -- - - GtkObject * - gnome_pilot_pdialog_new (GnomePilotClient *gpc, PilotState *state, GPilotPilot *pilot) -@@ -268,10 +267,19 @@ - priv = gppd->priv; - - gnome_dialog_set_parent (GNOME_DIALOG (priv->dialog), parent); -+ backup_old_basedir (priv->pilot); - btn = gnome_dialog_run (GNOME_DIALOG (priv->dialog)); - -- if (btn == 0) -- read_pilot_config (GTK_OBJECT (gppd), priv->pilot); -+ if (btn == 0){ -+ while(!read_pilot_config (GTK_OBJECT (gppd), priv->pilot)){ -+ btn = gnome_dialog_run (GNOME_DIALOG (priv->dialog)); -+ if (btn){ -+ restore_old_basedir (priv->pilot); -+ break; -+ } -+ } -+ } -+ - - gnome_dialog_close (GNOME_DIALOG (priv->dialog)); - -diff -u -r gnome-pilot-2.0.13/capplet/gpilotd-capplet.glade ../sun/gnome-pilot/capplet/gpilotd-capplet.glade ---- gnome-pilot-2.0.13/capplet/gpilotd-capplet.glade 2003-05-06 03:50:20.000000000 +0800 -+++ ../sun/gnome-pilot/capplet/gpilotd-capplet.glade 2005-12-15 20:37:55.145079000 +0800 -@@ -11,6 +11,12 @@ - False - True - False -+ True -+ False -+ False -+ GDK_WINDOW_TYPE_HINT_NORMAL -+ GDK_GRAVITY_NORTH_WEST -+ True - - - -@@ -55,9 +61,10 @@ - True - True - True -- Add... -+ _Add... - True - GTK_RELIEF_NORMAL -+ True - - - -@@ -66,9 +73,10 @@ - True - True - True -- Edit... -+ _Edit... - True - GTK_RELIEF_NORMAL -+ True - - - -@@ -77,9 +85,10 @@ - True - True - True -- Delete -+ De_lete - True - GTK_RELIEF_NORMAL -+ True - - - -@@ -99,8 +108,8 @@ - - - True -- Pilots -- False -+ _Pilots -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -109,6 +118,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - tab -@@ -148,9 +161,10 @@ - True - True - True -- Add... -+ _Add... - True - GTK_RELIEF_NORMAL -+ True - - - -@@ -159,9 +173,10 @@ - True - True - True -- Edit... -+ _Edit... - True - GTK_RELIEF_NORMAL -+ True - - - -@@ -170,9 +185,10 @@ - True - True - True -- Delete -+ De_lete - True - GTK_RELIEF_NORMAL -+ True - - - -@@ -192,8 +208,8 @@ - - - True -- Devices -- False -+ _Devices -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -202,6 +218,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - tab -@@ -227,8 +247,8 @@ - - - True -- Pilot Name: -- False -+ Pilot _Name: -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -237,6 +257,11 @@ - 0.5 - 0 - 0 -+ pilots_menu -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -261,6 +286,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -307,6 +336,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 1 -@@ -345,9 +378,10 @@ - True - True - True -- Enable -+ _Enable - True - GTK_RELIEF_NORMAL -+ True - - - -@@ -356,9 +390,10 @@ - True - True - True -- Disable -+ D_isable - True - GTK_RELIEF_NORMAL -+ True - - - -@@ -367,9 +402,10 @@ - True - True - True -- Settings... -+ _Settings... - True - GTK_RELIEF_NORMAL -+ True - - - -@@ -403,6 +439,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - -@@ -419,6 +459,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - label_item -@@ -466,8 +510,8 @@ - - - True -- Conduits -- False -+ C_onduits -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -476,6 +520,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - tab -@@ -492,6 +540,12 @@ - True - False - False -+ True -+ False -+ False -+ GDK_WINDOW_TYPE_HINT_DIALOG -+ GDK_GRAVITY_NORTH_WEST -+ True - False - True - -@@ -514,6 +568,7 @@ - gtk-ok - True - GTK_RELIEF_NORMAL -+ True - - - -@@ -525,6 +580,7 @@ - gtk-cancel - True - GTK_RELIEF_NORMAL -+ True - - - -@@ -562,8 +618,8 @@ - - - True -- Name -- False -+ _Name -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -572,6 +628,11 @@ - 0.5 - 0 - 0 -+ device_name_entry -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -586,8 +647,8 @@ - - - True -- Port -- False -+ _Port -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -596,6 +657,11 @@ - 0.5 - 0 - 0 -+ device_port_entry -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -610,8 +676,8 @@ - - - True -- Speed -- False -+ _Speed -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -620,6 +686,11 @@ - 0.5 - 0 - 0 -+ device_speed_menu -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -639,6 +710,9 @@ - False - True - False -+ -+ Port -+ - - - -@@ -649,7 +723,7 @@ - 0 - - True -- * -+ * - False - - -@@ -660,6 +734,32 @@ - GTK_SELECTION_BROWSE - - -+ -+ True -+ -+ -+ -+ True -+ usb: -+ False -+ False -+ GTK_JUSTIFY_LEFT -+ False -+ False -+ 0 -+ 0.5 -+ 0 -+ 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 -+ -+ -+ -+ -+ -+ - - True - -@@ -676,6 +776,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - -@@ -698,6 +802,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - -@@ -720,6 +828,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - -@@ -742,6 +854,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - -@@ -764,6 +880,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - -@@ -786,6 +906,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - -@@ -808,6 +932,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - -@@ -855,7 +983,7 @@ - 0 - - True -- * -+ * - False - - -@@ -880,6 +1008,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -901,9 +1033,10 @@ - - True - True -- Serial -+ S_erial - True - GTK_RELIEF_NORMAL -+ True - True - False - True -@@ -919,9 +1052,10 @@ - - True - True -- USB -+ _USB - True - GTK_RELIEF_NORMAL -+ True - False - False - True -@@ -938,9 +1072,10 @@ - - True - True -- IrDA -+ _IrDA - True - GTK_RELIEF_NORMAL -+ True - False - False - True -@@ -957,9 +1092,10 @@ - - True - True -- Network -+ Net_work - True - GTK_RELIEF_NORMAL -+ True - False - False - True -@@ -985,8 +1121,8 @@ - - - True -- Timeout -- False -+ _Timeout -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -995,6 +1131,11 @@ - 0.5 - 0 - 0 -+ timeout_spinner -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -1042,6 +1183,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - label_item -@@ -1077,6 +1222,12 @@ - True - False - False -+ True -+ False -+ False -+ GDK_WINDOW_TYPE_HINT_DIALOG -+ GDK_GRAVITY_NORTH_WEST -+ True - False - True - -@@ -1099,6 +1250,7 @@ - gtk-ok - True - GTK_RELIEF_NORMAL -+ True - - - -@@ -1110,6 +1262,7 @@ - gtk-cancel - True - GTK_RELIEF_NORMAL -+ True - - - -@@ -1153,8 +1306,8 @@ - - - True -- User Name -- False -+ User _Name -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -1163,6 +1316,11 @@ - 0.5 - 0 - 0 -+ pilot_username_entry -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -1183,7 +1341,7 @@ - 0 - - True -- * -+ * - False - - -@@ -1198,8 +1356,8 @@ - - - True -- ID -- False -+ _ID -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -1208,6 +1366,11 @@ - 0.5 - 0 - 0 -+ pilot_id_entry -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -1228,7 +1391,7 @@ - 0 - - True -- * -+ * - False - - -@@ -1259,9 +1422,10 @@ - True - Get User Name and ID from existing pilot that was used before. - True -- Get from pilot -+ _Get from pilot - True - GTK_RELIEF_NORMAL -+ True - - - 0 -@@ -1275,9 +1439,10 @@ - True - Set User Name and ID to a new pilot. - True -- Send to pilot -+ _Send to pilot - True - GTK_RELIEF_NORMAL -+ True - - - 0 -@@ -1308,6 +1473,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - label_item -@@ -1341,8 +1510,8 @@ - - - True -- Pilot Name -- False -+ _Pilot Name -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -1351,6 +1520,11 @@ - 0.5 - 0 - 0 -+ pilot_name_entry -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -1371,7 +1545,7 @@ - 0 - - True -- * -+ * - False - - -@@ -1386,8 +1560,8 @@ - - - True -- Local basedir -- False -+ _Local basedir -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -1396,6 +1570,11 @@ - 0.5 - 0 - 0 -+ pilot_basedir_entry -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -1416,7 +1595,7 @@ - 0 - - True -- * -+ * - False - - -@@ -1443,6 +1622,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - label_item -@@ -1478,6 +1661,12 @@ - False - False - False -+ True -+ False -+ False -+ GDK_WINDOW_TYPE_HINT_DIALOG -+ GDK_GRAVITY_NORTH_WEST -+ True - False - True - -@@ -1500,6 +1689,7 @@ - gtk-ok - True - GTK_RELIEF_NORMAL -+ True - - - -@@ -1511,6 +1701,7 @@ - gtk-cancel - True - GTK_RELIEF_NORMAL -+ True - - - -@@ -1556,6 +1747,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - label_item -@@ -1584,6 +1779,12 @@ - True - True - False -+ True -+ False -+ False -+ GDK_WINDOW_TYPE_HINT_NORMAL -+ GDK_GRAVITY_NORTH_WEST -+ True - - - -@@ -1632,8 +1833,8 @@ - - - True -- Name -- False -+ _Name -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -1642,6 +1843,11 @@ - 0.5 - 0 - 0 -+ device_name_entry_druid -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -1656,8 +1862,8 @@ - - - True -- Port -- False -+ _Port -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -1666,6 +1872,14 @@ - 0.5 - 0 - 0 -+ device_port_entry_druid -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 -+ -+ -+ - - - 0 -@@ -1680,8 +1894,8 @@ - - - True -- Speed -- False -+ _Speed -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -1690,6 +1904,11 @@ - 0.5 - 0 - 0 -+ device_speed_menu_druid -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -1709,9 +1928,12 @@ - False - True - False -+ -+ Port -+ - - -- -+ - True - True - True -@@ -1719,7 +1941,7 @@ - 0 - - True -- * -+ * - False - - -@@ -1730,6 +1952,32 @@ - GTK_SELECTION_BROWSE - - -+ -+ True -+ -+ -+ -+ True -+ usb: -+ False -+ False -+ GTK_JUSTIFY_LEFT -+ False -+ False -+ 0 -+ 0.5 -+ 0 -+ 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 -+ -+ -+ -+ -+ -+ - - True - -@@ -1746,6 +1994,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - -@@ -1768,6 +2020,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - -@@ -1790,6 +2046,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - -@@ -1812,6 +2072,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - -@@ -1834,6 +2098,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - -@@ -1856,6 +2124,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - -@@ -1873,7 +2145,7 @@ - - - -- -+ - True - True - -1 -@@ -1895,7 +2167,7 @@ - - - -- -+ - True - True - True -@@ -1903,7 +2175,7 @@ - 0 - - True -- * -+ * - False - - -@@ -1925,9 +2197,10 @@ - - True - True -- Serial -+ S_erial - True - GTK_RELIEF_NORMAL -+ True - True - False - True -@@ -1943,9 +2216,10 @@ - - True - True -- USB -+ _USB - True - GTK_RELIEF_NORMAL -+ True - False - False - True -@@ -1962,9 +2236,10 @@ - - True - True -- IrDA -+ _IrDA - True - GTK_RELIEF_NORMAL -+ True - False - False - True -@@ -1981,9 +2256,10 @@ - - True - True -- Network -+ Net_work - True - GTK_RELIEF_NORMAL -+ True - False - False - True -@@ -2018,6 +2294,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -2032,8 +2312,8 @@ - - - True -- Timeout -- False -+ _Timeout -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -2042,6 +2322,11 @@ - 0.5 - 0 - 0 -+ device_timeout_spinner -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -2108,9 +2393,10 @@ - - - True -- Yes, I've used sync software with this pilot before. -+ _Yes, I've used sync software with this pilot before. - True - GTK_RELIEF_NORMAL -+ True - True - False - True -@@ -2125,9 +2411,10 @@ - - - True -- No, I've never used sync software with this pilot before. -+ _No, I've never used sync software with this pilot before. - True - GTK_RELIEF_NORMAL -+ True - False - False - True -@@ -2161,8 +2448,8 @@ - - - True -- User Name -- False -+ _User Name -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -2171,6 +2458,11 @@ - 0.5 - 0 - 0 -+ pilot_username_entry_druid -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -2185,8 +2477,8 @@ - - - True -- ID -- False -+ _ID -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -2195,6 +2487,11 @@ - 0.5 - 0 - 0 -+ pilot_id_entry_druid -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -2207,7 +2504,7 @@ - - - -- -+ - True - Enter user name you want stored on your pilot - True -@@ -2216,7 +2513,7 @@ - 0 - - True -- * -+ * - False - - -@@ -2229,7 +2526,7 @@ - - - -- -+ - True - This integer ID identifies your pilot and must be unique between different pilots that you use. - True -@@ -2238,7 +2535,7 @@ - 0 - - True -- * -+ * - False - - -@@ -2265,6 +2562,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - label_item -@@ -2336,8 +2637,8 @@ - - - True -- Pilot Name -- False -+ _Pilot Name -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -2346,6 +2647,11 @@ - 0.5 - 0 - 0 -+ pilot_name_entry -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -2367,7 +2673,7 @@ - 0 - - True -- * -+ * - False - - -@@ -2382,8 +2688,8 @@ - - - True -- Local basedir -- False -+ _Local basedir -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -2392,6 +2698,11 @@ - 0.5 - 0 - 0 -+ pilot_basedir_entry -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -2413,7 +2724,7 @@ - 0 - - True -- * -+ * - False - - -@@ -2461,6 +2772,12 @@ - False - False - False -+ True -+ False -+ False -+ GDK_WINDOW_TYPE_HINT_DIALOG -+ GDK_GRAVITY_NORTH_WEST -+ True - False - True - -@@ -2483,6 +2800,7 @@ - gtk-ok - True - GTK_RELIEF_NORMAL -+ True - - - -@@ -2494,6 +2812,7 @@ - gtk-cancel - True - GTK_RELIEF_NORMAL -+ True - - - -@@ -2556,8 +2875,8 @@ - - - True -- Action: -- False -+ _Action: -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -2566,6 +2885,11 @@ - 0.5 - 0 - 0 -+ sync_actions_menu -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -2580,8 +2904,8 @@ - - - True -- One Time Action: -- False -+ _One Time Action: -+ True - False - GTK_JUSTIFY_CENTER - False -@@ -2590,6 +2914,11 @@ - 0.5 - 0 - 0 -+ sync_one_actions_menu -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -2646,6 +2975,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - label_item -@@ -2684,6 +3017,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - label_item -diff -u -r gnome-pilot-2.0.13/capplet/util.c ../sun/gnome-pilot/capplet/util.c ---- gnome-pilot-2.0.13/capplet/util.c 2004-09-04 00:09:23.000000000 +0800 -+++ ../sun/gnome-pilot/capplet/util.c 2005-11-15 22:25:39.000000000 +0800 -@@ -259,9 +259,9 @@ - GPilotDevice *device = g_new0 (GPilotDevice, 1); - - device->name = next_cradle_name (state); -- device->port = g_strdup ("/dev/pilot"); -+ device->port = g_strdup ("usb:"); - device->speed = speedList[DEFAULT_SPEED_INDEX]; -- device->type = PILOT_DEVICE_SERIAL; -+ device->type = PILOT_DEVICE_USB_VISOR; - device->timeout = 2; - - return device; -@@ -316,14 +316,21 @@ - const gchar *curname; - - curname = gtk_entry_get_text (GTK_ENTRY (editable)); -+ -+ /* pilot-link with libusb support need to use "usb:" as the port "name", -+ so no need to check if the initial character is "/" -+ */ -+ - if (*curname == '\0' && len > 0) { -+ /* - if (text[0]!='/') { - gtk_signal_emit_stop_by_name (GTK_OBJECT (editable), "insert_text"); - return; - } -+ */ - } else { - for (i =0;iold_port = g_strdup (device->port); -+ device->old_type = device->type; -+} -+ -+void -+restore_old_device_config (GPilotDevice* device) -+{ -+ if (device->port) -+ g_free (device->port); -+ device->port = g_strdup (device->old_port); -+ -+ device->type = device->old_type; -+} -+ -+void - read_device_config (GtkObject *object, GPilotDevice* device) - { - GtkWidget *port_entry, *speed_menu, *item, *name_entry; -@@ -532,7 +556,18 @@ - device->timeout = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (timeout_spinner)); - } - --void -+void backup_old_basedir (GPilotPilot *pilot) -+{ -+ pilot->sync_options.old_basedir = g_strdup (pilot->sync_options.basedir); -+} -+ -+void restore_old_basedir (GPilotPilot *pilot) -+{ -+ g_free (pilot->sync_options.basedir); -+ pilot->sync_options.basedir = g_strdup (pilot->sync_options.old_basedir); -+} -+ -+gboolean - read_pilot_config (GtkObject *object, GPilotPilot *pilot) - { - GtkWidget *id, *name, *pname, *basedir, *menu; -@@ -561,6 +596,8 @@ - if (pilot->sync_options.basedir) - g_free (pilot->sync_options.basedir); - pilot->sync_options.basedir = g_strdup (gtk_entry_get_text (GTK_ENTRY (basedir))); -+ -+ return check_base_directory(gtk_entry_get_text(GTK_ENTRY(basedir))); - } - - void -@@ -589,5 +626,15 @@ - } - } - -+ if (device->type == PILOT_DEVICE_USB_VISOR) { -+ g_message ("checking port on %s", device->port); -+ if (strcmp(device->port, "usb:")) { -+ str = g_strdup_printf ("%s\n", _("USB connection MUST use port \"usb:\"")); -+ error_dialog (NULL, str); -+ g_free (str); -+ return FALSE; -+ } -+ } -+ - return TRUE; - } -diff -u -r gnome-pilot-2.0.13/capplet/util.h ../sun/gnome-pilot/capplet/util.h ---- gnome-pilot-2.0.13/capplet/util.h 2003-04-23 05:14:10.000000000 +0800 -+++ ../sun/gnome-pilot/capplet/util.h 2005-11-10 16:16:02.000000000 +0800 -@@ -64,7 +64,7 @@ - - /* Configuration routines */ - void read_device_config (GtkObject *object, GPilotDevice* device); --void read_pilot_config (GtkObject *object, GPilotPilot *pilot); -+gboolean read_pilot_config (GtkObject *object, GPilotPilot *pilot); - - void save_config_and_restart (GnomePilotClient *gpc, PilotState *state); - -diff -u -r gnome-pilot-2.0.13/conduits/backup/backup.conduit.in ../sun/gnome-pilot/conduits/backup/backup.conduit.in ---- gnome-pilot-2.0.13/conduits/backup/backup.conduit.in 2001-03-01 06:43:02.000000000 +0800 -+++ ../sun/gnome-pilot/conduits/backup/backup.conduit.in 2005-10-28 11:23:11.000000000 +0800 -@@ -1,7 +1,7 @@ - - - -- -+ - - - -diff -u -r gnome-pilot-2.0.13/conduits/backup/backup_conduit.c ../sun/gnome-pilot/conduits/backup/backup_conduit.c ---- gnome-pilot-2.0.13/conduits/backup/backup_conduit.c 2003-03-18 23:12:25.000000000 +0800 -+++ ../sun/gnome-pilot/conduits/backup/backup_conduit.c 2005-12-16 10:13:12.000000000 +0800 -@@ -263,6 +265,7 @@ - g_list_foreach ((*c)->exclude_files,(GFunc)g_free,NULL); - g_list_free ((*c)->exclude_files); - g_free ((*c)->backup_dir); -+ g_free ((*c)->old_backup_dir); - g_free (*c); - *c = NULL; - } -@@ -387,7 +390,7 @@ - int keep_reading; - int entries; - int err; -- unsigned char *buffer; -+ pi_buffer_t *buffer = NULL; - PilotRecord remote; - int wrote; - -@@ -473,21 +476,24 @@ - goto db_close; - } - -- buffer = g_new0 (unsigned char, 0xffff); -- remote.buffer = buffer; -+ buffer = pi_buffer_new(DLP_BUF_SIZE); -+ if(buffer == NULL){ -+ result = pi_set_error(dbinfo->pilot_socket, PI_ERR_GENERIC_MEMORY); -+ } - - { - int l; - l = dlp_ReadAppBlock (dbinfo->pilot_socket, - dbinfo->db_handle, - 0, -- buffer, -- 0xffff); -+ DLP_BUF_SIZE, -+ buffer); - if (l>0) { -- pi_file_set_app_info (f, buffer, l); -+ pi_file_set_app_info (f, buffer->data, l); - } - } - -+ remote.buffer = buffer; - - index = 0; - keep_reading = 1; -@@ -500,19 +506,18 @@ - keep_reading = (dlp_ReadResourceByIndex (dbinfo->pilot_socket, - dbinfo->db_handle, - index, -- remote.buffer, -+ buffer, - &type, -- &id, -- &remote.len) >= 0); -+ &id) >= 0); - #ifdef DEBUG_REC_IO - g_message ("read resource %d, type = %s, size %d, , index %d/%d", -- id, pi_unmktag (type), remote.len, -- index, entries); -+ id, pi_unmktag (type), buffer->used, -+ index, entries); - #endif - if (keep_reading) { - err = pi_file_append_resource (f, -- remote.buffer, -- remote.len, -+ buffer->data, -+ buffer->used, - type, - id); - if (err < 0) { -@@ -521,7 +526,7 @@ - wrote++; - #ifdef DEBUG_REC_IO - g_message ("write resource %d, type = %s, size %d, index %d/%d", -- id, pi_unmktag (type), remote.len, -+ id, pi_unmktag (type), buffer->used, - index, entries); - #endif - } -@@ -530,22 +535,21 @@ - keep_reading = (dlp_ReadRecordByIndex (dbinfo->pilot_socket, - dbinfo->db_handle, - index, -- remote.buffer, -+ buffer, - &remote.recID, -- &remote.len, - &remote.flags, - &remote.catID) >= 0); - - #ifdef DEBUG_REC_IO - g_message ("read record %d, size %d, index %d/%d", -- remote.recID, remote.len, -+ remote.recID, buffer->used, - index, entries); - #endif - - if (keep_reading) { - err = pi_file_append_record (f, -- remote.buffer, -- remote.len, -+ buffer->data, -+ buffer->used, - remote.flags, - remote.catID, - remote.recID); -@@ -555,7 +559,7 @@ - wrote++; - #ifdef DEBUG_REC_IO - g_message ("write record %d, size %d, index %d/%d", -- id, remote.len, -+ id, buffer->used, - index, entries); - #endif - } -@@ -569,8 +573,8 @@ - index); - } while (keep_reading && index < entries); - -- g_free (buffer); -- -+ pi_buffer_free (buffer); -+ - if (pi_file_close (f) < 0) { - g_warning("backup conduit can't write file"); - gnome_pilot_conduit_send_error(GNOME_PILOT_CONDUIT(conduit), -@@ -760,6 +764,8 @@ - GtkWidget *button, *spin; - GtkObject *adjustment; - -+ AtkObject *atk_widget; -+ - vbox = gtk_vbox_new(FALSE, GNOME_PAD); - - table = gtk_table_new(2, 4, FALSE); -@@ -767,7 +773,7 @@ - gtk_table_set_col_spacings(GTK_TABLE(table), 10); - gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, GNOME_PAD); - -- label = gtk_label_new(_("Backup directory")); -+ label = gtk_label_new_with_mnemonic (_("_Backup directory")); - gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 0, 1); - - entry = gtk_entry_new_with_max_length(128); -@@ -777,21 +783,33 @@ - GTK_SIGNAL_FUNC(insert_dir_callback), - NULL); - -- label = gtk_label_new(_("Only backup changed bases")); -+ gtk_label_set_mnemonic_widget (GTK_LABEL(label), entry); -+ atk_widget = gtk_widget_get_accessible (entry); -+ atk_object_set_name (atk_widget, _("Backup directory")); -+ -+ label = gtk_label_new_with_mnemonic (_("O_nly backup changed bases")); - gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 1,2); - - button = gtk_check_button_new(); - gtk_object_set_data(GTK_OBJECT(vbox), "only_changed", button); - gtk_table_attach_defaults(GTK_TABLE(table), button, 1, 2, 1,2); - -- label = gtk_label_new(_("Remove local base if deleted on pilot")); -+ gtk_label_set_mnemonic_widget (GTK_LABEL(label), button); -+ atk_widget = gtk_widget_get_accessible (button); -+ atk_object_set_name (atk_widget, _("Only backup changed bases")); -+ -+ label = gtk_label_new_with_mnemonic(_("_Remove local base if deleted on pilot")); - gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 2,3); - - button = gtk_check_button_new(); - gtk_object_set_data(GTK_OBJECT(vbox), "remove_local", button); - gtk_table_attach_defaults(GTK_TABLE(table), button, 1, 2, 2,3); - -- label = gtk_label_new(_("# of old backups to keep")); -+ gtk_label_set_mnemonic_widget (GTK_LABEL(label), button); -+ atk_widget = gtk_widget_get_accessible (button); -+ atk_object_set_name (atk_widget, _("Remove local base if deleted on pilot")); -+ -+ label = gtk_label_new_with_mnemonic (_("# of old backups to _keep")); - gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 3,4); - - adjustment = gtk_adjustment_new (0, 0, 100, 1, 1, 1); -@@ -799,9 +817,76 @@ - gtk_object_set_data(GTK_OBJECT(vbox), "no_of_backups", adjustment); - gtk_table_attach_defaults(GTK_TABLE(table), spin, 1, 2, 3, 4); - -+ gtk_label_set_mnemonic_widget (GTK_LABEL(label), spin); -+ atk_widget = gtk_widget_get_accessible (spin); -+ atk_object_set_name (atk_widget, _("# of old backups to keep")); -+ - return vbox; - } - -+void -+error_dialog (GtkWindow *parent, gchar *mesg, ...) -+{ -+ GtkWidget *dlg; -+ char *tmp; -+ va_list ap; -+ -+ va_start (ap,mesg); -+ tmp = g_strdup_vprintf (mesg,ap); -+ -+ dlg = gtk_message_dialog_new (parent, GTK_DIALOG_DESTROY_WITH_PARENT, -+ GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, tmp); -+ gtk_dialog_run (GTK_DIALOG (dlg)); -+ gtk_widget_destroy (dlg); -+ -+ va_end (ap); -+ g_free (tmp); -+} -+ -+gboolean -+check_base_directory (const gchar *dir_name) -+{ -+ gboolean ret = TRUE; -+ /* check basedir validity */ -+ -+ if (mkdir (dir_name, 0700) < 0 ) { -+ struct stat buf; -+ gchar *errstr; -+ switch (errno) { -+ case EEXIST: -+ stat (dir_name, &buf); -+ if (S_ISDIR (buf.st_mode)) { -+ if (!(buf.st_mode & (S_IRUSR | S_IWUSR |S_IXUSR))) { -+ error_dialog (NULL, _("The specified backup directory exists but has the wrong permissions.\n" -+ "Please fix or choose another directory")); -+ ret = FALSE; -+ } -+ } else { -+ error_dialog (NULL, _("The specified backup directory exists but is not a directory.\n" -+ "Please make it a directory or choose another directory")); -+ ret = FALSE; -+ } -+ break; -+ -+ case EACCES: -+ error_dialog (NULL, _("It wasn't possible to create the specified backup directory.\n" -+ "Please verify the permissions on the specified path or choose another directory")); -+ ret = FALSE; -+ break; -+ case ENOENT: -+ error_dialog (NULL, _("The path specified for the backup directory is invalid.\n" -+ "Please choose another directory")); -+ ret = FALSE; -+ break; -+ default: -+ errstr = strerror (errno); -+ error_dialog (NULL, errstr); -+ ret = FALSE; -+ } -+ } -+ return ret; -+} -+ - static void - setOptionsCfg(GtkWidget *pilotcfg, ConduitCfg *state) - { -@@ -817,8 +902,10 @@ - g_assert(updated_only!=NULL); - g_assert(remove_deleted!=NULL); - g_assert(adj!=NULL); -+ -+ state->old_backup_dir = g_strdup(state->backup_dir); - -- gtk_entry_set_text(GTK_ENTRY(dir), state->backup_dir); -+ gtk_entry_set_text(GTK_ENTRY(dir), state->old_backup_dir); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(updated_only), state->updated_only); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(remove_deleted), state->remove_deleted); - gtk_adjustment_set_value (GTK_ADJUSTMENT(adj), state->no_of_backups); -@@ -836,7 +923,14 @@ - remove_deleted = gtk_object_get_data(GTK_OBJECT(pilotcfg), "remove_local"); - adj = gtk_object_get_data(GTK_OBJECT(pilotcfg), "no_of_backups"); - -- state->backup_dir = g_strdup(gtk_entry_get_text(GTK_ENTRY(dir))); -+ if(state->backup_dir) -+ g_free(state->backup_dir); -+ if(check_base_directory ( gtk_entry_get_text (GTK_ENTRY (dir)))){ -+ state->backup_dir = g_strdup(gtk_entry_get_text(GTK_ENTRY(dir))); -+ } else { -+ state->backup_dir = g_strdup(state->old_backup_dir); -+ gtk_entry_set_text(GTK_ENTRY(dir), state->old_backup_dir); -+ } - state->updated_only = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(updated_only)); - state->remove_deleted = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(remove_deleted)); - state->no_of_backups = GTK_ADJUSTMENT(adj)->value; -diff -u -r gnome-pilot-2.0.13/conduits/backup/backup_conduit.h ../sun/gnome-pilot/conduits/backup/backup_conduit.h ---- gnome-pilot-2.0.13/conduits/backup/backup_conduit.h 2001-03-02 04:20:49.000000000 +0800 -+++ ../sun/gnome-pilot/conduits/backup/backup_conduit.h 2005-11-10 18:50:22.000000000 +0800 -@@ -38,6 +38,7 @@ - - typedef struct ConduitCfg { - gchar *backup_dir; -+ gchar *old_backup_dir; /* restore the original value if users set an invalid backup directory */ - GList *exclude_files; - GList *files_in_backup; /* contains the file in backup, any entries when - destroy is called are considered deleted on PDA */ -diff -u -r gnome-pilot-2.0.13/conduits/file/file.conduit.in ../sun/gnome-pilot/conduits/file/file.conduit.in ---- gnome-pilot-2.0.13/conduits/file/file.conduit.in 2001-03-01 06:43:04.000000000 +0800 -+++ ../sun/gnome-pilot/conduits/file/file.conduit.in 2005-10-28 11:23:12.000000000 +0800 -@@ -1,7 +1,7 @@ - - - -- -+ - - - -diff -u -r gnome-pilot-2.0.13/conduits/test/test.conduit ../sun/gnome-pilot/conduits/test/test.conduit ---- gnome-pilot-2.0.13/conduits/test/test.conduit 2005-04-09 12:15:49.000000000 +0800 -+++ ../sun/gnome-pilot/conduits/test/test.conduit 2005-12-15 18:25:05.977894000 +0800 -@@ -1,9 +1,9 @@ - -- -+ - -- -+ - - - -- -+ - -diff -u -r gnome-pilot-2.0.13/conduits/test/test.conduit.in ../sun/gnome-pilot/conduits/test/test.conduit.in ---- gnome-pilot-2.0.13/conduits/test/test.conduit.in 2001-03-01 06:43:08.000000000 +0800 -+++ ../sun/gnome-pilot/conduits/test/test.conduit.in 2005-10-28 11:23:12.000000000 +0800 -@@ -1,7 +1,7 @@ - - - -- -+ - - - -diff -u -r gnome-pilot-2.0.13/gpilotd/Makefile.am ../sun/gnome-pilot/gpilotd/Makefile.am ---- gnome-pilot-2.0.13/gpilotd/Makefile.am 2005-04-09 12:14:27.000000000 +0800 -+++ ../sun/gnome-pilot/gpilotd/Makefile.am 2005-08-12 18:10:15.000000000 +0800 -@@ -68,7 +68,9 @@ - $(NULL) - - %.c %.h: %.gob -- $(GOB) --always-private-header -w $< -+ if test $(GOB) != "no" ; then \ -+ $(GOB) --always-private-header -w $< ;fi -+ - - #$(GOB_BUILT_SRCS): $(gobfiles) - # @for GF in $(gobfiles); do (echo -n "$(GOB) -w $$GF..." && $(GOB) -w $$GF && echo " ok"); done; -diff -u -r gnome-pilot-2.0.13/gpilotd/Makefile.in ../sun/gnome-pilot/gpilotd/Makefile.in ---- gnome-pilot-2.0.13/gpilotd/Makefile.in 2005-04-09 12:15:03.000000000 +0800 -+++ ../sun/gnome-pilot/gpilotd/Makefile.in 2005-08-12 18:10:15.000000000 +0800 -@@ -963,8 +963,8 @@ - && rm -f xgen-gmc - - %.c %.h: %.gob -- $(GOB) --always-private-header -w $< -- -+ if test $(GOB) != "no" ; then \ -+ $(GOB) --always-private-header -w $< ;fi - $(CORBA_SRCLIST): $(idl_files) - $(ORBIT_IDL) $(idl_files) - $(server_in_files:.server.in.in=.server.in): $(server_in_files) -diff -u -r gnome-pilot-2.0.13/gpilotd/gnome-pilot-conduit-backup.c ../sun/gnome-pilot/gpilotd/gnome-pilot-conduit-backup.c ---- gnome-pilot-2.0.13/gpilotd/gnome-pilot-conduit-backup.c 2005-04-05 05:26:20.000000000 +0800 -+++ ../sun/gnome-pilot/gpilotd/gnome-pilot-conduit-backup.c 2005-08-12 17:56:07.000000000 +0800 -@@ -1,4 +1,4 @@ --/* Generated by GOB (v2.0.11) on Mon Apr 4 17:26:20 2005 -+/* Generated by GOB (v2.0.11) on Mon Aug 1 14:55:46 2005 - (do not edit directly) */ - - /* End world hunger, donate to the World Food Programme, http://www.wfp.org */ -diff -u -r gnome-pilot-2.0.13/gpilotd/gnome-pilot-conduit-file.c ../sun/gnome-pilot/gpilotd/gnome-pilot-conduit-file.c ---- gnome-pilot-2.0.13/gpilotd/gnome-pilot-conduit-file.c 2005-04-05 05:26:20.000000000 +0800 -+++ ../sun/gnome-pilot/gpilotd/gnome-pilot-conduit-file.c 2005-08-12 17:56:08.000000000 +0800 -@@ -1,4 +1,4 @@ --/* Generated by GOB (v2.0.11) on Mon Apr 4 17:26:20 2005 -+/* Generated by GOB (v2.0.11) on Mon Aug 1 14:55:46 2005 - (do not edit directly) */ - - /* End world hunger, donate to the World Food Programme, http://www.wfp.org */ -diff -u -r gnome-pilot-2.0.13/gpilotd/gnome-pilot-conduit-standard-abs.c ../sun/gnome-pilot/gpilotd/gnome-pilot-conduit-standard-abs.c ---- gnome-pilot-2.0.13/gpilotd/gnome-pilot-conduit-standard-abs.c 2004-08-27 04:21:13.000000000 +0800 -+++ ../sun/gnome-pilot/gpilotd/gnome-pilot-conduit-standard-abs.c 2005-08-12 17:56:07.000000000 +0800 -@@ -438,7 +438,6 @@ - index, - remote.record, - &remote.ID, -- &remote.length, - &remote.attr, - &remote.category) >= 0) { - standard_abs_compute_attr_field(&remote); -@@ -1085,7 +1084,6 @@ - local->ID, - remote->record, - &index, -- &remote->length, - &remote->attr, - &remote->category); - remote->ID = local->ID; -@@ -1442,7 +1440,6 @@ - index, - remote.record, - &remote.ID, -- &remote.length, - &remote.attr, - &remote.category) >= 0) { - standard_abs_compute_attr_field(&remote); -@@ -1481,7 +1478,6 @@ - index, - remote.record, - &remote.ID, -- &remote.length, - &remote.attr, - &remote.category) >= 0) { - standard_abs_compute_attr_field(&remote); -@@ -1521,7 +1517,6 @@ - remote.record, - &remote.ID, - &index, -- &remote.length, - &remote.attr, - &remote.category) >= 0) { - standard_abs_compute_attr_field(&remote); -diff -u -r gnome-pilot-2.0.13/gpilotd/gnome-pilot-conduit-standard.c ../sun/gnome-pilot/gpilotd/gnome-pilot-conduit-standard.c ---- gnome-pilot-2.0.13/gpilotd/gnome-pilot-conduit-standard.c 2005-04-05 05:26:20.000000000 +0800 -+++ ../sun/gnome-pilot/gpilotd/gnome-pilot-conduit-standard.c 2005-08-12 17:56:08.000000000 +0800 -@@ -1,4 +1,4 @@ --/* Generated by GOB (v2.0.11) on Mon Apr 4 17:26:20 2005 -+/* Generated by GOB (v2.0.11) on Mon Aug 1 14:55:46 2005 - (do not edit directly) */ - - /* End world hunger, donate to the World Food Programme, http://www.wfp.org */ -diff -u -r gnome-pilot-2.0.13/gpilotd/gnome-pilot-structures.c ../sun/gnome-pilot/gpilotd/gnome-pilot-structures.c ---- gnome-pilot-2.0.13/gpilotd/gnome-pilot-structures.c 2003-04-24 00:55:16.000000000 +0800 -+++ ../sun/gnome-pilot/gpilotd/gnome-pilot-structures.c 2005-11-15 19:02:02.000000000 +0800 -@@ -322,6 +322,7 @@ - } - g_free (device->name); - g_free (device->port); -+ g_free (device->old_port); - gpilot_hdb_uucp_unlock (device); - } - -@@ -885,6 +886,7 @@ - g_free (pilot->passwd); - g_free (pilot->pilot_username); - g_free (pilot->sync_options.basedir); -+ g_free (pilot->sync_options.old_basedir); - g_list_foreach (pilot->trusted_users, (GFunc) g_free, NULL); - g_list_free (pilot->trusted_users); - g_free (pilot); -diff -u -r gnome-pilot-2.0.13/gpilotd/gnome-pilot-structures.h ../sun/gnome-pilot/gpilotd/gnome-pilot-structures.h ---- gnome-pilot-2.0.13/gpilotd/gnome-pilot-structures.h 2003-04-28 22:23:58.000000000 +0800 -+++ ../sun/gnome-pilot/gpilotd/gnome-pilot-structures.h 2005-11-15 19:02:02.000000000 +0800 -@@ -43,6 +43,7 @@ - struct _GPilotSyncOpt { - GnomePilotConduitSyncType default_sync_action; /* Unused, but exists for bin compat */ - gchar *basedir; -+ gchar *old_basedir; /* Restore the original value if users set an invalid base directory */ - }; - typedef struct _GPilotSyncOpt GPilotSyncOpt; - -@@ -86,6 +87,7 @@ - struct _GPilotDevice { - gchar *name; /* symbolic name */ - gchar *port; /* device */ -+ gchar *old_port; /* restore old value when an invalid port is set */ - guint speed; /* speed (for serial) */ - - /* These are used for network (man c++ is soo much cooler) */ -@@ -104,6 +106,7 @@ - - gint timeout; - GPilotDeviceType type; -+ GPilotDeviceType old_type; /* restore old value when an invalid type is set */ - gboolean device_exists : 1; /* whether the usb cradle is active */ - }; - typedef struct _GPilotDevice GPilotDevice; -diff -u -r gnome-pilot-2.0.13/gpilotd/gpilotd.c ../sun/gnome-pilot/gpilotd/gpilotd.c ---- gnome-pilot-2.0.13/gpilotd/gpilotd.c 2004-09-02 23:43:47.000000000 +0800 -+++ ../sun/gnome-pilot/gpilotd/gpilotd.c 2005-08-12 17:56:07.000000000 +0800 -@@ -168,7 +168,8 @@ - - strcpy (addr.pi_device,device->port); - -- ret = pi_bind (listen_sd, (struct sockaddr*)&addr, sizeof (addr)); -+ ret = pi_bind (listen_sd, addr.pi_device); -+ - if (ret == -1) { - g_warning (_("Unable to bind to pilot")); - if (error) -@@ -198,7 +199,11 @@ - - if (error) - *error = 0; -- pi_close(listen_sd); -+ -+ if(listen_sd == sd) -+ g_message("gpilotd_connect listen_socket_id equals accept_socket_id"); -+ else -+ pi_close(listen_sd); - - return sd; - } -@@ -789,7 +794,7 @@ - #endif /* WITH_NETWORK */ - - #ifdef WITH_USB_VISOR --#ifdef linux -+//#ifdef linux - static GPtrArray *vendor_product_ids = NULL; - static GArray *product_net = NULL; - -@@ -880,7 +885,8 @@ - return FALSE; - - load_devices_xml (); -- -+ -+#ifdef linux - /* Check /proc/bus/usb/devices for a usb device */ - f = fopen ("/proc/bus/usb/devices", "r"); - if (!f) -@@ -903,11 +909,19 @@ - } - - fclose (f); -- -+ -+#else /* could be Solaris */ -+ visor_exists = TRUE; -+#endif /* linux */ -+ - if (visor_exists) { - l = context->devices; - while (l) { -+ struct stat dummy; - device = l->data; -+ -+ /*todo: make sure usb device exist*/ -+ - if (device->type == PILOT_DEVICE_USB_VISOR) { - if (!visor_net) - device->type = PILOT_DEVICE_SERIAL; -@@ -928,7 +942,6 @@ - } - - #endif --#endif - - void monitor_channel (GPilotDevice *dev,GPilotContext *context) - { -@@ -959,16 +972,16 @@ - #endif /* WITH_NETWORK */ - } if (dev->type == PILOT_DEVICE_USB_VISOR) { - #ifdef WITH_USB_VISOR --#ifdef linux -+//#ifdef linux - /* We want to watch the /proc/bus/usb/devices file once - * per context, and then check all devices each time it is - * woken up. */ - if (visor_timeout_id == -1) { - visor_timeout_id = g_timeout_add (2000, visor_devices_timeout, context); - } --#else /* linux*/ -- g_assert_not_reached (); --#endif /* linux */ -+//#else /* linux*/ -+// g_assert_not_reached (); -+//#endif /* linux */ - #endif /* WITH_USB_VISOR */ - dev->device_exists = FALSE; - } -diff -u -r gnome-pilot-2.0.13/gpilotd/manager.c ../sun/gnome-pilot/gpilotd/manager.c ---- gnome-pilot-2.0.13/gpilotd/manager.c 2004-09-03 02:42:29.000000000 +0800 -+++ ../sun/gnome-pilot/gpilotd/manager.c 2005-08-12 17:56:07.000000000 +0800 -@@ -292,6 +292,7 @@ - GnomePilotConduit *conduit = NULL; - GSList *db_list = NULL; - GPilotPilot *pilot_info; -+ pi_buffer_t * buffer; - int error = 0; - int index = 0; - -@@ -299,22 +300,27 @@ - - orbed_notify_daemon_message (pilot_info->name, NULL, _("Collecting synchronization info...")); - -+ buffer = pi_buffer_new(sizeof(struct DBInfo)); -+ - while (1) { - GnomePilotDBInfo *dbinfo; - - dbinfo = g_new0 (GnomePilotDBInfo, 1); - /* load next dbinfo block */ -- if (dlp_ReadDBList (pfd, 0, dlpDBListRAM, index, PI_DBINFO (dbinfo)) < 0) { -- /* is <0, there are no more databases, break -+ if (dlp_ReadDBList (pfd, 0, dlpDBListRAM, index, buffer) < 0) { -+ /* is <0, there are no more databases, break - out so we can save the list */ - break; - } -+ memcpy(& (dbinfo->pisock_dbinfo), buffer->data, sizeof(struct DBInfo)); - - index = PI_DBINFO (dbinfo)->index + 1; - - dbs = g_list_append (dbs, dbinfo); - } - -+ pi_buffer_free(buffer); -+ - index = 1; - for (iterator = dbs; iterator; iterator = g_list_next (iterator)) { - GnomePilotDBInfo *dbinfo = GNOME_PILOT_DBINFO (iterator->data); -diff -u -r gnome-pilot-2.0.13/intltool-update.in ../sun/gnome-pilot/intltool-update.in ---- gnome-pilot-2.0.13/intltool-update.in 2005-03-04 23:10:21.000000000 +0800 -+++ ../sun/gnome-pilot/intltool-update.in 2005-10-28 11:23:09.000000000 +0800 -@@ -71,6 +71,7 @@ - "sheet(?:\\.in)+|". # ? - "schemas(?:\\.in)+|". # GConf specific - "pong(?:\\.in)+|". # DEPRECATED: PONG is not used [by GNOME] any longer. -+"conduit(?:\\.in)+|". # conduits specific - "kbd(?:\\.in)+"; # GOK specific. - - my $ini_support = -diff -u -r gnome-pilot-2.0.13/libgpilotdCM/Makefile.am ../sun/gnome-pilot/libgpilotdCM/Makefile.am ---- gnome-pilot-2.0.13/libgpilotdCM/Makefile.am 2002-11-23 00:04:01.000000000 +0800 -+++ ../sun/gnome-pilot/libgpilotdCM/Makefile.am 2005-08-12 18:10:16.000000000 +0800 -@@ -26,7 +26,8 @@ - $(srcdir)/gnome-pilot-conduit-config.gob - - %.c %.h: %.gob -- $(GOB) --always-private-header -w $< -+ if test $(GOB) != "no" ; then \ -+ $(GOB) --always-private-header -w $< ;fi - - gpilotdcmlibsdir=$(libdir)/ - -diff -u -r gnome-pilot-2.0.13/libgpilotdCM/Makefile.in ../sun/gnome-pilot/libgpilotdCM/Makefile.in ---- gnome-pilot-2.0.13/libgpilotdCM/Makefile.in 2005-04-09 12:15:05.000000000 +0800 -+++ ../sun/gnome-pilot/libgpilotdCM/Makefile.in 2005-08-12 18:10:16.000000000 +0800 -@@ -589,7 +589,9 @@ - - - %.c %.h: %.gob -- $(GOB) --always-private-header -w $< -+ if test $(GOB) != "no" ; then \ -+ $(GOB) --always-private-header -w $< ;fi -+ - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. - .NOEXPORT: -diff -u -r gnome-pilot-2.0.13/po/POTFILES.in ../sun/gnome-pilot/po/POTFILES.in ---- gnome-pilot-2.0.13/po/POTFILES.in 2005-04-09 12:13:12.000000000 +0800 -+++ ../sun/gnome-pilot/po/POTFILES.in 2005-10-28 11:23:10.000000000 +0800 -@@ -43,3 +43,7 @@ - libgpilotdCM/gnome-pilot-conduit-management.gob - utils/gpilotd-client.c - utils/gpilotdcm-client.c -+libgpilotdCM/gnome-pilot-conduit-management.c -+conduits/backup/backup.conduit.in -+conduits/file/file.conduit.in -+conduits/test/test.conduit.in -diff -u -r gnome-pilot-2.0.13/utils/make-password.c ../sun/gnome-pilot/utils/make-password.c ---- gnome-pilot-2.0.13/utils/make-password.c 2002-09-17 01:08:11.000000000 +0800 -+++ ../sun/gnome-pilot/utils/make-password.c 2005-08-12 17:56:06.000000000 +0800 -@@ -45,7 +45,8 @@ - addr.pi_family = PI_AF_PILOT; - strcpy(addr.pi_device,argv[1]); - -- ret = pi_bind(sd, (struct sockaddr*)&addr, sizeof(addr)); -+ ret = pi_bind(sd, addr.pi_device); -+ - if(ret == -1) { - perror("pi_bind"); - exit(1); diff -r dd6bce4363fb -r 609397372f40 patches/gnome-pilot-02-pilot-link-version.diff --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/gnome-pilot-02-pilot-link-version.diff Tue Jun 06 08:02:09 2006 +0000 @@ -0,0 +1,17 @@ +--- gnome-pilot-2.0.13/acinclude.m4.orig 2006-03-09 02:36:12.427184072 +0000 ++++ gnome-pilot-2.0.13/acinclude.m4 2006-03-09 02:36:17.047481680 +0000 +@@ -52,10 +52,10 @@ + piversion_include="pi-version.h" + fi + +- pi_version=`cat $incdir/pi-version.h|grep PILOT_LINK_VERSION|sed 's/#define PILOT_LINK_VERSION \([[0-9]]*\)/\1/'` +- pi_major=`cat $incdir/pi-version.h|grep PILOT_LINK_MAJOR|sed 's/#define PILOT_LINK_MAJOR \([[0-9]]*\)/\1/'` +- pi_minor=`cat $incdir/pi-version.h|grep PILOT_LINK_MINOR|sed 's/#define PILOT_LINK_MINOR \([[0-9]]*\)/\1/'` +- pi_patch=`cat $incdir/pi-version.h|grep PILOT_LINK_PATCH|sed 's/#define PILOT_LINK_PATCH \"\(.*\)\"/\1/'` ++ pi_version=`cat $incdir/pi-version.h|grep PILOT_LINK_VERSION|head -1|sed 's/#define PILOT_LINK_VERSION \([[0-9]]*\)/\1/'` ++ pi_major=`cat $incdir/pi-version.h|grep PILOT_LINK_MAJOR|head -1|sed 's/#define PILOT_LINK_MAJOR \([[0-9]]*\)/\1/'` ++ pi_minor=`cat $incdir/pi-version.h|grep PILOT_LINK_MINOR|head -1|sed 's/#define PILOT_LINK_MINOR \([[0-9]]*\)/\1/'` ++ pi_patch=`cat $incdir/pi-version.h|grep PILOT_LINK_PATCH|head -1|sed 's/#define PILOT_LINK_PATCH \"\(.*\)\"/\1/'` + + PILOT_LINK_VERSION="$pi_version.$pi_major.$pi_minor$pi_patch" + diff -r dd6bce4363fb -r 609397372f40 patches/gnome-pilot-03-capplet-install.diff --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/gnome-pilot-03-capplet-install.diff Tue Jun 06 08:02:09 2006 +0000 @@ -0,0 +1,23 @@ +diff -urN gnome-pilot-2.0.13/capplet/Makefile.am gnome-pilot-2.0.13-hacked/capplet/Makefile.am +--- gnome-pilot-2.0.13/capplet/Makefile.am 2005-04-09 16:13:01.000000000 +1200 ++++ gnome-pilot-2.0.13-hacked/capplet/Makefile.am 2006-03-20 21:34:50.198082000 +1200 +@@ -40,7 +40,7 @@ + $(GNOME_PILOT_LIBS) \ + $(NULL) + +-desktopdir = $(datadir)/control-center-2.0/capplets ++desktopdir = $(datadir)/applications + desktop_in_files = gpilotd-control-applet.desktop.in + desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) + +diff -urN gnome-pilot-2.0.13/capplet/gpilotd-control-applet.desktop.in gnome-pilot-2.0.13-hacked/capplet/gpilotd-control-applet.desktop.in +--- gnome-pilot-2.0.13/capplet/gpilotd-control-applet.desktop.in 2005-03-27 16:05:46.000000000 +1200 ++++ gnome-pilot-2.0.13-hacked/capplet/gpilotd-control-applet.desktop.in 2006-03-20 21:34:50.198711000 +1200 +@@ -6,6 +6,7 @@ + Icon=gnome-palm + Terminal=false + Type=Application ++StartupNotify=true + Categories=GNOME;Application;Settings; + X-GNOME-Bugzilla-Bugzilla=GNOME + X-GNOME-Bugzilla-Product=gnome-pilot diff -r dd6bce4363fb -r 609397372f40 patches/gnome-pilot-03-pilot-link-version.diff --- a/patches/gnome-pilot-03-pilot-link-version.diff Tue Jun 06 05:46:05 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ ---- gnome-pilot-2.0.13/acinclude.m4.orig 2006-03-09 02:36:12.427184072 +0000 -+++ gnome-pilot-2.0.13/acinclude.m4 2006-03-09 02:36:17.047481680 +0000 -@@ -52,10 +52,10 @@ - piversion_include="pi-version.h" - fi - -- pi_version=`cat $incdir/pi-version.h|grep PILOT_LINK_VERSION|sed 's/#define PILOT_LINK_VERSION \([[0-9]]*\)/\1/'` -- pi_major=`cat $incdir/pi-version.h|grep PILOT_LINK_MAJOR|sed 's/#define PILOT_LINK_MAJOR \([[0-9]]*\)/\1/'` -- pi_minor=`cat $incdir/pi-version.h|grep PILOT_LINK_MINOR|sed 's/#define PILOT_LINK_MINOR \([[0-9]]*\)/\1/'` -- pi_patch=`cat $incdir/pi-version.h|grep PILOT_LINK_PATCH|sed 's/#define PILOT_LINK_PATCH \"\(.*\)\"/\1/'` -+ pi_version=`cat $incdir/pi-version.h|grep PILOT_LINK_VERSION|head -1|sed 's/#define PILOT_LINK_VERSION \([[0-9]]*\)/\1/'` -+ pi_major=`cat $incdir/pi-version.h|grep PILOT_LINK_MAJOR|head -1|sed 's/#define PILOT_LINK_MAJOR \([[0-9]]*\)/\1/'` -+ pi_minor=`cat $incdir/pi-version.h|grep PILOT_LINK_MINOR|head -1|sed 's/#define PILOT_LINK_MINOR \([[0-9]]*\)/\1/'` -+ pi_patch=`cat $incdir/pi-version.h|grep PILOT_LINK_PATCH|head -1|sed 's/#define PILOT_LINK_PATCH \"\(.*\)\"/\1/'` - - PILOT_LINK_VERSION="$pi_version.$pi_major.$pi_minor$pi_patch" - diff -r dd6bce4363fb -r 609397372f40 patches/gnome-pilot-04-capplet-install.diff --- a/patches/gnome-pilot-04-capplet-install.diff Tue Jun 06 05:46:05 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -diff -urN gnome-pilot-2.0.13/capplet/Makefile.am gnome-pilot-2.0.13-hacked/capplet/Makefile.am ---- gnome-pilot-2.0.13/capplet/Makefile.am 2005-04-09 16:13:01.000000000 +1200 -+++ gnome-pilot-2.0.13-hacked/capplet/Makefile.am 2006-03-20 21:34:50.198082000 +1200 -@@ -40,7 +40,7 @@ - $(GNOME_PILOT_LIBS) \ - $(NULL) - --desktopdir = $(datadir)/control-center-2.0/capplets -+desktopdir = $(datadir)/applications - desktop_in_files = gpilotd-control-applet.desktop.in - desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) - -diff -urN gnome-pilot-2.0.13/capplet/gpilotd-control-applet.desktop.in gnome-pilot-2.0.13-hacked/capplet/gpilotd-control-applet.desktop.in ---- gnome-pilot-2.0.13/capplet/gpilotd-control-applet.desktop.in 2005-03-27 16:05:46.000000000 +1200 -+++ gnome-pilot-2.0.13-hacked/capplet/gpilotd-control-applet.desktop.in 2006-03-20 21:34:50.198711000 +1200 -@@ -6,6 +6,7 @@ - Icon=gnome-palm - Terminal=false - Type=Application -+StartupNotify=true - Categories=GNOME;Application;Settings; - X-GNOME-Bugzilla-Bugzilla=GNOME - X-GNOME-Bugzilla-Product=gnome-pilot