"Fossies" - the Fresh Open Source Software Archive  

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

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

DirPanel.cpp  (xfe-1.41):DirPanel.cpp  (xfe-1.42)
skipping to change at line 440 skipping to change at line 440
// Construct Directory Panel // Construct Directory Panel
DirPanel::DirPanel(FXWindow* owner, FXComposite* p, FXColor listbackcolor, FXCol or listforecolor, FXbool smoothscroll, FXuint opts, int x, int y, int w, int h) : DirPanel::DirPanel(FXWindow* owner, FXComposite* p, FXColor listbackcolor, FXCol or listforecolor, FXbool smoothscroll, FXuint opts, int x, int y, int w, int h) :
FXVerticalFrame(p, opts, x, y, w, h, 0, 0, 0, 0) FXVerticalFrame(p, opts, x, y, w, h, 0, 0, 0, 0)
{ {
// Construct directory panel // Construct directory panel
FXVerticalFrame* cont = new FXVerticalFrame(this, LAYOUT_FILL_Y|LAYOUT_FILL_ X|FRAME_NONE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); FXVerticalFrame* cont = new FXVerticalFrame(this, LAYOUT_FILL_Y|LAYOUT_FILL_ X|FRAME_NONE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
FXPacker* packer = new FXHorizontalFrame(cont, LAYOUT_LEFT|JUSTIFY_LE FT|LAYOUT_FILL_X|FRAME_NONE, 0, 0, 0, 0, 0, 0, 0, 0); FXPacker* packer = new FXHorizontalFrame(cont, LAYOUT_LEFT|JUSTIFY_LE FT|LAYOUT_FILL_X|FRAME_NONE, 0, 0, 0, 0, 0, 0, 0, 0);
// Visually indicate if the panel is active // Visually indicate if the panel is active
activeicon = new FXLabel(packer, "", greenbuttonicon, JUSTIFY_LEFT|LAYOUT_LE FT); activeicon = new FXButton(packer, "", greenbuttonicon, this, DirPanel::ID_FI LELIST, BUTTON_TOOLBAR|JUSTIFY_LEFT|LAYOUT_LEFT);
// Panel title // Panel title
paneltitle = new TextLabel(packer, 0, this, ID_FILELIST, LAYOUT_FILL_X|LAYOU T_FILL_Y); paneltitle = new TextLabel(packer, 0, this, ID_FILELIST, LAYOUT_FILL_X|LAYOU T_FILL_Y);
paneltitle->setText(_("Folders")); paneltitle->setText(_("Folders"));
paneltitle->setBackColor(getApp()->getBaseColor()); paneltitle->setBackColor(getApp()->getBaseColor());
FXuint options; FXuint options;
if (smoothscroll) if (smoothscroll)
{ {
options = LAYOUT_FILL_X|LAYOUT_FILL_Y|TREELIST_BROWSESELECT|TREELIST_SHO WS_LINES|TREELIST_SHOWS_BOXES|FRAME_SUNKEN; options = LAYOUT_FILL_X|LAYOUT_FILL_Y|TREELIST_BROWSESELECT|TREELIST_SHO WS_LINES|TREELIST_SHOWS_BOXES|FRAME_SUNKEN;
skipping to change at line 545 skipping to change at line 545
getApp()->addTimeout(this, ID_DIRSIZE_REFRESH, DIRSIZE_REFRESH_INTERVAL); getApp()->addTimeout(this, ID_DIRSIZE_REFRESH, DIRSIZE_REFRESH_INTERVAL);
FXVerticalFrame::create(); FXVerticalFrame::create();
} }
// Make DirPanel active // Make DirPanel active
void DirPanel::setActive() void DirPanel::setActive()
{ {
// Set active icon // Set active icon
activeicon->setIcon(greenbuttonicon); activeicon->setIcon(greenbuttonicon);
activeicon->setTipText(_("Panel has focus")); activeicon->setTipText(_("Panel is active"));
list->setFocus(); list->setFocus();
isactive = true; isactive = true;
// Current panel must get an inactive icon (but not get the inactive status! ) // Current panel must get an inactive icon (but not get the inactive status! )
FilePanel* currentpanel = ((XFileExplorer*)mainWindow)->getCurrentPanel(); FilePanel* currentpanel = ((XFileExplorer*)mainWindow)->getCurrentPanel();
currentpanel->setInactive(false); currentpanel->setInactive(false);
} }
// Make DirPanel inactive // Make DirPanel inactive
void DirPanel::setInactive() void DirPanel::setInactive()
{ {
// Set active icon // Set active icon
activeicon->setIcon(graybuttonicon); activeicon->setIcon(graybuttonicon);
activeicon->setTipText(_("Panel does not have focus")); activeicon->setTipText(_("Activate panel"));
isactive = false; isactive = false;
} }
// Focus on DirPanel when clicked (i.e. make panel active) // Focus on DirPanel when clicked (i.e. make panel active)
long DirPanel::onCmdFocus(FXObject* sender, FXSelector sel, void* ptr) long DirPanel::onCmdFocus(FXObject* sender, FXSelector sel, void* ptr)
{ {
setActive(); setActive();
return(1); return(1);
} }
skipping to change at line 2657 skipping to change at line 2657
if (::isLink(dir)) if (::isLink(dir))
{ {
dir = FXFile::symlink(dir); dir = FXFile::symlink(dir);
} }
// Select the command and set the appropriate message // Select the command and set the appropriate message
if (FXSELID(sel) == ID_MOUNT) if (FXSELID(sel) == ID_MOUNT)
{ {
op = MOUNT; op = MOUNT;
msg = _("Mount"); msg = _("Mount");
cmd = "mount "; cmd = getApp()->reg().readStringEntry("PROGS", "mount", DEFAULT_MOUNT CMD) + FXString(" ");
} }
else else
{ {
op = UNMOUNT; op = UNMOUNT;
msg = _("Unmount"); msg = _("Unmount");
cmd = "umount "; cmd = getApp()->reg().readStringEntry("PROGS", "unmount", DEFAULT _UMOUNTCMD) + FXString(" ");
} }
cmd += ::quote(dir); cmd += ::quote(dir);
cmd += " 2>&1"; cmd += " 2>&1";
ret = chdir(ROOTDIR); ret = chdir(ROOTDIR);
if (ret < 0) if (ret < 0)
{ {
int errcode = errno; int errcode = errno;
if (errcode) if (errcode)
{ {
MessageBox::error(this, BOX_OK, _("Error"), _("Can't enter folder %s : %s"), ROOTDIR, strerror(errcode)); MessageBox::error(this, BOX_OK, _("Error"), _("Can't enter folder %s : %s"), ROOTDIR, strerror(errcode));
 End of changes. 5 change blocks. 
5 lines changed or deleted 5 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS