SF.net SVN: geany-plugins:[1586] trunk/geanylatex

frlan at users.sourceforge.net frlan at xxxxx
Tue Sep 14 20:01:45 UTC 2010


Revision: 1586
          http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1586&view=rev
Author:   frlan
Date:     2010-09-14 20:01:45 +0000 (Tue, 14 Sep 2010)

Log Message:
-----------
GeanyLaTeX: Add a hidden pref to deactivated toggeling of LaTeX menu on changing from/to non-TeX documents

Modified Paths:
--------------
    trunk/geanylatex/doc/geanylatex.pdf
    trunk/geanylatex/doc/geanylatex.tex
    trunk/geanylatex/src/geanylatex.c

Modified: trunk/geanylatex/doc/geanylatex.pdf
===================================================================
(Binary files differ)

Modified: trunk/geanylatex/doc/geanylatex.tex
===================================================================
--- trunk/geanylatex/doc/geanylatex.tex	2010-09-14 19:31:28 UTC (rev 1585)
+++ trunk/geanylatex/doc/geanylatex.tex	2010-09-14 20:01:45 UTC (rev 1586)
@@ -615,8 +615,8 @@
 command line.
 
 \subsubsection{Deactivate toolbar items if document is a non \TeX-type}
-
-By defaul, Geany\LaTeX{} is deactivating buttons inside toolbar, which
+\label{deactivate_toolbaritems_with_non_latex}
+By default, Geany\LaTeX{} is deactivating buttons inside toolbar, which
 don't make much sense to be applied on non-\TeX{} file types. As
 this is not always wished, its possible to turn this feature off
 via a hidden preferences.
@@ -639,6 +639,29 @@
 
 Please ensure, you reload the plugin once this option has been changed.
 
+\subsubsection{Remove \LaTeX{} menu if document is a non \TeX-type} 
+
+Geany\LaTeX{} is enabling a separate menu inside Geany's main menu. 
+On default, its getting activated and deactivated based on the file 
+type of the current document. However, from time to time its annying 
+to have the menu entry switched maybe each time on switching between 
+two documents it can be set to keep even there is no LaTeX document 
+activ. 
+
+\begin{lstlisting}
+[general]
+glatex_set_koma_active=false
+glatex_set_toolbar_active=true
+
+[menu]
+glatex_deactivate_menubarentry_with_non_latex=false
+\end{lstlisting}
+
+This option might make sense in combination with deactivation of 
+toolbar items on changing to a non-\TeX{} document at 
+\ref{deactivate_toolbaritems_with_non_latex}, page \pageref
+{deactivate_toolbaritems_with_non_latex}.
+
 \subsubsection{Size of context for autocompletion}
 \label{sec:hidden_pref_autocompletion_context}
 Inside configuration file you can add a value to adjust the size of

Modified: trunk/geanylatex/src/geanylatex.c
===================================================================
--- trunk/geanylatex/src/geanylatex.c	2010-09-14 19:31:28 UTC (rev 1585)
+++ trunk/geanylatex/src/geanylatex.c	2010-09-14 20:01:45 UTC (rev 1586)
@@ -68,6 +68,7 @@
 /* Options for plugin */
 static gboolean glatex_set_koma_active = FALSE;
 static gboolean glatex_deactivate_toolbaritems_with_non_latex = TRUE;
+static gboolean glatex_deactivate_menubarentry_with_non_latex = TRUE;
 static gchar *glatex_ref_chapter_string = NULL;
 static gchar *glatex_ref_page_string = NULL;
 static gchar *glatex_ref_all_string = NULL;
@@ -324,7 +325,10 @@
 	if (ft_id != GEANY_FILETYPES_LATEX &&
 		main_menu_item != NULL)
 	{
-		remove_menu_from_menubar();
+		if (glatex_deactivate_menubarentry_with_non_latex == TRUE)
+		{
+			remove_menu_from_menubar();
+		}
 	}
 }
 
@@ -659,7 +663,8 @@
 
 	if (doc->index < 2)
 		deactivate_toolbar_items();
-	if (doc->index < 1)
+	if (doc->index < 1 && 
+		glatex_deactivate_menubarentry_with_non_latex == TRUE)
 		remove_menu_from_menubar();
 }
 
@@ -1928,11 +1933,15 @@
 	}
 	/* Increase value by an offset as we add a new line so 2 really means 2 */
 	glatex_autocompletion_context_size = glatex_autocompletion_context_size + 2;
+
 	glatex_autocompletion_only_for_latex = utils_get_setting_boolean(config, "autocompletion",
 		"glatex_autocompletion_only_for_latex", TRUE);
 
 	glatex_deactivate_toolbaritems_with_non_latex = utils_get_setting_boolean(config, "toolbar",
 		"glatex_deactivate_toolbaritems_with_non_latex", TRUE);
+	glatex_deactivate_menubarentry_with_non_latex = utils_get_setting_boolean(config, "menu",
+		"glatex_deactivate_menubarentry_with_non_latex", TRUE);
+	
 	glatex_ref_page_string = utils_get_setting_string(config, "reference",
 		"glatex_reference_page", _("page \\pageref{{{reference}}}"));
 	glatex_ref_chapter_string = utils_get_setting_string(config, "reference",


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