Revision: 654 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=654&view=rev Author: frlan Date: 2009-05-17 21:50:56 +0000 (Sun, 17 May 2009)
Log Message: ----------- GeanyLaTeX: Moved code to init toolbar into separate function
Modified Paths: -------------- trunk/geanylatex/ChangeLog trunk/geanylatex/src/geanylatex.c
Modified: trunk/geanylatex/ChangeLog =================================================================== --- trunk/geanylatex/ChangeLog 2009-05-17 21:33:20 UTC (rev 653) +++ trunk/geanylatex/ChangeLog 2009-05-17 21:50:56 UTC (rev 654) @@ -1,3 +1,10 @@ +2009-05-17 Frank Lanitz <frank(at)frank(dot)uvena(dot)de> + + * Adding some more items to toolbar for centerin, left and right formatted + text. Created LaTeX code based on needs still some improvement. Please + use with care. + + 2009-05-15 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
* Adding a toolbar for common LaTeX format topics.
Modified: trunk/geanylatex/src/geanylatex.c =================================================================== --- trunk/geanylatex/src/geanylatex.c 2009-05-17 21:33:20 UTC (rev 653) +++ trunk/geanylatex/src/geanylatex.c 2009-05-17 21:50:56 UTC (rev 654) @@ -968,11 +968,25 @@ }
-/*void glatex_kb_bibtex_entry_insert(G_GNUC_UNUSED guint key_id) +static void init_toolbar() { - insert_bibtex_entry(NULL, NULL); -}*/ + static GtkWidget *menubar_toolbar_separator = NULL;
+ menubar_toolbar_separator = GTK_WIDGET(gtk_separator_tool_item_new()); + + box = ui_lookup_widget(geany->main_widgets->window, "vbox1"); + uim = gtk_ui_manager_new(); + group = gtk_action_group_new("glatex_format_toolbar"); + gtk_action_group_set_translation_domain(group, GETTEXT_PACKAGE); + gtk_action_group_add_actions(group, format_icons, ui_entries_n, NULL); + gtk_ui_manager_insert_action_group(uim, group, 0); + gtk_ui_manager_add_ui_from_string(uim, toolbar_markup, -1, NULL); + glatex_toolbar = gtk_ui_manager_get_widget(uim, "/ui/glatex_format_toolbar"); + gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(glatex_toolbar), FALSE, TRUE, 0); + gtk_box_reorder_child(GTK_BOX(box), glatex_toolbar, 2); +} + + void init_keybindings() { /* init keybindins */ @@ -1017,7 +1031,6 @@ { GtkTooltips *tooltips = NULL; GtkWidget *tmp = NULL; - static GtkWidget *menubar_toolbar_separator = NULL;
int i;
@@ -1027,9 +1040,6 @@
tooltips = gtk_tooltips_new();
- menubar_toolbar_separator = GTK_WIDGET(gtk_separator_tool_item_new()); - - menu_latex = gtk_menu_item_new_with_mnemonic(_("_LaTeX")); gtk_container_add(GTK_CONTAINER(geany->main_widgets->tools_menu), menu_latex);
@@ -1141,17 +1151,8 @@ G_CALLBACK(glatex_toggle_status), NULL);
init_keybindings(); + init_toolbar();
- box = ui_lookup_widget(geany->main_widgets->window, "vbox1"); - uim = gtk_ui_manager_new(); - group = gtk_action_group_new("glatex_format_toolbar"); - gtk_action_group_set_translation_domain(group, GETTEXT_PACKAGE); - gtk_action_group_add_actions(group, format_icons, ui_entries_n, NULL); - gtk_ui_manager_insert_action_group(uim, group, 0); - gtk_ui_manager_add_ui_from_string(uim, toolbar_markup, -1, NULL); - glatex_toolbar = gtk_ui_manager_get_widget(uim, "/ui/glatex_format_toolbar"); - gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(glatex_toolbar), FALSE, TRUE, 0); - gtk_box_reorder_child(GTK_BOX(box), glatex_toolbar, 2);
ui_add_document_sensitive(menu_latex_menu_special_char); ui_add_document_sensitive(menu_latex_ref); @@ -1169,5 +1170,6 @@ plugin_cleanup() { gtk_widget_destroy(main_menu_item); - gtk_widget_destroy(glatex_toolbar); + if (glatex_toolbar != NULL) + gtk_widget_destroy(glatex_toolbar); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org