mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 12:56:51 +03:00
1998-12-02 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gscreen.c (panel_tree_drag_data_received): Perform drag and drop operations on the Tree.
This commit is contained in:
parent
301e7fbfc3
commit
414df0f7b7
@ -1,3 +1,8 @@
|
|||||||
|
1998-12-02 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||||
|
|
||||||
|
* gscreen.c (panel_tree_drag_data_received): Perform drag and drop
|
||||||
|
operations on the Tree.
|
||||||
|
|
||||||
1998-12-02 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
1998-12-02 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
* gdesktop.c (setup_desktop_dnd): New function to set up drops
|
* gdesktop.c (setup_desktop_dnd): New function to set up drops
|
||||||
|
@ -16,11 +16,21 @@ INSTALL = @INSTALL@
|
|||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
|
||||||
|
PIXMAPS = \
|
||||||
|
dev.xpm \
|
||||||
|
link.xpm \
|
||||||
|
directory.xpm \
|
||||||
|
listing-list.xpm \
|
||||||
|
listing-iconic.xpm \
|
||||||
|
dir-close.xpm \
|
||||||
|
dir-open.xpm
|
||||||
|
|
||||||
GNOMESRCS = \
|
GNOMESRCS = \
|
||||||
gblist.c \
|
gblist.c \
|
||||||
gcache.c \
|
gcache.c \
|
||||||
gcliplabel.c \
|
gcliplabel.c \
|
||||||
gcmd.c \
|
gcmd.c \
|
||||||
|
gcorba.c \
|
||||||
gdesktop-icon.c \
|
gdesktop-icon.c \
|
||||||
gdesktop.c \
|
gdesktop.c \
|
||||||
gdnd.c \
|
gdnd.c \
|
||||||
@ -79,8 +89,6 @@ ICONS = \
|
|||||||
# These objects from ../src do not depend on HAVE_X / HAVE_GNOME??
|
# These objects from ../src do not depend on HAVE_X / HAVE_GNOME??
|
||||||
#
|
#
|
||||||
LOBJS = mad.o
|
LOBJS = mad.o
|
||||||
# popt.o poptconfig.o \
|
|
||||||
# popthelp.o poptparse.o findme.o
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# These objects from ../src do depend on HAVE_GNOME
|
# These objects from ../src do depend on HAVE_GNOME
|
||||||
@ -93,7 +101,15 @@ OOBJS = dlg.o screen.o widget.o wtools.o info.o boxes.o \
|
|||||||
@XCURSES@ @REGEX_O@ complete.o command.o \
|
@XCURSES@ @REGEX_O@ complete.o command.o \
|
||||||
option.o cmd.o utilunix.o xslint.o filegui.o filenot.o
|
option.o cmd.o utilunix.o xslint.o filegui.o filenot.o
|
||||||
|
|
||||||
OBJS = $(LOBJS) $(OOBJS) \
|
CORBAOBJS = \
|
||||||
|
main-corba.o \
|
||||||
|
gcorba.o \
|
||||||
|
FileManager-impl.o \
|
||||||
|
FileManager-skels.o
|
||||||
|
|
||||||
|
OBJS = \
|
||||||
|
$(LOBJS) \
|
||||||
|
$(OOBJS) \
|
||||||
gblist.o \
|
gblist.o \
|
||||||
gcache.o \
|
gcache.o \
|
||||||
gcliplabel.o \
|
gcliplabel.o \
|
||||||
@ -123,32 +139,18 @@ OBJS = $(LOBJS) $(OOBJS) \
|
|||||||
NORMALOBJS = \
|
NORMALOBJS = \
|
||||||
main.o
|
main.o
|
||||||
|
|
||||||
CORBAOBJS = \
|
|
||||||
main-corba.o
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Distribution variables
|
|
||||||
#
|
|
||||||
|
|
||||||
PIXMAPS = \
|
|
||||||
dev.xpm \
|
|
||||||
link.xpm \
|
|
||||||
directory.xpm \
|
|
||||||
listing-list.xpm \
|
|
||||||
listing-iconic.xpm \
|
|
||||||
dir-close.xpm \
|
|
||||||
dir-open.xpm
|
|
||||||
|
|
||||||
CORBA_GENERATED = \
|
CORBA_GENERATED = \
|
||||||
FileManager.h \
|
FileManager.h \
|
||||||
FileManager-stubs.c \
|
FileManager-stubs.c \
|
||||||
FileManager-skels.c \
|
FileManager-skels.c \
|
||||||
FileManager-common.c
|
FileManager-common.c
|
||||||
|
|
||||||
CORBA_SOURCES = FileManager-impl.c
|
CORBA_SOURCES = \
|
||||||
|
gcorba.c \
|
||||||
|
FileManager-impl.c
|
||||||
|
|
||||||
$(CORBA_GENERATED): $(rootdir)/idl/FileManager.idl
|
$(CORBA_GENERATED): $(rootdir)/idl/FileManager.idl
|
||||||
|
orbit-idl `gnome-config --cflags idl` $(rootdir)/idl/FileManager.idl
|
||||||
|
|
||||||
FileManager-impl.c: FileManager.h
|
FileManager-impl.c: FileManager.h
|
||||||
|
|
||||||
|
@ -835,8 +835,22 @@ panel_tree_drag_data_received (GtkWidget *widget,
|
|||||||
WPanel *panel)
|
WPanel *panel)
|
||||||
{
|
{
|
||||||
GtkDTree *dtree = GTK_DTREE (widget);
|
GtkDTree *dtree = GTK_DTREE (widget);
|
||||||
|
GtkCTreeNode *node;
|
||||||
|
int row, col;
|
||||||
|
char *path;
|
||||||
|
|
||||||
printf ("Drop received on tree\n");
|
if (!gtk_clist_get_selection_info (GTK_CLIST (dtree), x, y, &row, &col))
|
||||||
|
return;
|
||||||
|
|
||||||
|
node = gtk_ctree_node_nth (GTK_CTREE (dtree), row);
|
||||||
|
if (!node)
|
||||||
|
return;
|
||||||
|
gtk_ctree_expand_recursive (GTK_CTREE (dtree), node);
|
||||||
|
path = gtk_dtree_get_row_path (dtree, node, 0);
|
||||||
|
|
||||||
|
gdnd_drop_on_directory (context, selection_data, path);
|
||||||
|
|
||||||
|
g_free (path);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef OLD_DND
|
#ifdef OLD_DND
|
||||||
@ -1753,7 +1767,7 @@ panel_tree_drag_motion (GtkWidget *widget, GdkDragContext *ctx, int x, int y, gu
|
|||||||
|
|
||||||
dtree->drag_motion_x = x;
|
dtree->drag_motion_x = x;
|
||||||
dtree->drag_motion_y = y;
|
dtree->drag_motion_y = y;
|
||||||
dtree->timer_id = gtk_timeout_add (500, tree_drag_open_directory, data);
|
dtree->timer_id = gtk_timeout_add (200, tree_drag_open_directory, data);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -36,18 +36,22 @@ enum {
|
|||||||
|
|
||||||
static guint gtk_dtree_signals [LAST_SIGNAL] = { 0 };
|
static guint gtk_dtree_signals [LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
static char *
|
char *
|
||||||
gtk_dtree_get_row_path (GtkCTree *ctree, GtkCTreeNode *row, gint column)
|
gtk_dtree_get_row_path (GtkDTree *dtree, GtkCTreeNode *row, gint column)
|
||||||
{
|
{
|
||||||
char *node_text, *path;
|
char *node_text, *path;
|
||||||
|
|
||||||
|
g_return_val_if_fail (dtree != NULL, NULL);
|
||||||
|
g_return_val_if_fail (GTK_IS_DTREE (dtree), NULL);
|
||||||
|
g_return_val_if_fail (row != NULL, NULL);
|
||||||
|
|
||||||
path = g_strdup ("");
|
path = g_strdup ("");
|
||||||
do {
|
do {
|
||||||
char *new_path;
|
char *new_path;
|
||||||
int val;
|
int val;
|
||||||
|
|
||||||
val = gtk_ctree_node_get_pixtext (
|
val = gtk_ctree_node_get_pixtext (
|
||||||
ctree, row, column,
|
GTK_CTREE (dtree), row, column,
|
||||||
&node_text, NULL, NULL, NULL);
|
&node_text, NULL, NULL, NULL);
|
||||||
|
|
||||||
if (!val)
|
if (!val)
|
||||||
|
@ -48,5 +48,8 @@ void gtk_dtree_remove_dir_by_name (GtkDTree *dtree,
|
|||||||
char *directory);
|
char *directory);
|
||||||
gboolean gtk_dtree_select_dir (GtkDTree *dtree,
|
gboolean gtk_dtree_select_dir (GtkDTree *dtree,
|
||||||
char *directory);
|
char *directory);
|
||||||
|
char *gtk_dtree_get_row_path (GtkDTree *ctree,
|
||||||
|
GtkCTreeNode *row,
|
||||||
|
gint column);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,6 +5,10 @@ module GNOME {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exception POSIX_ERROR {};
|
||||||
|
|
||||||
interface FileManager {
|
interface FileManager {
|
||||||
|
void chdir (in string dir)
|
||||||
|
raises (POSIX_ERROR);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -81,6 +81,7 @@
|
|||||||
|
|
||||||
#ifdef HAVE_CORBA
|
#ifdef HAVE_CORBA
|
||||||
# include <libgnorba/gnorba.h>
|
# include <libgnorba/gnorba.h>
|
||||||
|
# include "gcorba.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Program include files */
|
/* Program include files */
|
||||||
@ -2667,8 +2668,10 @@ handle_args (int argc, char *argv [])
|
|||||||
|
|
||||||
CORBA_exception_init (&ev);
|
CORBA_exception_init (&ev);
|
||||||
|
|
||||||
gnome_CORBA_init_with_popt_table (
|
orb = gnome_CORBA_init_with_popt_table (
|
||||||
"gmc", VERSION, &argc, argv, argument_table, 0, &ctx, 0, &ev);
|
"gmc", VERSION, &argc, argv, argument_table, 0, &ctx, GNORBA_INIT_SERVER_FUNC, &ev);
|
||||||
|
|
||||||
|
corba_register_server ();
|
||||||
#else
|
#else
|
||||||
gnome_init_with_popt_table ("gmc", VERSION, argc, argv, argument_table, 0, &ctx);
|
gnome_init_with_popt_table ("gmc", VERSION, argc, argv, argument_table, 0, &ctx);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user