Revision: 2113 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=2113&view=re... Author: frlan Date: 2011-07-28 20:20:59 +0000 (Thu, 28 Jul 2011)
Log Message: ----------- GeanyLaTeX: Resorting LaTeX menu
Modified Paths: -------------- trunk/geanylatex/ChangeLog trunk/geanylatex/src/geanylatex.c
Modified: trunk/geanylatex/ChangeLog =================================================================== --- trunk/geanylatex/ChangeLog 2011-07-24 21:12:24 UTC (rev 2112) +++ trunk/geanylatex/ChangeLog 2011-07-28 20:20:59 UTC (rev 2113) @@ -1,3 +1,8 @@ +2011-07-28 Frank Lanitz <frank(at)frank(dot)uvena(dot)de> + + * Resorting LaTeX menu. + + 2011-04-26 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
* Add a tooltip to toolbar item.
Modified: trunk/geanylatex/src/geanylatex.c =================================================================== --- trunk/geanylatex/src/geanylatex.c 2011-07-24 21:12:24 UTC (rev 2112) +++ trunk/geanylatex/src/geanylatex.c 2011-07-28 20:20:59 UTC (rev 2113) @@ -2104,6 +2104,7 @@ menu_latex_menu = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_latex), menu_latex_menu);
+ /* Adding LaTeX Wizard */ menu_latex_wizard = ui_image_menu_item_new(GTK_STOCK_NEW, _("LaTeX-_Wizard")); gtk_container_add(GTK_CONTAINER(menu_latex_menu), menu_latex_wizard); ui_widget_set_tooltip_text(menu_latex_wizard, @@ -2118,66 +2119,14 @@ gtk_container_add(GTK_CONTAINER(menu_latex_menu), menu_latex_menu_special_char);
+ /* Adding special chars menu */ 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); glatex_sub_menu_init(menu_latex_menu_special_char_submenu, glatex_char_array, glatex_cat_names, char_insert_activated);
- menu_latex_ref = gtk_menu_item_new_with_mnemonic(_("Insert _Reference")); - ui_widget_set_tooltip_text(menu_latex_ref, - _("Inserting references to the document")); - gtk_container_add(GTK_CONTAINER(menu_latex_menu), menu_latex_ref); - g_signal_connect(menu_latex_ref, "activate", - G_CALLBACK(glatex_insert_ref_activated), NULL); - - menu_latex_label = gtk_menu_item_new_with_mnemonic(_("Insert _Label")); - ui_widget_set_tooltip_text(menu_latex_label, - _("Helps at inserting labels to a document")); - gtk_container_add(GTK_CONTAINER(menu_latex_menu), menu_latex_label); - g_signal_connect(menu_latex_label, "activate", - G_CALLBACK(glatex_insert_label_activated), NULL); - - menu_latex_insert_environment = gtk_menu_item_new_with_mnemonic( - _("Insert _Environment")); - ui_widget_set_tooltip_text(menu_latex_insert_environment, - _("Helps at inserting an environment a document")); - gtk_container_add(GTK_CONTAINER(menu_latex_menu), menu_latex_insert_environment); - g_signal_connect(menu_latex_insert_environment, "activate", - G_CALLBACK(glatex_insert_environment_dialog), NULL); - - menu_latex_insert_usepackage = gtk_menu_item_new_with_mnemonic( - _("Insert P_ackage")); - ui_widget_set_tooltip_text(menu_latex_insert_usepackage, - _("A small dialog to insert \usepackage{} into header of current file")); - gtk_container_add(GTK_CONTAINER(menu_latex_menu), menu_latex_insert_usepackage); - g_signal_connect(menu_latex_insert_usepackage, "activate", - G_CALLBACK(glatex_insert_usepackage_dialog), NULL); - - menu_latex_insert_bibtex_cite = - gtk_menu_item_new_with_mnemonic(_("Insert B_ibTeX reference")); - ui_widget_set_tooltip_text(menu_latex_insert_bibtex_cite, - _("Helps to insert a reference out of BibTeX files")); - gtk_container_add(GTK_CONTAINER(menu_latex_menu), menu_latex_insert_bibtex_cite); - g_signal_connect(menu_latex_insert_bibtex_cite, "activate", - G_CALLBACK(on_insert_bibtex_dialog_activate), NULL); - - menu_latex_bibtex = gtk_menu_item_new_with_mnemonic(_("_BibTeX entries")); - 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); - - for (i = 0; i < GLATEX_BIBTEX_N_TYPES; i++) - { - tmp = NULL; - tmp = gtk_menu_item_new_with_mnemonic(_(glatex_bibtex_types[i].label)); - gtk_container_add(GTK_CONTAINER(menu_latex_bibtex_submenu), tmp); - g_signal_connect(tmp, "activate", - G_CALLBACK(glatex_insert_bibtex_entry), GINT_TO_POINTER(i)); - } - + /* Adding format submenu */ menu_latex_format_insert = gtk_menu_item_new_with_mnemonic(_("_Format")); gtk_container_add(GTK_CONTAINER(menu_latex_menu), menu_latex_format_insert);
@@ -2194,7 +2143,7 @@ G_CALLBACK(glatex_insert_latex_format), GINT_TO_POINTER(i)); }
- /* Add font size menu */ + /* Add font size submenu */ menu_latex_fontsize = gtk_menu_item_new_with_mnemonic(_("F_ont size")); gtk_container_add(GTK_CONTAINER(menu_latex_menu), menu_latex_fontsize);
@@ -2211,6 +2160,63 @@ G_CALLBACK(glatex_insert_latex_fontsize), GINT_TO_POINTER(i)); }
+ /* Adding bibTeX submenu */ + menu_latex_bibtex = gtk_menu_item_new_with_mnemonic(_("_BibTeX entries")); + 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); + + for (i = 0; i < GLATEX_BIBTEX_N_TYPES; i++) + { + tmp = NULL; + tmp = gtk_menu_item_new_with_mnemonic(_(glatex_bibtex_types[i].label)); + gtk_container_add(GTK_CONTAINER(menu_latex_bibtex_submenu), tmp); + g_signal_connect(tmp, "activate", + G_CALLBACK(glatex_insert_bibtex_entry), GINT_TO_POINTER(i)); + } + + /* Adding bibTeX reference menu entry */ + menu_latex_insert_bibtex_cite = + gtk_menu_item_new_with_mnemonic(_("Insert B_ibTeX reference")); + ui_widget_set_tooltip_text(menu_latex_insert_bibtex_cite, + _("Helps to insert a reference out of BibTeX files")); + gtk_container_add(GTK_CONTAINER(menu_latex_menu), menu_latex_insert_bibtex_cite); + g_signal_connect(menu_latex_insert_bibtex_cite, "activate", + G_CALLBACK(on_insert_bibtex_dialog_activate), NULL); + + /* Adding references submenu entry*/ + menu_latex_ref = gtk_menu_item_new_with_mnemonic(_("Insert _Reference")); + ui_widget_set_tooltip_text(menu_latex_ref, + _("Inserting references to the document")); + gtk_container_add(GTK_CONTAINER(menu_latex_menu), menu_latex_ref); + g_signal_connect(menu_latex_ref, "activate", + G_CALLBACK(glatex_insert_ref_activated), NULL); + + menu_latex_label = gtk_menu_item_new_with_mnemonic(_("Insert _Label")); + ui_widget_set_tooltip_text(menu_latex_label, + _("Helps at inserting labels to a document")); + gtk_container_add(GTK_CONTAINER(menu_latex_menu), menu_latex_label); + g_signal_connect(menu_latex_label, "activate", + G_CALLBACK(glatex_insert_label_activated), NULL); + + menu_latex_insert_environment = gtk_menu_item_new_with_mnemonic( + _("Insert _Environment")); + ui_widget_set_tooltip_text(menu_latex_insert_environment, + _("Helps at inserting an environment a document")); + gtk_container_add(GTK_CONTAINER(menu_latex_menu), menu_latex_insert_environment); + g_signal_connect(menu_latex_insert_environment, "activate", + G_CALLBACK(glatex_insert_environment_dialog), NULL); + + menu_latex_insert_usepackage = gtk_menu_item_new_with_mnemonic( + _("Insert P_ackage")); + ui_widget_set_tooltip_text(menu_latex_insert_usepackage, + _("A small dialog to insert \usepackage{} into header of current file")); + gtk_container_add(GTK_CONTAINER(menu_latex_menu), menu_latex_insert_usepackage); + g_signal_connect(menu_latex_insert_usepackage, "activate", + G_CALLBACK(glatex_insert_usepackage_dialog), NULL); + /* Add menuitem for LaTeX replacement functions*/ menu_latex_replacement = gtk_menu_item_new_with_mnemonic( _("_Special Character Replacement"));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org