Skip to content

Commit

Permalink
Don't crash if not detect window icons
Browse files Browse the repository at this point in the history
  • Loading branch information
bigbruno committed Oct 5, 2024
1 parent 3b0ff38 commit f446b45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions usr/share/bigbashview/framework/js/client-side-decorator.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ document.addEventListener('DOMContentLoaded', function () {
right?.classList.remove('normal-mode');
overlay?.classList.add('no-margin', 'no-round');
canResize = false;
if (maximize) { maximize.innerHTML = `<img class="window-control-btn-img" src="<?include bash RUST_BACKTRACE=0 geticons window-restore-symbolic ?>">`; }
if (maximize) { maximize.innerHTML = `<img class="window-control-btn-img" src="<?include bash RUST_BACKTRACE=0 geticons window-restore-symbolic 2> /dev/null ?>">`; }
} else {
// Adds the specific class and removing others
page?.classList.add('normal-mode');
Expand All @@ -87,7 +87,7 @@ document.addEventListener('DOMContentLoaded', function () {
windowControlsLeft?.classList.add('window-controls');
overlay?.classList.remove('no-margin', 'no-round');
canResize = true;
if (maximize) { maximize.innerHTML = `<img class="window-control-btn-img" src="<?include bash RUST_BACKTRACE=0 geticons window-maximize-symbolic ?>">`; }
if (maximize) { maximize.innerHTML = `<img class="window-control-btn-img" src="<?include bash RUST_BACKTRACE=0 geticons window-maximize-symbolic 2> /dev/null ?>">`; }
}

// Move content of left bar to top if buttons are hidden
Expand Down
6 changes: 3 additions & 3 deletions usr/share/bigbashview/framework/shell/windowControlSide.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ minimizeButton="
<a id=\"minimize-btn\" onclick=\"windowControl.minimize()\">
<div class=\"window-control-btn-box\">
<div class=\"window-control-btn\">
<img class=\"window-control-btn-img\" src=\"$(geticons window-minimize-symbolic)\">
<img class=\"window-control-btn-img\" src=\"$(geticons window-minimize-symbolic 2>/dev/null)\">
</div>
</div>
</a>
Expand All @@ -15,7 +15,7 @@ maximizeButton="
<div class=\"window-control-btn-box\">
<div id=\"maximize-btn-image\" class=\"window-control-btn\">
<!-- This icon is managed by javascript to change from maximize and restore -->
<img class=\"window-control-btn-img\" src=\"$(geticons window-maximize-symbolic)\">
<img class=\"window-control-btn-img\" src=\"$(geticons window-maximize-symbolic 2>/dev/null)\">
</div>
</div>
</a>
Expand All @@ -25,7 +25,7 @@ closeButton="
<a id=\"close-btn\" onclick=\"windowControl.close()\">
<div class=\"window-control-btn-box\">
<div class=\"window-control-btn\">
<img class=\"window-control-btn-img\" src=\"$(geticons window-close-symbolic)\">
<img class=\"window-control-btn-img\" src=\"$(geticons window-close-symbolic 2>/dev/null)\">
</div>
</div>
</a>
Expand Down

0 comments on commit f446b45

Please sign in to comment.