diff -u gnome-pilot-2.0.14/gpilotd/gpilotd.c gnome-pilot-2.0.14/gpilotd/gpilotd.c --- gnome-pilot-2.0.14/gpilotd/gpilotd.c +++ gnome-pilot-2.0.14/gpilotd/gpilotd.c @@ -1084,7 +1084,12 @@ if (device->type == PILOT_DEVICE_USB_VISOR) { if (!visor_net) device->type = PILOT_DEVICE_SERIAL; - + /* problems have been reported with devices + * not being ready for sync immediately, + * so we wait for 0.4 seconds. See + * bugzilla.gnome #362565 + */ + usleep(400000); /* just try to sync. Until I can talk to * the kernel guys this is the best way to * go. */ diff -u gnome-pilot-2.0.14/debian/changelog gnome-pilot-2.0.14/debian/changelog --- gnome-pilot-2.0.14/debian/changelog +++ gnome-pilot-2.0.14/debian/changelog @@ -1,3 +1,15 @@ +gnome-pilot (2.0.14-0ubuntu3) edgy-proposed; urgency=low + + * gpilotd/gpilotd.c: + - add usleep() to wait for devices not being ready immediately. + (Malone: #66355) + - capplet/gnome-pilot-capplet.c, capplet/gnome-pilot-pdialog.c, + capplet/gnome-pilot-pdialog.h, capplet/util.c: + - fixes gnome-pilot crashers + http://bugzilla.gnome.org/show_bug.cgi?id=365181 + + -- Daniel Holbach Wed, 10 Jan 2007 09:58:38 +0100 + gnome-pilot (2.0.14-0ubuntu2) edgy; urgency=low * debian/patches/gp-fixmemleak-357602.patch, gpilotd/gpilotd.c: only in patch2: unchanged: --- gnome-pilot-2.0.14.orig/capplet/gnome-pilot-capplet.c +++ gnome-pilot-2.0.14/capplet/gnome-pilot-capplet.c @@ -70,6 +70,7 @@ GtkWidget *devices_delete; GtkWidget *devices_popup; + GtkObject *pdialog; GtkWidget *pilots_menu; GtkWidget *pilots_username; GtkWidget *conduit_treeview; @@ -694,7 +695,6 @@ { GnomePilotCapplet *gpcap = GNOME_PILOT_CAPPLET (user_data); GnomePilotCappletPrivate *priv; - GtkObject *dlg; GPilotPilot *pilot; gboolean res; @@ -702,8 +702,14 @@ pilot = get_default_pilot (priv->state); - dlg = gnome_pilot_pdialog_new (priv->gpc, priv->state, pilot); - res = gnome_pilot_pdialog_run_and_close (GNOME_PILOT_PDIALOG (dlg), GTK_WINDOW (gpcap)); + if (priv->pdialog == NULL) + priv->pdialog = gnome_pilot_pdialog_new (priv->gpc, priv->state, pilot); + else + gnome_pilot_pdialog_set_pilot(priv->pdialog, pilot); + + res = gnome_pilot_pdialog_run_and_close (GNOME_PILOT_PDIALOG (priv->pdialog), + GTK_WINDOW (gpcap)); + if (!res) { g_free (pilot); @@ -727,7 +733,6 @@ { GnomePilotCapplet *gpcap = GNOME_PILOT_CAPPLET (user_data); GnomePilotCappletPrivate *priv; - GtkObject *dlg; GPilotPilot *pilot; GtkTreeIter iter; gboolean res; @@ -736,8 +741,13 @@ pilot = get_current_pilot (gpcap, &iter); - dlg = gnome_pilot_pdialog_new (priv->gpc, priv->state, pilot); - res = gnome_pilot_pdialog_run_and_close (GNOME_PILOT_PDIALOG (dlg), GTK_WINDOW (gpcap)); + if (priv->pdialog == NULL) + priv->pdialog = gnome_pilot_pdialog_new (priv->gpc, priv->state, pilot); + else + gnome_pilot_pdialog_set_pilot(priv->pdialog, pilot); + + res = gnome_pilot_pdialog_run_and_close (GNOME_PILOT_PDIALOG (priv->pdialog), + GTK_WINDOW (gpcap)); if (res) { gtk_list_store_set (GTK_LIST_STORE (priv->pilots_model), &iter, @@ -1270,6 +1280,7 @@ { GnomePilotCapplet *gpcap = GNOME_PILOT_CAPPLET (object); GnomePilotCappletPrivate *priv; + GtkObjectClass *gppd_class; priv = gpcap->priv; @@ -1290,6 +1301,13 @@ if (priv->conduit_popup) gtk_widget_destroy (priv->conduit_popup); + /* destroy pilot dialog, if it was loaded */ + if (priv->pdialog) { + gppd_class = gtk_type_class (gnome_pilot_pdialog_get_type()); + if (GTK_OBJECT_CLASS (gppd_class)->destroy) + GTK_OBJECT_CLASS (gppd_class)->destroy (priv->pdialog); + } + g_free (priv); gpcap->priv = NULL; } only in patch2: unchanged: --- gnome-pilot-2.0.14.orig/capplet/gnome-pilot-pdialog.c +++ gnome-pilot-2.0.14/capplet/gnome-pilot-pdialog.c @@ -177,6 +177,16 @@ return object; } +void +gnome_pilot_pdialog_set_pilot (GtkObject *obj, GPilotPilot *pilot) +{ + GnomePilotPDialog *gppd = GNOME_PILOT_PDIALOG (obj); + + gppd->priv->pilot = pilot; + fill_widgets (gppd); +} + + static gboolean get_widgets (GnomePilotPDialog *gppd) { only in patch2: unchanged: --- gnome-pilot-2.0.14.orig/capplet/gnome-pilot-pdialog.h +++ gnome-pilot-2.0.14/capplet/gnome-pilot-pdialog.h @@ -58,7 +58,7 @@ GtkType gnome_pilot_pdialog_get_type (void); GtkObject *gnome_pilot_pdialog_new (GnomePilotClient *gpc, PilotState *state, GPilotPilot *pilot); - +void gnome_pilot_pdialog_set_pilot (GtkObject *obj, GPilotPilot *pilot); gboolean gnome_pilot_pdialog_run_and_close (GnomePilotPDialog *gppd, GtkWindow *dialog); G_END_DECLS only in patch2: unchanged: --- gnome-pilot-2.0.14.orig/capplet/util.c +++ gnome-pilot-2.0.14/capplet/util.c @@ -571,8 +571,8 @@ { char *str; - struct stat buf; #ifndef WITH_HAL + struct stat buf; char *usbdevicesfile_str ="/proc/bus/usb/devices"; char *sysfs_dir = "/sys/bus/usb/devices"; #endif