added code samples; fixed color load bug
This commit is contained in:
parent
f3e808b839
commit
cd8ed222ae
|
@ -73,7 +73,9 @@ class ListSignalsMixin:
|
||||||
|
|
||||||
# handle foreground and background colors
|
# handle foreground and background colors
|
||||||
if this_style.foreground:
|
if this_style.foreground:
|
||||||
self.fr_color_btn.set_color(Gdk.color_parse(this_style.foreground))
|
color = Gdk.color_parse(this_style.foreground)
|
||||||
|
if color:
|
||||||
|
self.fr_color_btn.set_color(color)
|
||||||
self.fr_color_btn.set_sensitive(True)
|
self.fr_color_btn.set_sensitive(True)
|
||||||
self.fr_check_btn.set_active(True)
|
self.fr_check_btn.set_active(True)
|
||||||
else:
|
else:
|
||||||
|
@ -82,7 +84,9 @@ class ListSignalsMixin:
|
||||||
self.fr_check_btn.set_active(False)
|
self.fr_check_btn.set_active(False)
|
||||||
|
|
||||||
if this_style.background:
|
if this_style.background:
|
||||||
self.br_color_btn.set_color(Gdk.color_parse(this_style.background))
|
color = Gdk.color_parse(this_style.background)
|
||||||
|
if color:
|
||||||
|
self.br_color_btn.set_color(color)
|
||||||
self.br_color_btn.set_sensitive(True)
|
self.br_color_btn.set_sensitive(True)
|
||||||
self.br_check_btn.set_active(True)
|
self.br_check_btn.set_active(True)
|
||||||
else:
|
else:
|
||||||
|
|
Binary file not shown.
|
@ -188,8 +188,76 @@ samples['html'] = """
|
||||||
# samples['imagej'] = """
|
# samples['imagej'] = """
|
||||||
# samples['ini'] = """
|
# samples['ini'] = """
|
||||||
# samples['java'] = """
|
# samples['java'] = """
|
||||||
# samples['js'] = """
|
samples['js'] = """
|
||||||
# samples['json'] = """
|
const loadBackground = () => {
|
||||||
|
const bgElm = document.getElementById("bg");
|
||||||
|
const bgPath = getCookie('bgSlug');
|
||||||
|
|
||||||
|
if (!bgPath) {
|
||||||
|
const path = '/static/imgs/backgrounds/background.png';
|
||||||
|
setCookie('bgSlug', path);
|
||||||
|
setBackgroundElement(bgElm, path);
|
||||||
|
} else {
|
||||||
|
// NOTE: Probably in IFRAME and unloaded the background...
|
||||||
|
if (!bgElm) return ;
|
||||||
|
setBackgroundElement(bgElm, bgPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
|
||||||
|
samples['json'] = """
|
||||||
|
{
|
||||||
|
"load_defaults":false,
|
||||||
|
"config":{
|
||||||
|
"base_of_home":"",
|
||||||
|
"hide_hidden_files":"true",
|
||||||
|
"thumbnailer_path":"ffmpegthumbnailer",
|
||||||
|
"blender_thumbnailer_path":"",
|
||||||
|
"go_past_home":"true",
|
||||||
|
"lock_folder":"false",
|
||||||
|
"locked_folders":[
|
||||||
|
"venv",
|
||||||
|
"flasks"
|
||||||
|
],
|
||||||
|
"mplayer_options":"-quiet -really-quiet -xy 1600 -geometry 50%:50%",
|
||||||
|
"remux_folder_max_disk_usage":"8589934592",
|
||||||
|
"make_transparent":0,
|
||||||
|
"main_window_x":2288,
|
||||||
|
"main_window_y":199,
|
||||||
|
"main_window_min_width":720,
|
||||||
|
"main_window_min_height":480,
|
||||||
|
"main_window_width":800,
|
||||||
|
"main_window_height":600,
|
||||||
|
"application_dirs":[
|
||||||
|
"/usr/share/applications",
|
||||||
|
"/home/abaddon/.local/share/applications"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"filters":{
|
||||||
|
"meshs":[
|
||||||
|
".blend",
|
||||||
|
".dae",
|
||||||
|
".fbx",
|
||||||
|
".gltf",
|
||||||
|
".obj",
|
||||||
|
".stl"
|
||||||
|
],
|
||||||
|
"code":[
|
||||||
|
".cpp",
|
||||||
|
".css",
|
||||||
|
".c",
|
||||||
|
".go",
|
||||||
|
".pom"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"debugging":{
|
||||||
|
"ch_log_lvl":10,
|
||||||
|
"fh_log_lvl":20.0,
|
||||||
|
"target_file": null,
|
||||||
|
"is_debugging": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"""
|
||||||
# samples['latex'] = """
|
# samples['latex'] = """
|
||||||
# samples['libtool'] = """
|
# samples['libtool'] = """
|
||||||
# samples['lua'] = """
|
# samples['lua'] = """
|
||||||
|
@ -212,8 +280,12 @@ samples['html'] = """
|
||||||
# samples['perl'] = """
|
# samples['perl'] = """
|
||||||
|
|
||||||
samples['php'] = """
|
samples['php'] = """
|
||||||
|
<?php
|
||||||
|
|
||||||
/* ygtyuy */
|
/* ygtyuy */
|
||||||
print 'hello world';
|
print 'hello world';
|
||||||
|
|
||||||
|
>
|
||||||
"""
|
"""
|
||||||
# samples['pkgconfig'] = """
|
# samples['pkgconfig'] = """
|
||||||
# samples['prolog'] = """
|
# samples['prolog'] = """
|
||||||
|
@ -236,6 +308,23 @@ samples['python'] = """
|
||||||
# TODO handle case where there is a permissions issue
|
# TODO handle case where there is a permissions issue
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
samples['python3'] = """
|
||||||
|
def on_save_clicked(self, param):
|
||||||
|
if not self.currentSchemeFile:
|
||||||
|
filename = runSaveAsDialog(self.window, self.entryId.get_text() + '.xml')
|
||||||
|
|
||||||
|
if filename and not '.' in os.path.basename(filename):
|
||||||
|
filename = filename + '.xml'
|
||||||
|
|
||||||
|
if filename:
|
||||||
|
self.write_scheme(filename, self.entryId.get_text())
|
||||||
|
self.currentSchemeFile = filename
|
||||||
|
else:
|
||||||
|
self.write_scheme(self.currentSchemeFile, self.entryId.get_text())
|
||||||
|
|
||||||
|
# TODO handle case where there is a permissions issue
|
||||||
|
"""
|
||||||
|
|
||||||
# samples['r'] = """
|
# samples['r'] = """
|
||||||
# samples['rpmspec'] = """
|
# samples['rpmspec'] = """
|
||||||
# samples['ruby'] = """
|
# samples['ruby'] = """
|
||||||
|
@ -253,6 +342,31 @@ samples['python'] = """
|
||||||
# samples['vbnet'] = """
|
# samples['vbnet'] = """
|
||||||
# samples['verilog'] = """
|
# samples['verilog'] = """
|
||||||
# samples['vhdl'] = """
|
# samples['vhdl'] = """
|
||||||
# samples['xml'] = """
|
samples['xml'] = """
|
||||||
|
|
||||||
|
{% if current_directory %}
|
||||||
|
<nav class="navbar navbar-dark bg-dark navbar-expand-lg justify-content-center text-center fixed-bottom">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarTogglerFooter"
|
||||||
|
aria-controls="navbarTogglerFooter" aria-expanded="false" aria-label="Toggle Footer Navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div id="navbarTogglerFooter" class="row collapse navbar-collapse">
|
||||||
|
<ul class="navbar-nav">
|
||||||
|
<li class="nav-item mx-3">
|
||||||
|
<span id="tggl-faves-btn" class="btn btn-secondary btn-sm" title="Add/Delete from favorites..." >☆</span>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item mx-auto">
|
||||||
|
<span id="path">{{current_directory}}</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
# samples['xslt'] = """
|
# samples['xslt'] = """
|
||||||
# samples['yacc'] = """
|
# samples['yacc'] = """
|
||||||
|
|
|
@ -639,6 +639,11 @@
|
||||||
<property name="position">0</property>
|
<property name="position">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="shadow-type">in</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkSourceView" id="src_preview">
|
<object class="GtkSourceView" id="src_preview">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -655,6 +660,8 @@
|
||||||
<property name="highlight-current-line">True</property>
|
<property name="highlight-current-line">True</property>
|
||||||
<property name="smart-backspace">True</property>
|
<property name="smart-backspace">True</property>
|
||||||
</object>
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">True</property>
|
<property name="expand">True</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
|
|
Loading…
Reference in New Issue