Skip to content

Commit e2e1b80

Browse files
committed
reordered "extension" menus and fixed NULL bug
1 parent 0c8adac commit e2e1b80

12 files changed

+48
-51
lines changed

gresources/nemo-desktop-overlay.glade

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,19 +118,19 @@
118118
</row>
119119
<row>
120120
<col id="0">2</col>
121-
<col id="1" translatable="yes">Extension</col>
122-
<col id="2">Desktop Sort by Extension</col>
123-
</row>
124-
<row>
125-
<col id="0">3</col>
126121
<col id="1" translatable="yes">Size</col>
127122
<col id="2">Desktop Sort by Size</col>
128123
</row>
129124
<row>
130-
<col id="0">4</col>
125+
<col id="0">3</col>
131126
<col id="1" translatable="yes">Type</col>
132127
<col id="2">Desktop Sort by Type</col>
133128
</row>
129+
<row>
130+
<col id="0">4</col>
131+
<col id="1" translatable="yes">Extension</col>
132+
<col id="2">Desktop Sort by Extension</col>
133+
</row>
134134
<row>
135135
<col id="0">5</col>
136136
<col id="1" translatable="yes">Date</col>

gresources/nemo-file-management-properties.glade

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,15 @@ along with . If not, see <http://www.gnu.org/licenses/>.
163163
<row>
164164
<col id="0" translatable="yes">By Name</col>
165165
</row>
166-
<row>
167-
<col id="0" translatable="yes">By Extension</col>
168-
</row>
169166
<row>
170167
<col id="0" translatable="yes">By Size</col>
171168
</row>
172169
<row>
173170
<col id="0" translatable="yes">By Type</col>
174-
</row>
171+
<row>
172+
<row>
173+
<col id="0" translatable="yes">By Extension</col>
174+
<row>
175175
<row>
176176
<col id="0" translatable="yes">By Detailed Type</col>
177177
</row>
@@ -194,15 +194,12 @@ along with . If not, see <http://www.gnu.org/licenses/>.
194194
<data>
195195
<row>
196196
<col id="0" translatable="yes">33%</col>
197-
</row>
198-
<row>
199-
<col id="0" translatable="yes">45%</col>
200197
</row>
201198
<row>
202-
<col id="0" translatable="yes">60%</col>
199+
<col id="0" translatable="yes">50%</col>
203200
</row>
204201
<row>
205-
<col id="0" translatable="yes">75%</col>
202+
<col id="0" translatable="yes">66%</col>
206203
</row>
207204
<row>
208205
<col id="0" translatable="yes">100%</col>

gresources/nemo-icon-view-ui.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
<menuitem name="Manual Layout" action="Manual Layout"/>
77
<placeholder name="Auto Layout">
88
<menuitem name="Sort by Name" action="Sort by Name"/>
9-
<menuitem name="Sort by Extension" action="Sort by Extension"/>
109
<menuitem name="Sort by Size" action="Sort by Size"/>
1110
<menuitem name="Sort by Type" action="Sort by Type"/>
11+
<menuitem name="Sort by Extension" action="Sort by Extension"/>
1212
<menuitem name="Sort by Detailed Type" action="Sort by Detailed Type"/>
1313
<menuitem name="Sort by Modification Date" action="Sort by Modification Date"/>
1414
<menuitem name="Sort by Trash Time" action="Sort by Trash Time"/>
@@ -29,9 +29,9 @@
2929
<menuitem name="Manual Layout" action="Manual Layout"/>
3030
<placeholder name="Auto Layout">
3131
<menuitem name="Sort by Name" action="Sort by Name"/>
32-
<menuitem name="Sort by Extension" action="Sort by Extension"/>
3332
<menuitem name="Sort by Size" action="Sort by Size"/>
3433
<menuitem name="Sort by Type" action="Sort by Type"/>
34+
<menuitem name="Sort by Extension" action="Sort by Extension"/>
3535
<menuitem name="Sort by Detailed Type" action="Sort by Detailed Type"/>
3636
<menuitem name="Sort by Modification Date" action="Sort by Modification Date"/>
3737
<menuitem name="Sort by Trash Time" action="Sort by Trash Time"/>

