From a6b86ddc6965c27aa388ad08ad0a9aeed6fc8279 Mon Sep 17 00:00:00 2001 From: VitanovG Date: Wed, 28 Sep 2022 20:56:11 +0200 Subject: [PATCH 1/6] added column "extension", partly works --- gresources/nemo-icon-view-ui.xml | 2 + libnemo-private/nemo-column-utilities.c | 10 ++++ libnemo-private/nemo-file.c | 61 +++++++++++++++++++++++++ libnemo-private/nemo-file.h | 22 +++++---- libnemo-private/org.nemo.gschema.xml | 13 +++--- src/nemo-desktop-icon-grid-view.c | 9 ++++ src/nemo-icon-view.c | 11 +++++ 7 files changed, 113 insertions(+), 15 deletions(-) diff --git a/gresources/nemo-icon-view-ui.xml b/gresources/nemo-icon-view-ui.xml index bfe9baf60..592105a77 100644 --- a/gresources/nemo-icon-view-ui.xml +++ b/gresources/nemo-icon-view-ui.xml @@ -6,6 +6,7 @@ + @@ -28,6 +29,7 @@ + diff --git a/libnemo-private/nemo-column-utilities.c b/libnemo-private/nemo-column-utilities.c index e7e97d8f3..af90088dd 100644 --- a/libnemo-private/nemo-column-utilities.c +++ b/libnemo-private/nemo-column-utilities.c @@ -72,6 +72,16 @@ get_builtin_columns (void) "label", _("Date Modified"), "description", _("The date the file was modified."), NULL)); + + columns = g_list_append (NULL, //G comment + g_object_new (NEMO_TYPE_COLUMN, + "name", "extension", + "attribute", "extension", + "label", _("Extension"), + "description", _("The extension of the file."), + "width-chars", 60, + NULL)); + columns = g_list_append (columns, g_object_new (NEMO_TYPE_COLUMN, "name", "date_modified_with_time", diff --git a/libnemo-private/nemo-file.c b/libnemo-private/nemo-file.c index fdb5afcd1..75b4a91db 100644 --- a/libnemo-private/nemo-file.c +++ b/libnemo-private/nemo-file.c @@ -128,6 +128,7 @@ static guint signals[LAST_SIGNAL] = { 0 }; static GHashTable *symbolic_links; static GQuark attribute_name_q, + attribute_ext_q, attribute_size_q, attribute_type_q, attribute_detailed_type_q, @@ -173,6 +174,7 @@ static void nemo_file_info_iface_init (NemoFileInfoInterface static gboolean update_info_and_name (NemoFile *file, GFileInfo *info); static const char * nemo_file_peek_display_name (NemoFile *file); +const char * nemo_file_peek_extension_name (NemoFile *file); static const char * nemo_file_peek_display_name_collation_key (NemoFile *file); static void file_mount_unmounted (GMount *mount, gpointer data); static void metadata_hash_free (GHashTable *hash); @@ -3074,6 +3076,20 @@ compare_by_display_name (NemoFile *file_1, NemoFile *file_2) return compare; } +static int +compare_by_extension_name (NemoFile *file_1, NemoFile *file_2) +{ + const char *key_1, *key_2; + int compare=0; + + key_1 = nemo_file_peek_extension_name (file_1); + key_2 = nemo_file_peek_extension_name (file_2); + + compare = g_strcmp0 (key_1, key_2); + + return compare; +} + static int compare_by_directory_name (NemoFile *file_1, NemoFile *file_2) { @@ -3357,6 +3373,12 @@ nemo_file_compare_for_sort (NemoFile *file_1, result = compare_by_directory_name (file_1, file_2); } break; + case NEMO_FILE_SORT_BY_EXTENSION_NAME: + result = compare_by_extension_name (file_1, file_2); + if (result == 0) { + result = compare_by_display_name (file_1, file_2); + } + break; case NEMO_FILE_SORT_BY_SIZE: /* Compare directory sizes ourselves, then if necessary * use GnomeVFS to compare file sizes. @@ -3446,6 +3468,13 @@ nemo_file_compare_for_sort_by_attribute_q (NemoFile *file_1, favorites_first, reversed, search_dir); + } else if (attribute == attribute_ext_q) { + return nemo_file_compare_for_sort (file_1, file_2, + NEMO_FILE_SORT_BY_EXTENSION_NAME, + directories_first, + favorites_first, + reversed, + search_dir); } else if (attribute == attribute_size_q) { return nemo_file_compare_for_sort (file_1, file_2, NEMO_FILE_SORT_BY_SIZE, @@ -4036,6 +4065,28 @@ nemo_file_peek_display_name_collation_key (NemoFile *file) return res; } +const char * +nemo_file_peek_extension_name (NemoFile *file) +{ + if (file == NULL) { + return NULL; + } + + if (nemo_file_is_broken_symbolic_link (file)) { + return g_strdup (_("link (broken)")); + } + + char *str, *token, *result; + str = g_strdup (eel_ref_str_peek(file->details->name));//strdup() + + while ((token = strsep(&str, "."))) {result = g_strdup(token);} + if (result == NULL) {result = "";} + g_free(str); + g_free(token); + + return result; +} + static const char * nemo_file_peek_display_name (NemoFile *file) { @@ -4077,6 +4128,12 @@ nemo_file_get_display_name (NemoFile *file) return g_strdup (nemo_file_peek_display_name (file)); } +char * +nemo_file_get_extension_name (NemoFile *file) +{ + return g_strdup (nemo_file_peek_extension_name (file)); +} + char * nemo_file_get_edit_name (NemoFile *file) { @@ -6689,6 +6746,9 @@ nemo_file_get_string_attribute_q (NemoFile *file, GQuark attribute_q) if (attribute_q == attribute_name_q) { return nemo_file_get_display_name (file); } + if (attribute_q == attribute_ext_q) { + return nemo_file_get_extension_name (file); + } if (attribute_q == attribute_type_q) { return nemo_file_get_type_as_string (file); } @@ -8900,6 +8960,7 @@ nemo_file_class_init (NemoFileClass *class) nemo_file_info_getter = nemo_file_get_internal; attribute_name_q = g_quark_from_static_string ("name"); + attribute_ext_q = g_quark_from_static_string ("extension"); attribute_size_q = g_quark_from_static_string ("size"); attribute_type_q = g_quark_from_static_string ("type"); attribute_detailed_type_q = g_quark_from_static_string ("detailed_type"); diff --git a/libnemo-private/nemo-file.h b/libnemo-private/nemo-file.h index 6f20ebc5d..5cbf10d84 100644 --- a/libnemo-private/nemo-file.h +++ b/libnemo-private/nemo-file.h @@ -57,6 +57,7 @@ typedef struct NemoFile NemoFile; typedef enum { NEMO_FILE_SORT_NONE, NEMO_FILE_SORT_BY_DISPLAY_NAME, + NEMO_FILE_SORT_BY_EXTENSION_NAME, NEMO_FILE_SORT_BY_SIZE, NEMO_FILE_SORT_BY_TYPE, NEMO_FILE_SORT_BY_DETAILED_TYPE, @@ -155,7 +156,7 @@ NemoFile * nemo_file_get_existing_by_uri (const char * 1) Using these is type safe. * 2) You are allowed to call these with NULL, */ -NemoFile * nemo_file_ref (NemoFile *file); +NemoFile * nemo_file_ref (NemoFile *file); void nemo_file_unref (NemoFile *file); /* Monitor the file. */ @@ -189,15 +190,18 @@ gboolean nemo_file_contains_text (NemoFile char * nemo_file_get_display_name (NemoFile *file); char * nemo_file_get_edit_name (NemoFile *file); char * nemo_file_get_name (NemoFile *file); +char * nemo_file_get_extension_name (NemoFile *file); + const char * nemo_file_peek_name (NemoFile *file); +const char * nemo_file_peek_extension_name (NemoFile *file); GFile * nemo_file_get_location (NemoFile *file); -char * nemo_file_get_description (NemoFile *file); +char * nemo_file_get_description (NemoFile *file); char * nemo_file_get_uri (NemoFile *file); char * nemo_file_get_path (NemoFile *file); char * nemo_file_get_uri_scheme (NemoFile *file); gboolean nemo_file_has_uri_scheme (NemoFile *file, const gchar *scheme); -NemoFile * nemo_file_get_parent (NemoFile *file); +NemoFile * nemo_file_get_parent (NemoFile *file); GFile * nemo_file_get_parent_location (NemoFile *file); char * nemo_file_get_parent_uri (NemoFile *file); char * nemo_file_get_parent_uri_for_display (NemoFile *file); @@ -208,7 +212,7 @@ time_t nemo_file_get_ctime (NemoFile GFileType nemo_file_get_file_type (NemoFile *file); char * nemo_file_get_mime_type (NemoFile *file); gboolean nemo_file_is_mime_type (NemoFile *file, - const char *mime_type); + const char *mime_type); gboolean nemo_file_is_launchable (NemoFile *file); gboolean nemo_file_is_symbolic_link (NemoFile *file); gboolean nemo_file_is_mountpoint (NemoFile *file); @@ -220,12 +224,12 @@ char * nemo_file_get_volume_name (NemoFile char * nemo_file_get_symbolic_link_target_path (NemoFile *file); char * nemo_file_get_symbolic_link_target_uri (NemoFile *file); gboolean nemo_file_is_broken_symbolic_link (NemoFile *file); -gboolean nemo_file_is_nemo_link (NemoFile *file); +gboolean nemo_file_is_nemo_link (NemoFile *file); gboolean nemo_file_is_executable (NemoFile *file); gboolean nemo_file_is_directory (NemoFile *file); gboolean nemo_file_is_user_special_directory (NemoFile *file, GUserDirectory special_directory); -gboolean nemo_file_is_archive (NemoFile *file); +gboolean nemo_file_is_archive (NemoFile *file); gboolean nemo_file_is_in_trash (NemoFile *file); gboolean nemo_file_is_in_recent (NemoFile *file); gboolean nemo_file_is_in_favorites (NemoFile *file); @@ -233,14 +237,14 @@ gboolean nemo_file_is_in_search (NemoFile gboolean nemo_file_is_unavailable_favorite (NemoFile *file); gboolean nemo_file_is_in_admin (NemoFile *file); gboolean nemo_file_is_in_desktop (NemoFile *file); -gboolean nemo_file_is_home (NemoFile *file); +gboolean nemo_file_is_home (NemoFile *file); gboolean nemo_file_is_desktop_directory (NemoFile *file); GError * nemo_file_get_file_info_error (NemoFile *file); gboolean nemo_file_get_directory_item_count (NemoFile *file, guint *count, gboolean *count_unreadable); void nemo_file_recompute_deep_counts (NemoFile *file); -NemoRequestStatus nemo_file_get_deep_counts (NemoFile *file, +NemoRequestStatus nemo_file_get_deep_counts (NemoFile *file, guint *directory_count, guint *file_count, guint *unreadable_directory_count, @@ -266,7 +270,7 @@ GFilesystemPreviewType nemo_file_get_filesystem_use_preview (NemoFile *f char * nemo_file_get_filesystem_id (NemoFile *file); -NemoFile * nemo_file_get_trash_original_file (NemoFile *file); +NemoFile * nemo_file_get_trash_original_file (NemoFile *file); /* Permissions. */ gboolean nemo_file_can_get_permissions (NemoFile *file); diff --git a/libnemo-private/org.nemo.gschema.xml b/libnemo-private/org.nemo.gschema.xml index 0919eb18e..b1d8a41ff 100644 --- a/libnemo-private/org.nemo.gschema.xml +++ b/libnemo-private/org.nemo.gschema.xml @@ -31,12 +31,13 @@ - - - - - - + + + + + + + diff --git a/src/nemo-desktop-icon-grid-view.c b/src/nemo-desktop-icon-grid-view.c index 4ef00601c..4d76f3dea 100644 --- a/src/nemo-desktop-icon-grid-view.c +++ b/src/nemo-desktop-icon-grid-view.c @@ -94,6 +94,11 @@ static const DesktopSortCriterion sort_criteria[] = { "Desktop Sort by Name", "name", NEMO_FILE_SORT_BY_DISPLAY_NAME + }, + { + "Desktop Sort by Extension", + "extension", + NEMO_FILE_SORT_BY_EXTENSION_NAME }, { "Desktop Sort by Size", @@ -1074,6 +1079,10 @@ static const GtkRadioActionEntry desktop_sort_radio_entries[] = { N_("Name"), NULL, NULL, NEMO_FILE_SORT_BY_DISPLAY_NAME }, + { "Desktop Sort by Extension", NULL, + N_("Extension"), NULL, + NULL, + NEMO_FILE_SORT_BY_EXTENSION_NAME }, { "Desktop Sort by Size", NULL, N_("Size"), NULL, NULL, diff --git a/src/nemo-icon-view.c b/src/nemo-icon-view.c index e449753f6..8278d7021 100644 --- a/src/nemo-icon-view.c +++ b/src/nemo-icon-view.c @@ -137,6 +137,13 @@ static const SortCriterion sort_criteria[] = { N_("by _Name"), N_("Keep icons sorted by name in rows") }, + { + NEMO_FILE_SORT_BY_EXTENSION_NAME, + "extension", + "Sort by Extension", + N_("by _Extension"), + N_("Keep icons sorted by Extension in rows") + }, { NEMO_FILE_SORT_BY_SIZE, "size", @@ -1428,6 +1435,10 @@ static const GtkRadioActionEntry arrange_radio_entries[] = { N_("By _Name"), NULL, N_("Keep icons sorted by name in rows"), NEMO_FILE_SORT_BY_DISPLAY_NAME }, + { "Sort by Extension", NULL, + N_("By _Extension"), NULL, + N_("Keep icons sorted by extension in rows"), + NEMO_FILE_SORT_BY_EXTENSION_NAME }, { "Sort by Size", NULL, N_("By _Size"), NULL, N_("Keep icons sorted by size in rows"), From 03501ed613674bcd75244458147d5fbd152a0db8 Mon Sep 17 00:00:00 2001 From: VitanovG Date: Wed, 28 Sep 2022 21:33:17 +0200 Subject: [PATCH 2/6] updated couple files that were left out --- gresources/nemo-desktop-overlay.glade | 5 +++++ gresources/nemo-file-management-properties.glade | 10 ++++++++-- src/nemo-desktop-overlay.c | 3 +++ src/nemo-file-management-properties.c | 1 + src/nemo-list-view.c | 1 + 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/gresources/nemo-desktop-overlay.glade b/gresources/nemo-desktop-overlay.glade index feb020262..be72df698 100644 --- a/gresources/nemo-desktop-overlay.glade +++ b/gresources/nemo-desktop-overlay.glade @@ -118,6 +118,11 @@ 2 + Extension + Desktop Sort by Extension + + + 3 Size Desktop Sort by Size diff --git a/gresources/nemo-file-management-properties.glade b/gresources/nemo-file-management-properties.glade index ed5cb0b33..568b7610d 100644 --- a/gresources/nemo-file-management-properties.glade +++ b/gresources/nemo-file-management-properties.glade @@ -163,6 +163,9 @@ along with . If not, see . By Name + + By Extension + By Size @@ -191,12 +194,15 @@ along with . If not, see . 33% + + + 45% - 50% + 60% - 66% + 75% 100% diff --git a/src/nemo-desktop-overlay.c b/src/nemo-desktop-overlay.c index 9deb6b298..57fa54cc6 100644 --- a/src/nemo-desktop-overlay.c +++ b/src/nemo-desktop-overlay.c @@ -198,6 +198,9 @@ sync_controls (NemoDesktopOverlay *overlay, active_id = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action)); switch (active_id) { + case NEMO_FILE_SORT_BY_EXTENSION_NAME: + combo_id = "Desktop Sort by Extension"; + break; case NEMO_FILE_SORT_BY_SIZE: combo_id = "Desktop Sort by Size"; break; diff --git a/src/nemo-file-management-properties.c b/src/nemo-file-management-properties.c index 79fc68fb3..89012f0f1 100644 --- a/src/nemo-file-management-properties.c +++ b/src/nemo-file-management-properties.c @@ -140,6 +140,7 @@ static const char * const zoom_values[] = { static const char * const sort_order_values[] = { "name", + "extension", "size", "type", "detailed_type", diff --git a/src/nemo-list-view.c b/src/nemo-list-view.c index f79d5e0c4..d11d4a413 100644 --- a/src/nemo-list-view.c +++ b/src/nemo-list-view.c @@ -244,6 +244,7 @@ get_default_sort_order (NemoFile *file, gboolean *reversed) const char *attributes[] = { "name", /* is really "manually" which doesn't apply to lists */ "name", + "extension", "size", "type", "detailed_type", From 0c8adac72cfe9808f8a69a657bd395795c6625bb Mon Sep 17 00:00:00 2001 From: VitanovG Date: Wed, 28 Sep 2022 21:44:53 +0200 Subject: [PATCH 3/6] repositioned the extension col --- libnemo-private/nemo-column-utilities.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/libnemo-private/nemo-column-utilities.c b/libnemo-private/nemo-column-utilities.c index af90088dd..4297313f0 100644 --- a/libnemo-private/nemo-column-utilities.c +++ b/libnemo-private/nemo-column-utilities.c @@ -43,6 +43,13 @@ get_builtin_columns (void) "label", _("Name"), "description", _("The name and icon of the file."), NULL)); + columns = g_list_append (NULL, + g_object_new (NEMO_TYPE_COLUMN, + "name", "extension", + "attribute", "extension", + "label", _("Extension"), + "description", _("The extension of the file."), + NULL)); columns = g_list_append (columns, g_object_new (NEMO_TYPE_COLUMN, "name", "size", @@ -73,15 +80,6 @@ get_builtin_columns (void) "description", _("The date the file was modified."), NULL)); - columns = g_list_append (NULL, //G comment - g_object_new (NEMO_TYPE_COLUMN, - "name", "extension", - "attribute", "extension", - "label", _("Extension"), - "description", _("The extension of the file."), - "width-chars", 60, - NULL)); - columns = g_list_append (columns, g_object_new (NEMO_TYPE_COLUMN, "name", "date_modified_with_time", From e2e1b8075385e50317bf3b5a5813a204c7d54279 Mon Sep 17 00:00:00 2001 From: VitanovG Date: Thu, 29 Sep 2022 10:16:41 +0200 Subject: [PATCH 4/6] reordered "extension" menus and fixed NULL bug --- gresources/nemo-desktop-overlay.glade | 12 ++++++------ gresources/nemo-file-management-properties.glade | 15 ++++++--------- gresources/nemo-icon-view-ui.xml | 4 ++-- libnemo-private/nemo-column-utilities.c | 14 +++++++------- libnemo-private/nemo-file.c | 10 +++++----- libnemo-private/nemo-file.h | 2 +- libnemo-private/org.nemo.gschema.xml | 8 ++++---- src/nemo-desktop-icon-grid-view.c | 10 +++++----- src/nemo-desktop-overlay.c | 6 +++--- src/nemo-file-management-properties.c | 2 +- src/nemo-icon-view.c | 14 +++++++------- src/nemo-list-view.c | 2 +- 12 files changed, 48 insertions(+), 51 deletions(-) diff --git a/gresources/nemo-desktop-overlay.glade b/gresources/nemo-desktop-overlay.glade index be72df698..c4e3e959f 100644 --- a/gresources/nemo-desktop-overlay.glade +++ b/gresources/nemo-desktop-overlay.glade @@ -118,19 +118,19 @@ 2 - Extension - Desktop Sort by Extension - - - 3 Size Desktop Sort by Size - 4 + 3 Type Desktop Sort by Type + + 4 + Extension + Desktop Sort by Extension + 5 Date diff --git a/gresources/nemo-file-management-properties.glade b/gresources/nemo-file-management-properties.glade index 568b7610d..0b3a443a0 100644 --- a/gresources/nemo-file-management-properties.glade +++ b/gresources/nemo-file-management-properties.glade @@ -163,15 +163,15 @@ along with . If not, see . By Name - - By Extension - By Size By Type - + + + By Extension + By Detailed Type @@ -194,15 +194,12 @@ along with . If not, see . 33% - - - 45% - 60% + 50% - 75% + 66% 100% diff --git a/gresources/nemo-icon-view-ui.xml b/gresources/nemo-icon-view-ui.xml index 592105a77..579dc222a 100644 --- a/gresources/nemo-icon-view-ui.xml +++ b/gresources/nemo-icon-view-ui.xml @@ -6,9 +6,9 @@ - + @@ -29,9 +29,9 @@ - + diff --git a/libnemo-private/nemo-column-utilities.c b/libnemo-private/nemo-column-utilities.c index 4297313f0..4d6a9a5bd 100644 --- a/libnemo-private/nemo-column-utilities.c +++ b/libnemo-private/nemo-column-utilities.c @@ -43,13 +43,6 @@ get_builtin_columns (void) "label", _("Name"), "description", _("The name and icon of the file."), NULL)); - columns = g_list_append (NULL, - g_object_new (NEMO_TYPE_COLUMN, - "name", "extension", - "attribute", "extension", - "label", _("Extension"), - "description", _("The extension of the file."), - NULL)); columns = g_list_append (columns, g_object_new (NEMO_TYPE_COLUMN, "name", "size", @@ -65,6 +58,13 @@ get_builtin_columns (void) "label", _("Type"), "description", _("The general type of the file."), NULL)); + columns = g_list_append (columns, + g_object_new (NEMO_TYPE_COLUMN, + "name", "extension", + "attribute", "extension", + "label", _("Extension"), + "description", _("The extension of the file."), + NULL)); columns = g_list_append (columns, g_object_new (NEMO_TYPE_COLUMN, "name", "detailed_type", diff --git a/libnemo-private/nemo-file.c b/libnemo-private/nemo-file.c index 75b4a91db..ac97362ba 100644 --- a/libnemo-private/nemo-file.c +++ b/libnemo-private/nemo-file.c @@ -128,9 +128,9 @@ static guint signals[LAST_SIGNAL] = { 0 }; static GHashTable *symbolic_links; static GQuark attribute_name_q, - attribute_ext_q, attribute_size_q, attribute_type_q, + attribute_ext_q, attribute_detailed_type_q, attribute_modification_date_q, attribute_date_modified_q, @@ -3378,7 +3378,7 @@ nemo_file_compare_for_sort (NemoFile *file_1, if (result == 0) { result = compare_by_display_name (file_1, file_2); } - break; + break; case NEMO_FILE_SORT_BY_SIZE: /* Compare directory sizes ourselves, then if necessary * use GnomeVFS to compare file sizes. @@ -3474,7 +3474,7 @@ nemo_file_compare_for_sort_by_attribute_q (NemoFile *file_1, directories_first, favorites_first, reversed, - search_dir); + search_dir); } else if (attribute == attribute_size_q) { return nemo_file_compare_for_sort (file_1, file_2, NEMO_FILE_SORT_BY_SIZE, @@ -4131,7 +4131,7 @@ nemo_file_get_display_name (NemoFile *file) char * nemo_file_get_extension_name (NemoFile *file) { - return g_strdup (nemo_file_peek_extension_name (file)); + return nemo_file_peek_extension_name (file); } char * @@ -8960,9 +8960,9 @@ nemo_file_class_init (NemoFileClass *class) nemo_file_info_getter = nemo_file_get_internal; attribute_name_q = g_quark_from_static_string ("name"); - attribute_ext_q = g_quark_from_static_string ("extension"); attribute_size_q = g_quark_from_static_string ("size"); attribute_type_q = g_quark_from_static_string ("type"); + attribute_ext_q = g_quark_from_static_string ("extension"); attribute_detailed_type_q = g_quark_from_static_string ("detailed_type"); attribute_modification_date_q = g_quark_from_static_string ("modification_date"); attribute_date_modified_q = g_quark_from_static_string ("date_modified"); diff --git a/libnemo-private/nemo-file.h b/libnemo-private/nemo-file.h index 5cbf10d84..83d9670a8 100644 --- a/libnemo-private/nemo-file.h +++ b/libnemo-private/nemo-file.h @@ -57,9 +57,9 @@ typedef struct NemoFile NemoFile; typedef enum { NEMO_FILE_SORT_NONE, NEMO_FILE_SORT_BY_DISPLAY_NAME, - NEMO_FILE_SORT_BY_EXTENSION_NAME, NEMO_FILE_SORT_BY_SIZE, NEMO_FILE_SORT_BY_TYPE, + NEMO_FILE_SORT_BY_EXTENSION_NAME, NEMO_FILE_SORT_BY_DETAILED_TYPE, NEMO_FILE_SORT_BY_MTIME, NEMO_FILE_SORT_BY_ATIME, diff --git a/libnemo-private/org.nemo.gschema.xml b/libnemo-private/org.nemo.gschema.xml index b1d8a41ff..4dbd5156f 100644 --- a/libnemo-private/org.nemo.gschema.xml +++ b/libnemo-private/org.nemo.gschema.xml @@ -31,9 +31,9 @@ - - - + + + @@ -429,7 +429,7 @@ A list of captions below an icon in the icon view and the desktop. The actual number of captions shown depends on the zoom level. Some possible values are: - "size", "type", "date_modified", "date_changed", "date_accessed", "owner", + "size", "type", "date_modified", "extension", "date_changed", "date_accessed", "owner", "group", "permissions", "octal_permissions" and "mime_type". diff --git a/src/nemo-desktop-icon-grid-view.c b/src/nemo-desktop-icon-grid-view.c index 4d76f3dea..d5746bcc7 100644 --- a/src/nemo-desktop-icon-grid-view.c +++ b/src/nemo-desktop-icon-grid-view.c @@ -94,11 +94,6 @@ static const DesktopSortCriterion sort_criteria[] = { "Desktop Sort by Name", "name", NEMO_FILE_SORT_BY_DISPLAY_NAME - }, - { - "Desktop Sort by Extension", - "extension", - NEMO_FILE_SORT_BY_EXTENSION_NAME }, { "Desktop Sort by Size", @@ -109,6 +104,11 @@ static const DesktopSortCriterion sort_criteria[] = { "Desktop Sort by Type", "detailed_type", NEMO_FILE_SORT_BY_DETAILED_TYPE + }, + { + "Desktop Sort by Extension", + "extension", + NEMO_FILE_SORT_BY_EXTENSION_NAME }, { "Desktop Sort by Date", diff --git a/src/nemo-desktop-overlay.c b/src/nemo-desktop-overlay.c index 57fa54cc6..c1cbdfe26 100644 --- a/src/nemo-desktop-overlay.c +++ b/src/nemo-desktop-overlay.c @@ -198,15 +198,15 @@ sync_controls (NemoDesktopOverlay *overlay, active_id = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action)); switch (active_id) { - case NEMO_FILE_SORT_BY_EXTENSION_NAME: - combo_id = "Desktop Sort by Extension"; - break; case NEMO_FILE_SORT_BY_SIZE: combo_id = "Desktop Sort by Size"; break; case NEMO_FILE_SORT_BY_DETAILED_TYPE: combo_id = "Desktop Sort by Type"; break; + case NEMO_FILE_SORT_BY_EXTENSION_NAME: + combo_id = "Desktop Sort by Extension"; + break; case NEMO_FILE_SORT_BY_MTIME: combo_id = "Desktop Sort by Date"; break; diff --git a/src/nemo-file-management-properties.c b/src/nemo-file-management-properties.c index 89012f0f1..f3f7ca682 100644 --- a/src/nemo-file-management-properties.c +++ b/src/nemo-file-management-properties.c @@ -140,9 +140,9 @@ static const char * const zoom_values[] = { static const char * const sort_order_values[] = { "name", - "extension", "size", "type", + "extension", "detailed_type", "mtime", "atime", diff --git a/src/nemo-icon-view.c b/src/nemo-icon-view.c index 8278d7021..07e10a89f 100644 --- a/src/nemo-icon-view.c +++ b/src/nemo-icon-view.c @@ -137,13 +137,6 @@ static const SortCriterion sort_criteria[] = { N_("by _Name"), N_("Keep icons sorted by name in rows") }, - { - NEMO_FILE_SORT_BY_EXTENSION_NAME, - "extension", - "Sort by Extension", - N_("by _Extension"), - N_("Keep icons sorted by Extension in rows") - }, { NEMO_FILE_SORT_BY_SIZE, "size", @@ -158,6 +151,13 @@ static const SortCriterion sort_criteria[] = { N_("by _Type"), N_("Keep icons sorted by type in rows") }, + { + NEMO_FILE_SORT_BY_EXTENSION_NAME, + "extension", + "Sort by Extension", + N_("by _Extension"), + N_("Keep icons sorted by Extension in rows") + }, { NEMO_FILE_SORT_BY_DETAILED_TYPE, "detailed_type", diff --git a/src/nemo-list-view.c b/src/nemo-list-view.c index d11d4a413..14b8b77c5 100644 --- a/src/nemo-list-view.c +++ b/src/nemo-list-view.c @@ -244,9 +244,9 @@ get_default_sort_order (NemoFile *file, gboolean *reversed) const char *attributes[] = { "name", /* is really "manually" which doesn't apply to lists */ "name", - "extension", "size", "type", + "extension", "detailed_type", "date_modified", "date_accessed", From 35d818ddf800fbd3fbc236cdbdd56beaee4404df Mon Sep 17 00:00:00 2001 From: VitanovG Date: Thu, 29 Sep 2022 10:38:34 +0200 Subject: [PATCH 5/6] install instructions --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 760119595..bcaaa0016 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,11 @@ Nemo File Manager for Cinnamon Nemo is the file manager for the Cinnamon desktop environment. + +HOW to build the packages: +cd nemo +dpgk-buildpackages +cd .. +sudo dpkg -i *.deb + +Last line installes the nemo packages. If you have any bugs let me know, and you can update nemo with the update manager anytime to get back to the official version. From d5d034efdf315a9246950ad6f0b74a78d8493e0a Mon Sep 17 00:00:00 2001 From: VitanovG <43113579+VitanovG@users.noreply.github.com> Date: Fri, 30 Sep 2022 14:41:27 +0200 Subject: [PATCH 6/6] Update README.md --- README.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/README.md b/README.md index bcaaa0016..760119595 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,3 @@ Nemo File Manager for Cinnamon Nemo is the file manager for the Cinnamon desktop environment. - -HOW to build the packages: -cd nemo -dpgk-buildpackages -cd .. -sudo dpkg -i *.deb - -Last line installes the nemo packages. If you have any bugs let me know, and you can update nemo with the update manager anytime to get back to the official version.