Eolite 3.06: Remember win size and pos
git-svn-id: svn://kolibrios.org@5748 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
68d35a5327
commit
a428a4fd42
@ -58,16 +58,6 @@ byte
|
|||||||
temp[4096],
|
temp[4096],
|
||||||
itdir;
|
itdir;
|
||||||
|
|
||||||
//struct t_settings {
|
|
||||||
byte font_size=9,
|
|
||||||
sort_num=2,
|
|
||||||
show_dev_name=true,
|
|
||||||
real_files_names_case=false,
|
|
||||||
info_after_copy=false,
|
|
||||||
two_panels=false,
|
|
||||||
active_panel=1;
|
|
||||||
//} settings;
|
|
||||||
|
|
||||||
char active_path[4096], inactive_path[4096];
|
char active_path[4096], inactive_path[4096];
|
||||||
|
|
||||||
dword eolite_ini_path;
|
dword eolite_ini_path;
|
||||||
@ -83,14 +73,22 @@ int action_buf;
|
|||||||
int rand_n;
|
int rand_n;
|
||||||
byte CMD_REFRESH;
|
byte CMD_REFRESH;
|
||||||
|
|
||||||
signed x_old, y_old, dif_x, dif_y, adif_x, adif_y;
|
//struct t_settings {
|
||||||
|
byte font_size=9,
|
||||||
|
sort_num=2,
|
||||||
|
show_dev_name=true,
|
||||||
|
real_files_names_case=false,
|
||||||
|
info_after_copy=false,
|
||||||
|
two_panels=false,
|
||||||
|
active_panel=1;
|
||||||
|
//} settings;
|
||||||
|
|
||||||
edit_box new_file_ed = {171,213,180,0xFFFFFF,0x94AECE,0xFFFFFF,0xFFFFFF,0,248,#new_element_name,#mouse_dd,100000000000010b,6,0};
|
edit_box new_file_ed = {171,213,180,0xFFFFFF,0x94AECE,0xFFFFFF,0xFFFFFF,0,248,#new_element_name,#mouse_dd,100000000000010b,6,0};
|
||||||
PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, #path, #temp, 0};
|
PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, #path, #temp, 0};
|
||||||
PathShow_data FileShow = {0, 56,215, 6, 100, 0, 0, 0x0, 0xFFFfff, #file_name, #temp, 0};
|
PathShow_data FileShow = {0, 56,215, 6, 100, 0, 0, 0x0, 0xFFFfff, #file_name, #temp, 0};
|
||||||
byte cmd_free=0;
|
byte cmd_free=0;
|
||||||
#include "include\translations.h"
|
#include "include\translations.h"
|
||||||
|
#include "include\settings.h"
|
||||||
#include "include\copy.h"
|
#include "include\copy.h"
|
||||||
#include "include\gui.h"
|
#include "include\gui.h"
|
||||||
#include "include\sorting.h"
|
#include "include\sorting.h"
|
||||||
@ -99,13 +97,13 @@ byte cmd_free=0;
|
|||||||
#include "include\history.h"
|
#include "include\history.h"
|
||||||
#include "include\menu.h"
|
#include "include\menu.h"
|
||||||
#include "include\about.h"
|
#include "include\about.h"
|
||||||
#include "include\settings.h"
|
|
||||||
#include "include\properties.h"
|
#include "include\properties.h"
|
||||||
|
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
word id;
|
word id;
|
||||||
|
signed x_old, y_old, dif_x, dif_y, adif_x, adif_y;
|
||||||
char can_show, can_select, stats;
|
char can_show, can_select, stats;
|
||||||
dword selected_offset;
|
dword selected_offset;
|
||||||
dword IPC_LEN,IPC_ID;
|
dword IPC_LEN,IPC_ID;
|
||||||
@ -296,6 +294,7 @@ void main()
|
|||||||
if (id==1)
|
if (id==1)
|
||||||
{
|
{
|
||||||
KillProcess(about_window);
|
KillProcess(about_window);
|
||||||
|
SaveIniSettings();
|
||||||
ExitProcess();
|
ExitProcess();
|
||||||
}
|
}
|
||||||
if (del_active)
|
if (del_active)
|
||||||
@ -526,7 +525,7 @@ void main()
|
|||||||
|
|
||||||
void draw_window()
|
void draw_window()
|
||||||
{
|
{
|
||||||
DefineAndDrawWindow(GetScreenWidth()-550/4+rand_n,rand_n+30,550,500,0x73,system.color.work,TITLE,0);
|
DefineAndDrawWindow(WinX+rand_n,WinY+rand_n,WinW,WinH,0x73,system.color.work,TITLE,0);
|
||||||
GetProcessInfo(#Form, SelfInfo);
|
GetProcessInfo(#Form, SelfInfo);
|
||||||
if (Form.status_window>2) return;
|
if (Form.status_window>2) return;
|
||||||
if (Form.height < 350) MoveSize(OLD,OLD,OLD,350);
|
if (Form.height < 350) MoveSize(OLD,OLD,OLD,350);
|
||||||
|
@ -6,6 +6,7 @@ cls
|
|||||||
c-- Eolite.c
|
c-- Eolite.c
|
||||||
rem @kpack Eolite.com
|
rem @kpack Eolite.com
|
||||||
@rename Eolite.com Eolite
|
@rename Eolite.com Eolite
|
||||||
|
kpack eolite
|
||||||
@del warning.txt
|
@del warning.txt
|
||||||
@del lang.h--
|
@del lang.h--
|
||||||
@pause
|
@pause
|
@ -21,8 +21,8 @@
|
|||||||
?define T_DOUBLE_CLICK "Double click time (in hundredths)"
|
?define T_DOUBLE_CLICK "Double click time (in hundredths)"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char confir_section = "Config";
|
char config_section[] = "Config";
|
||||||
|
int WinX, WinY, WinW, WinH;
|
||||||
|
|
||||||
void settings_dialog()
|
void settings_dialog()
|
||||||
{
|
{
|
||||||
@ -89,14 +89,18 @@ void DrawSettingsCheckBoxes()
|
|||||||
|
|
||||||
void LoadIniSettings()
|
void LoadIniSettings()
|
||||||
{
|
{
|
||||||
ini_get_color stdcall (eolite_ini_path, #confir_section, "SelectionColor", 0x94AECE); col_selec = EAX;
|
ini_get_color stdcall (eolite_ini_path, #config_section, "SelectionColor", 0x94AECE); col_selec = EAX;
|
||||||
ini_get_int stdcall (eolite_ini_path, #confir_section, "ShowDeviceName", 1); show_dev_name = EAX;
|
ini_get_int stdcall (eolite_ini_path, #config_section, "ShowDeviceName", 1); show_dev_name = EAX;
|
||||||
ini_get_int stdcall (eolite_ini_path, #confir_section, "RealFileNamesCase", 0); real_files_names_case = EAX;
|
ini_get_int stdcall (eolite_ini_path, #config_section, "RealFileNamesCase", 0); real_files_names_case = EAX;
|
||||||
ini_get_int stdcall (eolite_ini_path, #confir_section, "InfoAfterCopy", 0); info_after_copy = EAX;
|
ini_get_int stdcall (eolite_ini_path, #config_section, "InfoAfterCopy", 0); info_after_copy = EAX;
|
||||||
ini_get_int stdcall (eolite_ini_path, #confir_section, "FontSize", 9); font_size = EAX;
|
ini_get_int stdcall (eolite_ini_path, #config_section, "FontSize", 9); font_size = EAX;
|
||||||
ini_get_int stdcall (eolite_ini_path, #confir_section, "TwoPanels", 0); two_panels = EAX;
|
ini_get_int stdcall (eolite_ini_path, #config_section, "TwoPanels", 0); two_panels = EAX;
|
||||||
ini_get_int stdcall (eolite_ini_path, #confir_section, "LineHeight", 18); files.line_h = EAX;
|
ini_get_int stdcall (eolite_ini_path, #config_section, "LineHeight", 18); files.line_h = EAX;
|
||||||
ini_get_int stdcall (eolite_ini_path, #confir_section, "TimeDoubleClick", 50); MOUSE_TIME = EAX;
|
ini_get_int stdcall (eolite_ini_path, #config_section, "TimeDoubleClick", 50); MOUSE_TIME = EAX;
|
||||||
|
ini_get_int stdcall (eolite_ini_path, #config_section, "WinX", 200); WinX = EAX;
|
||||||
|
ini_get_int stdcall (eolite_ini_path, #config_section, "WinY", 50); WinY = EAX;
|
||||||
|
ini_get_int stdcall (eolite_ini_path, #config_section, "WinW", 550); WinW = EAX;
|
||||||
|
ini_get_int stdcall (eolite_ini_path, #config_section, "WinH", 500); WinH = EAX;
|
||||||
BigFontsChange();
|
BigFontsChange();
|
||||||
font.no_bg_copy = true;
|
font.no_bg_copy = true;
|
||||||
font.load("/sys/font/Tahoma.kf");
|
font.load("/sys/font/Tahoma.kf");
|
||||||
@ -105,13 +109,17 @@ void LoadIniSettings()
|
|||||||
|
|
||||||
void SaveIniSettings()
|
void SaveIniSettings()
|
||||||
{
|
{
|
||||||
ini_set_int stdcall (eolite_ini_path, #confir_section, "ShowDeviceName", show_dev_name);
|
ini_set_int stdcall (eolite_ini_path, #config_section, "ShowDeviceName", show_dev_name);
|
||||||
ini_set_int stdcall (eolite_ini_path, #confir_section, "RealFileNamesCase", real_files_names_case);
|
ini_set_int stdcall (eolite_ini_path, #config_section, "RealFileNamesCase", real_files_names_case);
|
||||||
ini_set_int stdcall (eolite_ini_path, #confir_section, "InfoAfterCopy", info_after_copy);
|
ini_set_int stdcall (eolite_ini_path, #config_section, "InfoAfterCopy", info_after_copy);
|
||||||
ini_set_int stdcall (eolite_ini_path, #confir_section, "FontSize", font_size);
|
ini_set_int stdcall (eolite_ini_path, #config_section, "FontSize", font_size);
|
||||||
ini_set_int stdcall (eolite_ini_path, #confir_section, "TwoPanels", two_panels);
|
ini_set_int stdcall (eolite_ini_path, #config_section, "TwoPanels", two_panels);
|
||||||
ini_set_int stdcall (eolite_ini_path, #confir_section, "LineHeight", files.line_h);
|
ini_set_int stdcall (eolite_ini_path, #config_section, "LineHeight", files.line_h);
|
||||||
ini_set_int stdcall (eolite_ini_path, #confir_section, "TimeDoubleClick", MOUSE_TIME);
|
ini_set_int stdcall (eolite_ini_path, #config_section, "TimeDoubleClick", MOUSE_TIME);
|
||||||
|
ini_set_int stdcall (eolite_ini_path, #config_section, "WinX", Form.left);
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#define TITLE "Eolite File Manager v3.05"
|
#define TITLE "Eolite File Manager v3.06"
|
||||||
#define ABOUT_TITLE "Eolite 3.05"
|
#define ABOUT_TITLE "Eolite 3.06"
|
||||||
|
|
||||||
#ifdef LANG_RUS
|
#ifdef LANG_RUS
|
||||||
?define T_FILE "” ©«"
|
?define T_FILE "” ©«"
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
|
char config_section[] = "Config";
|
||||||
|
|
||||||
void LoadIniConfig()
|
void LoadIniConfig()
|
||||||
{
|
{
|
||||||
ini_get_int stdcall (#pixie_ini_path, "Config", "current_theme", THEME_DARK); current_theme = EAX;
|
ini_get_int stdcall (#pixie_ini_path, #config_section, "current_theme", THEME_DARK); current_theme = EAX;
|
||||||
ini_get_int stdcall (#pixie_ini_path, "Config", "window_mode", WINDOW_MODE_NORMAL); window_mode = EAX;
|
ini_get_int stdcall (#pixie_ini_path, #config_section, "window_mode", WINDOW_MODE_NORMAL); window_mode = EAX;
|
||||||
ini_get_int stdcall (#pixie_ini_path, "Config", "win_x_normal", 100); win_x_normal = EAX;
|
ini_get_int stdcall (#pixie_ini_path, #config_section, "win_x_normal", 100); win_x_normal = EAX;
|
||||||
ini_get_int stdcall (#pixie_ini_path, "Config", "win_y_normal", 90); win_y_normal = EAX;
|
ini_get_int stdcall (#pixie_ini_path, #config_section, "win_y_normal", 90); win_y_normal = EAX;
|
||||||
ini_get_int stdcall (#pixie_ini_path, "Config", "win_x_small", -1); win_x_small = EAX;
|
ini_get_int stdcall (#pixie_ini_path, #config_section, "win_x_small", -1); win_x_small = EAX;
|
||||||
ini_get_int stdcall (#pixie_ini_path, "Config", "win_y_small", -1); win_y_small = EAX;
|
ini_get_int stdcall (#pixie_ini_path, #config_section, "win_y_small", -1); win_y_small = EAX;
|
||||||
ini_get_str stdcall (#pixie_ini_path, "Config", "last_folder", #work_folder, sizeof(work_folder), 0);
|
ini_get_str stdcall (#pixie_ini_path, #config_section, "last_folder", #work_folder, sizeof(work_folder), 0);
|
||||||
|
|
||||||
if (current_theme == THEME_DARK) SetColorThemeDark(); else SetColorThemeLight();
|
if (current_theme == THEME_DARK) SetColorThemeDark(); else SetColorThemeLight();
|
||||||
if (win_x_small==-1) win_x_small = 2000;
|
if (win_x_small==-1) win_x_small = 2000;
|
||||||
@ -25,13 +27,13 @@ void SaveIniConfig()
|
|||||||
win_x_small = Form.left;
|
win_x_small = Form.left;
|
||||||
win_y_small = Form.top;
|
win_y_small = Form.top;
|
||||||
}
|
}
|
||||||
ini_set_int stdcall (#pixie_ini_path, "Config", "current_theme", current_theme);
|
ini_set_int stdcall (#pixie_ini_path, #config_section, "current_theme", current_theme);
|
||||||
ini_set_int stdcall (#pixie_ini_path, "Config", "window_mode", window_mode);
|
ini_set_int stdcall (#pixie_ini_path, #config_section, "window_mode", window_mode);
|
||||||
ini_set_int stdcall (#pixie_ini_path, "Config", "win_x_normal", win_x_normal);
|
ini_set_int stdcall (#pixie_ini_path, #config_section, "win_x_normal", win_x_normal);
|
||||||
ini_set_int stdcall (#pixie_ini_path, "Config", "win_y_normal", win_y_normal);
|
ini_set_int stdcall (#pixie_ini_path, #config_section, "win_y_normal", win_y_normal);
|
||||||
ini_set_int stdcall (#pixie_ini_path, "Config", "win_x_small", win_x_small);
|
ini_set_int stdcall (#pixie_ini_path, #config_section, "win_x_small", win_x_small);
|
||||||
ini_set_int stdcall (#pixie_ini_path, "Config", "win_y_small", win_y_small);
|
ini_set_int stdcall (#pixie_ini_path, #config_section, "win_y_small", win_y_small);
|
||||||
ini_set_str stdcall (#pixie_ini_path, "Config", "last_folder", #work_folder, strlen(#work_folder));
|
ini_set_str stdcall (#pixie_ini_path, #config_section, "last_folder", #work_folder, strlen(#work_folder));
|
||||||
}
|
}
|
||||||
|
|
||||||
struct struct_pixie_colors {
|
struct struct_pixie_colors {
|
||||||
|
Loading…
Reference in New Issue
Block a user