Eolite:The ability to store settings in the image
git-svn-id: svn://kolibrios.org@5834 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
1c60d7607a
commit
1d2cc3a517
|
@ -18,6 +18,9 @@
|
|||
//obj
|
||||
#include "..\lib\obj\libini.h"
|
||||
#include "..\lib\obj\box_lib.h"
|
||||
|
||||
byte CMD_ENABLE_SAVE_IMG = false;
|
||||
|
||||
//images
|
||||
#include "imgs\toolbar.txt"
|
||||
#include "imgs\left_p.txt"
|
||||
|
@ -89,6 +92,9 @@ PathShow_data FileShow = {0, 56,215, 6, 100, 0, 0, 0x0, 0xFFFfff, #file_name, #t
|
|||
byte cmd_free=0;
|
||||
#include "include\translations.h"
|
||||
#include "include\fs.h"
|
||||
|
||||
char *fd_path_eolite_ini_path;
|
||||
|
||||
#include "include\settings.h"
|
||||
#include "include\progress_dialog.h"
|
||||
#include "..\lib\copyf.h"
|
||||
|
@ -103,9 +109,11 @@ byte cmd_free=0;
|
|||
#include "include\properties.h"
|
||||
|
||||
|
||||
//char *TMP_PARS,*TMP_PARS2;
|
||||
void main()
|
||||
{
|
||||
word id;
|
||||
byte count_sl = 0;
|
||||
signed x_old, y_old, dif_x, dif_y, adif_x, adif_y;
|
||||
char can_show, can_select, stats;
|
||||
dword selected_offset;
|
||||
|
@ -116,6 +124,27 @@ void main()
|
|||
load_dll(boxlib, #box_lib_init,0);
|
||||
load_dll(libini, #lib_init,1);
|
||||
eolite_ini_path = abspath("Eolite.ini");
|
||||
|
||||
fd_path_eolite_ini_path = "/fd/1/File Managers/Eolite.ini";
|
||||
/*
|
||||
TMP_PARS2 = #fd_path_eolite_ini_path;
|
||||
WHILE(DSBYTE[TMP_PARS])
|
||||
{
|
||||
IF(count_sl!=1)
|
||||
{
|
||||
DSBYTE[TMP_PARS2] = DSBYTE[TMP_PARS];
|
||||
TMP_PARS2++;
|
||||
}
|
||||
ELSE IF(count_sl==2)
|
||||
{
|
||||
strlcpy(TMP_PARS2,"fd",2);
|
||||
TMP_PARS2+=2;
|
||||
}
|
||||
IF(DSBYTE[TMP_PARS]=='/')count_sl++;
|
||||
TMP_PARS++;
|
||||
}
|
||||
*/
|
||||
|
||||
LoadIniSettings();
|
||||
GetSystemDiscs();
|
||||
SetAppColors();
|
||||
|
|
|
@ -109,6 +109,7 @@ void GetSystemDiscs()
|
|||
else kolibrios_drive = false;
|
||||
free(tempbuf);
|
||||
}
|
||||
else if (!strncmp(#sys_discs, "/fd/1/",6)) CMD_ENABLE_SAVE_IMG = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ void settings_dialog()
|
|||
else if (id==6)
|
||||
{
|
||||
ini_set_str stdcall (eolite_ini_path, #config_section, "DefaultPath", #path,strlen(#path));
|
||||
IF(CMD_ENABLE_SAVE_IMG)ini_set_str stdcall (fd_path_eolite_ini_path, #config_section, "DefaultPath", #path,strlen(#path));
|
||||
break;
|
||||
}
|
||||
else if (id==20) show_dev_name ^= 1;
|
||||
|
@ -116,6 +117,7 @@ void LoadIniSettings()
|
|||
|
||||
void SaveIniSettings()
|
||||
{
|
||||
|
||||
ini_set_int stdcall (eolite_ini_path, #config_section, "ShowDeviceName", show_dev_name);
|
||||
ini_set_int stdcall (eolite_ini_path, #config_section, "RealFileNamesCase", real_files_names_case);
|
||||
ini_set_int stdcall (eolite_ini_path, #config_section, "InfoAfterCopy", info_after_copy);
|
||||
|
@ -127,6 +129,21 @@ void SaveIniSettings()
|
|||
ini_set_int stdcall (eolite_ini_path, #config_section, "WinY", Form.top);
|
||||
ini_set_int stdcall (eolite_ini_path, #config_section, "WinW", Form.width);
|
||||
ini_set_int stdcall (eolite_ini_path, #config_section, "WinH", Form.height);
|
||||
|
||||
if(CMD_ENABLE_SAVE_IMG)
|
||||
{
|
||||
ini_set_int stdcall (fd_path_eolite_ini_path, #config_section, "ShowDeviceName", show_dev_name);
|
||||
ini_set_int stdcall (fd_path_eolite_ini_path, #config_section, "RealFileNamesCase", real_files_names_case);
|
||||
ini_set_int stdcall (fd_path_eolite_ini_path, #config_section, "InfoAfterCopy", info_after_copy);
|
||||
ini_set_int stdcall (fd_path_eolite_ini_path, #config_section, "FontSize", font.size.text);
|
||||
ini_set_int stdcall (fd_path_eolite_ini_path, #config_section, "TwoPanels", two_panels);
|
||||
ini_set_int stdcall (fd_path_eolite_ini_path, #config_section, "LineHeight", files.item_h);
|
||||
ini_set_int stdcall (fd_path_eolite_ini_path, #config_section, "TimeDoubleClick", MOUSE_TIME);
|
||||
ini_set_int stdcall (fd_path_eolite_ini_path, #config_section, "WinX", Form.left);
|
||||
ini_set_int stdcall (fd_path_eolite_ini_path, #config_section, "WinY", Form.top);
|
||||
ini_set_int stdcall (fd_path_eolite_ini_path, #config_section, "WinW", Form.width);
|
||||
ini_set_int stdcall (fd_path_eolite_ini_path, #config_section, "WinH", Form.height);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue