1999-02-03 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdnd.c (gdnd_validate_action): Show the correct feedback when dragging URLs.
Этот коммит содержится в:
родитель
f6a9eb9d1d
Коммит
b698ebfe03
@ -1,3 +1,8 @@
|
|||||||
|
1999-02-03 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
|
* gdnd.c (gdnd_validate_action): Show the correct feedback when
|
||||||
|
dragging URLs.
|
||||||
|
|
||||||
1999-02-03 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
1999-02-03 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||||
|
|
||||||
* gdesktop.c (desktop_icon_info_open): Use gmc_open_filename
|
* gdesktop.c (desktop_icon_info_open): Use gmc_open_filename
|
||||||
|
26
gnome/gdnd.c
26
gnome/gdnd.c
@ -497,12 +497,14 @@ gdnd_validate_action (GdkDragContext *context,
|
|||||||
&& (!dest_fe || dest_selected))
|
&& (!dest_fe || dest_selected))
|
||||||
return GDK_ACTION_MOVE;
|
return GDK_ACTION_MOVE;
|
||||||
|
|
||||||
if (gdnd_drag_context_has_target (context, TARGET_URI_LIST)) {
|
/* See what kind of file the destination is, if any */
|
||||||
if (dest_fe) {
|
|
||||||
on_directory = S_ISDIR (dest_fe->buf.st_mode) || dest_fe->f.link_to_dir;
|
|
||||||
on_exe = is_exe (dest_fe->buf.st_mode) && if_link_is_exe (dest_fe);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (dest_fe) {
|
||||||
|
on_directory = S_ISDIR (dest_fe->buf.st_mode) || dest_fe->f.link_to_dir;
|
||||||
|
on_exe = is_exe (dest_fe->buf.st_mode) && if_link_is_exe (dest_fe);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gdnd_drag_context_has_target (context, TARGET_URI_LIST)) {
|
||||||
if (dest_fe) {
|
if (dest_fe) {
|
||||||
if (same_source && dest_selected)
|
if (same_source && dest_selected)
|
||||||
return 0;
|
return 0;
|
||||||
@ -538,11 +540,17 @@ gdnd_validate_action (GdkDragContext *context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (gdnd_drag_context_has_target (context, TARGET_URL)) {
|
if (gdnd_drag_context_has_target (context, TARGET_URL)) {
|
||||||
/* FIXME: right now we only allow links. We should see if we
|
/* FIXME: right now we only allow linking to directories. We
|
||||||
* can move or copy stuff instead (for ftp instead of http
|
* should see if we can move or copy stuff instead (for ftp
|
||||||
* sites, for example).
|
* instead of http sites, for example).
|
||||||
*/
|
*/
|
||||||
if (context->actions & GDK_ACTION_LINK)
|
if (dest_fe) {
|
||||||
|
if (on_directory) {
|
||||||
|
if (context->actions & GDK_ACTION_LINK)
|
||||||
|
return GDK_ACTION_LINK;
|
||||||
|
} else if (context->actions & GDK_ACTION_COPY)
|
||||||
|
return GDK_ACTION_COPY;
|
||||||
|
} else if (context->actions & GDK_ACTION_LINK)
|
||||||
return GDK_ACTION_LINK;
|
return GDK_ACTION_LINK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,9 +78,6 @@ GtkWidget *drag_multiple = NULL;
|
|||||||
GtkWidget *drag_multiple_ok = NULL;
|
GtkWidget *drag_multiple_ok = NULL;
|
||||||
|
|
||||||
|
|
||||||
static void panel_file_list_configure_contents (GtkWidget *sw, WPanel *panel, int main_width, int height);
|
|
||||||
|
|
||||||
|
|
||||||
#define CLIST_FROM_SW(panel_list) GTK_CLIST (GTK_BIN (panel_list)->child)
|
#define CLIST_FROM_SW(panel_list) GTK_CLIST (GTK_BIN (panel_list)->child)
|
||||||
|
|
||||||
|
|
||||||
@ -485,7 +482,6 @@ panel_file_list_select_row (GtkWidget *file_list, int row, int column, GdkEvent
|
|||||||
display_mini_info (panel);
|
display_mini_info (panel);
|
||||||
execute_hooks (select_file_hook);
|
execute_hooks (select_file_hook);
|
||||||
|
|
||||||
|
|
||||||
if (!event)
|
if (!event)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -496,7 +492,8 @@ panel_file_list_select_row (GtkWidget *file_list, int row, int column, GdkEvent
|
|||||||
|
|
||||||
if (S_ISDIR (panel->dir.list [row].buf.st_mode) ||
|
if (S_ISDIR (panel->dir.list [row].buf.st_mode) ||
|
||||||
panel->dir.list [row].f.link_to_dir){
|
panel->dir.list [row].f.link_to_dir){
|
||||||
fullname = concat_dir_and_file (panel->cwd, panel->dir.list [row].fname);
|
fullname = concat_dir_and_file (panel->cwd,
|
||||||
|
panel->dir.list [row].fname);
|
||||||
new_panel_at (fullname);
|
new_panel_at (fullname);
|
||||||
g_free (fullname);
|
g_free (fullname);
|
||||||
}
|
}
|
||||||
@ -1366,7 +1363,8 @@ panel_icon_list_select_icon (GtkWidget *widget, int index, GdkEvent *event, WPan
|
|||||||
switch (event->type){
|
switch (event->type){
|
||||||
case GDK_BUTTON_PRESS:
|
case GDK_BUTTON_PRESS:
|
||||||
if (event->button.button == 3)
|
if (event->button.button == 3)
|
||||||
gpopup_do_popup ((GdkEventButton *) event, panel, NULL, index, panel->dir.list[index].fname);
|
gpopup_do_popup ((GdkEventButton *) event, panel, NULL, index,
|
||||||
|
panel->dir.list[index].fname);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GDK_BUTTON_RELEASE:
|
case GDK_BUTTON_RELEASE:
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user