diff src/view_file_list.c @ 656:a2d74c9843db

vflist_pop_menu(): drop FileData * parameter, use stored click_fd instead.
author zas_
date Tue, 13 May 2008 19:51:22 +0000
parents beacc4c68c53
children dc09f544d292
line wrap: on
line diff
--- a/src/view_file_list.c	Tue May 13 19:45:04 2008 +0000
+++ b/src/view_file_list.c	Tue May 13 19:51:22 2008 +0000
@@ -370,15 +370,15 @@
 }
 
 
-static GtkWidget *vflist_pop_menu(ViewFile *vf, FileData *fd)
+static GtkWidget *vflist_pop_menu(ViewFile *vf)
 {
 	GtkWidget *menu;
 	GtkWidget *item;
 	GtkWidget *submenu;
 	gint active;
 
-	vflist_color_set(vf, fd, TRUE);
-	active = (fd != NULL);
+	vflist_color_set(vf, VFLIST_INFO(vf, click_fd), TRUE);
+	active = (VFLIST_INFO(vf, click_fd) != NULL);
 
 	menu = popup_menu_short_lived();
 	g_signal_connect(G_OBJECT(menu), "destroy",
@@ -564,7 +564,7 @@
 		VFLIST_INFO(vf, click_fd) = NULL;
 		}
 
-	vf->popup = vflist_pop_menu(vf, VFLIST_INFO(vf, click_fd));
+	vf->popup = vflist_pop_menu(vf);
 	gtk_menu_popup(GTK_MENU(vf->popup), NULL, NULL, vflist_menu_position_cb, vf, 0, GDK_CURRENT_TIME);
 
 	return TRUE;
@@ -607,7 +607,7 @@
 
 	if (bevent->button == MOUSE_BUTTON_RIGHT)
 		{
-		vf->popup = vflist_pop_menu(vf, VFLIST_INFO(vf, click_fd));
+		vf->popup = vflist_pop_menu(vf);
 		gtk_menu_popup(GTK_MENU(vf->popup), NULL, NULL, NULL, NULL,
 				bevent->button, bevent->time);
 		return TRUE;