Added icons; updated preview code formatting

This commit is contained in:
itdominator 2023-10-22 20:44:20 -05:00
parent 8aa3d96617
commit fa1e17f4e5
21 changed files with 224 additions and 196 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 KiB

After

Width:  |  Height:  |  Size: 200 KiB

View File

@ -10,10 +10,11 @@ samples = {}
samples['ada'] = """
with Ada.Text_Io; use Ada.Text_Io;
procedure Doors is
procedure Doors is
type Door_State is (Closed, Open);
type Door_List is array(Positive range 1..100) of Door_State;
The_Doors : Door_List := (others => Closed);
begin
for I in 1..100 loop
for J in The_Doors'range loop
@ -26,27 +27,28 @@ with Ada.Text_Io; use Ada.Text_Io;
end if;
end loop;
end loop;
for I in The_Doors'range loop
Put_Line(Integer'Image(I) & " is " & Door_State'Image(The_Doors(I)));
end loop;
end Doors;
end Doors;
"""
samples['asp'] = """
<html>
<body>
<form action="demo_reqquery.asp" method="get">
Your name: <input type="text" name="fname" size="20" />
<input type="submit" value="Submit" />
</form>
<%
dim fname
fname=Request.QueryString("fname")
If fname<>"" Then
<form action="demo_reqquery.asp" method="get">
Your name: <input type="text" name="fname" size="20" />
<input type="submit" value="Submit" />
</form>
<%
dim fname
fname=Request.QueryString("fname")
If fname<>"" Then
Response.Write("Hello " & fname & "!<br />")
Response.Write("How are you today?")
End If
%>
End If
%>
</body>
</html>
"""
@ -55,16 +57,17 @@ End If
samples['awk'] = """
BEGIN {
for(i=1; i <= 100; i++) {
for(i = 1; i <= 100; i++) {
doors[i] = 0 # close the doors
}
for(i=1; i <= 100; i++) {
for(i = 1; i <= 100; i++) {
if ( int(sqrt(i)) == sqrt(i) ) {
doors[i] = 1
}
}
for(i=1; i <= 100; i++)
{
for(i = 1; i <= 100; i++) {
print i, doors[i] ? "open" : "close"
}
}
@ -79,26 +82,25 @@ samples['c'] = """
/* Some comments */
#include <stdio.h>
int main()
{
int main() {
int square = 1, increment = 3, door;
for (door = 1; door <= 100; ++door)
{
for (door = 1; door <= 100; ++door) {
printf("door #%d", door);
if (door == square)
{
if (door == square) {
printf(" is open.");
square += increment;
increment += 2;
}
else
} else {
printf(" is closed.");
}
}
return 0;
}
"""
samples['c-sharp'] ="""
samples['c-sharp'] = """
// Creates and initializes a new integer Array
int[] intArray = new int[5] { 1, 2, 3, 4, 5 };
//same as
@ -162,7 +164,7 @@ samples['html'] = """
<html>
<body>
<table border="1">
<table border="1">
<caption>Monthly savings</caption>
<tr>
<th>Month</th>
@ -176,7 +178,7 @@ samples['html'] = """
<td>February</td>
<td>$50</td>
</tr>
</table>
</table>
</body>
</html>
@ -220,7 +222,6 @@ print 'hello world';
samples['python'] = """
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):
@ -229,7 +230,6 @@ samples['python'] = """
if filename:
self.write_scheme(filename, self.entryId.get_text())
self.currentSchemeFile = filename
else:
self.write_scheme(self.currentSchemeFile, self.entryId.get_text())

View File

@ -22,15 +22,17 @@
<object class="GtkListStore" id="styles_list">
<columns>
<!-- column-name Styles -->
<column type="gchar"/>
<column type="gchararray"/>
</columns>
</object>
<object class="GtkBox" id="glade_box">
<property name="width-request">600</property>
<property name="height-request">800</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="menu_box">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkMenuBar">
<property name="visible">True</property>
@ -158,10 +160,23 @@
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-bottom">5</property>
<property name="spacing">12</property>
<child>
<object class="GtkBox">
@ -188,6 +203,11 @@
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="styles_treeview">
<property name="visible">True</property>
@ -208,6 +228,8 @@
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
@ -486,7 +508,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property>
<property name="xalign">0.019999999552965164</property>
<property name="xalign">2.2351741291171123e-10</property>
</object>
<packing>
<property name="expand">False</property>
@ -509,8 +531,9 @@
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">5</property>
<property name="label" translatable="yes">Id</property>
<property name="xalign">0.019999999552965164</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@ -533,8 +556,9 @@
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">5</property>
<property name="label" translatable="yes">Description</property>
<property name="xalign">0.019999999552965164</property>
<property name="xalign">2.2351741291171123e-10</property>
</object>
<packing>
<property name="expand">False</property>
@ -557,8 +581,11 @@
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="label" translatable="yes">Author</property>
<property name="xalign">0.019999999552965164</property>
<property name="xalign">2.2351741291171123e-10</property>
</object>
<packing>
<property name="expand">False</property>
@ -600,8 +627,9 @@
<object class="GtkLabel" id="sample_lbl">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">5</property>
<property name="label" translatable="yes">Sample</property>
<property name="xalign">0.019999999552965164</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 858 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 850 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 702 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 925 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 882 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 707 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 798 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 989 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB