summaryrefslogtreecommitdiff
path: root/plugins/filebrowser
diff options
context:
space:
mode:
authorPerberos <[email protected]>2011-11-07 19:52:18 -0300
committerPerberos <[email protected]>2011-11-07 19:52:18 -0300
commit5ded9cba8563f336939400303d6a841d5089b107 (patch)
treec5676588cff26ba37e12369fe4de24b54e9f6682 /plugins/filebrowser
parentf00b3a11a199f9f85a4d46a600f9d14179b37dbf (diff)
downloadpluma-5ded9cba8563f336939400303d6a841d5089b107.tar.bz2
pluma-5ded9cba8563f336939400303d6a841d5089b107.tar.xz
renaming from gedit to pluma
Diffstat (limited to 'plugins/filebrowser')
-rwxr-xr-xplugins/filebrowser/Makefile.am84
-rwxr-xr-xplugins/filebrowser/filebrowser.pluma-plugin.desktop.in (renamed from plugins/filebrowser/filebrowser.gedit-plugin.desktop.in)4
-rwxr-xr-xplugins/filebrowser/gedit-file-bookmarks-store.h90
-rwxr-xr-xplugins/filebrowser/gedit-file-browser-plugin.h71
-rwxr-xr-xplugins/filebrowser/gedit-file-browser-store.h200
-rwxr-xr-xplugins/filebrowser/gedit-file-browser-view.h84
-rwxr-xr-xplugins/filebrowser/gedit-file-browser-widget.h121
-rwxr-xr-xplugins/filebrowser/pluma-file-bookmarks-store.c (renamed from plugins/filebrowser/gedit-file-bookmarks-store.c)236
-rwxr-xr-xplugins/filebrowser/pluma-file-bookmarks-store.h90
-rwxr-xr-xplugins/filebrowser/pluma-file-browser-enum-register.c.template (renamed from plugins/filebrowser/gedit-file-browser-enum-register.c.template)2
-rwxr-xr-xplugins/filebrowser/pluma-file-browser-enum-types.c.template (renamed from plugins/filebrowser/gedit-file-browser-enum-types.c.template)2
-rwxr-xr-xplugins/filebrowser/pluma-file-browser-enum-types.h.template (renamed from plugins/filebrowser/gedit-file-browser-enum-types.h.template)10
-rwxr-xr-xplugins/filebrowser/pluma-file-browser-error.h (renamed from plugins/filebrowser/gedit-file-browser-error.h)28
-rwxr-xr-xplugins/filebrowser/pluma-file-browser-marshal.list (renamed from plugins/filebrowser/gedit-file-browser-marshal.list)0
-rwxr-xr-xplugins/filebrowser/pluma-file-browser-messages.c (renamed from plugins/filebrowser/gedit-file-browser-messages.c)414
-rwxr-xr-xplugins/filebrowser/pluma-file-browser-messages.h (renamed from plugins/filebrowser/gedit-file-browser-messages.h)20
-rwxr-xr-xplugins/filebrowser/pluma-file-browser-plugin.c (renamed from plugins/filebrowser/gedit-file-browser-plugin.c)418
-rwxr-xr-xplugins/filebrowser/pluma-file-browser-plugin.h71
-rwxr-xr-xplugins/filebrowser/pluma-file-browser-store.c (renamed from plugins/filebrowser/gedit-file-browser-store.c)736
-rwxr-xr-xplugins/filebrowser/pluma-file-browser-store.h200
-rwxr-xr-xplugins/filebrowser/pluma-file-browser-utils.c (renamed from plugins/filebrowser/gedit-file-browser-utils.c)24
-rwxr-xr-xplugins/filebrowser/pluma-file-browser-utils.h (renamed from plugins/filebrowser/gedit-file-browser-utils.h)20
-rwxr-xr-xplugins/filebrowser/pluma-file-browser-view.c (renamed from plugins/filebrowser/gedit-file-browser-view.c)278
-rwxr-xr-xplugins/filebrowser/pluma-file-browser-view.h84
-rwxr-xr-xplugins/filebrowser/pluma-file-browser-widget-ui.xml (renamed from plugins/filebrowser/gedit-file-browser-widget-ui.xml)0
-rwxr-xr-xplugins/filebrowser/pluma-file-browser-widget.c (renamed from plugins/filebrowser/gedit-file-browser-widget.c)672
-rwxr-xr-xplugins/filebrowser/pluma-file-browser-widget.h121
-rwxr-xr-xplugins/filebrowser/pluma-file-browser.schemas.in (renamed from plugins/filebrowser/gedit-file-browser.schemas.in)42
28 files changed, 2061 insertions, 2061 deletions
diff --git a/plugins/filebrowser/Makefile.am b/plugins/filebrowser/Makefile.am
index 22301d5b..6791255a 100755
--- a/plugins/filebrowser/Makefile.am
+++ b/plugins/filebrowser/Makefile.am
@@ -1,72 +1,72 @@
# filebrowser
-plugindir = $(GEDIT_PLUGINS_LIBS_DIR)
+plugindir = $(PLUMA_PLUGINS_LIBS_DIR)
INCLUDES = \
-I$(top_srcdir) \
- $(GEDIT_CFLAGS) \
+ $(PLUMA_CFLAGS) \
$(WARN_CFLAGS) \
$(DISABLE_DEPRECATED_CFLAGS)
BUILT_SOURCES = \
- gedit-file-browser-enum-types.h \
- gedit-file-browser-enum-types.c \
- gedit-file-browser-marshal.h \
- gedit-file-browser-marshal.c
+ pluma-file-browser-enum-types.h \
+ pluma-file-browser-enum-types.c \
+ pluma-file-browser-marshal.h \
+ pluma-file-browser-marshal.c
plugin_LTLIBRARIES = libfilebrowser.la
NOINST_H_FILES = \
- gedit-file-bookmarks-store.h \
- gedit-file-browser-store.h \
- gedit-file-browser-view.h \
- gedit-file-browser-widget.h \
- gedit-file-browser-error.h \
- gedit-file-browser-utils.h \
- gedit-file-browser-plugin.h \
- gedit-file-browser-messages.h
+ pluma-file-bookmarks-store.h \
+ pluma-file-browser-store.h \
+ pluma-file-browser-view.h \
+ pluma-file-browser-widget.h \
+ pluma-file-browser-error.h \
+ pluma-file-browser-utils.h \
+ pluma-file-browser-plugin.h \
+ pluma-file-browser-messages.h
libfilebrowser_la_SOURCES = \
$(BUILT_SOURCES) \
- gedit-file-bookmarks-store.c \
- gedit-file-browser-store.c \
- gedit-file-browser-view.c \
- gedit-file-browser-widget.c \
- gedit-file-browser-utils.c \
- gedit-file-browser-plugin.c \
- gedit-file-browser-messages.c \
+ pluma-file-bookmarks-store.c \
+ pluma-file-browser-store.c \
+ pluma-file-browser-view.c \
+ pluma-file-browser-widget.c \
+ pluma-file-browser-utils.c \
+ pluma-file-browser-plugin.c \
+ pluma-file-browser-messages.c \
$(NOINST_H_FILES)
libfilebrowser_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
-libfilebrowser_la_LIBADD = $(GEDIT_LIBS)
+libfilebrowser_la_LIBADD = $(PLUMA_LIBS)
# UI files (if you use ui for your plugin, list those files here)
-uidir = $(GEDIT_PLUGINS_DATA_DIR)/filebrowser
-ui_DATA = gedit-file-browser-widget-ui.xml
+uidir = $(PLUMA_PLUGINS_DATA_DIR)/filebrowser
+ui_DATA = pluma-file-browser-widget-ui.xml
-plugin_in_files = filebrowser.gedit-plugin.desktop.in
+plugin_in_files = filebrowser.pluma-plugin.desktop.in
-%.gedit-plugin: %.gedit-plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+%.pluma-plugin: %.pluma-plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
-gedit-file-browser-enum-types.h: gedit-file-browser-enum-types.h.template $(NOINST_H_FILES) $(GLIB_MKENUMS)
- (cd $(srcdir) && $(GLIB_MKENUMS) --template gedit-file-browser-enum-types.h.template $(NOINST_H_FILES)) > $@
+pluma-file-browser-enum-types.h: pluma-file-browser-enum-types.h.template $(NOINST_H_FILES) $(GLIB_MKENUMS)
+ (cd $(srcdir) && $(GLIB_MKENUMS) --template pluma-file-browser-enum-types.h.template $(NOINST_H_FILES)) > $@
-gedit-file-browser-enum-types.c: gedit-file-browser-enum-types.c.template gedit-file-browser-enum-register.c.template $(NOINST_H_FILES) $(GLIB_MKENUMS)
+pluma-file-browser-enum-types.c: pluma-file-browser-enum-types.c.template pluma-file-browser-enum-register.c.template $(NOINST_H_FILES) $(GLIB_MKENUMS)
$(AM_V_GEN) (cd $(srcdir) && \
- $(GLIB_MKENUMS) --template gedit-file-browser-enum-types.c.template $(NOINST_H_FILES) && \
- $(GLIB_MKENUMS) --template gedit-file-browser-enum-register.c.template $(NOINST_H_FILES)) > $@
+ $(GLIB_MKENUMS) --template pluma-file-browser-enum-types.c.template $(NOINST_H_FILES) && \
+ $(GLIB_MKENUMS) --template pluma-file-browser-enum-register.c.template $(NOINST_H_FILES)) > $@
-gedit-file-browser-marshal.h: gedit-file-browser-marshal.list $(GLIB_GENMARSHAL)
- $(AM_V_GEN) $(GLIB_GENMARSHAL) $< --header --prefix=gedit_file_browser_marshal > $@
+pluma-file-browser-marshal.h: pluma-file-browser-marshal.list $(GLIB_GENMARSHAL)
+ $(AM_V_GEN) $(GLIB_GENMARSHAL) $< --header --prefix=pluma_file_browser_marshal > $@
-gedit-file-browser-marshal.c: gedit-file-browser-marshal.list $(GLIB_GENMARSHAL)
- $(AM_V_GEN) echo "#include \"gedit-file-browser-marshal.h\"" > $@ && \
- $(GLIB_GENMARSHAL) $< --body --prefix=gedit_file_browser_marshal >> $@
+pluma-file-browser-marshal.c: pluma-file-browser-marshal.list $(GLIB_GENMARSHAL)
+ $(AM_V_GEN) echo "#include \"pluma-file-browser-marshal.h\"" > $@ && \
+ $(GLIB_GENMARSHAL) $< --body --prefix=pluma_file_browser_marshal >> $@
-plugin_DATA = $(plugin_in_files:.gedit-plugin.desktop.in=.gedit-plugin)
+plugin_DATA = $(plugin_in_files:.pluma-plugin.desktop.in=.pluma-plugin)
schemasdir = $(MATECONF_SCHEMA_FILE_DIR)
-schemas_in_files = gedit-file-browser.schemas.in
+schemas_in_files = pluma-file-browser.schemas.in
schemas_DATA = $(schemas_in_files:.schemas.in=.schemas)
@INTLTOOL_SCHEMAS_RULE@
@@ -86,10 +86,10 @@ EXTRA_DIST = \
$(ui_DATA) \
$(plugin_in_files) \
$(schemas_in_files) \
- gedit-file-browser-enum-types.h.template \
- gedit-file-browser-enum-types.c.template \
- gedit-file-browser-enum-register.c.template \
- gedit-file-browser-marshal.list
+ pluma-file-browser-enum-types.h.template \
+ pluma-file-browser-enum-types.c.template \
+ pluma-file-browser-enum-register.c.template \
+ pluma-file-browser-marshal.list
CLEANFILES = \
$(plugin_DATA) \
diff --git a/plugins/filebrowser/filebrowser.gedit-plugin.desktop.in b/plugins/filebrowser/filebrowser.pluma-plugin.desktop.in
index 808816c5..bf328f7a 100755
--- a/plugins/filebrowser/filebrowser.gedit-plugin.desktop.in
+++ b/plugins/filebrowser/filebrowser.pluma-plugin.desktop.in
@@ -1,4 +1,4 @@
-[Gedit Plugin]
+[Pluma Plugin]
Loader=C
Module=filebrowser
IAge=2
@@ -7,4 +7,4 @@ _Description=Easy file access from the side pane
Icon=system-file-manager
Authors=Jesse van den Kieboom <[email protected]>
Copyright=Copyright © 2006 Jesse van den Kieboom
-Website=http://www.gedit.org
+Website=http://www.pluma.org
diff --git a/plugins/filebrowser/gedit-file-bookmarks-store.h b/plugins/filebrowser/gedit-file-bookmarks-store.h
deleted file mode 100755
index bd20911e..00000000
--- a/plugins/filebrowser/gedit-file-bookmarks-store.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * gedit-file-bookmarks-store.h - Gedit plugin providing easy file access
- * from the sidepanel
- *
- * Copyright (C) 2006 - Jesse van den Kieboom <[email protected]>
- *
- * 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GEDIT_FILE_BOOKMARKS_STORE_H__
-#define __GEDIT_FILE_BOOKMARKS_STORE_H__
-
-#include <gtk/gtk.h>
-
-G_BEGIN_DECLS
-#define GEDIT_TYPE_FILE_BOOKMARKS_STORE (gedit_file_bookmarks_store_get_type ())
-#define GEDIT_FILE_BOOKMARKS_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEDIT_TYPE_FILE_BOOKMARKS_STORE, GeditFileBookmarksStore))
-#define GEDIT_FILE_BOOKMARKS_STORE_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEDIT_TYPE_FILE_BOOKMARKS_STORE, GeditFileBookmarksStore const))
-#define GEDIT_FILE_BOOKMARKS_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEDIT_TYPE_FILE_BOOKMARKS_STORE, GeditFileBookmarksStoreClass))
-#define GEDIT_IS_FILE_BOOKMARKS_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEDIT_TYPE_FILE_BOOKMARKS_STORE))
-#define GEDIT_IS_FILE_BOOKMARKS_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEDIT_TYPE_FILE_BOOKMARKS_STORE))
-#define GEDIT_FILE_BOOKMARKS_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEDIT_TYPE_FILE_BOOKMARKS_STORE, GeditFileBookmarksStoreClass))
-
-typedef struct _GeditFileBookmarksStore GeditFileBookmarksStore;
-typedef struct _GeditFileBookmarksStoreClass GeditFileBookmarksStoreClass;
-typedef struct _GeditFileBookmarksStorePrivate GeditFileBookmarksStorePrivate;
-
-enum
-{
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_ICON = 0,
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_NAME,
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_OBJECT,
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_FLAGS,
- GEDIT_FILE_BOOKMARKS_STORE_N_COLUMNS
-};
-
-enum
-{
- GEDIT_FILE_BOOKMARKS_STORE_NONE = 0,
- GEDIT_FILE_BOOKMARKS_STORE_IS_SEPARATOR = 1 << 0, /* Separator item */
- GEDIT_FILE_BOOKMARKS_STORE_IS_SPECIAL_DIR = 1 << 1, /* Special user dir */
- GEDIT_FILE_BOOKMARKS_STORE_IS_HOME = 1 << 2, /* The special Home user directory */
- GEDIT_FILE_BOOKMARKS_STORE_IS_DESKTOP = 1 << 3, /* The special Desktop user directory */
- GEDIT_FILE_BOOKMARKS_STORE_IS_DOCUMENTS = 1 << 4, /* The special Documents user directory */
- GEDIT_FILE_BOOKMARKS_STORE_IS_FS = 1 << 5, /* A mount object */
- GEDIT_FILE_BOOKMARKS_STORE_IS_MOUNT = 1 << 6, /* A mount object */
- GEDIT_FILE_BOOKMARKS_STORE_IS_VOLUME = 1 << 7, /* A volume object */
- GEDIT_FILE_BOOKMARKS_STORE_IS_DRIVE = 1 << 8, /* A drive object */
- GEDIT_FILE_BOOKMARKS_STORE_IS_ROOT = 1 << 9, /* The root file system (file:///) */
- GEDIT_FILE_BOOKMARKS_STORE_IS_BOOKMARK = 1 << 10, /* A gtk bookmark */
- GEDIT_FILE_BOOKMARKS_STORE_IS_REMOTE_BOOKMARK = 1 << 11, /* A remote gtk bookmark */
- GEDIT_FILE_BOOKMARKS_STORE_IS_LOCAL_BOOKMARK = 1 << 12 /* A local gtk bookmark */
-};
-
-struct _GeditFileBookmarksStore
-{
- GtkTreeStore parent;
-
- GeditFileBookmarksStorePrivate *priv;
-};
-
-struct _GeditFileBookmarksStoreClass
-{
- GtkTreeStoreClass parent_class;
-};
-
-GType gedit_file_bookmarks_store_get_type (void) G_GNUC_CONST;
-GType gedit_file_bookmarks_store_register_type (GTypeModule * module);
-
-GeditFileBookmarksStore *gedit_file_bookmarks_store_new (void);
-gchar *gedit_file_bookmarks_store_get_uri (GeditFileBookmarksStore * model,
- GtkTreeIter * iter);
-void gedit_file_bookmarks_store_refresh (GeditFileBookmarksStore * model);
-
-G_END_DECLS
-#endif /* __GEDIT_FILE_BOOKMARKS_STORE_H__ */
-
-// ex:ts=8:noet:
diff --git a/plugins/filebrowser/gedit-file-browser-plugin.h b/plugins/filebrowser/gedit-file-browser-plugin.h
deleted file mode 100755
index 19ca86bf..00000000
--- a/plugins/filebrowser/gedit-file-browser-plugin.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * gedit-file-browser-plugin.h - Gedit plugin providing easy file access
- * from the sidepanel
- *
- * Copyright (C) 2006 - Jesse van den Kieboom <[email protected]>
- *
- * 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GEDIT_FILE_BROWSER_PLUGIN_H__
-#define __GEDIT_FILE_BROWSER_PLUGIN_H__
-
-#include <glib.h>
-#include <glib-object.h>
-#include <gedit/gedit-plugin.h>
-
-G_BEGIN_DECLS
-/*
- * Type checking and casting macros
- */
-#define GEDIT_TYPE_FILE_BROWSER_PLUGIN (filetree_plugin_get_type ())
-#define GEDIT_FILE_BROWSER_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GEDIT_TYPE_FILE_BROWSER_PLUGIN, GeditFileBrowserPlugin))
-#define GEDIT_FILE_BROWSER_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GEDIT_TYPE_FILE_BROWSER_PLUGIN, GeditFileBrowserPluginClass))
-#define GEDIT_IS_FILE_BROWSER_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GEDIT_TYPE_FILE_BROWSER_PLUGIN))
-#define GEDIT_IS_FILE_BROWSER_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GEDIT_TYPE_FILE_BROWSER_PLUGIN))
-#define GEDIT_FILE_BROWSER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GEDIT_TYPE_FILE_BROWSER_PLUGIN, GeditFileBrowserPluginClass))
-
-/* Private structure type */
-typedef struct _GeditFileBrowserPluginPrivate GeditFileBrowserPluginPrivate;
-typedef struct _GeditFileBrowserPlugin GeditFileBrowserPlugin;
-typedef struct _GeditFileBrowserPluginClass GeditFileBrowserPluginClass;
-
-struct _GeditFileBrowserPlugin
-{
- GeditPlugin parent_instance;
-
- /*< private > */
- GeditFileBrowserPluginPrivate *priv;
-};
-
-
-
-struct _GeditFileBrowserPluginClass
-{
- GeditPluginClass parent_class;
-};
-
-/*
- * Public methods
- */
-GType filetree_plugin_get_type (void) G_GNUC_CONST;
-
-/* All the plugins must implement this function */
-G_MODULE_EXPORT GType register_gedit_plugin (GTypeModule * module);
-
-G_END_DECLS
-#endif /* __GEDIT_FILE_BROWSER_PLUGIN_H__ */
-
-// ex:ts=8:noet:
diff --git a/plugins/filebrowser/gedit-file-browser-store.h b/plugins/filebrowser/gedit-file-browser-store.h
deleted file mode 100755
index f31da327..00000000
--- a/plugins/filebrowser/gedit-file-browser-store.h
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * gedit-file-browser-store.h - Gedit plugin providing easy file access
- * from the sidepanel
- *
- * Copyright (C) 2006 - Jesse van den Kieboom <[email protected]>
- *
- * 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GEDIT_FILE_BROWSER_STORE_H__
-#define __GEDIT_FILE_BROWSER_STORE_H__
-
-#include <gtk/gtk.h>
-
-G_BEGIN_DECLS
-#define GEDIT_TYPE_FILE_BROWSER_STORE (gedit_file_browser_store_get_type ())
-#define GEDIT_FILE_BROWSER_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEDIT_TYPE_FILE_BROWSER_STORE, GeditFileBrowserStore))
-#define GEDIT_FILE_BROWSER_STORE_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEDIT_TYPE_FILE_BROWSER_STORE, GeditFileBrowserStore const))
-#define GEDIT_FILE_BROWSER_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEDIT_TYPE_FILE_BROWSER_STORE, GeditFileBrowserStoreClass))
-#define GEDIT_IS_FILE_BROWSER_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEDIT_TYPE_FILE_BROWSER_STORE))
-#define GEDIT_IS_FILE_BROWSER_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEDIT_TYPE_FILE_BROWSER_STORE))
-#define GEDIT_FILE_BROWSER_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEDIT_TYPE_FILE_BROWSER_STORE, GeditFileBrowserStoreClass))
-
-typedef enum
-{
- GEDIT_FILE_BROWSER_STORE_COLUMN_ICON = 0,
- GEDIT_FILE_BROWSER_STORE_COLUMN_NAME,
- GEDIT_FILE_BROWSER_STORE_COLUMN_URI,
- GEDIT_FILE_BROWSER_STORE_COLUMN_FLAGS,
- GEDIT_FILE_BROWSER_STORE_COLUMN_EMBLEM,
- GEDIT_FILE_BROWSER_STORE_COLUMN_NUM
-} GeditFileBrowserStoreColumn;
-
-typedef enum
-{
- GEDIT_FILE_BROWSER_STORE_FLAG_IS_DIRECTORY = 1 << 0,
- GEDIT_FILE_BROWSER_STORE_FLAG_IS_HIDDEN = 1 << 1,
- GEDIT_FILE_BROWSER_STORE_FLAG_IS_TEXT = 1 << 2,
- GEDIT_FILE_BROWSER_STORE_FLAG_LOADED = 1 << 3,
- GEDIT_FILE_BROWSER_STORE_FLAG_IS_FILTERED = 1 << 4,
- GEDIT_FILE_BROWSER_STORE_FLAG_IS_DUMMY = 1 << 5
-} GeditFileBrowserStoreFlag;
-
-typedef enum
-{
- GEDIT_FILE_BROWSER_STORE_RESULT_OK,
- GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE,
- GEDIT_FILE_BROWSER_STORE_RESULT_ERROR,
- GEDIT_FILE_BROWSER_STORE_RESULT_NO_TRASH,
- GEDIT_FILE_BROWSER_STORE_RESULT_MOUNTING,
- GEDIT_FILE_BROWSER_STORE_RESULT_NUM
-} GeditFileBrowserStoreResult;
-
-typedef enum
-{
- GEDIT_FILE_BROWSER_STORE_FILTER_MODE_NONE = 0,
- GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN = 1 << 0,
- GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY = 1 << 1
-} GeditFileBrowserStoreFilterMode;
-
-#define FILE_IS_DIR(flags) (flags & GEDIT_FILE_BROWSER_STORE_FLAG_IS_DIRECTORY)
-#define FILE_IS_HIDDEN(flags) (flags & GEDIT_FILE_BROWSER_STORE_FLAG_IS_HIDDEN)
-#define FILE_IS_TEXT(flags) (flags & GEDIT_FILE_BROWSER_STORE_FLAG_IS_TEXT)
-#define FILE_LOADED(flags) (flags & GEDIT_FILE_BROWSER_STORE_FLAG_LOADED)
-#define FILE_IS_FILTERED(flags) (flags & GEDIT_FILE_BROWSER_STORE_FLAG_IS_FILTERED)
-#define FILE_IS_DUMMY(flags) (flags & GEDIT_FILE_BROWSER_STORE_FLAG_IS_DUMMY)
-
-typedef struct _GeditFileBrowserStore GeditFileBrowserStore;
-typedef struct _GeditFileBrowserStoreClass GeditFileBrowserStoreClass;
-typedef struct _GeditFileBrowserStorePrivate GeditFileBrowserStorePrivate;
-
-typedef gboolean (*GeditFileBrowserStoreFilterFunc) (GeditFileBrowserStore
- * model,
- GtkTreeIter * iter,
- gpointer user_data);
-
-struct _GeditFileBrowserStore
-{
- GObject parent;
-
- GeditFileBrowserStorePrivate *priv;
-};
-
-struct _GeditFileBrowserStoreClass {
- GObjectClass parent_class;
-
- /* Signals */
- void (*begin_loading) (GeditFileBrowserStore * model,
- GtkTreeIter * iter);
- void (*end_loading) (GeditFileBrowserStore * model,
- GtkTreeIter * iter);
- void (*error) (GeditFileBrowserStore * model,
- guint code,
- gchar * message);
- gboolean (*no_trash) (GeditFileBrowserStore * model,
- GList * files);
- void (*rename) (GeditFileBrowserStore * model,
- const gchar * olduri,
- const gchar * newuri);
- void (*begin_refresh) (GeditFileBrowserStore * model);
- void (*end_refresh) (GeditFileBrowserStore * model);
- void (*unload) (GeditFileBrowserStore * model,
- const gchar * uri);
-};
-
-GType gedit_file_browser_store_get_type (void) G_GNUC_CONST;
-GType gedit_file_browser_store_register_type (GTypeModule * module);
-
-GeditFileBrowserStore *gedit_file_browser_store_new (gchar const *root);
-
-GeditFileBrowserStoreResult
-gedit_file_browser_store_set_root_and_virtual_root (GeditFileBrowserStore * model,
- gchar const *root,
- gchar const *virtual_root);
-GeditFileBrowserStoreResult
-gedit_file_browser_store_set_root (GeditFileBrowserStore * model,
- gchar const *root);
-GeditFileBrowserStoreResult
-gedit_file_browser_store_set_virtual_root (GeditFileBrowserStore * model,
- GtkTreeIter * iter);
-GeditFileBrowserStoreResult
-gedit_file_browser_store_set_virtual_root_from_string (GeditFileBrowserStore * model,
- gchar const *root);
-GeditFileBrowserStoreResult
-gedit_file_browser_store_set_virtual_root_up (GeditFileBrowserStore * model);
-GeditFileBrowserStoreResult
-gedit_file_browser_store_set_virtual_root_top (GeditFileBrowserStore * model);
-
-gboolean
-gedit_file_browser_store_get_iter_virtual_root (GeditFileBrowserStore * model,
- GtkTreeIter * iter);
-gboolean gedit_file_browser_store_get_iter_root (GeditFileBrowserStore * model,
- GtkTreeIter * iter);
-gchar * gedit_file_browser_store_get_root (GeditFileBrowserStore * model);
-gchar * gedit_file_browser_store_get_virtual_root (GeditFileBrowserStore * model);
-
-gboolean gedit_file_browser_store_iter_equal (GeditFileBrowserStore * model,
- GtkTreeIter * iter1,
- GtkTreeIter * iter2);
-
-void gedit_file_browser_store_set_value (GeditFileBrowserStore * tree_model,
- GtkTreeIter * iter,
- gint column,
- GValue * value);
-
-void _gedit_file_browser_store_iter_expanded (GeditFileBrowserStore * model,
- GtkTreeIter * iter);
-void _gedit_file_browser_store_iter_collapsed (GeditFileBrowserStore * model,
- GtkTreeIter * iter);
-
-GeditFileBrowserStoreFilterMode
-gedit_file_browser_store_get_filter_mode (GeditFileBrowserStore * model);
-void gedit_file_browser_store_set_filter_mode (GeditFileBrowserStore * model,
- GeditFileBrowserStoreFilterMode mode);
-void gedit_file_browser_store_set_filter_func (GeditFileBrowserStore * model,
- GeditFileBrowserStoreFilterFunc func,
- gpointer user_data);
-void gedit_file_browser_store_refilter (GeditFileBrowserStore * model);
-GeditFileBrowserStoreFilterMode
-gedit_file_browser_store_filter_mode_get_default (void);
-
-void gedit_file_browser_store_refresh (GeditFileBrowserStore * model);
-gboolean gedit_file_browser_store_rename (GeditFileBrowserStore * model,
- GtkTreeIter * iter,
- gchar const *new_name,
- GError ** error);
-GeditFileBrowserStoreResult
-gedit_file_browser_store_delete (GeditFileBrowserStore * model,
- GtkTreeIter * iter,
- gboolean trash);
-GeditFileBrowserStoreResult
-gedit_file_browser_store_delete_all (GeditFileBrowserStore * model,
- GList *rows,
- gboolean trash);
-
-gboolean gedit_file_browser_store_new_file (GeditFileBrowserStore * model,
- GtkTreeIter * parent,
- GtkTreeIter * iter);
-gboolean gedit_file_browser_store_new_directory (GeditFileBrowserStore * model,
- GtkTreeIter * parent,
- GtkTreeIter * iter);
-
-void gedit_file_browser_store_cancel_mount_operation (GeditFileBrowserStore *store);
-
-G_END_DECLS
-#endif /* __GEDIT_FILE_BROWSER_STORE_H__ */
-
-// ex:ts=8:noet:
diff --git a/plugins/filebrowser/gedit-file-browser-view.h b/plugins/filebrowser/gedit-file-browser-view.h
deleted file mode 100755
index a5ada255..00000000
--- a/plugins/filebrowser/gedit-file-browser-view.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * gedit-file-browser-view.h - Gedit plugin providing easy file access
- * from the sidepanel
- *
- * Copyright (C) 2006 - Jesse van den Kieboom <[email protected]>
- *
- * 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GEDIT_FILE_BROWSER_VIEW_H__
-#define __GEDIT_FILE_BROWSER_VIEW_H__
-
-#include <gtk/gtk.h>
-
-G_BEGIN_DECLS
-#define GEDIT_TYPE_FILE_BROWSER_VIEW (gedit_file_browser_view_get_type ())
-#define GEDIT_FILE_BROWSER_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEDIT_TYPE_FILE_BROWSER_VIEW, GeditFileBrowserView))
-#define GEDIT_FILE_BROWSER_VIEW_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEDIT_TYPE_FILE_BROWSER_VIEW, GeditFileBrowserView const))
-#define GEDIT_FILE_BROWSER_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEDIT_TYPE_FILE_BROWSER_VIEW, GeditFileBrowserViewClass))
-#define GEDIT_IS_FILE_BROWSER_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEDIT_TYPE_FILE_BROWSER_VIEW))
-#define GEDIT_IS_FILE_BROWSER_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEDIT_TYPE_FILE_BROWSER_VIEW))
-#define GEDIT_FILE_BROWSER_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEDIT_TYPE_FILE_BROWSER_VIEW, GeditFileBrowserViewClass))
-
-typedef struct _GeditFileBrowserView GeditFileBrowserView;
-typedef struct _GeditFileBrowserViewClass GeditFileBrowserViewClass;
-typedef struct _GeditFileBrowserViewPrivate GeditFileBrowserViewPrivate;
-
-typedef enum {
- GEDIT_FILE_BROWSER_VIEW_CLICK_POLICY_DOUBLE,
- GEDIT_FILE_BROWSER_VIEW_CLICK_POLICY_SINGLE
-} GeditFileBrowserViewClickPolicy;
-
-struct _GeditFileBrowserView
-{
- GtkTreeView parent;
-
- GeditFileBrowserViewPrivate *priv;
-};
-
-struct _GeditFileBrowserViewClass
-{
- GtkTreeViewClass parent_class;
-
- /* Signals */
- void (*error) (GeditFileBrowserView * filetree,
- guint code,
- gchar const *message);
- void (*file_activated) (GeditFileBrowserView * filetree,
- GtkTreeIter *iter);
- void (*directory_activated) (GeditFileBrowserView * filetree,
- GtkTreeIter *iter);
- void (*bookmark_activated) (GeditFileBrowserView * filetree,
- GtkTreeIter *iter);
-};
-
-GType gedit_file_browser_view_get_type (void) G_GNUC_CONST;
-GType gedit_file_browser_view_register_type (GTypeModule * module);
-
-GtkWidget *gedit_file_browser_view_new (void);
-void gedit_file_browser_view_set_model (GeditFileBrowserView * tree_view,
- GtkTreeModel * model);
-void gedit_file_browser_view_start_rename (GeditFileBrowserView * tree_view,
- GtkTreeIter * iter);
-void gedit_file_browser_view_set_click_policy (GeditFileBrowserView * tree_view,
- GeditFileBrowserViewClickPolicy policy);
-void gedit_file_browser_view_set_restore_expand_state (GeditFileBrowserView * tree_view,
- gboolean restore_expand_state);
-
-G_END_DECLS
-#endif /* __GEDIT_FILE_BROWSER_VIEW_H__ */
-
-// ex:ts=8:noet:
diff --git a/plugins/filebrowser/gedit-file-browser-widget.h b/plugins/filebrowser/gedit-file-browser-widget.h
deleted file mode 100755
index e9cc2a0e..00000000
--- a/plugins/filebrowser/gedit-file-browser-widget.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * gedit-file-browser-widget.h - Gedit plugin providing easy file access
- * from the sidepanel
- *
- * Copyright (C) 2006 - Jesse van den Kieboom <[email protected]>
- *
- * 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GEDIT_FILE_BROWSER_WIDGET_H__
-#define __GEDIT_FILE_BROWSER_WIDGET_H__
-
-#include <gtk/gtk.h>
-#include "gedit-file-browser-store.h"
-#include "gedit-file-bookmarks-store.h"
-#include "gedit-file-browser-view.h"
-
-G_BEGIN_DECLS
-#define GEDIT_TYPE_FILE_BROWSER_WIDGET (gedit_file_browser_widget_get_type ())
-#define GEDIT_FILE_BROWSER_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEDIT_TYPE_FILE_BROWSER_WIDGET, GeditFileBrowserWidget))
-#define GEDIT_FILE_BROWSER_WIDGET_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEDIT_TYPE_FILE_BROWSER_WIDGET, GeditFileBrowserWidget const))
-#define GEDIT_FILE_BROWSER_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEDIT_TYPE_FILE_BROWSER_WIDGET, GeditFileBrowserWidgetClass))
-#define GEDIT_IS_FILE_BROWSER_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEDIT_TYPE_FILE_BROWSER_WIDGET))
-#define GEDIT_IS_FILE_BROWSER_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEDIT_TYPE_FILE_BROWSER_WIDGET))
-#define GEDIT_FILE_BROWSER_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEDIT_TYPE_FILE_BROWSER_WIDGET, GeditFileBrowserWidgetClass))
-
-typedef struct _GeditFileBrowserWidget GeditFileBrowserWidget;
-typedef struct _GeditFileBrowserWidgetClass GeditFileBrowserWidgetClass;
-typedef struct _GeditFileBrowserWidgetPrivate GeditFileBrowserWidgetPrivate;
-
-typedef
-gboolean (*GeditFileBrowserWidgetFilterFunc) (GeditFileBrowserWidget * obj,
- GeditFileBrowserStore *
- model, GtkTreeIter * iter,
- gpointer user_data);
-
-struct _GeditFileBrowserWidget
-{
- GtkVBox parent;
-
- GeditFileBrowserWidgetPrivate *priv;
-};
-
-struct _GeditFileBrowserWidgetClass
-{
- GtkVBoxClass parent_class;
-
- /* Signals */
- void (*uri_activated) (GeditFileBrowserWidget * widget,
- gchar const *uri);
- void (*error) (GeditFileBrowserWidget * widget,
- guint code,
- gchar const *message);
- gboolean (*confirm_delete) (GeditFileBrowserWidget * widget,
- GeditFileBrowserStore * model,
- GList *list);
- gboolean (*confirm_no_trash) (GeditFileBrowserWidget * widget,
- GList *list);
-};
-
-GType gedit_file_browser_widget_get_type (void) G_GNUC_CONST;
-GType gedit_file_browser_widget_register_type (GTypeModule * module);
-
-GtkWidget *gedit_file_browser_widget_new (const gchar *data_dir);
-
-void gedit_file_browser_widget_show_bookmarks (GeditFileBrowserWidget * obj);
-void gedit_file_browser_widget_show_files (GeditFileBrowserWidget * obj);
-
-void gedit_file_browser_widget_set_root (GeditFileBrowserWidget * obj,
- gchar const *root,
- gboolean virtual_root);
-void
-gedit_file_browser_widget_set_root_and_virtual_root (GeditFileBrowserWidget * obj,
- gchar const *root,
- gchar const *virtual_root);
-
-gboolean
-gedit_file_browser_widget_get_selected_directory (GeditFileBrowserWidget * obj,
- GtkTreeIter * iter);
-
-GeditFileBrowserStore *
-gedit_file_browser_widget_get_browser_store (GeditFileBrowserWidget * obj);
-GeditFileBookmarksStore *
-gedit_file_browser_widget_get_bookmarks_store (GeditFileBrowserWidget * obj);
-GeditFileBrowserView *
-gedit_file_browser_widget_get_browser_view (GeditFileBrowserWidget * obj);
-GtkWidget *
-gedit_file_browser_widget_get_filter_entry (GeditFileBrowserWidget * obj);
-
-GtkUIManager *
-gedit_file_browser_widget_get_ui_manager (GeditFileBrowserWidget * obj);
-
-gulong gedit_file_browser_widget_add_filter (GeditFileBrowserWidget * obj,
- GeditFileBrowserWidgetFilterFunc func,
- gpointer user_data,
- GDestroyNotify notify);
-void gedit_file_browser_widget_remove_filter (GeditFileBrowserWidget * obj,
- gulong id);
-void gedit_file_browser_widget_set_filter_pattern (GeditFileBrowserWidget * obj,
- gchar const *pattern);
-
-void gedit_file_browser_widget_refresh (GeditFileBrowserWidget * obj);
-void gedit_file_browser_widget_history_back (GeditFileBrowserWidget * obj);
-void gedit_file_browser_widget_history_forward (GeditFileBrowserWidget * obj);
-
-G_END_DECLS
-#endif /* __GEDIT_FILE_BROWSER_WIDGET_H__ */
-
-// ex:ts=8:noet:
diff --git a/plugins/filebrowser/gedit-file-bookmarks-store.c b/plugins/filebrowser/pluma-file-bookmarks-store.c
index 86e7f0c8..19def257 100755
--- a/plugins/filebrowser/gedit-file-bookmarks-store.c
+++ b/plugins/filebrowser/pluma-file-bookmarks-store.c
@@ -1,5 +1,5 @@
/*
- * gedit-file-bookmarks-store.c - Gedit plugin providing easy file access
+ * pluma-file-bookmarks-store.c - Pluma plugin providing easy file access
* from the sidepanel
*
* Copyright (C) 2006 - Jesse van den Kieboom <[email protected]>
@@ -22,17 +22,17 @@
#include <string.h>
#include <glib/gi18n.h>
#include <gio/gio.h>
-#include <gedit/gedit-utils.h>
-#include <gedit/gedit-plugin.h>
+#include <pluma/pluma-utils.h>
+#include <pluma/pluma-plugin.h>
-#include "gedit-file-bookmarks-store.h"
-#include "gedit-file-browser-utils.h"
+#include "pluma-file-bookmarks-store.h"
+#include "pluma-file-browser-utils.h"
-#define GEDIT_FILE_BOOKMARKS_STORE_GET_PRIVATE(object)( \
- G_TYPE_INSTANCE_GET_PRIVATE((object), GEDIT_TYPE_FILE_BOOKMARKS_STORE, \
- GeditFileBookmarksStorePrivate))
+#define PLUMA_FILE_BOOKMARKS_STORE_GET_PRIVATE(object)( \
+ G_TYPE_INSTANCE_GET_PRIVATE((object), PLUMA_TYPE_FILE_BOOKMARKS_STORE, \
+ PlumaFileBookmarksStorePrivate))
-struct _GeditFileBookmarksStorePrivate
+struct _PlumaFileBookmarksStorePrivate
{
GVolumeMonitor * volume_monitor;
GFileMonitor * bookmarks_monitor;
@@ -43,25 +43,25 @@ static void remove_node (GtkTreeModel * model,
static void on_fs_changed (GVolumeMonitor *monitor,
GObject *object,
- GeditFileBookmarksStore *model);
+ PlumaFileBookmarksStore *model);
static void on_bookmarks_file_changed (GFileMonitor * monitor,
GFile * file,
GFile * other_file,
GFileMonitorEvent event_type,
- GeditFileBookmarksStore * model);
+ PlumaFileBookmarksStore * model);
static gboolean find_with_flags (GtkTreeModel * model,
GtkTreeIter * iter,
gpointer obj,
guint flags,
guint notflags);
-GEDIT_PLUGIN_DEFINE_TYPE(GeditFileBookmarksStore, gedit_file_bookmarks_store, GTK_TYPE_TREE_STORE)
+PLUMA_PLUGIN_DEFINE_TYPE(PlumaFileBookmarksStore, pluma_file_bookmarks_store, GTK_TYPE_TREE_STORE)
static void
-gedit_file_bookmarks_store_dispose (GObject * object)
+pluma_file_bookmarks_store_dispose (GObject * object)
{
- GeditFileBookmarksStore *obj = GEDIT_FILE_BOOKMARKS_STORE (object);
+ PlumaFileBookmarksStore *obj = PLUMA_FILE_BOOKMARKS_STORE (object);
if (obj->priv->volume_monitor != NULL) {
g_signal_handlers_disconnect_by_func (obj->priv->volume_monitor,
@@ -77,35 +77,35 @@ gedit_file_bookmarks_store_dispose (GObject * object)
obj->priv->bookmarks_monitor = NULL;
}
- G_OBJECT_CLASS (gedit_file_bookmarks_store_parent_class)->dispose (object);
+ G_OBJECT_CLASS (pluma_file_bookmarks_store_parent_class)->dispose (object);
}
static void
-gedit_file_bookmarks_store_finalize (GObject * object)
+pluma_file_bookmarks_store_finalize (GObject * object)
{
- G_OBJECT_CLASS (gedit_file_bookmarks_store_parent_class)->finalize (object);
+ G_OBJECT_CLASS (pluma_file_bookmarks_store_parent_class)->finalize (object);
}
static void
-gedit_file_bookmarks_store_class_init (GeditFileBookmarksStoreClass *klass)
+pluma_file_bookmarks_store_class_init (PlumaFileBookmarksStoreClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->dispose = gedit_file_bookmarks_store_dispose;
- object_class->finalize = gedit_file_bookmarks_store_finalize;
+ object_class->dispose = pluma_file_bookmarks_store_dispose;
+ object_class->finalize = pluma_file_bookmarks_store_finalize;
- g_type_class_add_private (object_class, sizeof (GeditFileBookmarksStorePrivate));
+ g_type_class_add_private (object_class, sizeof (PlumaFileBookmarksStorePrivate));
}
static void
-gedit_file_bookmarks_store_init (GeditFileBookmarksStore * obj)
+pluma_file_bookmarks_store_init (PlumaFileBookmarksStore * obj)
{
- obj->priv = GEDIT_FILE_BOOKMARKS_STORE_GET_PRIVATE (obj);
+ obj->priv = PLUMA_FILE_BOOKMARKS_STORE_GET_PRIVATE (obj);
}
/* Private */
static void
-add_node (GeditFileBookmarksStore *model,
+add_node (PlumaFileBookmarksStore *model,
GdkPixbuf *pixbuf,
const gchar *name,
GObject *obj,
@@ -117,10 +117,10 @@ add_node (GeditFileBookmarksStore *model,
gtk_tree_store_append (GTK_TREE_STORE (model), &newiter, NULL);
gtk_tree_store_set (GTK_TREE_STORE (model), &newiter,
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_ICON, pixbuf,
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_NAME, name,
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_OBJECT, obj,
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_FLAGS, flags,
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_ICON, pixbuf,
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_NAME, name,
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_OBJECT, obj,
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_FLAGS, flags,
-1);
if (iter != NULL)
@@ -128,7 +128,7 @@ add_node (GeditFileBookmarksStore *model,
}
static gboolean
-add_file (GeditFileBookmarksStore *model,
+add_file (PlumaFileBookmarksStore *model,
GFile *file,
const gchar *name,
guint flags,
@@ -144,24 +144,24 @@ add_file (GeditFileBookmarksStore *model,
return FALSE;
}
- if (flags & GEDIT_FILE_BOOKMARKS_STORE_IS_HOME)
- pixbuf = gedit_file_browser_utils_pixbuf_from_theme ("user-home", GTK_ICON_SIZE_MENU);
- else if (flags & GEDIT_FILE_BOOKMARKS_STORE_IS_DESKTOP)
- pixbuf = gedit_file_browser_utils_pixbuf_from_theme ("user-desktop", GTK_ICON_SIZE_MENU);
- else if (flags & GEDIT_FILE_BOOKMARKS_STORE_IS_ROOT)
- pixbuf = gedit_file_browser_utils_pixbuf_from_theme ("drive-harddisk", GTK_ICON_SIZE_MENU);
+ if (flags & PLUMA_FILE_BOOKMARKS_STORE_IS_HOME)
+ pixbuf = pluma_file_browser_utils_pixbuf_from_theme ("user-home", GTK_ICON_SIZE_MENU);
+ else if (flags & PLUMA_FILE_BOOKMARKS_STORE_IS_DESKTOP)
+ pixbuf = pluma_file_browser_utils_pixbuf_from_theme ("user-desktop", GTK_ICON_SIZE_MENU);
+ else if (flags & PLUMA_FILE_BOOKMARKS_STORE_IS_ROOT)
+ pixbuf = pluma_file_browser_utils_pixbuf_from_theme ("drive-harddisk", GTK_ICON_SIZE_MENU);
if (pixbuf == NULL) {
/* getting the icon is a sync get_info call, so we just do it for local files */
if (native) {
- pixbuf = gedit_file_browser_utils_pixbuf_from_file (file, GTK_ICON_SIZE_MENU);
+ pixbuf = pluma_file_browser_utils_pixbuf_from_file (file, GTK_ICON_SIZE_MENU);
} else {
- pixbuf = gedit_file_browser_utils_pixbuf_from_theme ("folder", GTK_ICON_SIZE_MENU);
+ pixbuf = pluma_file_browser_utils_pixbuf_from_theme ("folder", GTK_ICON_SIZE_MENU);
}
}
if (name == NULL) {
- newname = gedit_file_browser_utils_file_basename (file);
+ newname = pluma_file_browser_utils_file_basename (file);
} else {
newname = g_strdup (name);
}
@@ -177,7 +177,7 @@ add_file (GeditFileBookmarksStore *model,
}
static void
-check_mount_separator (GeditFileBookmarksStore * model, guint flags,
+check_mount_separator (PlumaFileBookmarksStore * model, guint flags,
gboolean added)
{
GtkTreeIter iter;
@@ -186,12 +186,12 @@ check_mount_separator (GeditFileBookmarksStore * model, guint flags,
found =
find_with_flags (GTK_TREE_MODEL (model), &iter, NULL,
flags |
- GEDIT_FILE_BOOKMARKS_STORE_IS_SEPARATOR, 0);
+ PLUMA_FILE_BOOKMARKS_STORE_IS_SEPARATOR, 0);
if (added && !found) {
/* Add the separator */
add_node (model, NULL, NULL, NULL,
- flags | GEDIT_FILE_BOOKMARKS_STORE_IS_SEPARATOR,
+ flags | PLUMA_FILE_BOOKMARKS_STORE_IS_SEPARATOR,
NULL);
} else if (!added && found) {
remove_node (GTK_TREE_MODEL (model), &iter);
@@ -199,7 +199,7 @@ check_mount_separator (GeditFileBookmarksStore * model, guint flags,
}
static void
-init_special_directories (GeditFileBookmarksStore * model)
+init_special_directories (PlumaFileBookmarksStore * model)
{
gchar const *path;
GFile * file;
@@ -208,8 +208,8 @@ init_special_directories (GeditFileBookmarksStore * model)
if (path != NULL)
{
file = g_file_new_for_path (path);
- add_file (model, file, NULL, GEDIT_FILE_BOOKMARKS_STORE_IS_HOME |
- GEDIT_FILE_BOOKMARKS_STORE_IS_SPECIAL_DIR, NULL);
+ add_file (model, file, NULL, PLUMA_FILE_BOOKMARKS_STORE_IS_HOME |
+ PLUMA_FILE_BOOKMARKS_STORE_IS_SPECIAL_DIR, NULL);
g_object_unref (file);
}
@@ -217,8 +217,8 @@ init_special_directories (GeditFileBookmarksStore * model)
if (path != NULL)
{
file = g_file_new_for_path (path);
- add_file (model, file, NULL, GEDIT_FILE_BOOKMARKS_STORE_IS_DESKTOP |
- GEDIT_FILE_BOOKMARKS_STORE_IS_SPECIAL_DIR, NULL);
+ add_file (model, file, NULL, PLUMA_FILE_BOOKMARKS_STORE_IS_DESKTOP |
+ PLUMA_FILE_BOOKMARKS_STORE_IS_SPECIAL_DIR, NULL);
g_object_unref (file);
}
@@ -226,16 +226,16 @@ init_special_directories (GeditFileBookmarksStore * model)
if (path != NULL)
{
file = g_file_new_for_path (path);
- add_file (model, file, NULL, GEDIT_FILE_BOOKMARKS_STORE_IS_DOCUMENTS |
- GEDIT_FILE_BOOKMARKS_STORE_IS_SPECIAL_DIR, NULL);
+ add_file (model, file, NULL, PLUMA_FILE_BOOKMARKS_STORE_IS_DOCUMENTS |
+ PLUMA_FILE_BOOKMARKS_STORE_IS_SPECIAL_DIR, NULL);
g_object_unref (file);
}
file = g_file_new_for_uri ("file:///");
- add_file (model, file, _("File System"), GEDIT_FILE_BOOKMARKS_STORE_IS_ROOT, NULL);
+ add_file (model, file, _("File System"), PLUMA_FILE_BOOKMARKS_STORE_IS_ROOT, NULL);
g_object_unref (file);
- check_mount_separator (model, GEDIT_FILE_BOOKMARKS_STORE_IS_ROOT, TRUE);
+ check_mount_separator (model, PLUMA_FILE_BOOKMARKS_STORE_IS_ROOT, TRUE);
}
static void
@@ -246,7 +246,7 @@ get_fs_properties (gpointer fs,
{
GIcon *icon = NULL;
- *flags = GEDIT_FILE_BOOKMARKS_STORE_IS_FS;
+ *flags = PLUMA_FILE_BOOKMARKS_STORE_IS_FS;
*name = NULL;
*pixbuf = NULL;
@@ -255,33 +255,33 @@ get_fs_properties (gpointer fs,
icon = g_drive_get_icon (G_DRIVE (fs));
*name = g_drive_get_name (G_DRIVE (fs));
- *flags |= GEDIT_FILE_BOOKMARKS_STORE_IS_DRIVE;
+ *flags |= PLUMA_FILE_BOOKMARKS_STORE_IS_DRIVE;
}
else if (G_IS_VOLUME (fs))
{
icon = g_volume_get_icon (G_VOLUME (fs));
*name = g_volume_get_name (G_VOLUME (fs));
- *flags |= GEDIT_FILE_BOOKMARKS_STORE_IS_VOLUME;
+ *flags |= PLUMA_FILE_BOOKMARKS_STORE_IS_VOLUME;
}
else if (G_IS_MOUNT (fs))
{
icon = g_mount_get_icon (G_MOUNT (fs));
*name = g_mount_get_name (G_MOUNT (fs));
- *flags |= GEDIT_FILE_BOOKMARKS_STORE_IS_MOUNT;
+ *flags |= PLUMA_FILE_BOOKMARKS_STORE_IS_MOUNT;
}
if (icon)
{
- *pixbuf = gedit_file_browser_utils_pixbuf_from_icon (icon, GTK_ICON_SIZE_MENU);
+ *pixbuf = pluma_file_browser_utils_pixbuf_from_icon (icon, GTK_ICON_SIZE_MENU);
g_object_unref (icon);
}
}
static void
-add_fs (GeditFileBookmarksStore *model,
+add_fs (PlumaFileBookmarksStore *model,
gpointer fs,
guint flags,
GtkTreeIter *iter)
@@ -297,15 +297,15 @@ add_fs (GeditFileBookmarksStore *model,
g_object_unref (pixbuf);
g_free (name);
- check_mount_separator (model, GEDIT_FILE_BOOKMARKS_STORE_IS_FS, TRUE);
+ check_mount_separator (model, PLUMA_FILE_BOOKMARKS_STORE_IS_FS, TRUE);
}
static void
process_volume_cb (GVolume *volume,
- GeditFileBookmarksStore *model)
+ PlumaFileBookmarksStore *model)
{
GMount *mount;
- guint flags = GEDIT_FILE_BOOKMARKS_STORE_NONE;
+ guint flags = PLUMA_FILE_BOOKMARKS_STORE_NONE;
mount = g_volume_get_mount (volume);
/* CHECK: should we use the LOCAL/REMOTE thing still? */
@@ -324,7 +324,7 @@ process_volume_cb (GVolume *volume,
}
static void
-process_drive_novolumes (GeditFileBookmarksStore *model,
+process_drive_novolumes (PlumaFileBookmarksStore *model,
GDrive *drive)
{
if (g_drive_is_media_removable (drive) &&
@@ -335,13 +335,13 @@ process_drive_novolumes (GeditFileBookmarksStore *model,
drives where media detection fails. We show the
drive and poll for media when the user activates
it */
- add_fs (model, drive, GEDIT_FILE_BOOKMARKS_STORE_NONE, NULL);
+ add_fs (model, drive, PLUMA_FILE_BOOKMARKS_STORE_NONE, NULL);
}
}
static void
process_drive_cb (GDrive *drive,
- GeditFileBookmarksStore *model)
+ PlumaFileBookmarksStore *model)
{
GList *volumes;
@@ -360,7 +360,7 @@ process_drive_cb (GDrive *drive,
}
static void
-init_drives (GeditFileBookmarksStore *model)
+init_drives (PlumaFileBookmarksStore *model)
{
GList *drives;
@@ -373,7 +373,7 @@ init_drives (GeditFileBookmarksStore *model)
static void
process_volume_nodrive_cb (GVolume *volume,
- GeditFileBookmarksStore *model)
+ PlumaFileBookmarksStore *model)
{
GDrive *drive;
@@ -389,7 +389,7 @@ process_volume_nodrive_cb (GVolume *volume,
}
static void
-init_volumes (GeditFileBookmarksStore *model)
+init_volumes (PlumaFileBookmarksStore *model)
{
GList *volumes;
@@ -402,7 +402,7 @@ init_volumes (GeditFileBookmarksStore *model)
static void
process_mount_novolume_cb (GMount *mount,
- GeditFileBookmarksStore *model)
+ PlumaFileBookmarksStore *model)
{
GVolume *volume;
@@ -415,12 +415,12 @@ process_mount_novolume_cb (GMount *mount,
else if (!g_mount_is_shadowed (mount))
{
/* Add the mount */
- add_fs (model, mount, GEDIT_FILE_BOOKMARKS_STORE_NONE, NULL);
+ add_fs (model, mount, PLUMA_FILE_BOOKMARKS_STORE_NONE, NULL);
}
}
static void
-init_mounts (GeditFileBookmarksStore *model)
+init_mounts (PlumaFileBookmarksStore *model)
{
GList *mounts;
@@ -432,7 +432,7 @@ init_mounts (GeditFileBookmarksStore *model)
}
static void
-init_fs (GeditFileBookmarksStore * model)
+init_fs (PlumaFileBookmarksStore * model)
{
if (model->priv->volume_monitor == NULL) {
const gchar **ptr;
@@ -465,21 +465,21 @@ init_fs (GeditFileBookmarksStore * model)
}
static gboolean
-add_bookmark (GeditFileBookmarksStore * model,
+add_bookmark (PlumaFileBookmarksStore * model,
gchar const * name,
gchar const * uri)
{
GFile * file;
gboolean ret;
- guint flags = GEDIT_FILE_BOOKMARKS_STORE_IS_BOOKMARK;
+ guint flags = PLUMA_FILE_BOOKMARKS_STORE_IS_BOOKMARK;
GtkTreeIter iter;
file = g_file_new_for_uri (uri);
if (g_file_is_native (file)) {
- flags |= GEDIT_FILE_BOOKMARKS_STORE_IS_LOCAL_BOOKMARK;
+ flags |= PLUMA_FILE_BOOKMARKS_STORE_IS_LOCAL_BOOKMARK;
} else {
- flags |= GEDIT_FILE_BOOKMARKS_STORE_IS_REMOTE_BOOKMARK;
+ flags |= PLUMA_FILE_BOOKMARKS_STORE_IS_REMOTE_BOOKMARK;
}
ret = add_file (model, file, name, flags, &iter);
@@ -490,7 +490,7 @@ add_bookmark (GeditFileBookmarksStore * model,
}
static void
-init_bookmarks (GeditFileBookmarksStore * model)
+init_bookmarks (PlumaFileBookmarksStore * model)
{
gchar *bookmarks;
GError *error = NULL;
@@ -524,7 +524,7 @@ init_bookmarks (GeditFileBookmarksStore * model)
/* the bookmarks file should contain valid
* URIs, but paranoia is good */
- if (gedit_utils_is_valid_uri (*line)) {
+ if (pluma_utils_is_valid_uri (*line)) {
added |= add_bookmark (model, name, *line);
}
}
@@ -554,20 +554,20 @@ init_bookmarks (GeditFileBookmarksStore * model)
if (added) {
/* Bookmarks separator */
add_node (model, NULL, NULL, NULL,
- GEDIT_FILE_BOOKMARKS_STORE_IS_BOOKMARK |
- GEDIT_FILE_BOOKMARKS_STORE_IS_SEPARATOR, NULL);
+ PLUMA_FILE_BOOKMARKS_STORE_IS_BOOKMARK |
+ PLUMA_FILE_BOOKMARKS_STORE_IS_SEPARATOR, NULL);
}
g_free (bookmarks);
}
static gint flags_order[] = {
- GEDIT_FILE_BOOKMARKS_STORE_IS_HOME,
- GEDIT_FILE_BOOKMARKS_STORE_IS_DESKTOP,
- GEDIT_FILE_BOOKMARKS_STORE_IS_SPECIAL_DIR,
- GEDIT_FILE_BOOKMARKS_STORE_IS_ROOT,
- GEDIT_FILE_BOOKMARKS_STORE_IS_FS,
- GEDIT_FILE_BOOKMARKS_STORE_IS_BOOKMARK,
+ PLUMA_FILE_BOOKMARKS_STORE_IS_HOME,
+ PLUMA_FILE_BOOKMARKS_STORE_IS_DESKTOP,
+ PLUMA_FILE_BOOKMARKS_STORE_IS_SPECIAL_DIR,
+ PLUMA_FILE_BOOKMARKS_STORE_IS_ROOT,
+ PLUMA_FILE_BOOKMARKS_STORE_IS_FS,
+ PLUMA_FILE_BOOKMARKS_STORE_IS_BOOKMARK,
-1
};
@@ -600,17 +600,17 @@ bookmarks_compare_names (GtkTreeModel * model, GtkTreeIter * a,
guint f2;
gtk_tree_model_get (model, a,
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_NAME, &n1,
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_FLAGS, &f1,
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_NAME, &n1,
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_FLAGS, &f1,
-1);
gtk_tree_model_get (model, b,
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_NAME, &n2,
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_FLAGS, &f2,
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_NAME, &n2,
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_FLAGS, &f2,
-1);
/* do not sort actual bookmarks to keep same order as in caja */
- if ((f1 & GEDIT_FILE_BOOKMARKS_STORE_IS_BOOKMARK) &&
- (f2 & GEDIT_FILE_BOOKMARKS_STORE_IS_BOOKMARK))
+ if ((f1 & PLUMA_FILE_BOOKMARKS_STORE_IS_BOOKMARK) &&
+ (f2 & PLUMA_FILE_BOOKMARKS_STORE_IS_BOOKMARK))
result = 0;
else if (n1 == NULL && n2 == NULL)
result = 0;
@@ -636,13 +636,13 @@ bookmarks_compare_flags (GtkTreeModel * model, GtkTreeIter * a,
gint *flags;
guint sep;
- sep = GEDIT_FILE_BOOKMARKS_STORE_IS_SEPARATOR;
+ sep = PLUMA_FILE_BOOKMARKS_STORE_IS_SEPARATOR;
gtk_tree_model_get (model, a,
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_FLAGS, &f1,
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_FLAGS, &f1,
-1);
gtk_tree_model_get (model, b,
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_FLAGS, &f2,
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_FLAGS, &f2,
-1);
for (flags = flags_order; *flags != -1; ++flags) {
@@ -691,9 +691,9 @@ find_with_flags (GtkTreeModel * model, GtkTreeIter * iter, gpointer obj,
do {
gtk_tree_model_get (model, &child,
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_OBJECT,
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_OBJECT,
&childobj,
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_FLAGS,
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_FLAGS,
&childflags, -1);
fequal = (obj == childobj);
@@ -718,13 +718,13 @@ remove_node (GtkTreeModel * model, GtkTreeIter * iter)
guint flags;
gtk_tree_model_get (model, iter,
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_FLAGS, &flags,
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_FLAGS, &flags,
-1);
- if (!(flags & GEDIT_FILE_BOOKMARKS_STORE_IS_SEPARATOR)) {
- if (flags & GEDIT_FILE_BOOKMARKS_STORE_IS_FS) {
- check_mount_separator (GEDIT_FILE_BOOKMARKS_STORE (model),
- flags & GEDIT_FILE_BOOKMARKS_STORE_IS_FS,
+ if (!(flags & PLUMA_FILE_BOOKMARKS_STORE_IS_SEPARATOR)) {
+ if (flags & PLUMA_FILE_BOOKMARKS_STORE_IS_FS) {
+ check_mount_separator (PLUMA_FILE_BOOKMARKS_STORE (model),
+ flags & PLUMA_FILE_BOOKMARKS_STORE_IS_FS,
FALSE);
}
}
@@ -733,19 +733,19 @@ remove_node (GtkTreeModel * model, GtkTreeIter * iter)
}
static void
-remove_bookmarks (GeditFileBookmarksStore * model)
+remove_bookmarks (PlumaFileBookmarksStore * model)
{
GtkTreeIter iter;
while (find_with_flags (GTK_TREE_MODEL (model), &iter, NULL,
- GEDIT_FILE_BOOKMARKS_STORE_IS_BOOKMARK,
+ PLUMA_FILE_BOOKMARKS_STORE_IS_BOOKMARK,
0)) {
remove_node (GTK_TREE_MODEL (model), &iter);
}
}
static void
-initialize_fill (GeditFileBookmarksStore * model)
+initialize_fill (PlumaFileBookmarksStore * model)
{
init_special_directories (model);
init_fs (model);
@@ -753,10 +753,10 @@ initialize_fill (GeditFileBookmarksStore * model)
}
/* Public */
-GeditFileBookmarksStore *
-gedit_file_bookmarks_store_new (void)
+PlumaFileBookmarksStore *
+pluma_file_bookmarks_store_new (void)
{
- GeditFileBookmarksStore *model;
+ PlumaFileBookmarksStore *model;
GType column_types[] = {
GDK_TYPE_PIXBUF,
G_TYPE_STRING,
@@ -764,9 +764,9 @@ gedit_file_bookmarks_store_new (void)
G_TYPE_UINT
};
- model = g_object_new (GEDIT_TYPE_FILE_BOOKMARKS_STORE, NULL);
+ model = g_object_new (PLUMA_TYPE_FILE_BOOKMARKS_STORE, NULL);
gtk_tree_store_set_column_types (GTK_TREE_STORE (model),
- GEDIT_FILE_BOOKMARKS_STORE_N_COLUMNS,
+ PLUMA_FILE_BOOKMARKS_STORE_N_COLUMNS,
column_types);
gtk_tree_sortable_set_default_sort_func (GTK_TREE_SORTABLE (model),
@@ -782,7 +782,7 @@ gedit_file_bookmarks_store_new (void)
}
gchar *
-gedit_file_bookmarks_store_get_uri (GeditFileBookmarksStore * model,
+pluma_file_bookmarks_store_get_uri (PlumaFileBookmarksStore * model,
GtkTreeIter * iter)
{
GObject * obj;
@@ -791,22 +791,22 @@ gedit_file_bookmarks_store_get_uri (GeditFileBookmarksStore * model,
gchar * ret = NULL;
gboolean isfs;
- g_return_val_if_fail (GEDIT_IS_FILE_BOOKMARKS_STORE (model), NULL);
+ g_return_val_if_fail (PLUMA_IS_FILE_BOOKMARKS_STORE (model), NULL);
g_return_val_if_fail (iter != NULL, NULL);
gtk_tree_model_get (GTK_TREE_MODEL (model), iter,
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_FLAGS,
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_FLAGS,
&flags,
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_OBJECT,
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_OBJECT,
&obj,
-1);
if (obj == NULL)
return NULL;
- isfs = (flags & GEDIT_FILE_BOOKMARKS_STORE_IS_FS);
+ isfs = (flags & PLUMA_FILE_BOOKMARKS_STORE_IS_FS);
- if (isfs && (flags & GEDIT_FILE_BOOKMARKS_STORE_IS_MOUNT))
+ if (isfs && (flags & PLUMA_FILE_BOOKMARKS_STORE_IS_MOUNT))
{
file = g_mount_get_root (G_MOUNT (obj));
}
@@ -827,7 +827,7 @@ gedit_file_bookmarks_store_get_uri (GeditFileBookmarksStore * model,
}
void
-gedit_file_bookmarks_store_refresh (GeditFileBookmarksStore * model)
+pluma_file_bookmarks_store_refresh (PlumaFileBookmarksStore * model)
{
gtk_tree_store_clear (GTK_TREE_STORE (model));
initialize_fill (model);
@@ -836,11 +836,11 @@ gedit_file_bookmarks_store_refresh (GeditFileBookmarksStore * model)
static void
on_fs_changed (GVolumeMonitor *monitor,
GObject *object,
- GeditFileBookmarksStore *model)
+ PlumaFileBookmarksStore *model)
{
GtkTreeModel *tree_model = GTK_TREE_MODEL (model);
- guint flags = GEDIT_FILE_BOOKMARKS_STORE_IS_FS;
- guint noflags = GEDIT_FILE_BOOKMARKS_STORE_IS_SEPARATOR;
+ guint flags = PLUMA_FILE_BOOKMARKS_STORE_IS_FS;
+ guint noflags = PLUMA_FILE_BOOKMARKS_STORE_IS_SEPARATOR;
GtkTreeIter iter;
/* clear all fs items */
@@ -856,7 +856,7 @@ on_bookmarks_file_changed (GFileMonitor * monitor,
GFile * file,
GFile * other_file,
GFileMonitorEvent event_type,
- GeditFileBookmarksStore * model)
+ PlumaFileBookmarksStore * model)
{
switch (event_type) {
case G_FILE_MONITOR_EVENT_CHANGED:
diff --git a/plugins/filebrowser/pluma-file-bookmarks-store.h b/plugins/filebrowser/pluma-file-bookmarks-store.h
new file mode 100755
index 00000000..c811f588
--- /dev/null
+++ b/plugins/filebrowser/pluma-file-bookmarks-store.h
@@ -0,0 +1,90 @@
+/*
+ * pluma-file-bookmarks-store.h - Pluma plugin providing easy file access
+ * from the sidepanel
+ *
+ * Copyright (C) 2006 - Jesse van den Kieboom <[email protected]>
+ *
+ * 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __PLUMA_FILE_BOOKMARKS_STORE_H__
+#define __PLUMA_FILE_BOOKMARKS_STORE_H__
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+#define PLUMA_TYPE_FILE_BOOKMARKS_STORE (pluma_file_bookmarks_store_get_type ())
+#define PLUMA_FILE_BOOKMARKS_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PLUMA_TYPE_FILE_BOOKMARKS_STORE, PlumaFileBookmarksStore))
+#define PLUMA_FILE_BOOKMARKS_STORE_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PLUMA_TYPE_FILE_BOOKMARKS_STORE, PlumaFileBookmarksStore const))
+#define PLUMA_FILE_BOOKMARKS_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PLUMA_TYPE_FILE_BOOKMARKS_STORE, PlumaFileBookmarksStoreClass))
+#define PLUMA_IS_FILE_BOOKMARKS_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PLUMA_TYPE_FILE_BOOKMARKS_STORE))
+#define PLUMA_IS_FILE_BOOKMARKS_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PLUMA_TYPE_FILE_BOOKMARKS_STORE))
+#define PLUMA_FILE_BOOKMARKS_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PLUMA_TYPE_FILE_BOOKMARKS_STORE, PlumaFileBookmarksStoreClass))
+
+typedef struct _PlumaFileBookmarksStore PlumaFileBookmarksStore;
+typedef struct _PlumaFileBookmarksStoreClass PlumaFileBookmarksStoreClass;
+typedef struct _PlumaFileBookmarksStorePrivate PlumaFileBookmarksStorePrivate;
+
+enum
+{
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_ICON = 0,
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_NAME,
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_OBJECT,
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_FLAGS,
+ PLUMA_FILE_BOOKMARKS_STORE_N_COLUMNS
+};
+
+enum
+{
+ PLUMA_FILE_BOOKMARKS_STORE_NONE = 0,
+ PLUMA_FILE_BOOKMARKS_STORE_IS_SEPARATOR = 1 << 0, /* Separator item */
+ PLUMA_FILE_BOOKMARKS_STORE_IS_SPECIAL_DIR = 1 << 1, /* Special user dir */
+ PLUMA_FILE_BOOKMARKS_STORE_IS_HOME = 1 << 2, /* The special Home user directory */
+ PLUMA_FILE_BOOKMARKS_STORE_IS_DESKTOP = 1 << 3, /* The special Desktop user directory */
+ PLUMA_FILE_BOOKMARKS_STORE_IS_DOCUMENTS = 1 << 4, /* The special Documents user directory */
+ PLUMA_FILE_BOOKMARKS_STORE_IS_FS = 1 << 5, /* A mount object */
+ PLUMA_FILE_BOOKMARKS_STORE_IS_MOUNT = 1 << 6, /* A mount object */
+ PLUMA_FILE_BOOKMARKS_STORE_IS_VOLUME = 1 << 7, /* A volume object */
+ PLUMA_FILE_BOOKMARKS_STORE_IS_DRIVE = 1 << 8, /* A drive object */
+ PLUMA_FILE_BOOKMARKS_STORE_IS_ROOT = 1 << 9, /* The root file system (file:///) */
+ PLUMA_FILE_BOOKMARKS_STORE_IS_BOOKMARK = 1 << 10, /* A gtk bookmark */
+ PLUMA_FILE_BOOKMARKS_STORE_IS_REMOTE_BOOKMARK = 1 << 11, /* A remote gtk bookmark */
+ PLUMA_FILE_BOOKMARKS_STORE_IS_LOCAL_BOOKMARK = 1 << 12 /* A local gtk bookmark */
+};
+
+struct _PlumaFileBookmarksStore
+{
+ GtkTreeStore parent;
+
+ PlumaFileBookmarksStorePrivate *priv;
+};
+
+struct _PlumaFileBookmarksStoreClass
+{
+ GtkTreeStoreClass parent_class;
+};
+
+GType pluma_file_bookmarks_store_get_type (void) G_GNUC_CONST;
+GType pluma_file_bookmarks_store_register_type (GTypeModule * module);
+
+PlumaFileBookmarksStore *pluma_file_bookmarks_store_new (void);
+gchar *pluma_file_bookmarks_store_get_uri (PlumaFileBookmarksStore * model,
+ GtkTreeIter * iter);
+void pluma_file_bookmarks_store_refresh (PlumaFileBookmarksStore * model);
+
+G_END_DECLS
+#endif /* __PLUMA_FILE_BOOKMARKS_STORE_H__ */
+
+// ex:ts=8:noet:
diff --git a/plugins/filebrowser/gedit-file-browser-enum-register.c.template b/plugins/filebrowser/pluma-file-browser-enum-register.c.template
index 63a9c562..0bbd1018 100755
--- a/plugins/filebrowser/gedit-file-browser-enum-register.c.template
+++ b/plugins/filebrowser/pluma-file-browser-enum-register.c.template
@@ -1,6 +1,6 @@
/*** BEGIN file-header ***/
void
-gedit_file_browser_enum_and_flag_register_type (GTypeModule * module)
+pluma_file_browser_enum_and_flag_register_type (GTypeModule * module)
{
/*** END file-header ***/
diff --git a/plugins/filebrowser/gedit-file-browser-enum-types.c.template b/plugins/filebrowser/pluma-file-browser-enum-types.c.template
index 4e89370d..dc1ac9ea 100755
--- a/plugins/filebrowser/gedit-file-browser-enum-types.c.template
+++ b/plugins/filebrowser/pluma-file-browser-enum-types.c.template
@@ -1,5 +1,5 @@
/*** BEGIN file-header ***/
-#include "gedit-file-browser-enum-types.h"
+#include "pluma-file-browser-enum-types.h"
/*** END file-header ***/
diff --git a/plugins/filebrowser/gedit-file-browser-enum-types.h.template b/plugins/filebrowser/pluma-file-browser-enum-types.h.template
index aea4fad9..4f09901e 100755
--- a/plugins/filebrowser/gedit-file-browser-enum-types.h.template
+++ b/plugins/filebrowser/pluma-file-browser-enum-types.h.template
@@ -1,6 +1,6 @@
/*** BEGIN file-header ***/
-#ifndef __GEDIT_FILE_BROWSER_ENUM_TYPES_H__
-#define __GEDIT_FILE_BROWSER_ENUM_TYPES_H__
+#ifndef __PLUMA_FILE_BROWSER_ENUM_TYPES_H__
+#define __PLUMA_FILE_BROWSER_ENUM_TYPES_H__
#include <glib-object.h>
@@ -14,16 +14,16 @@ G_BEGIN_DECLS
/*** END file-production ***/
/*** BEGIN enumeration-production ***/
-#define GEDIT_TYPE_@ENUMSHORT@ (@enum_name@_get_type())
+#define PLUMA_TYPE_@ENUMSHORT@ (@enum_name@_get_type())
GType @enum_name@_get_type (void) G_GNUC_CONST;
/*** END enumeration-production ***/
/*** BEGIN file-tail ***/
-void gedit_file_browser_enum_and_flag_register_type (GTypeModule * module);
+void pluma_file_browser_enum_and_flag_register_type (GTypeModule * module);
G_END_DECLS
-#endif /* __GEDIT_FILE_BROWSER_ENUM_TYPES_H__ */
+#endif /* __PLUMA_FILE_BROWSER_ENUM_TYPES_H__ */
/*** END file-tail ***/
diff --git a/plugins/filebrowser/gedit-file-browser-error.h b/plugins/filebrowser/pluma-file-browser-error.h
index ec5b8618..59f01e2a 100755
--- a/plugins/filebrowser/gedit-file-browser-error.h
+++ b/plugins/filebrowser/pluma-file-browser-error.h
@@ -1,5 +1,5 @@
/*
- * gedit-file-browser-error.h - Gedit plugin providing easy file access
+ * pluma-file-browser-error.h - Pluma plugin providing easy file access
* from the sidepanel
*
* Copyright (C) 2006 - Jesse van den Kieboom <[email protected]>
@@ -19,23 +19,23 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifndef __GEDIT_FILE_BROWSER_ERROR_H__
-#define __GEDIT_FILE_BROWSER_ERROR_H__
+#ifndef __PLUMA_FILE_BROWSER_ERROR_H__
+#define __PLUMA_FILE_BROWSER_ERROR_H__
G_BEGIN_DECLS
typedef enum {
- GEDIT_FILE_BROWSER_ERROR_NONE,
- GEDIT_FILE_BROWSER_ERROR_RENAME,
- GEDIT_FILE_BROWSER_ERROR_DELETE,
- GEDIT_FILE_BROWSER_ERROR_NEW_FILE,
- GEDIT_FILE_BROWSER_ERROR_NEW_DIRECTORY,
- GEDIT_FILE_BROWSER_ERROR_OPEN_DIRECTORY,
- GEDIT_FILE_BROWSER_ERROR_SET_ROOT,
- GEDIT_FILE_BROWSER_ERROR_LOAD_DIRECTORY,
- GEDIT_FILE_BROWSER_ERROR_NUM
-} GeditFileBrowserError;
+ PLUMA_FILE_BROWSER_ERROR_NONE,
+ PLUMA_FILE_BROWSER_ERROR_RENAME,
+ PLUMA_FILE_BROWSER_ERROR_DELETE,
+ PLUMA_FILE_BROWSER_ERROR_NEW_FILE,
+ PLUMA_FILE_BROWSER_ERROR_NEW_DIRECTORY,
+ PLUMA_FILE_BROWSER_ERROR_OPEN_DIRECTORY,
+ PLUMA_FILE_BROWSER_ERROR_SET_ROOT,
+ PLUMA_FILE_BROWSER_ERROR_LOAD_DIRECTORY,
+ PLUMA_FILE_BROWSER_ERROR_NUM
+} PlumaFileBrowserError;
G_END_DECLS
-#endif /* __GEDIT_FILE_BROWSER_ERROR_H__ */
+#endif /* __PLUMA_FILE_BROWSER_ERROR_H__ */
diff --git a/plugins/filebrowser/gedit-file-browser-marshal.list b/plugins/filebrowser/pluma-file-browser-marshal.list
index 5fa72c8b..5fa72c8b 100755
--- a/plugins/filebrowser/gedit-file-browser-marshal.list
+++ b/plugins/filebrowser/pluma-file-browser-marshal.list
diff --git a/plugins/filebrowser/gedit-file-browser-messages.c b/plugins/filebrowser/pluma-file-browser-messages.c
index b587edf1..f4b20d05 100755
--- a/plugins/filebrowser/gedit-file-browser-messages.c
+++ b/plugins/filebrowser/pluma-file-browser-messages.c
@@ -1,16 +1,16 @@
-#include "gedit-file-browser-messages.h"
-#include "gedit-file-browser-store.h"
-#include <gedit/gedit-message.h>
+#include "pluma-file-browser-messages.h"
+#include "pluma-file-browser-store.h"
+#include <pluma/pluma-message.h>
#define MESSAGE_OBJECT_PATH "/plugins/filebrowser"
-#define WINDOW_DATA_KEY "GeditFileBrowserMessagesWindowData"
+#define WINDOW_DATA_KEY "PlumaFileBrowserMessagesWindowData"
-#define BUS_CONNECT(bus, name, data) gedit_message_bus_connect(bus, MESSAGE_OBJECT_PATH, #name, (GeditMessageCallback) message_##name##_cb, data, NULL)
+#define BUS_CONNECT(bus, name, data) pluma_message_bus_connect(bus, MESSAGE_OBJECT_PATH, #name, (PlumaMessageCallback) message_##name##_cb, data, NULL)
typedef struct
{
- GeditWindow *window;
- GeditMessage *message;
+ PlumaWindow *window;
+ PlumaMessage *message;
} MessageCacheData;
typedef struct
@@ -24,8 +24,8 @@ typedef struct
GList *merge_ids;
GtkActionGroup *merged_actions;
- GeditMessageBus *bus;
- GeditFileBrowserWidget *widget;
+ PlumaMessageBus *bus;
+ PlumaFileBrowserWidget *widget;
GHashTable *row_tracking;
GHashTable *filters;
@@ -35,19 +35,19 @@ typedef struct
{
gulong id;
- GeditWindow *window;
- GeditMessage *message;
+ PlumaWindow *window;
+ PlumaMessage *message;
} FilterData;
static WindowData *
-window_data_new (GeditWindow *window,
- GeditFileBrowserWidget *widget)
+window_data_new (PlumaWindow *window,
+ PlumaFileBrowserWidget *widget)
{
WindowData *data = g_slice_new (WindowData);
GtkUIManager *manager;
GList *groups;
- data->bus = gedit_window_get_message_bus (window);
+ data->bus = pluma_window_get_message_bus (window);
data->widget = widget;
data->row_tracking = g_hash_table_new_full (g_str_hash,
g_str_equal,
@@ -59,7 +59,7 @@ window_data_new (GeditWindow *window,
(GDestroyNotify)g_free,
NULL);
- manager = gedit_file_browser_widget_get_ui_manager (widget);
+ manager = pluma_file_browser_widget_get_ui_manager (widget);
data->merge_ids = NULL;
data->merged_actions = gtk_action_group_new ("MessageMergedActions");
@@ -73,13 +73,13 @@ window_data_new (GeditWindow *window,
}
static WindowData *
-get_window_data (GeditWindow * window)
+get_window_data (PlumaWindow * window)
{
return (WindowData *) (g_object_get_data (G_OBJECT (window), WINDOW_DATA_KEY));
}
static void
-window_data_free (GeditWindow *window)
+window_data_free (PlumaWindow *window)
{
WindowData *data = get_window_data (window);
GtkUIManager *manager;
@@ -88,7 +88,7 @@ window_data_free (GeditWindow *window)
g_hash_table_destroy (data->row_tracking);
g_hash_table_destroy (data->filters);
- manager = gedit_file_browser_widget_get_ui_manager (data->widget);
+ manager = pluma_file_browser_widget_get_ui_manager (data->widget);
gtk_ui_manager_remove_action_group (manager, data->merged_actions);
for (item = data->merge_ids; item; item = item->next)
@@ -103,8 +103,8 @@ window_data_free (GeditWindow *window)
}
static FilterData *
-filter_data_new (GeditWindow *window,
- GeditMessage *message)
+filter_data_new (PlumaWindow *window,
+ PlumaMessage *message)
{
FilterData *data = g_slice_new (FilterData);
WindowData *wdata;
@@ -116,8 +116,8 @@ filter_data_new (GeditWindow *window,
wdata = get_window_data (window);
g_hash_table_insert (wdata->filters,
- gedit_message_type_identifier (gedit_message_get_object_path (message),
- gedit_message_get_method (message)),
+ pluma_message_type_identifier (pluma_message_get_object_path (message),
+ pluma_message_get_method (message)),
data);
return data;
@@ -129,8 +129,8 @@ filter_data_free (FilterData *data)
WindowData *wdata = get_window_data (data->window);
gchar *identifier;
- identifier = gedit_message_type_identifier (gedit_message_get_object_path (data->message),
- gedit_message_get_method (data->message));
+ identifier = pluma_message_type_identifier (pluma_message_get_object_path (data->message),
+ pluma_message_get_method (data->message));
g_hash_table_remove (wdata->filters, identifier);
g_free (identifier);
@@ -161,8 +161,8 @@ message_cache_data_free (MessageCacheData *data)
}
static MessageCacheData *
-message_cache_data_new (GeditWindow *window,
- GeditMessage *message)
+message_cache_data_new (PlumaWindow *window,
+ PlumaMessage *message)
{
MessageCacheData *data = g_slice_new (MessageCacheData);
@@ -173,56 +173,56 @@ message_cache_data_new (GeditWindow *window,
}
static void
-message_get_root_cb (GeditMessageBus *bus,
- GeditMessage *message,
+message_get_root_cb (PlumaMessageBus *bus,
+ PlumaMessage *message,
WindowData *data)
{
- GeditFileBrowserStore *store;
+ PlumaFileBrowserStore *store;
gchar *uri;
- store = gedit_file_browser_widget_get_browser_store (data->widget);
- uri = gedit_file_browser_store_get_virtual_root (store);
+ store = pluma_file_browser_widget_get_browser_store (data->widget);
+ uri = pluma_file_browser_store_get_virtual_root (store);
- gedit_message_set (message, "uri", uri, NULL);
+ pluma_message_set (message, "uri", uri, NULL);
g_free (uri);
}
static void
-message_set_root_cb (GeditMessageBus *bus,
- GeditMessage *message,
+message_set_root_cb (PlumaMessageBus *bus,
+ PlumaMessage *message,
WindowData *data)
{
gchar *root = NULL;
gchar *virtual = NULL;
- gedit_message_get (message, "uri", &root, NULL);
+ pluma_message_get (message, "uri", &root, NULL);
if (!root)
return;
- if (gedit_message_has_key (message, "virtual"))
- gedit_message_get (message, "virtual", &virtual, NULL);
+ if (pluma_message_has_key (message, "virtual"))
+ pluma_message_get (message, "virtual", &virtual, NULL);
if (virtual)
- gedit_file_browser_widget_set_root_and_virtual_root (data->widget, root, virtual);
+ pluma_file_browser_widget_set_root_and_virtual_root (data->widget, root, virtual);
else
- gedit_file_browser_widget_set_root (data->widget, root, TRUE);
+ pluma_file_browser_widget_set_root (data->widget, root, TRUE);
g_free (root);
g_free (virtual);
}
static void
-message_set_emblem_cb (GeditMessageBus *bus,
- GeditMessage *message,
+message_set_emblem_cb (PlumaMessageBus *bus,
+ PlumaMessage *message,
WindowData *data)
{
gchar *id = NULL;
gchar *emblem = NULL;
GtkTreePath *path;
- GeditFileBrowserStore *store;
+ PlumaFileBrowserStore *store;
- gedit_message_get (message, "id", &id, "emblem", &emblem, NULL);
+ pluma_message_get (message, "id", &id, "emblem", &emblem, NULL);
if (!id || !emblem)
{
@@ -250,16 +250,16 @@ message_set_emblem_cb (GeditMessageBus *bus,
GValue value = { 0, };
GtkTreeIter iter;
- store = gedit_file_browser_widget_get_browser_store (data->widget);
+ store = pluma_file_browser_widget_get_browser_store (data->widget);
if (gtk_tree_model_get_iter (GTK_TREE_MODEL (store), &iter, path))
{
g_value_init (&value, GDK_TYPE_PIXBUF);
g_value_set_object (&value, pixbuf);
- gedit_file_browser_store_set_value (store,
+ pluma_file_browser_store_set_value (store,
&iter,
- GEDIT_FILE_BROWSER_STORE_COLUMN_EMBLEM,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_EMBLEM,
&value);
g_value_unset (&value);
@@ -285,7 +285,7 @@ item_id (const gchar *path,
static gchar *
track_row (WindowData *data,
- GeditFileBrowserStore *store,
+ PlumaFileBrowserStore *store,
GtkTreePath *path,
const gchar *uri)
{
@@ -308,18 +308,18 @@ static void
set_item_message (WindowData *data,
GtkTreeIter *iter,
GtkTreePath *path,
- GeditMessage *message)
+ PlumaMessage *message)
{
- GeditFileBrowserStore *store;
+ PlumaFileBrowserStore *store;
gchar *uri = NULL;
guint flags = 0;
gchar *track_id;
- store = gedit_file_browser_widget_get_browser_store (data->widget);
+ store = pluma_file_browser_widget_get_browser_store (data->widget);
gtk_tree_model_get (GTK_TREE_MODEL (store), iter,
- GEDIT_FILE_BROWSER_STORE_COLUMN_URI, &uri,
- GEDIT_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_URI, &uri,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags,
-1);
if (!uri)
@@ -330,14 +330,14 @@ set_item_message (WindowData *data,
else
track_id = NULL;
- gedit_message_set (message,
+ pluma_message_set (message,
"id", track_id,
"uri", uri,
NULL);
- if (gedit_message_has_key (message, "is_directory"))
+ if (pluma_message_has_key (message, "is_directory"))
{
- gedit_message_set (message,
+ pluma_message_set (message,
"is_directory", FILE_IS_DIR (flags),
NULL);
}
@@ -347,8 +347,8 @@ set_item_message (WindowData *data,
}
static gboolean
-custom_message_filter_func (GeditFileBrowserWidget *widget,
- GeditFileBrowserStore *store,
+custom_message_filter_func (PlumaFileBrowserWidget *widget,
+ PlumaFileBrowserStore *store,
GtkTreeIter *iter,
FilterData *data)
{
@@ -359,8 +359,8 @@ custom_message_filter_func (GeditFileBrowserWidget *widget,
GtkTreePath *path;
gtk_tree_model_get (GTK_TREE_MODEL (store), iter,
- GEDIT_FILE_BROWSER_STORE_COLUMN_URI, &uri,
- GEDIT_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_URI, &uri,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags,
-1);
if (!uri || FILE_IS_DUMMY (flags))
@@ -373,28 +373,28 @@ custom_message_filter_func (GeditFileBrowserWidget *widget,
set_item_message (wdata, iter, path, data->message);
gtk_tree_path_free (path);
- gedit_message_set (data->message, "filter", filter, NULL);
+ pluma_message_set (data->message, "filter", filter, NULL);
- gedit_message_bus_send_message_sync (wdata->bus, data->message);
- gedit_message_get (data->message, "filter", &filter, NULL);
+ pluma_message_bus_send_message_sync (wdata->bus, data->message);
+ pluma_message_get (data->message, "filter", &filter, NULL);
return !filter;
}
static void
-message_add_filter_cb (GeditMessageBus *bus,
- GeditMessage *message,
- GeditWindow *window)
+message_add_filter_cb (PlumaMessageBus *bus,
+ PlumaMessage *message,
+ PlumaWindow *window)
{
gchar *object_path = NULL;
gchar *method = NULL;
gulong id;
- GeditMessageType *message_type;
- GeditMessage *cbmessage;
+ PlumaMessageType *message_type;
+ PlumaMessage *cbmessage;
FilterData *filter_data;
WindowData *data = get_window_data (window);
- gedit_message_get (message,
+ pluma_message_get (message,
"object_path", &object_path,
"method", &method,
NULL);
@@ -408,7 +408,7 @@ message_add_filter_cb (GeditMessageBus *bus,
return;
}
- message_type = gedit_message_bus_lookup (bus, object_path, method);
+ message_type = pluma_message_bus_lookup (bus, object_path, method);
if (!message_type)
{
@@ -419,15 +419,15 @@ message_add_filter_cb (GeditMessageBus *bus,
}
// Check if the message type has the correct arguments
- if (gedit_message_type_lookup (message_type, "id") != G_TYPE_STRING ||
- gedit_message_type_lookup (message_type, "uri") != G_TYPE_STRING ||
- gedit_message_type_lookup (message_type, "is_directory") != G_TYPE_BOOLEAN ||
- gedit_message_type_lookup (message_type, "filter") != G_TYPE_BOOLEAN)
+ if (pluma_message_type_lookup (message_type, "id") != G_TYPE_STRING ||
+ pluma_message_type_lookup (message_type, "uri") != G_TYPE_STRING ||
+ pluma_message_type_lookup (message_type, "is_directory") != G_TYPE_BOOLEAN ||
+ pluma_message_type_lookup (message_type, "filter") != G_TYPE_BOOLEAN)
{
return;
}
- cbmessage = gedit_message_type_instantiate (message_type,
+ cbmessage = pluma_message_type_instantiate (message_type,
"id", NULL,
"uri", NULL,
"is_directory", FALSE,
@@ -436,8 +436,8 @@ message_add_filter_cb (GeditMessageBus *bus,
// Register the custom filter on the widget
filter_data = filter_data_new (window, cbmessage);
- id = gedit_file_browser_widget_add_filter (data->widget,
- (GeditFileBrowserWidgetFilterFunc)custom_message_filter_func,
+ id = pluma_file_browser_widget_add_filter (data->widget,
+ (PlumaFileBrowserWidgetFilterFunc)custom_message_filter_func,
filter_data,
(GDestroyNotify)filter_data_free);
@@ -445,117 +445,117 @@ message_add_filter_cb (GeditMessageBus *bus,
}
static void
-message_remove_filter_cb (GeditMessageBus *bus,
- GeditMessage *message,
+message_remove_filter_cb (PlumaMessageBus *bus,
+ PlumaMessage *message,
WindowData *data)
{
gulong id = 0;
- gedit_message_get (message, "id", &id, NULL);
+ pluma_message_get (message, "id", &id, NULL);
if (!id)
return;
- gedit_file_browser_widget_remove_filter (data->widget, id);
+ pluma_file_browser_widget_remove_filter (data->widget, id);
}
static void
-message_up_cb (GeditMessageBus *bus,
- GeditMessage *message,
+message_up_cb (PlumaMessageBus *bus,
+ PlumaMessage *message,
WindowData *data)
{
- GeditFileBrowserStore *store = gedit_file_browser_widget_get_browser_store (data->widget);
+ PlumaFileBrowserStore *store = pluma_file_browser_widget_get_browser_store (data->widget);
- gedit_file_browser_store_set_virtual_root_up (store);
+ pluma_file_browser_store_set_virtual_root_up (store);
}
static void
-message_history_back_cb (GeditMessageBus *bus,
- GeditMessage *message,
+message_history_back_cb (PlumaMessageBus *bus,
+ PlumaMessage *message,
WindowData *data)
{
- gedit_file_browser_widget_history_back (data->widget);
+ pluma_file_browser_widget_history_back (data->widget);
}
static void
-message_history_forward_cb (GeditMessageBus *bus,
- GeditMessage *message,
+message_history_forward_cb (PlumaMessageBus *bus,
+ PlumaMessage *message,
WindowData *data)
{
- gedit_file_browser_widget_history_forward (data->widget);
+ pluma_file_browser_widget_history_forward (data->widget);
}
static void
-message_refresh_cb (GeditMessageBus *bus,
- GeditMessage *message,
+message_refresh_cb (PlumaMessageBus *bus,
+ PlumaMessage *message,
WindowData *data)
{
- gedit_file_browser_widget_refresh (data->widget);
+ pluma_file_browser_widget_refresh (data->widget);
}
static void
-message_set_show_hidden_cb (GeditMessageBus *bus,
- GeditMessage *message,
+message_set_show_hidden_cb (PlumaMessageBus *bus,
+ PlumaMessage *message,
WindowData *data)
{
gboolean active = FALSE;
- GeditFileBrowserStore *store;
- GeditFileBrowserStoreFilterMode mode;
+ PlumaFileBrowserStore *store;
+ PlumaFileBrowserStoreFilterMode mode;
- gedit_message_get (message, "active", &active, NULL);
+ pluma_message_get (message, "active", &active, NULL);
- store = gedit_file_browser_widget_get_browser_store (data->widget);
- mode = gedit_file_browser_store_get_filter_mode (store);
+ store = pluma_file_browser_widget_get_browser_store (data->widget);
+ mode = pluma_file_browser_store_get_filter_mode (store);
if (active)
- mode &= ~GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN;
+ mode &= ~PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN;
else
- mode |= GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN;
+ mode |= PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN;
- gedit_file_browser_store_set_filter_mode (store, mode);
+ pluma_file_browser_store_set_filter_mode (store, mode);
}
static void
-message_set_show_binary_cb (GeditMessageBus *bus,
- GeditMessage *message,
+message_set_show_binary_cb (PlumaMessageBus *bus,
+ PlumaMessage *message,
WindowData *data)
{
gboolean active = FALSE;
- GeditFileBrowserStore *store;
- GeditFileBrowserStoreFilterMode mode;
+ PlumaFileBrowserStore *store;
+ PlumaFileBrowserStoreFilterMode mode;
- gedit_message_get (message, "active", &active, NULL);
+ pluma_message_get (message, "active", &active, NULL);
- store = gedit_file_browser_widget_get_browser_store (data->widget);
- mode = gedit_file_browser_store_get_filter_mode (store);
+ store = pluma_file_browser_widget_get_browser_store (data->widget);
+ mode = pluma_file_browser_store_get_filter_mode (store);
if (active)
- mode &= ~GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY;
+ mode &= ~PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY;
else
- mode |= GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY;
+ mode |= PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY;
- gedit_file_browser_store_set_filter_mode (store, mode);
+ pluma_file_browser_store_set_filter_mode (store, mode);
}
static void
-message_show_bookmarks_cb (GeditMessageBus *bus,
- GeditMessage *message,
+message_show_bookmarks_cb (PlumaMessageBus *bus,
+ PlumaMessage *message,
WindowData *data)
{
- gedit_file_browser_widget_show_bookmarks (data->widget);
+ pluma_file_browser_widget_show_bookmarks (data->widget);
}
static void
-message_show_files_cb (GeditMessageBus *bus,
- GeditMessage *message,
+message_show_files_cb (PlumaMessageBus *bus,
+ PlumaMessage *message,
WindowData *data)
{
- gedit_file_browser_widget_show_files (data->widget);
+ pluma_file_browser_widget_show_files (data->widget);
}
static void
-message_add_context_item_cb (GeditMessageBus *bus,
- GeditMessage *message,
+message_add_context_item_cb (PlumaMessageBus *bus,
+ PlumaMessage *message,
WindowData *data)
{
GtkAction *action = NULL;
@@ -564,7 +564,7 @@ message_add_context_item_cb (GeditMessageBus *bus,
GtkUIManager *manager;
guint merge_id;
- gedit_message_get (message,
+ pluma_message_get (message,
"action", &action,
"path", &path,
NULL);
@@ -579,7 +579,7 @@ message_add_context_item_cb (GeditMessageBus *bus,
}
gtk_action_group_add_action (data->merged_actions, action);
- manager = gedit_file_browser_widget_get_ui_manager (data->widget);
+ manager = pluma_file_browser_widget_get_ui_manager (data->widget);
name = g_strconcat (gtk_action_get_name (action), "MenuItem", NULL);
merge_id = gtk_ui_manager_new_merge_id (manager);
@@ -594,11 +594,11 @@ message_add_context_item_cb (GeditMessageBus *bus,
if (gtk_ui_manager_get_widget (manager, path))
{
data->merge_ids = g_list_prepend (data->merge_ids, GINT_TO_POINTER (merge_id));
- gedit_message_set (message, "id", merge_id, NULL);
+ pluma_message_set (message, "id", merge_id, NULL);
}
else
{
- gedit_message_set (message, "id", 0, NULL);
+ pluma_message_set (message, "id", 0, NULL);
}
g_object_unref (action);
@@ -607,64 +607,64 @@ message_add_context_item_cb (GeditMessageBus *bus,
}
static void
-message_remove_context_item_cb (GeditMessageBus *bus,
- GeditMessage *message,
+message_remove_context_item_cb (PlumaMessageBus *bus,
+ PlumaMessage *message,
WindowData *data)
{
guint merge_id = 0;
GtkUIManager *manager;
- gedit_message_get (message, "id", &merge_id, NULL);
+ pluma_message_get (message, "id", &merge_id, NULL);
if (merge_id == 0)
return;
- manager = gedit_file_browser_widget_get_ui_manager (data->widget);
+ manager = pluma_file_browser_widget_get_ui_manager (data->widget);
data->merge_ids = g_list_remove (data->merge_ids, GINT_TO_POINTER (merge_id));
gtk_ui_manager_remove_ui (manager, merge_id);
}
static void
-message_get_view_cb (GeditMessageBus *bus,
- GeditMessage *message,
+message_get_view_cb (PlumaMessageBus *bus,
+ PlumaMessage *message,
WindowData *data)
{
- GeditFileBrowserView *view;
- view = gedit_file_browser_widget_get_browser_view (data->widget);
+ PlumaFileBrowserView *view;
+ view = pluma_file_browser_widget_get_browser_view (data->widget);
- gedit_message_set (message, "view", view, NULL);
+ pluma_message_set (message, "view", view, NULL);
}
static void
-register_methods (GeditWindow *window,
- GeditFileBrowserWidget *widget)
+register_methods (PlumaWindow *window,
+ PlumaFileBrowserWidget *widget)
{
- GeditMessageBus *bus = gedit_window_get_message_bus (window);
+ PlumaMessageBus *bus = pluma_window_get_message_bus (window);
WindowData *data = get_window_data (window);
/* Register method calls */
- gedit_message_bus_register (bus,
+ pluma_message_bus_register (bus,
MESSAGE_OBJECT_PATH, "get_root",
1,
"uri", G_TYPE_STRING,
NULL);
- gedit_message_bus_register (bus,
+ pluma_message_bus_register (bus,
MESSAGE_OBJECT_PATH, "set_root",
1,
"uri", G_TYPE_STRING,
"virtual", G_TYPE_STRING,
NULL);
- gedit_message_bus_register (bus,
+ pluma_message_bus_register (bus,
MESSAGE_OBJECT_PATH, "set_emblem",
0,
"id", G_TYPE_STRING,
"emblem", G_TYPE_STRING,
NULL);
- gedit_message_bus_register (bus,
+ pluma_message_bus_register (bus,
MESSAGE_OBJECT_PATH, "add_filter",
1,
"object_path", G_TYPE_STRING,
@@ -672,13 +672,13 @@ register_methods (GeditWindow *window,
"id", G_TYPE_ULONG,
NULL);
- gedit_message_bus_register (bus,
+ pluma_message_bus_register (bus,
MESSAGE_OBJECT_PATH, "remove_filter",
0,
"id", G_TYPE_ULONG,
NULL);
- gedit_message_bus_register (bus,
+ pluma_message_bus_register (bus,
MESSAGE_OBJECT_PATH, "add_context_item",
1,
"action", GTK_TYPE_ACTION,
@@ -686,37 +686,37 @@ register_methods (GeditWindow *window,
"id", G_TYPE_UINT,
NULL);
- gedit_message_bus_register (bus,
+ pluma_message_bus_register (bus,
MESSAGE_OBJECT_PATH, "remove_context_item",
0,
"id", G_TYPE_UINT,
NULL);
- gedit_message_bus_register (bus, MESSAGE_OBJECT_PATH, "up", 0, NULL);
+ pluma_message_bus_register (bus, MESSAGE_OBJECT_PATH, "up", 0, NULL);
- gedit_message_bus_register (bus, MESSAGE_OBJECT_PATH, "history_back", 0, NULL);
- gedit_message_bus_register (bus, MESSAGE_OBJECT_PATH, "history_forward", 0, NULL);
+ pluma_message_bus_register (bus, MESSAGE_OBJECT_PATH, "history_back", 0, NULL);
+ pluma_message_bus_register (bus, MESSAGE_OBJECT_PATH, "history_forward", 0, NULL);
- gedit_message_bus_register (bus, MESSAGE_OBJECT_PATH, "refresh", 0, NULL);
+ pluma_message_bus_register (bus, MESSAGE_OBJECT_PATH, "refresh", 0, NULL);
- gedit_message_bus_register (bus,
+ pluma_message_bus_register (bus,
MESSAGE_OBJECT_PATH, "set_show_hidden",
0,
"active", G_TYPE_BOOLEAN,
NULL);
- gedit_message_bus_register (bus,
+ pluma_message_bus_register (bus,
MESSAGE_OBJECT_PATH, "set_show_binary",
0,
"active", G_TYPE_BOOLEAN,
NULL);
- gedit_message_bus_register (bus, MESSAGE_OBJECT_PATH, "show_bookmarks", 0, NULL);
- gedit_message_bus_register (bus, MESSAGE_OBJECT_PATH, "show_files", 0, NULL);
+ pluma_message_bus_register (bus, MESSAGE_OBJECT_PATH, "show_bookmarks", 0, NULL);
+ pluma_message_bus_register (bus, MESSAGE_OBJECT_PATH, "show_files", 0, NULL);
- gedit_message_bus_register (bus,
+ pluma_message_bus_register (bus,
MESSAGE_OBJECT_PATH, "get_view",
1,
- "view", GEDIT_TYPE_FILE_BROWSER_VIEW,
+ "view", PLUMA_TYPE_FILE_BROWSER_VIEW,
NULL);
BUS_CONNECT (bus, get_root, data);
@@ -744,7 +744,7 @@ register_methods (GeditWindow *window,
}
static void
-store_row_inserted (GeditFileBrowserStore *store,
+store_row_inserted (PlumaFileBrowserStore *store,
GtkTreePath *path,
GtkTreeIter *iter,
MessageCacheData *data)
@@ -753,8 +753,8 @@ store_row_inserted (GeditFileBrowserStore *store,
guint flags = 0;
gtk_tree_model_get (GTK_TREE_MODEL (store), iter,
- GEDIT_FILE_BROWSER_STORE_COLUMN_URI, &uri,
- GEDIT_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_URI, &uri,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags,
-1);
if (!FILE_IS_DUMMY (flags) && !FILE_IS_FILTERED (flags))
@@ -762,14 +762,14 @@ store_row_inserted (GeditFileBrowserStore *store,
WindowData *wdata = get_window_data (data->window);
set_item_message (wdata, iter, path, data->message);
- gedit_message_bus_send_message_sync (wdata->bus, data->message);
+ pluma_message_bus_send_message_sync (wdata->bus, data->message);
}
g_free (uri);
}
static void
-store_row_deleted (GeditFileBrowserStore *store,
+store_row_deleted (PlumaFileBrowserStore *store,
GtkTreePath *path,
MessageCacheData *data)
{
@@ -781,8 +781,8 @@ store_row_deleted (GeditFileBrowserStore *store,
return;
gtk_tree_model_get (GTK_TREE_MODEL (store), &iter,
- GEDIT_FILE_BROWSER_STORE_COLUMN_URI, &uri,
- GEDIT_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_URI, &uri,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags,
-1);
if (!FILE_IS_DUMMY (flags) && !FILE_IS_FILTERED (flags))
@@ -790,36 +790,36 @@ store_row_deleted (GeditFileBrowserStore *store,
WindowData *wdata = get_window_data (data->window);
set_item_message (wdata, &iter, path, data->message);
- gedit_message_bus_send_message_sync (wdata->bus, data->message);
+ pluma_message_bus_send_message_sync (wdata->bus, data->message);
}
g_free (uri);
}
static void
-store_virtual_root_changed (GeditFileBrowserStore *store,
+store_virtual_root_changed (PlumaFileBrowserStore *store,
GParamSpec *spec,
MessageCacheData *data)
{
WindowData *wdata = get_window_data (data->window);
gchar *uri;
- uri = gedit_file_browser_store_get_virtual_root (store);
+ uri = pluma_file_browser_store_get_virtual_root (store);
if (!uri)
return;
- gedit_message_set (data->message,
+ pluma_message_set (data->message,
"uri", uri,
NULL);
- gedit_message_bus_send_message_sync (wdata->bus, data->message);
+ pluma_message_bus_send_message_sync (wdata->bus, data->message);
g_free (uri);
}
static void
-store_begin_loading (GeditFileBrowserStore *store,
+store_begin_loading (PlumaFileBrowserStore *store,
GtkTreeIter *iter,
MessageCacheData *data)
{
@@ -830,12 +830,12 @@ store_begin_loading (GeditFileBrowserStore *store,
set_item_message (wdata, iter, path, data->message);
- gedit_message_bus_send_message_sync (wdata->bus, data->message);
+ pluma_message_bus_send_message_sync (wdata->bus, data->message);
gtk_tree_path_free (path);
}
static void
-store_end_loading (GeditFileBrowserStore *store,
+store_end_loading (PlumaFileBrowserStore *store,
GtkTreeIter *iter,
MessageCacheData *data)
{
@@ -846,48 +846,48 @@ store_end_loading (GeditFileBrowserStore *store,
set_item_message (wdata, iter, path, data->message);
- gedit_message_bus_send_message_sync (wdata->bus, data->message);
+ pluma_message_bus_send_message_sync (wdata->bus, data->message);
gtk_tree_path_free (path);
}
static void
-register_signals (GeditWindow *window,
- GeditFileBrowserWidget *widget)
+register_signals (PlumaWindow *window,
+ PlumaFileBrowserWidget *widget)
{
- GeditMessageBus *bus = gedit_window_get_message_bus (window);
- GeditFileBrowserStore *store;
- GeditMessageType *inserted_type;
- GeditMessageType *deleted_type;
- GeditMessageType *begin_loading_type;
- GeditMessageType *end_loading_type;
- GeditMessageType *root_changed_type;
-
- GeditMessage *message;
+ PlumaMessageBus *bus = pluma_window_get_message_bus (window);
+ PlumaFileBrowserStore *store;
+ PlumaMessageType *inserted_type;
+ PlumaMessageType *deleted_type;
+ PlumaMessageType *begin_loading_type;
+ PlumaMessageType *end_loading_type;
+ PlumaMessageType *root_changed_type;
+
+ PlumaMessage *message;
WindowData *data;
/* Register signals */
- root_changed_type = gedit_message_bus_register (bus,
+ root_changed_type = pluma_message_bus_register (bus,
MESSAGE_OBJECT_PATH, "root_changed",
0,
"id", G_TYPE_STRING,
"uri", G_TYPE_STRING,
NULL);
- begin_loading_type = gedit_message_bus_register (bus,
+ begin_loading_type = pluma_message_bus_register (bus,
MESSAGE_OBJECT_PATH, "begin_loading",
0,
"id", G_TYPE_STRING,
"uri", G_TYPE_STRING,
NULL);
- end_loading_type = gedit_message_bus_register (bus,
+ end_loading_type = pluma_message_bus_register (bus,
MESSAGE_OBJECT_PATH, "end_loading",
0,
"id", G_TYPE_STRING,
"uri", G_TYPE_STRING,
NULL);
- inserted_type = gedit_message_bus_register (bus,
+ inserted_type = pluma_message_bus_register (bus,
MESSAGE_OBJECT_PATH, "inserted",
0,
"id", G_TYPE_STRING,
@@ -895,7 +895,7 @@ register_signals (GeditWindow *window,
"is_directory", G_TYPE_BOOLEAN,
NULL);
- deleted_type = gedit_message_bus_register (bus,
+ deleted_type = pluma_message_bus_register (bus,
MESSAGE_OBJECT_PATH, "deleted",
0,
"id", G_TYPE_STRING,
@@ -903,9 +903,9 @@ register_signals (GeditWindow *window,
"is_directory", G_TYPE_BOOLEAN,
NULL);
- store = gedit_file_browser_widget_get_browser_store (widget);
+ store = pluma_file_browser_widget_get_browser_store (widget);
- message = gedit_message_type_instantiate (inserted_type,
+ message = pluma_message_type_instantiate (inserted_type,
"id", NULL,
"uri", NULL,
"is_directory", FALSE,
@@ -921,7 +921,7 @@ register_signals (GeditWindow *window,
(GClosureNotify)message_cache_data_free,
0);
- message = gedit_message_type_instantiate (deleted_type,
+ message = pluma_message_type_instantiate (deleted_type,
"id", NULL,
"uri", NULL,
"is_directory", FALSE,
@@ -934,7 +934,7 @@ register_signals (GeditWindow *window,
(GClosureNotify)message_cache_data_free,
0);
- message = gedit_message_type_instantiate (root_changed_type,
+ message = pluma_message_type_instantiate (root_changed_type,
"id", NULL,
"uri", NULL,
NULL);
@@ -946,7 +946,7 @@ register_signals (GeditWindow *window,
(GClosureNotify)message_cache_data_free,
0);
- message = gedit_message_type_instantiate (begin_loading_type,
+ message = pluma_message_type_instantiate (begin_loading_type,
"id", NULL,
"uri", NULL,
NULL);
@@ -958,7 +958,7 @@ register_signals (GeditWindow *window,
(GClosureNotify)message_cache_data_free,
0);
- message = gedit_message_type_instantiate (end_loading_type,
+ message = pluma_message_type_instantiate (end_loading_type,
"id", NULL,
"uri", NULL,
NULL);
@@ -972,45 +972,45 @@ register_signals (GeditWindow *window,
}
static void
-message_unregistered (GeditMessageBus *bus,
- GeditMessageType *message_type,
- GeditWindow *window)
+message_unregistered (PlumaMessageBus *bus,
+ PlumaMessageType *message_type,
+ PlumaWindow *window)
{
- gchar *identifier = gedit_message_type_identifier (gedit_message_type_get_object_path (message_type),
- gedit_message_type_get_method (message_type));
+ gchar *identifier = pluma_message_type_identifier (pluma_message_type_get_object_path (message_type),
+ pluma_message_type_get_method (message_type));
FilterData *data;
WindowData *wdata = get_window_data (window);
data = g_hash_table_lookup (wdata->filters, identifier);
if (data)
- gedit_file_browser_widget_remove_filter (wdata->widget, data->id);
+ pluma_file_browser_widget_remove_filter (wdata->widget, data->id);
g_free (identifier);
}
void
-gedit_file_browser_messages_register (GeditWindow *window,
- GeditFileBrowserWidget *widget)
+pluma_file_browser_messages_register (PlumaWindow *window,
+ PlumaFileBrowserWidget *widget)
{
window_data_new (window, widget);
register_methods (window, widget);
register_signals (window, widget);
- g_signal_connect (gedit_window_get_message_bus (window),
+ g_signal_connect (pluma_window_get_message_bus (window),
"unregistered",
G_CALLBACK (message_unregistered),
window);
}
static void
-cleanup_signals (GeditWindow *window)
+cleanup_signals (PlumaWindow *window)
{
WindowData *data = get_window_data (window);
- GeditFileBrowserStore *store;
+ PlumaFileBrowserStore *store;
- store = gedit_file_browser_widget_get_browser_store (data->widget);
+ store = pluma_file_browser_widget_get_browser_store (data->widget);
g_signal_handler_disconnect (store, data->row_inserted_id);
g_signal_handler_disconnect (store, data->row_deleted_id);
@@ -1022,12 +1022,12 @@ cleanup_signals (GeditWindow *window)
}
void
-gedit_file_browser_messages_unregister (GeditWindow *window)
+pluma_file_browser_messages_unregister (PlumaWindow *window)
{
- GeditMessageBus *bus = gedit_window_get_message_bus (window);
+ PlumaMessageBus *bus = pluma_window_get_message_bus (window);
cleanup_signals (window);
- gedit_message_bus_unregister_all (bus, MESSAGE_OBJECT_PATH);
+ pluma_message_bus_unregister_all (bus, MESSAGE_OBJECT_PATH);
window_data_free (window);
}
diff --git a/plugins/filebrowser/gedit-file-browser-messages.h b/plugins/filebrowser/pluma-file-browser-messages.h
index e62094e8..8f5c2ba4 100755
--- a/plugins/filebrowser/gedit-file-browser-messages.h
+++ b/plugins/filebrowser/pluma-file-browser-messages.h
@@ -1,5 +1,5 @@
/*
- * gedit-file-browser-messages.h - Gedit plugin providing easy file access
+ * pluma-file-browser-messages.h - Pluma plugin providing easy file access
* from the sidepanel
*
* Copyright (C) 2008 - Jesse van den Kieboom <[email protected]>
@@ -19,17 +19,17 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifndef __GEDIT_FILE_BROWSER_MESSAGES_H__
-#define __GEDIT_FILE_BROWSER_MESSAGES_H__
+#ifndef __PLUMA_FILE_BROWSER_MESSAGES_H__
+#define __PLUMA_FILE_BROWSER_MESSAGES_H__
-#include <gedit/gedit-window.h>
-#include <gedit/gedit-message-bus.h>
-#include "gedit-file-browser-widget.h"
+#include <pluma/pluma-window.h>
+#include <pluma/pluma-message-bus.h>
+#include "pluma-file-browser-widget.h"
-void gedit_file_browser_messages_register (GeditWindow *window,
- GeditFileBrowserWidget *widget);
-void gedit_file_browser_messages_unregister (GeditWindow *window);
+void pluma_file_browser_messages_register (PlumaWindow *window,
+ PlumaFileBrowserWidget *widget);
+void pluma_file_browser_messages_unregister (PlumaWindow *window);
-#endif /* __GEDIT_FILE_BROWSER_MESSAGES_H__ */
+#endif /* __PLUMA_FILE_BROWSER_MESSAGES_H__ */
// ex:ts=8:noet:
diff --git a/plugins/filebrowser/gedit-file-browser-plugin.c b/plugins/filebrowser/pluma-file-browser-plugin.c
index f2da19f5..b9ac96d3 100755
--- a/plugins/filebrowser/gedit-file-browser-plugin.c
+++ b/plugins/filebrowser/pluma-file-browser-plugin.c
@@ -1,5 +1,5 @@
/*
- * gedit-file-browser-plugin.c - Gedit plugin providing easy file access
+ * pluma-file-browser-plugin.c - Pluma plugin providing easy file access
* from the sidepanel
*
* Copyright (C) 2006 - Jesse van den Kieboom <[email protected]>
@@ -24,39 +24,39 @@
#include <config.h>
#endif
-#include <gedit/gedit-commands.h>
-#include <gedit/gedit-utils.h>
-#include <gedit/gedit-app.h>
+#include <pluma/pluma-commands.h>
+#include <pluma/pluma-utils.h>
+#include <pluma/pluma-app.h>
#include <glib/gi18n-lib.h>
-#include <gedit/gedit-debug.h>
+#include <pluma/pluma-debug.h>
#include <mateconf/mateconf-client.h>
#include <string.h>
-#include "gedit-file-browser-enum-types.h"
-#include "gedit-file-browser-plugin.h"
-#include "gedit-file-browser-utils.h"
-#include "gedit-file-browser-error.h"
-#include "gedit-file-browser-widget.h"
-#include "gedit-file-browser-messages.h"
+#include "pluma-file-browser-enum-types.h"
+#include "pluma-file-browser-plugin.h"
+#include "pluma-file-browser-utils.h"
+#include "pluma-file-browser-error.h"
+#include "pluma-file-browser-widget.h"
+#include "pluma-file-browser-messages.h"
-#define WINDOW_DATA_KEY "GeditFileBrowserPluginWindowData"
-#define FILE_BROWSER_BASE_KEY "/apps/gedit-2/plugins/filebrowser"
+#define WINDOW_DATA_KEY "PlumaFileBrowserPluginWindowData"
+#define FILE_BROWSER_BASE_KEY "/apps/pluma-2/plugins/filebrowser"
#define CAJA_CLICK_POLICY_BASE_KEY "/apps/caja/preferences"
#define CAJA_CLICK_POLICY_KEY "click_policy"
#define CAJA_ENABLE_DELETE_KEY "enable_delete"
#define CAJA_CONFIRM_TRASH_KEY "confirm_trash"
#define TERMINAL_EXEC_KEY "/desktop/mate/applications/terminal/exec"
-#define GEDIT_FILE_BROWSER_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), GEDIT_TYPE_FILE_BROWSER_PLUGIN, GeditFileBrowserPluginPrivate))
+#define PLUMA_FILE_BROWSER_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), PLUMA_TYPE_FILE_BROWSER_PLUGIN, PlumaFileBrowserPluginPrivate))
-struct _GeditFileBrowserPluginPrivate
+struct _PlumaFileBrowserPluginPrivate
{
gpointer dummy;
};
-typedef struct _GeditFileBrowserPluginData
+typedef struct _PlumaFileBrowserPluginData
{
- GeditFileBrowserWidget * tree_widget;
+ PlumaFileBrowserWidget * tree_widget;
gulong merge_id;
GtkActionGroup * action_group;
GtkActionGroup * single_selection_action_group;
@@ -67,75 +67,75 @@ typedef struct _GeditFileBrowserPluginData
guint click_policy_handle;
guint enable_delete_handle;
guint confirm_trash_handle;
-} GeditFileBrowserPluginData;
+} PlumaFileBrowserPluginData;
-static void on_uri_activated_cb (GeditFileBrowserWidget * widget,
+static void on_uri_activated_cb (PlumaFileBrowserWidget * widget,
gchar const *uri,
- GeditWindow * window);
-static void on_error_cb (GeditFileBrowserWidget * widget,
+ PlumaWindow * window);
+static void on_error_cb (PlumaFileBrowserWidget * widget,
guint code,
gchar const *message,
- GeditWindow * window);
-static void on_model_set_cb (GeditFileBrowserView * widget,
+ PlumaWindow * window);
+static void on_model_set_cb (PlumaFileBrowserView * widget,
GParamSpec *arg1,
- GeditWindow * window);
-static void on_virtual_root_changed_cb (GeditFileBrowserStore * model,
+ PlumaWindow * window);
+static void on_virtual_root_changed_cb (PlumaFileBrowserStore * model,
GParamSpec * param,
- GeditWindow * window);
-static void on_filter_mode_changed_cb (GeditFileBrowserStore * model,
+ PlumaWindow * window);
+static void on_filter_mode_changed_cb (PlumaFileBrowserStore * model,
GParamSpec * param,
- GeditWindow * window);
-static void on_rename_cb (GeditFileBrowserStore * model,
+ PlumaWindow * window);
+static void on_rename_cb (PlumaFileBrowserStore * model,
const gchar * olduri,
const gchar * newuri,
- GeditWindow * window);
-static void on_filter_pattern_changed_cb (GeditFileBrowserWidget * widget,
+ PlumaWindow * window);
+static void on_filter_pattern_changed_cb (PlumaFileBrowserWidget * widget,
GParamSpec * param,
- GeditWindow * window);
-static void on_tab_added_cb (GeditWindow * window,
- GeditTab * tab,
- GeditFileBrowserPluginData * data);
-static gboolean on_confirm_delete_cb (GeditFileBrowserWidget * widget,
- GeditFileBrowserStore * store,
+ PlumaWindow * window);
+static void on_tab_added_cb (PlumaWindow * window,
+ PlumaTab * tab,
+ PlumaFileBrowserPluginData * data);
+static gboolean on_confirm_delete_cb (PlumaFileBrowserWidget * widget,
+ PlumaFileBrowserStore * store,
GList * rows,
- GeditWindow * window);
-static gboolean on_confirm_no_trash_cb (GeditFileBrowserWidget * widget,
+ PlumaWindow * window);
+static gboolean on_confirm_no_trash_cb (PlumaFileBrowserWidget * widget,
GList * files,
- GeditWindow * window);
-
-GEDIT_PLUGIN_REGISTER_TYPE_WITH_CODE (GeditFileBrowserPlugin, filetree_plugin, \
- gedit_file_browser_enum_and_flag_register_type (type_module); \
- gedit_file_browser_store_register_type (type_module); \
- gedit_file_bookmarks_store_register_type (type_module); \
- gedit_file_browser_view_register_type (type_module); \
- gedit_file_browser_widget_register_type (type_module); \
+ PlumaWindow * window);
+
+PLUMA_PLUGIN_REGISTER_TYPE_WITH_CODE (PlumaFileBrowserPlugin, filetree_plugin, \
+ pluma_file_browser_enum_and_flag_register_type (type_module); \
+ pluma_file_browser_store_register_type (type_module); \
+ pluma_file_bookmarks_store_register_type (type_module); \
+ pluma_file_browser_view_register_type (type_module); \
+ pluma_file_browser_widget_register_type (type_module); \
)
static void
-filetree_plugin_init (GeditFileBrowserPlugin * plugin)
+filetree_plugin_init (PlumaFileBrowserPlugin * plugin)
{
- plugin->priv = GEDIT_FILE_BROWSER_PLUGIN_GET_PRIVATE (plugin);
+ plugin->priv = PLUMA_FILE_BROWSER_PLUGIN_GET_PRIVATE (plugin);
}
static void
filetree_plugin_finalize (GObject * object)
{
- //GeditFileBrowserPlugin * plugin = GEDIT_FILE_BROWSER_PLUGIN (object);
+ //PlumaFileBrowserPlugin * plugin = PLUMA_FILE_BROWSER_PLUGIN (object);
G_OBJECT_CLASS (filetree_plugin_parent_class)->finalize (object);
}
-static GeditFileBrowserPluginData *
-get_plugin_data (GeditWindow * window)
+static PlumaFileBrowserPluginData *
+get_plugin_data (PlumaWindow * window)
{
- return (GeditFileBrowserPluginData *) (g_object_get_data (G_OBJECT (window), WINDOW_DATA_KEY));
+ return (PlumaFileBrowserPluginData *) (g_object_get_data (G_OBJECT (window), WINDOW_DATA_KEY));
}
static void
-on_end_loading_cb (GeditFileBrowserStore * store,
+on_end_loading_cb (PlumaFileBrowserStore * store,
GtkTreeIter * iter,
- GeditFileBrowserPluginData * data)
+ PlumaFileBrowserPluginData * data)
{
/* Disconnect the signal */
g_signal_handler_disconnect (store, data->end_loading_handle);
@@ -144,13 +144,13 @@ on_end_loading_cb (GeditFileBrowserStore * store,
}
static void
-prepare_auto_root (GeditFileBrowserPluginData *data)
+prepare_auto_root (PlumaFileBrowserPluginData *data)
{
- GeditFileBrowserStore *store;
+ PlumaFileBrowserStore *store;
data->auto_root = TRUE;
- store = gedit_file_browser_widget_get_browser_store (data->tree_widget);
+ store = pluma_file_browser_widget_get_browser_store (data->tree_widget);
if (data->end_loading_handle != 0) {
g_signal_handler_disconnect (store, data->end_loading_handle);
@@ -164,7 +164,7 @@ prepare_auto_root (GeditFileBrowserPluginData *data)
}
static void
-restore_default_location (GeditFileBrowserPluginData *data)
+restore_default_location (PlumaFileBrowserPluginData *data)
{
gchar * root;
gchar * virtual_root;
@@ -182,7 +182,7 @@ restore_default_location (GeditFileBrowserPluginData *data)
if (bookmarks) {
g_object_unref (client);
- gedit_file_browser_widget_show_bookmarks (data->tree_widget);
+ pluma_file_browser_widget_show_bookmarks (data->tree_widget);
return;
}
@@ -205,12 +205,12 @@ restore_default_location (GeditFileBrowserPluginData *data)
if (remote || g_file_is_native (file)) {
if (virtual_root != NULL && *virtual_root != '\0') {
prepare_auto_root (data);
- gedit_file_browser_widget_set_root_and_virtual_root (data->tree_widget,
+ pluma_file_browser_widget_set_root_and_virtual_root (data->tree_widget,
root,
virtual_root);
} else {
prepare_auto_root (data);
- gedit_file_browser_widget_set_root (data->tree_widget,
+ pluma_file_browser_widget_set_root (data->tree_widget,
root,
TRUE);
}
@@ -225,11 +225,11 @@ restore_default_location (GeditFileBrowserPluginData *data)
}
static void
-restore_filter (GeditFileBrowserPluginData * data)
+restore_filter (PlumaFileBrowserPluginData * data)
{
MateConfClient * client;
gchar *filter_mode;
- GeditFileBrowserStoreFilterMode mode;
+ PlumaFileBrowserStoreFilterMode mode;
gchar *pattern;
client = mateconf_client_get_default ();
@@ -242,33 +242,33 @@ restore_filter (GeditFileBrowserPluginData * data)
NULL);
/* Filter mode */
- mode = gedit_file_browser_store_filter_mode_get_default ();
+ mode = pluma_file_browser_store_filter_mode_get_default ();
if (filter_mode != NULL) {
if (strcmp (filter_mode, "hidden") == 0) {
- mode = GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN;
+ mode = PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN;
} else if (strcmp (filter_mode, "binary") == 0) {
- mode = GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY;
+ mode = PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY;
} else if (strcmp (filter_mode, "hidden_and_binary") == 0 ||
strcmp (filter_mode, "binary_and_hidden") == 0) {
- mode = GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN |
- GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY;
+ mode = PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN |
+ PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY;
} else if (strcmp (filter_mode, "none") == 0 ||
*filter_mode == '\0') {
- mode = GEDIT_FILE_BROWSER_STORE_FILTER_MODE_NONE;
+ mode = PLUMA_FILE_BROWSER_STORE_FILTER_MODE_NONE;
}
}
/* Set the filter mode */
- gedit_file_browser_store_set_filter_mode (
- gedit_file_browser_widget_get_browser_store (data->tree_widget),
+ pluma_file_browser_store_set_filter_mode (
+ pluma_file_browser_widget_get_browser_store (data->tree_widget),
mode);
pattern = mateconf_client_get_string (client,
FILE_BROWSER_BASE_KEY "/filter_pattern",
NULL);
- gedit_file_browser_widget_set_filter_pattern (data->tree_widget,
+ pluma_file_browser_widget_set_filter_pattern (data->tree_widget,
pattern);
g_object_unref (client);
@@ -276,13 +276,13 @@ restore_filter (GeditFileBrowserPluginData * data)
g_free (pattern);
}
-static GeditFileBrowserViewClickPolicy
+static PlumaFileBrowserViewClickPolicy
click_policy_from_string (gchar const *click_policy)
{
if (click_policy && strcmp (click_policy, "single") == 0)
- return GEDIT_FILE_BROWSER_VIEW_CLICK_POLICY_SINGLE;
+ return PLUMA_FILE_BROWSER_VIEW_CLICK_POLICY_SINGLE;
else
- return GEDIT_FILE_BROWSER_VIEW_CLICK_POLICY_DOUBLE;
+ return PLUMA_FILE_BROWSER_VIEW_CLICK_POLICY_DOUBLE;
}
static void
@@ -292,12 +292,12 @@ on_click_policy_changed (MateConfClient *client,
gpointer user_data)
{
MateConfValue *value;
- GeditFileBrowserPluginData * data;
+ PlumaFileBrowserPluginData * data;
gchar const *click_policy;
- GeditFileBrowserViewClickPolicy policy = GEDIT_FILE_BROWSER_VIEW_CLICK_POLICY_DOUBLE;
- GeditFileBrowserView *view;
+ PlumaFileBrowserViewClickPolicy policy = PLUMA_FILE_BROWSER_VIEW_CLICK_POLICY_DOUBLE;
+ PlumaFileBrowserView *view;
- data = (GeditFileBrowserPluginData *)(user_data);
+ data = (PlumaFileBrowserPluginData *)(user_data);
value = mateconf_entry_get_value (entry);
if (value && value->type == MATECONF_VALUE_STRING) {
@@ -306,8 +306,8 @@ on_click_policy_changed (MateConfClient *client,
policy = click_policy_from_string (click_policy);
}
- view = gedit_file_browser_widget_get_browser_view (data->tree_widget);
- gedit_file_browser_view_set_click_policy (view, policy);
+ view = pluma_file_browser_widget_get_browser_view (data->tree_widget);
+ pluma_file_browser_view_set_click_policy (view, policy);
}
static void
@@ -317,10 +317,10 @@ on_enable_delete_changed (MateConfClient *client,
gpointer user_data)
{
MateConfValue *value;
- GeditFileBrowserPluginData *data;
+ PlumaFileBrowserPluginData *data;
gboolean enable = FALSE;
- data = (GeditFileBrowserPluginData *)(user_data);
+ data = (PlumaFileBrowserPluginData *)(user_data);
value = mateconf_entry_get_value (entry);
if (value && value->type == MATECONF_VALUE_BOOL)
@@ -336,10 +336,10 @@ on_confirm_trash_changed (MateConfClient *client,
gpointer user_data)
{
MateConfValue *value;
- GeditFileBrowserPluginData *data;
+ PlumaFileBrowserPluginData *data;
gboolean enable = FALSE;
- data = (GeditFileBrowserPluginData *)(user_data);
+ data = (PlumaFileBrowserPluginData *)(user_data);
value = mateconf_entry_get_value (entry);
if (value && value->type == MATECONF_VALUE_BOOL)
@@ -349,13 +349,13 @@ on_confirm_trash_changed (MateConfClient *client,
}
static void
-install_caja_prefs (GeditFileBrowserPluginData *data)
+install_caja_prefs (PlumaFileBrowserPluginData *data)
{
MateConfClient *client;
gchar *pref;
gboolean prefb;
- GeditFileBrowserViewClickPolicy policy;
- GeditFileBrowserView *view;
+ PlumaFileBrowserViewClickPolicy policy;
+ PlumaFileBrowserView *view;
client = mateconf_client_get_default ();
if (!client)
@@ -373,8 +373,8 @@ install_caja_prefs (GeditFileBrowserPluginData *data)
policy = click_policy_from_string (pref);
- view = gedit_file_browser_widget_get_browser_view (data->tree_widget);
- gedit_file_browser_view_set_click_policy (view, policy);
+ view = pluma_file_browser_widget_get_browser_view (data->tree_widget);
+ pluma_file_browser_view_set_click_policy (view, policy);
if (pref) {
data->click_policy_handle =
@@ -420,8 +420,8 @@ install_caja_prefs (GeditFileBrowserPluginData *data)
}
static void
-set_root_from_doc (GeditFileBrowserPluginData * data,
- GeditDocument * doc)
+set_root_from_doc (PlumaFileBrowserPluginData * data,
+ PlumaDocument * doc)
{
GFile *file;
GFile *parent;
@@ -429,7 +429,7 @@ set_root_from_doc (GeditFileBrowserPluginData * data,
if (doc == NULL)
return;
- file = gedit_document_get_location (doc);
+ file = pluma_document_get_location (doc);
if (file == NULL)
return;
@@ -440,7 +440,7 @@ set_root_from_doc (GeditFileBrowserPluginData * data,
root = g_file_get_uri (parent);
- gedit_file_browser_widget_set_root (data->tree_widget,
+ pluma_file_browser_widget_set_root (data->tree_widget,
root,
TRUE);
@@ -453,13 +453,13 @@ set_root_from_doc (GeditFileBrowserPluginData * data,
static void
on_action_set_active_root (GtkAction * action,
- GeditWindow * window)
+ PlumaWindow * window)
{
- GeditFileBrowserPluginData *data;
+ PlumaFileBrowserPluginData *data;
data = get_plugin_data (window);
set_root_from_doc (data,
- gedit_window_get_active_document (window));
+ pluma_window_get_active_document (window));
}
static gchar *
@@ -488,9 +488,9 @@ get_terminal (void)
static void
on_action_open_terminal (GtkAction * action,
- GeditWindow * window)
+ PlumaWindow * window)
{
- GeditFileBrowserPluginData * data;
+ PlumaFileBrowserPluginData * data;
gchar * terminal;
gchar * wd = NULL;
gchar * local;
@@ -498,18 +498,18 @@ on_action_open_terminal (GtkAction * action,
GFile * file;
GtkTreeIter iter;
- GeditFileBrowserStore * store;
+ PlumaFileBrowserStore * store;
data = get_plugin_data (window);
/* Get the current directory */
- if (!gedit_file_browser_widget_get_selected_directory (data->tree_widget, &iter))
+ if (!pluma_file_browser_widget_get_selected_directory (data->tree_widget, &iter))
return;
- store = gedit_file_browser_widget_get_browser_store (data->tree_widget);
+ store = pluma_file_browser_widget_get_browser_store (data->tree_widget);
gtk_tree_model_get (GTK_TREE_MODEL (store),
&iter,
- GEDIT_FILE_BROWSER_STORE_COLUMN_URI,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_URI,
&wd,
-1);
@@ -541,9 +541,9 @@ on_action_open_terminal (GtkAction * action,
static void
on_selection_changed_cb (GtkTreeSelection *selection,
- GeditWindow *window)
+ PlumaWindow *window)
{
- GeditFileBrowserPluginData * data;
+ PlumaFileBrowserPluginData * data;
GtkTreeView * tree_view;
GtkTreeModel * model;
GtkTreeIter iter;
@@ -552,20 +552,20 @@ on_selection_changed_cb (GtkTreeSelection *selection,
data = get_plugin_data (window);
- tree_view = GTK_TREE_VIEW (gedit_file_browser_widget_get_browser_view (data->tree_widget));
+ tree_view = GTK_TREE_VIEW (pluma_file_browser_widget_get_browser_view (data->tree_widget));
model = gtk_tree_view_get_model (tree_view);
- if (!GEDIT_IS_FILE_BROWSER_STORE (model))
+ if (!PLUMA_IS_FILE_BROWSER_STORE (model))
return;
- sensitive = gedit_file_browser_widget_get_selected_directory (data->tree_widget, &iter);
+ sensitive = pluma_file_browser_widget_get_selected_directory (data->tree_widget, &iter);
if (sensitive) {
gtk_tree_model_get (model, &iter,
- GEDIT_FILE_BROWSER_STORE_COLUMN_URI,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_URI,
&uri, -1);
- sensitive = gedit_utils_uri_has_file_scheme (uri);
+ sensitive = pluma_utils_uri_has_file_scheme (uri);
g_free (uri);
}
@@ -608,15 +608,15 @@ static GtkActionEntry extra_single_selection_actions[] = {
};
static void
-add_popup_ui (GeditWindow * window)
+add_popup_ui (PlumaWindow * window)
{
- GeditFileBrowserPluginData * data;
+ PlumaFileBrowserPluginData * data;
GtkUIManager * manager;
GtkActionGroup * action_group;
GError * error = NULL;
data = get_plugin_data (window);
- manager = gedit_file_browser_widget_get_ui_manager (data->tree_widget);
+ manager = pluma_file_browser_widget_get_ui_manager (data->tree_widget);
action_group = gtk_action_group_new ("FileBrowserPluginExtra");
gtk_action_group_set_translation_domain (action_group, NULL);
@@ -648,13 +648,13 @@ add_popup_ui (GeditWindow * window)
}
static void
-remove_popup_ui (GeditWindow * window)
+remove_popup_ui (PlumaWindow * window)
{
- GeditFileBrowserPluginData * data;
+ PlumaFileBrowserPluginData * data;
GtkUIManager * manager;
data = get_plugin_data (window);
- manager = gedit_file_browser_widget_get_ui_manager (data->tree_widget);
+ manager = pluma_file_browser_widget_get_ui_manager (data->tree_widget);
gtk_ui_manager_remove_ui (manager, data->merge_id);
gtk_ui_manager_remove_action_group (manager, data->action_group);
@@ -665,35 +665,35 @@ remove_popup_ui (GeditWindow * window)
}
static void
-impl_updateui (GeditPlugin * plugin, GeditWindow * window)
+impl_updateui (PlumaPlugin * plugin, PlumaWindow * window)
{
- GeditFileBrowserPluginData * data;
- GeditDocument * doc;
+ PlumaFileBrowserPluginData * data;
+ PlumaDocument * doc;
data = get_plugin_data (window);
- doc = gedit_window_get_active_document (window);
+ doc = pluma_window_get_active_document (window);
gtk_action_set_sensitive (gtk_action_group_get_action (data->action_group,
"SetActiveRoot"),
doc != NULL &&
- !gedit_document_is_untitled (doc));
+ !pluma_document_is_untitled (doc));
}
static void
-impl_activate (GeditPlugin * plugin, GeditWindow * window)
+impl_activate (PlumaPlugin * plugin, PlumaWindow * window)
{
- GeditPanel * panel;
- GeditFileBrowserPluginData * data;
+ PlumaPanel * panel;
+ PlumaFileBrowserPluginData * data;
GtkWidget * image;
GdkPixbuf * pixbuf;
- GeditFileBrowserStore * store;
+ PlumaFileBrowserStore * store;
gchar *data_dir;
- data = g_new0 (GeditFileBrowserPluginData, 1);
+ data = g_new0 (PlumaFileBrowserPluginData, 1);
- data_dir = gedit_plugin_get_data_dir (plugin);
- data->tree_widget = GEDIT_FILE_BROWSER_WIDGET (gedit_file_browser_widget_new (data_dir));
+ data_dir = pluma_plugin_get_data_dir (plugin);
+ data->tree_widget = PLUMA_FILE_BROWSER_WIDGET (pluma_file_browser_widget_new (data_dir));
g_free (data_dir);
g_signal_connect (data->tree_widget,
@@ -719,14 +719,14 @@ impl_activate (GeditPlugin * plugin, GeditWindow * window)
window);
g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW
- (gedit_file_browser_widget_get_browser_view
+ (pluma_file_browser_widget_get_browser_view
(data->tree_widget))),
"changed",
G_CALLBACK (on_selection_changed_cb),
window);
- panel = gedit_window_get_side_panel (window);
- pixbuf = gedit_file_browser_utils_pixbuf_from_theme("system-file-manager",
+ panel = pluma_window_get_side_panel (window);
+ pixbuf = pluma_file_browser_utils_pixbuf_from_theme("system-file-manager",
GTK_ICON_SIZE_MENU);
if (pixbuf) {
@@ -737,7 +737,7 @@ impl_activate (GeditPlugin * plugin, GeditWindow * window)
}
gtk_widget_show(image);
- gedit_panel_add_item (panel,
+ pluma_panel_add_item (panel,
GTK_WIDGET (data->tree_widget),
_("File Browser"),
image);
@@ -753,12 +753,12 @@ impl_activate (GeditPlugin * plugin, GeditWindow * window)
install_caja_prefs (data);
/* Connect signals to store the last visited location */
- g_signal_connect (gedit_file_browser_widget_get_browser_view (data->tree_widget),
+ g_signal_connect (pluma_file_browser_widget_get_browser_view (data->tree_widget),
"notify::model",
G_CALLBACK (on_model_set_cb),
window);
- store = gedit_file_browser_widget_get_browser_store (data->tree_widget);
+ store = pluma_file_browser_widget_get_browser_store (data->tree_widget);
g_signal_connect (store,
"notify::virtual-root",
G_CALLBACK (on_virtual_root_changed_cb),
@@ -780,22 +780,22 @@ impl_activate (GeditPlugin * plugin, GeditWindow * window)
data);
/* Register messages on the bus */
- gedit_file_browser_messages_register (window, data->tree_widget);
+ pluma_file_browser_messages_register (window, data->tree_widget);
impl_updateui (plugin, window);
}
static void
-impl_deactivate (GeditPlugin * plugin, GeditWindow * window)
+impl_deactivate (PlumaPlugin * plugin, PlumaWindow * window)
{
- GeditFileBrowserPluginData * data;
- GeditPanel * panel;
+ PlumaFileBrowserPluginData * data;
+ PlumaPanel * panel;
MateConfClient *client;
data = get_plugin_data (window);
/* Unregister messages from the bus */
- gedit_file_browser_messages_unregister (window);
+ pluma_file_browser_messages_unregister (window);
/* Disconnect signals */
g_signal_handlers_disconnect_by_func (window,
@@ -817,18 +817,18 @@ impl_deactivate (GeditPlugin * plugin, GeditWindow * window)
g_object_unref (client);
remove_popup_ui (window);
- panel = gedit_window_get_side_panel (window);
- gedit_panel_remove_item (panel, GTK_WIDGET (data->tree_widget));
+ panel = pluma_window_get_side_panel (window);
+ pluma_panel_remove_item (panel, GTK_WIDGET (data->tree_widget));
g_free (data);
g_object_set_data (G_OBJECT (window), WINDOW_DATA_KEY, NULL);
}
static void
-filetree_plugin_class_init (GeditFileBrowserPluginClass * klass)
+filetree_plugin_class_init (PlumaFileBrowserPluginClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GeditPluginClass * plugin_class = GEDIT_PLUGIN_CLASS (klass);
+ PlumaPluginClass * plugin_class = PLUMA_PLUGIN_CLASS (klass);
object_class->finalize = filetree_plugin_finalize;
@@ -837,64 +837,64 @@ filetree_plugin_class_init (GeditFileBrowserPluginClass * klass)
plugin_class->update_ui = impl_updateui;
g_type_class_add_private (object_class,
- sizeof (GeditFileBrowserPluginPrivate));
+ sizeof (PlumaFileBrowserPluginPrivate));
}
/* Callbacks */
static void
-on_uri_activated_cb (GeditFileBrowserWidget * tree_widget,
- gchar const *uri, GeditWindow * window)
+on_uri_activated_cb (PlumaFileBrowserWidget * tree_widget,
+ gchar const *uri, PlumaWindow * window)
{
- gedit_commands_load_uri (window, uri, NULL, 0);
+ pluma_commands_load_uri (window, uri, NULL, 0);
}
static void
-on_error_cb (GeditFileBrowserWidget * tree_widget,
- guint code, gchar const *message, GeditWindow * window)
+on_error_cb (PlumaFileBrowserWidget * tree_widget,
+ guint code, gchar const *message, PlumaWindow * window)
{
gchar * title;
GtkWidget * dlg;
- GeditFileBrowserPluginData * data;
+ PlumaFileBrowserPluginData * data;
data = get_plugin_data (window);
/* Do not show the error when the root has been set automatically */
- if (data->auto_root && (code == GEDIT_FILE_BROWSER_ERROR_SET_ROOT ||
- code == GEDIT_FILE_BROWSER_ERROR_LOAD_DIRECTORY))
+ if (data->auto_root && (code == PLUMA_FILE_BROWSER_ERROR_SET_ROOT ||
+ code == PLUMA_FILE_BROWSER_ERROR_LOAD_DIRECTORY))
{
/* Show bookmarks */
- gedit_file_browser_widget_show_bookmarks (data->tree_widget);
+ pluma_file_browser_widget_show_bookmarks (data->tree_widget);
return;
}
switch (code) {
- case GEDIT_FILE_BROWSER_ERROR_NEW_DIRECTORY:
+ case PLUMA_FILE_BROWSER_ERROR_NEW_DIRECTORY:
title =
_("An error occurred while creating a new directory");
break;
- case GEDIT_FILE_BROWSER_ERROR_NEW_FILE:
+ case PLUMA_FILE_BROWSER_ERROR_NEW_FILE:
title = _("An error occurred while creating a new file");
break;
- case GEDIT_FILE_BROWSER_ERROR_RENAME:
+ case PLUMA_FILE_BROWSER_ERROR_RENAME:
title =
_
("An error occurred while renaming a file or directory");
break;
- case GEDIT_FILE_BROWSER_ERROR_DELETE:
+ case PLUMA_FILE_BROWSER_ERROR_DELETE:
title =
_
("An error occurred while deleting a file or directory");
break;
- case GEDIT_FILE_BROWSER_ERROR_OPEN_DIRECTORY:
+ case PLUMA_FILE_BROWSER_ERROR_OPEN_DIRECTORY:
title =
_
("An error occurred while opening a directory in the file manager");
break;
- case GEDIT_FILE_BROWSER_ERROR_SET_ROOT:
+ case PLUMA_FILE_BROWSER_ERROR_SET_ROOT:
title =
_("An error occurred while setting a root directory");
break;
- case GEDIT_FILE_BROWSER_ERROR_LOAD_DIRECTORY:
+ case PLUMA_FILE_BROWSER_ERROR_LOAD_DIRECTORY:
title =
_("An error occurred while loading a directory");
break;
@@ -916,15 +916,15 @@ on_error_cb (GeditFileBrowserWidget * tree_widget,
}
static void
-on_model_set_cb (GeditFileBrowserView * widget,
+on_model_set_cb (PlumaFileBrowserView * widget,
GParamSpec *arg1,
- GeditWindow * window)
+ PlumaWindow * window)
{
- GeditFileBrowserPluginData * data = get_plugin_data (window);
+ PlumaFileBrowserPluginData * data = get_plugin_data (window);
GtkTreeModel * model;
MateConfClient * client;
- model = gtk_tree_view_get_model (GTK_TREE_VIEW (gedit_file_browser_widget_get_browser_view (data->tree_widget)));
+ model = gtk_tree_view_get_model (GTK_TREE_VIEW (pluma_file_browser_widget_get_browser_view (data->tree_widget)));
if (model == NULL)
return;
@@ -932,38 +932,38 @@ on_model_set_cb (GeditFileBrowserView * widget,
client = mateconf_client_get_default ();
mateconf_client_set_bool (client,
FILE_BROWSER_BASE_KEY "/on_load/tree_view",
- GEDIT_IS_FILE_BROWSER_STORE (model),
+ PLUMA_IS_FILE_BROWSER_STORE (model),
NULL);
g_object_unref (client);
}
static void
-on_filter_mode_changed_cb (GeditFileBrowserStore * model,
+on_filter_mode_changed_cb (PlumaFileBrowserStore * model,
GParamSpec * param,
- GeditWindow * window)
+ PlumaWindow * window)
{
MateConfClient * client;
- GeditFileBrowserStoreFilterMode mode;
+ PlumaFileBrowserStoreFilterMode mode;
client = mateconf_client_get_default ();
if (!client)
return;
- mode = gedit_file_browser_store_get_filter_mode (model);
+ mode = pluma_file_browser_store_get_filter_mode (model);
- if ((mode & GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN) &&
- (mode & GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY)) {
+ if ((mode & PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN) &&
+ (mode & PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY)) {
mateconf_client_set_string (client,
FILE_BROWSER_BASE_KEY "/filter_mode",
"hidden_and_binary",
NULL);
- } else if (mode & GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN) {
+ } else if (mode & PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN) {
mateconf_client_set_string (client,
FILE_BROWSER_BASE_KEY "/filter_mode",
"hidden",
NULL);
- } else if (mode & GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY) {
+ } else if (mode & PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY) {
mateconf_client_set_string (client,
FILE_BROWSER_BASE_KEY "/filter_mode",
"binary",
@@ -980,30 +980,30 @@ on_filter_mode_changed_cb (GeditFileBrowserStore * model,
}
static void
-on_rename_cb (GeditFileBrowserStore * store,
+on_rename_cb (PlumaFileBrowserStore * store,
const gchar * olduri,
const gchar * newuri,
- GeditWindow * window)
+ PlumaWindow * window)
{
- GeditApp * app;
+ PlumaApp * app;
GList * documents;
GList * item;
- GeditDocument * doc;
+ PlumaDocument * doc;
GFile * docfile;
GFile * oldfile;
GFile * newfile;
gchar * uri;
/* Find all documents and set its uri to newuri where it matches olduri */
- app = gedit_app_get_default ();
- documents = gedit_app_get_documents (app);
+ app = pluma_app_get_default ();
+ documents = pluma_app_get_documents (app);
oldfile = g_file_new_for_uri (olduri);
newfile = g_file_new_for_uri (newuri);
for (item = documents; item; item = item->next) {
- doc = GEDIT_DOCUMENT (item->data);
- uri = gedit_document_get_uri (doc);
+ doc = PLUMA_DOCUMENT (item->data);
+ uri = pluma_document_get_uri (doc);
if (!uri)
continue;
@@ -1011,7 +1011,7 @@ on_rename_cb (GeditFileBrowserStore * store,
docfile = g_file_new_for_uri (uri);
if (g_file_equal (docfile, oldfile)) {
- gedit_document_set_uri (doc, newuri);
+ pluma_document_set_uri (doc, newuri);
} else {
gchar *relative;
@@ -1027,7 +1027,7 @@ on_rename_cb (GeditFileBrowserStore * store,
docfile = g_file_get_child (newfile, relative);
uri = g_file_get_uri (docfile);
- gedit_document_set_uri (doc, uri);
+ pluma_document_set_uri (doc, uri);
}
g_free (relative);
@@ -1044,9 +1044,9 @@ on_rename_cb (GeditFileBrowserStore * store,
}
static void
-on_filter_pattern_changed_cb (GeditFileBrowserWidget * widget,
+on_filter_pattern_changed_cb (PlumaFileBrowserWidget * widget,
GParamSpec * param,
- GeditWindow * window)
+ PlumaWindow * window)
{
MateConfClient * client;
gchar * pattern;
@@ -1073,16 +1073,16 @@ on_filter_pattern_changed_cb (GeditFileBrowserWidget * widget,
}
static void
-on_virtual_root_changed_cb (GeditFileBrowserStore * store,
+on_virtual_root_changed_cb (PlumaFileBrowserStore * store,
GParamSpec * param,
- GeditWindow * window)
+ PlumaWindow * window)
{
- GeditFileBrowserPluginData * data = get_plugin_data (window);
+ PlumaFileBrowserPluginData * data = get_plugin_data (window);
gchar * root;
gchar * virtual_root;
MateConfClient * client;
- root = gedit_file_browser_store_get_root (store);
+ root = pluma_file_browser_store_get_root (store);
if (!root)
return;
@@ -1097,7 +1097,7 @@ on_virtual_root_changed_cb (GeditFileBrowserStore * store,
root,
NULL);
- virtual_root = gedit_file_browser_store_get_virtual_root (store);
+ virtual_root = pluma_file_browser_store_get_virtual_root (store);
if (!virtual_root) {
/* Set virtual to same as root then */
@@ -1122,9 +1122,9 @@ on_virtual_root_changed_cb (GeditFileBrowserStore * store,
}
static void
-on_tab_added_cb (GeditWindow * window,
- GeditTab * tab,
- GeditFileBrowserPluginData * data)
+on_tab_added_cb (PlumaWindow * window,
+ PlumaTab * tab,
+ PlumaFileBrowserPluginData * data)
{
MateConfClient *client;
gboolean open;
@@ -1140,14 +1140,14 @@ on_tab_added_cb (GeditWindow * window,
NULL);
if (open) {
- GeditDocument *doc;
+ PlumaDocument *doc;
gchar *uri;
- doc = gedit_tab_get_document (tab);
+ doc = pluma_tab_get_document (tab);
- uri = gedit_document_get_uri (doc);
+ uri = pluma_document_get_uri (doc);
- if (uri != NULL && gedit_utils_uri_has_file_scheme (uri)) {
+ if (uri != NULL && pluma_utils_uri_has_file_scheme (uri)) {
prepare_auto_root (data);
set_root_from_doc (data, doc);
load_default = FALSE;
@@ -1175,16 +1175,16 @@ get_filename_from_path (GtkTreeModel *model, GtkTreePath *path)
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_model_get (model, &iter,
- GEDIT_FILE_BROWSER_STORE_COLUMN_URI, &uri,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_URI, &uri,
-1);
- return gedit_file_browser_utils_uri_basename (uri);
+ return pluma_file_browser_utils_uri_basename (uri);
}
static gboolean
-on_confirm_no_trash_cb (GeditFileBrowserWidget * widget,
+on_confirm_no_trash_cb (PlumaFileBrowserWidget * widget,
GList * files,
- GeditWindow * window)
+ PlumaWindow * window)
{
gchar *normal;
gchar *message;
@@ -1194,14 +1194,14 @@ on_confirm_no_trash_cb (GeditFileBrowserWidget * widget,
message = _("Cannot move file to trash, do you\nwant to delete permanently?");
if (files->next == NULL) {
- normal = gedit_file_browser_utils_file_basename (G_FILE (files->data));
+ normal = pluma_file_browser_utils_file_basename (G_FILE (files->data));
secondary = g_strdup_printf (_("The file \"%s\" cannot be moved to the trash."), normal);
g_free (normal);
} else {
secondary = g_strdup (_("The selected files cannot be moved to the trash."));
}
- result = gedit_file_browser_utils_confirmation_dialog (window,
+ result = pluma_file_browser_utils_confirmation_dialog (window,
GTK_MESSAGE_QUESTION,
message,
secondary,
@@ -1213,16 +1213,16 @@ on_confirm_no_trash_cb (GeditFileBrowserWidget * widget,
}
static gboolean
-on_confirm_delete_cb (GeditFileBrowserWidget *widget,
- GeditFileBrowserStore *store,
+on_confirm_delete_cb (PlumaFileBrowserWidget *widget,
+ PlumaFileBrowserStore *store,
GList *paths,
- GeditWindow *window)
+ PlumaWindow *window)
{
gchar *normal;
gchar *message;
gchar *secondary;
gboolean result;
- GeditFileBrowserPluginData *data;
+ PlumaFileBrowserPluginData *data;
data = get_plugin_data (window);
@@ -1239,7 +1239,7 @@ on_confirm_delete_cb (GeditFileBrowserWidget *widget,
secondary = _("If you delete an item, it is permanently lost.");
- result = gedit_file_browser_utils_confirmation_dialog (window,
+ result = pluma_file_browser_utils_confirmation_dialog (window,
GTK_MESSAGE_QUESTION,
message,
secondary,
diff --git a/plugins/filebrowser/pluma-file-browser-plugin.h b/plugins/filebrowser/pluma-file-browser-plugin.h
new file mode 100755
index 00000000..634c56af
--- /dev/null
+++ b/plugins/filebrowser/pluma-file-browser-plugin.h
@@ -0,0 +1,71 @@
+/*
+ * pluma-file-browser-plugin.h - Pluma plugin providing easy file access
+ * from the sidepanel
+ *
+ * Copyright (C) 2006 - Jesse van den Kieboom <[email protected]>
+ *
+ * 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __PLUMA_FILE_BROWSER_PLUGIN_H__
+#define __PLUMA_FILE_BROWSER_PLUGIN_H__
+
+#include <glib.h>
+#include <glib-object.h>
+#include <pluma/pluma-plugin.h>
+
+G_BEGIN_DECLS
+/*
+ * Type checking and casting macros
+ */
+#define PLUMA_TYPE_FILE_BROWSER_PLUGIN (filetree_plugin_get_type ())
+#define PLUMA_FILE_BROWSER_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PLUMA_TYPE_FILE_BROWSER_PLUGIN, PlumaFileBrowserPlugin))
+#define PLUMA_FILE_BROWSER_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PLUMA_TYPE_FILE_BROWSER_PLUGIN, PlumaFileBrowserPluginClass))
+#define PLUMA_IS_FILE_BROWSER_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PLUMA_TYPE_FILE_BROWSER_PLUGIN))
+#define PLUMA_IS_FILE_BROWSER_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PLUMA_TYPE_FILE_BROWSER_PLUGIN))
+#define PLUMA_FILE_BROWSER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PLUMA_TYPE_FILE_BROWSER_PLUGIN, PlumaFileBrowserPluginClass))
+
+/* Private structure type */
+typedef struct _PlumaFileBrowserPluginPrivate PlumaFileBrowserPluginPrivate;
+typedef struct _PlumaFileBrowserPlugin PlumaFileBrowserPlugin;
+typedef struct _PlumaFileBrowserPluginClass PlumaFileBrowserPluginClass;
+
+struct _PlumaFileBrowserPlugin
+{
+ PlumaPlugin parent_instance;
+
+ /*< private > */
+ PlumaFileBrowserPluginPrivate *priv;
+};
+
+
+
+struct _PlumaFileBrowserPluginClass
+{
+ PlumaPluginClass parent_class;
+};
+
+/*
+ * Public methods
+ */
+GType filetree_plugin_get_type (void) G_GNUC_CONST;
+
+/* All the plugins must implement this function */
+G_MODULE_EXPORT GType register_pluma_plugin (GTypeModule * module);
+
+G_END_DECLS
+#endif /* __PLUMA_FILE_BROWSER_PLUGIN_H__ */
+
+// ex:ts=8:noet:
diff --git a/plugins/filebrowser/gedit-file-browser-store.c b/plugins/filebrowser/pluma-file-browser-store.c
index 6c4f5b51..a046fe42 100755
--- a/plugins/filebrowser/gedit-file-browser-store.c
+++ b/plugins/filebrowser/pluma-file-browser-store.c
@@ -1,5 +1,5 @@
/*
- * gedit-file-browser-store.c - Gedit plugin providing easy file access
+ * pluma-file-browser-store.c - Pluma plugin providing easy file access
* from the sidepanel
*
* Copyright (C) 2006 - Jesse van den Kieboom <[email protected]>
@@ -26,18 +26,18 @@
#include <string.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>
-#include <gedit/gedit-plugin.h>
-#include <gedit/gedit-utils.h>
+#include <pluma/pluma-plugin.h>
+#include <pluma/pluma-utils.h>
-#include "gedit-file-browser-store.h"
-#include "gedit-file-browser-marshal.h"
-#include "gedit-file-browser-enum-types.h"
-#include "gedit-file-browser-error.h"
-#include "gedit-file-browser-utils.h"
+#include "pluma-file-browser-store.h"
+#include "pluma-file-browser-marshal.h"
+#include "pluma-file-browser-enum-types.h"
+#include "pluma-file-browser-error.h"
+#include "pluma-file-browser-utils.h"
-#define GEDIT_FILE_BROWSER_STORE_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), \
- GEDIT_TYPE_FILE_BROWSER_STORE, \
- GeditFileBrowserStorePrivate))
+#define PLUMA_FILE_BROWSER_STORE_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), \
+ PLUMA_TYPE_FILE_BROWSER_STORE, \
+ PlumaFileBrowserStorePrivate))
#define NODE_IS_DIR(node) (FILE_IS_DIR((node)->flags))
#define NODE_IS_HIDDEN(node) (FILE_IS_HIDDEN((node)->flags))
@@ -66,7 +66,7 @@ typedef gint (*SortFunc) (FileBrowserNode * node1,
struct _AsyncData
{
- GeditFileBrowserStore * model;
+ PlumaFileBrowserStore * model;
GCancellable * cancellable;
gboolean trash;
GList * files;
@@ -82,7 +82,7 @@ struct _AsyncNode
};
typedef struct {
- GeditFileBrowserStore * model;
+ PlumaFileBrowserStore * model;
gchar * virtual_root;
GMountOperation * operation;
GCancellable * cancellable;
@@ -110,17 +110,17 @@ struct _FileBrowserNodeDir
GCancellable *cancellable;
GFileMonitor *monitor;
- GeditFileBrowserStore *model;
+ PlumaFileBrowserStore *model;
};
-struct _GeditFileBrowserStorePrivate
+struct _PlumaFileBrowserStorePrivate
{
FileBrowserNode *root;
FileBrowserNode *virtual_root;
- GType column_types[GEDIT_FILE_BROWSER_STORE_COLUMN_NUM];
+ GType column_types[PLUMA_FILE_BROWSER_STORE_COLUMN_NUM];
- GeditFileBrowserStoreFilterMode filter_mode;
- GeditFileBrowserStoreFilterFunc filter_func;
+ PlumaFileBrowserStoreFilterMode filter_mode;
+ PlumaFileBrowserStoreFilterFunc filter_func;
gpointer filter_user_data;
SortFunc sort_func;
@@ -129,82 +129,82 @@ struct _GeditFileBrowserStorePrivate
MountInfo *mount_info;
};
-static FileBrowserNode *model_find_node (GeditFileBrowserStore *model,
+static FileBrowserNode *model_find_node (PlumaFileBrowserStore *model,
FileBrowserNode *node,
GFile *uri);
-static void model_remove_node (GeditFileBrowserStore * model,
+static void model_remove_node (PlumaFileBrowserStore * model,
FileBrowserNode * node,
GtkTreePath * path,
gboolean free_nodes);
-static void set_virtual_root_from_node (GeditFileBrowserStore * model,
+static void set_virtual_root_from_node (PlumaFileBrowserStore * model,
FileBrowserNode * node);
-static void gedit_file_browser_store_iface_init (GtkTreeModelIface * iface);
-static GtkTreeModelFlags gedit_file_browser_store_get_flags (GtkTreeModel * tree_model);
-static gint gedit_file_browser_store_get_n_columns (GtkTreeModel * tree_model);
-static GType gedit_file_browser_store_get_column_type (GtkTreeModel * tree_model,
+static void pluma_file_browser_store_iface_init (GtkTreeModelIface * iface);
+static GtkTreeModelFlags pluma_file_browser_store_get_flags (GtkTreeModel * tree_model);
+static gint pluma_file_browser_store_get_n_columns (GtkTreeModel * tree_model);
+static GType pluma_file_browser_store_get_column_type (GtkTreeModel * tree_model,
gint index);
-static gboolean gedit_file_browser_store_get_iter (GtkTreeModel * tree_model,
+static gboolean pluma_file_browser_store_get_iter (GtkTreeModel * tree_model,
GtkTreeIter * iter,
GtkTreePath * path);
-static GtkTreePath *gedit_file_browser_store_get_path (GtkTreeModel * tree_model,
+static GtkTreePath *pluma_file_browser_store_get_path (GtkTreeModel * tree_model,
GtkTreeIter * iter);
-static void gedit_file_browser_store_get_value (GtkTreeModel * tree_model,
+static void pluma_file_browser_store_get_value (GtkTreeModel * tree_model,
GtkTreeIter * iter,
gint column,
GValue * value);
-static gboolean gedit_file_browser_store_iter_next (GtkTreeModel * tree_model,
+static gboolean pluma_file_browser_store_iter_next (GtkTreeModel * tree_model,
GtkTreeIter * iter);
-static gboolean gedit_file_browser_store_iter_children (GtkTreeModel * tree_model,
+static gboolean pluma_file_browser_store_iter_children (GtkTreeModel * tree_model,
GtkTreeIter * iter,
GtkTreeIter * parent);
-static gboolean gedit_file_browser_store_iter_has_child (GtkTreeModel * tree_model,
+static gboolean pluma_file_browser_store_iter_has_child (GtkTreeModel * tree_model,
GtkTreeIter * iter);
-static gint gedit_file_browser_store_iter_n_children (GtkTreeModel * tree_model,
+static gint pluma_file_browser_store_iter_n_children (GtkTreeModel * tree_model,
GtkTreeIter * iter);
-static gboolean gedit_file_browser_store_iter_nth_child (GtkTreeModel * tree_model,
+static gboolean pluma_file_browser_store_iter_nth_child (GtkTreeModel * tree_model,
GtkTreeIter * iter,
GtkTreeIter * parent,
gint n);
-static gboolean gedit_file_browser_store_iter_parent (GtkTreeModel * tree_model,
+static gboolean pluma_file_browser_store_iter_parent (GtkTreeModel * tree_model,
GtkTreeIter * iter,
GtkTreeIter * child);
-static void gedit_file_browser_store_row_inserted (GtkTreeModel * tree_model,
+static void pluma_file_browser_store_row_inserted (GtkTreeModel * tree_model,
GtkTreePath * path,
GtkTreeIter * iter);
-static void gedit_file_browser_store_drag_source_init (GtkTreeDragSourceIface * iface);
-static gboolean gedit_file_browser_store_row_draggable (GtkTreeDragSource * drag_source,
+static void pluma_file_browser_store_drag_source_init (GtkTreeDragSourceIface * iface);
+static gboolean pluma_file_browser_store_row_draggable (GtkTreeDragSource * drag_source,
GtkTreePath * path);
-static gboolean gedit_file_browser_store_drag_data_delete (GtkTreeDragSource * drag_source,
+static gboolean pluma_file_browser_store_drag_data_delete (GtkTreeDragSource * drag_source,
GtkTreePath * path);
-static gboolean gedit_file_browser_store_drag_data_get (GtkTreeDragSource * drag_source,
+static gboolean pluma_file_browser_store_drag_data_get (GtkTreeDragSource * drag_source,
GtkTreePath * path,
GtkSelectionData * selection_data);
-static void file_browser_node_free (GeditFileBrowserStore * model,
+static void file_browser_node_free (PlumaFileBrowserStore * model,
FileBrowserNode * node);
-static void model_add_node (GeditFileBrowserStore * model,
+static void model_add_node (PlumaFileBrowserStore * model,
FileBrowserNode * child,
FileBrowserNode * parent);
-static void model_clear (GeditFileBrowserStore * model,
+static void model_clear (PlumaFileBrowserStore * model,
gboolean free_nodes);
static gint model_sort_default (FileBrowserNode * node1,
FileBrowserNode * node2);
-static void model_check_dummy (GeditFileBrowserStore * model,
+static void model_check_dummy (PlumaFileBrowserStore * model,
FileBrowserNode * node);
static void next_files_async (GFileEnumerator * enumerator,
AsyncNode * async);
-GEDIT_PLUGIN_DEFINE_TYPE_WITH_CODE (GeditFileBrowserStore, gedit_file_browser_store,
+PLUMA_PLUGIN_DEFINE_TYPE_WITH_CODE (PlumaFileBrowserStore, pluma_file_browser_store,
G_TYPE_OBJECT,
- GEDIT_PLUGIN_IMPLEMENT_INTERFACE (gedit_file_browser_store_tree_model,
+ PLUMA_PLUGIN_IMPLEMENT_INTERFACE (pluma_file_browser_store_tree_model,
GTK_TYPE_TREE_MODEL,
- gedit_file_browser_store_iface_init)
- GEDIT_PLUGIN_IMPLEMENT_INTERFACE (gedit_file_browser_store_drag_source,
+ pluma_file_browser_store_iface_init)
+ PLUMA_PLUGIN_IMPLEMENT_INTERFACE (pluma_file_browser_store_drag_source,
GTK_TYPE_TREE_DRAG_SOURCE,
- gedit_file_browser_store_drag_source_init))
+ pluma_file_browser_store_drag_source_init))
/* Properties */
enum {
@@ -232,7 +232,7 @@ enum
static guint model_signals[NUM_SIGNALS] = { 0 };
static void
-cancel_mount_operation (GeditFileBrowserStore *obj)
+cancel_mount_operation (PlumaFileBrowserStore *obj)
{
if (obj->priv->mount_info != NULL)
{
@@ -243,9 +243,9 @@ cancel_mount_operation (GeditFileBrowserStore *obj)
}
static void
-gedit_file_browser_store_finalize (GObject * object)
+pluma_file_browser_store_finalize (GObject * object)
{
- GeditFileBrowserStore *obj = GEDIT_FILE_BROWSER_STORE (object);
+ PlumaFileBrowserStore *obj = PLUMA_FILE_BROWSER_STORE (object);
GSList *item;
/* Free all the nodes */
@@ -263,7 +263,7 @@ gedit_file_browser_store_finalize (GObject * object)
cancel_mount_operation (obj);
g_slist_free (obj->priv->async_handles);
- G_OBJECT_CLASS (gedit_file_browser_store_parent_class)->finalize (object);
+ G_OBJECT_CLASS (pluma_file_browser_store_parent_class)->finalize (object);
}
static void
@@ -281,12 +281,12 @@ set_gvalue_from_node (GValue *value,
}
static void
-gedit_file_browser_store_get_property (GObject *object,
+pluma_file_browser_store_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
- GeditFileBrowserStore *obj = GEDIT_FILE_BROWSER_STORE (object);
+ PlumaFileBrowserStore *obj = PLUMA_FILE_BROWSER_STORE (object);
switch (prop_id)
{
@@ -306,17 +306,17 @@ gedit_file_browser_store_get_property (GObject *object,
}
static void
-gedit_file_browser_store_set_property (GObject *object,
+pluma_file_browser_store_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
- GeditFileBrowserStore *obj = GEDIT_FILE_BROWSER_STORE (object);
+ PlumaFileBrowserStore *obj = PLUMA_FILE_BROWSER_STORE (object);
switch (prop_id)
{
case PROP_FILTER_MODE:
- gedit_file_browser_store_set_filter_mode (obj,
+ pluma_file_browser_store_set_filter_mode (obj,
g_value_get_flags (value));
break;
default:
@@ -326,14 +326,14 @@ gedit_file_browser_store_set_property (GObject *object,
}
static void
-gedit_file_browser_store_class_init (GeditFileBrowserStoreClass * klass)
+pluma_file_browser_store_class_init (PlumaFileBrowserStoreClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = gedit_file_browser_store_finalize;
+ object_class->finalize = pluma_file_browser_store_finalize;
- object_class->get_property = gedit_file_browser_store_get_property;
- object_class->set_property = gedit_file_browser_store_set_property;
+ object_class->get_property = pluma_file_browser_store_get_property;
+ object_class->set_property = pluma_file_browser_store_set_property;
g_object_class_install_property (object_class, PROP_ROOT,
g_param_spec_string ("root",
@@ -353,15 +353,15 @@ gedit_file_browser_store_class_init (GeditFileBrowserStoreClass * klass)
g_param_spec_flags ("filter-mode",
"Filter Mode",
"The filter mode",
- GEDIT_TYPE_FILE_BROWSER_STORE_FILTER_MODE,
- gedit_file_browser_store_filter_mode_get_default (),
+ PLUMA_TYPE_FILE_BROWSER_STORE_FILTER_MODE,
+ pluma_file_browser_store_filter_mode_get_default (),
G_PARAM_READWRITE));
model_signals[BEGIN_LOADING] =
g_signal_new ("begin-loading",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GeditFileBrowserStoreClass,
+ G_STRUCT_OFFSET (PlumaFileBrowserStoreClass,
begin_loading), NULL, NULL,
g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1,
GTK_TYPE_TREE_ITER);
@@ -369,31 +369,31 @@ gedit_file_browser_store_class_init (GeditFileBrowserStoreClass * klass)
g_signal_new ("end-loading",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GeditFileBrowserStoreClass,
+ G_STRUCT_OFFSET (PlumaFileBrowserStoreClass,
end_loading), NULL, NULL,
g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1,
GTK_TYPE_TREE_ITER);
model_signals[ERROR] =
g_signal_new ("error", G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GeditFileBrowserStoreClass,
+ G_STRUCT_OFFSET (PlumaFileBrowserStoreClass,
error), NULL, NULL,
- gedit_file_browser_marshal_VOID__UINT_STRING,
+ pluma_file_browser_marshal_VOID__UINT_STRING,
G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING);
model_signals[NO_TRASH] =
g_signal_new ("no-trash", G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GeditFileBrowserStoreClass,
+ G_STRUCT_OFFSET (PlumaFileBrowserStoreClass,
no_trash), g_signal_accumulator_true_handled, NULL,
- gedit_file_browser_marshal_BOOL__POINTER,
+ pluma_file_browser_marshal_BOOL__POINTER,
G_TYPE_BOOLEAN, 1, G_TYPE_POINTER);
model_signals[RENAME] =
g_signal_new ("rename",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GeditFileBrowserStoreClass,
+ G_STRUCT_OFFSET (PlumaFileBrowserStoreClass,
rename), NULL, NULL,
- gedit_file_browser_marshal_VOID__STRING_STRING,
+ pluma_file_browser_marshal_VOID__STRING_STRING,
G_TYPE_NONE, 2,
G_TYPE_STRING,
G_TYPE_STRING);
@@ -401,7 +401,7 @@ gedit_file_browser_store_class_init (GeditFileBrowserStoreClass * klass)
g_signal_new ("begin-refresh",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GeditFileBrowserStoreClass,
+ G_STRUCT_OFFSET (PlumaFileBrowserStoreClass,
begin_refresh), NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
@@ -409,7 +409,7 @@ gedit_file_browser_store_class_init (GeditFileBrowserStoreClass * klass)
g_signal_new ("end-refresh",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GeditFileBrowserStoreClass,
+ G_STRUCT_OFFSET (PlumaFileBrowserStoreClass,
end_refresh), NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
@@ -417,60 +417,60 @@ gedit_file_browser_store_class_init (GeditFileBrowserStoreClass * klass)
g_signal_new ("unload",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GeditFileBrowserStoreClass,
+ G_STRUCT_OFFSET (PlumaFileBrowserStoreClass,
unload), NULL, NULL,
g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE, 1,
G_TYPE_STRING);
g_type_class_add_private (object_class,
- sizeof (GeditFileBrowserStorePrivate));
+ sizeof (PlumaFileBrowserStorePrivate));
}
static void
-gedit_file_browser_store_iface_init (GtkTreeModelIface * iface)
-{
- iface->get_flags = gedit_file_browser_store_get_flags;
- iface->get_n_columns = gedit_file_browser_store_get_n_columns;
- iface->get_column_type = gedit_file_browser_store_get_column_type;
- iface->get_iter = gedit_file_browser_store_get_iter;
- iface->get_path = gedit_file_browser_store_get_path;
- iface->get_value = gedit_file_browser_store_get_value;
- iface->iter_next = gedit_file_browser_store_iter_next;
- iface->iter_children = gedit_file_browser_store_iter_children;
- iface->iter_has_child = gedit_file_browser_store_iter_has_child;
- iface->iter_n_children = gedit_file_browser_store_iter_n_children;
- iface->iter_nth_child = gedit_file_browser_store_iter_nth_child;
- iface->iter_parent = gedit_file_browser_store_iter_parent;
- iface->row_inserted = gedit_file_browser_store_row_inserted;
+pluma_file_browser_store_iface_init (GtkTreeModelIface * iface)
+{
+ iface->get_flags = pluma_file_browser_store_get_flags;
+ iface->get_n_columns = pluma_file_browser_store_get_n_columns;
+ iface->get_column_type = pluma_file_browser_store_get_column_type;
+ iface->get_iter = pluma_file_browser_store_get_iter;
+ iface->get_path = pluma_file_browser_store_get_path;
+ iface->get_value = pluma_file_browser_store_get_value;
+ iface->iter_next = pluma_file_browser_store_iter_next;
+ iface->iter_children = pluma_file_browser_store_iter_children;
+ iface->iter_has_child = pluma_file_browser_store_iter_has_child;
+ iface->iter_n_children = pluma_file_browser_store_iter_n_children;
+ iface->iter_nth_child = pluma_file_browser_store_iter_nth_child;
+ iface->iter_parent = pluma_file_browser_store_iter_parent;
+ iface->row_inserted = pluma_file_browser_store_row_inserted;
}
static void
-gedit_file_browser_store_drag_source_init (GtkTreeDragSourceIface * iface)
+pluma_file_browser_store_drag_source_init (GtkTreeDragSourceIface * iface)
{
- iface->row_draggable = gedit_file_browser_store_row_draggable;
- iface->drag_data_delete = gedit_file_browser_store_drag_data_delete;
- iface->drag_data_get = gedit_file_browser_store_drag_data_get;
+ iface->row_draggable = pluma_file_browser_store_row_draggable;
+ iface->drag_data_delete = pluma_file_browser_store_drag_data_delete;
+ iface->drag_data_get = pluma_file_browser_store_drag_data_get;
}
static void
-gedit_file_browser_store_init (GeditFileBrowserStore * obj)
+pluma_file_browser_store_init (PlumaFileBrowserStore * obj)
{
- obj->priv = GEDIT_FILE_BROWSER_STORE_GET_PRIVATE (obj);
+ obj->priv = PLUMA_FILE_BROWSER_STORE_GET_PRIVATE (obj);
- obj->priv->column_types[GEDIT_FILE_BROWSER_STORE_COLUMN_URI] =
+ obj->priv->column_types[PLUMA_FILE_BROWSER_STORE_COLUMN_URI] =
G_TYPE_STRING;
- obj->priv->column_types[GEDIT_FILE_BROWSER_STORE_COLUMN_NAME] =
+ obj->priv->column_types[PLUMA_FILE_BROWSER_STORE_COLUMN_NAME] =
G_TYPE_STRING;
- obj->priv->column_types[GEDIT_FILE_BROWSER_STORE_COLUMN_FLAGS] =
+ obj->priv->column_types[PLUMA_FILE_BROWSER_STORE_COLUMN_FLAGS] =
G_TYPE_UINT;
- obj->priv->column_types[GEDIT_FILE_BROWSER_STORE_COLUMN_ICON] =
+ obj->priv->column_types[PLUMA_FILE_BROWSER_STORE_COLUMN_ICON] =
GDK_TYPE_PIXBUF;
- obj->priv->column_types[GEDIT_FILE_BROWSER_STORE_COLUMN_EMBLEM] =
+ obj->priv->column_types[PLUMA_FILE_BROWSER_STORE_COLUMN_EMBLEM] =
GDK_TYPE_PIXBUF;
// Default filter mode is hiding the hidden files
- obj->priv->filter_mode = gedit_file_browser_store_filter_mode_get_default ();
+ obj->priv->filter_mode = pluma_file_browser_store_filter_mode_get_default ();
obj->priv->sort_func = model_sort_default;
}
@@ -487,13 +487,13 @@ node_has_parent (FileBrowserNode * node, FileBrowserNode * parent)
}
static gboolean
-node_in_tree (GeditFileBrowserStore * model, FileBrowserNode * node)
+node_in_tree (PlumaFileBrowserStore * model, FileBrowserNode * node)
{
return node_has_parent (node, model->priv->virtual_root);
}
static gboolean
-model_node_visibility (GeditFileBrowserStore * model,
+model_node_visibility (PlumaFileBrowserStore * model,
FileBrowserNode * node)
{
if (node == NULL)
@@ -512,7 +512,7 @@ model_node_visibility (GeditFileBrowserStore * model,
}
static gboolean
-model_node_inserted (GeditFileBrowserStore * model,
+model_node_inserted (PlumaFileBrowserStore * model,
FileBrowserNode * node)
{
return node == model->priv->virtual_root || (model_node_visibility (model, node) && node->inserted);
@@ -521,46 +521,46 @@ model_node_inserted (GeditFileBrowserStore * model,
/* Interface implementation */
static GtkTreeModelFlags
-gedit_file_browser_store_get_flags (GtkTreeModel * tree_model)
+pluma_file_browser_store_get_flags (GtkTreeModel * tree_model)
{
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (tree_model),
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (tree_model),
(GtkTreeModelFlags) 0);
return GTK_TREE_MODEL_ITERS_PERSIST;
}
static gint
-gedit_file_browser_store_get_n_columns (GtkTreeModel * tree_model)
+pluma_file_browser_store_get_n_columns (GtkTreeModel * tree_model)
{
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (tree_model), 0);
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (tree_model), 0);
- return GEDIT_FILE_BROWSER_STORE_COLUMN_NUM;
+ return PLUMA_FILE_BROWSER_STORE_COLUMN_NUM;
}
static GType
-gedit_file_browser_store_get_column_type (GtkTreeModel * tree_model, gint idx)
+pluma_file_browser_store_get_column_type (GtkTreeModel * tree_model, gint idx)
{
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (tree_model),
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (tree_model),
G_TYPE_INVALID);
- g_return_val_if_fail (idx < GEDIT_FILE_BROWSER_STORE_COLUMN_NUM &&
+ g_return_val_if_fail (idx < PLUMA_FILE_BROWSER_STORE_COLUMN_NUM &&
idx >= 0, G_TYPE_INVALID);
- return GEDIT_FILE_BROWSER_STORE (tree_model)->priv->column_types[idx];
+ return PLUMA_FILE_BROWSER_STORE (tree_model)->priv->column_types[idx];
}
static gboolean
-gedit_file_browser_store_get_iter (GtkTreeModel * tree_model,
+pluma_file_browser_store_get_iter (GtkTreeModel * tree_model,
GtkTreeIter * iter, GtkTreePath * path)
{
gint * indices, depth, i;
FileBrowserNode * node;
- GeditFileBrowserStore * model;
+ PlumaFileBrowserStore * model;
gint num;
- g_assert (GEDIT_IS_FILE_BROWSER_STORE (tree_model));
+ g_assert (PLUMA_IS_FILE_BROWSER_STORE (tree_model));
g_assert (path != NULL);
- model = GEDIT_FILE_BROWSER_STORE (tree_model);
+ model = PLUMA_FILE_BROWSER_STORE (tree_model);
indices = gtk_tree_path_get_indices (path);
depth = gtk_tree_path_get_depth (path);
node = model->priv->virtual_root;
@@ -605,7 +605,7 @@ gedit_file_browser_store_get_iter (GtkTreeModel * tree_model,
}
static GtkTreePath *
-gedit_file_browser_store_get_path_real (GeditFileBrowserStore * model,
+pluma_file_browser_store_get_path_real (PlumaFileBrowserStore * model,
FileBrowserNode * node)
{
GtkTreePath *path;
@@ -652,47 +652,47 @@ gedit_file_browser_store_get_path_real (GeditFileBrowserStore * model,
}
static GtkTreePath *
-gedit_file_browser_store_get_path (GtkTreeModel * tree_model,
+pluma_file_browser_store_get_path (GtkTreeModel * tree_model,
GtkTreeIter * iter)
{
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (tree_model), NULL);
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (tree_model), NULL);
g_return_val_if_fail (iter != NULL, NULL);
g_return_val_if_fail (iter->user_data != NULL, NULL);
- return gedit_file_browser_store_get_path_real (GEDIT_FILE_BROWSER_STORE (tree_model),
+ return pluma_file_browser_store_get_path_real (PLUMA_FILE_BROWSER_STORE (tree_model),
(FileBrowserNode *) (iter->user_data));
}
static void
-gedit_file_browser_store_get_value (GtkTreeModel * tree_model,
+pluma_file_browser_store_get_value (GtkTreeModel * tree_model,
GtkTreeIter * iter,
gint column,
GValue * value)
{
FileBrowserNode *node;
- g_return_if_fail (GEDIT_IS_FILE_BROWSER_STORE (tree_model));
+ g_return_if_fail (PLUMA_IS_FILE_BROWSER_STORE (tree_model));
g_return_if_fail (iter != NULL);
g_return_if_fail (iter->user_data != NULL);
node = (FileBrowserNode *) (iter->user_data);
- g_value_init (value, GEDIT_FILE_BROWSER_STORE (tree_model)->priv->column_types[column]);
+ g_value_init (value, PLUMA_FILE_BROWSER_STORE (tree_model)->priv->column_types[column]);
switch (column) {
- case GEDIT_FILE_BROWSER_STORE_COLUMN_URI:
+ case PLUMA_FILE_BROWSER_STORE_COLUMN_URI:
set_gvalue_from_node (value, node);
break;
- case GEDIT_FILE_BROWSER_STORE_COLUMN_NAME:
+ case PLUMA_FILE_BROWSER_STORE_COLUMN_NAME:
g_value_set_string (value, node->name);
break;
- case GEDIT_FILE_BROWSER_STORE_COLUMN_FLAGS:
+ case PLUMA_FILE_BROWSER_STORE_COLUMN_FLAGS:
g_value_set_uint (value, node->flags);
break;
- case GEDIT_FILE_BROWSER_STORE_COLUMN_ICON:
+ case PLUMA_FILE_BROWSER_STORE_COLUMN_ICON:
g_value_set_object (value, node->icon);
break;
- case GEDIT_FILE_BROWSER_STORE_COLUMN_EMBLEM:
+ case PLUMA_FILE_BROWSER_STORE_COLUMN_EMBLEM:
g_value_set_object (value, node->emblem);
break;
default:
@@ -701,20 +701,20 @@ gedit_file_browser_store_get_value (GtkTreeModel * tree_model,
}
static gboolean
-gedit_file_browser_store_iter_next (GtkTreeModel * tree_model,
+pluma_file_browser_store_iter_next (GtkTreeModel * tree_model,
GtkTreeIter * iter)
{
- GeditFileBrowserStore * model;
+ PlumaFileBrowserStore * model;
FileBrowserNode * node;
GSList * item;
GSList * first;
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (tree_model),
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (tree_model),
FALSE);
g_return_val_if_fail (iter != NULL, FALSE);
g_return_val_if_fail (iter->user_data != NULL, FALSE);
- model = GEDIT_FILE_BROWSER_STORE (tree_model);
+ model = PLUMA_FILE_BROWSER_STORE (tree_model);
node = (FileBrowserNode *) (iter->user_data);
if (node->parent == NULL)
@@ -733,20 +733,20 @@ gedit_file_browser_store_iter_next (GtkTreeModel * tree_model,
}
static gboolean
-gedit_file_browser_store_iter_children (GtkTreeModel * tree_model,
+pluma_file_browser_store_iter_children (GtkTreeModel * tree_model,
GtkTreeIter * iter,
GtkTreeIter * parent)
{
FileBrowserNode * node;
- GeditFileBrowserStore * model;
+ PlumaFileBrowserStore * model;
GSList * item;
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (tree_model),
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (tree_model),
FALSE);
g_return_val_if_fail (parent == NULL
|| parent->user_data != NULL, FALSE);
- model = GEDIT_FILE_BROWSER_STORE (tree_model);
+ model = PLUMA_FILE_BROWSER_STORE (tree_model);
if (parent == NULL)
node = model->priv->virtual_root;
@@ -770,7 +770,7 @@ gedit_file_browser_store_iter_children (GtkTreeModel * tree_model,
}
static gboolean
-filter_tree_model_iter_has_child_real (GeditFileBrowserStore * model,
+filter_tree_model_iter_has_child_real (PlumaFileBrowserStore * model,
FileBrowserNode * node)
{
GSList *item;
@@ -787,18 +787,18 @@ filter_tree_model_iter_has_child_real (GeditFileBrowserStore * model,
}
static gboolean
-gedit_file_browser_store_iter_has_child (GtkTreeModel * tree_model,
+pluma_file_browser_store_iter_has_child (GtkTreeModel * tree_model,
GtkTreeIter * iter)
{
FileBrowserNode *node;
- GeditFileBrowserStore *model;
+ PlumaFileBrowserStore *model;
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (tree_model),
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (tree_model),
FALSE);
g_return_val_if_fail (iter == NULL
|| iter->user_data != NULL, FALSE);
- model = GEDIT_FILE_BROWSER_STORE (tree_model);
+ model = PLUMA_FILE_BROWSER_STORE (tree_model);
if (iter == NULL)
node = model->priv->virtual_root;
@@ -809,20 +809,20 @@ gedit_file_browser_store_iter_has_child (GtkTreeModel * tree_model,
}
static gint
-gedit_file_browser_store_iter_n_children (GtkTreeModel * tree_model,
+pluma_file_browser_store_iter_n_children (GtkTreeModel * tree_model,
GtkTreeIter * iter)
{
FileBrowserNode *node;
- GeditFileBrowserStore *model;
+ PlumaFileBrowserStore *model;
GSList *item;
gint num = 0;
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (tree_model),
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (tree_model),
FALSE);
g_return_val_if_fail (iter == NULL
|| iter->user_data != NULL, FALSE);
- model = GEDIT_FILE_BROWSER_STORE (tree_model);
+ model = PLUMA_FILE_BROWSER_STORE (tree_model);
if (iter == NULL)
node = model->priv->virtual_root;
@@ -840,21 +840,21 @@ gedit_file_browser_store_iter_n_children (GtkTreeModel * tree_model,
}
static gboolean
-gedit_file_browser_store_iter_nth_child (GtkTreeModel * tree_model,
+pluma_file_browser_store_iter_nth_child (GtkTreeModel * tree_model,
GtkTreeIter * iter,
GtkTreeIter * parent, gint n)
{
FileBrowserNode *node;
- GeditFileBrowserStore *model;
+ PlumaFileBrowserStore *model;
GSList *item;
gint num = 0;
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (tree_model),
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (tree_model),
FALSE);
g_return_val_if_fail (parent == NULL
|| parent->user_data != NULL, FALSE);
- model = GEDIT_FILE_BROWSER_STORE (tree_model);
+ model = PLUMA_FILE_BROWSER_STORE (tree_model);
if (parent == NULL)
node = model->priv->virtual_root;
@@ -880,19 +880,19 @@ gedit_file_browser_store_iter_nth_child (GtkTreeModel * tree_model,
}
static gboolean
-gedit_file_browser_store_iter_parent (GtkTreeModel * tree_model,
+pluma_file_browser_store_iter_parent (GtkTreeModel * tree_model,
GtkTreeIter * iter,
GtkTreeIter * child)
{
FileBrowserNode *node;
- GeditFileBrowserStore *model;
+ PlumaFileBrowserStore *model;
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (tree_model), FALSE);
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (tree_model), FALSE);
g_return_val_if_fail (child != NULL, FALSE);
g_return_val_if_fail (child->user_data != NULL, FALSE);
node = (FileBrowserNode *) (child->user_data);
- model = GEDIT_FILE_BROWSER_STORE (tree_model);
+ model = PLUMA_FILE_BROWSER_STORE (tree_model);
if (!node_in_tree (model, node))
return FALSE;
@@ -905,7 +905,7 @@ gedit_file_browser_store_iter_parent (GtkTreeModel * tree_model,
}
static void
-gedit_file_browser_store_row_inserted (GtkTreeModel * tree_model,
+pluma_file_browser_store_row_inserted (GtkTreeModel * tree_model,
GtkTreePath * path,
GtkTreeIter * iter)
{
@@ -915,11 +915,11 @@ gedit_file_browser_store_row_inserted (GtkTreeModel * tree_model,
}
static gboolean
-gedit_file_browser_store_row_draggable (GtkTreeDragSource * drag_source,
+pluma_file_browser_store_row_draggable (GtkTreeDragSource * drag_source,
GtkTreePath * path)
{
GtkTreeIter iter;
- GeditFileBrowserStoreFlag flags;
+ PlumaFileBrowserStoreFlag flags;
if (!gtk_tree_model_get_iter (GTK_TREE_MODEL (drag_source),
&iter, path))
@@ -928,21 +928,21 @@ gedit_file_browser_store_row_draggable (GtkTreeDragSource * drag_source,
}
gtk_tree_model_get (GTK_TREE_MODEL (drag_source), &iter,
- GEDIT_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags,
-1);
return !FILE_IS_DUMMY(flags);
}
static gboolean
-gedit_file_browser_store_drag_data_delete (GtkTreeDragSource * drag_source,
+pluma_file_browser_store_drag_data_delete (GtkTreeDragSource * drag_source,
GtkTreePath * path)
{
return FALSE;
}
static gboolean
-gedit_file_browser_store_drag_data_get (GtkTreeDragSource * drag_source,
+pluma_file_browser_store_drag_data_get (GtkTreeDragSource * drag_source,
GtkTreePath * path,
GtkSelectionData * selection_data)
{
@@ -958,7 +958,7 @@ gedit_file_browser_store_drag_data_get (GtkTreeDragSource * drag_source,
}
gtk_tree_model_get (GTK_TREE_MODEL (drag_source), &iter,
- GEDIT_FILE_BROWSER_STORE_COLUMN_URI, &uri,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_URI, &uri,
-1);
g_assert (uri);
@@ -971,12 +971,12 @@ gedit_file_browser_store_drag_data_get (GtkTreeDragSource * drag_source,
return ret;
}
-#define FILTER_HIDDEN(mode) (mode & GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN)
-#define FILTER_BINARY(mode) (mode & GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY)
+#define FILTER_HIDDEN(mode) (mode & PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN)
+#define FILTER_BINARY(mode) (mode & PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY)
/* Private */
static void
-model_begin_loading (GeditFileBrowserStore * model, FileBrowserNode * node)
+model_begin_loading (PlumaFileBrowserStore * model, FileBrowserNode * node)
{
GtkTreeIter iter;
@@ -985,7 +985,7 @@ model_begin_loading (GeditFileBrowserStore * model, FileBrowserNode * node)
}
static void
-model_end_loading (GeditFileBrowserStore * model, FileBrowserNode * node)
+model_end_loading (PlumaFileBrowserStore * model, FileBrowserNode * node)
{
GtkTreeIter iter;
@@ -994,19 +994,19 @@ model_end_loading (GeditFileBrowserStore * model, FileBrowserNode * node)
}
static void
-model_node_update_visibility (GeditFileBrowserStore * model,
+model_node_update_visibility (PlumaFileBrowserStore * model,
FileBrowserNode * node)
{
GtkTreeIter iter;
- node->flags &= ~GEDIT_FILE_BROWSER_STORE_FLAG_IS_FILTERED;
+ node->flags &= ~PLUMA_FILE_BROWSER_STORE_FLAG_IS_FILTERED;
if (FILTER_HIDDEN (model->priv->filter_mode) &&
NODE_IS_HIDDEN (node))
- node->flags |= GEDIT_FILE_BROWSER_STORE_FLAG_IS_FILTERED;
+ node->flags |= PLUMA_FILE_BROWSER_STORE_FLAG_IS_FILTERED;
else if (FILTER_BINARY (model->priv->filter_mode) &&
(!NODE_IS_TEXT (node) && !NODE_IS_DIR (node)))
- node->flags |= GEDIT_FILE_BROWSER_STORE_FLAG_IS_FILTERED;
+ node->flags |= PLUMA_FILE_BROWSER_STORE_FLAG_IS_FILTERED;
else if (model->priv->filter_func) {
iter.user_data = node;
@@ -1014,7 +1014,7 @@ model_node_update_visibility (GeditFileBrowserStore * model,
filter_func (model, &iter,
model->priv->filter_user_data))
node->flags |=
- GEDIT_FILE_BROWSER_STORE_FLAG_IS_FILTERED;
+ PLUMA_FILE_BROWSER_STORE_FLAG_IS_FILTERED;
}
}
@@ -1079,7 +1079,7 @@ model_sort_default (FileBrowserNode * node1, FileBrowserNode * node2)
}
static void
-model_resort_node (GeditFileBrowserStore * model, FileBrowserNode * node)
+model_resort_node (PlumaFileBrowserStore * model, FileBrowserNode * node)
{
FileBrowserNodeDir *dir;
GSList *item;
@@ -1121,7 +1121,7 @@ model_resort_node (GeditFileBrowserStore * model, FileBrowserNode * node)
iter.user_data = node->parent;
path =
- gedit_file_browser_store_get_path_real (model,
+ pluma_file_browser_store_get_path_real (model,
node->parent);
gtk_tree_model_rows_reordered (GTK_TREE_MODEL (model),
@@ -1133,7 +1133,7 @@ model_resort_node (GeditFileBrowserStore * model, FileBrowserNode * node)
}
static void
-row_changed (GeditFileBrowserStore * model,
+row_changed (PlumaFileBrowserStore * model,
GtkTreePath ** path,
GtkTreeIter * iter)
{
@@ -1149,7 +1149,7 @@ row_changed (GeditFileBrowserStore * model,
}
static void
-row_inserted (GeditFileBrowserStore * model,
+row_inserted (PlumaFileBrowserStore * model,
GtkTreePath ** path,
GtkTreeIter * iter)
{
@@ -1180,7 +1180,7 @@ row_inserted (GeditFileBrowserStore * model,
}
static void
-row_deleted (GeditFileBrowserStore * model,
+row_deleted (PlumaFileBrowserStore * model,
const GtkTreePath * path)
{
GtkTreePath *copy = gtk_tree_path_copy (path);
@@ -1192,7 +1192,7 @@ row_deleted (GeditFileBrowserStore * model,
}
static void
-model_refilter_node (GeditFileBrowserStore * model,
+model_refilter_node (PlumaFileBrowserStore * model,
FileBrowserNode * node,
GtkTreePath ** path)
{
@@ -1215,7 +1215,7 @@ model_refilter_node (GeditFileBrowserStore * model,
if (path == NULL)
{
if (in_tree)
- tmppath = gedit_file_browser_store_get_path_real (model,
+ tmppath = pluma_file_browser_store_get_path_real (model,
node);
else
tmppath = gtk_tree_path_new_first ();
@@ -1263,7 +1263,7 @@ model_refilter_node (GeditFileBrowserStore * model,
}
static void
-model_refilter (GeditFileBrowserStore * model)
+model_refilter (PlumaFileBrowserStore * model)
{
model_refilter_node (model, model->priv->root, NULL);
}
@@ -1274,7 +1274,7 @@ file_browser_node_set_name (FileBrowserNode * node)
g_free (node->name);
if (node->file) {
- node->name = gedit_file_browser_utils_file_basename (node->file);
+ node->name = pluma_file_browser_utils_file_basename (node->file);
} else {
node->name = NULL;
}
@@ -1302,7 +1302,7 @@ file_browser_node_new (GFile * file, FileBrowserNode * parent)
}
static FileBrowserNode *
-file_browser_node_dir_new (GeditFileBrowserStore * model,
+file_browser_node_dir_new (PlumaFileBrowserStore * model,
GFile * file, FileBrowserNode * parent)
{
FileBrowserNode *node =
@@ -1310,7 +1310,7 @@ file_browser_node_dir_new (GeditFileBrowserStore * model,
file_browser_node_init (node, file, parent);
- node->flags |= GEDIT_FILE_BROWSER_STORE_FLAG_IS_DIRECTORY;
+ node->flags |= PLUMA_FILE_BROWSER_STORE_FLAG_IS_DIRECTORY;
FILE_BROWSER_NODE_DIR (node)->model = model;
@@ -1318,7 +1318,7 @@ file_browser_node_dir_new (GeditFileBrowserStore * model,
}
static void
-file_browser_node_free_children (GeditFileBrowserStore * model,
+file_browser_node_free_children (PlumaFileBrowserStore * model,
FileBrowserNode * node)
{
GSList *item;
@@ -1337,12 +1337,12 @@ file_browser_node_free_children (GeditFileBrowserStore * model,
FILE_BROWSER_NODE_DIR (node)->children = NULL;
/* This node is no longer loaded */
- node->flags &= ~GEDIT_FILE_BROWSER_STORE_FLAG_LOADED;
+ node->flags &= ~PLUMA_FILE_BROWSER_STORE_FLAG_LOADED;
}
}
static void
-file_browser_node_free (GeditFileBrowserStore * model,
+file_browser_node_free (PlumaFileBrowserStore * model,
FileBrowserNode * node)
{
gchar *uri;
@@ -1399,7 +1399,7 @@ file_browser_node_free (GeditFileBrowserStore * model,
/**
* model_remove_node_children:
- * @model: the #GeditFileBrowserStore
+ * @model: the #PlumaFileBrowserStore
* @node: the FileBrowserNode to remove
* @path: the path of the node, or NULL to let the path be calculated
* @free_nodes: whether to also remove the nodes from memory
@@ -1409,7 +1409,7 @@ file_browser_node_free (GeditFileBrowserStore * model,
* a node.
**/
static void
-model_remove_node_children (GeditFileBrowserStore * model,
+model_remove_node_children (PlumaFileBrowserStore * model,
FileBrowserNode * node,
GtkTreePath * path,
gboolean free_nodes)
@@ -1438,7 +1438,7 @@ model_remove_node_children (GeditFileBrowserStore * model,
if (path == NULL)
path_child =
- gedit_file_browser_store_get_path_real (model, node);
+ pluma_file_browser_store_get_path_real (model, node);
else
path_child = gtk_tree_path_copy (path);
@@ -1457,7 +1457,7 @@ model_remove_node_children (GeditFileBrowserStore * model,
/**
* model_remove_node:
- * @model: the #GeditFileBrowserStore
+ * @model: the #PlumaFileBrowserStore
* @node: the FileBrowserNode to remove
* @path: the path to use to remove this node, or NULL to use the path
* calculated from the node itself
@@ -1468,7 +1468,7 @@ model_remove_node_children (GeditFileBrowserStore * model,
* a node.
**/
static void
-model_remove_node (GeditFileBrowserStore * model,
+model_remove_node (PlumaFileBrowserStore * model,
FileBrowserNode * node,
GtkTreePath * path,
gboolean free_nodes)
@@ -1478,7 +1478,7 @@ model_remove_node (GeditFileBrowserStore * model,
if (path == NULL) {
path =
- gedit_file_browser_store_get_path_real (model, node);
+ pluma_file_browser_store_get_path_real (model, node);
free_path = TRUE;
}
@@ -1519,7 +1519,7 @@ model_remove_node (GeditFileBrowserStore * model,
/**
* model_clear:
- * @model: the #GeditFileBrowserStore
+ * @model: the #PlumaFileBrowserStore
* @free_nodes: whether to also remove the nodes from memory
*
* Removes all nodes from the model. This function is used
@@ -1527,7 +1527,7 @@ model_remove_node (GeditFileBrowserStore * model,
* nodes in the model.
**/
static void
-model_clear (GeditFileBrowserStore * model, gboolean free_nodes)
+model_clear (PlumaFileBrowserStore * model, gboolean free_nodes)
{
GtkTreePath *path;
FileBrowserNodeDir *dir;
@@ -1558,7 +1558,7 @@ model_clear (GeditFileBrowserStore * model, gboolean free_nodes)
}
static void
-file_browser_node_unload (GeditFileBrowserStore * model,
+file_browser_node_unload (PlumaFileBrowserStore * model,
FileBrowserNode * node, gboolean remove_children)
{
FileBrowserNodeDir *dir;
@@ -1589,17 +1589,17 @@ file_browser_node_unload (GeditFileBrowserStore * model,
dir->monitor = NULL;
}
- node->flags &= ~GEDIT_FILE_BROWSER_STORE_FLAG_LOADED;
+ node->flags &= ~PLUMA_FILE_BROWSER_STORE_FLAG_LOADED;
}
static void
-model_recomposite_icon_real (GeditFileBrowserStore * tree_model,
+model_recomposite_icon_real (PlumaFileBrowserStore * tree_model,
FileBrowserNode * node,
GFileInfo * info)
{
GdkPixbuf *icon;
- g_return_if_fail (GEDIT_IS_FILE_BROWSER_STORE (tree_model));
+ g_return_if_fail (PLUMA_IS_FILE_BROWSER_STORE (tree_model));
g_return_if_fail (node != NULL);
if (node->file == NULL)
@@ -1608,11 +1608,11 @@ model_recomposite_icon_real (GeditFileBrowserStore * tree_model,
if (info) {
GIcon *gicon = g_file_info_get_icon (info);
if (gicon != NULL)
- icon = gedit_file_browser_utils_pixbuf_from_icon (gicon, GTK_ICON_SIZE_MENU);
+ icon = pluma_file_browser_utils_pixbuf_from_icon (gicon, GTK_ICON_SIZE_MENU);
else
icon = NULL;
} else {
- icon = gedit_file_browser_utils_pixbuf_from_file (node->file, GTK_ICON_SIZE_MENU);
+ icon = pluma_file_browser_utils_pixbuf_from_file (node->file, GTK_ICON_SIZE_MENU);
}
if (node->icon)
@@ -1645,10 +1645,10 @@ model_recomposite_icon_real (GeditFileBrowserStore * tree_model,
}
static void
-model_recomposite_icon (GeditFileBrowserStore * tree_model,
+model_recomposite_icon (PlumaFileBrowserStore * tree_model,
GtkTreeIter * iter)
{
- g_return_if_fail (GEDIT_IS_FILE_BROWSER_STORE (tree_model));
+ g_return_if_fail (PLUMA_IS_FILE_BROWSER_STORE (tree_model));
g_return_if_fail (iter != NULL);
g_return_if_fail (iter->user_data != NULL);
@@ -1658,7 +1658,7 @@ model_recomposite_icon (GeditFileBrowserStore * tree_model,
}
static FileBrowserNode *
-model_create_dummy_node (GeditFileBrowserStore * model,
+model_create_dummy_node (PlumaFileBrowserStore * model,
FileBrowserNode * parent)
{
FileBrowserNode *dummy;
@@ -1666,14 +1666,14 @@ model_create_dummy_node (GeditFileBrowserStore * model,
dummy = file_browser_node_new (NULL, parent);
dummy->name = g_strdup (_("(Empty)"));
- dummy->flags |= GEDIT_FILE_BROWSER_STORE_FLAG_IS_DUMMY;
- dummy->flags |= GEDIT_FILE_BROWSER_STORE_FLAG_IS_HIDDEN;
+ dummy->flags |= PLUMA_FILE_BROWSER_STORE_FLAG_IS_DUMMY;
+ dummy->flags |= PLUMA_FILE_BROWSER_STORE_FLAG_IS_HIDDEN;
return dummy;
}
static FileBrowserNode *
-model_add_dummy_node (GeditFileBrowserStore * model,
+model_add_dummy_node (PlumaFileBrowserStore * model,
FileBrowserNode * parent)
{
FileBrowserNode *dummy;
@@ -1681,7 +1681,7 @@ model_add_dummy_node (GeditFileBrowserStore * model,
dummy = model_create_dummy_node (model, parent);
if (model_node_visibility (model, parent))
- dummy->flags &= ~GEDIT_FILE_BROWSER_STORE_FLAG_IS_HIDDEN;
+ dummy->flags &= ~PLUMA_FILE_BROWSER_STORE_FLAG_IS_HIDDEN;
model_add_node (model, dummy, parent);
@@ -1689,7 +1689,7 @@ model_add_dummy_node (GeditFileBrowserStore * model,
}
static void
-model_check_dummy (GeditFileBrowserStore * model, FileBrowserNode * node)
+model_check_dummy (PlumaFileBrowserStore * model, FileBrowserNode * node)
{
// Hide the dummy child if needed
if (NODE_IS_DIR (node)) {
@@ -1715,24 +1715,24 @@ model_check_dummy (GeditFileBrowserStore * model, FileBrowserNode * node)
if (!model_node_visibility (model, node)) {
dummy->flags |=
- GEDIT_FILE_BROWSER_STORE_FLAG_IS_HIDDEN;
+ PLUMA_FILE_BROWSER_STORE_FLAG_IS_HIDDEN;
return;
}
/* Temporarily set the node to invisible to check
* for real children */
flags = dummy->flags;
- dummy->flags |= GEDIT_FILE_BROWSER_STORE_FLAG_IS_HIDDEN;
+ dummy->flags |= PLUMA_FILE_BROWSER_STORE_FLAG_IS_HIDDEN;
if (!filter_tree_model_iter_has_child_real (model, node)) {
dummy->flags &=
- ~GEDIT_FILE_BROWSER_STORE_FLAG_IS_HIDDEN;
+ ~PLUMA_FILE_BROWSER_STORE_FLAG_IS_HIDDEN;
if (FILE_IS_HIDDEN (flags)) {
// Was hidden, needs to be inserted
iter.user_data = dummy;
path =
- gedit_file_browser_store_get_path_real
+ pluma_file_browser_store_get_path_real
(model, dummy);
row_inserted (model, &path, &iter);
@@ -1744,12 +1744,12 @@ model_check_dummy (GeditFileBrowserStore * model, FileBrowserNode * node)
// To get the path we need to set it to visible temporarily
dummy->flags &=
- ~GEDIT_FILE_BROWSER_STORE_FLAG_IS_HIDDEN;
+ ~PLUMA_FILE_BROWSER_STORE_FLAG_IS_HIDDEN;
path =
- gedit_file_browser_store_get_path_real
+ pluma_file_browser_store_get_path_real
(model, dummy);
dummy->flags |=
- GEDIT_FILE_BROWSER_STORE_FLAG_IS_HIDDEN;
+ PLUMA_FILE_BROWSER_STORE_FLAG_IS_HIDDEN;
dummy->inserted = FALSE;
row_deleted (model, path);
@@ -1760,7 +1760,7 @@ model_check_dummy (GeditFileBrowserStore * model, FileBrowserNode * node)
}
static void
-insert_node_sorted (GeditFileBrowserStore * model,
+insert_node_sorted (PlumaFileBrowserStore * model,
FileBrowserNode * child,
FileBrowserNode * parent)
{
@@ -1779,7 +1779,7 @@ insert_node_sorted (GeditFileBrowserStore * model,
}
static void
-model_add_node (GeditFileBrowserStore * model, FileBrowserNode * child,
+model_add_node (PlumaFileBrowserStore * model, FileBrowserNode * child,
FileBrowserNode * parent)
{
/* Add child to parents children */
@@ -1791,7 +1791,7 @@ model_add_node (GeditFileBrowserStore * model, FileBrowserNode * child,
GtkTreePath *path;
iter.user_data = child;
- path = gedit_file_browser_store_get_path_real (model, child);
+ path = pluma_file_browser_store_get_path_real (model, child);
/* Emit row inserted */
row_inserted (model, &path, &iter);
@@ -1803,7 +1803,7 @@ model_add_node (GeditFileBrowserStore * model, FileBrowserNode * child,
}
static void
-model_add_nodes_batch (GeditFileBrowserStore * model,
+model_add_nodes_batch (PlumaFileBrowserStore * model,
GSList * children,
FileBrowserNode * parent)
{
@@ -1837,7 +1837,7 @@ model_add_nodes_batch (GeditFileBrowserStore * model,
if (model_node_visibility (model, parent) &&
model_node_visibility (model, l->data)) {
iter.user_data = l->data;
- path = gedit_file_browser_store_get_path_real (model, l->data);
+ path = pluma_file_browser_store_get_path_real (model, l->data);
// Emit row inserted
row_inserted (model, &path, &iter);
@@ -1868,7 +1868,7 @@ model_add_nodes_batch (GeditFileBrowserStore * model,
if (model_node_visibility (model, parent) &&
model_node_visibility (model, node)) {
iter.user_data = node;
- path = gedit_file_browser_store_get_path_real (model, node);
+ path = pluma_file_browser_store_get_path_real (model, node);
// Emit row inserted
row_inserted (model, &path, &iter);
@@ -1905,7 +1905,7 @@ backup_content_type (GFileInfo * info)
}
static void
-file_browser_node_set_from_info (GeditFileBrowserStore * model,
+file_browser_node_set_from_info (PlumaFileBrowserStore * model,
FileBrowserNode * node,
GFileInfo * info,
gboolean isadded)
@@ -1943,13 +1943,13 @@ file_browser_node_set_from_info (GeditFileBrowserStore * model,
name = g_file_info_get_name (info);
if (g_file_info_get_is_hidden (info) || g_file_info_get_is_backup (info))
- node->flags |= GEDIT_FILE_BROWSER_STORE_FLAG_IS_HIDDEN;
+ node->flags |= PLUMA_FILE_BROWSER_STORE_FLAG_IS_HIDDEN;
else if (dir != NULL && dir->hidden_file_hash != NULL &&
g_hash_table_lookup (dir->hidden_file_hash, name) != NULL)
- node->flags |= GEDIT_FILE_BROWSER_STORE_FLAG_IS_HIDDEN;
+ node->flags |= PLUMA_FILE_BROWSER_STORE_FLAG_IS_HIDDEN;
if (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY)
- node->flags |= GEDIT_FILE_BROWSER_STORE_FLAG_IS_DIRECTORY;
+ node->flags |= PLUMA_FILE_BROWSER_STORE_FLAG_IS_DIRECTORY;
else {
if (!(content = backup_content_type (info)))
content = g_file_info_get_content_type (info);
@@ -1957,7 +1957,7 @@ file_browser_node_set_from_info (GeditFileBrowserStore * model,
if (!content ||
g_content_type_is_unknown (content) ||
g_content_type_is_a (content, "text/plain"))
- node->flags |= GEDIT_FILE_BROWSER_STORE_FLAG_IS_TEXT;
+ node->flags |= PLUMA_FILE_BROWSER_STORE_FLAG_IS_TEXT;
}
model_recomposite_icon_real (model, node, info);
@@ -1966,7 +1966,7 @@ file_browser_node_set_from_info (GeditFileBrowserStore * model,
g_object_unref (info);
if (isadded) {
- path = gedit_file_browser_store_get_path_real (model, node);
+ path = pluma_file_browser_store_get_path_real (model, node);
model_refilter_node (model, node, &path);
gtk_tree_path_free (path);
@@ -1995,7 +1995,7 @@ node_list_contains_file (GSList *children, GFile * file)
}
static FileBrowserNode *
-model_add_node_from_file (GeditFileBrowserStore * model,
+model_add_node_from_file (PlumaFileBrowserStore * model,
FileBrowserNode * parent,
GFile * file,
GFileInfo * info)
@@ -2040,7 +2040,7 @@ model_add_node_from_file (GeditFileBrowserStore * model,
* not have to check if a file already exists among the ones we just
* added */
static void
-model_add_nodes_from_files (GeditFileBrowserStore * model,
+model_add_nodes_from_files (PlumaFileBrowserStore * model,
FileBrowserNode * parent,
GSList * original_children,
GList * files)
@@ -2098,7 +2098,7 @@ model_add_nodes_from_files (GeditFileBrowserStore * model,
}
static FileBrowserNode *
-model_add_node_from_dir (GeditFileBrowserStore * model,
+model_add_node_from_dir (PlumaFileBrowserStore * model,
FileBrowserNode * parent,
GFile * file)
{
@@ -2114,7 +2114,7 @@ model_add_node_from_dir (GeditFileBrowserStore * model,
}
if (node->icon == NULL) {
- node->icon = gedit_file_browser_utils_pixbuf_from_theme ("folder", GTK_ICON_SIZE_MENU);
+ node->icon = pluma_file_browser_utils_pixbuf_from_theme ("folder", GTK_ICON_SIZE_MENU);
}
model_add_node (model, node, parent);
@@ -2255,7 +2255,7 @@ model_iterate_next_files_cb (GFileEnumerator * enumerator,
/*
* FIXME: This is temporarly, it is a bug in gio:
- * http://bugzilla.mate.org/show_bug.cgi?id=565924
+ * http://bugzilla.gnome.org/show_bug.cgi?id=565924
*/
#ifndef G_OS_WIN32
if (g_file_is_native (parent->file) && dir->monitor == NULL) {
@@ -2284,7 +2284,7 @@ model_iterate_next_files_cb (GFileEnumerator * enumerator,
g_signal_emit (dir->model,
model_signals[ERROR],
0,
- GEDIT_FILE_BROWSER_ERROR_LOAD_DIRECTORY,
+ PLUMA_FILE_BROWSER_ERROR_LOAD_DIRECTORY,
error->message);
file_browser_node_unload (dir->model, (FileBrowserNode *)parent, TRUE);
@@ -2338,7 +2338,7 @@ model_iterate_children_cb (GFile * file,
g_signal_emit (dir->model,
model_signals[ERROR],
0,
- GEDIT_FILE_BROWSER_ERROR_LOAD_DIRECTORY,
+ PLUMA_FILE_BROWSER_ERROR_LOAD_DIRECTORY,
error->message);
file_browser_node_unload (dir->model, (FileBrowserNode *)dir, TRUE);
@@ -2350,7 +2350,7 @@ model_iterate_children_cb (GFile * file,
}
static void
-model_load_directory (GeditFileBrowserStore * model,
+model_load_directory (PlumaFileBrowserStore * model,
FileBrowserNode * node)
{
FileBrowserNodeDir *dir;
@@ -2365,7 +2365,7 @@ model_load_directory (GeditFileBrowserStore * model,
file_browser_node_unload (dir->model, node, TRUE);
}
- node->flags |= GEDIT_FILE_BROWSER_STORE_FLAG_LOADED;
+ node->flags |= PLUMA_FILE_BROWSER_STORE_FLAG_LOADED;
model_begin_loading (model, node);
/* Read the '.hidden' file first (if any) */
@@ -2389,7 +2389,7 @@ model_load_directory (GeditFileBrowserStore * model,
}
static GList *
-get_parent_files (GeditFileBrowserStore * model, GFile * file)
+get_parent_files (PlumaFileBrowserStore * model, GFile * file)
{
GList * result = NULL;
@@ -2408,7 +2408,7 @@ get_parent_files (GeditFileBrowserStore * model, GFile * file)
}
static void
-model_fill (GeditFileBrowserStore * model, FileBrowserNode * node,
+model_fill (PlumaFileBrowserStore * model, FileBrowserNode * node,
GtkTreePath ** path)
{
gboolean free_path = FALSE;
@@ -2424,7 +2424,7 @@ model_fill (GeditFileBrowserStore * model, FileBrowserNode * node,
if (*path == NULL) {
*path =
- gedit_file_browser_store_get_path_real (model, node);
+ pluma_file_browser_store_get_path_real (model, node);
free_path = TRUE;
}
@@ -2469,7 +2469,7 @@ model_fill (GeditFileBrowserStore * model, FileBrowserNode * node,
}
static void
-set_virtual_root_from_node (GeditFileBrowserStore * model,
+set_virtual_root_from_node (PlumaFileBrowserStore * model,
FileBrowserNode * node)
{
FileBrowserNode *next;
@@ -2537,7 +2537,7 @@ set_virtual_root_from_node (GeditFileBrowserStore * model,
}
} else if (NODE_IS_DUMMY (check)) {
check->flags |=
- GEDIT_FILE_BROWSER_STORE_FLAG_IS_HIDDEN;
+ PLUMA_FILE_BROWSER_STORE_FLAG_IS_HIDDEN;
}
}
@@ -2555,7 +2555,7 @@ set_virtual_root_from_node (GeditFileBrowserStore * model,
}
static void
-set_virtual_root_from_file (GeditFileBrowserStore * model,
+set_virtual_root_from_file (PlumaFileBrowserStore * model,
GFile * file)
{
GList * files;
@@ -2582,7 +2582,7 @@ set_virtual_root_from_file (GeditFileBrowserStore * model,
}
static FileBrowserNode *
-model_find_node_children (GeditFileBrowserStore * model,
+model_find_node_children (PlumaFileBrowserStore * model,
FileBrowserNode * parent,
GFile * file)
{
@@ -2609,7 +2609,7 @@ model_find_node_children (GeditFileBrowserStore * model,
}
static FileBrowserNode *
-model_find_node (GeditFileBrowserStore * model,
+model_find_node (PlumaFileBrowserStore * model,
FileBrowserNode * node,
GFile * file)
{
@@ -2626,12 +2626,12 @@ model_find_node (GeditFileBrowserStore * model,
}
static GQuark
-gedit_file_browser_store_error_quark (void)
+pluma_file_browser_store_error_quark (void)
{
static GQuark quark = 0;
if (G_UNLIKELY (quark == 0)) {
- quark = g_quark_from_string ("gedit_file_browser_store_error");
+ quark = g_quark_from_string ("pluma_file_browser_store_error");
}
return quark;
@@ -2662,32 +2662,32 @@ unique_new_name (GFile * directory, gchar const * name)
return newuri;
}
-static GeditFileBrowserStoreResult
-model_root_mounted (GeditFileBrowserStore * model, gchar const * virtual_root)
+static PlumaFileBrowserStoreResult
+model_root_mounted (PlumaFileBrowserStore * model, gchar const * virtual_root)
{
model_check_dummy (model, model->priv->root);
g_object_notify (G_OBJECT (model), "root");
if (virtual_root != NULL)
return
- gedit_file_browser_store_set_virtual_root_from_string
+ pluma_file_browser_store_set_virtual_root_from_string
(model, virtual_root);
else
set_virtual_root_from_node (model,
model->priv->root);
- return GEDIT_FILE_BROWSER_STORE_RESULT_OK;
+ return PLUMA_FILE_BROWSER_STORE_RESULT_OK;
}
static void
-handle_root_error (GeditFileBrowserStore * model, GError *error)
+handle_root_error (PlumaFileBrowserStore * model, GError *error)
{
FileBrowserNode * root;
g_signal_emit (model,
model_signals[ERROR],
0,
- GEDIT_FILE_BROWSER_ERROR_SET_ROOT,
+ PLUMA_FILE_BROWSER_ERROR_SET_ROOT,
error->message);
/* Set the virtual root to the root */
@@ -2695,7 +2695,7 @@ handle_root_error (GeditFileBrowserStore * model, GError *error)
model->priv->virtual_root = root;
/* Set the root to be loaded */
- root->flags |= GEDIT_FILE_BROWSER_STORE_FLAG_LOADED;
+ root->flags |= PLUMA_FILE_BROWSER_STORE_FLAG_LOADED;
/* Check the dummy */
model_check_dummy (model, root);
@@ -2711,7 +2711,7 @@ mount_cb (GFile * file,
{
gboolean mounted;
GError * error = NULL;
- GeditFileBrowserStore * model = mount_info->model;
+ PlumaFileBrowserStore * model = mount_info->model;
mounted = g_file_mount_enclosing_volume_finish (file, res, &error);
@@ -2745,8 +2745,8 @@ mount_cb (GFile * file,
g_free (mount_info);
}
-static GeditFileBrowserStoreResult
-model_mount_root (GeditFileBrowserStore * model, gchar const * virtual_root)
+static PlumaFileBrowserStoreResult
+model_mount_root (PlumaFileBrowserStore * model, gchar const * virtual_root)
{
GFileInfo * info;
GError * error = NULL;
@@ -2780,7 +2780,7 @@ model_mount_root (GeditFileBrowserStore * model, gchar const * virtual_root)
mount_info);
model->priv->mount_info = mount_info;
- return GEDIT_FILE_BROWSER_STORE_RESULT_MOUNTING;
+ return PLUMA_FILE_BROWSER_STORE_RESULT_MOUNTING;
}
else
{
@@ -2794,24 +2794,24 @@ model_mount_root (GeditFileBrowserStore * model, gchar const * virtual_root)
return model_root_mounted (model, virtual_root);
}
- return GEDIT_FILE_BROWSER_STORE_RESULT_OK;
+ return PLUMA_FILE_BROWSER_STORE_RESULT_OK;
}
/* Public */
-GeditFileBrowserStore *
-gedit_file_browser_store_new (gchar const *root)
+PlumaFileBrowserStore *
+pluma_file_browser_store_new (gchar const *root)
{
- GeditFileBrowserStore *obj =
- GEDIT_FILE_BROWSER_STORE (g_object_new
- (GEDIT_TYPE_FILE_BROWSER_STORE,
+ PlumaFileBrowserStore *obj =
+ PLUMA_FILE_BROWSER_STORE (g_object_new
+ (PLUMA_TYPE_FILE_BROWSER_STORE,
NULL));
- gedit_file_browser_store_set_root (obj, root);
+ pluma_file_browser_store_set_root (obj, root);
return obj;
}
void
-gedit_file_browser_store_set_value (GeditFileBrowserStore * tree_model,
+pluma_file_browser_store_set_value (PlumaFileBrowserStore * tree_model,
GtkTreeIter * iter, gint column,
GValue * value)
{
@@ -2819,9 +2819,9 @@ gedit_file_browser_store_set_value (GeditFileBrowserStore * tree_model,
FileBrowserNode *node;
GtkTreePath *path;
- g_return_if_fail (GEDIT_IS_FILE_BROWSER_STORE (tree_model));
+ g_return_if_fail (PLUMA_IS_FILE_BROWSER_STORE (tree_model));
g_return_if_fail (column ==
- GEDIT_FILE_BROWSER_STORE_COLUMN_EMBLEM);
+ PLUMA_FILE_BROWSER_STORE_COLUMN_EMBLEM);
g_return_if_fail (G_VALUE_HOLDS_OBJECT (value));
g_return_if_fail (iter != NULL);
g_return_if_fail (iter->user_data != NULL);
@@ -2844,23 +2844,23 @@ gedit_file_browser_store_set_value (GeditFileBrowserStore * tree_model,
model_recomposite_icon (tree_model, iter);
if (model_node_visibility (tree_model, node)) {
- path = gedit_file_browser_store_get_path (GTK_TREE_MODEL (tree_model),
+ path = pluma_file_browser_store_get_path (GTK_TREE_MODEL (tree_model),
iter);
row_changed (tree_model, &path, iter);
gtk_tree_path_free (path);
}
}
-GeditFileBrowserStoreResult
-gedit_file_browser_store_set_virtual_root (GeditFileBrowserStore * model,
+PlumaFileBrowserStoreResult
+pluma_file_browser_store_set_virtual_root (PlumaFileBrowserStore * model,
GtkTreeIter * iter)
{
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model),
- GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (model),
+ PLUMA_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
g_return_val_if_fail (iter != NULL,
- GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
+ PLUMA_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
g_return_val_if_fail (iter->user_data != NULL,
- GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
+ PLUMA_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
model_clear (model, FALSE);
set_virtual_root_from_node (model,
@@ -2869,25 +2869,25 @@ gedit_file_browser_store_set_virtual_root (GeditFileBrowserStore * model,
return TRUE;
}
-GeditFileBrowserStoreResult
-gedit_file_browser_store_set_virtual_root_from_string
- (GeditFileBrowserStore * model, gchar const *root) {
+PlumaFileBrowserStoreResult
+pluma_file_browser_store_set_virtual_root_from_string
+ (PlumaFileBrowserStore * model, gchar const *root) {
GFile *file;
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model),
- GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (model),
+ PLUMA_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
file = g_file_new_for_uri (root);
if (file == NULL) {
g_warning ("Invalid uri (%s)", root);
- return GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
+ return PLUMA_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
}
/* Check if uri is already the virtual root */
if (model->priv->virtual_root &&
g_file_equal (model->priv->virtual_root->file, file)) {
g_object_unref (file);
- return GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
+ return PLUMA_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
}
/* Check if uri is the root itself */
@@ -2897,7 +2897,7 @@ gedit_file_browser_store_set_virtual_root_from_string
/* Always clear the model before altering the nodes */
model_clear (model, FALSE);
set_virtual_root_from_node (model, model->priv->root);
- return GEDIT_FILE_BROWSER_STORE_RESULT_OK;
+ return PLUMA_FILE_BROWSER_STORE_RESULT_OK;
}
if (!g_file_has_prefix (file, model->priv->root->file)) {
@@ -2914,53 +2914,53 @@ gedit_file_browser_store_set_virtual_root_from_string
g_free (str1);
g_object_unref (file);
- return GEDIT_FILE_BROWSER_STORE_RESULT_ERROR;
+ return PLUMA_FILE_BROWSER_STORE_RESULT_ERROR;
}
set_virtual_root_from_file (model, file);
g_object_unref (file);
- return GEDIT_FILE_BROWSER_STORE_RESULT_OK;
+ return PLUMA_FILE_BROWSER_STORE_RESULT_OK;
}
-GeditFileBrowserStoreResult
-gedit_file_browser_store_set_virtual_root_top (GeditFileBrowserStore *
+PlumaFileBrowserStoreResult
+pluma_file_browser_store_set_virtual_root_top (PlumaFileBrowserStore *
model)
{
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model),
- GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (model),
+ PLUMA_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
if (model->priv->virtual_root == model->priv->root)
- return GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
+ return PLUMA_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
model_clear (model, FALSE);
set_virtual_root_from_node (model, model->priv->root);
- return GEDIT_FILE_BROWSER_STORE_RESULT_OK;
+ return PLUMA_FILE_BROWSER_STORE_RESULT_OK;
}
-GeditFileBrowserStoreResult
-gedit_file_browser_store_set_virtual_root_up (GeditFileBrowserStore *
+PlumaFileBrowserStoreResult
+pluma_file_browser_store_set_virtual_root_up (PlumaFileBrowserStore *
model)
{
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model),
- GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (model),
+ PLUMA_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
if (model->priv->virtual_root == model->priv->root)
- return GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
+ return PLUMA_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
model_clear (model, FALSE);
set_virtual_root_from_node (model,
model->priv->virtual_root->parent);
- return GEDIT_FILE_BROWSER_STORE_RESULT_OK;
+ return PLUMA_FILE_BROWSER_STORE_RESULT_OK;
}
gboolean
-gedit_file_browser_store_get_iter_virtual_root (GeditFileBrowserStore *
+pluma_file_browser_store_get_iter_virtual_root (PlumaFileBrowserStore *
model, GtkTreeIter * iter)
{
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model), FALSE);
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (model), FALSE);
g_return_val_if_fail (iter != NULL, FALSE);
if (model->priv->virtual_root == NULL)
@@ -2971,10 +2971,10 @@ gedit_file_browser_store_get_iter_virtual_root (GeditFileBrowserStore *
}
gboolean
-gedit_file_browser_store_get_iter_root (GeditFileBrowserStore * model,
+pluma_file_browser_store_get_iter_root (PlumaFileBrowserStore * model,
GtkTreeIter * iter)
{
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model), FALSE);
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (model), FALSE);
g_return_val_if_fail (iter != NULL, FALSE);
if (model->priv->root == NULL)
@@ -2985,11 +2985,11 @@ gedit_file_browser_store_get_iter_root (GeditFileBrowserStore * model,
}
gboolean
-gedit_file_browser_store_iter_equal (GeditFileBrowserStore * model,
+pluma_file_browser_store_iter_equal (PlumaFileBrowserStore * model,
GtkTreeIter * iter1,
GtkTreeIter * iter2)
{
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model), FALSE);
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (model), FALSE);
g_return_val_if_fail (iter1 != NULL, FALSE);
g_return_val_if_fail (iter2 != NULL, FALSE);
g_return_val_if_fail (iter1->user_data != NULL, FALSE);
@@ -2999,15 +2999,15 @@ gedit_file_browser_store_iter_equal (GeditFileBrowserStore * model,
}
void
-gedit_file_browser_store_cancel_mount_operation (GeditFileBrowserStore *store)
+pluma_file_browser_store_cancel_mount_operation (PlumaFileBrowserStore *store)
{
- g_return_if_fail (GEDIT_IS_FILE_BROWSER_STORE (store));
+ g_return_if_fail (PLUMA_IS_FILE_BROWSER_STORE (store));
cancel_mount_operation (store);
}
-GeditFileBrowserStoreResult
-gedit_file_browser_store_set_root_and_virtual_root (GeditFileBrowserStore *
+PlumaFileBrowserStoreResult
+pluma_file_browser_store_set_root_and_virtual_root (PlumaFileBrowserStore *
model,
gchar const *root,
gchar const *virtual_root)
@@ -3017,11 +3017,11 @@ gedit_file_browser_store_set_root_and_virtual_root (GeditFileBrowserStore *
FileBrowserNode * node;
gboolean equal = FALSE;
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model),
- GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (model),
+ PLUMA_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
if (root == NULL && model->priv->root == NULL)
- return GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
+ return PLUMA_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
if (root != NULL) {
file = g_file_new_for_uri (root);
@@ -3032,7 +3032,7 @@ gedit_file_browser_store_set_root_and_virtual_root (GeditFileBrowserStore *
if (equal && virtual_root == NULL) {
g_object_unref (file);
- return GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
+ return PLUMA_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
}
}
@@ -3044,7 +3044,7 @@ gedit_file_browser_store_set_root_and_virtual_root (GeditFileBrowserStore *
g_object_unref (file);
g_object_unref (vfile);
- return GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
+ return PLUMA_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
}
g_object_unref (vfile);
@@ -3073,24 +3073,24 @@ gedit_file_browser_store_set_root_and_virtual_root (GeditFileBrowserStore *
g_object_notify (G_OBJECT (model), "virtual-root");
}
- return GEDIT_FILE_BROWSER_STORE_RESULT_OK;
+ return PLUMA_FILE_BROWSER_STORE_RESULT_OK;
}
-GeditFileBrowserStoreResult
-gedit_file_browser_store_set_root (GeditFileBrowserStore * model,
+PlumaFileBrowserStoreResult
+pluma_file_browser_store_set_root (PlumaFileBrowserStore * model,
gchar const *root)
{
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model),
- GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
- return gedit_file_browser_store_set_root_and_virtual_root (model,
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (model),
+ PLUMA_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
+ return pluma_file_browser_store_set_root_and_virtual_root (model,
root,
NULL);
}
gchar *
-gedit_file_browser_store_get_root (GeditFileBrowserStore * model)
+pluma_file_browser_store_get_root (PlumaFileBrowserStore * model)
{
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model), NULL);
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (model), NULL);
if (model->priv->root == NULL || model->priv->root->file == NULL)
return NULL;
@@ -3099,9 +3099,9 @@ gedit_file_browser_store_get_root (GeditFileBrowserStore * model)
}
gchar *
-gedit_file_browser_store_get_virtual_root (GeditFileBrowserStore * model)
+pluma_file_browser_store_get_virtual_root (PlumaFileBrowserStore * model)
{
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model), NULL);
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (model), NULL);
if (model->priv->virtual_root == NULL || model->priv->virtual_root->file == NULL)
return NULL;
@@ -3110,12 +3110,12 @@ gedit_file_browser_store_get_virtual_root (GeditFileBrowserStore * model)
}
void
-_gedit_file_browser_store_iter_expanded (GeditFileBrowserStore * model,
+_pluma_file_browser_store_iter_expanded (PlumaFileBrowserStore * model,
GtkTreeIter * iter)
{
FileBrowserNode *node;
- g_return_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model));
+ g_return_if_fail (PLUMA_IS_FILE_BROWSER_STORE (model));
g_return_if_fail (iter != NULL);
g_return_if_fail (iter->user_data != NULL);
@@ -3128,13 +3128,13 @@ _gedit_file_browser_store_iter_expanded (GeditFileBrowserStore * model,
}
void
-_gedit_file_browser_store_iter_collapsed (GeditFileBrowserStore * model,
+_pluma_file_browser_store_iter_collapsed (PlumaFileBrowserStore * model,
GtkTreeIter * iter)
{
FileBrowserNode *node;
GSList *item;
- g_return_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model));
+ g_return_if_fail (PLUMA_IS_FILE_BROWSER_STORE (model));
g_return_if_fail (iter != NULL);
g_return_if_fail (iter->user_data != NULL);
@@ -3156,18 +3156,18 @@ _gedit_file_browser_store_iter_collapsed (GeditFileBrowserStore * model,
}
}
-GeditFileBrowserStoreFilterMode
-gedit_file_browser_store_get_filter_mode (GeditFileBrowserStore * model)
+PlumaFileBrowserStoreFilterMode
+pluma_file_browser_store_get_filter_mode (PlumaFileBrowserStore * model)
{
return model->priv->filter_mode;
}
void
-gedit_file_browser_store_set_filter_mode (GeditFileBrowserStore * model,
- GeditFileBrowserStoreFilterMode
+pluma_file_browser_store_set_filter_mode (PlumaFileBrowserStore * model,
+ PlumaFileBrowserStoreFilterMode
mode)
{
- g_return_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model));
+ g_return_if_fail (PLUMA_IS_FILE_BROWSER_STORE (model));
if (model->priv->filter_mode == mode)
return;
@@ -3179,11 +3179,11 @@ gedit_file_browser_store_set_filter_mode (GeditFileBrowserStore * model,
}
void
-gedit_file_browser_store_set_filter_func (GeditFileBrowserStore * model,
- GeditFileBrowserStoreFilterFunc
+pluma_file_browser_store_set_filter_func (PlumaFileBrowserStore * model,
+ PlumaFileBrowserStoreFilterFunc
func, gpointer user_data)
{
- g_return_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model));
+ g_return_if_fail (PLUMA_IS_FILE_BROWSER_STORE (model));
model->priv->filter_func = func;
model->priv->filter_user_data = user_data;
@@ -3191,21 +3191,21 @@ gedit_file_browser_store_set_filter_func (GeditFileBrowserStore * model,
}
void
-gedit_file_browser_store_refilter (GeditFileBrowserStore * model)
+pluma_file_browser_store_refilter (PlumaFileBrowserStore * model)
{
model_refilter (model);
}
-GeditFileBrowserStoreFilterMode
-gedit_file_browser_store_filter_mode_get_default (void)
+PlumaFileBrowserStoreFilterMode
+pluma_file_browser_store_filter_mode_get_default (void)
{
- return GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN;
+ return PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN;
}
void
-gedit_file_browser_store_refresh (GeditFileBrowserStore * model)
+pluma_file_browser_store_refresh (PlumaFileBrowserStore * model)
{
- g_return_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model));
+ g_return_if_fail (PLUMA_IS_FILE_BROWSER_STORE (model));
if (model->priv->root == NULL || model->priv->virtual_root == NULL)
return;
@@ -3248,7 +3248,7 @@ reparent_node (FileBrowserNode * node, gboolean reparent)
}
gboolean
-gedit_file_browser_store_rename (GeditFileBrowserStore * model,
+pluma_file_browser_store_rename (PlumaFileBrowserStore * model,
GtkTreeIter * iter,
const gchar * new_name,
GError ** error)
@@ -3262,7 +3262,7 @@ gedit_file_browser_store_rename (GeditFileBrowserStore * model,
gchar * newuri;
GtkTreePath *path;
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model), FALSE);
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (model), FALSE);
g_return_val_if_fail (iter != NULL, FALSE);
g_return_val_if_fail (iter->user_data != NULL, FALSE);
@@ -3290,7 +3290,7 @@ gedit_file_browser_store_rename (GeditFileBrowserStore * model,
reparent_node (node, FALSE);
if (model_node_visibility (model, node)) {
- path = gedit_file_browser_store_get_path_real (model, node);
+ path = pluma_file_browser_store_get_path_real (model, node);
row_changed (model, &path, iter);
gtk_tree_path_free (path);
@@ -3300,8 +3300,8 @@ gedit_file_browser_store_rename (GeditFileBrowserStore * model,
g_object_unref (previous);
if (error != NULL)
- *error = g_error_new_literal (gedit_file_browser_store_error_quark (),
- GEDIT_FILE_BROWSER_ERROR_RENAME,
+ *error = g_error_new_literal (pluma_file_browser_store_error_quark (),
+ PLUMA_FILE_BROWSER_ERROR_RENAME,
_("The renamed file is currently filtered out. You need to adjust your filter settings to make the file visible"));
return FALSE;
}
@@ -3323,8 +3323,8 @@ gedit_file_browser_store_rename (GeditFileBrowserStore * model,
if (error != NULL) {
*error =
g_error_new_literal
- (gedit_file_browser_store_error_quark (),
- GEDIT_FILE_BROWSER_ERROR_RENAME,
+ (pluma_file_browser_store_error_quark (),
+ PLUMA_FILE_BROWSER_ERROR_RENAME,
err->message);
}
@@ -3360,7 +3360,7 @@ emit_no_trash (AsyncData * data)
}
typedef struct {
- GeditFileBrowserStore * model;
+ PlumaFileBrowserStore * model;
GFile * file;
} IdleDelete;
@@ -3433,8 +3433,8 @@ delete_files (GIOSchedulerJob * job,
return TRUE;
}
-GeditFileBrowserStoreResult
-gedit_file_browser_store_delete_all (GeditFileBrowserStore *model,
+PlumaFileBrowserStoreResult
+pluma_file_browser_store_delete_all (PlumaFileBrowserStore *model,
GList *rows, gboolean trash)
{
FileBrowserNode * node;
@@ -3445,10 +3445,10 @@ gedit_file_browser_store_delete_all (GeditFileBrowserStore *model,
GtkTreePath * prev = NULL;
GtkTreePath * path;
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model), GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (model), PLUMA_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
if (rows == NULL)
- return GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
+ return PLUMA_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
/* First we sort the paths so that we can later on remove any
files/directories that are actually subfiles/directories of
@@ -3490,28 +3490,28 @@ gedit_file_browser_store_delete_all (GeditFileBrowserStore *model,
data->cancellable);
g_list_free (rows);
- return GEDIT_FILE_BROWSER_STORE_RESULT_OK;
+ return PLUMA_FILE_BROWSER_STORE_RESULT_OK;
}
-GeditFileBrowserStoreResult
-gedit_file_browser_store_delete (GeditFileBrowserStore * model,
+PlumaFileBrowserStoreResult
+pluma_file_browser_store_delete (PlumaFileBrowserStore * model,
GtkTreeIter * iter, gboolean trash)
{
FileBrowserNode *node;
GList *rows = NULL;
- GeditFileBrowserStoreResult result;
+ PlumaFileBrowserStoreResult result;
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model), GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
- g_return_val_if_fail (iter != NULL, GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
- g_return_val_if_fail (iter->user_data != NULL, GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (model), PLUMA_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
+ g_return_val_if_fail (iter != NULL, PLUMA_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
+ g_return_val_if_fail (iter->user_data != NULL, PLUMA_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
node = (FileBrowserNode *) (iter->user_data);
if (NODE_IS_DUMMY (node))
- return GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
+ return PLUMA_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
- rows = g_list_append(NULL, gedit_file_browser_store_get_path_real (model, node));
- result = gedit_file_browser_store_delete_all (model, rows, trash);
+ rows = g_list_append(NULL, pluma_file_browser_store_get_path_real (model, node));
+ result = pluma_file_browser_store_delete_all (model, rows, trash);
g_list_foreach (rows, (GFunc)gtk_tree_path_free, NULL);
g_list_free (rows);
@@ -3520,7 +3520,7 @@ gedit_file_browser_store_delete (GeditFileBrowserStore * model,
}
gboolean
-gedit_file_browser_store_new_file (GeditFileBrowserStore * model,
+pluma_file_browser_store_new_file (PlumaFileBrowserStore * model,
GtkTreeIter * parent,
GtkTreeIter * iter)
{
@@ -3531,7 +3531,7 @@ gedit_file_browser_store_new_file (GeditFileBrowserStore * model,
FileBrowserNode *node;
GError * error = NULL;
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model), FALSE);
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (model), FALSE);
g_return_val_if_fail (parent != NULL, FALSE);
g_return_val_if_fail (parent->user_data != NULL, FALSE);
g_return_val_if_fail (NODE_IS_DIR
@@ -3548,7 +3548,7 @@ gedit_file_browser_store_new_file (GeditFileBrowserStore * model,
if (!stream)
{
g_signal_emit (model, model_signals[ERROR], 0,
- GEDIT_FILE_BROWSER_ERROR_NEW_FILE,
+ PLUMA_FILE_BROWSER_ERROR_NEW_FILE,
error->message);
g_error_free (error);
} else {
@@ -3563,7 +3563,7 @@ gedit_file_browser_store_new_file (GeditFileBrowserStore * model,
result = TRUE;
} else {
g_signal_emit (model, model_signals[ERROR], 0,
- GEDIT_FILE_BROWSER_ERROR_NEW_FILE,
+ PLUMA_FILE_BROWSER_ERROR_NEW_FILE,
_
("The new file is currently filtered out. You need to adjust your filter settings to make the file visible"));
}
@@ -3574,7 +3574,7 @@ gedit_file_browser_store_new_file (GeditFileBrowserStore * model,
}
gboolean
-gedit_file_browser_store_new_directory (GeditFileBrowserStore * model,
+pluma_file_browser_store_new_directory (PlumaFileBrowserStore * model,
GtkTreeIter * parent,
GtkTreeIter * iter)
{
@@ -3584,7 +3584,7 @@ gedit_file_browser_store_new_directory (GeditFileBrowserStore * model,
FileBrowserNode *node;
gboolean result = FALSE;
- g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model), FALSE);
+ g_return_val_if_fail (PLUMA_IS_FILE_BROWSER_STORE (model), FALSE);
g_return_val_if_fail (parent != NULL, FALSE);
g_return_val_if_fail (parent->user_data != NULL, FALSE);
g_return_val_if_fail (NODE_IS_DIR
@@ -3598,7 +3598,7 @@ gedit_file_browser_store_new_directory (GeditFileBrowserStore * model,
if (!g_file_make_directory (file, NULL, &error)) {
g_signal_emit (model, model_signals[ERROR], 0,
- GEDIT_FILE_BROWSER_ERROR_NEW_DIRECTORY,
+ PLUMA_FILE_BROWSER_ERROR_NEW_DIRECTORY,
error->message);
g_error_free (error);
} else {
@@ -3612,7 +3612,7 @@ gedit_file_browser_store_new_directory (GeditFileBrowserStore * model,
result = TRUE;
} else {
g_signal_emit (model, model_signals[ERROR], 0,
- GEDIT_FILE_BROWSER_ERROR_NEW_FILE,
+ PLUMA_FILE_BROWSER_ERROR_NEW_FILE,
_
("The new directory is currently filtered out. You need to adjust your filter settings to make the directory visible"));
}
diff --git a/plugins/filebrowser/pluma-file-browser-store.h b/plugins/filebrowser/pluma-file-browser-store.h
new file mode 100755
index 00000000..65b75e08
--- /dev/null
+++ b/plugins/filebrowser/pluma-file-browser-store.h
@@ -0,0 +1,200 @@
+/*
+ * pluma-file-browser-store.h - Pluma plugin providing easy file access
+ * from the sidepanel
+ *
+ * Copyright (C) 2006 - Jesse van den Kieboom <[email protected]>
+ *
+ * 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __PLUMA_FILE_BROWSER_STORE_H__
+#define __PLUMA_FILE_BROWSER_STORE_H__
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+#define PLUMA_TYPE_FILE_BROWSER_STORE (pluma_file_browser_store_get_type ())
+#define PLUMA_FILE_BROWSER_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PLUMA_TYPE_FILE_BROWSER_STORE, PlumaFileBrowserStore))
+#define PLUMA_FILE_BROWSER_STORE_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PLUMA_TYPE_FILE_BROWSER_STORE, PlumaFileBrowserStore const))
+#define PLUMA_FILE_BROWSER_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PLUMA_TYPE_FILE_BROWSER_STORE, PlumaFileBrowserStoreClass))
+#define PLUMA_IS_FILE_BROWSER_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PLUMA_TYPE_FILE_BROWSER_STORE))
+#define PLUMA_IS_FILE_BROWSER_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PLUMA_TYPE_FILE_BROWSER_STORE))
+#define PLUMA_FILE_BROWSER_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PLUMA_TYPE_FILE_BROWSER_STORE, PlumaFileBrowserStoreClass))
+
+typedef enum
+{
+ PLUMA_FILE_BROWSER_STORE_COLUMN_ICON = 0,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_NAME,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_URI,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_FLAGS,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_EMBLEM,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_NUM
+} PlumaFileBrowserStoreColumn;
+
+typedef enum
+{
+ PLUMA_FILE_BROWSER_STORE_FLAG_IS_DIRECTORY = 1 << 0,
+ PLUMA_FILE_BROWSER_STORE_FLAG_IS_HIDDEN = 1 << 1,
+ PLUMA_FILE_BROWSER_STORE_FLAG_IS_TEXT = 1 << 2,
+ PLUMA_FILE_BROWSER_STORE_FLAG_LOADED = 1 << 3,
+ PLUMA_FILE_BROWSER_STORE_FLAG_IS_FILTERED = 1 << 4,
+ PLUMA_FILE_BROWSER_STORE_FLAG_IS_DUMMY = 1 << 5
+} PlumaFileBrowserStoreFlag;
+
+typedef enum
+{
+ PLUMA_FILE_BROWSER_STORE_RESULT_OK,
+ PLUMA_FILE_BROWSER_STORE_RESULT_NO_CHANGE,
+ PLUMA_FILE_BROWSER_STORE_RESULT_ERROR,
+ PLUMA_FILE_BROWSER_STORE_RESULT_NO_TRASH,
+ PLUMA_FILE_BROWSER_STORE_RESULT_MOUNTING,
+ PLUMA_FILE_BROWSER_STORE_RESULT_NUM
+} PlumaFileBrowserStoreResult;
+
+typedef enum
+{
+ PLUMA_FILE_BROWSER_STORE_FILTER_MODE_NONE = 0,
+ PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN = 1 << 0,
+ PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY = 1 << 1
+} PlumaFileBrowserStoreFilterMode;
+
+#define FILE_IS_DIR(flags) (flags & PLUMA_FILE_BROWSER_STORE_FLAG_IS_DIRECTORY)
+#define FILE_IS_HIDDEN(flags) (flags & PLUMA_FILE_BROWSER_STORE_FLAG_IS_HIDDEN)
+#define FILE_IS_TEXT(flags) (flags & PLUMA_FILE_BROWSER_STORE_FLAG_IS_TEXT)
+#define FILE_LOADED(flags) (flags & PLUMA_FILE_BROWSER_STORE_FLAG_LOADED)
+#define FILE_IS_FILTERED(flags) (flags & PLUMA_FILE_BROWSER_STORE_FLAG_IS_FILTERED)
+#define FILE_IS_DUMMY(flags) (flags & PLUMA_FILE_BROWSER_STORE_FLAG_IS_DUMMY)
+
+typedef struct _PlumaFileBrowserStore PlumaFileBrowserStore;
+typedef struct _PlumaFileBrowserStoreClass PlumaFileBrowserStoreClass;
+typedef struct _PlumaFileBrowserStorePrivate PlumaFileBrowserStorePrivate;
+
+typedef gboolean (*PlumaFileBrowserStoreFilterFunc) (PlumaFileBrowserStore
+ * model,
+ GtkTreeIter * iter,
+ gpointer user_data);
+
+struct _PlumaFileBrowserStore
+{
+ GObject parent;
+
+ PlumaFileBrowserStorePrivate *priv;
+};
+
+struct _PlumaFileBrowserStoreClass {
+ GObjectClass parent_class;
+
+ /* Signals */
+ void (*begin_loading) (PlumaFileBrowserStore * model,
+ GtkTreeIter * iter);
+ void (*end_loading) (PlumaFileBrowserStore * model,
+ GtkTreeIter * iter);
+ void (*error) (PlumaFileBrowserStore * model,
+ guint code,
+ gchar * message);
+ gboolean (*no_trash) (PlumaFileBrowserStore * model,
+ GList * files);
+ void (*rename) (PlumaFileBrowserStore * model,
+ const gchar * olduri,
+ const gchar * newuri);
+ void (*begin_refresh) (PlumaFileBrowserStore * model);
+ void (*end_refresh) (PlumaFileBrowserStore * model);
+ void (*unload) (PlumaFileBrowserStore * model,
+ const gchar * uri);
+};
+
+GType pluma_file_browser_store_get_type (void) G_GNUC_CONST;
+GType pluma_file_browser_store_register_type (GTypeModule * module);
+
+PlumaFileBrowserStore *pluma_file_browser_store_new (gchar const *root);
+
+PlumaFileBrowserStoreResult
+pluma_file_browser_store_set_root_and_virtual_root (PlumaFileBrowserStore * model,
+ gchar const *root,
+ gchar const *virtual_root);
+PlumaFileBrowserStoreResult
+pluma_file_browser_store_set_root (PlumaFileBrowserStore * model,
+ gchar const *root);
+PlumaFileBrowserStoreResult
+pluma_file_browser_store_set_virtual_root (PlumaFileBrowserStore * model,
+ GtkTreeIter * iter);
+PlumaFileBrowserStoreResult
+pluma_file_browser_store_set_virtual_root_from_string (PlumaFileBrowserStore * model,
+ gchar const *root);
+PlumaFileBrowserStoreResult
+pluma_file_browser_store_set_virtual_root_up (PlumaFileBrowserStore * model);
+PlumaFileBrowserStoreResult
+pluma_file_browser_store_set_virtual_root_top (PlumaFileBrowserStore * model);
+
+gboolean
+pluma_file_browser_store_get_iter_virtual_root (PlumaFileBrowserStore * model,
+ GtkTreeIter * iter);
+gboolean pluma_file_browser_store_get_iter_root (PlumaFileBrowserStore * model,
+ GtkTreeIter * iter);
+gchar * pluma_file_browser_store_get_root (PlumaFileBrowserStore * model);
+gchar * pluma_file_browser_store_get_virtual_root (PlumaFileBrowserStore * model);
+
+gboolean pluma_file_browser_store_iter_equal (PlumaFileBrowserStore * model,
+ GtkTreeIter * iter1,
+ GtkTreeIter * iter2);
+
+void pluma_file_browser_store_set_value (PlumaFileBrowserStore * tree_model,
+ GtkTreeIter * iter,
+ gint column,
+ GValue * value);
+
+void _pluma_file_browser_store_iter_expanded (PlumaFileBrowserStore * model,
+ GtkTreeIter * iter);
+void _pluma_file_browser_store_iter_collapsed (PlumaFileBrowserStore * model,
+ GtkTreeIter * iter);
+
+PlumaFileBrowserStoreFilterMode
+pluma_file_browser_store_get_filter_mode (PlumaFileBrowserStore * model);
+void pluma_file_browser_store_set_filter_mode (PlumaFileBrowserStore * model,
+ PlumaFileBrowserStoreFilterMode mode);
+void pluma_file_browser_store_set_filter_func (PlumaFileBrowserStore * model,
+ PlumaFileBrowserStoreFilterFunc func,
+ gpointer user_data);
+void pluma_file_browser_store_refilter (PlumaFileBrowserStore * model);
+PlumaFileBrowserStoreFilterMode
+pluma_file_browser_store_filter_mode_get_default (void);
+
+void pluma_file_browser_store_refresh (PlumaFileBrowserStore * model);
+gboolean pluma_file_browser_store_rename (PlumaFileBrowserStore * model,
+ GtkTreeIter * iter,
+ gchar const *new_name,
+ GError ** error);
+PlumaFileBrowserStoreResult
+pluma_file_browser_store_delete (PlumaFileBrowserStore * model,
+ GtkTreeIter * iter,
+ gboolean trash);
+PlumaFileBrowserStoreResult
+pluma_file_browser_store_delete_all (PlumaFileBrowserStore * model,
+ GList *rows,
+ gboolean trash);
+
+gboolean pluma_file_browser_store_new_file (PlumaFileBrowserStore * model,
+ GtkTreeIter * parent,
+ GtkTreeIter * iter);
+gboolean pluma_file_browser_store_new_directory (PlumaFileBrowserStore * model,
+ GtkTreeIter * parent,
+ GtkTreeIter * iter);
+
+void pluma_file_browser_store_cancel_mount_operation (PlumaFileBrowserStore *store);
+
+G_END_DECLS
+#endif /* __PLUMA_FILE_BROWSER_STORE_H__ */
+
+// ex:ts=8:noet:
diff --git a/plugins/filebrowser/gedit-file-browser-utils.c b/plugins/filebrowser/pluma-file-browser-utils.c
index d8f4028a..6949486d 100755
--- a/plugins/filebrowser/gedit-file-browser-utils.c
+++ b/plugins/filebrowser/pluma-file-browser-utils.c
@@ -1,5 +1,5 @@
/*
- * gedit-file-bookmarks-store.c - Gedit plugin providing easy file access
+ * pluma-file-bookmarks-store.c - Pluma plugin providing easy file access
* from the sidepanel
*
* Copyright (C) 2006 - Jesse van den Kieboom <[email protected]>
@@ -19,8 +19,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "gedit-file-browser-utils.h"
-#include <gedit/gedit-utils.h>
+#include "pluma-file-browser-utils.h"
+#include <pluma/pluma-utils.h>
static GdkPixbuf *
process_icon_pixbuf (GdkPixbuf * pixbuf,
@@ -50,7 +50,7 @@ process_icon_pixbuf (GdkPixbuf * pixbuf,
}
GdkPixbuf *
-gedit_file_browser_utils_pixbuf_from_theme (gchar const * name,
+pluma_file_browser_utils_pixbuf_from_theme (gchar const * name,
GtkIconSize size)
{
gint width;
@@ -71,7 +71,7 @@ gedit_file_browser_utils_pixbuf_from_theme (gchar const * name,
}
GdkPixbuf *
-gedit_file_browser_utils_pixbuf_from_icon (GIcon * icon,
+pluma_file_browser_utils_pixbuf_from_icon (GIcon * icon,
GtkIconSize size)
{
GdkPixbuf * ret = NULL;
@@ -100,7 +100,7 @@ gedit_file_browser_utils_pixbuf_from_icon (GIcon * icon,
}
GdkPixbuf *
-gedit_file_browser_utils_pixbuf_from_file (GFile * file,
+pluma_file_browser_utils_pixbuf_from_file (GFile * file,
GtkIconSize size)
{
GIcon * icon;
@@ -118,7 +118,7 @@ gedit_file_browser_utils_pixbuf_from_file (GFile * file,
icon = g_file_info_get_icon (info);
if (icon != NULL)
- ret = gedit_file_browser_utils_pixbuf_from_icon (icon, size);
+ ret = pluma_file_browser_utils_pixbuf_from_icon (icon, size);
g_object_unref (info);
@@ -126,26 +126,26 @@ gedit_file_browser_utils_pixbuf_from_file (GFile * file,
}
gchar *
-gedit_file_browser_utils_file_basename (GFile * file)
+pluma_file_browser_utils_file_basename (GFile * file)
{
gchar *uri;
gchar *ret;
uri = g_file_get_uri (file);
- ret = gedit_file_browser_utils_uri_basename (uri);
+ ret = pluma_file_browser_utils_uri_basename (uri);
g_free (uri);
return ret;
}
gchar *
-gedit_file_browser_utils_uri_basename (gchar const * uri)
+pluma_file_browser_utils_uri_basename (gchar const * uri)
{
- return gedit_utils_basename_for_display (uri);
+ return pluma_utils_basename_for_display (uri);
}
gboolean
-gedit_file_browser_utils_confirmation_dialog (GeditWindow * window,
+pluma_file_browser_utils_confirmation_dialog (PlumaWindow * window,
GtkMessageType type,
gchar const *message,
gchar const *secondary,
diff --git a/plugins/filebrowser/gedit-file-browser-utils.h b/plugins/filebrowser/pluma-file-browser-utils.h
index fc9acbce..0ac4296a 100755
--- a/plugins/filebrowser/gedit-file-browser-utils.h
+++ b/plugins/filebrowser/pluma-file-browser-utils.h
@@ -1,27 +1,27 @@
-#ifndef __GEDIT_FILE_BROWSER_UTILS_H__
-#define __GEDIT_FILE_BROWSER_UTILS_H__
+#ifndef __PLUMA_FILE_BROWSER_UTILS_H__
+#define __PLUMA_FILE_BROWSER_UTILS_H__
-#include <gedit/gedit-window.h>
+#include <pluma/pluma-window.h>
#include <gio/gio.h>
-GdkPixbuf *gedit_file_browser_utils_pixbuf_from_theme (gchar const *name,
+GdkPixbuf *pluma_file_browser_utils_pixbuf_from_theme (gchar const *name,
GtkIconSize size);
-GdkPixbuf *gedit_file_browser_utils_pixbuf_from_icon (GIcon * icon,
+GdkPixbuf *pluma_file_browser_utils_pixbuf_from_icon (GIcon * icon,
GtkIconSize size);
-GdkPixbuf *gedit_file_browser_utils_pixbuf_from_file (GFile * file,
+GdkPixbuf *pluma_file_browser_utils_pixbuf_from_file (GFile * file,
GtkIconSize size);
-gchar * gedit_file_browser_utils_file_basename (GFile * file);
-gchar * gedit_file_browser_utils_uri_basename (gchar const * uri);
+gchar * pluma_file_browser_utils_file_basename (GFile * file);
+gchar * pluma_file_browser_utils_uri_basename (gchar const * uri);
-gboolean gedit_file_browser_utils_confirmation_dialog (GeditWindow * window,
+gboolean pluma_file_browser_utils_confirmation_dialog (PlumaWindow * window,
GtkMessageType type,
gchar const *message,
gchar const *secondary,
gchar const * button_stock,
gchar const * button_label);
-#endif /* __GEDIT_FILE_BROWSER_UTILS_H__ */
+#endif /* __PLUMA_FILE_BROWSER_UTILS_H__ */
// ex:ts=8:noet:
diff --git a/plugins/filebrowser/gedit-file-browser-view.c b/plugins/filebrowser/pluma-file-browser-view.c
index 05733da1..64e90c28 100755
--- a/plugins/filebrowser/gedit-file-browser-view.c
+++ b/plugins/filebrowser/pluma-file-browser-view.c
@@ -1,5 +1,5 @@
/*
- * gedit-file-browser-view.c - Gedit plugin providing easy file access
+ * pluma-file-browser-view.c - Pluma plugin providing easy file access
* from the sidepanel
*
* Copyright (C) 2006 - Jesse van den Kieboom <[email protected]>
@@ -21,20 +21,20 @@
#include <string.h>
#include <gio/gio.h>
-#include <gedit/gedit-plugin.h>
+#include <pluma/pluma-plugin.h>
#include <gdk/gdkkeysyms.h>
-#include "gedit-file-browser-store.h"
-#include "gedit-file-bookmarks-store.h"
-#include "gedit-file-browser-view.h"
-#include "gedit-file-browser-marshal.h"
-#include "gedit-file-browser-enum-types.h"
+#include "pluma-file-browser-store.h"
+#include "pluma-file-bookmarks-store.h"
+#include "pluma-file-browser-view.h"
+#include "pluma-file-browser-marshal.h"
+#include "pluma-file-browser-enum-types.h"
-#define GEDIT_FILE_BROWSER_VIEW_GET_PRIVATE(object)( \
+#define PLUMA_FILE_BROWSER_VIEW_GET_PRIVATE(object)( \
G_TYPE_INSTANCE_GET_PRIVATE((object), \
- GEDIT_TYPE_FILE_BROWSER_VIEW, GeditFileBrowserViewPrivate))
+ PLUMA_TYPE_FILE_BROWSER_VIEW, PlumaFileBrowserViewPrivate))
-struct _GeditFileBrowserViewPrivate
+struct _PlumaFileBrowserViewPrivate
{
GtkTreeViewColumn *column;
GtkCellRenderer *pixbuf_renderer;
@@ -46,7 +46,7 @@ struct _GeditFileBrowserViewPrivate
GdkCursor *busy_cursor;
/* CLick policy */
- GeditFileBrowserViewClickPolicy click_policy;
+ PlumaFileBrowserViewClickPolicy click_policy;
GtkTreePath *double_click_path[2]; /* Both clicks in a double click need to be on the same row */
GtkTreePath *hover_path;
GdkCursor *hand_cursor;
@@ -85,32 +85,32 @@ static const GtkTargetEntry drag_source_targets[] = {
{ "text/uri-list", 0, 0 }
};
-GEDIT_PLUGIN_DEFINE_TYPE (GeditFileBrowserView, gedit_file_browser_view,
+PLUMA_PLUGIN_DEFINE_TYPE (PlumaFileBrowserView, pluma_file_browser_view,
GTK_TYPE_TREE_VIEW)
static void on_cell_edited (GtkCellRendererText * cell,
gchar * path,
gchar * new_text,
- GeditFileBrowserView * tree_view);
+ PlumaFileBrowserView * tree_view);
-static void on_begin_refresh (GeditFileBrowserStore * model,
- GeditFileBrowserView * view);
-static void on_end_refresh (GeditFileBrowserStore * model,
- GeditFileBrowserView * view);
+static void on_begin_refresh (PlumaFileBrowserStore * model,
+ PlumaFileBrowserView * view);
+static void on_end_refresh (PlumaFileBrowserStore * model,
+ PlumaFileBrowserView * view);
-static void on_unload (GeditFileBrowserStore * model,
+static void on_unload (PlumaFileBrowserStore * model,
gchar const * uri,
- GeditFileBrowserView * view);
+ PlumaFileBrowserView * view);
-static void on_row_inserted (GeditFileBrowserStore * model,
+static void on_row_inserted (PlumaFileBrowserStore * model,
GtkTreePath * path,
GtkTreeIter * iter,
- GeditFileBrowserView * view);
+ PlumaFileBrowserView * view);
static void
-gedit_file_browser_view_finalize (GObject * object)
+pluma_file_browser_view_finalize (GObject * object)
{
- GeditFileBrowserView *obj = GEDIT_FILE_BROWSER_VIEW(object);
+ PlumaFileBrowserView *obj = PLUMA_FILE_BROWSER_VIEW(object);
if (obj->priv->hand_cursor)
gdk_cursor_unref(obj->priv->hand_cursor);
@@ -126,12 +126,12 @@ gedit_file_browser_view_finalize (GObject * object)
gdk_cursor_unref (obj->priv->busy_cursor);
- G_OBJECT_CLASS (gedit_file_browser_view_parent_class)->
+ G_OBJECT_CLASS (pluma_file_browser_view_parent_class)->
finalize (object);
}
static void
-add_expand_state (GeditFileBrowserView * view,
+add_expand_state (PlumaFileBrowserView * view,
gchar const * uri)
{
GFile * file;
@@ -148,7 +148,7 @@ add_expand_state (GeditFileBrowserView * view,
}
static void
-remove_expand_state (GeditFileBrowserView * view,
+remove_expand_state (PlumaFileBrowserView * view,
gchar const * uri)
{
GFile * file;
@@ -169,20 +169,20 @@ row_expanded (GtkTreeView * tree_view,
GtkTreeIter * iter,
GtkTreePath * path)
{
- GeditFileBrowserView *view = GEDIT_FILE_BROWSER_VIEW (tree_view);
+ PlumaFileBrowserView *view = PLUMA_FILE_BROWSER_VIEW (tree_view);
gchar * uri;
- if (GTK_TREE_VIEW_CLASS (gedit_file_browser_view_parent_class)->row_expanded)
- GTK_TREE_VIEW_CLASS (gedit_file_browser_view_parent_class)->row_expanded (tree_view, iter, path);
+ if (GTK_TREE_VIEW_CLASS (pluma_file_browser_view_parent_class)->row_expanded)
+ GTK_TREE_VIEW_CLASS (pluma_file_browser_view_parent_class)->row_expanded (tree_view, iter, path);
- if (!GEDIT_IS_FILE_BROWSER_STORE (view->priv->model))
+ if (!PLUMA_IS_FILE_BROWSER_STORE (view->priv->model))
return;
if (view->priv->restore_expand_state)
{
gtk_tree_model_get (view->priv->model,
iter,
- GEDIT_FILE_BROWSER_STORE_COLUMN_URI,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_URI,
&uri,
-1);
@@ -190,7 +190,7 @@ row_expanded (GtkTreeView * tree_view,
g_free (uri);
}
- _gedit_file_browser_store_iter_expanded (GEDIT_FILE_BROWSER_STORE (view->priv->model),
+ _pluma_file_browser_store_iter_expanded (PLUMA_FILE_BROWSER_STORE (view->priv->model),
iter);
}
@@ -199,20 +199,20 @@ row_collapsed (GtkTreeView * tree_view,
GtkTreeIter * iter,
GtkTreePath * path)
{
- GeditFileBrowserView *view = GEDIT_FILE_BROWSER_VIEW (tree_view);
+ PlumaFileBrowserView *view = PLUMA_FILE_BROWSER_VIEW (tree_view);
gchar * uri;
- if (GTK_TREE_VIEW_CLASS (gedit_file_browser_view_parent_class)->row_collapsed)
- GTK_TREE_VIEW_CLASS (gedit_file_browser_view_parent_class)->row_collapsed (tree_view, iter, path);
+ if (GTK_TREE_VIEW_CLASS (pluma_file_browser_view_parent_class)->row_collapsed)
+ GTK_TREE_VIEW_CLASS (pluma_file_browser_view_parent_class)->row_collapsed (tree_view, iter, path);
- if (!GEDIT_IS_FILE_BROWSER_STORE (view->priv->model))
+ if (!PLUMA_IS_FILE_BROWSER_STORE (view->priv->model))
return;
if (view->priv->restore_expand_state)
{
gtk_tree_model_get (view->priv->model,
iter,
- GEDIT_FILE_BROWSER_STORE_COLUMN_URI,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_URI,
&uri,
-1);
@@ -220,7 +220,7 @@ row_collapsed (GtkTreeView * tree_view,
g_free (uri);
}
- _gedit_file_browser_store_iter_collapsed (GEDIT_FILE_BROWSER_STORE (view->priv->model),
+ _pluma_file_browser_store_iter_collapsed (PLUMA_FILE_BROWSER_STORE (view->priv->model),
iter);
}
@@ -228,25 +228,25 @@ static gboolean
leave_notify_event (GtkWidget *widget,
GdkEventCrossing *event)
{
- GeditFileBrowserView *view = GEDIT_FILE_BROWSER_VIEW (widget);
+ PlumaFileBrowserView *view = PLUMA_FILE_BROWSER_VIEW (widget);
- if (view->priv->click_policy == GEDIT_FILE_BROWSER_VIEW_CLICK_POLICY_SINGLE &&
+ if (view->priv->click_policy == PLUMA_FILE_BROWSER_VIEW_CLICK_POLICY_SINGLE &&
view->priv->hover_path != NULL) {
gtk_tree_path_free (view->priv->hover_path);
view->priv->hover_path = NULL;
}
// Chainup
- return GTK_WIDGET_CLASS (gedit_file_browser_view_parent_class)->leave_notify_event (widget, event);
+ return GTK_WIDGET_CLASS (pluma_file_browser_view_parent_class)->leave_notify_event (widget, event);
}
static gboolean
enter_notify_event (GtkWidget *widget,
GdkEventCrossing *event)
{
- GeditFileBrowserView *view = GEDIT_FILE_BROWSER_VIEW (widget);
+ PlumaFileBrowserView *view = PLUMA_FILE_BROWSER_VIEW (widget);
- if (view->priv->click_policy == GEDIT_FILE_BROWSER_VIEW_CLICK_POLICY_SINGLE) {
+ if (view->priv->click_policy == PLUMA_FILE_BROWSER_VIEW_CLICK_POLICY_SINGLE) {
if (view->priv->hover_path != NULL)
gtk_tree_path_free (view->priv->hover_path);
@@ -261,7 +261,7 @@ enter_notify_event (GtkWidget *widget,
}
// Chainup
- return GTK_WIDGET_CLASS (gedit_file_browser_view_parent_class)->enter_notify_event (widget, event);
+ return GTK_WIDGET_CLASS (pluma_file_browser_view_parent_class)->enter_notify_event (widget, event);
}
static gboolean
@@ -269,9 +269,9 @@ motion_notify_event (GtkWidget * widget,
GdkEventMotion * event)
{
GtkTreePath *old_hover_path;
- GeditFileBrowserView *view = GEDIT_FILE_BROWSER_VIEW (widget);
+ PlumaFileBrowserView *view = PLUMA_FILE_BROWSER_VIEW (widget);
- if (view->priv->click_policy == GEDIT_FILE_BROWSER_VIEW_CLICK_POLICY_SINGLE) {
+ if (view->priv->click_policy == PLUMA_FILE_BROWSER_VIEW_CLICK_POLICY_SINGLE) {
old_hover_path = view->priv->hover_path;
gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (widget),
event->x, event->y,
@@ -292,12 +292,12 @@ motion_notify_event (GtkWidget * widget,
}
// Chainup
- return GTK_WIDGET_CLASS (gedit_file_browser_view_parent_class)->motion_notify_event (widget, event);
+ return GTK_WIDGET_CLASS (pluma_file_browser_view_parent_class)->motion_notify_event (widget, event);
}
static void
-set_click_policy_property (GeditFileBrowserView *obj,
- GeditFileBrowserViewClickPolicy click_policy)
+set_click_policy_property (PlumaFileBrowserView *obj,
+ PlumaFileBrowserViewClickPolicy click_policy)
{
GtkTreeIter iter;
GdkDisplay *display;
@@ -305,10 +305,10 @@ set_click_policy_property (GeditFileBrowserView *obj,
obj->priv->click_policy = click_policy;
- if (click_policy == GEDIT_FILE_BROWSER_VIEW_CLICK_POLICY_SINGLE) {
+ if (click_policy == PLUMA_FILE_BROWSER_VIEW_CLICK_POLICY_SINGLE) {
if (obj->priv->hand_cursor == NULL)
obj->priv->hand_cursor = gdk_cursor_new(GDK_HAND2);
- } else if (click_policy == GEDIT_FILE_BROWSER_VIEW_CLICK_POLICY_DOUBLE) {
+ } else if (click_policy == PLUMA_FILE_BROWSER_VIEW_CLICK_POLICY_DOUBLE) {
if (obj->priv->hover_path != NULL) {
if (gtk_tree_model_get_iter (GTK_TREE_MODEL (obj->priv->model),
&iter, obj->priv->hover_path))
@@ -337,21 +337,21 @@ set_click_policy_property (GeditFileBrowserView *obj,
}
static void
-directory_activated (GeditFileBrowserView *view,
+directory_activated (PlumaFileBrowserView *view,
GtkTreeIter *iter)
{
- gedit_file_browser_store_set_virtual_root (GEDIT_FILE_BROWSER_STORE (view->priv->model), iter);
+ pluma_file_browser_store_set_virtual_root (PLUMA_FILE_BROWSER_STORE (view->priv->model), iter);
}
static void
-activate_selected_files (GeditFileBrowserView *view) {
+activate_selected_files (PlumaFileBrowserView *view) {
GtkTreeView *tree_view = GTK_TREE_VIEW (view);
GtkTreeSelection *selection = gtk_tree_view_get_selection (tree_view);
GList *rows, *row;
GtkTreePath *directory = NULL;
GtkTreePath *path;
GtkTreeIter iter;
- GeditFileBrowserStoreFlag flags;
+ PlumaFileBrowserStoreFlag flags;
rows = gtk_tree_selection_get_selected_rows (selection, &view->priv->model);
@@ -362,7 +362,7 @@ activate_selected_files (GeditFileBrowserView *view) {
if (!gtk_tree_model_get_iter (view->priv->model, &iter, path))
continue;
- gtk_tree_model_get (view->priv->model, &iter, GEDIT_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags, -1);
+ gtk_tree_model_get (view->priv->model, &iter, PLUMA_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags, -1);
if (FILE_IS_DIR (flags)) {
if (directory == NULL)
@@ -383,7 +383,7 @@ activate_selected_files (GeditFileBrowserView *view) {
}
static void
-activate_selected_bookmark (GeditFileBrowserView *view) {
+activate_selected_bookmark (PlumaFileBrowserView *view) {
GtkTreeView *tree_view = GTK_TREE_VIEW (view);
GtkTreeSelection *selection = gtk_tree_view_get_selection (tree_view);
GtkTreeIter iter;
@@ -393,26 +393,26 @@ activate_selected_bookmark (GeditFileBrowserView *view) {
}
static void
-activate_selected_items (GeditFileBrowserView *view)
+activate_selected_items (PlumaFileBrowserView *view)
{
- if (GEDIT_IS_FILE_BROWSER_STORE (view->priv->model))
+ if (PLUMA_IS_FILE_BROWSER_STORE (view->priv->model))
activate_selected_files (view);
- else if (GEDIT_IS_FILE_BOOKMARKS_STORE (view->priv->model))
+ else if (PLUMA_IS_FILE_BOOKMARKS_STORE (view->priv->model))
activate_selected_bookmark (view);
}
static void
-toggle_hidden_filter (GeditFileBrowserView *view)
+toggle_hidden_filter (PlumaFileBrowserView *view)
{
- GeditFileBrowserStoreFilterMode mode;
+ PlumaFileBrowserStoreFilterMode mode;
- if (GEDIT_IS_FILE_BROWSER_STORE (view->priv->model))
+ if (PLUMA_IS_FILE_BROWSER_STORE (view->priv->model))
{
- mode = gedit_file_browser_store_get_filter_mode
- (GEDIT_FILE_BROWSER_STORE (view->priv->model));
- mode ^= GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN;
- gedit_file_browser_store_set_filter_mode
- (GEDIT_FILE_BROWSER_STORE (view->priv->model), mode);
+ mode = pluma_file_browser_store_get_filter_mode
+ (PLUMA_FILE_BROWSER_STORE (view->priv->model));
+ mode ^= PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN;
+ pluma_file_browser_store_set_filter_mode
+ (PLUMA_FILE_BROWSER_STORE (view->priv->model), mode);
}
}
@@ -426,17 +426,17 @@ static void
drag_begin (GtkWidget *widget,
GdkDragContext *context)
{
- GeditFileBrowserView *view = GEDIT_FILE_BROWSER_VIEW (widget);
+ PlumaFileBrowserView *view = PLUMA_FILE_BROWSER_VIEW (widget);
view->priv->drag_button = 0;
view->priv->drag_started = TRUE;
/* Chain up */
- GTK_WIDGET_CLASS (gedit_file_browser_view_parent_class)->drag_begin (widget, context);
+ GTK_WIDGET_CLASS (pluma_file_browser_view_parent_class)->drag_begin (widget, context);
}
static void
-did_not_drag (GeditFileBrowserView *view,
+did_not_drag (PlumaFileBrowserView *view,
GdkEventButton *event)
{
GtkTreeView *tree_view;
@@ -448,7 +448,7 @@ did_not_drag (GeditFileBrowserView *view,
if (gtk_tree_view_get_path_at_pos (tree_view, event->x, event->y,
&path, NULL, NULL, NULL)) {
- if ((view->priv->click_policy == GEDIT_FILE_BROWSER_VIEW_CLICK_POLICY_SINGLE)
+ if ((view->priv->click_policy == PLUMA_FILE_BROWSER_VIEW_CLICK_POLICY_SINGLE)
&& !button_event_modifies_selection(event)
&& (event->button == 1 || event->button == 2)) {
/* Activate all selected items, and leave them selected */
@@ -473,7 +473,7 @@ static gboolean
button_release_event (GtkWidget *widget,
GdkEventButton *event)
{
- GeditFileBrowserView *view = GEDIT_FILE_BROWSER_VIEW (widget);
+ PlumaFileBrowserView *view = PLUMA_FILE_BROWSER_VIEW (widget);
if (event->button == view->priv->drag_button) {
view->priv->drag_button = 0;
@@ -484,7 +484,7 @@ button_release_event (GtkWidget *widget,
}
/* Chain up */
- return GTK_WIDGET_CLASS (gedit_file_browser_view_parent_class)->button_release_event (widget, event);
+ return GTK_WIDGET_CLASS (pluma_file_browser_view_parent_class)->button_release_event (widget, event);
}
static gboolean
@@ -494,7 +494,7 @@ button_press_event (GtkWidget *widget,
int double_click_time;
static int click_count = 0;
static guint32 last_click_time = 0;
- GeditFileBrowserView *view;
+ PlumaFileBrowserView *view;
GtkTreeView *tree_view;
GtkTreeSelection *selection;
GtkTreePath *path;
@@ -503,10 +503,10 @@ button_press_event (GtkWidget *widget,
gboolean on_expander;
gboolean call_parent;
gboolean selected;
- GtkWidgetClass *widget_parent = GTK_WIDGET_CLASS(gedit_file_browser_view_parent_class);
+ GtkWidgetClass *widget_parent = GTK_WIDGET_CLASS(pluma_file_browser_view_parent_class);
tree_view = GTK_TREE_VIEW (widget);
- view = GEDIT_FILE_BROWSER_VIEW (widget);
+ view = PLUMA_FILE_BROWSER_VIEW (widget);
selection = gtk_tree_view_get_selection (tree_view);
/* Get double click time */
@@ -523,7 +523,7 @@ button_press_event (GtkWidget *widget,
last_click_time = event->time;
/* Ignore double click if we are in single click mode */
- if (view->priv->click_policy == GEDIT_FILE_BROWSER_VIEW_CLICK_POLICY_SINGLE &&
+ if (view->priv->click_policy == PLUMA_FILE_BROWSER_VIEW_CLICK_POLICY_SINGLE &&
click_count >= 2) {
return TRUE;
}
@@ -576,7 +576,7 @@ button_press_event (GtkWidget *widget,
if (selected) {
call_parent = on_expander || gtk_tree_selection_count_selected_rows (selection) == 1;
- view->priv->ignore_release = call_parent && view->priv->click_policy != GEDIT_FILE_BROWSER_VIEW_CLICK_POLICY_SINGLE;
+ view->priv->ignore_release = call_parent && view->priv->click_policy != PLUMA_FILE_BROWSER_VIEW_CLICK_POLICY_SINGLE;
} else if ((event->state & GDK_CONTROL_MASK) != 0) {
call_parent = FALSE;
gtk_tree_selection_select_path (selection, path);
@@ -623,11 +623,11 @@ static gboolean
key_press_event (GtkWidget *widget,
GdkEventKey *event)
{
- GeditFileBrowserView *view;
+ PlumaFileBrowserView *view;
guint modifiers;
gboolean handled;
- view = GEDIT_FILE_BROWSER_VIEW (widget);
+ view = PLUMA_FILE_BROWSER_VIEW (widget);
handled = FALSE;
modifiers = gtk_accelerator_get_default_mod_mask ();
@@ -666,13 +666,13 @@ key_press_event (GtkWidget *widget,
/* Chain up */
if (!handled)
- return GTK_WIDGET_CLASS (gedit_file_browser_view_parent_class)->key_press_event (widget, event);
+ return GTK_WIDGET_CLASS (pluma_file_browser_view_parent_class)->key_press_event (widget, event);
return TRUE;
}
static void
-fill_expand_state (GeditFileBrowserView * view, GtkTreeIter * iter)
+fill_expand_state (PlumaFileBrowserView * view, GtkTreeIter * iter)
{
GtkTreePath * path;
GtkTreeIter child;
@@ -687,7 +687,7 @@ fill_expand_state (GeditFileBrowserView * view, GtkTreeIter * iter)
{
gtk_tree_model_get (view->priv->model,
iter,
- GEDIT_FILE_BROWSER_STORE_COLUMN_URI,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_URI,
&uri,
-1);
@@ -706,7 +706,7 @@ fill_expand_state (GeditFileBrowserView * view, GtkTreeIter * iter)
}
static void
-uninstall_restore_signals (GeditFileBrowserView * tree_view,
+uninstall_restore_signals (PlumaFileBrowserView * tree_view,
GtkTreeModel * model)
{
g_signal_handlers_disconnect_by_func (model,
@@ -727,7 +727,7 @@ uninstall_restore_signals (GeditFileBrowserView * tree_view,
}
static void
-install_restore_signals (GeditFileBrowserView * tree_view,
+install_restore_signals (PlumaFileBrowserView * tree_view,
GtkTreeModel * model)
{
g_signal_connect (model,
@@ -752,7 +752,7 @@ install_restore_signals (GeditFileBrowserView * tree_view,
}
static void
-set_restore_expand_state (GeditFileBrowserView * view,
+set_restore_expand_state (PlumaFileBrowserView * view,
gboolean state)
{
if (state == view->priv->restore_expand_state)
@@ -771,14 +771,14 @@ set_restore_expand_state (GeditFileBrowserView * view,
g_object_unref,
NULL);
- if (view->priv->model && GEDIT_IS_FILE_BROWSER_STORE (view->priv->model))
+ if (view->priv->model && PLUMA_IS_FILE_BROWSER_STORE (view->priv->model))
{
fill_expand_state (view, NULL);
install_restore_signals (view, view->priv->model);
}
}
- else if (view->priv->model && GEDIT_IS_FILE_BROWSER_STORE (view->priv->model))
+ else if (view->priv->model && PLUMA_IS_FILE_BROWSER_STORE (view->priv->model))
{
uninstall_restore_signals (view, view->priv->model);
}
@@ -792,7 +792,7 @@ get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- GeditFileBrowserView *obj = GEDIT_FILE_BROWSER_VIEW (object);
+ PlumaFileBrowserView *obj = PLUMA_FILE_BROWSER_VIEW (object);
switch (prop_id)
{
@@ -814,7 +814,7 @@ set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- GeditFileBrowserView *obj = GEDIT_FILE_BROWSER_VIEW (object);
+ PlumaFileBrowserView *obj = PLUMA_FILE_BROWSER_VIEW (object);
switch (prop_id)
{
@@ -831,13 +831,13 @@ set_property (GObject *object,
}
static void
-gedit_file_browser_view_class_init (GeditFileBrowserViewClass * klass)
+pluma_file_browser_view_class_init (PlumaFileBrowserViewClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkTreeViewClass *tree_view_class = GTK_TREE_VIEW_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- object_class->finalize = gedit_file_browser_view_finalize;
+ object_class->finalize = pluma_file_browser_view_finalize;
object_class->get_property = get_property;
object_class->set_property = set_property;
@@ -861,8 +861,8 @@ gedit_file_browser_view_class_init (GeditFileBrowserViewClass * klass)
g_param_spec_enum ("click-policy",
"Click Policy",
"The click policy",
- GEDIT_TYPE_FILE_BROWSER_VIEW_CLICK_POLICY,
- GEDIT_FILE_BROWSER_VIEW_CLICK_POLICY_DOUBLE,
+ PLUMA_TYPE_FILE_BROWSER_VIEW_CLICK_POLICY,
+ PLUMA_FILE_BROWSER_VIEW_CLICK_POLICY_DOUBLE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class, PROP_RESTORE_EXPAND_STATE,
@@ -876,15 +876,15 @@ gedit_file_browser_view_class_init (GeditFileBrowserViewClass * klass)
g_signal_new ("error",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GeditFileBrowserViewClass,
+ G_STRUCT_OFFSET (PlumaFileBrowserViewClass,
error), NULL, NULL,
- gedit_file_browser_marshal_VOID__UINT_STRING,
+ pluma_file_browser_marshal_VOID__UINT_STRING,
G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING);
signals[FILE_ACTIVATED] =
g_signal_new ("file-activated",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GeditFileBrowserViewClass,
+ G_STRUCT_OFFSET (PlumaFileBrowserViewClass,
file_activated), NULL, NULL,
g_cclosure_marshal_VOID__BOXED,
G_TYPE_NONE, 1, GTK_TYPE_TREE_ITER);
@@ -892,7 +892,7 @@ gedit_file_browser_view_class_init (GeditFileBrowserViewClass * klass)
g_signal_new ("directory-activated",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GeditFileBrowserViewClass,
+ G_STRUCT_OFFSET (PlumaFileBrowserViewClass,
directory_activated), NULL, NULL,
g_cclosure_marshal_VOID__BOXED,
G_TYPE_NONE, 1, GTK_TYPE_TREE_ITER);
@@ -900,19 +900,19 @@ gedit_file_browser_view_class_init (GeditFileBrowserViewClass * klass)
g_signal_new ("bookmark-activated",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GeditFileBrowserViewClass,
+ G_STRUCT_OFFSET (PlumaFileBrowserViewClass,
bookmark_activated), NULL, NULL,
g_cclosure_marshal_VOID__BOXED,
G_TYPE_NONE, 1, GTK_TYPE_TREE_ITER);
g_type_class_add_private (object_class,
- sizeof (GeditFileBrowserViewPrivate));
+ sizeof (PlumaFileBrowserViewPrivate));
}
static void
cell_data_cb (GtkTreeViewColumn * tree_column, GtkCellRenderer * cell,
GtkTreeModel * tree_model, GtkTreeIter * iter,
- GeditFileBrowserView * obj)
+ PlumaFileBrowserView * obj)
{
GtkTreePath *path;
PangoUnderline underline = PANGO_UNDERLINE_NONE;
@@ -920,13 +920,13 @@ cell_data_cb (GtkTreeViewColumn * tree_column, GtkCellRenderer * cell,
path = gtk_tree_model_get_path (tree_model, iter);
- if (obj->priv->click_policy == GEDIT_FILE_BROWSER_VIEW_CLICK_POLICY_SINGLE) {
+ if (obj->priv->click_policy == PLUMA_FILE_BROWSER_VIEW_CLICK_POLICY_SINGLE) {
if (obj->priv->hover_path != NULL &&
gtk_tree_path_compare (path, obj->priv->hover_path) == 0)
underline = PANGO_UNDERLINE_SINGLE;
}
- if (GEDIT_IS_FILE_BROWSER_STORE (tree_model))
+ if (PLUMA_IS_FILE_BROWSER_STORE (tree_model))
{
if (obj->priv->editable != NULL &&
gtk_tree_row_reference_valid (obj->priv->editable))
@@ -942,9 +942,9 @@ cell_data_cb (GtkTreeViewColumn * tree_column, GtkCellRenderer * cell,
}
static void
-gedit_file_browser_view_init (GeditFileBrowserView * obj)
+pluma_file_browser_view_init (PlumaFileBrowserView * obj)
{
- obj->priv = GEDIT_FILE_BROWSER_VIEW_GET_PRIVATE (obj);
+ obj->priv = PLUMA_FILE_BROWSER_VIEW_GET_PRIVATE (obj);
obj->priv->column = gtk_tree_view_column_new ();
@@ -955,7 +955,7 @@ gedit_file_browser_view_init (GeditFileBrowserView * obj)
gtk_tree_view_column_add_attribute (obj->priv->column,
obj->priv->pixbuf_renderer,
"pixbuf",
- GEDIT_FILE_BROWSER_STORE_COLUMN_ICON);
+ PLUMA_FILE_BROWSER_STORE_COLUMN_ICON);
obj->priv->text_renderer = gtk_cell_renderer_text_new ();
gtk_tree_view_column_pack_start (obj->priv->column,
@@ -963,7 +963,7 @@ gedit_file_browser_view_init (GeditFileBrowserView * obj)
gtk_tree_view_column_add_attribute (obj->priv->column,
obj->priv->text_renderer,
"text",
- GEDIT_FILE_BROWSER_STORE_COLUMN_NAME);
+ PLUMA_FILE_BROWSER_STORE_COLUMN_NAME);
g_signal_connect (obj->priv->text_renderer, "edited",
G_CALLBACK (on_cell_edited), obj);
@@ -988,25 +988,25 @@ bookmarks_separator_func (GtkTreeModel * model, GtkTreeIter * iter,
guint flags;
gtk_tree_model_get (model, iter,
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_FLAGS,
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_FLAGS,
&flags, -1);
- return (flags & GEDIT_FILE_BOOKMARKS_STORE_IS_SEPARATOR);
+ return (flags & PLUMA_FILE_BOOKMARKS_STORE_IS_SEPARATOR);
}
/* Public */
GtkWidget *
-gedit_file_browser_view_new (void)
+pluma_file_browser_view_new (void)
{
- GeditFileBrowserView *obj =
- GEDIT_FILE_BROWSER_VIEW (g_object_new
- (GEDIT_TYPE_FILE_BROWSER_VIEW, NULL));
+ PlumaFileBrowserView *obj =
+ PLUMA_FILE_BROWSER_VIEW (g_object_new
+ (PLUMA_TYPE_FILE_BROWSER_VIEW, NULL));
return GTK_WIDGET (obj);
}
void
-gedit_file_browser_view_set_model (GeditFileBrowserView * tree_view,
+pluma_file_browser_view_set_model (PlumaFileBrowserView * tree_view,
GtkTreeModel * model)
{
GtkTreeSelection *selection;
@@ -1016,7 +1016,7 @@ gedit_file_browser_view_set_model (GeditFileBrowserView * tree_view,
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
- if (GEDIT_IS_FILE_BOOKMARKS_STORE (model)) {
+ if (PLUMA_IS_FILE_BOOKMARKS_STORE (model)) {
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
gtk_tree_view_set_row_separator_func (GTK_TREE_VIEW
(tree_view),
@@ -1052,7 +1052,7 @@ gedit_file_browser_view_set_model (GeditFileBrowserView * tree_view,
tree_view->priv->hover_path = NULL;
}
- if (GEDIT_IS_FILE_BROWSER_STORE (tree_view->priv->model)) {
+ if (PLUMA_IS_FILE_BROWSER_STORE (tree_view->priv->model)) {
if (tree_view->priv->restore_expand_state)
uninstall_restore_signals (tree_view,
tree_view->priv->model);
@@ -1063,20 +1063,20 @@ gedit_file_browser_view_set_model (GeditFileBrowserView * tree_view,
}
void
-gedit_file_browser_view_start_rename (GeditFileBrowserView * tree_view,
+pluma_file_browser_view_start_rename (PlumaFileBrowserView * tree_view,
GtkTreeIter * iter)
{
guint flags;
GtkTreeRowReference *rowref;
GtkTreePath *path;
- g_return_if_fail (GEDIT_IS_FILE_BROWSER_VIEW (tree_view));
- g_return_if_fail (GEDIT_IS_FILE_BROWSER_STORE
+ g_return_if_fail (PLUMA_IS_FILE_BROWSER_VIEW (tree_view));
+ g_return_if_fail (PLUMA_IS_FILE_BROWSER_STORE
(tree_view->priv->model));
g_return_if_fail (iter != NULL);
gtk_tree_model_get (tree_view->priv->model, iter,
- GEDIT_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags,
-1);
if (!(FILE_IS_DIR (flags) || !FILE_IS_DUMMY (flags)))
@@ -1106,10 +1106,10 @@ gedit_file_browser_view_start_rename (GeditFileBrowserView * tree_view,
}
void
-gedit_file_browser_view_set_click_policy (GeditFileBrowserView *tree_view,
- GeditFileBrowserViewClickPolicy policy)
+pluma_file_browser_view_set_click_policy (PlumaFileBrowserView *tree_view,
+ PlumaFileBrowserViewClickPolicy policy)
{
- g_return_if_fail (GEDIT_IS_FILE_BROWSER_VIEW (tree_view));
+ g_return_if_fail (PLUMA_IS_FILE_BROWSER_VIEW (tree_view));
set_click_policy_property (tree_view, policy);
@@ -1117,10 +1117,10 @@ gedit_file_browser_view_set_click_policy (GeditFileBrowserView *tree_view,
}
void
-gedit_file_browser_view_set_restore_expand_state (GeditFileBrowserView * tree_view,
+pluma_file_browser_view_set_restore_expand_state (PlumaFileBrowserView * tree_view,
gboolean restore_expand_state)
{
- g_return_if_fail (GEDIT_IS_FILE_BROWSER_VIEW (tree_view));
+ g_return_if_fail (PLUMA_IS_FILE_BROWSER_VIEW (tree_view));
set_restore_expand_state (tree_view, restore_expand_state);
g_object_notify (G_OBJECT (tree_view), "restore-expand-state");
@@ -1129,7 +1129,7 @@ gedit_file_browser_view_set_restore_expand_state (GeditFileBrowserView * tree_vi
/* Signal handlers */
static void
on_cell_edited (GtkCellRendererText * cell, gchar * path, gchar * new_text,
- GeditFileBrowserView * tree_view)
+ PlumaFileBrowserView * tree_view)
{
GtkTreePath * treepath;
GtkTreeIter iter;
@@ -1147,7 +1147,7 @@ on_cell_edited (GtkCellRendererText * cell, gchar * path, gchar * new_text,
gtk_tree_path_free (treepath);
if (ret) {
- if (gedit_file_browser_store_rename (GEDIT_FILE_BROWSER_STORE (tree_view->priv->model),
+ if (pluma_file_browser_store_rename (PLUMA_FILE_BROWSER_STORE (tree_view->priv->model),
&iter, new_text, &error)) {
treepath = gtk_tree_model_get_path (GTK_TREE_MODEL (tree_view->priv->model), &iter);
gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (tree_view),
@@ -1166,8 +1166,8 @@ on_cell_edited (GtkCellRendererText * cell, gchar * path, gchar * new_text,
}
static void
-on_begin_refresh (GeditFileBrowserStore * model,
- GeditFileBrowserView * view)
+on_begin_refresh (PlumaFileBrowserStore * model,
+ PlumaFileBrowserView * view)
{
/* Store the refresh state, so we can handle unloading of nodes while
refreshing properly */
@@ -1175,8 +1175,8 @@ on_begin_refresh (GeditFileBrowserStore * model,
}
static void
-on_end_refresh (GeditFileBrowserStore * model,
- GeditFileBrowserView * view)
+on_end_refresh (PlumaFileBrowserStore * model,
+ PlumaFileBrowserView * view)
{
/* Store the refresh state, so we can handle unloading of nodes while
refreshing properly */
@@ -1184,9 +1184,9 @@ on_end_refresh (GeditFileBrowserStore * model,
}
static void
-on_unload (GeditFileBrowserStore * model,
+on_unload (PlumaFileBrowserStore * model,
gchar const * uri,
- GeditFileBrowserView * view)
+ PlumaFileBrowserView * view)
{
/* Don't remove the expand state if we are refreshing */
if (!view->priv->restore_expand_state || view->priv->is_refresh)
@@ -1196,8 +1196,8 @@ on_unload (GeditFileBrowserStore * model,
}
static void
-restore_expand_state (GeditFileBrowserView * view,
- GeditFileBrowserStore * model,
+restore_expand_state (PlumaFileBrowserView * view,
+ PlumaFileBrowserStore * model,
GtkTreeIter * iter)
{
gchar * uri;
@@ -1206,7 +1206,7 @@ restore_expand_state (GeditFileBrowserView * view,
gtk_tree_model_get (GTK_TREE_MODEL (model),
iter,
- GEDIT_FILE_BROWSER_STORE_COLUMN_URI,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_URI,
&uri,
-1);
@@ -1230,10 +1230,10 @@ restore_expand_state (GeditFileBrowserView * view,
}
static void
-on_row_inserted (GeditFileBrowserStore * model,
+on_row_inserted (PlumaFileBrowserStore * model,
GtkTreePath * path,
GtkTreeIter * iter,
- GeditFileBrowserView * view)
+ PlumaFileBrowserView * view)
{
GtkTreeIter parent;
GtkTreePath * copy;
diff --git a/plugins/filebrowser/pluma-file-browser-view.h b/plugins/filebrowser/pluma-file-browser-view.h
new file mode 100755
index 00000000..04e64953
--- /dev/null
+++ b/plugins/filebrowser/pluma-file-browser-view.h
@@ -0,0 +1,84 @@
+/*
+ * pluma-file-browser-view.h - Pluma plugin providing easy file access
+ * from the sidepanel
+ *
+ * Copyright (C) 2006 - Jesse van den Kieboom <[email protected]>
+ *
+ * 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __PLUMA_FILE_BROWSER_VIEW_H__
+#define __PLUMA_FILE_BROWSER_VIEW_H__
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+#define PLUMA_TYPE_FILE_BROWSER_VIEW (pluma_file_browser_view_get_type ())
+#define PLUMA_FILE_BROWSER_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PLUMA_TYPE_FILE_BROWSER_VIEW, PlumaFileBrowserView))
+#define PLUMA_FILE_BROWSER_VIEW_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PLUMA_TYPE_FILE_BROWSER_VIEW, PlumaFileBrowserView const))
+#define PLUMA_FILE_BROWSER_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PLUMA_TYPE_FILE_BROWSER_VIEW, PlumaFileBrowserViewClass))
+#define PLUMA_IS_FILE_BROWSER_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PLUMA_TYPE_FILE_BROWSER_VIEW))
+#define PLUMA_IS_FILE_BROWSER_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PLUMA_TYPE_FILE_BROWSER_VIEW))
+#define PLUMA_FILE_BROWSER_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PLUMA_TYPE_FILE_BROWSER_VIEW, PlumaFileBrowserViewClass))
+
+typedef struct _PlumaFileBrowserView PlumaFileBrowserView;
+typedef struct _PlumaFileBrowserViewClass PlumaFileBrowserViewClass;
+typedef struct _PlumaFileBrowserViewPrivate PlumaFileBrowserViewPrivate;
+
+typedef enum {
+ PLUMA_FILE_BROWSER_VIEW_CLICK_POLICY_DOUBLE,
+ PLUMA_FILE_BROWSER_VIEW_CLICK_POLICY_SINGLE
+} PlumaFileBrowserViewClickPolicy;
+
+struct _PlumaFileBrowserView
+{
+ GtkTreeView parent;
+
+ PlumaFileBrowserViewPrivate *priv;
+};
+
+struct _PlumaFileBrowserViewClass
+{
+ GtkTreeViewClass parent_class;
+
+ /* Signals */
+ void (*error) (PlumaFileBrowserView * filetree,
+ guint code,
+ gchar const *message);
+ void (*file_activated) (PlumaFileBrowserView * filetree,
+ GtkTreeIter *iter);
+ void (*directory_activated) (PlumaFileBrowserView * filetree,
+ GtkTreeIter *iter);
+ void (*bookmark_activated) (PlumaFileBrowserView * filetree,
+ GtkTreeIter *iter);
+};
+
+GType pluma_file_browser_view_get_type (void) G_GNUC_CONST;
+GType pluma_file_browser_view_register_type (GTypeModule * module);
+
+GtkWidget *pluma_file_browser_view_new (void);
+void pluma_file_browser_view_set_model (PlumaFileBrowserView * tree_view,
+ GtkTreeModel * model);
+void pluma_file_browser_view_start_rename (PlumaFileBrowserView * tree_view,
+ GtkTreeIter * iter);
+void pluma_file_browser_view_set_click_policy (PlumaFileBrowserView * tree_view,
+ PlumaFileBrowserViewClickPolicy policy);
+void pluma_file_browser_view_set_restore_expand_state (PlumaFileBrowserView * tree_view,
+ gboolean restore_expand_state);
+
+G_END_DECLS
+#endif /* __PLUMA_FILE_BROWSER_VIEW_H__ */
+
+// ex:ts=8:noet:
diff --git a/plugins/filebrowser/gedit-file-browser-widget-ui.xml b/plugins/filebrowser/pluma-file-browser-widget-ui.xml
index 472fd185..472fd185 100755
--- a/plugins/filebrowser/gedit-file-browser-widget-ui.xml
+++ b/plugins/filebrowser/pluma-file-browser-widget-ui.xml
diff --git a/plugins/filebrowser/gedit-file-browser-widget.c b/plugins/filebrowser/pluma-file-browser-widget.c
index e8a73cce..969c2ae4 100755
--- a/plugins/filebrowser/gedit-file-browser-widget.c
+++ b/plugins/filebrowser/pluma-file-browser-widget.c
@@ -1,5 +1,5 @@
/*
- * gedit-file-browser-widget.c - Gedit plugin providing easy file access
+ * pluma-file-browser-widget.c - Pluma plugin providing easy file access
* from the sidepanel
*
* Copyright (C) 2006 - Jesse van den Kieboom <[email protected]>
@@ -29,24 +29,24 @@
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <gdk/gdkkeysyms.h>
-#include <gedit/gedit-utils.h>
-#include <gedit/gedit-plugin.h>
+#include <pluma/pluma-utils.h>
+#include <pluma/pluma-plugin.h>
-#include "gedit-file-browser-utils.h"
-#include "gedit-file-browser-error.h"
-#include "gedit-file-browser-widget.h"
-#include "gedit-file-browser-view.h"
-#include "gedit-file-browser-store.h"
-#include "gedit-file-bookmarks-store.h"
-#include "gedit-file-browser-marshal.h"
-#include "gedit-file-browser-enum-types.h"
+#include "pluma-file-browser-utils.h"
+#include "pluma-file-browser-error.h"
+#include "pluma-file-browser-widget.h"
+#include "pluma-file-browser-view.h"
+#include "pluma-file-browser-store.h"
+#include "pluma-file-bookmarks-store.h"
+#include "pluma-file-browser-marshal.h"
+#include "pluma-file-browser-enum-types.h"
-#define GEDIT_FILE_BROWSER_WIDGET_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), \
- GEDIT_TYPE_FILE_BROWSER_WIDGET, \
- GeditFileBrowserWidgetPrivate))
+#define PLUMA_FILE_BROWSER_WIDGET_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), \
+ PLUMA_TYPE_FILE_BROWSER_WIDGET, \
+ PlumaFileBrowserWidgetPrivate))
-#define XML_UI_FILE "gedit-file-browser-widget-ui.xml"
-#define LOCATION_DATA_KEY "gedit-file-browser-widget-location"
+#define XML_UI_FILE "pluma-file-browser-widget-ui.xml"
+#define LOCATION_DATA_KEY "pluma-file-browser-widget-location"
enum
{
@@ -97,7 +97,7 @@ typedef struct _SignalNode
typedef struct
{
gulong id;
- GeditFileBrowserWidgetFilterFunc func;
+ PlumaFileBrowserWidgetFilterFunc func;
gpointer user_data;
GDestroyNotify destroy_notify;
} FilterFunc;
@@ -114,11 +114,11 @@ typedef struct
GdkPixbuf *icon;
} NameIcon;
-struct _GeditFileBrowserWidgetPrivate
+struct _PlumaFileBrowserWidgetPrivate
{
- GeditFileBrowserView *treeview;
- GeditFileBrowserStore *file_store;
- GeditFileBookmarksStore *bookmarks_store;
+ PlumaFileBrowserView *treeview;
+ PlumaFileBrowserStore *file_store;
+ PlumaFileBookmarksStore *bookmarks_store;
GHashTable *bookmarks_hash;
@@ -159,82 +159,82 @@ struct _GeditFileBrowserWidgetPrivate
GdkCursor *busy_cursor;
};
-static void set_enable_delete (GeditFileBrowserWidget *obj,
+static void set_enable_delete (PlumaFileBrowserWidget *obj,
gboolean enable);
static void on_model_set (GObject * gobject,
GParamSpec * arg1,
- GeditFileBrowserWidget * obj);
-static void on_treeview_error (GeditFileBrowserView * tree_view,
+ PlumaFileBrowserWidget * obj);
+static void on_treeview_error (PlumaFileBrowserView * tree_view,
guint code,
gchar * message,
- GeditFileBrowserWidget * obj);
-static void on_file_store_error (GeditFileBrowserStore * store,
+ PlumaFileBrowserWidget * obj);
+static void on_file_store_error (PlumaFileBrowserStore * store,
guint code,
gchar * message,
- GeditFileBrowserWidget * obj);
-static gboolean on_file_store_no_trash (GeditFileBrowserStore * store,
+ PlumaFileBrowserWidget * obj);
+static gboolean on_file_store_no_trash (PlumaFileBrowserStore * store,
GList * files,
- GeditFileBrowserWidget * obj);
+ PlumaFileBrowserWidget * obj);
static void on_combo_changed (GtkComboBox * combo,
- GeditFileBrowserWidget * obj);
-static gboolean on_treeview_popup_menu (GeditFileBrowserView * treeview,
- GeditFileBrowserWidget * obj);
-static gboolean on_treeview_button_press_event (GeditFileBrowserView * treeview,
+ PlumaFileBrowserWidget * obj);
+static gboolean on_treeview_popup_menu (PlumaFileBrowserView * treeview,
+ PlumaFileBrowserWidget * obj);
+static gboolean on_treeview_button_press_event (PlumaFileBrowserView * treeview,
GdkEventButton * event,
- GeditFileBrowserWidget * obj);
-static gboolean on_treeview_key_press_event (GeditFileBrowserView * treeview,
+ PlumaFileBrowserWidget * obj);
+static gboolean on_treeview_key_press_event (PlumaFileBrowserView * treeview,
GdkEventKey * event,
- GeditFileBrowserWidget * obj);
+ PlumaFileBrowserWidget * obj);
static void on_selection_changed (GtkTreeSelection * selection,
- GeditFileBrowserWidget * obj);
+ PlumaFileBrowserWidget * obj);
-static void on_virtual_root_changed (GeditFileBrowserStore * model,
+static void on_virtual_root_changed (PlumaFileBrowserStore * model,
GParamSpec *param,
- GeditFileBrowserWidget * obj);
+ PlumaFileBrowserWidget * obj);
-static gboolean on_entry_filter_activate (GeditFileBrowserWidget * obj);
+static gboolean on_entry_filter_activate (PlumaFileBrowserWidget * obj);
static void on_location_jump_activate (GtkMenuItem * item,
- GeditFileBrowserWidget * obj);
+ PlumaFileBrowserWidget * obj);
static void on_bookmarks_row_changed (GtkTreeModel * model,
GtkTreePath * path,
GtkTreeIter * iter,
- GeditFileBrowserWidget * obj);
+ PlumaFileBrowserWidget * obj);
static void on_bookmarks_row_deleted (GtkTreeModel * model,
GtkTreePath * path,
- GeditFileBrowserWidget * obj);
-static void on_filter_mode_changed (GeditFileBrowserStore * model,
+ PlumaFileBrowserWidget * obj);
+static void on_filter_mode_changed (PlumaFileBrowserStore * model,
GParamSpec * param,
- GeditFileBrowserWidget * obj);
+ PlumaFileBrowserWidget * obj);
static void on_action_directory_previous (GtkAction * action,
- GeditFileBrowserWidget * obj);
+ PlumaFileBrowserWidget * obj);
static void on_action_directory_next (GtkAction * action,
- GeditFileBrowserWidget * obj);
+ PlumaFileBrowserWidget * obj);
static void on_action_directory_up (GtkAction * action,
- GeditFileBrowserWidget * obj);
+ PlumaFileBrowserWidget * obj);
static void on_action_directory_new (GtkAction * action,
- GeditFileBrowserWidget * obj);
+ PlumaFileBrowserWidget * obj);
static void on_action_file_open (GtkAction * action,
- GeditFileBrowserWidget * obj);
+ PlumaFileBrowserWidget * obj);
static void on_action_file_new (GtkAction * action,
- GeditFileBrowserWidget * obj);
+ PlumaFileBrowserWidget * obj);
static void on_action_file_rename (GtkAction * action,
- GeditFileBrowserWidget * obj);
+ PlumaFileBrowserWidget * obj);
static void on_action_file_delete (GtkAction * action,
- GeditFileBrowserWidget * obj);
+ PlumaFileBrowserWidget * obj);
static void on_action_file_move_to_trash (GtkAction * action,
- GeditFileBrowserWidget * obj);
+ PlumaFileBrowserWidget * obj);
static void on_action_directory_refresh (GtkAction * action,
- GeditFileBrowserWidget * obj);
+ PlumaFileBrowserWidget * obj);
static void on_action_directory_open (GtkAction * action,
- GeditFileBrowserWidget * obj);
+ PlumaFileBrowserWidget * obj);
static void on_action_filter_hidden (GtkAction * action,
- GeditFileBrowserWidget * obj);
+ PlumaFileBrowserWidget * obj);
static void on_action_filter_binary (GtkAction * action,
- GeditFileBrowserWidget * obj);
+ PlumaFileBrowserWidget * obj);
static void on_action_bookmark_open (GtkAction * action,
- GeditFileBrowserWidget * obj);
+ PlumaFileBrowserWidget * obj);
-GEDIT_PLUGIN_DEFINE_TYPE (GeditFileBrowserWidget, gedit_file_browser_widget,
+PLUMA_PLUGIN_DEFINE_TYPE (PlumaFileBrowserWidget, pluma_file_browser_widget,
GTK_TYPE_VBOX)
static void
@@ -256,8 +256,8 @@ free_name_icon (gpointer data)
}
static FilterFunc *
-filter_func_new (GeditFileBrowserWidget * obj,
- GeditFileBrowserWidgetFilterFunc func,
+filter_func_new (PlumaFileBrowserWidget * obj,
+ PlumaFileBrowserWidgetFilterFunc func,
gpointer user_data,
GDestroyNotify notify)
{
@@ -285,7 +285,7 @@ location_free (Location * loc)
}
static gboolean
-combo_find_by_id (GeditFileBrowserWidget * obj, guint id,
+combo_find_by_id (PlumaFileBrowserWidget * obj, guint id,
GtkTreeIter * iter)
{
guint checkid;
@@ -308,7 +308,7 @@ combo_find_by_id (GeditFileBrowserWidget * obj, guint id,
}
static void
-remove_path_items (GeditFileBrowserWidget * obj)
+remove_path_items (PlumaFileBrowserWidget * obj)
{
GtkTreeIter iter;
@@ -317,7 +317,7 @@ remove_path_items (GeditFileBrowserWidget * obj)
}
static void
-cancel_async_operation (GeditFileBrowserWidget *widget)
+cancel_async_operation (PlumaFileBrowserWidget *widget)
{
if (!widget->priv->cancellable)
return;
@@ -329,13 +329,13 @@ cancel_async_operation (GeditFileBrowserWidget *widget)
}
static void
-gedit_file_browser_widget_finalize (GObject * object)
+pluma_file_browser_widget_finalize (GObject * object)
{
- GeditFileBrowserWidget *obj = GEDIT_FILE_BROWSER_WIDGET (object);
+ PlumaFileBrowserWidget *obj = PLUMA_FILE_BROWSER_WIDGET (object);
GList *loc;
remove_path_items (obj);
- gedit_file_browser_store_set_filter_func (obj->priv->file_store,
+ pluma_file_browser_store_set_filter_func (obj->priv->file_store,
NULL, NULL);
g_object_unref (obj->priv->manager);
@@ -360,16 +360,16 @@ gedit_file_browser_widget_finalize (GObject * object)
gdk_cursor_unref (obj->priv->busy_cursor);
- G_OBJECT_CLASS (gedit_file_browser_widget_parent_class)->finalize (object);
+ G_OBJECT_CLASS (pluma_file_browser_widget_parent_class)->finalize (object);
}
static void
-gedit_file_browser_widget_get_property (GObject *object,
+pluma_file_browser_widget_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
- GeditFileBrowserWidget *obj = GEDIT_FILE_BROWSER_WIDGET (object);
+ PlumaFileBrowserWidget *obj = PLUMA_FILE_BROWSER_WIDGET (object);
switch (prop_id)
{
@@ -386,17 +386,17 @@ gedit_file_browser_widget_get_property (GObject *object,
}
static void
-gedit_file_browser_widget_set_property (GObject *object,
+pluma_file_browser_widget_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
- GeditFileBrowserWidget *obj = GEDIT_FILE_BROWSER_WIDGET (object);
+ PlumaFileBrowserWidget *obj = PLUMA_FILE_BROWSER_WIDGET (object);
switch (prop_id)
{
case PROP_FILTER_PATTERN:
- gedit_file_browser_widget_set_filter_pattern (obj,
+ pluma_file_browser_widget_set_filter_pattern (obj,
g_value_get_string (value));
break;
case PROP_ENABLE_DELETE:
@@ -409,14 +409,14 @@ gedit_file_browser_widget_set_property (GObject *object,
}
static void
-gedit_file_browser_widget_class_init (GeditFileBrowserWidgetClass * klass)
+pluma_file_browser_widget_class_init (PlumaFileBrowserWidgetClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = gedit_file_browser_widget_finalize;
+ object_class->finalize = pluma_file_browser_widget_finalize;
- object_class->get_property = gedit_file_browser_widget_get_property;
- object_class->set_property = gedit_file_browser_widget_set_property;
+ object_class->get_property = pluma_file_browser_widget_get_property;
+ object_class->set_property = pluma_file_browser_widget_set_property;
g_object_class_install_property (object_class, PROP_FILTER_PATTERN,
g_param_spec_string ("filter-pattern",
@@ -436,26 +436,26 @@ gedit_file_browser_widget_class_init (GeditFileBrowserWidgetClass * klass)
g_signal_new ("uri-activated",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GeditFileBrowserWidgetClass,
+ G_STRUCT_OFFSET (PlumaFileBrowserWidgetClass,
uri_activated), NULL, NULL,
g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1,
G_TYPE_STRING);
signals[ERROR] =
g_signal_new ("error", G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GeditFileBrowserWidgetClass,
+ G_STRUCT_OFFSET (PlumaFileBrowserWidgetClass,
error), NULL, NULL,
- gedit_file_browser_marshal_VOID__UINT_STRING,
+ pluma_file_browser_marshal_VOID__UINT_STRING,
G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING);
signals[CONFIRM_DELETE] =
g_signal_new ("confirm-delete", G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GeditFileBrowserWidgetClass,
+ G_STRUCT_OFFSET (PlumaFileBrowserWidgetClass,
confirm_delete),
g_signal_accumulator_true_handled,
NULL,
- gedit_file_browser_marshal_BOOL__OBJECT_POINTER,
+ pluma_file_browser_marshal_BOOL__OBJECT_POINTER,
G_TYPE_BOOLEAN,
2,
G_TYPE_OBJECT,
@@ -464,21 +464,21 @@ gedit_file_browser_widget_class_init (GeditFileBrowserWidgetClass * klass)
signals[CONFIRM_NO_TRASH] =
g_signal_new ("confirm-no-trash", G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GeditFileBrowserWidgetClass,
+ G_STRUCT_OFFSET (PlumaFileBrowserWidgetClass,
confirm_no_trash),
g_signal_accumulator_true_handled,
NULL,
- gedit_file_browser_marshal_BOOL__POINTER,
+ pluma_file_browser_marshal_BOOL__POINTER,
G_TYPE_BOOLEAN,
1,
G_TYPE_POINTER);
g_type_class_add_private (object_class,
- sizeof (GeditFileBrowserWidgetPrivate));
+ sizeof (PlumaFileBrowserWidgetPrivate));
}
static void
-add_signal (GeditFileBrowserWidget * obj, gpointer object, gulong id)
+add_signal (PlumaFileBrowserWidget * obj, gpointer object, gulong id)
{
SignalNode *node = g_new (SignalNode, 1);
@@ -490,7 +490,7 @@ add_signal (GeditFileBrowserWidget * obj, gpointer object, gulong id)
}
static void
-clear_signals (GeditFileBrowserWidget * obj)
+clear_signals (PlumaFileBrowserWidget * obj)
{
GSList *item;
SignalNode *node;
@@ -517,7 +517,7 @@ separator_func (GtkTreeModel * model, GtkTreeIter * iter, gpointer data)
}
static gboolean
-get_from_bookmark_file (GeditFileBrowserWidget * obj, GFile * file,
+get_from_bookmark_file (PlumaFileBrowserWidget * obj, GFile * file,
gchar ** name, GdkPixbuf ** icon)
{
gpointer data;
@@ -542,7 +542,7 @@ get_from_bookmark_file (GeditFileBrowserWidget * obj, GFile * file,
}
static void
-insert_path_item (GeditFileBrowserWidget * obj,
+insert_path_item (PlumaFileBrowserWidget * obj,
GFile * file,
GtkTreeIter * after,
GtkTreeIter * iter,
@@ -554,10 +554,10 @@ insert_path_item (GeditFileBrowserWidget * obj,
/* Try to get the icon and name from the bookmarks hash */
if (!get_from_bookmark_file (obj, file, &unescape, &icon)) {
/* It's not a bookmark, fetch the name and the icon ourselves */
- unescape = gedit_file_browser_utils_file_basename (file);
+ unescape = pluma_file_browser_utils_file_basename (file);
/* Get the icon */
- icon = gedit_file_browser_utils_pixbuf_from_file (file, GTK_ICON_SIZE_MENU);
+ icon = pluma_file_browser_utils_pixbuf_from_file (file, GTK_ICON_SIZE_MENU);
}
gtk_tree_store_insert_after (obj->priv->combo_model, iter, NULL,
@@ -579,7 +579,7 @@ insert_path_item (GeditFileBrowserWidget * obj,
}
static void
-insert_separator_item (GeditFileBrowserWidget * obj)
+insert_separator_item (PlumaFileBrowserWidget * obj)
{
GtkTreeIter iter;
@@ -591,7 +591,7 @@ insert_separator_item (GeditFileBrowserWidget * obj)
}
static void
-combo_set_active_by_id (GeditFileBrowserWidget * obj, guint id)
+combo_set_active_by_id (PlumaFileBrowserWidget * obj, guint id)
{
GtkTreeIter iter;
@@ -624,7 +624,7 @@ uri_num_parents (GFile * from, GFile * to)
}
static void
-insert_location_path (GeditFileBrowserWidget * obj)
+insert_location_path (PlumaFileBrowserWidget * obj)
{
Location *loc;
GFile *current = NULL;
@@ -661,7 +661,7 @@ insert_location_path (GeditFileBrowserWidget * obj)
obj);
}
- if (g_file_equal (current, loc->root) || !gedit_utils_file_has_parent (current)) {
+ if (g_file_equal (current, loc->root) || !pluma_utils_file_has_parent (current)) {
if (current != loc->virtual_root)
g_object_unref (current);
break;
@@ -677,7 +677,7 @@ insert_location_path (GeditFileBrowserWidget * obj)
}
static void
-check_current_item (GeditFileBrowserWidget * obj, gboolean show_path)
+check_current_item (PlumaFileBrowserWidget * obj, gboolean show_path)
{
GtkTreeIter separator;
gboolean has_sep;
@@ -695,13 +695,13 @@ check_current_item (GeditFileBrowserWidget * obj, gboolean show_path)
}
static void
-fill_combo_model (GeditFileBrowserWidget * obj)
+fill_combo_model (PlumaFileBrowserWidget * obj)
{
GtkTreeStore *store = obj->priv->combo_model;
GtkTreeIter iter;
GdkPixbuf *icon;
- icon = gedit_file_browser_utils_pixbuf_from_theme (GTK_STOCK_HOME, GTK_ICON_SIZE_MENU);
+ icon = pluma_file_browser_utils_pixbuf_from_theme (GTK_STOCK_HOME, GTK_ICON_SIZE_MENU);
gtk_tree_store_append (store, &iter, NULL);
gtk_tree_store_set (store, &iter,
@@ -738,7 +738,7 @@ indent_cell_data_func (GtkCellLayout * cell_layout,
}
static void
-create_combo (GeditFileBrowserWidget * obj)
+create_combo (PlumaFileBrowserWidget * obj)
{
GtkCellRenderer *renderer;
@@ -862,7 +862,7 @@ static const GtkActionEntry bookmark_actions[] =
};
static void
-create_toolbar (GeditFileBrowserWidget * obj,
+create_toolbar (PlumaFileBrowserWidget * obj,
const gchar *data_dir)
{
GtkUIManager *manager;
@@ -1024,7 +1024,7 @@ create_toolbar (GeditFileBrowserWidget * obj,
}
static void
-set_enable_delete (GeditFileBrowserWidget *obj,
+set_enable_delete (PlumaFileBrowserWidget *obj,
gboolean enable)
{
GtkAction *action;
@@ -1041,8 +1041,8 @@ set_enable_delete (GeditFileBrowserWidget *obj,
}
static gboolean
-filter_real (GeditFileBrowserStore * model, GtkTreeIter * iter,
- GeditFileBrowserWidget * obj)
+filter_real (PlumaFileBrowserStore * model, GtkTreeIter * iter,
+ PlumaFileBrowserWidget * obj)
{
GSList *item;
FilterFunc *func;
@@ -1058,7 +1058,7 @@ filter_real (GeditFileBrowserStore * model, GtkTreeIter * iter,
}
static void
-add_bookmark_hash (GeditFileBrowserWidget * obj,
+add_bookmark_hash (PlumaFileBrowserWidget * obj,
GtkTreeIter * iter)
{
GtkTreeModel *model;
@@ -1070,7 +1070,7 @@ add_bookmark_hash (GeditFileBrowserWidget * obj,
model = GTK_TREE_MODEL (obj->priv->bookmarks_store);
- uri = gedit_file_bookmarks_store_get_uri (obj->priv->
+ uri = pluma_file_bookmarks_store_get_uri (obj->priv->
bookmarks_store,
iter);
@@ -1081,9 +1081,9 @@ add_bookmark_hash (GeditFileBrowserWidget * obj,
g_free (uri);
gtk_tree_model_get (model, iter,
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_ICON,
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_ICON,
&pixbuf,
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_NAME,
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_NAME,
&name, -1);
item = g_new (NameIcon, 1);
@@ -1096,7 +1096,7 @@ add_bookmark_hash (GeditFileBrowserWidget * obj,
}
static void
-init_bookmarks_hash (GeditFileBrowserWidget * obj)
+init_bookmarks_hash (PlumaFileBrowserWidget * obj)
{
GtkTreeIter iter;
GtkTreeModel *model;
@@ -1122,9 +1122,9 @@ init_bookmarks_hash (GeditFileBrowserWidget * obj)
}
static void
-on_begin_loading (GeditFileBrowserStore *model,
+on_begin_loading (PlumaFileBrowserStore *model,
GtkTreeIter *iter,
- GeditFileBrowserWidget *obj)
+ PlumaFileBrowserWidget *obj)
{
if (!GDK_IS_WINDOW (gtk_widget_get_window (GTK_WIDGET (obj->priv->treeview))))
return;
@@ -1134,9 +1134,9 @@ on_begin_loading (GeditFileBrowserStore *model,
}
static void
-on_end_loading (GeditFileBrowserStore *model,
+on_end_loading (PlumaFileBrowserStore *model,
GtkTreeIter *iter,
- GeditFileBrowserWidget *obj)
+ PlumaFileBrowserWidget *obj)
{
if (!GDK_IS_WINDOW (gtk_widget_get_window (GTK_WIDGET (obj->priv->treeview))))
return;
@@ -1145,23 +1145,23 @@ on_end_loading (GeditFileBrowserStore *model,
}
static void
-create_tree (GeditFileBrowserWidget * obj)
+create_tree (PlumaFileBrowserWidget * obj)
{
GtkWidget *sw;
- obj->priv->file_store = gedit_file_browser_store_new (NULL);
- obj->priv->bookmarks_store = gedit_file_bookmarks_store_new ();
+ obj->priv->file_store = pluma_file_browser_store_new (NULL);
+ obj->priv->bookmarks_store = pluma_file_bookmarks_store_new ();
obj->priv->treeview =
- GEDIT_FILE_BROWSER_VIEW (gedit_file_browser_view_new ());
+ PLUMA_FILE_BROWSER_VIEW (pluma_file_browser_view_new ());
- gedit_file_browser_view_set_restore_expand_state (obj->priv->treeview, TRUE);
+ pluma_file_browser_view_set_restore_expand_state (obj->priv->treeview, TRUE);
- gedit_file_browser_store_set_filter_mode (obj->priv->file_store,
- GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN
+ pluma_file_browser_store_set_filter_mode (obj->priv->file_store,
+ PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN
|
- GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY);
- gedit_file_browser_store_set_filter_func (obj->priv->file_store,
- (GeditFileBrowserStoreFilterFunc)
+ PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY);
+ pluma_file_browser_store_set_filter_func (obj->priv->file_store,
+ (PlumaFileBrowserStoreFilterFunc)
filter_real, obj);
sw = gtk_scrolled_window_new (NULL, NULL);
@@ -1212,7 +1212,7 @@ create_tree (GeditFileBrowserWidget * obj)
}
static void
-create_filter (GeditFileBrowserWidget * obj)
+create_filter (PlumaFileBrowserWidget * obj)
{
GtkWidget *expander;
GtkWidget *vbox;
@@ -1244,9 +1244,9 @@ create_filter (GeditFileBrowserWidget * obj)
}
static void
-gedit_file_browser_widget_init (GeditFileBrowserWidget * obj)
+pluma_file_browser_widget_init (PlumaFileBrowserWidget * obj)
{
- obj->priv = GEDIT_FILE_BROWSER_WIDGET_GET_PRIVATE (obj);
+ obj->priv = PLUMA_FILE_BROWSER_WIDGET_GET_PRIVATE (obj);
obj->priv->bookmarks_hash = g_hash_table_new_full (g_file_hash,
(GEqualFunc)g_file_equal,
@@ -1261,30 +1261,30 @@ gedit_file_browser_widget_init (GeditFileBrowserWidget * obj)
/* Private */
static void
-update_sensitivity (GeditFileBrowserWidget * obj)
+update_sensitivity (PlumaFileBrowserWidget * obj)
{
GtkTreeModel *model =
gtk_tree_view_get_model (GTK_TREE_VIEW (obj->priv->treeview));
GtkAction *action;
gint mode;
- if (GEDIT_IS_FILE_BROWSER_STORE (model)) {
+ if (PLUMA_IS_FILE_BROWSER_STORE (model)) {
gtk_action_group_set_sensitive (obj->priv->action_group,
TRUE);
gtk_action_group_set_sensitive (obj->priv->bookmark_action_group,
FALSE);
mode =
- gedit_file_browser_store_get_filter_mode
- (GEDIT_FILE_BROWSER_STORE (model));
+ pluma_file_browser_store_get_filter_mode
+ (PLUMA_FILE_BROWSER_STORE (model));
action =
gtk_action_group_get_action (obj->priv->action_group,
"FilterHidden");
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
!(mode &
- GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN));
- } else if (GEDIT_IS_FILE_BOOKMARKS_STORE (model)) {
+ PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN));
+ } else if (PLUMA_IS_FILE_BOOKMARKS_STORE (model)) {
gtk_action_group_set_sensitive (obj->priv->action_group,
FALSE);
gtk_action_group_set_sensitive (obj->priv->bookmark_action_group,
@@ -1303,7 +1303,7 @@ update_sensitivity (GeditFileBrowserWidget * obj)
}
static gboolean
-gedit_file_browser_widget_get_first_selected (GeditFileBrowserWidget *obj,
+pluma_file_browser_widget_get_first_selected (PlumaFileBrowserWidget *obj,
GtkTreeIter *iter)
{
GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (obj->priv->treeview));
@@ -1323,13 +1323,13 @@ gedit_file_browser_widget_get_first_selected (GeditFileBrowserWidget *obj,
}
static gboolean
-popup_menu (GeditFileBrowserWidget * obj, GdkEventButton * event, GtkTreeModel * model)
+popup_menu (PlumaFileBrowserWidget * obj, GdkEventButton * event, GtkTreeModel * model)
{
GtkWidget *menu;
- if (GEDIT_IS_FILE_BROWSER_STORE (model))
+ if (PLUMA_IS_FILE_BROWSER_STORE (model))
menu = gtk_ui_manager_get_widget (obj->priv->manager, "/FilePopup");
- else if (GEDIT_IS_FILE_BOOKMARKS_STORE (model))
+ else if (PLUMA_IS_FILE_BOOKMARKS_STORE (model))
menu = gtk_ui_manager_get_widget (obj->priv->manager, "/BookmarkPopup");
else
return FALSE;
@@ -1357,7 +1357,7 @@ popup_menu (GeditFileBrowserWidget * obj, GdkEventButton * event, GtkTreeModel *
event->button, event->time);
} else {
gtk_menu_popup (GTK_MENU (menu), NULL, NULL,
- gedit_utils_menu_position_under_tree_view,
+ pluma_utils_menu_position_under_tree_view,
obj->priv->treeview, 0,
gtk_get_current_event_time ());
gtk_menu_shell_select_first (GTK_MENU_SHELL (menu), FALSE);
@@ -1367,7 +1367,7 @@ popup_menu (GeditFileBrowserWidget * obj, GdkEventButton * event, GtkTreeModel *
}
static gboolean
-filter_glob (GeditFileBrowserWidget * obj, GeditFileBrowserStore * store,
+filter_glob (PlumaFileBrowserWidget * obj, PlumaFileBrowserStore * store,
GtkTreeIter * iter, gpointer user_data)
{
gchar *name;
@@ -1378,8 +1378,8 @@ filter_glob (GeditFileBrowserWidget * obj, GeditFileBrowserStore * store,
return TRUE;
gtk_tree_model_get (GTK_TREE_MODEL (store), iter,
- GEDIT_FILE_BROWSER_STORE_COLUMN_NAME, &name,
- GEDIT_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_NAME, &name,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags,
-1);
if (FILE_IS_DIR (flags) || FILE_IS_DUMMY (flags))
@@ -1395,23 +1395,23 @@ filter_glob (GeditFileBrowserWidget * obj, GeditFileBrowserStore * store,
}
static void
-rename_selected_file (GeditFileBrowserWidget * obj)
+rename_selected_file (PlumaFileBrowserWidget * obj)
{
GtkTreeModel *model;
GtkTreeIter iter;
model = gtk_tree_view_get_model (GTK_TREE_VIEW (obj->priv->treeview));
- if (!GEDIT_IS_FILE_BROWSER_STORE (model))
+ if (!PLUMA_IS_FILE_BROWSER_STORE (model))
return;
- if (gedit_file_browser_widget_get_first_selected (obj, &iter))
- gedit_file_browser_view_start_rename (obj->priv->treeview,
+ if (pluma_file_browser_widget_get_first_selected (obj, &iter))
+ pluma_file_browser_view_start_rename (obj->priv->treeview,
&iter);
}
static GList *
-get_deletable_files (GeditFileBrowserWidget *obj) {
+get_deletable_files (PlumaFileBrowserWidget *obj) {
GtkTreeSelection *selection;
GtkTreeModel *model;
GList *rows;
@@ -1434,7 +1434,7 @@ get_deletable_files (GeditFileBrowserWidget *obj) {
continue;
gtk_tree_model_get (model, &iter,
- GEDIT_FILE_BROWSER_STORE_COLUMN_FLAGS,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_FLAGS,
&flags, -1);
if (FILE_IS_DUMMY (flags))
@@ -1450,16 +1450,16 @@ get_deletable_files (GeditFileBrowserWidget *obj) {
}
static gboolean
-delete_selected_files (GeditFileBrowserWidget * obj, gboolean trash)
+delete_selected_files (PlumaFileBrowserWidget * obj, gboolean trash)
{
GtkTreeModel *model;
gboolean confirm;
- GeditFileBrowserStoreResult result;
+ PlumaFileBrowserStoreResult result;
GList *rows;
model = gtk_tree_view_get_model (GTK_TREE_VIEW (obj->priv->treeview));
- if (!GEDIT_IS_FILE_BROWSER_STORE (model))
+ if (!PLUMA_IS_FILE_BROWSER_STORE (model))
return FALSE;
rows = get_deletable_files (obj);
@@ -1474,19 +1474,19 @@ delete_selected_files (GeditFileBrowserWidget * obj, gboolean trash)
return FALSE;
}
- result = gedit_file_browser_store_delete_all (GEDIT_FILE_BROWSER_STORE (model),
+ result = pluma_file_browser_store_delete_all (PLUMA_FILE_BROWSER_STORE (model),
rows, trash);
g_list_foreach (rows, (GFunc)gtk_tree_path_free, NULL);
g_list_free (rows);
- return result == GEDIT_FILE_BROWSER_STORE_RESULT_OK;
+ return result == PLUMA_FILE_BROWSER_STORE_RESULT_OK;
}
static gboolean
-on_file_store_no_trash (GeditFileBrowserStore * store,
+on_file_store_no_trash (PlumaFileBrowserStore * store,
GList * files,
- GeditFileBrowserWidget * obj)
+ PlumaFileBrowserWidget * obj)
{
gboolean confirm = FALSE;
@@ -1512,7 +1512,7 @@ get_topmost_file (GFile * file)
}
static GtkWidget *
-create_goto_menu_item (GeditFileBrowserWidget * obj, GList * item,
+create_goto_menu_item (PlumaFileBrowserWidget * obj, GList * item,
GdkPixbuf * icon)
{
GtkWidget *result;
@@ -1524,7 +1524,7 @@ create_goto_menu_item (GeditFileBrowserWidget * obj, GList * item,
loc = (Location *) (item->data);
if (!get_from_bookmark_file (obj, loc->virtual_root, &unescape, &pixbuf)) {
- unescape = gedit_file_browser_utils_file_basename (loc->virtual_root);
+ unescape = pluma_file_browser_utils_file_basename (loc->virtual_root);
if (icon)
pixbuf = g_object_ref (icon);
@@ -1573,7 +1573,7 @@ list_prev_iterator (GList * list)
}
static void
-jump_to_location (GeditFileBrowserWidget * obj, GList * item,
+jump_to_location (PlumaFileBrowserWidget * obj, GList * item,
gboolean previous)
{
Location *loc;
@@ -1646,7 +1646,7 @@ jump_to_location (GeditFileBrowserWidget * obj, GList * item,
root = g_file_get_uri (loc->root);
virtual_root = g_file_get_uri (loc->virtual_root);
- gedit_file_browser_widget_set_root_and_virtual_root (obj,
+ pluma_file_browser_widget_set_root_and_virtual_root (obj,
root,
virtual_root);
@@ -1657,7 +1657,7 @@ jump_to_location (GeditFileBrowserWidget * obj, GList * item,
}
static void
-clear_next_locations (GeditFileBrowserWidget * obj)
+clear_next_locations (PlumaFileBrowserWidget * obj)
{
GList *children;
GList *item;
@@ -1691,9 +1691,9 @@ clear_next_locations (GeditFileBrowserWidget * obj)
}
static void
-update_filter_mode (GeditFileBrowserWidget * obj,
+update_filter_mode (PlumaFileBrowserWidget * obj,
GtkAction * action,
- GeditFileBrowserStoreFilterMode mode)
+ PlumaFileBrowserStoreFilterMode mode)
{
gboolean active =
gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
@@ -1701,23 +1701,23 @@ update_filter_mode (GeditFileBrowserWidget * obj,
gtk_tree_view_get_model (GTK_TREE_VIEW (obj->priv->treeview));
gint now;
- if (GEDIT_IS_FILE_BROWSER_STORE (model)) {
+ if (PLUMA_IS_FILE_BROWSER_STORE (model)) {
now =
- gedit_file_browser_store_get_filter_mode
- (GEDIT_FILE_BROWSER_STORE (model));
+ pluma_file_browser_store_get_filter_mode
+ (PLUMA_FILE_BROWSER_STORE (model));
if (active)
now &= ~mode;
else
now |= mode;
- gedit_file_browser_store_set_filter_mode
- (GEDIT_FILE_BROWSER_STORE (model), now);
+ pluma_file_browser_store_set_filter_mode
+ (PLUMA_FILE_BROWSER_STORE (model), now);
}
}
static void
-set_filter_pattern_real (GeditFileBrowserWidget * obj,
+set_filter_pattern_real (PlumaFileBrowserWidget * obj,
gchar const * pattern,
gboolean update_entry)
{
@@ -1747,7 +1747,7 @@ set_filter_pattern_real (GeditFileBrowserWidget * obj,
if (pattern == NULL) {
if (obj->priv->glob_filter_id != 0) {
- gedit_file_browser_widget_remove_filter (obj,
+ pluma_file_browser_widget_remove_filter (obj,
obj->
priv->
glob_filter_id);
@@ -1758,7 +1758,7 @@ set_filter_pattern_real (GeditFileBrowserWidget * obj,
if (obj->priv->glob_filter_id == 0)
obj->priv->glob_filter_id =
- gedit_file_browser_widget_add_filter (obj,
+ pluma_file_browser_widget_add_filter (obj,
filter_glob,
NULL,
NULL);
@@ -1777,8 +1777,8 @@ set_filter_pattern_real (GeditFileBrowserWidget * obj,
}
}
- if (GEDIT_IS_FILE_BROWSER_STORE (model))
- gedit_file_browser_store_refilter (GEDIT_FILE_BROWSER_STORE
+ if (PLUMA_IS_FILE_BROWSER_STORE (model))
+ pluma_file_browser_store_refilter (PLUMA_FILE_BROWSER_STORE
(model));
g_object_notify (G_OBJECT (obj), "filter-pattern");
@@ -1788,23 +1788,23 @@ set_filter_pattern_real (GeditFileBrowserWidget * obj,
/* Public */
GtkWidget *
-gedit_file_browser_widget_new (const gchar *data_dir)
+pluma_file_browser_widget_new (const gchar *data_dir)
{
- GeditFileBrowserWidget *obj =
- g_object_new (GEDIT_TYPE_FILE_BROWSER_WIDGET, NULL);
+ PlumaFileBrowserWidget *obj =
+ g_object_new (PLUMA_TYPE_FILE_BROWSER_WIDGET, NULL);
create_toolbar (obj, data_dir);
create_combo (obj);
create_tree (obj);
create_filter (obj);
- gedit_file_browser_widget_show_bookmarks (obj);
+ pluma_file_browser_widget_show_bookmarks (obj);
return GTK_WIDGET (obj);
}
void
-gedit_file_browser_widget_show_bookmarks (GeditFileBrowserWidget * obj)
+pluma_file_browser_widget_show_bookmarks (PlumaFileBrowserWidget * obj)
{
/* Select bookmarks in the combo box */
g_signal_handlers_block_by_func (obj->priv->combo,
@@ -1815,16 +1815,16 @@ gedit_file_browser_widget_show_bookmarks (GeditFileBrowserWidget * obj)
check_current_item (obj, FALSE);
- gedit_file_browser_view_set_model (obj->priv->treeview,
+ pluma_file_browser_view_set_model (obj->priv->treeview,
GTK_TREE_MODEL (obj->priv->
bookmarks_store));
}
static void
-show_files_real (GeditFileBrowserWidget *obj,
+show_files_real (PlumaFileBrowserWidget *obj,
gboolean do_root_changed)
{
- gedit_file_browser_view_set_model (obj->priv->treeview,
+ pluma_file_browser_view_set_model (obj->priv->treeview,
GTK_TREE_MODEL (obj->priv->
file_store));
@@ -1833,33 +1833,33 @@ show_files_real (GeditFileBrowserWidget *obj,
}
void
-gedit_file_browser_widget_show_files (GeditFileBrowserWidget * obj)
+pluma_file_browser_widget_show_files (PlumaFileBrowserWidget * obj)
{
show_files_real (obj, TRUE);
}
void
-gedit_file_browser_widget_set_root_and_virtual_root (GeditFileBrowserWidget *obj,
+pluma_file_browser_widget_set_root_and_virtual_root (PlumaFileBrowserWidget *obj,
gchar const *root,
gchar const *virtual_root)
{
- GeditFileBrowserStoreResult result;
+ PlumaFileBrowserStoreResult result;
if (!virtual_root)
result =
- gedit_file_browser_store_set_root_and_virtual_root
+ pluma_file_browser_store_set_root_and_virtual_root
(obj->priv->file_store, root, root);
else
result =
- gedit_file_browser_store_set_root_and_virtual_root
+ pluma_file_browser_store_set_root_and_virtual_root
(obj->priv->file_store, root, virtual_root);
- if (result == GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE)
+ if (result == PLUMA_FILE_BROWSER_STORE_RESULT_NO_CHANGE)
show_files_real (obj, TRUE);
}
void
-gedit_file_browser_widget_set_root (GeditFileBrowserWidget * obj,
+pluma_file_browser_widget_set_root (PlumaFileBrowserWidget * obj,
gchar const *root,
gboolean virtual_root)
{
@@ -1868,7 +1868,7 @@ gedit_file_browser_widget_set_root (GeditFileBrowserWidget * obj,
gchar *str;
if (!virtual_root) {
- gedit_file_browser_widget_set_root_and_virtual_root (obj,
+ pluma_file_browser_widget_set_root_and_virtual_root (obj,
root,
NULL);
return;
@@ -1881,7 +1881,7 @@ gedit_file_browser_widget_set_root (GeditFileBrowserWidget * obj,
parent = get_topmost_file (file);
str = g_file_get_uri (parent);
- gedit_file_browser_widget_set_root_and_virtual_root
+ pluma_file_browser_widget_set_root_and_virtual_root
(obj, str, root);
g_free (str);
@@ -1890,39 +1890,39 @@ gedit_file_browser_widget_set_root (GeditFileBrowserWidget * obj,
g_object_unref (parent);
}
-GeditFileBrowserStore *
-gedit_file_browser_widget_get_browser_store (GeditFileBrowserWidget * obj)
+PlumaFileBrowserStore *
+pluma_file_browser_widget_get_browser_store (PlumaFileBrowserWidget * obj)
{
return obj->priv->file_store;
}
-GeditFileBookmarksStore *
-gedit_file_browser_widget_get_bookmarks_store (GeditFileBrowserWidget * obj)
+PlumaFileBookmarksStore *
+pluma_file_browser_widget_get_bookmarks_store (PlumaFileBrowserWidget * obj)
{
return obj->priv->bookmarks_store;
}
-GeditFileBrowserView *
-gedit_file_browser_widget_get_browser_view (GeditFileBrowserWidget * obj)
+PlumaFileBrowserView *
+pluma_file_browser_widget_get_browser_view (PlumaFileBrowserWidget * obj)
{
return obj->priv->treeview;
}
GtkUIManager *
-gedit_file_browser_widget_get_ui_manager (GeditFileBrowserWidget * obj)
+pluma_file_browser_widget_get_ui_manager (PlumaFileBrowserWidget * obj)
{
return obj->priv->manager;
}
GtkWidget *
-gedit_file_browser_widget_get_filter_entry (GeditFileBrowserWidget * obj)
+pluma_file_browser_widget_get_filter_entry (PlumaFileBrowserWidget * obj)
{
return obj->priv->filter_entry;
}
gulong
-gedit_file_browser_widget_add_filter (GeditFileBrowserWidget * obj,
- GeditFileBrowserWidgetFilterFunc func,
+pluma_file_browser_widget_add_filter (PlumaFileBrowserWidget * obj,
+ PlumaFileBrowserWidgetFilterFunc func,
gpointer user_data,
GDestroyNotify notify)
{
@@ -1934,15 +1934,15 @@ gedit_file_browser_widget_add_filter (GeditFileBrowserWidget * obj,
obj->priv->filter_funcs =
g_slist_append (obj->priv->filter_funcs, f);
- if (GEDIT_IS_FILE_BROWSER_STORE (model))
- gedit_file_browser_store_refilter (GEDIT_FILE_BROWSER_STORE
+ if (PLUMA_IS_FILE_BROWSER_STORE (model))
+ pluma_file_browser_store_refilter (PLUMA_FILE_BROWSER_STORE
(model));
return f->id;
}
void
-gedit_file_browser_widget_remove_filter (GeditFileBrowserWidget * obj,
+pluma_file_browser_widget_remove_filter (PlumaFileBrowserWidget * obj,
gulong id)
{
GSList *item;
@@ -1967,14 +1967,14 @@ gedit_file_browser_widget_remove_filter (GeditFileBrowserWidget * obj,
}
void
-gedit_file_browser_widget_set_filter_pattern (GeditFileBrowserWidget * obj,
+pluma_file_browser_widget_set_filter_pattern (PlumaFileBrowserWidget * obj,
gchar const *pattern)
{
set_filter_pattern_real (obj, pattern, TRUE);
}
gboolean
-gedit_file_browser_widget_get_selected_directory (GeditFileBrowserWidget * obj,
+pluma_file_browser_widget_get_selected_directory (PlumaFileBrowserWidget * obj,
GtkTreeIter * iter)
{
GtkTreeModel *model =
@@ -1982,17 +1982,17 @@ gedit_file_browser_widget_get_selected_directory (GeditFileBrowserWidget * obj,
GtkTreeIter parent;
guint flags;
- if (!GEDIT_IS_FILE_BROWSER_STORE (model))
+ if (!PLUMA_IS_FILE_BROWSER_STORE (model))
return FALSE;
- if (!gedit_file_browser_widget_get_first_selected (obj, iter)) {
- if (!gedit_file_browser_store_get_iter_virtual_root
- (GEDIT_FILE_BROWSER_STORE (model), iter))
+ if (!pluma_file_browser_widget_get_first_selected (obj, iter)) {
+ if (!pluma_file_browser_store_get_iter_virtual_root
+ (PLUMA_FILE_BROWSER_STORE (model), iter))
return FALSE;
}
gtk_tree_model_get (model, iter,
- GEDIT_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags,
-1);
if (!FILE_IS_DIR (flags)) {
@@ -2005,14 +2005,14 @@ gedit_file_browser_widget_get_selected_directory (GeditFileBrowserWidget * obj,
}
static guint
-gedit_file_browser_widget_get_num_selected_files_or_directories (GeditFileBrowserWidget *obj,
+pluma_file_browser_widget_get_num_selected_files_or_directories (PlumaFileBrowserWidget *obj,
guint *files,
guint *dirs)
{
GList *rows, *row;
GtkTreePath *path;
GtkTreeIter iter;
- GeditFileBrowserStoreFlag flags;
+ PlumaFileBrowserStoreFlag flags;
guint result = 0;
GtkTreeSelection *selection;
GtkTreeModel *model;
@@ -2020,7 +2020,7 @@ gedit_file_browser_widget_get_num_selected_files_or_directories (GeditFileBrowse
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (obj->priv->treeview));
model = gtk_tree_view_get_model (GTK_TREE_VIEW (obj->priv->treeview));
- if (GEDIT_IS_FILE_BOOKMARKS_STORE (model))
+ if (PLUMA_IS_FILE_BOOKMARKS_STORE (model))
return 0;
rows = gtk_tree_selection_get_selected_rows (selection, &model);
@@ -2033,7 +2033,7 @@ gedit_file_browser_widget_get_num_selected_files_or_directories (GeditFileBrowse
continue;
gtk_tree_model_get (model, &iter,
- GEDIT_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags,
-1);
if (!FILE_IS_DUMMY (flags)) {
@@ -2054,12 +2054,12 @@ gedit_file_browser_widget_get_num_selected_files_or_directories (GeditFileBrowse
typedef struct
{
- GeditFileBrowserWidget *widget;
+ PlumaFileBrowserWidget *widget;
GCancellable *cancellable;
} AsyncData;
static AsyncData *
-async_data_new (GeditFileBrowserWidget *widget)
+async_data_new (PlumaFileBrowserWidget *widget)
{
AsyncData *ret;
@@ -2082,7 +2082,7 @@ async_free (AsyncData *async)
}
static void
-set_busy (GeditFileBrowserWidget *obj, gboolean busy)
+set_busy (PlumaFileBrowserWidget *obj, gboolean busy)
{
GdkCursor *cursor;
GdkWindow *window;
@@ -2104,10 +2104,10 @@ set_busy (GeditFileBrowserWidget *obj, gboolean busy)
}
}
-static void try_mount_volume (GeditFileBrowserWidget *widget, GVolume *volume);
+static void try_mount_volume (PlumaFileBrowserWidget *widget, GVolume *volume);
static void
-activate_mount (GeditFileBrowserWidget *widget,
+activate_mount (PlumaFileBrowserWidget *widget,
GVolume *volume,
GMount *mount)
{
@@ -2125,7 +2125,7 @@ activate_mount (GeditFileBrowserWidget *widget,
g_signal_emit (widget,
signals[ERROR],
0,
- GEDIT_FILE_BROWSER_ERROR_SET_ROOT,
+ PLUMA_FILE_BROWSER_ERROR_SET_ROOT,
message);
g_free (name);
@@ -2136,14 +2136,14 @@ activate_mount (GeditFileBrowserWidget *widget,
root = g_mount_get_root (mount);
uri = g_file_get_uri (root);
- gedit_file_browser_widget_set_root (widget, uri, FALSE);
+ pluma_file_browser_widget_set_root (widget, uri, FALSE);
g_free (uri);
g_object_unref (root);
}
static void
-try_activate_drive (GeditFileBrowserWidget *widget,
+try_activate_drive (PlumaFileBrowserWidget *widget,
GDrive *drive)
{
GList *volumes;
@@ -2205,7 +2205,7 @@ poll_for_media_cb (GDrive *drive,
g_signal_emit (async->widget,
signals[ERROR],
0,
- GEDIT_FILE_BROWSER_ERROR_SET_ROOT,
+ PLUMA_FILE_BROWSER_ERROR_SET_ROOT,
message);
g_free (name);
@@ -2252,7 +2252,7 @@ mount_volume_cb (GVolume *volume,
g_signal_emit (async->widget,
signals[ERROR],
0,
- GEDIT_FILE_BROWSER_ERROR_SET_ROOT,
+ PLUMA_FILE_BROWSER_ERROR_SET_ROOT,
message);
g_free (name);
@@ -2266,14 +2266,14 @@ mount_volume_cb (GVolume *volume,
}
static void
-activate_drive (GeditFileBrowserWidget *obj,
+activate_drive (PlumaFileBrowserWidget *obj,
GtkTreeIter *iter)
{
GDrive *drive;
AsyncData *async;
gtk_tree_model_get (GTK_TREE_MODEL (obj->priv->bookmarks_store), iter,
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_OBJECT,
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_OBJECT,
&drive, -1);
/* most common use case is a floppy drive, we'll poll for media and
@@ -2289,7 +2289,7 @@ activate_drive (GeditFileBrowserWidget *obj,
}
static void
-try_mount_volume (GeditFileBrowserWidget *widget,
+try_mount_volume (PlumaFileBrowserWidget *widget,
GVolume *volume)
{
GMountOperation *operation;
@@ -2310,13 +2310,13 @@ try_mount_volume (GeditFileBrowserWidget *widget,
}
static void
-activate_volume (GeditFileBrowserWidget *obj,
+activate_volume (PlumaFileBrowserWidget *obj,
GtkTreeIter *iter)
{
GVolume *volume;
gtk_tree_model_get (GTK_TREE_MODEL (obj->priv->bookmarks_store), iter,
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_OBJECT,
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_OBJECT,
&volume, -1);
/* see if we can mount the volume */
@@ -2325,25 +2325,25 @@ activate_volume (GeditFileBrowserWidget *obj,
}
void
-gedit_file_browser_widget_refresh (GeditFileBrowserWidget *obj)
+pluma_file_browser_widget_refresh (PlumaFileBrowserWidget *obj)
{
GtkTreeModel *model =
gtk_tree_view_get_model (GTK_TREE_VIEW (obj->priv->treeview));
- if (GEDIT_IS_FILE_BROWSER_STORE (model))
- gedit_file_browser_store_refresh (GEDIT_FILE_BROWSER_STORE
+ if (PLUMA_IS_FILE_BROWSER_STORE (model))
+ pluma_file_browser_store_refresh (PLUMA_FILE_BROWSER_STORE
(model));
- else if (GEDIT_IS_FILE_BOOKMARKS_STORE (model)) {
+ else if (PLUMA_IS_FILE_BOOKMARKS_STORE (model)) {
g_hash_table_ref (obj->priv->bookmarks_hash);
g_hash_table_destroy (obj->priv->bookmarks_hash);
- gedit_file_bookmarks_store_refresh
- (GEDIT_FILE_BOOKMARKS_STORE (model));
+ pluma_file_bookmarks_store_refresh
+ (PLUMA_FILE_BOOKMARKS_STORE (model));
}
}
void
-gedit_file_browser_widget_history_back (GeditFileBrowserWidget *obj)
+pluma_file_browser_widget_history_back (PlumaFileBrowserWidget *obj)
{
if (obj->priv->locations) {
if (obj->priv->current_location)
@@ -2357,7 +2357,7 @@ gedit_file_browser_widget_history_back (GeditFileBrowserWidget *obj)
}
void
-gedit_file_browser_widget_history_forward (GeditFileBrowserWidget *obj)
+pluma_file_browser_widget_history_forward (PlumaFileBrowserWidget *obj)
{
if (obj->priv->locations)
jump_to_location (obj, obj->priv->current_location->prev,
@@ -2365,7 +2365,7 @@ gedit_file_browser_widget_history_forward (GeditFileBrowserWidget *obj)
}
static void
-bookmark_open (GeditFileBrowserWidget *obj,
+bookmark_open (PlumaFileBrowserWidget *obj,
GtkTreeModel *model,
GtkTreeIter *iter)
{
@@ -2373,27 +2373,27 @@ bookmark_open (GeditFileBrowserWidget *obj,
gint flags;
gtk_tree_model_get (model, iter,
- GEDIT_FILE_BOOKMARKS_STORE_COLUMN_FLAGS,
+ PLUMA_FILE_BOOKMARKS_STORE_COLUMN_FLAGS,
&flags, -1);
- if (flags & GEDIT_FILE_BOOKMARKS_STORE_IS_DRIVE)
+ if (flags & PLUMA_FILE_BOOKMARKS_STORE_IS_DRIVE)
{
/* handle a drive node */
- gedit_file_browser_store_cancel_mount_operation (obj->priv->file_store);
+ pluma_file_browser_store_cancel_mount_operation (obj->priv->file_store);
activate_drive (obj, iter);
return;
}
- else if (flags & GEDIT_FILE_BOOKMARKS_STORE_IS_VOLUME)
+ else if (flags & PLUMA_FILE_BOOKMARKS_STORE_IS_VOLUME)
{
/* handle a volume node */
- gedit_file_browser_store_cancel_mount_operation (obj->priv->file_store);
+ pluma_file_browser_store_cancel_mount_operation (obj->priv->file_store);
activate_volume (obj, iter);
return;
}
uri =
- gedit_file_bookmarks_store_get_uri
- (GEDIT_FILE_BOOKMARKS_STORE (model), iter);
+ pluma_file_bookmarks_store_get_uri
+ (PLUMA_FILE_BOOKMARKS_STORE (model), iter);
if (uri) {
/* here we check if the bookmark is a mount point, or if it
@@ -2401,13 +2401,13 @@ bookmark_open (GeditFileBrowserWidget *obj,
root to the uri of the bookmark and not try to set the
topmost parent as root (since that may as well not be the
mount point anymore) */
- if ((flags & GEDIT_FILE_BOOKMARKS_STORE_IS_MOUNT) ||
- (flags & GEDIT_FILE_BOOKMARKS_STORE_IS_REMOTE_BOOKMARK)) {
- gedit_file_browser_widget_set_root (obj,
+ if ((flags & PLUMA_FILE_BOOKMARKS_STORE_IS_MOUNT) ||
+ (flags & PLUMA_FILE_BOOKMARKS_STORE_IS_REMOTE_BOOKMARK)) {
+ pluma_file_browser_widget_set_root (obj,
uri,
FALSE);
} else {
- gedit_file_browser_widget_set_root (obj,
+ pluma_file_browser_widget_set_root (obj,
uri,
TRUE);
}
@@ -2419,7 +2419,7 @@ bookmark_open (GeditFileBrowserWidget *obj,
}
static void
-file_open (GeditFileBrowserWidget *obj,
+file_open (PlumaFileBrowserWidget *obj,
GtkTreeModel *model,
GtkTreeIter *iter)
{
@@ -2427,8 +2427,8 @@ file_open (GeditFileBrowserWidget *obj,
gint flags;
gtk_tree_model_get (model, iter,
- GEDIT_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags,
- GEDIT_FILE_BROWSER_STORE_COLUMN_URI, &uri,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_URI, &uri,
-1);
if (!FILE_IS_DIR (flags) && !FILE_IS_DUMMY (flags)) {
@@ -2439,18 +2439,18 @@ file_open (GeditFileBrowserWidget *obj,
}
static gboolean
-directory_open (GeditFileBrowserWidget *obj,
+directory_open (PlumaFileBrowserWidget *obj,
GtkTreeModel *model,
GtkTreeIter *iter)
{
gboolean result = FALSE;
GError *error = NULL;
gchar *uri = NULL;
- GeditFileBrowserStoreFlag flags;
+ PlumaFileBrowserStoreFlag flags;
gtk_tree_model_get (model, iter,
- GEDIT_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags,
- GEDIT_FILE_BROWSER_STORE_COLUMN_URI, &uri,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_URI, &uri,
-1);
if (FILE_IS_DIR (flags)) {
@@ -2458,7 +2458,7 @@ directory_open (GeditFileBrowserWidget *obj,
if (!gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (obj)), uri, GDK_CURRENT_TIME, &error)) {
g_signal_emit (obj, signals[ERROR], 0,
- GEDIT_FILE_BROWSER_ERROR_OPEN_DIRECTORY,
+ PLUMA_FILE_BROWSER_ERROR_OPEN_DIRECTORY,
error->message);
g_error_free (error);
@@ -2472,9 +2472,9 @@ directory_open (GeditFileBrowserWidget *obj,
}
static void
-on_bookmark_activated (GeditFileBrowserView *tree_view,
+on_bookmark_activated (PlumaFileBrowserView *tree_view,
GtkTreeIter *iter,
- GeditFileBrowserWidget *obj)
+ PlumaFileBrowserWidget *obj)
{
GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view));
@@ -2482,9 +2482,9 @@ on_bookmark_activated (GeditFileBrowserView *tree_view,
}
static void
-on_file_activated (GeditFileBrowserView *tree_view,
+on_file_activated (PlumaFileBrowserView *tree_view,
GtkTreeIter *iter,
- GeditFileBrowserWidget *obj)
+ PlumaFileBrowserWidget *obj)
{
GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view));
@@ -2492,25 +2492,25 @@ on_file_activated (GeditFileBrowserView *tree_view,
}
static gboolean
-virtual_root_is_root (GeditFileBrowserWidget * obj,
- GeditFileBrowserStore * model)
+virtual_root_is_root (PlumaFileBrowserWidget * obj,
+ PlumaFileBrowserStore * model)
{
GtkTreeIter root;
GtkTreeIter virtual_root;
- if (!gedit_file_browser_store_get_iter_root (model, &root))
+ if (!pluma_file_browser_store_get_iter_root (model, &root))
return TRUE;
- if (!gedit_file_browser_store_get_iter_virtual_root (model, &virtual_root))
+ if (!pluma_file_browser_store_get_iter_virtual_root (model, &virtual_root))
return TRUE;
- return gedit_file_browser_store_iter_equal (model, &root, &virtual_root);
+ return pluma_file_browser_store_iter_equal (model, &root, &virtual_root);
}
static void
-on_virtual_root_changed (GeditFileBrowserStore * model,
+on_virtual_root_changed (PlumaFileBrowserStore * model,
GParamSpec * param,
- GeditFileBrowserWidget * obj)
+ PlumaFileBrowserWidget * obj)
{
GtkTreeIter iter;
gchar *uri;
@@ -2526,19 +2526,19 @@ on_virtual_root_changed (GeditFileBrowserStore * model,
show_files_real (obj, FALSE);
}
- if (gedit_file_browser_store_get_iter_virtual_root (model, &iter)) {
+ if (pluma_file_browser_store_get_iter_virtual_root (model, &iter)) {
gtk_tree_model_get (GTK_TREE_MODEL (model), &iter,
- GEDIT_FILE_BROWSER_STORE_COLUMN_URI,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_URI,
&uri, -1);
- if (gedit_file_browser_store_get_iter_root (model, &root)) {
+ if (pluma_file_browser_store_get_iter_root (model, &root)) {
if (!obj->priv->changing_location) {
/* Remove all items from obj->priv->current_location on */
if (obj->priv->current_location)
clear_next_locations (obj);
root_uri =
- gedit_file_browser_store_get_root
+ pluma_file_browser_store_get_root
(model);
loc = g_new (Location, 1);
@@ -2563,7 +2563,7 @@ on_virtual_root_changed (GeditFileBrowserStore * model,
gtk_tree_model_get (GTK_TREE_MODEL (model),
&iter,
- GEDIT_FILE_BROWSER_STORE_COLUMN_ICON,
+ PLUMA_FILE_BROWSER_STORE_COLUMN_ICON,
&pixbuf, -1);
obj->priv->current_location =
@@ -2621,7 +2621,7 @@ on_virtual_root_changed (GeditFileBrowserStore * model,
static void
on_model_set (GObject * gobject, GParamSpec * arg1,
- GeditFileBrowserWidget * obj)
+ PlumaFileBrowserWidget * obj)
{
GtkTreeModel *model;
@@ -2629,7 +2629,7 @@ on_model_set (GObject * gobject, GParamSpec * arg1,
clear_signals (obj);
- if (GEDIT_IS_FILE_BOOKMARKS_STORE (model)) {
+ if (PLUMA_IS_FILE_BOOKMARKS_STORE (model)) {
clear_next_locations (obj);
/* Add the current location to the back menu */
@@ -2654,7 +2654,7 @@ on_model_set (GObject * gobject, GParamSpec * arg1,
g_signal_connect (gobject, "bookmark-activated",
G_CALLBACK
(on_bookmark_activated), obj));
- } else if (GEDIT_IS_FILE_BROWSER_STORE (model)) {
+ } else if (PLUMA_IS_FILE_BROWSER_STORE (model)) {
/* make sure any async operation is cancelled */
cancel_async_operation (obj);
@@ -2675,21 +2675,21 @@ on_model_set (GObject * gobject, GParamSpec * arg1,
}
static void
-on_file_store_error (GeditFileBrowserStore * store, guint code,
- gchar * message, GeditFileBrowserWidget * obj)
+on_file_store_error (PlumaFileBrowserStore * store, guint code,
+ gchar * message, PlumaFileBrowserWidget * obj)
{
g_signal_emit (obj, signals[ERROR], 0, code, message);
}
static void
-on_treeview_error (GeditFileBrowserView * tree_view, guint code,
- gchar * message, GeditFileBrowserWidget * obj)
+on_treeview_error (PlumaFileBrowserView * tree_view, guint code,
+ gchar * message, PlumaFileBrowserWidget * obj)
{
g_signal_emit (obj, signals[ERROR], 0, code, message);
}
static void
-on_combo_changed (GtkComboBox * combo, GeditFileBrowserWidget * obj)
+on_combo_changed (GtkComboBox * combo, PlumaFileBrowserWidget * obj)
{
GtkTreeIter iter;
guint id;
@@ -2704,7 +2704,7 @@ on_combo_changed (GtkComboBox * combo, GeditFileBrowserWidget * obj)
switch (id) {
case BOOKMARKS_ID:
- gedit_file_browser_widget_show_bookmarks (obj);
+ pluma_file_browser_widget_show_bookmarks (obj);
break;
case PATH_ID:
@@ -2713,7 +2713,7 @@ on_combo_changed (GtkComboBox * combo, GeditFileBrowserWidget * obj)
COLUMN_FILE, &file, -1);
uri = g_file_get_uri (file);
- gedit_file_browser_store_set_virtual_root_from_string
+ pluma_file_browser_store_set_virtual_root_from_string
(obj->priv->file_store, uri);
g_free (uri);
@@ -2723,16 +2723,16 @@ on_combo_changed (GtkComboBox * combo, GeditFileBrowserWidget * obj)
}
static gboolean
-on_treeview_popup_menu (GeditFileBrowserView * treeview,
- GeditFileBrowserWidget * obj)
+on_treeview_popup_menu (PlumaFileBrowserView * treeview,
+ PlumaFileBrowserWidget * obj)
{
return popup_menu (obj, NULL, gtk_tree_view_get_model (GTK_TREE_VIEW (treeview)));
}
static gboolean
-on_treeview_button_press_event (GeditFileBrowserView * treeview,
+on_treeview_button_press_event (PlumaFileBrowserView * treeview,
GdkEventButton * event,
- GeditFileBrowserWidget * obj)
+ PlumaFileBrowserWidget * obj)
{
if (event->type == GDK_BUTTON_PRESS && event->button == 3) {
return popup_menu (obj, event,
@@ -2743,7 +2743,7 @@ on_treeview_button_press_event (GeditFileBrowserView * treeview,
}
static gboolean
-do_change_directory (GeditFileBrowserWidget * obj,
+do_change_directory (PlumaFileBrowserWidget * obj,
GdkEventKey * event)
{
GtkAction * action = NULL;
@@ -2787,16 +2787,16 @@ do_change_directory (GeditFileBrowserWidget * obj,
}
static gboolean
-on_treeview_key_press_event (GeditFileBrowserView * treeview,
+on_treeview_key_press_event (PlumaFileBrowserView * treeview,
GdkEventKey * event,
- GeditFileBrowserWidget * obj)
+ PlumaFileBrowserWidget * obj)
{
guint modifiers;
if (do_change_directory (obj, event))
return TRUE;
- if (!GEDIT_IS_FILE_BROWSER_STORE
+ if (!PLUMA_IS_FILE_BROWSER_STORE
(gtk_tree_view_get_model (GTK_TREE_VIEW (treeview))))
return FALSE;
@@ -2828,7 +2828,7 @@ on_treeview_key_press_event (GeditFileBrowserView * treeview,
static void
on_selection_changed (GtkTreeSelection * selection,
- GeditFileBrowserWidget * obj)
+ PlumaFileBrowserWidget * obj)
{
GtkTreeModel *model;
guint selected = 0;
@@ -2837,9 +2837,9 @@ on_selection_changed (GtkTreeSelection * selection,
model = gtk_tree_view_get_model (GTK_TREE_VIEW (obj->priv->treeview));
- if (GEDIT_IS_FILE_BROWSER_STORE (model))
+ if (PLUMA_IS_FILE_BROWSER_STORE (model))
{
- selected = gedit_file_browser_widget_get_num_selected_files_or_directories (obj,
+ selected = pluma_file_browser_widget_get_num_selected_files_or_directories (obj,
&files,
&dirs);
}
@@ -2855,7 +2855,7 @@ on_selection_changed (GtkTreeSelection * selection,
}
static gboolean
-on_entry_filter_activate (GeditFileBrowserWidget * obj)
+on_entry_filter_activate (PlumaFileBrowserWidget * obj)
{
gchar const *text;
@@ -2867,7 +2867,7 @@ on_entry_filter_activate (GeditFileBrowserWidget * obj)
static void
on_location_jump_activate (GtkMenuItem * item,
- GeditFileBrowserWidget * obj)
+ PlumaFileBrowserWidget * obj)
{
GList *location;
@@ -2890,7 +2890,7 @@ static void
on_bookmarks_row_changed (GtkTreeModel * model,
GtkTreePath * path,
GtkTreeIter * iter,
- GeditFileBrowserWidget *obj)
+ PlumaFileBrowserWidget *obj)
{
add_bookmark_hash (obj, iter);
}
@@ -2898,7 +2898,7 @@ on_bookmarks_row_changed (GtkTreeModel * model,
static void
on_bookmarks_row_deleted (GtkTreeModel * model,
GtkTreePath * path,
- GeditFileBrowserWidget *obj)
+ PlumaFileBrowserWidget *obj)
{
GtkTreeIter iter;
gchar * uri;
@@ -2907,7 +2907,7 @@ on_bookmarks_row_deleted (GtkTreeModel * model,
if (!gtk_tree_model_get_iter (model, &iter, path))
return;
- uri = gedit_file_bookmarks_store_get_uri (obj->priv->bookmarks_store, &iter);
+ uri = pluma_file_bookmarks_store_get_uri (obj->priv->bookmarks_store, &iter);
if (!uri)
return;
@@ -2920,60 +2920,60 @@ on_bookmarks_row_deleted (GtkTreeModel * model,
}
static void
-on_filter_mode_changed (GeditFileBrowserStore * model,
+on_filter_mode_changed (PlumaFileBrowserStore * model,
GParamSpec * param,
- GeditFileBrowserWidget * obj)
+ PlumaFileBrowserWidget * obj)
{
gint mode;
GtkToggleAction * action;
gboolean active;
- mode = gedit_file_browser_store_get_filter_mode (model);
+ mode = pluma_file_browser_store_get_filter_mode (model);
action = GTK_TOGGLE_ACTION (gtk_action_group_get_action (obj->priv->action_group,
"FilterHidden"));
- active = !(mode & GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN);
+ active = !(mode & PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN);
if (active != gtk_toggle_action_get_active (action))
gtk_toggle_action_set_active (action, active);
action = GTK_TOGGLE_ACTION (gtk_action_group_get_action (obj->priv->action_group,
"FilterBinary"));
- active = !(mode & GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY);
+ active = !(mode & PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY);
if (active != gtk_toggle_action_get_active (action))
gtk_toggle_action_set_active (action, active);
}
static void
-on_action_directory_next (GtkAction * action, GeditFileBrowserWidget * obj)
+on_action_directory_next (GtkAction * action, PlumaFileBrowserWidget * obj)
{
- gedit_file_browser_widget_history_forward (obj);
+ pluma_file_browser_widget_history_forward (obj);
}
static void
on_action_directory_previous (GtkAction * action,
- GeditFileBrowserWidget * obj)
+ PlumaFileBrowserWidget * obj)
{
- gedit_file_browser_widget_history_back (obj);
+ pluma_file_browser_widget_history_back (obj);
}
static void
on_action_directory_up (GtkAction * action,
- GeditFileBrowserWidget * obj)
+ PlumaFileBrowserWidget * obj)
{
GtkTreeModel *model;
model = gtk_tree_view_get_model (GTK_TREE_VIEW (obj->priv->treeview));
- if (!GEDIT_IS_FILE_BROWSER_STORE (model))
+ if (!PLUMA_IS_FILE_BROWSER_STORE (model))
return;
- gedit_file_browser_store_set_virtual_root_up (GEDIT_FILE_BROWSER_STORE (model));
+ pluma_file_browser_store_set_virtual_root_up (PLUMA_FILE_BROWSER_STORE (model));
}
static void
-on_action_directory_new (GtkAction * action, GeditFileBrowserWidget * obj)
+on_action_directory_new (GtkAction * action, PlumaFileBrowserWidget * obj)
{
GtkTreeModel *model;
GtkTreeIter parent;
@@ -2981,21 +2981,21 @@ on_action_directory_new (GtkAction * action, GeditFileBrowserWidget * obj)
model = gtk_tree_view_get_model (GTK_TREE_VIEW (obj->priv->treeview));
- if (!GEDIT_IS_FILE_BROWSER_STORE (model))
+ if (!PLUMA_IS_FILE_BROWSER_STORE (model))
return;
- if (!gedit_file_browser_widget_get_selected_directory (obj, &parent))
+ if (!pluma_file_browser_widget_get_selected_directory (obj, &parent))
return;
- if (gedit_file_browser_store_new_directory
- (GEDIT_FILE_BROWSER_STORE (model), &parent, &iter)) {
- gedit_file_browser_view_start_rename (obj->priv->treeview,
+ if (pluma_file_browser_store_new_directory
+ (PLUMA_FILE_BROWSER_STORE (model), &parent, &iter)) {
+ pluma_file_browser_view_start_rename (obj->priv->treeview,
&iter);
}
}
static void
-on_action_file_open (GtkAction * action, GeditFileBrowserWidget * obj)
+on_action_file_open (GtkAction * action, PlumaFileBrowserWidget * obj)
{
GtkTreeModel *model;
GtkTreeSelection *selection;
@@ -3007,7 +3007,7 @@ on_action_file_open (GtkAction * action, GeditFileBrowserWidget * obj)
model = gtk_tree_view_get_model (GTK_TREE_VIEW (obj->priv->treeview));
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (obj->priv->treeview));
- if (!GEDIT_IS_FILE_BROWSER_STORE (model))
+ if (!PLUMA_IS_FILE_BROWSER_STORE (model))
return;
rows = gtk_tree_selection_get_selected_rows (selection, &model);
@@ -3025,7 +3025,7 @@ on_action_file_open (GtkAction * action, GeditFileBrowserWidget * obj)
}
static void
-on_action_file_new (GtkAction * action, GeditFileBrowserWidget * obj)
+on_action_file_new (GtkAction * action, PlumaFileBrowserWidget * obj)
{
GtkTreeModel *model;
GtkTreeIter parent;
@@ -3033,46 +3033,46 @@ on_action_file_new (GtkAction * action, GeditFileBrowserWidget * obj)
model = gtk_tree_view_get_model (GTK_TREE_VIEW (obj->priv->treeview));
- if (!GEDIT_IS_FILE_BROWSER_STORE (model))
+ if (!PLUMA_IS_FILE_BROWSER_STORE (model))
return;
- if (!gedit_file_browser_widget_get_selected_directory (obj, &parent))
+ if (!pluma_file_browser_widget_get_selected_directory (obj, &parent))
return;
- if (gedit_file_browser_store_new_file
- (GEDIT_FILE_BROWSER_STORE (model), &parent, &iter)) {
- gedit_file_browser_view_start_rename (obj->priv->treeview,
+ if (pluma_file_browser_store_new_file
+ (PLUMA_FILE_BROWSER_STORE (model), &parent, &iter)) {
+ pluma_file_browser_view_start_rename (obj->priv->treeview,
&iter);
}
}
static void
-on_action_file_rename (GtkAction * action, GeditFileBrowserWidget * obj)
+on_action_file_rename (GtkAction * action, PlumaFileBrowserWidget * obj)
{
rename_selected_file (obj);
}
static void
-on_action_file_delete (GtkAction * action, GeditFileBrowserWidget * obj)
+on_action_file_delete (GtkAction * action, PlumaFileBrowserWidget * obj)
{
delete_selected_files (obj, FALSE);
}
static void
-on_action_file_move_to_trash (GtkAction * action, GeditFileBrowserWidget * obj)
+on_action_file_move_to_trash (GtkAction * action, PlumaFileBrowserWidget * obj)
{
delete_selected_files (obj, TRUE);
}
static void
on_action_directory_refresh (GtkAction * action,
- GeditFileBrowserWidget * obj)
+ PlumaFileBrowserWidget * obj)
{
- gedit_file_browser_widget_refresh (obj);
+ pluma_file_browser_widget_refresh (obj);
}
static void
-on_action_directory_open (GtkAction * action, GeditFileBrowserWidget * obj)
+on_action_directory_open (GtkAction * action, PlumaFileBrowserWidget * obj)
{
GtkTreeModel *model;
GtkTreeSelection *selection;
@@ -3085,7 +3085,7 @@ on_action_directory_open (GtkAction * action, GeditFileBrowserWidget * obj)
model = gtk_tree_view_get_model (GTK_TREE_VIEW (obj->priv->treeview));
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (obj->priv->treeview));
- if (!GEDIT_IS_FILE_BROWSER_STORE (model))
+ if (!PLUMA_IS_FILE_BROWSER_STORE (model))
return;
rows = gtk_tree_selection_get_selected_rows (selection, &model);
@@ -3100,7 +3100,7 @@ on_action_directory_open (GtkAction * action, GeditFileBrowserWidget * obj)
}
if (!directory_opened) {
- if (gedit_file_browser_widget_get_selected_directory (obj, &iter))
+ if (pluma_file_browser_widget_get_selected_directory (obj, &iter))
directory_open (obj, model, &iter);
}
@@ -3108,23 +3108,23 @@ on_action_directory_open (GtkAction * action, GeditFileBrowserWidget * obj)
}
static void
-on_action_filter_hidden (GtkAction * action, GeditFileBrowserWidget * obj)
+on_action_filter_hidden (GtkAction * action, PlumaFileBrowserWidget * obj)
{
update_filter_mode (obj,
action,
- GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN);
+ PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_HIDDEN);
}
static void
-on_action_filter_binary (GtkAction * action, GeditFileBrowserWidget * obj)
+on_action_filter_binary (GtkAction * action, PlumaFileBrowserWidget * obj)
{
update_filter_mode (obj,
action,
- GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY);
+ PLUMA_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY);
}
static void
-on_action_bookmark_open (GtkAction * action, GeditFileBrowserWidget * obj)
+on_action_bookmark_open (GtkAction * action, PlumaFileBrowserWidget * obj)
{
GtkTreeModel *model;
GtkTreeSelection *selection;
@@ -3133,7 +3133,7 @@ on_action_bookmark_open (GtkAction * action, GeditFileBrowserWidget * obj)
model = gtk_tree_view_get_model (GTK_TREE_VIEW (obj->priv->treeview));
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (obj->priv->treeview));
- if (!GEDIT_IS_FILE_BOOKMARKS_STORE (model))
+ if (!PLUMA_IS_FILE_BOOKMARKS_STORE (model))
return;
if (gtk_tree_selection_get_selected (selection, NULL, &iter))
diff --git a/plugins/filebrowser/pluma-file-browser-widget.h b/plugins/filebrowser/pluma-file-browser-widget.h
new file mode 100755
index 00000000..4d7f43ef
--- /dev/null
+++ b/plugins/filebrowser/pluma-file-browser-widget.h
@@ -0,0 +1,121 @@
+/*
+ * pluma-file-browser-widget.h - Pluma plugin providing easy file access
+ * from the sidepanel
+ *
+ * Copyright (C) 2006 - Jesse van den Kieboom <[email protected]>
+ *
+ * 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __PLUMA_FILE_BROWSER_WIDGET_H__
+#define __PLUMA_FILE_BROWSER_WIDGET_H__
+
+#include <gtk/gtk.h>
+#include "pluma-file-browser-store.h"
+#include "pluma-file-bookmarks-store.h"
+#include "pluma-file-browser-view.h"
+
+G_BEGIN_DECLS
+#define PLUMA_TYPE_FILE_BROWSER_WIDGET (pluma_file_browser_widget_get_type ())
+#define PLUMA_FILE_BROWSER_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PLUMA_TYPE_FILE_BROWSER_WIDGET, PlumaFileBrowserWidget))
+#define PLUMA_FILE_BROWSER_WIDGET_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PLUMA_TYPE_FILE_BROWSER_WIDGET, PlumaFileBrowserWidget const))
+#define PLUMA_FILE_BROWSER_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PLUMA_TYPE_FILE_BROWSER_WIDGET, PlumaFileBrowserWidgetClass))
+#define PLUMA_IS_FILE_BROWSER_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PLUMA_TYPE_FILE_BROWSER_WIDGET))
+#define PLUMA_IS_FILE_BROWSER_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PLUMA_TYPE_FILE_BROWSER_WIDGET))
+#define PLUMA_FILE_BROWSER_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PLUMA_TYPE_FILE_BROWSER_WIDGET, PlumaFileBrowserWidgetClass))
+
+typedef struct _PlumaFileBrowserWidget PlumaFileBrowserWidget;
+typedef struct _PlumaFileBrowserWidgetClass PlumaFileBrowserWidgetClass;
+typedef struct _PlumaFileBrowserWidgetPrivate PlumaFileBrowserWidgetPrivate;
+
+typedef
+gboolean (*PlumaFileBrowserWidgetFilterFunc) (PlumaFileBrowserWidget * obj,
+ PlumaFileBrowserStore *
+ model, GtkTreeIter * iter,
+ gpointer user_data);
+
+struct _PlumaFileBrowserWidget
+{
+ GtkVBox parent;
+
+ PlumaFileBrowserWidgetPrivate *priv;
+};
+
+struct _PlumaFileBrowserWidgetClass
+{
+ GtkVBoxClass parent_class;
+
+ /* Signals */
+ void (*uri_activated) (PlumaFileBrowserWidget * widget,
+ gchar const *uri);
+ void (*error) (PlumaFileBrowserWidget * widget,
+ guint code,
+ gchar const *message);
+ gboolean (*confirm_delete) (PlumaFileBrowserWidget * widget,
+ PlumaFileBrowserStore * model,
+ GList *list);
+ gboolean (*confirm_no_trash) (PlumaFileBrowserWidget * widget,
+ GList *list);
+};
+
+GType pluma_file_browser_widget_get_type (void) G_GNUC_CONST;
+GType pluma_file_browser_widget_register_type (GTypeModule * module);
+
+GtkWidget *pluma_file_browser_widget_new (const gchar *data_dir);
+
+void pluma_file_browser_widget_show_bookmarks (PlumaFileBrowserWidget * obj);
+void pluma_file_browser_widget_show_files (PlumaFileBrowserWidget * obj);
+
+void pluma_file_browser_widget_set_root (PlumaFileBrowserWidget * obj,
+ gchar const *root,
+ gboolean virtual_root);
+void
+pluma_file_browser_widget_set_root_and_virtual_root (PlumaFileBrowserWidget * obj,
+ gchar const *root,
+ gchar const *virtual_root);
+
+gboolean
+pluma_file_browser_widget_get_selected_directory (PlumaFileBrowserWidget * obj,
+ GtkTreeIter * iter);
+
+PlumaFileBrowserStore *
+pluma_file_browser_widget_get_browser_store (PlumaFileBrowserWidget * obj);
+PlumaFileBookmarksStore *
+pluma_file_browser_widget_get_bookmarks_store (PlumaFileBrowserWidget * obj);
+PlumaFileBrowserView *
+pluma_file_browser_widget_get_browser_view (PlumaFileBrowserWidget * obj);
+GtkWidget *
+pluma_file_browser_widget_get_filter_entry (PlumaFileBrowserWidget * obj);
+
+GtkUIManager *
+pluma_file_browser_widget_get_ui_manager (PlumaFileBrowserWidget * obj);
+
+gulong pluma_file_browser_widget_add_filter (PlumaFileBrowserWidget * obj,
+ PlumaFileBrowserWidgetFilterFunc func,
+ gpointer user_data,
+ GDestroyNotify notify);
+void pluma_file_browser_widget_remove_filter (PlumaFileBrowserWidget * obj,
+ gulong id);
+void pluma_file_browser_widget_set_filter_pattern (PlumaFileBrowserWidget * obj,
+ gchar const *pattern);
+
+void pluma_file_browser_widget_refresh (PlumaFileBrowserWidget * obj);
+void pluma_file_browser_widget_history_back (PlumaFileBrowserWidget * obj);
+void pluma_file_browser_widget_history_forward (PlumaFileBrowserWidget * obj);
+
+G_END_DECLS
+#endif /* __PLUMA_FILE_BROWSER_WIDGET_H__ */
+
+// ex:ts=8:noet:
diff --git a/plugins/filebrowser/gedit-file-browser.schemas.in b/plugins/filebrowser/pluma-file-browser.schemas.in
index c80c8eec..0ae807d6 100755
--- a/plugins/filebrowser/gedit-file-browser.schemas.in
+++ b/plugins/filebrowser/pluma-file-browser.schemas.in
@@ -1,9 +1,9 @@
<mateconfschemafile>
<schemalist>
<schema>
- <key>/schemas/apps/gedit-2/plugins/filebrowser/on_load/tree_view</key>
- <applyto>/apps/gedit-2/plugins/filebrowser/on_load/tree_view</applyto>
- <owner>gedit</owner>
+ <key>/schemas/apps/pluma-2/plugins/filebrowser/on_load/tree_view</key>
+ <applyto>/apps/pluma-2/plugins/filebrowser/on_load/tree_view</applyto>
+ <owner>pluma</owner>
<type>bool</type>
<default>TRUE</default>
<locale name="C">
@@ -13,9 +13,9 @@
</schema>
<schema>
- <key>/schemas/apps/gedit-2/plugins/filebrowser/on_load/root</key>
- <applyto>/apps/gedit-2/plugins/filebrowser/on_load/root</applyto>
- <owner>gedit</owner>
+ <key>/schemas/apps/pluma-2/plugins/filebrowser/on_load/root</key>
+ <applyto>/apps/pluma-2/plugins/filebrowser/on_load/root</applyto>
+ <owner>pluma</owner>
<type>string</type>
<default></default>
<locale name="C">
@@ -26,9 +26,9 @@
</schema>
<schema>
- <key>/schemas/apps/gedit-2/plugins/filebrowser/on_load/virtual_root</key>
- <applyto>/apps/gedit-2/plugins/filebrowser/on_load/virtual_root</applyto>
- <owner>gedit</owner>
+ <key>/schemas/apps/pluma-2/plugins/filebrowser/on_load/virtual_root</key>
+ <applyto>/apps/pluma-2/plugins/filebrowser/on_load/virtual_root</applyto>
+ <owner>pluma</owner>
<type>string</type>
<default></default>
<locale name="C">
@@ -40,9 +40,9 @@
</schema>
<schema>
- <key>/schemas/apps/gedit-2/plugins/filebrowser/on_load/enable_remote</key>
- <applyto>/apps/gedit-2/plugins/filebrowser/on_load/enable_remote</applyto>
- <owner>gedit</owner>
+ <key>/schemas/apps/pluma-2/plugins/filebrowser/on_load/enable_remote</key>
+ <applyto>/apps/pluma-2/plugins/filebrowser/on_load/enable_remote</applyto>
+ <owner>pluma</owner>
<type>bool</type>
<default>FALSE</default>
<locale name="C">
@@ -52,9 +52,9 @@
</schema>
<schema>
- <key>/schemas/apps/gedit-2/plugins/filebrowser/open_at_first_doc</key>
- <applyto>/apps/gedit-2/plugins/filebrowser/open_at_first_doc</applyto>
- <owner>gedit</owner>
+ <key>/schemas/apps/pluma-2/plugins/filebrowser/open_at_first_doc</key>
+ <applyto>/apps/pluma-2/plugins/filebrowser/open_at_first_doc</applyto>
+ <owner>pluma</owner>
<type>bool</type>
<default>TRUE</default>
<locale name="C">
@@ -67,9 +67,9 @@
</schema>
<schema>
- <key>/schemas/apps/gedit-2/plugins/filebrowser/filter_mode</key>
- <applyto>/apps/gedit-2/plugins/filebrowser/filter_mode</applyto>
- <owner>gedit</owner>
+ <key>/schemas/apps/pluma-2/plugins/filebrowser/filter_mode</key>
+ <applyto>/apps/pluma-2/plugins/filebrowser/filter_mode</applyto>
+ <owner>pluma</owner>
<type>string</type>
<default>hidden_and_binary</default>
<locale name="C">
@@ -82,9 +82,9 @@
</schema>
<schema>
- <key>/schemas/apps/gedit-2/plugins/filebrowser/filter_pattern</key>
- <applyto>/apps/gedit-2/plugins/filebrowser/filter_pattern</applyto>
- <owner>gedit</owner>
+ <key>/schemas/apps/pluma-2/plugins/filebrowser/filter_pattern</key>
+ <applyto>/apps/pluma-2/plugins/filebrowser/filter_pattern</applyto>
+ <owner>pluma</owner>
<type>string</type>
<default></default>
<locale name="C">