Revision: 1596 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1596&view=re... Author: frlan Date: 2010-09-18 23:57:32 +0000 (Sat, 18 Sep 2010)
Log Message: ----------- GeanyLaTeX: Check whether variable is already set before creating new widgets for inserting the LaTeX wizard entry to tools menu
Modified Paths: -------------- trunk/geanylatex/src/geanylatex.c
Modified: trunk/geanylatex/src/geanylatex.c =================================================================== --- trunk/geanylatex/src/geanylatex.c 2010-09-18 23:35:14 UTC (rev 1595) +++ trunk/geanylatex/src/geanylatex.c 2010-09-18 23:57:32 UTC (rev 1596) @@ -2171,14 +2171,17 @@ void static add_wizard_to_tools_menu() { - menu_latex_toolbar_wizard = ui_image_menu_item_new(GTK_STOCK_NEW, - _("LaTeX-_Wizard")); - gtk_container_add(GTK_CONTAINER(geany->main_widgets->tools_menu), menu_latex_toolbar_wizard); - ui_widget_set_tooltip_text(menu_latex_toolbar_wizard, - _("Starts a Wizard to easily create LaTeX-documents")); - gtk_widget_show_all(menu_latex_toolbar_wizard); - g_signal_connect(menu_latex_toolbar_wizard, "activate", - G_CALLBACK(glatex_wizard_activated), NULL); + if (menu_latex_toolbar_wizard == NULL) + { + menu_latex_toolbar_wizard = ui_image_menu_item_new(GTK_STOCK_NEW, + _("LaTeX-_Wizard")); + gtk_container_add(GTK_CONTAINER(geany->main_widgets->tools_menu), menu_latex_toolbar_wizard); + ui_widget_set_tooltip_text(menu_latex_toolbar_wizard, + _("Starts a Wizard to easily create LaTeX-documents")); + gtk_widget_show_all(menu_latex_toolbar_wizard); + g_signal_connect(menu_latex_toolbar_wizard, "activate", + G_CALLBACK(glatex_wizard_activated), NULL); + } }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.