"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/FileList.cpp" between
xfe-1.42.tar.gz and xfe-1.43.tar.gz

About: Xfe (X File Explorer) is a file manager and browser (using the FOX toolkit).

FileList.cpp  (xfe-1.42):FileList.cpp  (xfe-1.43)
skipping to change at line 420 skipping to change at line 420
if (offeredDNDType(FROM_DRAGNDROP, urilistType)) if (offeredDNDType(FROM_DRAGNDROP, urilistType))
{ {
index = getItemAt(event->win_x, event->win_y); index = getItemAt(event->win_x, event->win_y);
if ((prevIndex != -1) && (prevIndex != index)) if ((prevIndex != -1) && (prevIndex != index))
{ {
// Symlink folders have a different icon // Symlink folders have a different icon
if (isItemLink(prevIndex)) if (isItemLink(prevIndex))
{ {
setItemMiniIcon(prevIndex, minilinkicon); setItemMiniIcon(prevIndex, minilinkicon);
setItemBigIcon(prevIndex, biglinkicon); setItemBigIcon(prevIndex, biglinkicon);
deselectItem(prevIndex);
} }
else else
{ {
setItemMiniIcon(prevIndex, minifoldericon); setItemMiniIcon(prevIndex, minifoldericon);
setItemBigIcon(prevIndex, bigfoldericon); setItemBigIcon(prevIndex, bigfoldericon);
deselectItem(prevIndex);
} }
prevIndex = -1; prevIndex = -1;
} }
// Drop in the background // Drop in the background
dropdirectory = getDirectory(); dropdirectory = getDirectory();
// What is being done (move,copy,link) // What is being done (move,copy,link)
dropaction = inquireDNDAction(); dropaction = inquireDNDAction();
// We will open up a folder if we can hover over it for a while // We will open up a folder if we can hover over it for a while
if ((0 <= index) && isItemDirectory(index)) if ((0 <= index) && isItemDirectory(index))
{ {
// Set open up timer // Set open up timer
getApp()->addTimeout(this, ID_OPEN_TIMER, OPEN_INTERVAL); getApp()->addTimeout(this, ID_OPEN_TIMER, OPEN_INTERVAL);
prevIndex = index; prevIndex = index;
setItemMiniIcon(index, minifolderopenicon); setItemMiniIcon(index, minifolderopenicon);
setItemBigIcon(index, bigfolderopenicon); setItemBigIcon(index, bigfolderopenicon);
selectItem(index);
// Directory where to drop, or directory to open up // Directory where to drop, or directory to open up
dropdirectory = getItemPathname(index); dropdirectory = getItemPathname(index);
} }
// See if dropdirectory is writable // See if dropdirectory is writable
if (::isWritable(dropdirectory)) if (::isWritable(dropdirectory))
{ {
acceptDrop(DRAG_ACCEPT); acceptDrop(DRAG_ACCEPT);
} }
skipping to change at line 530 skipping to change at line 533
if (event->state&SHIFTMASK) if (event->state&SHIFTMASK)
{ {
ctrlshiftkey = true; ctrlshiftkey = true;
} }
} }
// Get DND data // Get DND data
// This is done before displaying the popup menu to fix a drag and drop prob lem with konqueror and dolphin file managers // This is done before displaying the popup menu to fix a drag and drop prob lem with konqueror and dolphin file managers
FXbool dnd = getDNDData(FROM_DRAGNDROP, urilistType, data, len); FXbool dnd = getDNDData(FROM_DRAGNDROP, urilistType, data, len);
int xx, yy, index=-1;
// Display the dnd dialog if the control or shift key were not pressed // Display the dnd dialog if the control or shift key were not pressed
if (confirm_dnd & !ctrlshiftkey) if (confirm_dnd & !ctrlshiftkey)
{ {
// Get item index
FXuint state;
getCursorPosition(xx, yy, state);
index = getItemAt(xx, yy);
// Display a popup to select the drag type // Display a popup to select the drag type
dropaction = DRAG_REJECT; dropaction = DRAG_REJECT;
FXMenuPane menu(this); FXMenuPane menu(this);
int x, y; int x, y;
FXuint state;
getRoot()->getCursorPosition(x, y, state); getRoot()->getCursorPosition(x, y, state);
new FXMenuCommand(&menu, _("Copy here"), copy_clpicon, this, FileList::I D_DRAG_COPY); new FXMenuCommand(&menu, _("Copy here"), copy_clpicon, this, FileList::I D_DRAG_COPY);
new FXMenuCommand(&menu, _("Move here"), moveiticon, this, FileList::ID_ DRAG_MOVE); new FXMenuCommand(&menu, _("Move here"), moveiticon, this, FileList::ID_ DRAG_MOVE);
new FXMenuCommand(&menu, _("Link here"), minilinkicon, this, FileList::I D_DRAG_LINK); new FXMenuCommand(&menu, _("Link here"), minilinkicon, this, FileList::I D_DRAG_LINK);
new FXMenuSeparator(&menu); new FXMenuSeparator(&menu);
new FXMenuCommand(&menu, _("Cancel"), NULL, this, FileList::ID_DRAG_REJE CT); new FXMenuCommand(&menu, _("Cancel"), NULL, this, FileList::ID_DRAG_REJE CT);
menu.create(); menu.create();
allowPopupScroll = true; // Allow keyboard scrolling allowPopupScroll = true; // Allow keyboard scrolling
menu.popup(NULL, x, y); menu.popup(NULL, x, y);
getApp()->runModalWhileShown(&menu); getApp()->runModalWhileShown(&menu);
skipping to change at line 595 skipping to change at line 604
else if (dropaction == DRAG_MOVE) else if (dropaction == DRAG_MOVE)
{ {
f = new File(this, _("File move"), MOVE, num); f = new File(this, _("File move"), MOVE, num);
} }
else if (dropaction == DRAG_LINK) else if (dropaction == DRAG_LINK)
{ {
f = new File(this, _("File symlink"), SYMLINK, num); f = new File(this, _("File symlink"), SYMLINK, num);
} }
else else
{ {
// Deselect item
if (index >= 0)
{
deselectItem(index);
}
FXFREE(&data); FXFREE(&data);
return(0); return(0);
} }
// Target directory // Target directory
FXString targetdir = dropdirectory; FXString targetdir = dropdirectory;
while (*p) while (*p)
{ {
while (*q && *q != '\r') while (*q && *q != '\r')
skipping to change at line 4204 skipping to change at line 4218
filetype = _("Document"); filetype = _("Document");
if (associations) if (associations)
{ {
fileassoc = associations->findFileBinding(pathname.text()); fileassoc = associations->findFileBinding(pathname.text());
} }
} }
// If association is found, use it // If association is found, use it
if (fileassoc) if (fileassoc)
{ {
filetype = fileassoc->extension.text(); // Don't use associations when the file name is a
lso an extension name (ex: zip, rar, tar, etc.)
if (fileassoc->bigicon) if (fileassoc->key != FXPath::name(pathname))
{ {
big = fileassoc->bigicon; filetype = fileassoc->extension.text();
}
if (fileassoc->miniicon) if (fileassoc->bigicon)
{ {
mini = fileassoc->miniicon; big = fileassoc->bigicon;
} }
if (fileassoc->miniicon)
{
mini = fileassoc->miniicon;
}
}
} }
// Symbolic links have a specific type // Symbolic links have a specific type
if (isBrokenLink) if (isBrokenLink)
{ {
filetype = _("Broken link"); filetype = _("Broken link");
} }
else if (isLink) else if (isLink)
{ {
skipping to change at line 4723 skipping to change at line 4741
ext = ""; ext = "";
if (dirname == trashfileslocation) if (dirname == trashfileslocation)
{ {
ext = FXPath::extension(pathname.rbefore('_')); ext = FXPath::extension(pathname.rbefore('_'));
} }
if (ext == "") if (ext == "")
{ {
ext = FXPath::name(pathname).rafter('.', 2).lowe r(); ext = FXPath::name(pathname).rafter('.', 2).lowe r();
if ((ext == "tar.gz") || (ext == "tar.bz2") || ( ext == "tar.xz") || (ext == "tar.z")) // Special cases if ((ext == "tar.gz") || (ext == "tar.bz2") || ( ext == "tar.xz") || (ext == "tar.z")) // Special cases
{ {
// Do not hing
} }
else else
{ {
ext = FXPath::extension(pathname).lower(); ext = FXPath::extension(pathname).lower();
} }
} }
} }
} }
else else
{ {
skipping to change at line 4906 skipping to change at line 4925
else else
{ {
fileassoc = associations->findFileBinding(pathna me.text()); fileassoc = associations->findFileBinding(pathna me.text());
} }
} }
} }
// If association is found, use it // If association is found, use it
if (fileassoc) if (fileassoc)
{ {
if ((fileassoc->extension != "") || !(item->state&FileIt // Don't use associations when th
em::EXECUTABLE)) e file name is also an extension name (ex: zip, rar, tar, etc.)
{ if (fileassoc->key != FXPath::nam
filetype = fileassoc->extension.text(); e(pathname))
} {
if (fileassoc->bigicon) if ((fileassoc->extension
{ != "") || !(item->state&FileItem::EXECUTABLE))
big = fileassoc->bigicon; {
} filetype = fileas
if (fileassoc->miniicon) soc->extension.text();
{ }
mini = fileassoc->miniicon; if (fileassoc->bigicon)
} {
big = fileassoc->
bigicon;
}
if (fileassoc->miniicon)
{
mini = fileassoc-
>miniicon;
}
}
} }
// Symbolic links have a specific type // Symbolic links have a specific type
if (isBrokenLink) if (isBrokenLink)
{ {
filetype = _("Broken link"); filetype = _("Broken link");
} }
else if (isLink) else if (isLink)
{ {
 End of changes. 10 change blocks. 
24 lines changed or deleted 53 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)