mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
ide: MacOS bundle icon option
This commit is contained in:
parent
d4bae3cd09
commit
45c97406ca
6 changed files with 27 additions and 14 deletions
|
|
@ -187,7 +187,7 @@ void Sentinel(Stream& s, const char *txt)
|
||||||
|
|
||||||
void Ide::Serialize(Stream& s)
|
void Ide::Serialize(Stream& s)
|
||||||
{
|
{
|
||||||
int version = 35;
|
int version = 36;
|
||||||
Sentinel(s, "before 12341234");
|
Sentinel(s, "before 12341234");
|
||||||
s.Magic(0x12341234);
|
s.Magic(0x12341234);
|
||||||
Sentinel(s, "after magic");
|
Sentinel(s, "after magic");
|
||||||
|
|
@ -280,6 +280,8 @@ void Ide::Serialize(Stream& s)
|
||||||
s % libclang_options;
|
s % libclang_options;
|
||||||
if(version >= 24)
|
if(version >= 24)
|
||||||
s % libclang_coptions;
|
s % libclang_coptions;
|
||||||
|
if(version >= 36)
|
||||||
|
s % macos_update_icon;
|
||||||
SerializeGlobalConfigs(s);
|
SerializeGlobalConfigs(s);
|
||||||
doc.Serialize(s);
|
doc.Serialize(s);
|
||||||
s % right_split;
|
s % right_split;
|
||||||
|
|
|
||||||
|
|
@ -385,6 +385,10 @@ void Ide::SetupFormat() {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef GUI_COCOA
|
||||||
|
ide.update_icon.Hide();
|
||||||
|
#endif
|
||||||
|
|
||||||
bool show_basic_hints = IsBasicHintsEnabled();
|
bool show_basic_hints = IsBasicHintsEnabled();
|
||||||
|
|
||||||
rtvr
|
rtvr
|
||||||
|
|
@ -462,6 +466,7 @@ void Ide::SetupFormat() {
|
||||||
(ide.search_downloads, search_downloads)
|
(ide.search_downloads, search_downloads)
|
||||||
(ide.show_basic_hints, show_basic_hints)
|
(ide.show_basic_hints, show_basic_hints)
|
||||||
(ide.valgrind, valgrind_options)
|
(ide.valgrind, valgrind_options)
|
||||||
|
(ide.update_icon, macos_update_icon)
|
||||||
;
|
;
|
||||||
hlt.hlstyle.AddColumn("Style");
|
hlt.hlstyle.AddColumn("Style");
|
||||||
hlt.hlstyle.AddColumn("Color").Ctrls(HlPusherFactory);
|
hlt.hlstyle.AddColumn("Color").Ctrls(HlPusherFactory);
|
||||||
|
|
@ -592,7 +597,7 @@ void Ide::SetupFormat() {
|
||||||
CurrentFileDeleteCache();
|
CurrentFileDeleteCache();
|
||||||
editor.SyncCurrentFile();
|
editor.SyncCurrentFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GUI_GTK
|
#ifdef GUI_GTK
|
||||||
if(IsWayland() || IsXWayland()) {
|
if(IsWayland() || IsXWayland()) {
|
||||||
if(FileExists(use_wayland_path) != ide.wayland) {
|
if(FileExists(use_wayland_path) != ide.wayland) {
|
||||||
|
|
|
||||||
|
|
@ -571,13 +571,15 @@ void Ide::SetIdeState(int newstate)
|
||||||
|
|
||||||
void Ide::MakeIcon() {
|
void Ide::MakeIcon() {
|
||||||
#ifdef PLATFORM_COCOA
|
#ifdef PLATFORM_COCOA
|
||||||
String badge = IsOpen() ? main : "";
|
if(!macos_update_icon) {
|
||||||
SetBadgeLabel(badge);
|
String badge = IsOpen() ? main : "";
|
||||||
return;
|
SetBadgeLabel(badge);
|
||||||
|
return;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Image li = IdeImg::Icon256();
|
Image li = IdeImg::Icon256();
|
||||||
#ifndef PLATFORM_POSIX // Kubuntu is using this icon for window while ignoring it in taskbar...
|
#ifndef PLATFORM_LINUX // Kubuntu is using this icon for window while ignoring it in taskbar...
|
||||||
WString mp = main.ToWString();
|
WString mp = main.ToWString();
|
||||||
if(!IsNull(mp))
|
if(!IsNull(mp))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -672,6 +672,7 @@ public:
|
||||||
bool win_deactivated = false;
|
bool win_deactivated = false;
|
||||||
bool block_caret = false;
|
bool block_caret = false;
|
||||||
bool bar_branch = true;
|
bool bar_branch = true;
|
||||||
|
bool macos_update_icon = false;
|
||||||
bool search_downloads =
|
bool search_downloads =
|
||||||
#ifdef PLATFORM_MACOS
|
#ifdef PLATFORM_MACOS
|
||||||
false
|
false
|
||||||
|
|
|
||||||
|
|
@ -645,12 +645,13 @@ LAYOUT(SetupIdeLayout, 512, 400)
|
||||||
ITEM(Upp::Label, dv___14, SetLabel(t_("GUI theme")).LeftPosZ(4, 112).TopPosZ(212, 19))
|
ITEM(Upp::Label, dv___14, SetLabel(t_("GUI theme")).LeftPosZ(4, 112).TopPosZ(212, 19))
|
||||||
ITEM(Upp::DropList, chstyle, LeftPosZ(120, 144).TopPosZ(212, 19))
|
ITEM(Upp::DropList, chstyle, LeftPosZ(120, 144).TopPosZ(212, 19))
|
||||||
ITEM(Upp::Option, wayland, SetLabel(t_("Use Wayland (experimental, needs restart)")).LeftPosZ(272, 408).TopPosZ(212, 20))
|
ITEM(Upp::Option, wayland, SetLabel(t_("Use Wayland (experimental, needs restart)")).LeftPosZ(272, 408).TopPosZ(212, 20))
|
||||||
|
ITEM(Upp::Option, update_icon, SetLabel(t_("Override bundled icon (needs restart)")).LeftPosZ(272, 408).TopPosZ(212, 20))
|
||||||
ITEM(Upp::Option, gui_font, SetLabel(t_("Override GUI font")).LeftPosZ(4, 112).TopPosZ(236, 19))
|
ITEM(Upp::Option, gui_font, SetLabel(t_("Override GUI font")).LeftPosZ(4, 112).TopPosZ(236, 19))
|
||||||
ITEM(Upp::DropList, face, LeftPosZ(120, 144).TopPosZ(236, 19))
|
ITEM(Upp::DropList, face, LeftPosZ(120, 144).TopPosZ(236, 19))
|
||||||
ITEM(Upp::DropList, height, LeftPosZ(268, 50).TopPosZ(236, 19))
|
ITEM(Upp::DropList, height, LeftPosZ(268, 50).TopPosZ(236, 19))
|
||||||
ITEM(Upp::Option, bold, SetLabel(t_("Bold")).LeftPosZ(322, 44).TopPosZ(236, 19))
|
ITEM(Upp::Option, bold, SetLabel(t_("Bold")).LeftPosZ(322, 44).TopPosZ(236, 19))
|
||||||
ITEM(Upp::Option, italic, SetLabel(t_("Italic")).LeftPosZ(370, 44).TopPosZ(236, 19))
|
ITEM(Upp::Option, italic, SetLabel(t_("Italic")).LeftPosZ(370, 44).TopPosZ(236, 19))
|
||||||
ITEM(Upp::Label, dv___22, SetLabel(t_("(needs restart)")).LeftPosZ(416, 88).TopPosZ(236, 19))
|
ITEM(Upp::Label, dv___23, SetLabel(t_("(needs restart)")).LeftPosZ(416, 88).TopPosZ(236, 19))
|
||||||
ITEM(Upp::Label, console_txt, SetLabel(t_("Console binary")).LeftPosZ(4, 112).TopPosZ(260, 19))
|
ITEM(Upp::Label, console_txt, SetLabel(t_("Console binary")).LeftPosZ(4, 112).TopPosZ(260, 19))
|
||||||
ITEM(Upp::EditString, console, LeftPosZ(120, 380).TopPosZ(260, 19))
|
ITEM(Upp::EditString, console, LeftPosZ(120, 380).TopPosZ(260, 19))
|
||||||
ITEM(Upp::Button, xterm, SetLabel(t_("xterm")).LeftPosZ(120, 60).TopPosZ(284, 20))
|
ITEM(Upp::Button, xterm, SetLabel(t_("xterm")).LeftPosZ(120, 60).TopPosZ(284, 20))
|
||||||
|
|
@ -660,13 +661,13 @@ LAYOUT(SetupIdeLayout, 512, 400)
|
||||||
ITEM(Upp::Button, lxde, SetLabel(t_("LXDE")).LeftPosZ(376, 60).TopPosZ(284, 20))
|
ITEM(Upp::Button, lxde, SetLabel(t_("LXDE")).LeftPosZ(376, 60).TopPosZ(284, 20))
|
||||||
ITEM(Upp::Button, xfce, SetLabel(t_("XFCE")).LeftPosZ(440, 60).TopPosZ(284, 20))
|
ITEM(Upp::Button, xfce, SetLabel(t_("XFCE")).LeftPosZ(440, 60).TopPosZ(284, 20))
|
||||||
ITEM(Upp::Option, output_per_assembly, SetLabel(t_("Use unique output directory per assembly (append assembly name to output directory)")).HSizePosZ(4, 4).TopPosZ(308, 16))
|
ITEM(Upp::Option, output_per_assembly, SetLabel(t_("Use unique output directory per assembly (append assembly name to output directory)")).HSizePosZ(4, 4).TopPosZ(308, 16))
|
||||||
ITEM(Upp::Label, dv___32, SetLabel(t_("In editor mode, path for .usc files")).LeftPosZ(4, 192).TopPosZ(328, 20))
|
ITEM(Upp::Label, dv___33, SetLabel(t_("In editor mode, path for .usc files")).LeftPosZ(4, 192).TopPosZ(328, 20))
|
||||||
ITEM(Upp::EditString, uscpath, HSizePosZ(172, 28).TopPosZ(328, 19))
|
ITEM(Upp::EditString, uscpath, HSizePosZ(172, 28).TopPosZ(328, 19))
|
||||||
ITEM(Upp::Button, uscpath_sel, RightPosZ(4, 20).TopPosZ(328, 19))
|
ITEM(Upp::Button, uscpath_sel, RightPosZ(4, 20).TopPosZ(328, 19))
|
||||||
ITEM(Upp::Label, dv___35, SetLabel(t_("Default UppHub folder")).LeftPosZ(4, 192).TopPosZ(352, 20))
|
ITEM(Upp::Label, dv___36, SetLabel(t_("Default UppHub folder")).LeftPosZ(4, 192).TopPosZ(352, 20))
|
||||||
ITEM(Upp::EditString, upphub, HSizePosZ(172, 28).TopPosZ(352, 19))
|
ITEM(Upp::EditString, upphub, HSizePosZ(172, 28).TopPosZ(352, 19))
|
||||||
ITEM(Upp::Button, upphub_sel, RightPosZ(4, 20).TopPosZ(352, 19))
|
ITEM(Upp::Button, upphub_sel, RightPosZ(4, 20).TopPosZ(352, 19))
|
||||||
ITEM(Upp::Label, dv___38, SetLabel(t_("Additional valgrind options")).LeftPosZ(4, 164).TopPosZ(376, 19))
|
ITEM(Upp::Label, dv___39, SetLabel(t_("Additional valgrind options")).LeftPosZ(4, 164).TopPosZ(376, 19))
|
||||||
ITEM(Upp::EditString, valgrind, LeftPosZ(172, 336).TopPosZ(376, 19))
|
ITEM(Upp::EditString, valgrind, LeftPosZ(172, 336).TopPosZ(376, 19))
|
||||||
END_LAYOUT
|
END_LAYOUT
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -217,9 +217,6 @@ void AppMain___()
|
||||||
Ctrl::SetDarkThemeEnabled();
|
Ctrl::SetDarkThemeEnabled();
|
||||||
Ctrl::SkinChangeSensitive();
|
Ctrl::SkinChangeSensitive();
|
||||||
Ctrl::SetAppName("TheIDE");
|
Ctrl::SetAppName("TheIDE");
|
||||||
#ifdef PLATFORM_COCOA
|
|
||||||
Ctrl::SetAlwaysUseBundledIcon();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
SetLanguage(LNG_ENGLISH);
|
SetLanguage(LNG_ENGLISH);
|
||||||
SetDefaultCharset(CHARSET_UTF8);
|
SetDefaultCharset(CHARSET_UTF8);
|
||||||
|
|
@ -406,6 +403,11 @@ void AppMain___()
|
||||||
|
|
||||||
ide.LoadConfig();
|
ide.LoadConfig();
|
||||||
|
|
||||||
|
#ifdef PLATFORM_COCOA
|
||||||
|
if(!ide.macos_update_icon)
|
||||||
|
Ctrl::SetAlwaysUseBundledIcon();
|
||||||
|
#endif
|
||||||
|
|
||||||
if(!ide.disable_custom_caption)
|
if(!ide.disable_custom_caption)
|
||||||
ide.CustomTitleBar();
|
ide.CustomTitleBar();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue