Browse Source

1998-11-24 Federico Mena Quintero <federico@nuclecu.unam.mx>

	* gdesktop.c (desktop_icon_info_event): Run the popup menu for the
	icons in the desktop.

	* gpopup.[ch]: New files that take care of the popup menus for
	files in the desktop and in the panels.

	* Makefile.in: Added gpopup.[ch] to the list of sources.
Miguel de Icaza 26 years ago
parent
commit
7b89c91ebb
3 changed files with 58 additions and 40 deletions
  1. 10 0
      gnome/ChangeLog
  2. 41 38
      gnome/Makefile.in
  3. 7 2
      gnome/gdesktop.c

+ 10 - 0
gnome/ChangeLog

@@ -1,3 +1,13 @@
+1998-11-24  Federico Mena Quintero  <federico@nuclecu.unam.mx>
+
+	* gdesktop.c (desktop_icon_info_event): Run the popup menu for the
+	icons in the desktop.
+
+	* gpopup.[ch]: New files that take care of the popup menus for
+	files in the desktop and in the panels.
+
+	* Makefile.in: Added gpopup.[ch] to the list of sources.
+
 1998-11-23  Federico Mena Quintero  <federico@nuclecu.unam.mx>
 
 	* gdesktop.c (desktop_icon_info_place): Save the icon position

+ 41 - 38
gnome/Makefile.in

@@ -15,49 +15,51 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
 
 GNOMESRCS = 		\
+	gblist.c	\
+	gcache.c	\
+	gcliplabel.c	\
+	gcmd.c		\
 	gdesktop-icon.c	\
+	gdesktop.c 	\
 	gdnd.c		\
+	ghelp.c 	\
+	ginfo.c 	\
 	gkey.c 		\
+	glayout.c 	\
 	gmain.c 	\
+	gmc-chargrid.c	\
+	gmenu.c		\
 	gmetadata.c	\
+	gpageprop.c	\
+	gpopup.c	\
+	gprop.c		\
 	gscreen.c 	\
-	gwidget.c 	\
-	gmenu.c		\
-	ginfo.c 	\
-	ghelp.c 	\
-	glayout.c 	\
 	gtools.c 	\
-	gdesktop.c 	\
 	gutil.c		\
 	gview.c		\
-	gcmd.c		\
-	gprop.c		\
-	gmc-chargrid.c	\
-	gpageprop.c	\
-	gcliplabel.c	\
-	gcache.c	\
-	gblist.c
+	gwidget.c
 
 GNOMEHDRS = 		\
+	gblist.h	\
+	gcache.h	\
+	gcliplabel.h	\
+	gcmd.h		\
+	gconf.h		\
 	gdesktop-icon.h	\
+	gdesktop.h	\
 	gdnd.h		\
 	gmain.h 	\
+	gmc-chargrid.h	\
 	gmetadata.h	\
-	gscreen.h	\
-	gwidget.h 	\
-	gdesktop.h	\
-	gconf.h		\
-	gcmd.h		\
-	gprop.h		\
 	gpageprop.h	\
-	gmc-chargrid.h	\
-	gcliplabel.h	\
-	gcache.h	\
-	gblist.h
+	gpopup.h	\
+	gprop.h		\
+	gscreen.h	\
+	gwidget.h
 
-ICONS = 				\
+ICONS = 			\
 	directory.xpm		\
-	i-directory.png	\
+	i-directory.png		\
 	i-executable.png	\
 	i-symlink.png		\
 	i-device.png		\
@@ -84,28 +86,29 @@ OOBJS = main.o dlg.o screen.o widget.o wtools.o info.o boxes.o \
 	option.o cmd.o utilunix.o xslint.o
 
 OBJS = $(LOBJS) $(OOBJS) \
+	gblist.o	\
+	gcache.o	\
+	gcliplabel.o	\
+	gcmd.o		\
 	gdesktop-icon.o	\
+	gdesktop.o 	\
 	gdnd.o		\
+	ghelp.o 	\
+	ginfo.o 	\
 	gkey.o 		\
+	glayout.o 	\
 	gmain.o 	\
+	gmc-chargrid.o 	\
+	gmenu.o 	\
 	gmetadata.o	\
+	gpageprop.o	\
+	gpopup.o	\
+	gprop.o		\
 	gscreen.o 	\
-	gwidget.o 	\
-	gmenu.o 	\
-	ghelp.o 	\
-	ginfo.o 	\
-	glayout.o 	\
 	gtools.o 	\
-	gdesktop.o 	\
 	gutil.o 	\
-	gcmd.o		\
-	gmc-chargrid.o 	\
 	gview.o		\
-	gprop.o		\
-	gpageprop.o	\
-	gcliplabel.o	\
-	gcache.o	\
-	gblist.o
+	gwidget.o
 
 #
 # Distribution variables

+ 7 - 2
gnome/gdesktop.c

@@ -33,6 +33,7 @@
 #include "gdesktop.h"
 #include "gdesktop-icon.h"
 #include "gmetadata.h"
+#include "gpopup.h"
 #include "../vfs/vfs.h"
 
 
@@ -335,6 +336,7 @@ static gint
 desktop_icon_info_event (struct desktop_icon_info *dii, GdkEvent *event, int on_text)
 {
 	int retval;
+	char *filename;
 
 	retval = FALSE;
 
@@ -343,8 +345,11 @@ desktop_icon_info_event (struct desktop_icon_info *dii, GdkEvent *event, int on_
 		if ((event->button.button == 1) && !(on_text && dii->selected)) {
 			select_icon (dii, (GdkEventButton *) event);
 			retval = TRUE;
-		} else if (event->button.button == 3)
-			retval = TRUE; /* FIXME: display menu */
+		} else if (event->button.button == 3) {
+			filename = g_concat_dir_and_file (desktop_directory, dii->filename);
+			gpopup_do_popup (filename, FALSE, (GdkEventButton *) event);
+			retval = TRUE;
+		}
 
 		break;