Merge lp:~jmiguelbenitez/pantheon-files/fix-1173778 into lp:~elementary-apps/pantheon-files/trunk
Proposed by
José M. Benítez
Status: | Merged |
---|---|
Approved by: | Cody Garver |
Approved revision: | 1404 |
Merged at revision: | 1431 |
Proposed branch: | lp:~jmiguelbenitez/pantheon-files/fix-1173778 |
Merge into: | lp:~elementary-apps/pantheon-files/trunk |
Diff against target: |
146 lines (+23/-27) 5 files modified
libcore/marlin-file-utilities.c (+9/-1) libcore/marlin-file-utilities.h (+2/-0) src/fm-abstract-icon-view.c (+2/-6) src/fm-columns-view.c (+5/-8) src/fm-list-view.c (+5/-12) |
To merge this branch: | bzr merge lp:~jmiguelbenitez/pantheon-files/fix-1173778 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jeremy Wootten | Approve | ||
Review via email: mp+200962@code.launchpad.net |
Commit message
A folder with dots in its name is not treated as a file when renamed to fix bug #1173778
Description of the change
Fix for bug #1173778 (Renaming folders with dots in name treats them as file with extension).
To post a comment you must log in.
The branch works as described and no side effects found.
However, the code is indented with tabs instead of spaces, which is against the coding guidelines.
Also, the solution does not make use of the existing "select_all" parameter and repeats code three times for the three different views.
I suggest writing a single function that all three views can access. For example, in marlin_ file_utilities:
void get_rename_ region (const char *filename, int *start_offset, int *end_offset, gboolean select_all)
*start_ offset = 0;
*end_ offset = g_utf8_strlen (filename, -1);
eel_ filename_ get_rename_ region (filename, start_offset, end_offset);
marlin_
{
if (select_all) {
} else
}
Then in each view:
if (icon_view- >details- >editable_ widget != NULL) {
marlin_ get_rename_ region (icon_view- >details- >original_ name, &start_offset, &end_offset, select_all);
gtk_editable_ select_ region (GTK_EDITABLE (icon_view- >details- >editable_ widget) ,
start_ offset, end_offset);
}