[gnome-pilot] 2009-10-26 Removed gnome-vfs, and obsolete gnome-pilot.spec
- From: Matthew Charles Davey <mcdavey src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-pilot] 2009-10-26 Removed gnome-vfs, and obsolete gnome-pilot.spec
- Date: Mon, 26 Oct 2009 14:30:12 +0000 (UTC)
commit 4728228c3199157f7a5ada28a12caa3da9383b32
Author: Matt Davey <mcdavey mrao cam ac uk>
Date: Mon Oct 26 14:28:40 2009 +0000
2009-10-26 Removed gnome-vfs, and obsolete gnome-pilot.spec
Matt Davey <mcdavey mrao cam ac uk>
* removed gnome-vfs from gnome-pilot-client. Still involved via libgnome
pkgconfig. Also, removed obsolete gnome-pilot.spec
* gpilotd/gnome-pilot-client.gob: removed gnome-vfs.
* configure.in: ditto.
* gnome-pilot.spec: removed
ChangeLog | 7 ++
Makefile.am | 1 -
configure.in | 16 ----
gnome-pilot.spec.in | 136 -------------------------------
gpilotd/gnome-pilot-client.gob | 173 +++++-----------------------------------
5 files changed, 28 insertions(+), 305 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7617f9f..596c80a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-10-26 Matt Davey <mcdavey mrao cam ac uk>
+ * removed gnome-vfs from gnome-pilot-client. Still involved via libgnome
+ pkgconfig. Also, removed obsolete gnome-pilot.spec
+ * gpilotd/gnome-pilot-client.gob: removed gnome-vfs.
+ * configure.in: ditto.
+ * gnome-pilot.spec: removed
+
2009-10-25 Matt Davey <mcdavey mrao cam ac uk>
* complete removal of libgnomeui. simply had to change from
LIBGNOMEUI_MODULE to LIBGNOME_MODULE
diff --git a/Makefile.am b/Makefile.am
index c367da3..6e8ef2e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,7 +36,6 @@ EXTRA_DIST= \
intltool-extract.in \
intltool-update.in \
intltool-merge.in \
- gnome-pilot.spec \
gnome-pilot-2.0.pc.in
DISTCLEANFILES = intltool-extract intltool-merge intltool-update
diff --git a/configure.in b/configure.in
index e42cda1..af032be 100644
--- a/configure.in
+++ b/configure.in
@@ -99,15 +99,6 @@ if test x"$do_network" = xyes ; then
fi
dnl ******************************
-dnl Whether to use VFS
-dnl ******************************
-AC_ARG_WITH(vfs, [ --with-vfs Enable GNOME vfs.], [do_vfs=$withval], [do_vfs=yes])
-if test x"$do_vfs" = xyes; then
- GNOMEVFS_REQUIRED="gnome-vfs-2.0 >= 2.0.0"
- AC_DEFINE(WITH_VFS,,"With GNOME VFS Support")
-fi
-
-dnl ******************************
dnl Whether to use HAL/DBUS
dnl ******************************
dnl Default: use it if it is available
@@ -169,7 +160,6 @@ PKG_CHECK_MODULES(GNOME_PILOT,
$LIBBONOBOUI_REQUIRED
$ORBIT_REQUIRED
$BONOBO_ACTIVATION_REQUIRED
- $GNOMEVFS_REQUIRED
])
GNOME_PILOT_CFLAGS="$GNOME_PILOT_CFLAGS $PISOCK_CFLAGS"
@@ -266,7 +256,6 @@ fi
dnl Create files.
AC_OUTPUT([
Makefile
-gnome-pilot.spec
gpilotd/Makefile
applet/Makefile
conduits/Makefile
@@ -286,11 +275,6 @@ echo ""
echo " Configuration :"
echo ""
-if test x"$do_vfs" = xyes; then
- echo " gnome-vfs : yes"
-else
- echo " gnome-vfs : no"
-fi
if test x"$do_network" = xyes; then
echo " network sync : yes"
else
diff --git a/gpilotd/gnome-pilot-client.gob b/gpilotd/gnome-pilot-client.gob
index b39a4d7..3608db7 100644
--- a/gpilotd/gnome-pilot-client.gob
+++ b/gpilotd/gnome-pilot-client.gob
@@ -45,9 +45,8 @@
#include <libbonobo.h>
#include <gpilotd/gnome-pilot.h>
-#ifdef WITH_VFS
-#include <libgnomevfs/gnome-vfs.h>
-#endif
+#include <glib.h>
+#include <gio/gio.h>
enum GPilotdErrCode {
GPILOTD_OK=0,
@@ -91,11 +90,6 @@ enum get_triple_ptr_action {
GPILOTD_APP_CRADLES
};
-#ifdef WITH_VFS
-gboolean xfer_callback (GnomeVFSXferProgressInfo *info,
- GnomePilotClient *this);
-#endif
-
%}
class Gnome:Pilot:Client from Gtk:Object {
@@ -106,14 +100,6 @@ class Gnome:Pilot:Client from Gtk:Object {
public CORBA_ORB orb;
class_init (class) {
-#ifdef WITH_VFS
- if (gnome_vfs_initialized () == FALSE) {
- g_message ("Initing gnome vfs");
- if (gnome_vfs_init () == FALSE) {
- g_warning ("Failed to init gnome-vfs");
- }
- }
-#endif /* WITH_VFS */
}
private void init_corba_class (self) {
@@ -651,12 +637,12 @@ class Gnome:Pilot:Client from Gtk:Object {
/* g_message ("Installing %s to %s", infile, pilot_name); */
-#ifdef WITH_VFS
{
- GnomeVFSResult result;
- GnomeVFSXferOptions xfer_options = 0;
- GnomeVFSURI *src_uri;
- GnomeVFSURI *dest_uri;
+ gboolean result;
+ GError *err;
+ GFileCopyFlags copy_options = G_FILE_COPY_OVERWRITE;
+ GFile *src_gfile;
+ GFile *dest_gfile;
char *filename_uri;
char pwd[128];
char *infile_with_path;
@@ -674,7 +660,7 @@ class Gnome:Pilot:Client from Gtk:Object {
*/
if (infile[0] != '/' && strncmp (infile, "file:/", 6)!=0) {
- /* gnomevfs needs the file with path */
+ /* gio needs the file with path */
if (getcwd (pwd, 127) == NULL)
goto error;
infile_with_path = g_strdup_printf ("%s/%s", pwd, infile);
@@ -682,85 +668,35 @@ class Gnome:Pilot:Client from Gtk:Object {
infile_with_path = g_strdup (infile);
}
- src_uri = gnome_vfs_uri_new (infile_with_path);
- dest_uri = gnome_vfs_uri_new (filename_uri);
+ src_gfile = g_file_new_for_path (infile_with_path);
+ dest_gfile = g_file_new_for_path (filename_uri);
/*
g_message ("from : \"%s\"", infile_with_path);
g_message ("to : \"%s\"", filename_uri);
*/
- result = gnome_vfs_xfer_uri (src_uri, dest_uri,
- xfer_options,
- GNOME_VFS_XFER_ERROR_MODE_QUERY,
- GNOME_VFS_XFER_OVERWRITE_MODE_QUERY,
- (GnomeVFSXferProgressCallback)xfer_callback,
- self);
-
- /* g_message ("gnome-vfs-xfer-uri: %s\n",gnome_vfs_result_to_string (result)); */
+ result = g_file_copy (src_gfile, dest_gfile,
+ copy_options,
+ NULL,
+ NULL,
+ self,
+ &err);
- if (result == GNOME_VFS_OK) {
+ if (result) {
file_copied = TRUE;
} else {
+ g_message("VFS Error: %s\n",
+ err->message);
file_copied = FALSE;
}
g_free (filename_uri);
- gnome_vfs_uri_unref (src_uri);
- gnome_vfs_uri_unref (dest_uri);
+ g_object_unref (src_gfile);
+ g_object_unref (dest_gfile);
g_free (queue);
g_free (infile_with_path);
}
-#else /* WITH_VFS */
- {
- gchar *queue;
- FILE *in,*out;
-
- file_copied = TRUE;
-
- queue = g_strdup_printf ("%s/.gnome2/gnome-pilot.d/",g_get_home_dir ());
- filename = tempnam (queue,"PDB");
-
- in = fopen (infile,"rb");
- if (in==NULL) {
- file_copied = FALSE;
- }
-
- out = fopen (filename,"wb");
- if (out==NULL) {
- file_copied = FALSE;
- }
-
- while (!feof (in)) {
- size_t act;
- char block[1024];
- act=fread (block,1,1024,in);
- if (ferror (in)) {
- file_copied = FALSE;
- }
- if (fwrite (block,1,act,out)!=act) {
- file_copied = FALSE;
- }
- if (ferror (out)) {
- file_copied = FALSE;
- }
- }
-
- if (out) {
- fflush (out);
- }
- if (in) {
- fclose (in);
- }
- if (out) {
- fclose (out);
- }
- g_free (queue);
- }
-#endif /* WITH_VFS */
error: if (file_copied == FALSE) {
-#ifndef WITH_VFS
- g_message ("File copy failed");
-#endif
free (filename);
return GPILOTD_ERR_FAILED;
}
@@ -1207,73 +1143,6 @@ error: if (file_copied == FALSE) {
%{
-#ifdef WITH_VFS
-gboolean xfer_callback (GnomeVFSXferProgressInfo *info,
- GnomePilotClient *this) {
- switch (info->status) {
- case GNOME_VFS_XFER_PROGRESS_STATUS_VFSERROR:
- g_message ("VFS Error: %s\n",
- gnome_vfs_result_to_string (info->vfs_status));
- return FALSE;
- break;
- case GNOME_VFS_XFER_PROGRESS_STATUS_OVERWRITE:
- g_message ("VFS: Overwriting `%s' with `%s'",
- info->target_name, info->source_name);
- return TRUE;
- break;
- case GNOME_VFS_XFER_PROGRESS_STATUS_OK:
- switch (info->phase) {
- case GNOME_VFS_XFER_PHASE_INITIAL:
- return TRUE;
- case GNOME_VFS_XFER_PHASE_COLLECTING:
- return TRUE;
- case GNOME_VFS_XFER_PHASE_READYTOGO:
- return TRUE;
- case GNOME_VFS_XFER_PHASE_OPENSOURCE:
- return TRUE;
- case GNOME_VFS_XFER_PHASE_OPENTARGET:
- return TRUE;
- case GNOME_VFS_XFER_PHASE_COPYING:
-/*
- g_message ("Transferring `%s' to `%s' (file %ld/%ld, byte %ld/%ld in file, "
- "%" GNOME_VFS_SIZE_FORMAT_STR "/%" GNOME_VFS_SIZE_FORMAT_STR " total)",
- info->source_name,
- info->target_name,
- info->file_index,
- info->files_total,
- (glong) info->bytes_copied,
- (glong) info->file_size,
- info->total_bytes_copied,
- info->bytes_total);
-*/
- return TRUE;
- case GNOME_VFS_XFER_PHASE_CLOSESOURCE:
- return TRUE;
- case GNOME_VFS_XFER_PHASE_CLOSETARGET:
- return TRUE;
- case GNOME_VFS_XFER_PHASE_FILECOMPLETED:
- return TRUE;
- case GNOME_VFS_XFER_PHASE_COMPLETED:
- return TRUE;
- default:
- /* g_message ("Unexpected phase %d", info->phase); */
- return TRUE;
- }
- break;
- case GNOME_VFS_XFER_PROGRESS_STATUS_DUPLICATE:
- g_message ("VFS: Duplicate");
- return FALSE;
- default:
- g_message ("VFS: Unknown status");
- return FALSE;
- }
-
- g_message ("VFS: doh!");
- return FALSE;
-
-}
-#endif /* WITH_VFS */
-
pid_t
gpilotd_get_pid (void)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]