diff options
author | mbkma <[email protected]> | 2020-10-04 18:09:56 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-10-19 10:59:44 +0200 |
commit | 0830446ca167e24e3105bb76fcf5aabc13608b54 (patch) | |
tree | 22e0154a981ab80e7f2d11702e61fe522b127094 /plugins/filebrowser | |
parent | ae86d50d909e7e20b856107614b255104c8850a6 (diff) | |
download | pluma-0830446ca167e24e3105bb76fcf5aabc13608b54.tar.bz2 pluma-0830446ca167e24e3105bb76fcf5aabc13608b54.tar.xz |
Remove pluma-marshal.
These days we can use the automatic ffi marshalling.
See:
- https://developer.gnome.org/gobject/stable/gobject-Signals.html#g-signal-new
- http://sourceware.org/libffi/
- https://gitlab.gnome.org/GNOME/gedit/-/commit/373adb7d041b0559953d0ac8cf2213ecc44db956
Diffstat (limited to 'plugins/filebrowser')
-rw-r--r-- | plugins/filebrowser/Makefile.am | 14 | ||||
-rw-r--r-- | plugins/filebrowser/pluma-file-browser-marshal.list | 5 | ||||
-rw-r--r-- | plugins/filebrowser/pluma-file-browser-store.c | 64 | ||||
-rw-r--r-- | plugins/filebrowser/pluma-file-browser-view.c | 21 | ||||
-rw-r--r-- | plugins/filebrowser/pluma-file-browser-widget.c | 26 |
5 files changed, 47 insertions, 83 deletions
diff --git a/plugins/filebrowser/Makefile.am b/plugins/filebrowser/Makefile.am index 095cdc1d..ecc55088 100644 --- a/plugins/filebrowser/Makefile.am +++ b/plugins/filebrowser/Makefile.am @@ -9,9 +9,7 @@ AM_CPPFLAGS = \ BUILT_SOURCES = \ pluma-file-browser-enum-types.h \ - pluma-file-browser-enum-types.c \ - pluma-file-browser-marshal.h \ - pluma-file-browser-marshal.c + pluma-file-browser-enum-types.c plugin_LTLIBRARIES = libfilebrowser.la @@ -57,13 +55,6 @@ pluma-file-browser-enum-types.c: pluma-file-browser-enum-types.c.template pluma- $(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)) > $@ -pluma-file-browser-marshal.h: pluma-file-browser-marshal.list $(GLIB_GENMARSHAL) - $(AM_V_GEN) $(GLIB_GENMARSHAL) $< --header --prefix=pluma_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 >> $@ - filebrowser_gschema_in = org.mate.pluma.plugins.filebrowser.gschema.xml.in gsettings_SCHEMAS = $(filebrowser_gschema_in:.xml.in=.xml) @GSETTINGS_RULES@ @@ -74,8 +65,7 @@ EXTRA_DIST = \ $(filebrowser_gschema_in) \ 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 + pluma-file-browser-enum-register.c.template CLEANFILES = \ $(plugin_DATA) \ diff --git a/plugins/filebrowser/pluma-file-browser-marshal.list b/plugins/filebrowser/pluma-file-browser-marshal.list deleted file mode 100644 index f9349d22..00000000 --- a/plugins/filebrowser/pluma-file-browser-marshal.list +++ /dev/null @@ -1,5 +0,0 @@ -VOID:UINT,STRING -VOID:STRING,STRING -BOOLEAN:OBJECT,POINTER -BOOLEAN:POINTER -BOOLEAN:VOID diff --git a/plugins/filebrowser/pluma-file-browser-store.c b/plugins/filebrowser/pluma-file-browser-store.c index ae100379..642f9e71 100644 --- a/plugins/filebrowser/pluma-file-browser-store.c +++ b/plugins/filebrowser/pluma-file-browser-store.c @@ -28,7 +28,6 @@ #include <gio/gio.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" @@ -356,67 +355,60 @@ pluma_file_browser_store_class_init (PlumaFileBrowserStoreClass * klass) g_signal_new ("begin-loading", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (PlumaFileBrowserStoreClass, - begin_loading), NULL, NULL, - g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1, - GTK_TYPE_TREE_ITER); + G_STRUCT_OFFSET (PlumaFileBrowserStoreClass, begin_loading), + NULL, NULL, NULL, + G_TYPE_NONE, 1, GTK_TYPE_TREE_ITER); model_signals[END_LOADING] = g_signal_new ("end-loading", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (PlumaFileBrowserStoreClass, - end_loading), NULL, NULL, - g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1, + G_STRUCT_OFFSET (PlumaFileBrowserStoreClass, end_loading), + NULL, NULL, NULL, + 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 (PlumaFileBrowserStoreClass, - error), NULL, NULL, - pluma_file_browser_marshal_VOID__UINT_STRING, + G_STRUCT_OFFSET (PlumaFileBrowserStoreClass, error), + NULL, NULL, NULL, 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 (PlumaFileBrowserStoreClass, - no_trash), g_signal_accumulator_true_handled, NULL, - pluma_file_browser_marshal_BOOLEAN__POINTER, + G_STRUCT_OFFSET (PlumaFileBrowserStoreClass, no_trash), + g_signal_accumulator_true_handled, NULL, NULL, 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 (PlumaFileBrowserStoreClass, - rename), NULL, NULL, - pluma_file_browser_marshal_VOID__STRING_STRING, + G_STRUCT_OFFSET (PlumaFileBrowserStoreClass, rename), + NULL, NULL, NULL, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); model_signals[BEGIN_REFRESH] = g_signal_new ("begin-refresh", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (PlumaFileBrowserStoreClass, - begin_refresh), NULL, NULL, - g_cclosure_marshal_VOID__VOID, - G_TYPE_NONE, 0); + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (PlumaFileBrowserStoreClass, begin_refresh), + NULL, NULL, NULL, + G_TYPE_NONE, 0); model_signals[END_REFRESH] = g_signal_new ("end-refresh", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (PlumaFileBrowserStoreClass, - end_refresh), NULL, NULL, - g_cclosure_marshal_VOID__VOID, - G_TYPE_NONE, 0); + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (PlumaFileBrowserStoreClass, end_refresh), + NULL, NULL, NULL, + G_TYPE_NONE, 0); model_signals[UNLOAD] = g_signal_new ("unload", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (PlumaFileBrowserStoreClass, - unload), NULL, NULL, - g_cclosure_marshal_VOID__STRING, - G_TYPE_NONE, 1, - G_TYPE_STRING); + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (PlumaFileBrowserStoreClass, unload), + NULL, NULL, NULL, + G_TYPE_NONE, 1, + G_TYPE_STRING); } static void diff --git a/plugins/filebrowser/pluma-file-browser-view.c b/plugins/filebrowser/pluma-file-browser-view.c index 5fae1745..7652d2be 100644 --- a/plugins/filebrowser/pluma-file-browser-view.c +++ b/plugins/filebrowser/pluma-file-browser-view.c @@ -27,7 +27,6 @@ #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" struct _PlumaFileBrowserViewPrivate @@ -876,33 +875,29 @@ pluma_file_browser_view_class_init (PlumaFileBrowserViewClass * klass) g_signal_new ("error", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (PlumaFileBrowserViewClass, - error), NULL, NULL, - pluma_file_browser_marshal_VOID__UINT_STRING, + G_STRUCT_OFFSET (PlumaFileBrowserViewClass, error), + NULL, NULL, NULL, 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 (PlumaFileBrowserViewClass, - file_activated), NULL, NULL, - g_cclosure_marshal_VOID__BOXED, + G_STRUCT_OFFSET (PlumaFileBrowserViewClass, file_activated), + NULL, NULL, NULL, G_TYPE_NONE, 1, GTK_TYPE_TREE_ITER); signals[DIRECTORY_ACTIVATED] = g_signal_new ("directory-activated", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (PlumaFileBrowserViewClass, - directory_activated), NULL, NULL, - g_cclosure_marshal_VOID__BOXED, + G_STRUCT_OFFSET (PlumaFileBrowserViewClass, directory_activated), + NULL, NULL, NULL, G_TYPE_NONE, 1, GTK_TYPE_TREE_ITER); signals[BOOKMARK_ACTIVATED] = g_signal_new ("bookmark-activated", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (PlumaFileBrowserViewClass, - bookmark_activated), NULL, NULL, - g_cclosure_marshal_VOID__BOXED, + G_STRUCT_OFFSET (PlumaFileBrowserViewClass, bookmark_activated), + NULL, NULL, NULL, G_TYPE_NONE, 1, GTK_TYPE_TREE_ITER); } diff --git a/plugins/filebrowser/pluma-file-browser-widget.c b/plugins/filebrowser/pluma-file-browser-widget.c index 5544bd57..7d41e74c 100644 --- a/plugins/filebrowser/pluma-file-browser-widget.c +++ b/plugins/filebrowser/pluma-file-browser-widget.c @@ -39,7 +39,6 @@ #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 XML_UI_FILE "pluma-file-browser-widget-ui.xml" @@ -435,26 +434,22 @@ pluma_file_browser_widget_class_init (PlumaFileBrowserWidgetClass * klass) g_signal_new ("uri-activated", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (PlumaFileBrowserWidgetClass, - uri_activated), NULL, NULL, - g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, + G_STRUCT_OFFSET (PlumaFileBrowserWidgetClass, uri_activated), + NULL, NULL, NULL, + 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 (PlumaFileBrowserWidgetClass, - error), NULL, NULL, - pluma_file_browser_marshal_VOID__UINT_STRING, + G_STRUCT_OFFSET (PlumaFileBrowserWidgetClass, error), + NULL, NULL, NULL, 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 (PlumaFileBrowserWidgetClass, - confirm_delete), - g_signal_accumulator_true_handled, - NULL, - pluma_file_browser_marshal_BOOLEAN__OBJECT_POINTER, + G_STRUCT_OFFSET (PlumaFileBrowserWidgetClass, confirm_delete), + g_signal_accumulator_true_handled, NULL, NULL, G_TYPE_BOOLEAN, 2, G_TYPE_OBJECT, @@ -463,11 +458,8 @@ pluma_file_browser_widget_class_init (PlumaFileBrowserWidgetClass * klass) signals[CONFIRM_NO_TRASH] = g_signal_new ("confirm-no-trash", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (PlumaFileBrowserWidgetClass, - confirm_no_trash), - g_signal_accumulator_true_handled, - NULL, - pluma_file_browser_marshal_BOOLEAN__POINTER, + G_STRUCT_OFFSET (PlumaFileBrowserWidgetClass, confirm_no_trash), + g_signal_accumulator_true_handled, NULL, NULL, G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); |