Browse Source

get_other_type works; sort order box works; rescan works; filter
is enabled; virtual fs setup dialog box is up; save setup; mkdir

link command is hossed. It is more than hossed for some stoopid
reason, the thing is selecting the first file in the panel
just after I talked to it. No matter how argumentative I get
with the code. Have to fix next.

Commit the bits I forgot to commit yesterday.
-miguel.

Miguel de Icaza 27 years ago
parent
commit
d934dc4afe
10 changed files with 176 additions and 36 deletions
  1. 16 11
      gnome/ChangeLog
  2. 11 6
      gnome/glayout.c
  3. 2 1
      gnome/gscreen.c
  4. 104 0
      gnome/layout
  5. 11 0
      src/ChangeLog
  6. 24 14
      src/cmd.c
  7. 1 0
      src/cmd.h
  8. 5 2
      src/dlg.c
  9. 1 1
      src/main.c
  10. 1 1
      src/myslang.h

+ 16 - 11
gnome/ChangeLog

@@ -1,3 +1,19 @@
+Tue Mar 10 23:46:29 1998  Miguel de Icaza  <miguel@nuclecu.unam.mx>
+
+	* glayout.c 
+
+	* gscreen.c (x_adjust_top_file): We no longer adjust the top
+	displayed filename.
+	
+	(panel_build_selected_file_list): Fix for the transfered data.
+	
+	(panel_drop_data_available): Now drop support uses the new
+	coords.x and coords.y fields from the DropDataAvailableEvent to
+	find out which directory receives the drop.
+
+	* glayout.c: added: configure_box, configure_vfs
+	(get_other_type): Return the correct value.
+	
 1998-03-10  Federico Mena Quintero  <federico@nuclecu.unam.mx>
 
 	* gscreen.c (panel_file_list_size_allocate_hook): Now we
@@ -18,17 +34,6 @@
 
 	* gkey.c (find_select_closure_callback): Fix = -> == typo.
 
-Tue Mar 10 14:01:47 1998  Miguel de Icaza  <miguel@nuclecu.unam.mx>
-
-	* gscreen.c (x_adjust_top_file): We no longer adjust the top
-	displayed filename.
-	
-	(panel_build_selected_file_list): Fix for the transfered data.
-	
-	(panel_drop_data_available): Now drop support uses the new
-	coords.x and coords.y fields from the DropDataAvailableEvent to
-	find out which directory receives the drop.
-
 Tue Mar 10 00:10:32 1998  Miguel de Icaza  <miguel@nuclecu.unam.mx>
 
 	* gscreen.c (panel_drop_data_available): Now drop support uses the

+ 11 - 6
gnome/glayout.c

@@ -1,3 +1,4 @@
+#include <config.h>
 #include "x.h"
 #include <stdio.h>
 #include <sys/stat.h>
@@ -6,6 +7,7 @@
 #include "gscreen.h"
 #include "main.h"
 #include "cmd.h"
+#include "boxes.h"
 
 #define UNDEFINED_INDEX -1
 
@@ -123,8 +125,7 @@ get_current_type (void)
 int
 get_other_type (void)
 {
-    /* FIXME: This is returning CURRENT panel */
-    return view_nothing;
+	return other_panel_ptr ? view_listing : view_nothing;
 }
 
 int
@@ -165,7 +166,7 @@ gnome_listing_cmd (GtkWidget *widget, WPanel *panel)
 	int   view_type, use_msformat;
 	char  *user, *status;
 	
-	view_type = display_box (panel, &user, &status, &use_msformat, index);
+	view_type = display_box (panel, &user, &status, &use_msformat, get_current_index ());
 	
 	if (view_type == -1)
 		return;
@@ -179,15 +180,19 @@ GnomeUIInfo gnome_panel_filemenu [] = {
 	{ GNOME_APP_UI_ITEM, "Network link...", NULL, netlink_cmd },
 	{ GNOME_APP_UI_ITEM, "FTP link...",     NULL, ftplink_cmd },
 	{ GNOME_APP_UI_ITEM, "Display mode...", NULL, gnome_listing_cmd },
-	{ GNOME_APP_UI_ITEM, "Sort order...",   NULL, NULL },
-	{ GNOME_APP_UI_ITEM, "Filter...",       NULL, NULL },
-	{ GNOME_APP_UI_ITEM, "Rescan",          NULL, NULL },
+	{ GNOME_APP_UI_ITEM, "Sort order...",   NULL, sort_cmd },
+	{ GNOME_APP_UI_ITEM, "Filter...",       NULL, filter_cmd },
+	{ GNOME_APP_UI_ITEM, "Rescan",          NULL, reread_cmd },
 	{ GNOME_APP_UI_ITEM, "Find",            NULL, find_cmd },
 	{ GNOME_APP_UI_ITEM, "Hotlist",         NULL, quick_chdir_cmd },
 #ifdef USE_VFS
 	{ GNOME_APP_UI_ITEM, "Active VFS",      NULL, reselect_vfs },
 #endif
+	{ GNOME_APP_UI_ITEM, "Confirmation",    NULL, confirm_box },
 	{ GNOME_APP_UI_ITEM, "Options",         NULL, configure_box },
+	{ GNOME_APP_UI_ITEM, "Virtual FS",      NULL, configure_vfs },
+	{ GNOME_APP_UI_ITEM, "Save setup",      NULL, save_setup_cmd },
+	{ GNOME_APP_UI_ITEM, "Mkdir",           NULL, mkdir_cmd },
 	{ GNOME_APP_UI_ENDOFINFO, 0, 0 }
 };
 

