[Xfce4-commits] <xfdesktop:danielm/port-to-gio> - src/Makefile.am: - src/xfdesktop-file-jobs.c: - src/xfdesktop-file-jobs.h: - src/xfdesktop-job.c: - src/xfdesktop-job.h: * New files to handle file jobs. As replacement of ThunarVFS-Job

Daniel Morales noreply at xfce.org
Tue Feb 16 20:48:03 CET 2010


Updating branch refs/heads/danielm/port-to-gio
         to fe34f507256076324d9146ec5062e1aa3de92c25 (commit)
       from 57ceb51ef0b3e6b4db8ff0325ac6aea7f40b798f (commit)

commit fe34f507256076324d9146ec5062e1aa3de92c25
Author: Daniel Morales <daniel at daniel.com.uy>
Date:   Mon Feb 15 23:28:05 2010 -0200

    - src/Makefile.am:
    - src/xfdesktop-file-jobs.c:
    - src/xfdesktop-file-jobs.h:
    - src/xfdesktop-job.c:
    - src/xfdesktop-job.h:
        * New files to handle file jobs. As replacement of ThunarVFS-Job

 src/Makefile.am           |    6 +++-
 src/xfdesktop-file-jobs.c |   55 +++++++++++++++++++++++++++++++++++
 src/xfdesktop-file-jobs.h |   42 +++++++++++++++++++++++++++
 src/xfdesktop-job.c       |   70 +++++++++++++++++++++++++++++++++++++++++++++
 src/xfdesktop-job.h       |   69 ++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 241 insertions(+), 1 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 400537a..d1253a1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -45,7 +45,11 @@ desktop_file_icon_sources = \
 	xfdesktop-special-file-icon.c \
 	xfdesktop-special-file-icon.h \
 	xfdesktop-volume-icon.c \
-	xfdesktop-volume-icon.h
+	xfdesktop-volume-icon.h \
+	xfdesktop-job.c \
+	xfdesktop-job.h \
+	xfdesktop-file-jobs.c \
+	xfdesktop-file-jobs.h 
 
 xfdesktop_CFLAGS = \
 	-I$(top_srcdir) \
