epiphany-extensions r1780 - branches/gnome-2-24/extensions/error-viewer



Author: diegoe
Date: Sat Oct 18 09:05:08 2008
New Revision: 1780
URL: http://svn.gnome.org/viewvc/epiphany-extensions?rev=1780&view=rev

Log:
Initialize content_type to -1 before evaluating it

This was preventing the error-viewer extension from setting its actions as
active unless it was unloaded and loaded via the extensions window.
Closes: bug #556326

Modified:
   branches/gnome-2-24/extensions/error-viewer/ephy-error-viewer-extension.c

Modified: branches/gnome-2-24/extensions/error-viewer/ephy-error-viewer-extension.c
==============================================================================
--- branches/gnome-2-24/extensions/error-viewer/ephy-error-viewer-extension.c	(original)
+++ branches/gnome-2-24/extensions/error-viewer/ephy-error-viewer-extension.c	Sat Oct 18 09:05:08 2008
@@ -273,7 +273,7 @@
 	EphyEmbed *embed;
 	GtkAction *action1;
 	GtkAction *action2; /* You can tell I didn't want to think... */
-	EphyEmbedDocumentType content_type;
+	EphyEmbedDocumentType content_type = -1;
 	GValue sensitive = { 0, };
 
 	g_return_if_fail (EPHY_IS_WINDOW (window));
@@ -301,10 +301,8 @@
 
 	content_type = ephy_embed_get_document_type (embed);
 
-	if (content_type &&
-            ((content_type == EPHY_EMBED_DOCUMENT_HTML)
+	if ((content_type == EPHY_EMBED_DOCUMENT_HTML)
              || (content_type == EPHY_EMBED_DOCUMENT_XML))
-        )
 	{
 		g_value_set_boolean (&sensitive, TRUE);
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]