+ 2 - 1
gnome/gscreen.c

@@ -331,6 +331,7 @@ static struct {
 	{ "Copy...",         (context_menu_callback) copy_cmd },
 	{ "Rename/move..",   (context_menu_callback) ren_cmd },
 	{ "Delete...",       (context_menu_callback) delete_cmd },
+	{ "Link...",         (context_menu_callback) link_cmd },
 	{ NULL, NULL },
 };
 	
@@ -448,6 +449,7 @@ internal_select_item (GtkWidget *file_list, WPanel *panel, int row)
 {
 	unselect_item (panel);
 	panel->selected = row;
+
 	gtk_signal_handler_block_by_data (GTK_OBJECT (file_list), panel);
 	printf ("Selecttionando\n");
 	select_item (panel);
@@ -786,7 +788,6 @@ panel_create_file_list (WPanel *panel)
 	gtk_signal_connect_after (GTK_OBJECT (file_list), "size_allocate",
 				  GTK_SIGNAL_FUNC (panel_file_list_size_allocate_hook),
 				  panel);
-
 	gtk_signal_connect (GTK_OBJECT (file_list), "realize",
 			    GTK_SIGNAL_FUNC (panel_realized),
 			    panel);

+ 104 - 0
gnome/layout

@@ -487,3 +487,107 @@ flags=
 [mfind-Widget-button-chdir]
 geometry=0,4,1,1
 flags=
+
+[quick_confirm-Widget-c]
+geometry=3,2,1,1
+flags=ew
+
+[quick_confirm-Widget-o]
+geometry=3,1,1,1
+flags=ew
+
+[quick_confirm-Widget-x]
+geometry=1,3,1,1
+flags=w
+
+[quick_confirm-Widget-de]
+geometry=1,1,1,1
+flags=w
+
+[quick_confirm-Widget-ov]
+geometry=1,2,1,1
+flags=w
+
+[quick_confirm-Widget-e]
+geometry=1,4,1,1
+flags=w
+
+[quick_vfs-Widget-label-vfs]
+geometry=1,1,1,1
+flags=w
+
+[quick_vfs-Widget-input-timo-vfs]
+geometry=2,1,1,1
+flags=
+
+[quick_vfs-Widget-label-pass]
+geometry=1,4,1,1
+flags=
+
+[quick_vfs-Widget-button-ok]
+geometry=5,1,1,1
+flags=ew
+
+[quick_vfs-Widget-input-limit]
+geometry=2,3,1,1
+flags=s
+
+[quick_vfs-Widget-input-ftp-proxy]
+geometry=2,6,1,1
+flags=
+
+[quick_vfs-Widget-label-tar]
+geometry=1,2,1,1
+flags=w
+
+[quick_vfs-Widget-label-cache]
+geometry=1,5,1,1
+flags=w
+
+[quick_vfs-Widget-input-timeout]
+geometry=2,5,1,1
+flags=
+
+[quick_vfs-Widget-check-ftp-proxy]
+geometry=1,6,1,1
+flags=
+
+[quick_vfs-Widget-input-passwd]
+geometry=2,4,1,1
+flags=
+
+[quick_vfs-Widget-label-sec]
+geometry=3,5,1,1
+flags=
+
+[quick_vfs-Widget-button-cancel]
+geometry=5,2,1,1
+flags=
+
+[quick_vfs-Widget-label-sec2]
+geometry=3,1,1,1
+flags=
+
+[quick_vfs-Widget-radio]
+geometry=1,3,1,1
+flags=e
+
+[sort-Widget-case-check]
+geometry=3,2,1,1
+flags=w
+
+[sort-Widget-ok-button]
+geometry=4,1,1,1
+flags=ew
+
+[sort-Widget-reverse-check]
+geometry=3,1,1,1
+flags=w
+
+[sort-Widget-cancel-button]
+geometry=4,2,1,1
+flags=
+
+[sort-Widget-radio-1]
+geometry=1,1,1,6
+flags=n

+ 11 - 0
src/ChangeLog

@@ -1,3 +1,14 @@
+Tue Mar 10 20:41:45 1998  Miguel de Icaza  <miguel@nuclecu.unam.mx>
+
+	* cmd.c (unselect_cmd_panel, select_cmd_panel): To avoid races on
+	the X11 version, these routines now take a panel argument at
+	invocation time. 
+
+	* widget.c (radio_callback): Call x_radio_focus for FOCUS/UNFOCUS
+	events. 
+	(button_callback): Fallback to default_msg on WIDGET_FOCUS
+	messages. 
+
 1998-03-10  Federico Mena Quintero  <federico@nuclecu.unam.mx>
 
 	* xslint.c (getch): Added missing "return".

+ 24 - 14
src/cmd.c

@@ -475,7 +475,7 @@ void reverse_selection_cmd (void)
     paint_panel (cpanel);
 }
 
