SF.net SVN: geany-plugins:[408] trunk/geanylatex
frlan at users.sourceforge.net
frlan at xxxxx
Wed Jan 28 21:58:42 UTC 2009
Revision: 408
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=408&view=rev
Author: frlan
Date: 2009-01-28 21:58:42 +0000 (Wed, 28 Jan 2009)
Log Message:
-----------
GeanyLaTeX: Little reformating of code
Modified Paths:
--------------
trunk/geanylatex/po/de.po
trunk/geanylatex/po/geanylatex.pot
trunk/geanylatex/src/bibtex.c
trunk/geanylatex/src/geanylatex.c
trunk/geanylatex/src/geanylatex.h
trunk/geanylatex/src/latexencodings.c
Modified: trunk/geanylatex/po/de.po
===================================================================
--- trunk/geanylatex/po/de.po 2009-01-27 22:38:33 UTC (rev 407)
+++ trunk/geanylatex/po/de.po 2009-01-28 21:58:42 UTC (rev 408)
@@ -2,7 +2,7 @@
msgstr ""
"Project-Id-Version: GeanyLaTeX\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-01-19 22:05+0100\n"
+"POT-Creation-Date: 2009-01-28 22:23+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: Frank Lanitz <frank at frank.uvena.de>\n"
"Language-Team: geany-118n <geany-118n at uvena.de>\n"
@@ -21,87 +21,87 @@
msgid "Plugin to provide better LaTeX support"
msgstr "Plugin zum Verbessern des LaTeX-Support für Geany"
-#: src/geanylatex.c:97
+#: src/geanylatex.c:101
msgid "Insert label"
msgstr "Lesezeichen einfügen"
-#: src/geanylatex.c:110
+#: src/geanylatex.c:114
msgid "Label name:"
msgstr "Lesezeichenname:"
-#: src/geanylatex.c:142
+#: src/geanylatex.c:149
msgid "Insert reference"
msgstr "Verweis einfügen"
-#: src/geanylatex.c:155
+#: src/geanylatex.c:162
msgid "Ref name:"
msgstr "Lesezeichenname:"
-#: src/geanylatex.c:166
+#: src/geanylatex.c:173
msgid "Standard Reference"
msgstr "Normaler Verweis"
-#: src/geanylatex.c:171
+#: src/geanylatex.c:178
msgid "Page Reference"
msgstr "Verweis auf Seite"
-#: src/geanylatex.c:336
+#: src/geanylatex.c:351
msgid "More"
msgstr "Weitere"
#. Documentclass
-#: src/geanylatex.c:427
+#: src/geanylatex.c:446
msgid "Documentclass:"
msgstr "Dokumentenklasse:"
-#: src/geanylatex.c:430
+#: src/geanylatex.c:449
msgid "Choose the kind of document you want to write"
msgstr "Art des Dokumentes"
-#: src/geanylatex.c:431 src/bibtexlabels.c:27
+#: src/geanylatex.c:451 src/bibtexlabels.c:27
msgid "Book"
msgstr "Buch"
-#: src/geanylatex.c:432 src/bibtexlabels.c:26
+#: src/geanylatex.c:453 src/bibtexlabels.c:26
msgid "Article"
msgstr "Artikel"
-#: src/geanylatex.c:433
+#: src/geanylatex.c:455
msgid "Report"
msgstr "Bericht"
-#: src/geanylatex.c:434
+#: src/geanylatex.c:457
msgid "Letter"
msgstr "Brief"
-#: src/geanylatex.c:435
+#: src/geanylatex.c:459
msgid "Presentation"
msgstr "Präsentation"
#. Encoding
-#: src/geanylatex.c:445
+#: src/geanylatex.c:469
msgid "Encoding:"
msgstr "Zeichensatz:"
-#: src/geanylatex.c:449
+#: src/geanylatex.c:473
msgid "Set the encoding for your new document"
msgstr "Zeichensatz für das neue Dokument"
#. fontsize
-#: src/geanylatex.c:464
+#: src/geanylatex.c:488
msgid "Fontsize:"
msgstr "Schriftgröße:"
-#: src/geanylatex.c:467
+#: src/geanylatex.c:491
msgid "Set the default fontsize of your new document"
msgstr "Setzt die Standardschriftgröße für das neue Dokument"
#. Author
-#: src/geanylatex.c:480
+#: src/geanylatex.c:504
msgid "Author:"
msgstr "Autor:"
-#: src/geanylatex.c:483
+#: src/geanylatex.c:507
msgid ""
"Sets the value of the \\author command. In most cases this should be your "
"name"
@@ -109,62 +109,62 @@
"Setzt den Eintrag für den \\author Befehl. Meist sollte hier Ihr Name stehen."
#. Date
-#: src/geanylatex.c:494
+#: src/geanylatex.c:518
msgid "Date:"
msgstr "Datum:"
-#: src/geanylatex.c:497
+#: src/geanylatex.c:521
msgid ""
-"Sets the value of the \\date command inside header of your newly created "
-"LaTeX-document. Keeping it at \\today is a good decision if you don't need "
-"any fixed date."
+"Sets the value of the \\date command inside header of your\t\t newly created "
+"LaTeX-document. Keeping it at \\today is a good \t\t decision if you don't "
+"need any fixed date."
msgstr ""
"Setzt den Eintrag für den \\date Befehl im Kopf des neuen Dokumentes. In den "
"meisten Fällen sollte \\today eine gute Wahl sein."
#. Title of the new document
-#: src/geanylatex.c:504
+#: src/geanylatex.c:530
msgid "Title:"
msgstr "Titel:"
-#: src/geanylatex.c:506
+#: src/geanylatex.c:533
msgid "Sets the title of your new document."
msgstr "Setzt den Titel für das neue Dokument."
#. Papersize
-#: src/geanylatex.c:513
+#: src/geanylatex.c:539
msgid "Paper size:"
msgstr "Papiergröße:"
-#: src/geanylatex.c:516
+#: src/geanylatex.c:542
msgid "Choose the paper format for the newly created document"
msgstr ""
"Setzt das Papierformat als Argument der Dokumentenklasse für das neue "
"Dokument"
#. Building the wizard-dialog and showing it
-#: src/geanylatex.c:531
+#: src/geanylatex.c:557
msgid "LaTeX-Wizard"
msgstr "LaTeX-Assistent"
-#: src/geanylatex.c:541
+#: src/geanylatex.c:568
msgid "Use KOMA-script classes if possible"
msgstr "Benutze KOMA-Skript wenn möglich"
-#: src/geanylatex.c:544
+#: src/geanylatex.c:570
msgid ""
"Uses the KOMA-script classes by Markus Kohm.\n"
-"Keep in mind: To compile your document these classes have to be installed "
+"Keep in mind: To compile your document these classeshave to be installed "
"before."
msgstr ""
"Wenn diese Option aktiviert ist, werden die KOMA-Skript-Klassen von Markus "
"Kohm genutzt. Sie müssen natürlich dafür installiert sein."
-#: src/geanylatex.c:550
+#: src/geanylatex.c:577
msgid "Use draft mode"
msgstr "Entwurfsmodus benutzen"
-#: src/geanylatex.c:552
+#: src/geanylatex.c:579
msgid ""
"Set the draft flag inside new created documents to get documents with a "
"number of debugging helpers"
@@ -172,63 +172,63 @@
"Setzt die Option draft für die Dokumentenklasse um das neue Dokument mit "
"einer Nummer von kleinen Korrekturhinweisen zu versehen."
-#: src/geanylatex.c:772
+#: src/geanylatex.c:807
msgid "Dear Sir or Madame"
msgstr "Sehr geehrte Damen und Herren"
-#: src/geanylatex.c:773
+#: src/geanylatex.c:808
msgid "With kind regards"
msgstr "Mit freundlichen Grüßen"
-#: src/geanylatex.c:815
+#: src/geanylatex.c:850
msgid "_LaTeX"
msgstr "_LaTeX"
-#: src/geanylatex.c:822
+#: src/geanylatex.c:857
msgid "LaTeX-_Wizard"
msgstr "LaTeX-_Assistent"
-#: src/geanylatex.c:825
+#: src/geanylatex.c:860
msgid "Starts a Wizard to easily create LaTeX-documents"
msgstr "Öffnet einen Assistenten, um einfache LaTeX-Dokumente zu erstellen."
-#: src/geanylatex.c:830
+#: src/geanylatex.c:865
msgid "Insert _Special Character"
msgstr "_Sonderzeichen einfügen"
-#: src/geanylatex.c:832
+#: src/geanylatex.c:867
msgid "Helps to use some not very common letters and signs"
msgstr "Unterstützt bei der Verwendung von seltenen Sonderzeichen"
-#: src/geanylatex.c:839
+#: src/geanylatex.c:877
msgid "Insert _Reference"
msgstr "_Verweis einfügen"
-#: src/geanylatex.c:841
+#: src/geanylatex.c:879
msgid "Inserting references to the document"
msgstr "Eine Referenz in das Dokument einfügen"
-#: src/geanylatex.c:845
+#: src/geanylatex.c:884
msgid "Insert _Label"
msgstr "_Lesezeichen einfügen"
-#: src/geanylatex.c:847
+#: src/geanylatex.c:886
msgid "Helps at inserting labels to a document"
msgstr "Untersützt bei dem Einfügen von Lesezeichen in ein Dokument"
-#: src/geanylatex.c:851
+#: src/geanylatex.c:891
msgid "BibTeX"
msgstr "BibTeX"
-#: src/geanylatex.c:868
+#: src/geanylatex.c:910
msgid "Run LaTeX-Wizard"
msgstr "LaTeX-Assistent starten"
-#: src/geanylatex.c:870
+#: src/geanylatex.c:912
msgid "Insert \\label"
msgstr "\\label einfügen"
-#: src/geanylatex.c:872
+#: src/geanylatex.c:914
msgid "Insert \\ref"
msgstr "\\ref einfügen"
@@ -268,15 +268,15 @@
msgid "ISO-8859-10 (Latin-10)"
msgstr "ISO-8859-10 (Latin-10)"
-#: src/latexencodings.c:52
+#: src/latexencodings.c:53
msgid "IBM 850 code page"
msgstr "IBM 850 code page"
-#: src/latexencodings.c:53
+#: src/latexencodings.c:55
msgid "IBM 852 code page"
msgstr "IBM 852 code page"
-#: src/latexencodings.c:54 src/letters.c:41 src/bibtexlabels.c:35
+#: src/latexencodings.c:57 src/letters.c:41 src/bibtexlabels.c:35
msgid "Misc"
msgstr "Sonstiges"
Modified: trunk/geanylatex/po/geanylatex.pot
===================================================================
--- trunk/geanylatex/po/geanylatex.pot 2009-01-27 22:38:33 UTC (rev 407)
+++ trunk/geanylatex/po/geanylatex.pot 2009-01-28 21:58:42 UTC (rev 408)
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-01-19 22:05+0100\n"
+"POT-Creation-Date: 2009-01-28 22:23+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
@@ -24,205 +24,205 @@
msgid "Plugin to provide better LaTeX support"
msgstr ""
-#: src/geanylatex.c:97
+#: src/geanylatex.c:101
msgid "Insert label"
msgstr ""
-#: src/geanylatex.c:110
+#: src/geanylatex.c:114
msgid "Label name:"
msgstr ""
-#: src/geanylatex.c:142
+#: src/geanylatex.c:149
msgid "Insert reference"
msgstr ""
-#: src/geanylatex.c:155
+#: src/geanylatex.c:162
msgid "Ref name:"
msgstr ""
-#: src/geanylatex.c:166
+#: src/geanylatex.c:173
msgid "Standard Reference"
msgstr ""
-#: src/geanylatex.c:171
+#: src/geanylatex.c:178
msgid "Page Reference"
msgstr ""
-#: src/geanylatex.c:336
+#: src/geanylatex.c:351
msgid "More"
msgstr ""
#. Documentclass
-#: src/geanylatex.c:427
+#: src/geanylatex.c:446
msgid "Documentclass:"
msgstr ""
-#: src/geanylatex.c:430
+#: src/geanylatex.c:449
msgid "Choose the kind of document you want to write"
msgstr ""
-#: src/geanylatex.c:431 src/bibtexlabels.c:27
+#: src/geanylatex.c:451 src/bibtexlabels.c:27
msgid "Book"
msgstr ""
-#: src/geanylatex.c:432 src/bibtexlabels.c:26
+#: src/geanylatex.c:453 src/bibtexlabels.c:26
msgid "Article"
msgstr ""
-#: src/geanylatex.c:433
+#: src/geanylatex.c:455
msgid "Report"
msgstr ""
-#: src/geanylatex.c:434
+#: src/geanylatex.c:457
msgid "Letter"
msgstr ""
-#: src/geanylatex.c:435
+#: src/geanylatex.c:459
msgid "Presentation"
msgstr ""
#. Encoding
-#: src/geanylatex.c:445
+#: src/geanylatex.c:469
msgid "Encoding:"
msgstr ""
-#: src/geanylatex.c:449
+#: src/geanylatex.c:473
msgid "Set the encoding for your new document"
msgstr ""
#. fontsize
-#: src/geanylatex.c:464
+#: src/geanylatex.c:488
msgid "Fontsize:"
msgstr ""
-#: src/geanylatex.c:467
+#: src/geanylatex.c:491
msgid "Set the default fontsize of your new document"
msgstr ""
#. Author
-#: src/geanylatex.c:480
+#: src/geanylatex.c:504
msgid "Author:"
msgstr ""
-#: src/geanylatex.c:483
+#: src/geanylatex.c:507
msgid ""
"Sets the value of the \\author command. In most cases this should be your "
"name"
msgstr ""
#. Date
-#: src/geanylatex.c:494
+#: src/geanylatex.c:518
msgid "Date:"
msgstr ""
-#: src/geanylatex.c:497
+#: src/geanylatex.c:521
msgid ""
-"Sets the value of the \\date command inside header of your newly created "
-"LaTeX-document. Keeping it at \\today is a good decision if you don't need "
-"any fixed date."
+"Sets the value of the \\date command inside header of your\t\t newly created "
+"LaTeX-document. Keeping it at \\today is a good \t\t decision if you don't "
+"need any fixed date."
msgstr ""
#. Title of the new document
-#: src/geanylatex.c:504
+#: src/geanylatex.c:530
msgid "Title:"
msgstr ""
-#: src/geanylatex.c:506
+#: src/geanylatex.c:533
msgid "Sets the title of your new document."
msgstr ""
#. Papersize
-#: src/geanylatex.c:513
+#: src/geanylatex.c:539
msgid "Paper size:"
msgstr ""
-#: src/geanylatex.c:516
+#: src/geanylatex.c:542
msgid "Choose the paper format for the newly created document"
msgstr ""
#. Building the wizard-dialog and showing it
-#: src/geanylatex.c:531
+#: src/geanylatex.c:557
msgid "LaTeX-Wizard"
msgstr ""
-#: src/geanylatex.c:541
+#: src/geanylatex.c:568
msgid "Use KOMA-script classes if possible"
msgstr ""
-#: src/geanylatex.c:544
+#: src/geanylatex.c:570
msgid ""
"Uses the KOMA-script classes by Markus Kohm.\n"
-"Keep in mind: To compile your document these classes have to be installed "
+"Keep in mind: To compile your document these classeshave to be installed "
"before."
msgstr ""
-#: src/geanylatex.c:550
+#: src/geanylatex.c:577
msgid "Use draft mode"
msgstr ""
-#: src/geanylatex.c:552
+#: src/geanylatex.c:579
msgid ""
"Set the draft flag inside new created documents to get documents with a "
"number of debugging helpers"
msgstr ""
-#: src/geanylatex.c:772
+#: src/geanylatex.c:807
msgid "Dear Sir or Madame"
msgstr ""
-#: src/geanylatex.c:773
+#: src/geanylatex.c:808
msgid "With kind regards"
msgstr ""
-#: src/geanylatex.c:815
+#: src/geanylatex.c:850
msgid "_LaTeX"
msgstr ""
-#: src/geanylatex.c:822
+#: src/geanylatex.c:857
msgid "LaTeX-_Wizard"
msgstr ""
-#: src/geanylatex.c:825
+#: src/geanylatex.c:860
msgid "Starts a Wizard to easily create LaTeX-documents"
msgstr ""
-#: src/geanylatex.c:830
+#: src/geanylatex.c:865
msgid "Insert _Special Character"
msgstr ""
-#: src/geanylatex.c:832
+#: src/geanylatex.c:867
msgid "Helps to use some not very common letters and signs"
msgstr ""
-#: src/geanylatex.c:839
+#: src/geanylatex.c:877
msgid "Insert _Reference"
msgstr ""
-#: src/geanylatex.c:841
+#: src/geanylatex.c:879
msgid "Inserting references to the document"
msgstr ""
-#: src/geanylatex.c:845
+#: src/geanylatex.c:884
msgid "Insert _Label"
msgstr ""
-#: src/geanylatex.c:847
+#: src/geanylatex.c:886
msgid "Helps at inserting labels to a document"
msgstr ""
-#: src/geanylatex.c:851
+#: src/geanylatex.c:891
msgid "BibTeX"
msgstr ""
-#: src/geanylatex.c:868
+#: src/geanylatex.c:910
msgid "Run LaTeX-Wizard"
msgstr ""
-#: src/geanylatex.c:870
+#: src/geanylatex.c:912
msgid "Insert \\label"
msgstr ""
-#: src/geanylatex.c:872
+#: src/geanylatex.c:914
msgid "Insert \\ref"
msgstr ""
@@ -262,15 +262,15 @@
msgid "ISO-8859-10 (Latin-10)"
msgstr ""
-#: src/latexencodings.c:52
+#: src/latexencodings.c:53
msgid "IBM 850 code page"
msgstr ""
-#: src/latexencodings.c:53
+#: src/latexencodings.c:55
msgid "IBM 852 code page"
msgstr ""
-#: src/latexencodings.c:54 src/letters.c:41 src/bibtexlabels.c:35
+#: src/latexencodings.c:57 src/letters.c:41 src/bibtexlabels.c:35
msgid "Misc"
msgstr ""
Modified: trunk/geanylatex/src/bibtex.c
===================================================================
--- trunk/geanylatex/src/bibtex.c 2009-01-27 22:38:33 UTC (rev 407)
+++ trunk/geanylatex/src/bibtex.c 2009-01-28 21:58:42 UTC (rev 408)
@@ -40,7 +40,8 @@
}
#endif
-void insert_bibtex_entry(G_GNUC_UNUSED GtkMenuItem * menuitem, G_GNUC_UNUSED gpointer gdata)
+void insert_bibtex_entry(G_GNUC_UNUSED GtkMenuItem * menuitem,
+ G_GNUC_UNUSED gpointer gdata)
{
int doctype = GPOINTER_TO_INT(gdata);
gboolean fields[N_ENTRIES];
Modified: trunk/geanylatex/src/geanylatex.c
===================================================================
--- trunk/geanylatex/src/geanylatex.c 2009-01-27 22:38:33 UTC (rev 407)
+++ trunk/geanylatex/src/geanylatex.c 2009-01-28 21:58:42 UTC (rev 408)
@@ -26,11 +26,11 @@
PLUGIN_VERSION_CHECK(115)
-PLUGIN_SET_INFO(_("LaTeX"), _("Plugin to provide better LaTeX support"), "0.3dev",
- "Frank Lanitz <frank at frank.uvena.de>")
+PLUGIN_SET_INFO(_("LaTeX"), _("Plugin to provide better LaTeX support"),
+ "0.3dev","Frank Lanitz <frank at frank.uvena.de>")
-GeanyPlugin *geany_plugin;
-GeanyData *geany_data;
+GeanyPlugin *geany_plugin;
+GeanyData *geany_data;
GeanyFunctions *geany_functions;
@@ -79,14 +79,18 @@
return char_array[tab_index].latex;
}
+
static void
-char_insert_activated(G_GNUC_UNUSED GtkMenuItem * menuitem, G_GNUC_UNUSED gpointer gdata)
+char_insert_activated(G_GNUC_UNUSED GtkMenuItem * menuitem,
+ G_GNUC_UNUSED gpointer gdata)
{
insert_string(get_latex_command(GPOINTER_TO_INT(gdata)));
}
+
static void
-insert_label_activated(G_GNUC_UNUSED GtkMenuItem * menuitem, G_GNUC_UNUSED gpointer gdata)
+insert_label_activated(G_GNUC_UNUSED GtkMenuItem * menuitem,
+ G_GNUC_UNUSED gpointer gdata)
{
GtkWidget *dialog = NULL;
GtkWidget *vbox = NULL;
@@ -121,14 +125,17 @@
if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT)
{
gchar *label_str = NULL;
- label_str = g_strconcat("\\label{", g_strdup(gtk_entry_get_text(GTK_ENTRY(textbox_label))), "}", NULL);
+ label_str = g_strconcat("\\label{",g_strdup(gtk_entry_get_text(
+ GTK_ENTRY(textbox_label))), "}", NULL);
insert_string(label_str);
}
gtk_widget_destroy(dialog);
}
+
static void
-insert_ref_activated(G_GNUC_UNUSED GtkMenuItem * menuitem, G_GNUC_UNUSED gpointer gdata)
+insert_ref_activated(G_GNUC_UNUSED GtkMenuItem * menuitem,
+ G_GNUC_UNUSED gpointer gdata)
{
GtkWidget *dialog;
GtkWidget *vbox = NULL;
@@ -180,7 +187,8 @@
{
gchar *ref_string = NULL;
- ref_string = g_strdup(gtk_combo_box_get_active_text(GTK_COMBO_BOX(textbox_ref)));
+ ref_string = g_strdup(gtk_combo_box_get_active_text(
+ GTK_COMBO_BOX(textbox_ref)));
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(radio2)) == FALSE)
{
@@ -201,14 +209,17 @@
gtk_widget_destroy(dialog);
}
-static void character_create_menu_item(GtkWidget *menu, const gchar *label, gint letter, SubMenuCallback callback)
+
+static void character_create_menu_item(GtkWidget *menu, const gchar *label,
+ gint letter, SubMenuCallback callback)
{
GtkWidget *tmp;
tmp = gtk_menu_item_new_with_label(label);
gtk_widget_show(tmp);
gtk_container_add(GTK_CONTAINER(menu), tmp);
- g_signal_connect((gpointer) tmp, "activate", G_CALLBACK(callback), GINT_TO_POINTER(letter));
+ g_signal_connect((gpointer) tmp, "activate",
+ G_CALLBACK(callback), GINT_TO_POINTER(letter));
}
/* returns -1, if there are more than gint can work with or any other error
@@ -255,7 +266,9 @@
return i;
}
-void sub_menu_init(GtkWidget *base_menu, SubMenuTemplate *menu_template, CategoryName *category_name, SubMenuCallback callback_function)
+void sub_menu_init(GtkWidget *base_menu, SubMenuTemplate *menu_template,
+ CategoryName *category_name,
+ SubMenuCallback callback_function)
{
gint i;
gint j;
@@ -325,7 +338,9 @@
if (sorted == TRUE)
{
- create_sub_menu(sub_menu_cat[i][0], tmp, tmp_item, g_strconcat(menu_template[j].label, " ... ", menu_template[j + next_split_point-1].label, NULL));
+ create_sub_menu(sub_menu_cat[i][0], tmp, tmp_item,
+ g_strconcat(menu_template[j].label, " ... ",
+ menu_template[j + next_split_point-1].label, NULL));
sub_menu = tmp;
}
@@ -340,9 +355,12 @@
}
}
- /* Sets the counter to keep in track if a new submenu needs to be build up */
+ /* Sets the counter to keep in track if a new ,,
+ * submenu needs to be build up */
local_count = local_count + 1;
- character_create_menu_item(sub_menu, g_strconcat(menu_template[j].label, "\t", menu_template[j].latex, NULL), j, callback_function);
+ character_create_menu_item(sub_menu, g_strconcat(
+ menu_template[j].label, "\t", menu_template[j].latex,
+ NULL), j, callback_function);
}
}
}
@@ -370,13 +388,14 @@
if (output)
{
doc = document_new_file(name, ft, output);
- document_set_encoding(doc, encodings_get_charset_from_index(latex_encodings[local_enc].geany_enc));
+ document_set_encoding(doc, encodings_get_charset_from_index
+ (latex_encodings[local_enc].geany_enc));
}
-
}
static void
-wizard_activated(G_GNUC_UNUSED GtkMenuItem * menuitem, G_GNUC_UNUSED gpointer gdata)
+wizard_activated(G_GNUC_UNUSED GtkMenuItem * menuitem,
+ G_GNUC_UNUSED gpointer gdata)
{
gint i;
GString *code = NULL;
@@ -428,11 +447,16 @@
documentclass_combobox = gtk_combo_box_new_text();
gtk_tooltips_set_tip(tooltip, documentclass_combobox,
_("Choose the kind of document you want to write"), NULL);
- gtk_combo_box_insert_text(GTK_COMBO_BOX(documentclass_combobox), 0, _("Book"));
- gtk_combo_box_insert_text(GTK_COMBO_BOX(documentclass_combobox), 1, _("Article"));
- gtk_combo_box_insert_text(GTK_COMBO_BOX(documentclass_combobox), 2, _("Report"));
- gtk_combo_box_insert_text(GTK_COMBO_BOX(documentclass_combobox), 3, _("Letter"));
- gtk_combo_box_insert_text(GTK_COMBO_BOX(documentclass_combobox), 4, _("Presentation"));
+ gtk_combo_box_insert_text(GTK_COMBO_BOX(documentclass_combobox), 0,
+ _("Book"));
+ gtk_combo_box_insert_text(GTK_COMBO_BOX(documentclass_combobox), 1,
+ _("Article"));
+ gtk_combo_box_insert_text(GTK_COMBO_BOX(documentclass_combobox), 2,
+ _("Report"));
+ gtk_combo_box_insert_text(GTK_COMBO_BOX(documentclass_combobox), 3,
+ _("Letter"));
+ gtk_combo_box_insert_text(GTK_COMBO_BOX(documentclass_combobox), 4,
+ _("Presentation"));
gtk_combo_box_set_active(GTK_COMBO_BOX(documentclass_combobox), 0);
@@ -494,7 +518,9 @@
label_date = gtk_label_new(_("Date:"));
date_textbox = gtk_entry_new();
gtk_tooltips_set_tip(tooltip, date_textbox,
- _("Sets the value of the \\date command inside header of your newly created LaTeX-document. Keeping it at \\today is a good decision if you don't need any fixed date."), NULL);
+ _("Sets the value of the \\date command inside header of your\
+ newly created LaTeX-document. Keeping it at \\today is a good \
+ decision if you don't need any fixed date."), NULL);
gtk_entry_set_text(GTK_ENTRY(date_textbox), "\\today");
gtk_misc_set_alignment(GTK_MISC(label_date), 0, 0.5);
gtk_table_attach_defaults(GTK_TABLE(table), label_date, 0, 1, 4, 5);
@@ -503,8 +529,8 @@
/* Title of the new document */
label_title = gtk_label_new(_("Title:"));
title_textbox = gtk_entry_new();
- gtk_tooltips_set_tip(tooltip, title_textbox, _("Sets the title of your new document."),
- NULL);
+ gtk_tooltips_set_tip(tooltip, title_textbox,
+ _("Sets the title of your new document."), NULL);
gtk_misc_set_alignment(GTK_MISC(label_title), 0, 0.5);
gtk_table_attach_defaults(GTK_TABLE(table), label_title, 0, 1, 5, 6);
gtk_table_attach_defaults(GTK_TABLE(table), title_textbox, 1, 2, 5, 6);
@@ -529,27 +555,29 @@
/* Building the wizard-dialog and showing it */
dialog = gtk_dialog_new_with_buttons(_("LaTeX-Wizard"),
- GTK_WINDOW(geany->main_widgets->window),
- GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL,
- GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
- NULL);
+ GTK_WINDOW(geany->main_widgets->window),
+ GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL,
+ GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
+ NULL);
vbox = ui_dialog_vbox_new(GTK_DIALOG(dialog));
gtk_widget_set_name(dialog, "GeanyDialog");
gtk_box_set_spacing(GTK_BOX(vbox), 10);
gtk_container_add(GTK_CONTAINER(vbox), table);
- checkbox_KOMA = gtk_check_button_new_with_label(_("Use KOMA-script classes if possible"));
+ checkbox_KOMA = gtk_check_button_new_with_label(
+ _("Use KOMA-script classes if possible"));
gtk_tooltips_set_tip(tooltip, checkbox_KOMA,
- _
- ("Uses the KOMA-script classes by Markus Kohm.\nKeep in mind: To compile your document these classes have to be installed before."),
- NULL);
+ _("Uses the KOMA-script classes by Markus Kohm.\n"
+ "Keep in mind: To compile your document these classes"
+ "have to be installed before."), NULL);
gtk_button_set_focus_on_click(GTK_BUTTON(checkbox_KOMA), FALSE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbox_KOMA), KOMA_active);
gtk_box_pack_start(GTK_BOX(vbox), checkbox_KOMA, FALSE, FALSE, 5);
checkbox_draft = gtk_check_button_new_with_label(_("Use draft mode"));
gtk_tooltips_set_tip(tooltip, checkbox_draft,
- _("Set the draft flag inside new created documents to get documents with a number of debugging helpers"), NULL);
+ _("Set the draft flag inside new created documents to get "
+ "documents with a number of debugging helpers"), NULL);
gtk_button_set_focus_on_click(GTK_BUTTON(checkbox_draft), FALSE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbox_draft), draft_active);
gtk_box_pack_start(GTK_BOX(vbox), checkbox_draft, FALSE, FALSE, 5);
@@ -558,15 +586,21 @@
if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT)
{
- KOMA_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbox_KOMA));
- draft_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbox_draft));
- documentclass_int = gtk_combo_box_get_active(GTK_COMBO_BOX(documentclass_combobox));
- encoding_int = gtk_combo_box_get_active(GTK_COMBO_BOX(encoding_combobox));
- enc_latex_char = g_strconcat("\\usepackage[", latex_encodings[encoding_int].latex,"]{inputenc}\n", NULL);
+ KOMA_active = gtk_toggle_button_get_active(
+ GTK_TOGGLE_BUTTON(checkbox_KOMA));
+ draft_active = gtk_toggle_button_get_active(
+ GTK_TOGGLE_BUTTON(checkbox_draft));
+ documentclass_int = gtk_combo_box_get_active(
+ GTK_COMBO_BOX(documentclass_combobox));
+ encoding_int = gtk_combo_box_get_active(
+ GTK_COMBO_BOX(encoding_combobox));
+ enc_latex_char = g_strconcat("\\usepackage[",
+ latex_encodings[encoding_int].latex,"]{inputenc}\n", NULL);
author = g_strdup(gtk_entry_get_text(GTK_ENTRY(author_textbox)));
date = g_strdup(gtk_entry_get_text(GTK_ENTRY(date_textbox)));
title = g_strdup(gtk_entry_get_text(GTK_ENTRY(title_textbox)));
- papersize_int = gtk_combo_box_get_active(GTK_COMBO_BOX(papersize_combobox));
+ papersize_int = gtk_combo_box_get_active(
+ GTK_COMBO_BOX(papersize_combobox));
switch (papersize_int)
{
case 0:
@@ -586,7 +620,8 @@
}
}
- fontsize_int = gtk_combo_box_get_active(GTK_COMBO_BOX(fontsize_combobox));
+ fontsize_int = gtk_combo_box_get_active(
+ GTK_COMBO_BOX(fontsize_combobox));
switch (fontsize_int)
{
case 0:
@@ -830,36 +865,43 @@
menu_latex_menu_special_char = gtk_menu_item_new_with_mnemonic(_("Insert _Special Character"));
gtk_tooltips_set_tip(tooltips, menu_latex_menu_special_char,
_("Helps to use some not very common letters and signs"), NULL);
- gtk_container_add(GTK_CONTAINER(menu_latex_menu), menu_latex_menu_special_char);
+ gtk_container_add(GTK_CONTAINER(menu_latex_menu),
+ menu_latex_menu_special_char);
menu_latex_menu_special_char_submenu = gtk_menu_new();
- gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_latex_menu_special_char), menu_latex_menu_special_char_submenu);
- sub_menu_init(menu_latex_menu_special_char_submenu, char_array, cat_names, char_insert_activated);
+ gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_latex_menu_special_char),
+ menu_latex_menu_special_char_submenu);
+ sub_menu_init(menu_latex_menu_special_char_submenu, char_array, cat_names,
+ char_insert_activated);
menu_latex_ref = gtk_menu_item_new_with_mnemonic(_("Insert _Reference"));
gtk_tooltips_set_tip(tooltips, menu_latex_ref,
_("Inserting references to the document"), NULL);
gtk_container_add(GTK_CONTAINER(menu_latex_menu), menu_latex_ref);
- g_signal_connect((gpointer) menu_latex_ref, "activate", G_CALLBACK(insert_ref_activated), NULL);
+ g_signal_connect((gpointer) menu_latex_ref, "activate",
+ G_CALLBACK(insert_ref_activated), NULL);
menu_latex_label = gtk_menu_item_new_with_mnemonic(_("Insert _Label"));
gtk_tooltips_set_tip(tooltips, menu_latex_label,
_("Helps at inserting labels to a document"), NULL);
gtk_container_add(GTK_CONTAINER(menu_latex_menu), menu_latex_label);
- g_signal_connect((gpointer) menu_latex_label, "activate", G_CALLBACK(insert_label_activated), NULL);
+ g_signal_connect((gpointer) menu_latex_label, "activate",
+ G_CALLBACK(insert_label_activated), NULL);
menu_latex_bibtex = gtk_menu_item_new_with_mnemonic(_("BibTeX"));
gtk_container_add(GTK_CONTAINER(menu_latex_menu), menu_latex_bibtex);
menu_latex_bibtex_submenu = gtk_menu_new();
- gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_latex_bibtex), menu_latex_bibtex_submenu);
+ gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_latex_bibtex),
+ menu_latex_bibtex_submenu);
for (i = 0; i < N_TYPES; i++)
{
tmp = NULL;
tmp = gtk_menu_item_new_with_mnemonic(_(label_types[i]));
gtk_container_add(GTK_CONTAINER(menu_latex_bibtex_submenu), tmp);
- g_signal_connect((gpointer) tmp, "activate", G_CALLBACK(insert_bibtex_entry), GINT_TO_POINTER(i));
+ g_signal_connect((gpointer) tmp, "activate",
+ G_CALLBACK(insert_bibtex_entry), GINT_TO_POINTER(i));
}
/* init keybindins */
Modified: trunk/geanylatex/src/geanylatex.h
===================================================================
--- trunk/geanylatex/src/geanylatex.h 2009-01-27 22:38:33 UTC (rev 407)
+++ trunk/geanylatex/src/geanylatex.h 2009-01-28 21:58:42 UTC (rev 408)
@@ -33,6 +33,7 @@
#include "editor.h"
#include "filetypes.h"
#include "templates.h"
+#include "dialogs.h"
#include "utils.h"
#include "ui_utils.h"
#include "keybindings.h"
@@ -45,6 +46,7 @@
#include "latexutils.h"
#include "reftex.h"
+#include <gtk/gtk.h>
#ifdef HAVE_LOCALE_H
# include <locale.h>
Modified: trunk/geanylatex/src/latexencodings.c
===================================================================
--- trunk/geanylatex/src/latexencodings.c 2009-01-27 22:38:33 UTC (rev 407)
+++ trunk/geanylatex/src/latexencodings.c 2009-01-28 21:58:42 UTC (rev 408)
@@ -37,19 +37,23 @@
fill(LATEX_ENCODING_UTF_8, _("UTF-8"), "utf8", GEANY_ENCODING_UTF_8);
fill(LATEX_ENCODING_ASCII, _("US-ASCII"), "ascii", GEANY_ENCODING_ISO_8859_1);
fill(LATEX_ENCODING_ISO_8859_1, _("ISO-8859-1 (Latin-1)"), "latin1",
- GEANY_ENCODING_ISO_8859_1);
+ GEANY_ENCODING_ISO_8859_1);
fill(LATEX_ENCODING_ISO_8859_2, _("ISO-8859-2 (Latin-2)"), "latin2",
- GEANY_ENCODING_ISO_8859_2);
+ GEANY_ENCODING_ISO_8859_2);
fill(LATEX_ENCODING_ISO_8859_3, _("ISO-8859-3 (Latin-3)"), "latin3",
- GEANY_ENCODING_ISO_8859_3);
+ GEANY_ENCODING_ISO_8859_3);
fill(LATEX_ENCODING_ISO_8859_4, _("ISO-8859-4 (Latin-4)"), "latin4",
- GEANY_ENCODING_ISO_8859_4);
+ GEANY_ENCODING_ISO_8859_4);
fill(LATEX_ENCODING_ISO_8859_5, _("ISO-8859-5 (Latin-5)"), "latin5",
- GEANY_ENCODING_ISO_8859_5);
+ GEANY_ENCODING_ISO_8859_5);
fill(LATEX_ENCODING_ISO_8859_9, _("ISO-8859-9 (Latin-9)"), "latin9",
- GEANY_ENCODING_ISO_8859_9);
- fill(LATEX_ENCODING_ISO_8859_10, _("ISO-8859-10 (Latin-10)"), "latin10", GEANY_ENCODING_ISO_8859_10);
- fill(LATEX_ENCODING_IBM_850, _("IBM 850 code page"), "cp850", GEANY_ENCODING_IBM_850);
- fill(LATEX_ENCODING_IBM_852, _("IBM 852 code page"), "cp852", GEANY_ENCODING_IBM_852);
- fill(LATEX_ENCODING_NONE, _("Misc"), NULL, GEANY_ENCODING_NONE);
+ GEANY_ENCODING_ISO_8859_9);
+ fill(LATEX_ENCODING_ISO_8859_10, _("ISO-8859-10 (Latin-10)"), "latin10",
+ GEANY_ENCODING_ISO_8859_10);
+ fill(LATEX_ENCODING_IBM_850, _("IBM 850 code page"), "cp850",
+ GEANY_ENCODING_IBM_850);
+ fill(LATEX_ENCODING_IBM_852, _("IBM 852 code page"), "cp852",
+ GEANY_ENCODING_IBM_852);
+ fill(LATEX_ENCODING_NONE, _("Misc"), NULL,
+ GEANY_ENCODING_NONE);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Plugins-Commits
mailing list