gcmd-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gcmd-dev] No icon refresh after changing the file-extension


From: Piotr Eljasiak
Subject: Re: [gcmd-dev] No icon refresh after changing the file-extension
Date: Fri, 27 Mar 2009 18:38:50 +0100

Hi André,


> I'd like to report a bug I found, the Icon of the file is not
> refreshed when I change the file extension.

Thanks for catching the bug.


> The easiest (but not necessarily the one with the best performance)
> solution was to refresh the whole list.

This is not a good solution, see what will happen if one renames all
files in the pane en masse using advrename - gcmd will reload dir for
every single file...


> An update of the Icon in the function 'on_dialog_keypressed' in the
> file 'gnome-cmd-file-selector.cc'. Information about the Index (row)
> and the File-List (GnomeCmdFileList) are available. However I had
> problems with the file (GnomeCmdFile).

> I found the information within the function 'gnome_cmd_file_rename' of
> the file 'gnome-cmd-file.cc'. However I cant find a possibility to get
> the Index (row).

For every renamed file, there is a triggered "file-renamed" signal sent
to the proper GnomeCmdFileSelector. That results in calling (in
on_dir_file_renamed()):

    fs->file_list()->update_file(f)

So I've added a fix (attached) to
GnomeCmdFileList::update_file(GnomeCmdFile *f):

    if (gnome_cmd_data.layout != GNOME_CMD_LAYOUT_TEXT)
        gtk_clist_set_pixmap (*this, row, 0,
                              gnome_cmd_file_get_type_pixmap (f),
                              gnome_cmd_file_get_type_mask (f));


Please do test,
Piotr

Attachment: gcmd-icon-refresh.patch.bz2
Description: application/bzip


reply via email to

[Prev in Thread] Current Thread [Next in Thread]