-void select_cmd (void)
+void select_cmd_panel (WPanel *panel)
 {
     char *reg_exp, *reg_exp_t;
     int i;
@@ -498,31 +498,36 @@ void select_cmd (void)
         reg_exp_t [strlen(reg_exp_t) - 1] = 0;
     }
 
-    for (i = 0; i < cpanel->count; i++){
-        if (!strcmp( cpanel->dir.list [i].fname, ".."))
+    for (i = 0; i < panel->count; i++){
+        if (!strcmp (panel->dir.list [i].fname, ".."))
             continue;
-	if (S_ISDIR (cpanel->dir.list [i].buf.st_mode)){
+	if (S_ISDIR (panel->dir.list [i].buf.st_mode)){
 	    if (!dirflag)
                 continue;
         } else {
             if (dirflag)
                 continue;
 	}
-	c = regexp_match (reg_exp_t, cpanel->dir.list [i].fname, match_file);
+	c = regexp_match (reg_exp_t, panel->dir.list [i].fname, match_file);
 	if (c == -1){
 	    message (1, " Error ", "  Malformed regular expression  ");
 	    free (reg_exp);
 	    return;
 	}
 	if (c){
-	    do_file_mark (cpanel, i, 1);
+	    do_file_mark (panel, i, 1);
 	}
     }
-    paint_panel (cpanel);
+    paint_panel (panel);
     free (reg_exp);
 }
 
-void unselect_cmd (void)
+void select_cmd (void)
+{
+	select_cmd_panel (cpanel);
+}
+
+void unselect_cmd_panel (WPanel *panel)
 {
     char *reg_exp, *reg_exp_t;
     int i;
@@ -544,30 +549,35 @@ void unselect_cmd (void)
         dirflag = 1;
         reg_exp_t [strlen(reg_exp_t) - 1] = 0;
     }
-    for (i = 0; i < cpanel->count; i++){
-        if (!strcmp( cpanel->dir.list [i].fname, "..")) 
+    for (i = 0; i < panel->count; i++){
+        if (!strcmp (panel->dir.list [i].fname, "..")) 
             continue;
-	if (S_ISDIR (cpanel->dir.list [i].buf.st_mode)){
+	if (S_ISDIR (panel->dir.list [i].buf.st_mode)){
 	    if (!dirflag)
 	        continue;
         } else {
             if (dirflag)
                 continue;
         }
-	c = regexp_match (reg_exp_t, cpanel->dir.list [i].fname, match_file);
+	c = regexp_match (reg_exp_t, panel->dir.list [i].fname, match_file);
 	if (c == -1){
 	    message (1, " Error ", "  Malformed regular expression  ");
 	    free (reg_exp);
 	    return;
 	}
 	if (c){
-	    do_file_mark (cpanel, i, 0);
+	    do_file_mark (panel, i, 0);
 	}
     }
-    paint_panel (cpanel);
+    paint_panel (panel);
     free (reg_exp);
 }
 
+void unselect_cmd (void)
+{
+	unselect_cmd_panel (cpanel);
+}
+
 /* Check if the file exists */
 /* If not copy the default */
 static int check_for_default(char *default_file, char *file)

+ 1 - 0
src/cmd.h

@@ -57,6 +57,7 @@ void source_routing (void);
 void info_cmd (void);
 void tree_cmd (void);
 void listing_cmd (void);
+void sort_cmd (void);
 void switch_to_listing (int panel_index);
 void quick_cmd_no_menu (void);
 void info_cmd_no_menu (void);

+ 5 - 2
src/dlg.c

@@ -631,8 +631,11 @@ void dlg_key_event (Dlg_head *h, int d_key)
     int handled;
     
     /* TAB used to cycle */
-    if (!h->raw && d_key == '\t')
-	dlg_one_down (h);
+    if (!h->raw && (d_key == '\t' || d_key == KEY_BACKTAB))
+	if (d_key == '\t')
+	    dlg_one_down (h);
+        else
+	    dlg_one_up (h);
     else {
 	
 	/* first can dlg_callback handle the key */

+ 1 - 1
src/main.c

@@ -1068,7 +1068,7 @@ set_sort_to (WPanel *p, sortfn *sort_order)
     do_re_sort (p);
 }
 
-static void
+void
 sort_cmd (void)
 {
     WPanel  *p;

+ 1 - 1
src/myslang.h

@@ -11,7 +11,7 @@ enum {
     KEY_BACKSPACE = 400,
     KEY_END, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT,
     KEY_HOME, KEY_A1, KEY_C1, KEY_NPAGE, KEY_PPAGE, KEY_IC,
-    KEY_ENTER, KEY_DC, KEY_SCANCEL
+    KEY_ENTER, KEY_DC, KEY_SCANCEL, KEY_BACKTAB
 };
 
 #define KEY_F(x) 1000+x

Some files were not shown because too many files changed in this diff