Revision: 1573 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1573&view=re... Author: frlan Date: 2010-09-12 19:32:29 +0000 (Sun, 12 Sep 2010)
Log Message: ----------- GeanyLaTeX: Add an entry for LaTeX wizard to tool menu as in future the rest will be managed inside a by filetype triggered menu
Modified Paths: -------------- trunk/geanylatex/src/geanylatex.c
Modified: trunk/geanylatex/src/geanylatex.c =================================================================== --- trunk/geanylatex/src/geanylatex.c 2010-09-12 19:31:39 UTC (rev 1572) +++ trunk/geanylatex/src/geanylatex.c 2010-09-12 19:32:29 UTC (rev 1573) @@ -63,6 +63,7 @@ static GtkWidget *menu_latex_replacement_submenu = NULL; static GtkWidget *menu_latex_replace_selection = NULL; static GtkWidget *menu_latex_replace_toggle = NULL; +static GtkWidget *menu_latex_toolbar_wizard = NULL;
/* Options for plugin */ static gboolean glatex_set_koma_active = FALSE; @@ -2096,6 +2097,26 @@ }
+void static +add_wizard_to_toolbar() +{ + 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); +} + +void static +remove_wizard_from_toolbar() +{ + gtk_widget_destroy(menu_latex_toolbar_wizard); +} + + void plugin_init(G_GNUC_UNUSED GeanyData * data) { @@ -2105,6 +2126,7 @@ glatex_init_encodings_latex();
add_menu_to_menubar(); + add_wizard_to_toolbar();
init_keybindings();
@@ -2125,7 +2147,9 @@ { if (glatex_toolbar != NULL) gtk_widget_destroy(glatex_toolbar); + gtk_widget_destroy(menu_latex_toolbar_wizard); remove_menu_form_menubar(); + remove_wizard_from_toolbar(); g_free(config_file); g_free(glatex_ref_chapter_string); g_free(glatex_ref_page_string);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org