SF.net SVN: geany-plugins:[660] trunk/geanylatex/src/geanylatex.c
frlan at users.sourceforge.net
frlan at xxxxx
Fri May 22 20:03:24 UTC 2009
Revision: 660
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=660&view=rev
Author: frlan
Date: 2009-05-22 20:03:23 +0000 (Fri, 22 May 2009)
Log Message:
-----------
GeanyLaTeX: Use gtk_widget_hide()/gtk_widget_show() instead of destroying widget for saving some CPU time on possible reactivating of toolbar.
Modified Paths:
--------------
trunk/geanylatex/src/geanylatex.c
Modified: trunk/geanylatex/src/geanylatex.c
===================================================================
--- trunk/geanylatex/src/geanylatex.c 2009-05-22 20:02:56 UTC (rev 659)
+++ trunk/geanylatex/src/geanylatex.c 2009-05-22 20:03:23 UTC (rev 660)
@@ -196,15 +196,21 @@
/* Apply changes to Geany */
/* Add toolbar if requested */
- if (glatex_set_toolbar_active == TRUE && glatex_toolbar == NULL)
+ if (glatex_set_toolbar_active == TRUE)
{
- init_toolbar();
+ if (glatex_toolbar == NULL)
+ {
+ init_toolbar();
+ }
+ else
+ {
+ gtk_widget_show(glatex_toolbar);
+ }
}
- /* Destroy toolbar if there is any in case of its not needed anymore */
+ /* Hide toolbar */
else if (glatex_set_toolbar_active == FALSE && glatex_toolbar != NULL)
{
- gtk_widget_destroy(glatex_toolbar);
- glatex_toolbar = NULL;
+ gtk_widget_hide(glatex_toolbar);
}
}
}
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