Skip to content

Commit

Permalink
nemo-view.c: Show detailed actions for some selection types (linuxmin…
Browse files Browse the repository at this point in the history
  • Loading branch information
rcalixte authored Oct 2, 2023
1 parent db5cf6f commit 9a13a25
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions src/nemo-view.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ struct NemoViewDetails
GVolumeMonitor *volume_monitor;

GTimer *load_timer;

char *detail_string;
};

typedef struct {
Expand Down Expand Up @@ -3022,6 +3024,8 @@ nemo_view_finalize (GObject *object)

g_clear_pointer (&view->details->load_timer, g_timer_destroy);

g_clear_pointer (&view->details->detail_string, g_free);

g_hash_table_destroy (view->details->non_ready_files);

G_OBJECT_CLASS (nemo_view_parent_class)->finalize (object);
Expand Down Expand Up @@ -3133,6 +3137,10 @@ nemo_view_display_selection_info (NemoView *view)
}

}
if (view->details->detail_string != NULL) {
g_free (view->details->detail_string);
}
view->details->detail_string = g_strdup (folder_item_count_str);
}

if (non_folder_count != 0) {
Expand Down Expand Up @@ -3171,11 +3179,17 @@ nemo_view_display_selection_info (NemoView *view)
items_string,
size_string);


if (view->details->detail_string != NULL) {
g_free (view->details->detail_string);
}
view->details->detail_string = g_strdup_printf (_(" (%s)"), size_string);
g_free (size_string);
g_free (items_string);
} else {
non_folder_str = items_string;
non_folder_str = g_strdup (items_string);
}

g_free (items_string);
}

free_space_str = nemo_file_get_volume_free_space (view->details->directory_as_file);
Expand Down Expand Up @@ -3258,6 +3272,10 @@ nemo_view_display_selection_info (NemoView *view)
non_folder_str,
obj_selected_free_space_str);
}
if (view->details->detail_string != NULL) {
g_free (view->details->detail_string);
}
view->details->detail_string = g_strdup ("");
}

g_free (free_space_str);
Expand Down Expand Up @@ -6818,19 +6836,21 @@ copy_or_cut_files (NemoView *view,
g_free (name);
} else {
if (cut) {
/* translators: this is preceded with a string of form 'N selected items' (N more than 1) */
status_string = g_strdup_printf (ngettext("The %'d selected item will be moved "
"if you select the Paste command",
"The %'d selected items will be moved "
"The %'d selected items%s will be moved "
"if you select the Paste command",
count),
count);
count, view->details->detail_string);
} else {
/* translators: this is preceded with a string of form 'N selected items' (N more than 1) */
status_string = g_strdup_printf (ngettext("The %'d selected item will be copied "
"if you select the Paste command",
"The %'d selected items will be copied "
"The %'d selected items%s will be copied "
"if you select the Paste command",
count),
count);
count, view->details->detail_string);
}
}

Expand Down

0 comments on commit 9a13a25

Please sign in to comment.