diff --git a/src/xfdesktop-file-jobs.c b/src/xfdesktop-file-jobs.c
new file mode 100644
index 0000000..129f349
--- /dev/null
+++ b/src/xfdesktop-file-jobs.c
@@ -0,0 +1,55 @@
+/*-
+ * Copyright (c) 2010 Daniel Morales <daniel at daniel.com.uy>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gio/gio.h>
+
+#include "xfdesktop-job.h"
+#include "xfdesktop-file-jobs.h"
+
+XfdesktopJob *
+xfdesktop_file_jobs_link_file(GFile *src,
+                              GFile *dest)
+{
+    return NULL;
+}
+
+XfdesktopJob *
+xfdesktop_file_jobs_move_file(GFile *src,
+                              GFile *dest)
+{
+    return NULL;
+}
+
+XfdesktopJob *
+xfdesktop_file_jobs_copy_file(GFile *src,
+                              GFile *dest)
+{
+    return NULL;
+}
+
+XfdesktopJob *
+xfdesktop_file_jobs_unlink_file(GFile *src)
+{
+    return NULL;
+}
+
diff --git a/src/xfdesktop-file-jobs.h b/src/xfdesktop-file-jobs.h
new file mode 100644
index 0000000..b3cf81a
--- /dev/null
+++ b/src/xfdesktop-file-jobs.h
@@ -0,0 +1,42 @@
+/*-
+ * Copyright (c) 2010 Daniel Morales <daniel at daniel.com.uy>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __XDESKTOP_FILE_JOBS_H__
+#define __XDESKTOP_FILE_JOBS_H__
+
+#include <gio/gio.h>
+
+#include "xfdesktop-job.h"
+
+G_BEGIN_DECLS
+
+XfdesktopJob *xfdesktop_file_jobs_link_file(GFile *src,
+                                            GFile *dest);
+
+XfdesktopJob *xfdesktop_file_jobs_move_file(GFile *src,
+                                            GFile *dest);
+
+XfdesktopJob *xfdesktop_file_jobs_copy_file(GFile *src,
+                                            GFile *dest);
+
+XfdesktopJob *xfdesktop_file_jobs_unlink_file(GFile *src);
+
+G_END_DECLS
+
+#endif /* !__XDESKTOP_IO_JOBS_H__ */
diff --git a/src/xfdesktop-job.c b/src/xfdesktop-job.c
new file mode 100644
index 0000000..b12c67c
--- /dev/null
+++ b/src/xfdesktop-job.c
@@ -0,0 +1,70 @@
+/*-
+ * Copyright (c) 2010 Daniel Morales <daniel at daniel.com.uy>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <exo/exo.h>
+
+#include "xfdesktop-job.h"
+
+#define XFDESKTOP_JOB_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), XFDESKTOP_TYPE_JOB, XfdesktopJobPrivate))
+
+static void xfdesktop_job_finalize (GObject *object);
+
+struct _XfdesktopJobPrivate
+{
+    /* Private */
+};
+
+G_DEFINE_ABSTRACT_TYPE (XfdesktopJob, xfdesktop_job, EXO_TYPE_JOB)
+
+static void
+xfdesktop_job_class_init (XfdesktopJobClass *klass)
+{
+    GObjectClass *gobject_class;
+
+    /* Private data */
+    g_type_class_add_private (klass, sizeof (XfdesktopJobPrivate));
+
+    gobject_class = G_OBJECT_CLASS (klass);
+    gobject_class->finalize = xfdesktop_job_finalize;
+}
+
+static void
+xfdesktop_job_init (XfdesktopJob *job)
+{
+    job->priv = XFDESKTOP_JOB_GET_PRIVATE (job);
+  
+    /* Init stuff.. */
+}
+
+static void
+xfdesktop_job_finalize (GObject *object)
+{
+    (*G_OBJECT_CLASS (xfdesktop_job_parent_class)->finalize) (object);
+}
+
+void
+xfdesktop_job_cancel (XfdesktopJob *job)
+{
+    exo_job_cancel (EXO_JOB (job));  
+}
+
diff --git a/src/xfdesktop-job.h b/src/xfdesktop-job.h
new file mode 100644
index 0000000..fde72af
--- /dev/null
+++ b/src/xfdesktop-job.h
@@ -0,0 +1,69 @@
+/*-
+ * Copyright (c) 2010 Daniel Morales <daniel at daniel.com.uy>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __XFDESKTOP_JOB_H__
+#define __XFDESKTOP_JOB_H__
+
+#include <exo/exo.h>
+
+G_BEGIN_DECLS
+
+typedef enum
+{
+  XFDESKTOP_JOB_RESPONSE_YES     = 1 << 0,
+  XFDESKTOP_JOB_RESPONSE_YES_ALL = 1 << 1,
+  XFDESKTOP_JOB_RESPONSE_NO      = 1 << 2,
+  XFDESKTOP_JOB_RESPONSE_CANCEL  = 1 << 3,
+} XfdesktopJobResponse;
+
+typedef struct _XfdesktopJobPrivate XfdesktopJobPrivate;
+typedef struct _XfdesktopJobClass   XfdesktopJobClass;
+typedef struct _XfdesktopJob        XfdesktopJob;
+
+#define XFDESKTOP_TYPE_JOB            (xfdesktop_job_get_type ())
+#define XFDESKTOP_JOB(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFDESKTOP_TYPE_JOB, XfdesktopJob))
+#define XFDESKTOP_JOB_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFDESKTOP_TYPE_JOB, XfdesktopJobClass))
+#define XFDESKTOP_IS_JOB(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFDESKTOP_TYPE_JOB))
+#define XFDESKTOP_IS_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFDESKTOP_TYPE_JOB))
+#define XFDESKTOP_JOB_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFDESKTOP_TYPE_JOB, XfdesktopJobClass))
+
+struct _XfdesktopJobClass
+{
+    /* Private */
+    ExoJobClass __parent__;
+
+    /* Public */
+
+    /* Signals */
+};
+
+struct _XfdesktopJob
+{
+    /* Private */
+    ExoJob              __parent__;
+    XfdesktopJobPrivate *priv;
+};
+
+GType xfdesktop_job_get_type(void) G_GNUC_CONST;
+
+void xfdesktop_job_cancel(XfdesktopJob *job);
+
+G_END_DECLS
+
+#endif /* !__XFDESKTOP_JOB_H__ */



More information about the Xfce4-commits mailing list