2020-05-15 21:59:10 +02:00
|
|
|
|
//===================================================//
|
|
|
|
|
// //
|
|
|
|
|
// TRANSLATIONS //
|
|
|
|
|
// //
|
|
|
|
|
//===================================================//
|
|
|
|
|
|
|
|
|
|
char short_app_name[] = "Quark";
|
|
|
|
|
|
|
|
|
|
#ifdef LANG_RUS
|
|
|
|
|
|
2021-05-28 00:58:17 +02:00
|
|
|
|
char intro[] = " Quark - <20><><EFBFBD> <20><><EFBFBD><EFBFBD>⮩ <20><><EFBFBD>ᬮ<EFBFBD><E1ACAE>騪 ⥪<><E2A5AA><EFBFBD>.
|
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⥪<EFBFBD>⮢<EFBFBD><EFBFBD> 䠩<EFBFBD>.
|
2020-05-15 21:59:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>稥 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
|
|
|
|
Ctrl+O - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD>
|
|
|
|
|
Ctrl+I - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ଠ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD> 䠩<EFBFBD><EFBFBD>
|
|
|
|
|
Ctrl+<EFBFBD><EFBFBD><EFBFBD><EFBFBD> - 㢥<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
Ctrl+<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - 㬥<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
Ctrl+Tab - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⥪<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
Ctrl+E - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>㣮<EFBFBD> <EFBFBD>ணࠬ<EFBFBD><EFBFBD>
|
|
|
|
|
Ctrl+F - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>᪠
|
2021-05-28 00:58:17 +02:00
|
|
|
|
F3 - <EFBFBD>᪠<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
|
|
|
|
|
|
|
|
|
char copied_chars[] = "%i ᨬ<><E1A8AC><EFBFBD><EFBFBD><EFBFBD> <><E1AAAE><EFBFBD><E0AEA2><EFBFBD>";
|
|
|
|
|
char chars_selected[] = "%i ᨬ<><E1A8AC><EFBFBD><EFBFBD><EFBFBD> <20>뤥<EFBFBD><EBA4A5><EFBFBD><EFBFBD>";
|
2020-05-15 21:59:10 +02:00
|
|
|
|
|
|
|
|
|
char color_scheme_names[] = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n<EFBFBD><EFBFBD>ᬮ<EFBFBD> ";
|
|
|
|
|
|
2021-02-06 18:26:52 +01:00
|
|
|
|
char rmb_menu[] =
|
2021-05-28 00:58:17 +02:00
|
|
|
|
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>|Ctrl+C
|
2020-05-15 21:59:10 +02:00
|
|
|
|
-
|
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD>";
|
|
|
|
|
|
2020-05-17 22:10:07 +02:00
|
|
|
|
?define T_MATCHES "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %i "
|
|
|
|
|
?define T_FIND_NEXT "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>"
|
|
|
|
|
|
2020-05-15 21:59:10 +02:00
|
|
|
|
#else
|
|
|
|
|
|
2021-05-28 00:58:17 +02:00
|
|
|
|
char intro[] = " Quark is a simple text viewer.
|
|
|
|
|
Try to open some text file.
|
2020-05-15 21:59:10 +02:00
|
|
|
|
|
|
|
|
|
Hotkeys:
|
|
|
|
|
Ctrl+O - open file
|
|
|
|
|
Ctrl+I - show file properties
|
|
|
|
|
Ctrl+Plus - bigger font
|
|
|
|
|
Ctrl+Down - smaller font
|
|
|
|
|
Ctrl+Tab - select charset
|
|
|
|
|
Ctrl+E - reopen current file in another app
|
|
|
|
|
Ctrl+F - open search
|
2021-05-28 00:58:17 +02:00
|
|
|
|
F3 - search next";
|
|
|
|
|
|
|
|
|
|
char copied_chars[] = "%i characters copied";
|
|
|
|
|
char chars_selected[] = "%i characters selected";
|
2020-05-15 21:59:10 +02:00
|
|
|
|
|
|
|
|
|
char color_scheme_names[] = "Dairy\nCosmos ";
|
|
|
|
|
|
2021-02-06 18:26:52 +01:00
|
|
|
|
char rmb_menu[] =
|
2021-05-28 00:58:17 +02:00
|
|
|
|
"Copy|Ctrl+C
|
2020-05-15 21:59:10 +02:00
|
|
|
|
-
|
|
|
|
|
Reveal in folder
|
|
|
|
|
Copy file path";
|
|
|
|
|
|
2020-05-17 22:10:07 +02:00
|
|
|
|
?define T_MATCHES "Matches: %i "
|
|
|
|
|
?define T_FIND_NEXT " Find next "
|
|
|
|
|
|
2020-05-15 21:59:10 +02:00
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
//===================================================//
|
|
|
|
|
// //
|
|
|
|
|
// DATA //
|
|
|
|
|
// //
|
|
|
|
|
//===================================================//
|
|
|
|
|
|
|
|
|
|
dword color_schemes[] = {
|
|
|
|
|
//bg, text, scroll, selected, cursor
|
2020-05-20 21:34:09 +02:00
|
|
|
|
0xFCF0DA, 0x171501, 0xB2ACA0, 0xD8CAA7, 0xFF0000, 0xFEC53A, //Dairy
|
|
|
|
|
0x282923, 0xD8D8D2, 0x555551, 0x5A574A, 0xFFFfff, 0x9D7E00 //Cosmos
|
2020-05-15 21:59:10 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct THEME
|
|
|
|
|
{
|
2020-05-20 21:34:09 +02:00
|
|
|
|
dword bg, text, cursor, found;
|
2020-05-15 21:59:10 +02:00
|
|
|
|
} theme;
|
|
|
|
|
|
|
|
|
|
char default_dir[] = "/rd/1";
|
2021-05-28 00:58:17 +02:00
|
|
|
|
od_filter filter2 = { 0, "" };
|
2020-05-15 21:59:10 +02:00
|
|
|
|
|
2020-12-18 00:01:09 +01:00
|
|
|
|
CANVAS canvas;
|
2020-05-15 21:59:10 +02:00
|
|
|
|
|
|
|
|
|
dword cursor_pos=0;
|
|
|
|
|
|
|
|
|
|
collection_int lines = {0};
|
|
|
|
|
|
2021-02-06 18:26:52 +01:00
|
|
|
|
#define file_path param
|
|
|
|
|
|
2020-05-15 21:59:10 +02:00
|
|
|
|
//===================================================//
|
|
|
|
|
// //
|
|
|
|
|
// SETTINGS //
|
|
|
|
|
// //
|
|
|
|
|
//===================================================//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_ini ini = { "/sys/settings/app.ini", "Quark" };
|
|
|
|
|
|
|
|
|
|
void LoadIniSettings()
|
|
|
|
|
{
|
2021-02-06 18:26:52 +01:00
|
|
|
|
font_size = ini.GetInt("FontSize", 1);
|
2020-05-15 21:59:10 +02:00
|
|
|
|
user_encoding = ini.GetInt("Encoding", CH_AUTO);
|
|
|
|
|
curcol_scheme = ini.GetInt("ColorScheme", 0);
|
2021-02-06 18:26:52 +01:00
|
|
|
|
Form.left = ini.GetInt("WinX", 150);
|
|
|
|
|
Form.top = ini.GetInt("WinY", 50);
|
|
|
|
|
Form.width = ini.GetInt("WinW", 640);
|
2020-05-18 12:03:45 +02:00
|
|
|
|
Form.height = ini.GetInt("WinH", 563);
|
2020-05-15 21:59:10 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SaveIniSettings()
|
|
|
|
|
{
|
|
|
|
|
ini.SetInt("FontSize", font_size);
|
|
|
|
|
ini.SetInt("Encoding", user_encoding);
|
|
|
|
|
ini.SetInt("ColorScheme", curcol_scheme);
|
|
|
|
|
ini.SetInt("WinX", Form.left);
|
|
|
|
|
ini.SetInt("WinY", Form.top);
|
|
|
|
|
ini.SetInt("WinW", Form.width);
|
|
|
|
|
ini.SetInt("WinH", Form.height);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|