epiphany r8700 - trunk/src



Author: diegoe
Date: Mon Jan 19 13:07:35 2009
New Revision: 8700
URL: http://svn.gnome.org/viewvc/epiphany?rev=8700&view=rev

Log:
Remove useless LocationEntryAction struct

Modified:
   trunk/src/ephy-location-action.c

Modified: trunk/src/ephy-location-action.c
==============================================================================
--- trunk/src/ephy-location-action.c	(original)
+++ trunk/src/ephy-location-action.c	Mon Jan 19 13:07:35 2009
@@ -85,18 +85,6 @@
 
 G_DEFINE_TYPE (EphyLocationAction, ephy_location_action, EPHY_TYPE_LINK_ACTION)
 
-typedef struct
-{
-	EphyLocationEntry *entry;
-	EphyLocationAction *action;
-} LocationEntryAction;
-
-static void
-destroy_match_func (gpointer data)
-{
-	g_slice_free (LocationEntryAction, data);
-}
-
 static gboolean
 match_func (GtkEntryCompletion *completion,
 		const char *key,
@@ -109,12 +97,9 @@
 	char *extra = NULL;
 
 	gboolean ret = FALSE;
-	EphyLocationActionPrivate *priv;
 	GtkTreeModel *model;
 	GRegex *regex;
 
-	priv = EPHY_LOCATION_ACTION (((LocationEntryAction *) data)->action)->priv;
-
 	model = gtk_entry_completion_get_model (completion);
 
 	gtk_tree_model_get (model, iter,
@@ -127,7 +112,7 @@
 	if (!key)
 		return FALSE;
 	
-	regex = ephy_location_entry_get_regex (((LocationEntryAction *) data)->entry);
+	regex = ephy_location_entry_get_regex (data);
 	
 	ret = (g_regex_match (regex, item, G_REGEX_MATCH_NOTEMPTY, NULL)
 		|| g_regex_match (regex, url, G_REGEX_MATCH_NOTEMPTY, NULL)
@@ -434,7 +419,6 @@
 		EphyLocationEntry *lentry = EPHY_LOCATION_ENTRY (proxy);
 		EphyCompletionModel *model;
 		GtkWidget *entry;
-		LocationEntryAction *lea;
 
 		model = ephy_completion_model_new ();
 		ephy_location_entry_set_completion (EPHY_LOCATION_ENTRY (proxy),
@@ -447,14 +431,10 @@
 						    EPHY_COMPLETION_EXTRA_COL,
 						    EPHY_COMPLETION_FAVICON_COL);
 		
-		lea = g_slice_new (LocationEntryAction);
-		lea->entry = EPHY_LOCATION_ENTRY (proxy);
-		lea->action = EPHY_LOCATION_ACTION (action);
-		
 		ephy_location_entry_set_match_func (EPHY_LOCATION_ENTRY (proxy), 
 							match_func, 
-							lea,
-							destroy_match_func);
+							proxy,
+							NULL);
 
 		add_completion_actions (action, proxy);
 



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