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.
This commit is contained in:
Miguel de Icaza 1998-11-25 03:29:23 +00:00
parent 69952de7c5
commit 7b89c91ebb
3 changed files with 66 additions and 48 deletions

View File

@ -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> 1998-11-23 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdesktop.c (desktop_icon_info_place): Save the icon position * gdesktop.c (desktop_icon_info_place): Save the icon position

View File

@ -15,45 +15,47 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
GNOMESRCS = \ GNOMESRCS = \
gblist.c \
gcache.c \
gcliplabel.c \
gcmd.c \
gdesktop-icon.c \ gdesktop-icon.c \
gdnd.c \
gkey.c \
gmain.c \
gmetadata.c \
gscreen.c \
gwidget.c \
gmenu.c \
ginfo.c \
ghelp.c \
glayout.c \
gtools.c \
gdesktop.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 \
gtools.c \
gutil.c \ gutil.c \
gview.c \ gview.c \
gcmd.c \ gwidget.c
gprop.c \
gmc-chargrid.c \
gpageprop.c \
gcliplabel.c \
gcache.c \
gblist.c
GNOMEHDRS = \ GNOMEHDRS = \
gblist.h \
gcache.h \
gcliplabel.h \
gcmd.h \
gconf.h \
gdesktop-icon.h \ gdesktop-icon.h \
gdesktop.h \
gdnd.h \ gdnd.h \
gmain.h \ gmain.h \
gmetadata.h \
gscreen.h \
gwidget.h \
gdesktop.h \
gconf.h \
gcmd.h \
gprop.h \
gpageprop.h \
gmc-chargrid.h \ gmc-chargrid.h \
gcliplabel.h \ gmetadata.h \
gcache.h \ gpageprop.h \
gblist.h gpopup.h \
gprop.h \
gscreen.h \
gwidget.h
ICONS = \ ICONS = \
directory.xpm \ directory.xpm \
@ -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 option.o cmd.o utilunix.o xslint.o
OBJS = $(LOBJS) $(OOBJS) \ OBJS = $(LOBJS) $(OOBJS) \
gblist.o \
gcache.o \
gcliplabel.o \
gcmd.o \
gdesktop-icon.o \ gdesktop-icon.o \
gdesktop.o \
gdnd.o \ gdnd.o \
gkey.o \
gmain.o \
gmetadata.o \
gscreen.o \
gwidget.o \
gmenu.o \
ghelp.o \ ghelp.o \
ginfo.o \ ginfo.o \
gkey.o \
glayout.o \ glayout.o \
gtools.o \ gmain.o \
gdesktop.o \
gutil.o \
gcmd.o \
gmc-chargrid.o \ gmc-chargrid.o \
gview.o \ gmenu.o \
gprop.o \ gmetadata.o \
gpageprop.o \ gpageprop.o \
gcliplabel.o \ gpopup.o \
gcache.o \ gprop.o \
gblist.o gscreen.o \
gtools.o \
gutil.o \
gview.o \
gwidget.o
# #
# Distribution variables # Distribution variables

View File

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