Revision: 1123 http://svn.sourceforge.net/geany/?rev=1123&view=rev Author: eht16 Date: 2006-12-18 14:55:27 -0800 (Mon, 18 Dec 2006)
Log Message: ----------- Completed list of special characters, implemented expanding and collapsing of categories at double click.
Modified Paths: -------------- trunk/ChangeLog trunk/src/tools.c
Property Changed: ---------------- trunk/src/tools.c trunk/src/tools.h
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-12-18 21:36:09 UTC (rev 1122) +++ trunk/ChangeLog 2006-12-18 22:55:27 UTC (rev 1123) @@ -1,3 +1,9 @@ +2006-12-18 Enrico Tröger enrico.troeger@uvena.de + + * src/tools.c: Completed list of special characters, implemented + expanding and collapsing of categories at double click. + + 2006-12-18 Nick Treleaven nick.treleaven@btinternet.com
* src/callbacks.c, src/search.c, src/document.c:
Modified: trunk/src/tools.c =================================================================== --- trunk/src/tools.c 2006-12-18 21:36:09 UTC (rev 1122) +++ trunk/src/tools.c 2006-12-18 22:55:27 UTC (rev 1123) @@ -28,6 +28,7 @@ #include "sciwrappers.h" #include "ui_utils.h"
+ enum { COLUMN_CHARACTER, @@ -74,7 +75,6 @@ gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
special_characters_tree = GTK_TREE_VIEW(gtk_tree_view_new()); - //g_object_set(tree, "vertical-separator", 6, NULL);
special_characters_store = gtk_tree_store_new(N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING); gtk_tree_view_set_model(GTK_TREE_VIEW(special_characters_tree), @@ -108,13 +108,15 @@
special_characters_fill_store(special_characters_store);
- gtk_tree_view_expand_all(special_characters_tree); + //gtk_tree_view_expand_all(special_characters_tree); + gtk_tree_view_set_search_column(special_characters_tree, COLUMN_HTML_NAME); } gtk_widget_show_all(special_characters_dialog); }
// fill the tree model with data +/// TODO move this in a file and make it extendable for more data types static void special_characters_fill_store(GtkTreeStore *store) { GtkTreeIter iter; @@ -123,13 +125,13 @@
gchar *chars[][2] = { - { N_("HTML characters"), NULL }, + { _("HTML characters"), NULL }, { """, """ }, { "&", "&" }, { "<", "<" }, { ">", ">" },
- { N_("ISO 8859-1 characters"), NULL }, + { _("ISO 8859-1 characters"), NULL }, { " ", " " }, { "¡", "¡" }, { "¢", "¢" }, @@ -226,13 +228,162 @@ { "ý", "ý" }, { "þ", "þ" }, { "ÿ", "ÿ" }, - /// TODO add the symbols from http://de.selfhtml.org/html/referenz/zeichen.htm - { N_("Greek characters"), NULL }, - { N_("Mathematical characters"), NULL }, - { N_("Technical characters"), NULL }, - { N_("Arrow characters"), NULL }, - { N_("Punctuation characters"), NULL }, - { N_("Miscellaneous characters"), NULL } + + { _("Greek characters"), NULL }, + { "Α", "Α" }, + { "α", "α" }, + { "Β", "Β" }, + { "β", "β" }, + { "Γ", "Γ" }, + { "γ", "γ" }, + { "Δ", "Δ" }, + { "δ", "Δ" }, + { "δ", "δ" }, + { "Ε", "Ε" }, + { "ε", "ε" }, + { "Ζ", "Ζ" }, + { "ζ", "ζ" }, + { "Η", "Η" }, + { "η", "η" }, + { "Θ", "Θ" }, + { "θ", "θ" }, + { "Ι", "Ι" }, + { "ι", "ι" }, + { "Κ", "Κ" }, + { "κ", "κ" }, + { "Λ", "Λ" }, + { "λ", "λ" }, + { "Μ", "Μ" }, + { "μ", "μ" }, + { "Ν", "Ν" }, + { "ν", "ν" }, + { "Ξ", "Ξ" }, + { "ξ", "ξ" }, + { "Ο", "Ο" }, + { "ο", "ο" }, + { "Π", "Π" }, + { "π", "π" }, + { "Ρ", "Ρ" }, + { "ρ", "ρ" }, + { "Σ", "Σ" }, + { "ς", "ς" }, + { "σ", "σ" }, + { "Τ", "Τ" }, + { "τ", "τ" }, + { "Υ", "Υ" }, + { "υ", "υ" }, + { "Φ", "Φ" }, + { "φ", "φ" }, + { "Χ", "Χ" }, + { "χ", "χ" }, + { "Ψ", "Ψ" }, + { "ψ", "ψ" }, + { "Ω", "Ω" }, + { "ω", "ω" }, + { "ϑ", "ϑ" }, + { "ϒ", "ϒ" }, + { "ϖ", "ϖ" }, + + { _("Mathematical characters"), NULL }, + { "∀", "∀" }, + { "∂", "∂" }, + { "∃", "∃" }, + { "∅", "∅" }, + { "∇", "∇" }, + { "∈", "∈" }, + { "∉", "∉" }, + { "∋", "∋" }, + { "∏", "∏" }, + { "∑", "∑" }, + { "−", "−" }, + { "∗", "∗" }, + { "√", "√" }, + { "∝", "∝" }, + { "∞", "∞" }, + { "∠", "∠" }, + { "∧", "∧" }, + { "∨", "∨" }, + { "∩", "∩" }, + { "∪", "∪" }, + { "∫", "∫" }, + { "∴", "∴" }, + { "∼", "∼" }, + { "≅", "≅" }, + { "≈", "≈" }, + { "≠", "≠" }, + { "≡", "≡" }, + { "≤", "≤" }, + { "≥", "≥" }, + { "⊂", "⊂" }, + { "⊃", "⊃" }, + { "⊄", "⊄" }, + { "⊆", "⊆" }, + { "⊇", "⊇" }, + { "⊕", "⊕" }, + { "⊗", "⊗" }, + { "⊥", "⊥" }, + { "⋅", "⋅" }, + { "◊", "◊" }, + + { _("Technical characters"), NULL }, + { "⌈", "⌈" }, + { "⌉", "⌉" }, + { "⌊", "⌊" }, + { "⌋", "⌋" }, + { "〈", "⟨" }, + { "〉", "⟩" }, + + { _("Arrow characters"), NULL }, + { "←", "←" }, + { "↑", "↑" }, + { "→", "→" }, + { "↓", "↓" }, + { "↔", "↔" }, + { "↵", "↵" }, + { "⇐", "⇐" }, + { "⇑", "⇑" }, + { "⇒", "⇒" }, + { "⇓", "⇓" }, + { "⇔", "⇔" }, + + { _("Punctuation characters"), NULL }, + { "–", "–" }, + { "—", "—" }, + { "‘", "‘" }, + { "’", "’" }, + { "‚", "‚" }, + { "“", "“" }, + { "”", "”" }, + { "„", "„" }, + { "†", "†" }, + { "‡", "‡" }, + { "…", "…" }, + { "‰", "‰" }, + { "‹", "‹" }, + { "›", "›" }, + + { _("Miscellaneous characters"), NULL }, + { "•", "•" }, + { "′", "′" }, + { "″", "″" }, + { "‾", "‾" }, + { "⁄", "⁄" }, + { "℘", "℘" }, + { "ℑ", "ℑ" }, + { "ℜ", "ℜ" }, + { "™", "™" }, + { "€", "€" }, + { "ℵ", "ℵ" }, + { "♠", "♠" }, + { "♣", "♣" }, + { "♥", "♥" }, + { "♦", "♦" }, + { "Œ", "Œ" }, + { "œ", "œ" }, + { "Š", "Š" }, + { "š", "š" }, + { "Ÿ", "Ÿ" }, + { "ƒ", "ƒ" }, };
for (i = 0; i < G_N_ELEMENTS(chars); i++) @@ -313,9 +464,11 @@ if (special_characters_insert(model, &iter)) gtk_widget_hide(special_characters_dialog); else - { // double click on a category to toggle the expand or collapse it - /// TODO + { // double click on a category to toggle the expand or collapse it + if (gtk_tree_view_row_expanded(special_characters_tree, path)) + gtk_tree_view_collapse_row(special_characters_tree, path); + else + gtk_tree_view_expand_row(special_characters_tree, path, FALSE); } - } }
Property changes on: trunk/src/tools.c ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision
Property changes on: trunk/src/tools.h ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.