mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
1999-01-12 Jonathan Blandford <jrb@redhat.com>
* gcmd.c (gnome_open_files): now you can open multiple files. * glayout.c: layout changed some. moved run command. commented out ftplink/mkdir command for now. gonna do mkdir next. Why is the ftplink command needed?
This commit is contained in:
parent
3b6aa532a3
commit
7b8969cbbc
@ -1,3 +1,10 @@
|
||||
1999-01-12 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gcmd.c (gnome_open_files): now you can open multiple files.
|
||||
* glayout.c: layout changed some. moved run command.
|
||||
commented out ftplink/mkdir command for now. gonna do mkdir
|
||||
next. Why is the ftplink command needed?
|
||||
|
||||
1999-01-12 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||
|
||||
* glayout.c (run_cmd): Add run command. Add back FTP link
|
||||
|
31
gnome/gcmd.c
31
gnome/gcmd.c
@ -615,3 +615,34 @@ gnome_filter_cmd (GtkWidget *widget, WPanel *panel)
|
||||
}
|
||||
gtk_widget_destroy (filter_dlg);
|
||||
}
|
||||
void
|
||||
gnome_open_files (GtkWidget *widget, WPanel *panel)
|
||||
{
|
||||
GList *later = NULL;
|
||||
GList *now;
|
||||
gint i;
|
||||
|
||||
/* FIXME: this is the easy way to do things. We want the
|
||||
* hard way sometime. */
|
||||
for (i = 0; i < panel->count; i++) {
|
||||
if (panel->dir.list [i].f.marked)
|
||||
if (!do_enter_on_file_entry ((panel->dir.list) + i))
|
||||
later = g_list_prepend (later, panel->dir.list + i);
|
||||
}
|
||||
#if 0
|
||||
/* This is sorta ugly. Should we just skip these? There should be a better way. */
|
||||
for (now = later; now; now = now->next) {
|
||||
gchar *command;
|
||||
command = input_expand_dialog (_(" Open with..."),
|
||||
_("Enter extra arguments:"), (WPanel *) now->data);
|
||||
if (!command)
|
||||
/* we break out. */
|
||||
break;
|
||||
execute (command);
|
||||
free (command);
|
||||
}
|
||||
#endif
|
||||
g_list_free (later);
|
||||
|
||||
}
|
||||
|
||||
|
@ -16,5 +16,6 @@ void gnome_sort_cmd (GtkWidget *widget, WPanel *panel);
|
||||
void gnome_select_all_cmd (GtkWidget *widget, WPanel *panel);
|
||||
void gnome_filter_cmd (GtkWidget *widget, WPanel *panel);
|
||||
void gnome_external_panelize (GtkWidget *widget, WPanel *panel);
|
||||
void gnome_open_files (GtkWidget *widget, WPanel *panel);
|
||||
|
||||
#endif /* __GCMD_H */
|
||||
|
@ -278,7 +278,7 @@ GtkCheckMenuItem *gnome_toggle_snap (void);
|
||||
|
||||
GnomeUIInfo gnome_panel_file_menu [] = {
|
||||
GNOMEUIINFO_MENU_NEW_ITEM(N_("_New window"), N_("Opens a new window"), gnome_open_panel, NULL),
|
||||
GNOMEUIINFO_MENU_NEW_ITEM(N_("_New folder"),N_("Creates a folder"), mkdir_panel_cmd, NULL),
|
||||
|
||||
/* We want to make a new menu entry here... */
|
||||
/* For example: */
|
||||
/* New-> */
|
||||
@ -289,14 +289,12 @@ GnomeUIInfo gnome_panel_file_menu [] = {
|
||||
/* etc... */
|
||||
|
||||
{ GNOME_APP_UI_SEPARATOR },
|
||||
{ GNOME_APP_UI_ITEM, N_("_Run"), N_("Runs a command"), run_cmd, NULL,
|
||||
NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_OPEN, GDK_F2, 0 },
|
||||
{ GNOME_APP_UI_ITEM, N_("_Open"), N_("Opens the selected files"), NULL },
|
||||
{ GNOME_APP_UI_ITEM, N_("Open _FTP site"), N_("Opens an FTP site"), ftplink_cmd },
|
||||
{ GNOME_APP_UI_ITEM, N_("_Open"), N_("Opens the selected files"), gnome_open_files },
|
||||
/* { GNOME_APP_UI_ITEM, N_("Open _FTP site"), N_("Opens an FTP site"), ftplink_cmd },*/
|
||||
{ GNOME_APP_UI_ITEM, N_("_Copy..."), N_("Copy files"), copy_cmd, NULL},
|
||||
{ GNOME_APP_UI_ITEM, N_("_Delete..."), N_("Delete files from disk"), delete_cmd },
|
||||
{ GNOME_APP_UI_ITEM, N_("_Move..."), N_("Rename or move files"), ren_cmd },
|
||||
{ GNOME_APP_UI_ITEM, N_("_Make directory..."), N_("Creates a new directory"), mkdir_cmd },
|
||||
/* { GNOME_APP_UI_ITEM, N_("_Make directory..."), N_("Creates a new directory"), mkdir_cmd },*/
|
||||
{ GNOME_APP_UI_SEPARATOR },
|
||||
{ GNOME_APP_UI_ITEM, N_("C_lose"), N_("Close this panel"), gnome_close_panel, NULL,
|
||||
NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_CLOSE,
|
||||
@ -341,7 +339,10 @@ GnomeUIInfo gnome_panel_commands_menu [] = {
|
||||
NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_JUMP_TO},
|
||||
|
||||
{ GNOME_APP_UI_ITEM, N_("_Compare panels..."), N_("Compare two panel contents"), gnome_compare_panels },
|
||||
{ GNOME_APP_UI_ITEM, N_("_Run Command..."), N_("Run a command and put the results in a panel"), gnome_external_panelize },
|
||||
{ GNOME_APP_UI_ITEM, N_("_Run Command..."), N_("Runs a command"), run_cmd, NULL,
|
||||
NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_OPEN, GDK_F2, 0 },
|
||||
{ GNOME_APP_UI_ITEM, N_("_Run Command in panel..."),N_("Run a command and put the results in a panel"), gnome_external_panelize },
|
||||
|
||||
#ifdef USE_VFS
|
||||
{ GNOME_APP_UI_ITEM, N_("_Active VFS list..."),N_("List of active virtual file systems"), reselect_vfs },
|
||||
#endif
|
||||
|
@ -17,14 +17,36 @@
|
||||
#include "../vfs/vfs.h"
|
||||
#include "gprefs.h"
|
||||
|
||||
/* Orphan confirmation options */
|
||||
/* Auto save setup */
|
||||
/* use internal edit */ /* maybe have a mime-type capplet for these */
|
||||
/* use internal view */
|
||||
/* complete: show all */
|
||||
/* Animation??? */
|
||||
/* advanced chown */
|
||||
/* cd follows links */
|
||||
/* safe delete */
|
||||
static GtkWidget *
|
||||
file_display_pane (WPanel *panel)
|
||||
{
|
||||
return gtk_frame_new (NULL);
|
||||
/* This should configure the file options. */
|
||||
/* Show Backup files */
|
||||
/* show Hidden files */
|
||||
/* mix files and directories */
|
||||
/* shell patterns */
|
||||
GtkWidget *vbox;
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, GNOME_PAD_SMALL);
|
||||
return vbox;
|
||||
}
|
||||
static GtkWidget *
|
||||
confirmation_pane (WPanel *panel)
|
||||
{
|
||||
/* Confirm... */
|
||||
/* delete file*/
|
||||
/* overwrite */
|
||||
/* execute */
|
||||
/* Verbose Operations */
|
||||
return gtk_frame_new (NULL);
|
||||
}
|
||||
static GtkWidget *
|
||||
@ -35,11 +57,17 @@ custom_view_pane (WPanel *panel)
|
||||
static GtkWidget *
|
||||
vfs_pane (WPanel *panel)
|
||||
{
|
||||
/* VFS timeout */
|
||||
/* Anon ftp password */
|
||||
/* Always use ftp proxy: */
|
||||
return gtk_frame_new (NULL);
|
||||
}
|
||||
static GtkWidget *
|
||||
caching_and_optimizations_pane (WPanel *panel)
|
||||
{
|
||||
/* Fast dir reload */
|
||||
/* Compute totals */
|
||||
/* ftpfs directory cache timeout */
|
||||
return gtk_frame_new (NULL);
|
||||
}
|
||||
void
|
||||
@ -48,6 +76,7 @@ gnome_configure_box (GtkWidget *widget, WPanel *panel)
|
||||
GtkWidget *prefs_dlg;
|
||||
|
||||
prefs_dlg = gnome_property_box_new ();
|
||||
/* do we want a generic page? */
|
||||
gnome_property_box_append_page (GNOME_PROPERTY_BOX (prefs_dlg),
|
||||
file_display_pane (panel),
|
||||
gtk_label_new (_("File Display")));
|
||||
|
@ -460,7 +460,19 @@ internal_select_item (GtkWidget *file_list, WPanel *panel, int row)
|
||||
|
||||
select_item (panel);
|
||||
}
|
||||
|
||||
static int
|
||||
panel_file_list_press_row (GtkWidget *file_list, GdkEvent *event, WPanel *panel)
|
||||
{
|
||||
/* FIXME: This is still very broken. */
|
||||
if (event->type == GDK_BUTTON_PRESS && event->button.button == 3) {
|
||||
gint row, column;
|
||||
gtk_clist_get_selection_info (GTK_CLIST (file_list),
|
||||
event->button.x, event->button.y,
|
||||
&row, &column);
|
||||
gpopup_do_popup ((GdkEventButton *) event, panel, NULL, row, panel->dir.list[row].fname);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
static void
|
||||
panel_file_list_select_row (GtkWidget *file_list, int row, int column, GdkEvent *event, WPanel *panel)
|
||||
{
|
||||
@ -495,10 +507,6 @@ panel_file_list_select_row (GtkWidget *file_list, int row, int column, GdkEvent
|
||||
free (fullname);
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
gpopup_do_popup ((GdkEventButton *) event, panel, NULL, row, panel->dir.list[row].fname);
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
@ -1149,6 +1157,9 @@ panel_create_file_list (WPanel *panel)
|
||||
gtk_signal_connect (GTK_OBJECT (file_list), "select_row",
|
||||
GTK_SIGNAL_FUNC (panel_file_list_select_row),
|
||||
panel);
|
||||
gtk_signal_connect (GTK_OBJECT (file_list), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (panel_file_list_press_row),
|
||||
panel);
|
||||
gtk_clist_set_button_actions (GTK_CLIST (file_list), 1, GTK_BUTTON_SELECTS | GTK_BUTTON_DRAGS);
|
||||
gtk_clist_set_button_actions (GTK_CLIST (file_list), 2, GTK_BUTTON_SELECTS);
|
||||
|
||||
@ -2297,10 +2308,6 @@ x_create_panel (Dlg_head *h, widget_data parent, WPanel *panel)
|
||||
/*
|
||||
* Put the icon list and the file listing in a nice frame
|
||||
*/
|
||||
table_frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (table_frame), GTK_SHADOW_IN);
|
||||
gtk_widget_show (table_frame);
|
||||
gtk_container_add (GTK_CONTAINER (table_frame), panel->view_table);
|
||||
|
||||
/* Add both the icon view and the listing view */
|
||||
gtk_table_attach (GTK_TABLE (panel->view_table), panel->notebook, 0, 1, 0, 1,
|
||||
@ -2313,7 +2320,7 @@ x_create_panel (Dlg_head *h, widget_data parent, WPanel *panel)
|
||||
GTK_EXPAND | GTK_FILL | GTK_SHRINK,
|
||||
0, 0);
|
||||
|
||||
gtk_paned_add2 (GTK_PANED (panel->pane), table_frame);
|
||||
gtk_paned_add2 (GTK_PANED (panel->pane), panel->view_table);
|
||||
|
||||
#if 0
|
||||
gtk_table_attach (GTK_TABLE (panel->table), status_line, 0, 1, 0, 1,
|
||||
|
Loading…
Reference in New Issue
Block a user