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>
* gdesktop.c (desktop_icon_info_place): Save the icon position

View File

@ -15,49 +15,51 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
GNOMESRCS = \
gblist.c \
gcache.c \
gcliplabel.c \
gcmd.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 \
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 \
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 \
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
gmetadata.h \
gpageprop.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 \
gkey.o \
gmain.o \
gmetadata.o \
gscreen.o \
gwidget.o \
gmenu.o \
ghelp.o \
ginfo.o \
gkey.o \
glayout.o \
gtools.o \
gdesktop.o \
gutil.o \
gcmd.o \
gmain.o \
gmc-chargrid.o \
gview.o \
gprop.o \
gmenu.o \
gmetadata.o \
gpageprop.o \
gcliplabel.o \
gcache.o \
gblist.o
gpopup.o \
gprop.o \
gscreen.o \
gtools.o \
gutil.o \
gview.o \
gwidget.o
#
# Distribution variables

View File

@ -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;