"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/XFileExplorer.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).

XFileExplorer.cpp  (xfe-1.41):XFileExplorer.cpp  (xfe-1.42)
skipping to change at line 15 skipping to change at line 15
#include <stdlib.h> #include <stdlib.h>
#include <signal.h> #include <signal.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <unistd.h> #include <unistd.h>
#include <fx.h> #include <fx.h>
#include <fxkeys.h> #include <fxkeys.h>
#include <FXPNGIcon.h> #include <FXPNGIcon.h>
#include <xvt/xvt.h>
#include "xfedefs.h" #include "xfedefs.h"
#include "icons.h" #include "icons.h"
#include "xfeutils.h" #include "xfeutils.h"
#include "startupnotification.h" #include "startupnotification.h"
#include "File.h" #include "File.h"
#include "FileList.h" #include "FileList.h"
#include "FileDict.h" #include "FileDict.h"
#include "Preferences.h" #include "Preferences.h"
#include "FilePanel.h" #include "FilePanel.h"
#include "InputDialog.h" #include "InputDialog.h"
skipping to change at line 1858 skipping to change at line 1856
getApp()->reg().writeIntEntry("OPTIONS", "ypos", getY()); getApp()->reg().writeIntEntry("OPTIONS", "ypos", getY());
} }
} }
getApp()->reg().writeUnsignedEntry("OPTIONS", "generaltoolbar", (FXuint) generaltoolbar->shown()); getApp()->reg().writeUnsignedEntry("OPTIONS", "generaltoolbar", (FXuint) generaltoolbar->shown());
getApp()->reg().writeUnsignedEntry("OPTIONS", "toolstoolbar", (FXuint)to olstoolbar->shown()); getApp()->reg().writeUnsignedEntry("OPTIONS", "toolstoolbar", (FXuint)to olstoolbar->shown());
getApp()->reg().writeUnsignedEntry("OPTIONS", "paneltoolbar", (FXuint)pa neltoolbar->shown()); getApp()->reg().writeUnsignedEntry("OPTIONS", "paneltoolbar", (FXuint)pa neltoolbar->shown());
getApp()->reg().writeUnsignedEntry("OPTIONS", "locationbar", (FXuint)loc ationbar->shown()); getApp()->reg().writeUnsignedEntry("OPTIONS", "locationbar", (FXuint)loc ationbar->shown());
getApp()->reg().writeUnsignedEntry("OPTIONS", "status", (FXuint)lpanel-> statusbarShown()); getApp()->reg().writeUnsignedEntry("OPTIONS", "status", (FXuint)lpanel-> statusbarShown());
getApp()->reg().writeUnsignedEntry("SETTINGS", "file_tooltips", (FXuint) file_tooltips); getApp()->reg().writeUnsignedEntry("SETTINGS", "file_tooltips", (FXuint) file_tooltips);
getApp()->reg().writeUnsignedEntry("SETTINGS", "relative_resize", (FXuin t)relative_resize); getApp()->reg().writeUnsignedEntry("SETTINGS", "relative_resize", (FXuin t)relative_resize);
getApp()->reg().writeRealEntry("OPTIONS", "treepanel_tree_pct", (int)(tr getApp()->reg().writeRealEntry("OPTIONS", "treepanel_tree_pct", (int)(tr
eepanel_tree_pct*100)/100.0); eepanel_tree_pct*1000)/1000.0);
getApp()->reg().writeRealEntry("OPTIONS", "twopanels_lpanel_pct", (int)( getApp()->reg().writeRealEntry("OPTIONS", "twopanels_lpanel_pct", (int)(
twopanels_lpanel_pct*100)/100.0); twopanels_lpanel_pct*1000)/1000.0);
getApp()->reg().writeRealEntry("OPTIONS", "treetwopanels_tree_pct", (int getApp()->reg().writeRealEntry("OPTIONS", "treetwopanels_tree_pct", (int
)(treetwopanels_tree_pct*100)/100.0); )(treetwopanels_tree_pct*1000)/1000.0);
getApp()->reg().writeRealEntry("OPTIONS", "treetwopanels_lpanel_pct", (i getApp()->reg().writeRealEntry("OPTIONS", "treetwopanels_lpanel_pct", (i
nt)(treetwopanels_lpanel_pct*100)/100.0); nt)(treetwopanels_lpanel_pct*1000)/1000.0);
// Panel stacking // Panel stacking
getApp()->reg().writeUnsignedEntry("OPTIONS", "vert_panels", vertpanels) ; getApp()->reg().writeUnsignedEntry("OPTIONS", "vert_panels", vertpanels) ;
// Save panel view only if not given from command line // Save panel view only if not given from command line
if (panel_mode == -1) if (panel_mode == -1)
{ {
getApp()->reg().writeUnsignedEntry("OPTIONS", "panel_view", (FXuint) panel_view); getApp()->reg().writeUnsignedEntry("OPTIONS", "panel_view", (FXuint) panel_view);
} }
skipping to change at line 3148 skipping to change at line 3146
{ {
// Display help window // Display help window
if (helpwindow == NULL) if (helpwindow == NULL)
{ {
helpwindow = new TextWindow(getApp(), _("Help"), 40, 120); helpwindow = new TextWindow(getApp(), _("Help"), 40, 120);
} }
helpwindow->setIcon(helpicon); helpwindow->setIcon(helpicon);
// Set text font // Set text font
FXString fontspec; FXString fontspec;
fontspec = getApp()->reg().readStringEntry("SETTINGS", "textfont", "Helvetic a,100,normal,regular"); fontspec = getApp()->reg().readStringEntry("SETTINGS", "textfont", DEFAULT_T EXT_FONT);
if (!fontspec.empty()) if (!fontspec.empty())
{ {
FXFont* font = new FXFont(getApp(), fontspec); FXFont* font = new FXFont(getApp(), fontspec);
font->create(); font->create();
helpwindow->setFont(font); helpwindow->setFont(font);
} }
// NB: The HELP_TEXT macro is defined in help.h // NB: The HELP_TEXT macro is defined in help.h
FXString str = (FXString)" "+COPYRIGHT+HELP_TEXT; FXString str = (FXString)" "+COPYRIGHT+HELP_TEXT;
helpwindow->setText(str.text()); helpwindow->setText(str.text());
skipping to change at line 3668 skipping to change at line 3666
} }
FXString command=" "; FXString command=" ";
if (rundialog==NULL) if (rundialog==NULL)
rundialog=new HistInputDialog(this,"",_("Execute the command:"),_("Execu te command"),"", bigexecicon,HIST_INPUT_EXECUTABLE_FILE,true,_("Console mode")); rundialog=new HistInputDialog(this,"",_("Execute the command:"),_("Execu te command"),"", bigexecicon,HIST_INPUT_EXECUTABLE_FILE,true,_("Console mode"));
rundialog->create(); rundialog->create();
rundialog->setText(command); rundialog->setText(command);
rundialog->CursorEnd(); rundialog->CursorEnd();
rundialog->selectAll(); rundialog->selectAll();
rundialog->clearItems(); rundialog->clearItems();
for (int i=0; i<RunHistSize; i++) for (int i=0; i<RunHistSize; i++)
rundialog->appendItem(RunHistory[i]); rundialog->appendItem(RunHistory[i]);
rundialog->sortItems();
rundialog->setDirectory(ROOTDIR); rundialog->setDirectory(ROOTDIR);
if (rundialog->execute()) if (rundialog->execute())
{ {
command=rundialog->getText(); command=rundialog->getText();
if (command != " ") if (command != " ")
{ {
// Execute command in command window // Execute command in command window
if (rundialog->getOption()) if (rundialog->getOption())
{ {
skipping to change at line 3769 skipping to change at line 3767
{ {
int errcode=errno; int errcode=errno;
if (errcode) if (errcode)
MessageBox::error(this,BOX_OK,_("Error"),_("Can't enter folder %s: % s"),lpanel->getCurrent()->getDirectory().text(),strerror(errcode)); MessageBox::error(this,BOX_OK,_("Error"),_("Can't enter folder %s: % s"),lpanel->getCurrent()->getDirectory().text(),strerror(errcode));
else else
MessageBox::error(this,BOX_OK,_("Error"),_("Can't enter folder %s"), lpanel->getCurrent()->getDirectory().text()); MessageBox::error(this,BOX_OK,_("Error"),_("Can't enter folder %s"), lpanel->getCurrent()->getDirectory().text());
return 0; return 0;
} }
FXString title, sucmd; FXString title, sucmd, command;
if (use_sudo) if (use_sudo)
{ {
title = _("Enter the user password:"); title = _("Enter the user password:");
sucmd = SUDOCMD; sucmd = SUDOCMD;
} }
else else
{ {
title = _("Enter the root password:"); title = _("Enter the root password:");
sucmd = SUCMD; sucmd = SUCMD;
} }
// Use appropriate background and foreground colors for Xvt // Get text font
char color[64]; FXString fontspec = getApp()->reg().readStringEntry("SETTINGS", "textfont",
fxnamefromcolor(color,getApp()->getBackColor()); "Courier,100,normal,regular");
FXString bg=" -bg "; if (fontspec.empty())
bg = bg + color; {
fxnamefromcolor(color,getApp()->getForeColor()); command = "st -t " + ::quote(title) + sucmd;
FXString fg=" -fg "; }
fg = fg + color + " "; else
{
// Command string FXchar fontsize[32];
FXString command = "xvt -title " + ::quote(title) + bg + fg + sucmd; FXFont* font = new FXFont(getApp(), fontspec);
font->create();
snprintf(fontsize, sizeof(fontsize), "%d",(int)(font->getSize()/1
0)); // Size is in deci-points, thus divide by 10
command = "st -t " + ::quote(title) + " -f '" + (font->getFamily(
)).text() + ":pixelsize=" + fontsize + "'" + sucmd;
}
// Execute su or sudo command in an internal Xvt terminal // Execute su or sudo command in an internal st terminal
int status=runinxvt(command); int status = runst(command);
// If error // If error
ret=chdir(startlocation.text()); ret=chdir(startlocation.text());
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"),startlocation.text(),strerror(errcode)); MessageBox::error(this,BOX_OK,_("Error"),_("Can't enter folder %s: % s"),startlocation.text(),strerror(errcode));
else else
MessageBox::error(this,BOX_OK,_("Error"),_("Can't enter folder %s"), startlocation.text()); MessageBox::error(this,BOX_OK,_("Error"),_("Can't enter folder %s"), startlocation.text());
 End of changes. 8 change blocks. 
26 lines changed or deleted 30 lines changed or added

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