diff options
author | António Fernandes <antoniof@gnome.org> | 2022-08-06 17:22:13 +0100 |
---|---|---|
committer | António Fernandes <antoniof@gnome.org> | 2022-08-07 01:14:22 +0000 |
commit | c60d3099edca0558601c50c32f7307a26dda2532 (patch) | |
tree | 223192df70893d41d7610e7c0c1c09304cfc463e /libnautilus-extension | |
parent | b625533fa4ba0fcf417e751949d8e81c9133d17e (diff) | |
download | nautilus-c60d3099edca0558601c50c32f7307a26dda2532.tar.gz |
column: Don't depend on GTK
We use GtkSortOrder internally only, it's not meant for extensions.
Diffstat (limited to 'libnautilus-extension')
-rw-r--r-- | libnautilus-extension/nautilus-column.c | 22 | ||||
-rw-r--r-- | libnautilus-extension/nautilus-column.h | 1 |
2 files changed, 14 insertions, 9 deletions
diff --git a/libnautilus-extension/nautilus-column.c b/libnautilus-extension/nautilus-column.c index 38a78141e..e39cbf6fb 100644 --- a/libnautilus-extension/nautilus-column.c +++ b/libnautilus-extension/nautilus-column.c @@ -21,7 +21,6 @@ * */ -#include <gtk/gtk.h> #include "nautilus-column.h" enum @@ -46,7 +45,7 @@ struct _NautilusColumn char *label; char *description; float xalign; - GtkSortType default_sort_order; + int default_sort_order; /* Actually, meant to store GtkSortType */ }; G_DEFINE_TYPE (NautilusColumn, nautilus_column, G_TYPE_OBJECT); @@ -274,12 +273,19 @@ nautilus_column_class_init (NautilusColumnClass *class) 1.0, 0.0, G_PARAM_READWRITE)); + /** + * NautilusColumn:default-sort-order: (type gboolean) + * + * Actually meant to store the enum values of GtkSortType, but we don't want + * extensions to depend on GTK. Also, this is for internal consumption only. + * + * Stability: Private: Internal to the application. + */ g_object_class_install_property (G_OBJECT_CLASS (class), PROP_DEFAULT_SORT_ORDER, - g_param_spec_enum ("default-sort-order", - "Default sort order", - "Default sort order", - GTK_TYPE_SORT_TYPE, - GTK_SORT_ASCENDING, - G_PARAM_READWRITE)); + g_param_spec_int ("default-sort-order", + "Default sort order", + "Default sort order", + G_MININT, G_MAXINT, 0, + G_PARAM_READWRITE)); } diff --git a/libnautilus-extension/nautilus-column.h b/libnautilus-extension/nautilus-column.h index dfaa8c0be..8f82bf23e 100644 --- a/libnautilus-extension/nautilus-column.h +++ b/libnautilus-extension/nautilus-column.h @@ -68,7 +68,6 @@ NautilusColumn *nautilus_column_new (const char *name, * label (string) - the user-visible label for the column * description (string) - a user-visible description of the column * xalign (float) - x-alignment of the column - * default-sort-order (GtkSortType) - default sort order of the column */ G_END_DECLS |