libnemo-private/nemo-column-utilities.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,6 @@ get_builtin_columns (void)
4343
"label", _("Name"),
4444
"description", _("The name and icon of the file."),
4545
NULL));
46-
columns = g_list_append (NULL,
47-
g_object_new (NEMO_TYPE_COLUMN,
48-
"name", "extension",
49-
"attribute", "extension",
50-
"label", _("Extension"),
51-
"description", _("The extension of the file."),
52-
NULL));
5346
columns = g_list_append (columns,
5447
g_object_new (NEMO_TYPE_COLUMN,
5548
"name", "size",
@@ -65,6 +58,13 @@ get_builtin_columns (void)
6558
"label", _("Type"),
6659
"description", _("The general type of the file."),
6760
NULL));
61+
columns = g_list_append (columns,
62+
g_object_new (NEMO_TYPE_COLUMN,
63+
"name", "extension",
64+
"attribute", "extension",
65+
"label", _("Extension"),
66+
"description", _("The extension of the file."),
67+
NULL));
6868
columns = g_list_append (columns,
6969
g_object_new (NEMO_TYPE_COLUMN,
7070
"name", "detailed_type",

libnemo-private/nemo-file.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ static guint signals[LAST_SIGNAL] = { 0 };
128128
static GHashTable *symbolic_links;
129129

130130
static GQuark attribute_name_q,
131-
attribute_ext_q,
132131
attribute_size_q,
133132
attribute_type_q,
133+
attribute_ext_q,
134134
attribute_detailed_type_q,
135135
attribute_modification_date_q,
136136
attribute_date_modified_q,
@@ -3378,7 +3378,7 @@ nemo_file_compare_for_sort (NemoFile *file_1,
33783378
if (result == 0) {
33793379
result = compare_by_display_name (file_1, file_2);
33803380
}
3381-
break;
3381+
break;
33823382
case NEMO_FILE_SORT_BY_SIZE:
33833383
/* Compare directory sizes ourselves, then if necessary
33843384
* use GnomeVFS to compare file sizes.
@@ -3474,7 +3474,7 @@ nemo_file_compare_for_sort_by_attribute_q (NemoFile *file_1,
34743474
directories_first,
34753475
favorites_first,
34763476
reversed,
3477-
search_dir);
3477+
search_dir);
34783478
} else if (attribute == attribute_size_q) {
34793479
return nemo_file_compare_for_sort (file_1, file_2,
34803480
NEMO_FILE_SORT_BY_SIZE,
@@ -4131,7 +4131,7 @@ nemo_file_get_display_name (NemoFile *file)
41314131
char *
41324132
nemo_file_get_extension_name (NemoFile *file)
41334133
{
4134-
return g_strdup (nemo_file_peek_extension_name (file));
4134+
return nemo_file_peek_extension_name (file);
41354135
}
41364136

41374137
char *
@@ -8960,9 +8960,9 @@ nemo_file_class_init (NemoFileClass *class)
89608960
nemo_file_info_getter = nemo_file_get_internal;
89618961

89628962
attribute_name_q = g_quark_from_static_string ("name");
8963-
attribute_ext_q = g_quark_from_static_string ("extension");
89648963
attribute_size_q = g_quark_from_static_string ("size");
89658964
attribute_type_q = g_quark_from_static_string ("type");
8965+
attribute_ext_q = g_quark_from_static_string ("extension");
89668966
attribute_detailed_type_q = g_quark_from_static_string ("detailed_type");
89678967
attribute_modification_date_q = g_quark_from_static_string ("modification_date");
89688968
attribute_date_modified_q = g_quark_from_static_string ("date_modified");

libnemo-private/nemo-file.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ typedef struct NemoFile NemoFile;
5757
typedef enum {
5858
NEMO_FILE_SORT_NONE,
5959
NEMO_FILE_SORT_BY_DISPLAY_NAME,
60-
NEMO_FILE_SORT_BY_EXTENSION_NAME,
6160
NEMO_FILE_SORT_BY_SIZE,
6261
NEMO_FILE_SORT_BY_TYPE,
62+
NEMO_FILE_SORT_BY_EXTENSION_NAME,
6363
NEMO_FILE_SORT_BY_DETAILED_TYPE,
6464
NEMO_FILE_SORT_BY_MTIME,
6565
NEMO_FILE_SORT_BY_ATIME,

libnemo-private/org.nemo.gschema.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
<enum id="org.nemo.SortOrder">
3232
<value nick="manually" value="0"/>
3333
<value nick="name" value="1"/>
34-
<value nick="extension" value="2"/>
35-
<value nick="size" value="3"/>
36-
<value nick="type" value="4"/>
34+
<value nick="size" value="2"/>
35+
<value nick="type" value="3"/>
36+
<value nick="extension" value="4"/>
3737
<value nick="detailed_type" value="5"/>
3838
<value nick="mtime" value="6"/>
3939
<value nick="atime" value="7"/>
@@ -429,7 +429,7 @@
429429
<description>A list of captions below an icon in the icon view and
430430
the desktop. The actual number of captions shown depends on
431431
the zoom level. Some possible values are:
432-
"size", "type", "date_modified", "date_changed", "date_accessed", "owner",
432+
"size", "type", "date_modified", "extension", "date_changed", "date_accessed", "owner",
433433
"group", "permissions", "octal_permissions" and "mime_type".</description>
434434
</key>
435435
<key name="default-use-tighter-layout" type="b">

src/nemo-desktop-icon-grid-view.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,6 @@ static const DesktopSortCriterion sort_criteria[] = {
9494
"Desktop Sort by Name",
9595
"name",
9696
NEMO_FILE_SORT_BY_DISPLAY_NAME
97-
},
98-
{
99-
"Desktop Sort by Extension",
100-
"extension",
101-
NEMO_FILE_SORT_BY_EXTENSION_NAME
10297
},
10398
{
10499
"Desktop Sort by Size",
@@ -109,6 +104,11 @@ static const DesktopSortCriterion sort_criteria[] = {
109104
"Desktop Sort by Type",
110105
"detailed_type",
111106
NEMO_FILE_SORT_BY_DETAILED_TYPE
107+
},
108+
{
109+
"Desktop Sort by Extension",
110+
"extension",
111+
NEMO_FILE_SORT_BY_EXTENSION_NAME
112112
},
113113
{
114114
"Desktop Sort by Date",

src/nemo-desktop-overlay.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,15 +198,15 @@ sync_controls (NemoDesktopOverlay *overlay,
198198
active_id = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
199199

200200
switch (active_id) {
201-
case NEMO_FILE_SORT_BY_EXTENSION_NAME:
202-
combo_id = "Desktop Sort by Extension";
203-
break;
204201
case NEMO_FILE_SORT_BY_SIZE:
205202
combo_id = "Desktop Sort by Size";
206203
break;
207204
case NEMO_FILE_SORT_BY_DETAILED_TYPE:
208205
combo_id = "Desktop Sort by Type";
209206
break;
207+
case NEMO_FILE_SORT_BY_EXTENSION_NAME:
208+
combo_id = "Desktop Sort by Extension";
209+
break;
210210
case NEMO_FILE_SORT_BY_MTIME:
211211
combo_id = "Desktop Sort by Date";
212212
break;

src/nemo-file-management-properties.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ static const char * const zoom_values[] = {
140140

141141
static const char * const sort_order_values[] = {
142142
"name",
143-
"extension",
144143
"size",
145144
"type",
145+
"extension",
146146
"detailed_type",
147147
"mtime",
148148
"atime",

0 commit comments

Comments
 (0)