diff --git a/images/pic1.png b/images/pic1.png index 76c62da..355f1f3 100644 Binary files a/images/pic1.png and b/images/pic1.png differ diff --git a/src/utils/languages.py b/src/utils/languages.py index 37fe55d..1e8ea1d 100644 --- a/src/utils/languages.py +++ b/src/utils/languages.py @@ -9,44 +9,46 @@ 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 - if J mod I = 0 then - if The_Doors(J) = Closed then - The_Doors(J) := Open; - else - The_Doors(J) := Closed; - end if; - 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; + + begin + for I in 1..100 loop + for J in The_Doors'range loop + if J mod I = 0 then + if The_Doors(J) = Closed then + The_Doors(J) := Open; + else + The_Doors(J) := Closed; + end if; + 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; """ samples['asp'] = """ -
-Your name: - -
-<% -dim fname -fname=Request.QueryString("fname") -If fname<>"" Then - Response.Write("Hello " & fname & "!
") - Response.Write("How are you today?") -End If -%> +
+ Your name: + +
+ <% + dim fname + fname=Request.QueryString("fname") + If fname<>"" Then + Response.Write("Hello " & fname & "!
") + Response.Write("How are you today?") + End If + %> """ @@ -55,18 +57,19 @@ End If samples['awk'] = """ BEGIN { - for(i=1; i <= 100; i++) { - doors[i] = 0 # close the doors - } - for(i=1; i <= 100; i++) { - if ( int(sqrt(i)) == sqrt(i) ) { - doors[i] = 1 + for(i = 1; i <= 100; i++) { + doors[i] = 0 # close the doors + } + + for(i = 1; i <= 100; i++) { + if ( int(sqrt(i)) == sqrt(i) ) { + doors[i] = 1 + } + } + + for(i = 1; i <= 100; i++) { + print i, doors[i] ? "open" : "close" } - } - for(i=1; i <= 100; i++) - { - print i, doors[i] ? "open" : "close" - } } """ @@ -78,34 +81,33 @@ BEGIN { samples['c'] = """ /* Some comments */ #include - -int main() -{ - int square = 1, increment = 3, door; - for (door = 1; door <= 100; ++door) - { - printf("door #%d", door); - if (door == square) - { - printf(" is open."); - square += increment; - increment += 2; + +int main() { + int square = 1, increment = 3, door; + for (door = 1; door <= 100; ++door) { + printf("door #%d", door); + + if (door == square) { + printf(" is open."); + square += increment; + increment += 2; + } else { + printf(" is closed."); + } } - 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 int[] intArray = new int[]{ 1, 2, 3, 4, 5 }; //same as int[] intArray = { 1, 2, 3, 4, 5 }; - + //Arrays are zero-based string[] stringArr = new string[5]; stringArr[0] = "string"; @@ -162,21 +164,21 @@ samples['html'] = """ - - - - - - - - - - - - - - -
Monthly savings
MonthSavings
January$100
February$50
+ + + + + + + + + + + + + + +
Monthly savings
MonthSavings
January$100
February$50
@@ -218,22 +220,20 @@ print 'hello world'; # samples['proto'] = """ 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): - 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 + 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'] = """ diff --git a/user_config/usr/share/gtkcodethemer/Main_Window.glade b/user_config/usr/share/gtkcodethemer/Main_Window.glade index d43fcb4..41d4579 100644 --- a/user_config/usr/share/gtkcodethemer/Main_Window.glade +++ b/user_config/usr/share/gtkcodethemer/Main_Window.glade @@ -22,134 +22,146 @@ - + - 600 - 800 True False vertical - + True False - + True False - _File - True - - + + True False - - - gtk-open + _File + True + + True False - True - True - - - - - - gtk-save - True - False - True - True - - - - - - gtk-save-as - True - False - True - True - - - - - - True - False - Debug - True - - + + + gtk-open True False - - - Interactive Debug + True + True + + + + + + gtk-save + True + False + True + True + + + + + + gtk-save-as + True + False + True + True + + + + + + True + False + Debug + True + + True False - image1 - False - - - - - - Transparancy Controls - True - False - image2 - False + + + Interactive Debug + True + False + image1 + False + + + + + + Transparancy Controls + True + False + image2 + False + + - - - - - True - False - - - - - gtk-quit - True - False - True - True - + + + True + False + + + + + gtk-quit + True + False + True + True + + + - - - - - True - False - _Help - True - - + + True False - - - gtk-about + _Help + True + + True False - True - True + + + gtk-about + True + False + True + True + + + + False + True + 0 + + + + @@ -162,6 +174,9 @@ True False + 5 + 5 + 5 12 @@ -189,21 +204,28 @@ - + True True - styles_list - - - + in - - Styles + + True + True + styles_list + + + - - - 0 - + + Styles + + + + 0 + + + @@ -486,7 +508,7 @@ True False Name - 0.019999999552965164 + 2.2351741291171123e-10 False @@ -509,8 +531,9 @@ True False + 5 Id - 0.019999999552965164 + 0 False @@ -533,8 +556,9 @@ True False + 5 Description - 0.019999999552965164 + 2.2351741291171123e-10 False @@ -557,8 +581,11 @@ True False + 5 + 0 + 0 Author - 0.019999999552965164 + 2.2351741291171123e-10 False @@ -600,8 +627,9 @@ True False + 5 Sample - 0.019999999552965164 + 0 False diff --git a/user_config/usr/share/gtkcodethemer/icons/app_name-64x64.png b/user_config/usr/share/gtkcodethemer/icons/app_name-64x64.png deleted file mode 100644 index 6105709..0000000 Binary files a/user_config/usr/share/gtkcodethemer/icons/app_name-64x64.png and /dev/null differ diff --git a/user_config/usr/share/gtkcodethemer/icons/app_name.png b/user_config/usr/share/gtkcodethemer/icons/app_name.png deleted file mode 100644 index c40fb0f..0000000 Binary files a/user_config/usr/share/gtkcodethemer/icons/app_name.png and /dev/null differ diff --git a/user_config/usr/share/gtkcodethemer/icons/archive.png b/user_config/usr/share/gtkcodethemer/icons/archive.png deleted file mode 100644 index 7943e4e..0000000 Binary files a/user_config/usr/share/gtkcodethemer/icons/archive.png and /dev/null differ diff --git a/user_config/usr/share/gtkcodethemer/icons/audio.png b/user_config/usr/share/gtkcodethemer/icons/audio.png deleted file mode 100644 index c010134..0000000 Binary files a/user_config/usr/share/gtkcodethemer/icons/audio.png and /dev/null differ diff --git a/user_config/usr/share/gtkcodethemer/icons/bin.png b/user_config/usr/share/gtkcodethemer/icons/bin.png deleted file mode 100644 index d6954e3..0000000 Binary files a/user_config/usr/share/gtkcodethemer/icons/bin.png and /dev/null differ diff --git a/user_config/usr/share/gtkcodethemer/icons/dir.png b/user_config/usr/share/gtkcodethemer/icons/dir.png deleted file mode 100644 index a9b5e9f..0000000 Binary files a/user_config/usr/share/gtkcodethemer/icons/dir.png and /dev/null differ diff --git a/user_config/usr/share/gtkcodethemer/icons/doc.png b/user_config/usr/share/gtkcodethemer/icons/doc.png deleted file mode 100644 index f838826..0000000 Binary files a/user_config/usr/share/gtkcodethemer/icons/doc.png and /dev/null differ diff --git a/user_config/usr/share/gtkcodethemer/icons/gtkcodethemer-64x64.png b/user_config/usr/share/gtkcodethemer/icons/gtkcodethemer-64x64.png new file mode 100644 index 0000000..0e1c0ea Binary files /dev/null and b/user_config/usr/share/gtkcodethemer/icons/gtkcodethemer-64x64.png differ diff --git a/user_config/usr/share/gtkcodethemer/icons/gtkcodethemer.png b/user_config/usr/share/gtkcodethemer/icons/gtkcodethemer.png new file mode 100644 index 0000000..ae31bd5 Binary files /dev/null and b/user_config/usr/share/gtkcodethemer/icons/gtkcodethemer.png differ diff --git a/user_config/usr/share/gtkcodethemer/icons/gtkcodethemer_template.png b/user_config/usr/share/gtkcodethemer/icons/gtkcodethemer_template.png new file mode 100644 index 0000000..2e78d05 Binary files /dev/null and b/user_config/usr/share/gtkcodethemer/icons/gtkcodethemer_template.png differ diff --git a/user_config/usr/share/gtkcodethemer/icons/image.png b/user_config/usr/share/gtkcodethemer/icons/image.png deleted file mode 100644 index 46f1ae6..0000000 Binary files a/user_config/usr/share/gtkcodethemer/icons/image.png and /dev/null differ diff --git a/user_config/usr/share/gtkcodethemer/icons/pdf.png b/user_config/usr/share/gtkcodethemer/icons/pdf.png deleted file mode 100644 index 9f40122..0000000 Binary files a/user_config/usr/share/gtkcodethemer/icons/pdf.png and /dev/null differ diff --git a/user_config/usr/share/gtkcodethemer/icons/presentation.png b/user_config/usr/share/gtkcodethemer/icons/presentation.png deleted file mode 100644 index 3a339af..0000000 Binary files a/user_config/usr/share/gtkcodethemer/icons/presentation.png and /dev/null differ diff --git a/user_config/usr/share/gtkcodethemer/icons/spreadsheet.png b/user_config/usr/share/gtkcodethemer/icons/spreadsheet.png deleted file mode 100644 index 710efa6..0000000 Binary files a/user_config/usr/share/gtkcodethemer/icons/spreadsheet.png and /dev/null differ diff --git a/user_config/usr/share/gtkcodethemer/icons/text.png b/user_config/usr/share/gtkcodethemer/icons/text.png deleted file mode 100644 index 2546fcd..0000000 Binary files a/user_config/usr/share/gtkcodethemer/icons/text.png and /dev/null differ diff --git a/user_config/usr/share/gtkcodethemer/icons/trash.png b/user_config/usr/share/gtkcodethemer/icons/trash.png deleted file mode 100644 index c6514b9..0000000 Binary files a/user_config/usr/share/gtkcodethemer/icons/trash.png and /dev/null differ diff --git a/user_config/usr/share/gtkcodethemer/icons/video.png b/user_config/usr/share/gtkcodethemer/icons/video.png deleted file mode 100644 index 55afa98..0000000 Binary files a/user_config/usr/share/gtkcodethemer/icons/video.png and /dev/null differ diff --git a/user_config/usr/share/gtkcodethemer/icons/web.png b/user_config/usr/share/gtkcodethemer/icons/web.png deleted file mode 100644 index 17017ce..0000000 Binary files a/user_config/usr/share/gtkcodethemer/icons/web.png and /dev/null differ