- Simplified the update_panels routine to only care about the current
panel, the old way of using it was an historic relic. - This now works properly with the GNOME edition. - Finished/fixed the implementation of the desktop-remove-icon functionality. - Raster's new multi-ok window. For some reason this is not getting loaded. I am compiling gdb 4.17 now, as it is better for egcs output. Miguel.
Этот коммит содержится в:
родитель
e3dfc9d95a
Коммит
98ff71d81f
2
FAQ
2
FAQ
@ -113,7 +113,7 @@
|
||||
* i386-*-linux1.x, 2.x
|
||||
* alpha-linux-linux2
|
||||
* sparc-linux-linux2.x
|
||||
* sparc65-linux-linux2.1
|
||||
* sparc64-linux-linux2.1
|
||||
* mips-sgi-irix5.x, 6.x
|
||||
* mips-dec-ultrix4.3
|
||||
* rs6000-ibm-aix3.2.5
|
||||
|
@ -1,3 +1,10 @@
|
||||
1998-04-29 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||
|
||||
* gdesktop.c: Finish desktop_icon_remove implementation.
|
||||
|
||||
* glayout.c (update_panels): GNOME specific Implementation of the
|
||||
update_panels routine.
|
||||
|
||||
Tue Apr 28 06:52:24 1998 Norbert Warmuth <k3190@fh-sw.de>
|
||||
|
||||
* gcmd.c (gnome_open_terminal): Changed my_system(1,...) to
|
||||
|
@ -52,6 +52,7 @@ ICONS = \
|
||||
$(srcdir)/directory-ok.xpm \
|
||||
$(srcdir)/directory.xpm \
|
||||
$(srcdir)/multi.xpm \
|
||||
$(srcdir)/multi-ok.png \
|
||||
$(srcdir)/multi-ok.xpm
|
||||
|
||||
#
|
||||
|
@ -32,6 +32,8 @@
|
||||
#define PORT_HAS_UPDATE_MARKS 1
|
||||
#define PORT_HAS_RADIO_TOGGLE 1
|
||||
#define PORT_DOES_BACKGROUND_EXEC 1
|
||||
#define PORT_HAS_UPDATE_PANELS 1
|
||||
|
||||
#define mi_getch() fprintf (stderr, "mi_getch is not implemented in this port\n")
|
||||
#define frontend_run_dlg(x) gtkrundlg_event (x)
|
||||
|
||||
|
@ -789,6 +789,30 @@ desktop_release_desktop_icon_t (desktop_icon_t *di)
|
||||
free (di);
|
||||
}
|
||||
|
||||
static int
|
||||
remove_directory (char *path)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (confirm_delete){
|
||||
char *buffer;
|
||||
|
||||
if (know_not_what_am_i_doing)
|
||||
query_set_sel (1);
|
||||
buffer = copy_strings (_("Do you want to delete "), path, "?", NULL);
|
||||
i = query_dialog (_("Delete"), buffer,
|
||||
D_ERROR, 2, _("&Yes"), _("&No"));
|
||||
free (buffer);
|
||||
if (i != 0)
|
||||
return 0;
|
||||
}
|
||||
create_op_win (OP_DELETE, 0);
|
||||
erase_dir (path);
|
||||
destroy_op_win ();
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Removes an icon from the desktop and kills the ~/desktop file associated with it
|
||||
*/
|
||||
@ -797,7 +821,26 @@ desktop_icon_remove (desktop_icon_t *di)
|
||||
{
|
||||
desktop_icons = g_list_remove (desktop_icons, di);
|
||||
|
||||
mc_unlink (di->pathname);
|
||||
if (di->dentry == NULL){
|
||||
/* launch entry */
|
||||
mc_unlink (di->pathname);
|
||||
} else {
|
||||
/* a .destop file or a directory */
|
||||
/* Remove the .desktop */
|
||||
mc_unlink (di->dentry->location);
|
||||
|
||||
if (strcmp (di->dentry->type, "Directory") == 0){
|
||||
struct stat s;
|
||||
|
||||
if (mc_lstat (di->dentry->exec, &s) == 0){
|
||||
if (S_ISLNK (s.st_mode))
|
||||
mc_unlink (di->dentry->exec);
|
||||
else
|
||||
if (!remove_directory (di->dentry->exec))
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
desktop_release_desktop_icon_t (di);
|
||||
}
|
||||
|
||||
|
@ -447,4 +447,26 @@ setup_panels (void)
|
||||
load_hint ();
|
||||
}
|
||||
|
||||
/*
|
||||
* GNOME's implementation of the update_panels routine
|
||||
*/
|
||||
void
|
||||
update_panels (int force_update, char *current_file)
|
||||
{
|
||||
int reload_others = !(force_update & UP_ONLY_CURRENT);
|
||||
GList *p;
|
||||
|
||||
update_one_panel_widget (cpanel, force_update, current_file);
|
||||
|
||||
if (reload_others){
|
||||
for (p = containers; p; p = p->next){
|
||||
PanelContainer *pc = p->data;
|
||||
|
||||
if (p->data == current_panel_ptr)
|
||||
continue;
|
||||
|
||||
update_one_panel_widget (pc->panel, force_update, UP_KEEPSEL);
|
||||
}
|
||||
}
|
||||
mc_chdir (cpanel->cwd);
|
||||
}
|
||||
|
326
gnome/gnome.TODO
326
gnome/gnome.TODO
@ -140,3 +140,329 @@ OPEN ISSUES:
|
||||
of an empty one?
|
||||
- The text in a lot of text entries disappears as soon as I start typing
|
||||
in them.
|
||||
|
||||
Havoc Pennington comments:
|
||||
|
||||
From hp@pobox.com Mon Apr 27 14:41:01 1998
|
||||
Return-Path: <hp@pobox.com>
|
||||
Date: Mon, 27 Apr 1998 14:40:32 -0500 (CDT)
|
||||
From: Havoc Pennington <hp@pobox.com>
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Transfer-Encoding: 7bit
|
||||
To: miguel@nuclecu.unam.mx
|
||||
Subject: gmc wish list stuff
|
||||
X-Mailer: VM 6.34 under Emacs 19.34.1
|
||||
|
||||
|
||||
Hi Miguel,
|
||||
|
||||
I was playing with gmc and took some notes as ideas came to me. I also
|
||||
tried to come up with an easier-to-use menu structure, that's at the
|
||||
end.
|
||||
|
||||
I know a patch would be better but maybe some of these ideas are
|
||||
useful. :)
|
||||
|
||||
Havoc
|
||||
|
||||
=========================================
|
||||
|
||||
General:
|
||||
===================
|
||||
|
||||
When I drag across the list view, it doesn't redraw underneath the drag.
|
||||
|
||||
Tooltips would be nice throughout
|
||||
|
||||
All the dialogs should be GnomeDialogs.
|
||||
|
||||
What if the "Filter" drop down had a "Pattern" option, which caused the
|
||||
text entry to appear? As it is, some frightening patterns can appear
|
||||
in that text entry; maybe better off hidden unless the user chooses
|
||||
"Pattern"?
|
||||
*.(awk|sed|lex|l|y|sh|idl|pl|py|am|in|f|el|bas|pas|java|sl|p|m4|tcl|pov)
|
||||
is a good way to scare the newbies. :)
|
||||
|
||||
Maybe it'd work like this: when "Pattern" is chosen, you see the text
|
||||
entry with contents based on the last active filter; otherwise a label
|
||||
with the English name of the filter, e.g. "Image files." That way
|
||||
there's constant feedback on what's being viewed.
|
||||
|
||||
Apparent bug related to this, I have two panels open, and in one of
|
||||
them choosing a filter from the dropdown doesn't put anything in the
|
||||
entry.
|
||||
|
||||
It would be neat if a description of the highlighted menu item
|
||||
appeared in the status bar. I'd like to see that as a GnomeApp feature.
|
||||
|
||||
Another neat thing would be info on the selected file in the status
|
||||
bar; e.g. the file type, or eventually files might have comments
|
||||
stored in meta-info.
|
||||
|
||||
I like the idea of hints in the status bar, but many of them don't
|
||||
seem to apply to the Gnome version of mc.
|
||||
|
||||
Could some of the more confusing menu items (e.g. any that require
|
||||
shell patterns or typing in commands) be moved to an "Advanced" menu?
|
||||
Or just made optional?
|
||||
|
||||
Lots of the dialogs have funny looking capital letters to mark
|
||||
accelerators; should use underlines or something instead.
|
||||
|
||||
Throughout, when asking for a filename (e.g. on copy or move) there
|
||||
should be a "browse" button to pop up a file selection dialog.
|
||||
|
||||
File menu:
|
||||
===============
|
||||
|
||||
"Open Terminal" fails silently because rxvt is in the wrong place;
|
||||
Should pop up a dialog asking where it is.
|
||||
|
||||
"Mkdir" should be called "New Directory."
|
||||
|
||||
"Rename/Move" should be separate menu items; Rename should result in a
|
||||
much simpler dialog.
|
||||
|
||||
Maybe call "Select" "Select by Pattern..."? Makes it less surprising when
|
||||
the dialog comes up.
|
||||
|
||||
I'm thinking all the "Select" stuff belongs on an "Edit" menu.
|
||||
|
||||
History doesn't seem to work in many of the GnomeEntry widgets?
|
||||
|
||||
The move, rename, etc. stuff should be on the Commands menu, maybe?
|
||||
|
||||
Panel menu:
|
||||
===============
|
||||
|
||||
Call it the "Window" menu?
|
||||
|
||||
"Display Mode" seems confusing; how about "Detail Level"?
|
||||
|
||||
Dialog is called "Listing Mode," menu item "Display Mode." Should be
|
||||
consistent.
|
||||
|
||||
It isn't clear what full, brief, long file list means; the stuff in
|
||||
the entries is cryptic; what's "user mini status"? I think a submenu
|
||||
would be more appropriate here, something like:
|
||||
|
||||
Detail Level -> Most
|
||||
Normal
|
||||
Least
|
||||
|
||||
Then put the more advanced options in a page of a global
|
||||
"Preferences..." dialog.
|
||||
|
||||
"Sort Order" could be "Sort By" instead, and again a submenu might be
|
||||
nicer than a dialog.
|
||||
|
||||
e.g. Sort By -> Name
|
||||
Date/Time
|
||||
Size
|
||||
|
||||
etc. That way you can rapidly go up to the menu and change it, skipping the
|
||||
dialog.
|
||||
|
||||
I think the drop-down filter menu and entry are adequate; no reason to have a
|
||||
"Filter" menu item here too. Just adds clutter.
|
||||
|
||||
"Network Link" says "F1 for details" but F1 does nothing when I press it.
|
||||
|
||||
Commands menu:
|
||||
=================
|
||||
|
||||
"Find" should be "Find file"?
|
||||
The Find dialog could be a lot nicer. It should also be a separate find-files
|
||||
app or a gnome-libs widget, I think. Other apps might want to use it.
|
||||
|
||||
"Hotlist" should be "Bookmarks"? More familiar name. Consistent with
|
||||
Help Browser. Also, where do the bookmarks show up? Should they be on
|
||||
a submenu here? Should be consistent with whatever the Help browser
|
||||
does.
|
||||
|
||||
"Compare panels" and "External panelize" need renaming. It's very
|
||||
unclear what they do. See my reworked menu structure below for an
|
||||
idea on "compare panels" using a submenu.
|
||||
|
||||
Maybe "External Panelize" can be configured elsewhere, and then the
|
||||
menu can have a submenu with only the preconfigured options?
|
||||
|
||||
"Active VFS list"? What does it do?
|
||||
|
||||
It isn't clear to me what the "Commands" have in common. Seems like
|
||||
most of them belong on the "Panel" menu, or in preferences.
|
||||
|
||||
Options menu:
|
||||
================
|
||||
|
||||
Maybe this menu could be removed, and all of its dialogs made into
|
||||
pages of a single notebook found under "Preferences..." on the File or
|
||||
Edit menu (whatever the Gnome standard is).
|
||||
|
||||
Failing that, it should be called "Preferences" rather than "Options."
|
||||
|
||||
Desktop menu:
|
||||
=================
|
||||
|
||||
It would make sense to me if this menu were next to the "Panel"
|
||||
("Window") menu, since the two are related by opposition. I'd say
|
||||
these two should be the last two items (except Help).
|
||||
|
||||
Help menu:
|
||||
=============
|
||||
|
||||
Should be right justified. Maybe a "Gnome Help" option to lauch the
|
||||
browser pointed at the main Gnome Help Index?
|
||||
|
||||
Popup context menu:
|
||||
==============
|
||||
|
||||
"Open With" could have a submenu with suggested applications to use.
|
||||
|
||||
There isn't a clear difference between the submenu specific to the
|
||||
filename, and the main menu. e.g., why are link and symlink on the
|
||||
submenu, but copy is on the main menu?
|
||||
|
||||
Link and symlink seem like Advanced items to me, but a "Create Link"
|
||||
item that made a .desktop file (or whatever gets decided on for
|
||||
meta-info) would be nice.
|
||||
|
||||
Menus Revisited
|
||||
===============
|
||||
|
||||
Here's an attempt to work out a complete menu structure from
|
||||
scratch. It changes things more radically than the above suggestions.
|
||||
Items are listed in order.
|
||||
|
||||
File ->
|
||||
New Window
|
||||
Open Terminal
|
||||
-------------
|
||||
New ->
|
||||
Directory
|
||||
Text File
|
||||
Image
|
||||
[ ... etc., user configurable. ]
|
||||
-------------
|
||||
Close This Window
|
||||
Exit File Manager
|
||||
|
||||
Edit -> [Should be consistent with other Gnome apps, right now there's no
|
||||
standard I don't think?]
|
||||
Select By Pattern [ An optional "advanced" item ]
|
||||
Select All
|
||||
Unselect all
|
||||
Reverse Selection
|
||||
----------------
|
||||
File Properties...
|
||||
----------------
|
||||
Preferences... [ gmc big prefs notebook, maybe on File menu? ]
|
||||
|
||||
Commands -> [ This menu has commands that apply to selected files ]
|
||||
Open
|
||||
Open With ->
|
||||
[ Options that make sense for selected file ]
|
||||
Custom... [ pops up text entry for command ]
|
||||
View
|
||||
View Raw [ An "advanced" command, optionally
|
||||
not visible ]
|
||||
----------
|
||||
Copy... [ Copy, move, rename would have simplified dialogs -
|
||||
Move... just ask where to, use the selection rather
|
||||
Rename... than asking for a pattern ]
|
||||
Delete
|
||||
---------- [ These two should be optional "advanced" items ]
|
||||
Move by Pattern... [ The more complex dialog asking for a pattern ]
|
||||
Copy by Pattern... [ ditto ]
|
||||
|
||||
|
||||
Window ->
|
||||
Find Files...
|
||||
Detail Level -> Most
|
||||
Normal
|
||||
Least
|
||||
[... etc. make this menu configurable?]
|
||||
Sort By -> Name
|
||||
Date/Time
|
||||
[... etc. make this menu configurable?]
|
||||
Rescan Directory
|
||||
-------------------
|
||||
Scan FTP Directory...
|
||||
Scan Network Directory...
|
||||
-------------------
|
||||
Special Listing -> SUID Root
|
||||
Patching Rejects
|
||||
[... etc., whatever user has configured.]
|
||||
------------------
|
||||
Compare To ->
|
||||
[ Menu item for each other window ]
|
||||
|
||||
Desktop ->
|
||||
Arrange Icons
|
||||
Properties... [ launch desktop-properties app ]
|
||||
[More to come, I'm sure.]
|
||||
|
||||
Help ->
|
||||
About...
|
||||
File Manager Manual
|
||||
Gnome Help
|
||||
|
||||
Popup menu for file foo.bar ->
|
||||
[ Quick shortcuts should be first; e.g. "Use as Wallpaper", etc. ]
|
||||
-------------
|
||||
foo.bar ->
|
||||
[ Everything on the "Commands" menu ]
|
||||
Properties...
|
||||
|
||||
|
||||
Rationale:
|
||||
|
||||
File menu has the traditional stuff. Close, Exit, and New.
|
||||
Edit menu has the standard Gnome edit menu stuff, when that's decided on.
|
||||
(Preferences... is in either File or Edit, whatever becomes standard).
|
||||
Has "File Properties..." because that seems consistent with e.g. gtt.
|
||||
Commands menu has operations on the selected (pre-existing) file.
|
||||
Would also make sense to have "Edit Properties..." here instead of
|
||||
"File Properties..." on the edit menu.
|
||||
Window menu has operations that potentially change what's in the window or
|
||||
how it's viewed.
|
||||
Desktop menu has operations on the desktop.
|
||||
Help menu has help.
|
||||
|
||||
The "Options" menu isn't needed, because it's all in "Preferences..."
|
||||
|
||||
Popup menu has the "Commands" menu as submenu of the file name; seems
|
||||
intuitive, because "Commands" are operations on the particular file
|
||||
name. Quick context-sensitive commands like "Use As Wallpaper" are
|
||||
first because they'll be used most. "Properties..." is also there, since
|
||||
it may be more convenient here than on the "Edit" menu.
|
||||
|
||||
|
||||
Preferences...
|
||||
===============
|
||||
|
||||
The Preferences dialog would have the following tabs:
|
||||
|
||||
General: general options, from current Options->Options
|
||||
Virtual File System: from Options->Virtual FS [advanced config]
|
||||
Confirmation: from Options->Confirmation
|
||||
New Menu: what to put on the File->New submenu
|
||||
Detail Level: listing mode config, including what goes on Window->Detail Level
|
||||
Sort By: config for the Window->Sort By menu
|
||||
Bookmarks: config for bookmarks
|
||||
File Types: config available actions for different file types. Much like
|
||||
the Netscape preferences for this. [advanced config]
|
||||
|
||||
Probably I'm leaving something out. The "Advanced" tabs could be somehow
|
||||
marked as advanced (e.g. as in Netscape), or hidden by default.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -845,11 +845,12 @@ panel_artificial_drag_start (GtkCList *window, GdkEventMotion *event)
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
load_transparent_xpm (char *base)
|
||||
load_transparent_image (char *base)
|
||||
{
|
||||
char *f = concat_dir_and_file (ICONDIR, base);
|
||||
GtkWidget *w;
|
||||
|
||||
|
||||
printf ("Loading: %s\n", f);
|
||||
w = make_transparent_window (f);
|
||||
g_free (f);
|
||||
return w;
|
||||
@ -866,16 +867,16 @@ panel_realized (GtkWidget *file_list, WPanel *panel)
|
||||
GdkPoint hotspot = { 5, 5 };
|
||||
|
||||
if (!drag_directory)
|
||||
drag_directory = load_transparent_xpm ("directory-ok.xpm");
|
||||
drag_directory = load_transparent_image ("directory-ok.xpm");
|
||||
|
||||
if (!drag_directory_ok)
|
||||
drag_directory_ok = load_transparent_xpm ("directory.xpm");
|
||||
drag_directory_ok = load_transparent_image ("directory.xpm");
|
||||
|
||||
if (!drag_multiple)
|
||||
drag_multiple = load_transparent_xpm ("multi.xpm");
|
||||
drag_multiple = load_transparent_image ("multi.xpm");
|
||||
|
||||
if (!drag_multiple_ok)
|
||||
drag_multiple_ok = load_transparent_xpm ("multi-ok.xpm");
|
||||
drag_multiple_ok = load_transparent_image ("multi-ok.png");
|
||||
|
||||
if (drag_directory && drag_directory_ok)
|
||||
gdk_dnd_set_drag_shape (drag_directory->window, &hotspot,
|
||||
|
Двоичные данные
gnome/multi-ok.png
Обычный файл
Двоичные данные
gnome/multi-ok.png
Обычный файл
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 1.6 KiB |
605
po/mc.pot
605
po/mc.pot
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@ -1,3 +1,12 @@
|
||||
1998-04-29 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||
|
||||
* main.c (update_panels): Great API simplification. update_panels
|
||||
only cares about the contents of the current panel, every other
|
||||
panel keeps the current selection (this was the behaviour
|
||||
anyways).
|
||||
|
||||
update_panels can be provided in a per-port fashion as well.
|
||||
|
||||
Wed Apr 29 03:06:09 1998 Paul Sheer <psheer@obsidian.co.za>
|
||||
|
||||
* syntax.c: some optimisations, as well as support for
|
||||
|
@ -581,7 +581,7 @@ void chown_advanced_done (void)
|
||||
{
|
||||
free (sf_stat);
|
||||
if (need_update)
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL, UP_KEEPSEL);
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
|
||||
repaint_screen ();
|
||||
}
|
||||
|
||||
|
@ -277,7 +277,7 @@ int stat_file (char *filename, struct stat *st)
|
||||
static void chmod_done (void)
|
||||
{
|
||||
if (need_update)
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL, UP_KEEPSEL);
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
|
||||
repaint_screen ();
|
||||
}
|
||||
|
||||
|
@ -213,7 +213,7 @@ static void init_chown (void)
|
||||
void chown_done (void)
|
||||
{
|
||||
if (need_update)
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL, UP_KEEPSEL);
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
|
||||
repaint_screen ();
|
||||
}
|
||||
|
||||
|
18
src/cmd.c
18
src/cmd.c
@ -339,7 +339,7 @@ void copy_cmd (void)
|
||||
{
|
||||
save_cwds_stat ();
|
||||
if (panel_operate (cpanel, OP_COPY, NULL)){
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL, UP_KEEPSEL);
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
|
||||
repaint_screen ();
|
||||
}
|
||||
}
|
||||
@ -348,7 +348,7 @@ void ren_cmd (void)
|
||||
{
|
||||
save_cwds_stat ();
|
||||
if (panel_operate (cpanel, OP_MOVE, NULL)){
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL, UP_KEEPSEL);
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
|
||||
repaint_screen ();
|
||||
}
|
||||
}
|
||||
@ -357,7 +357,7 @@ void copymove_cmd_with_default (int copy, char *thedefault)
|
||||
{
|
||||
save_cwds_stat ();
|
||||
if (panel_operate (cpanel, copy ? OP_COPY : OP_MOVE, thedefault)){
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL, UP_KEEPSEL);
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
|
||||
repaint_screen ();
|
||||
}
|
||||
}
|
||||
@ -374,7 +374,7 @@ void mkdir_cmd (WPanel *panel)
|
||||
|
||||
save_cwds_stat ();
|
||||
if (my_mkdir (dir, 0777) == 0){
|
||||
update_panels (UP_OPTIMIZE, dir, UP_KEEPSEL);
|
||||
update_panels (UP_OPTIMIZE, dir);
|
||||
repaint_screen ();
|
||||
select_item (cpanel);
|
||||
free (dir);
|
||||
@ -389,7 +389,7 @@ void delete_cmd (void)
|
||||
save_cwds_stat ();
|
||||
|
||||
if (panel_operate (cpanel, OP_DELETE, NULL)){
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL, UP_KEEPSEL);
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
|
||||
repaint_screen ();
|
||||
}
|
||||
}
|
||||
@ -451,7 +451,7 @@ void reread_cmd (void)
|
||||
else
|
||||
flag = UP_ONLY_CURRENT;
|
||||
|
||||
update_panels (UP_RELOAD|flag, UP_KEEPSEL, UP_KEEPSEL);
|
||||
update_panels (UP_RELOAD|flag, UP_KEEPSEL);
|
||||
repaint_screen ();
|
||||
}
|
||||
|
||||
@ -1058,7 +1058,7 @@ do_link (int symbolic_link, char *fname)
|
||||
}
|
||||
}
|
||||
free (dest);
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL, UP_KEEPSEL);
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
|
||||
repaint_screen ();
|
||||
}
|
||||
|
||||
@ -1090,7 +1090,7 @@ void edit_symlink_cmd (void)
|
||||
if (-1 == mc_symlink (dest, p))
|
||||
message (1, MSG_ERROR, _(" edit symlink: %s "),
|
||||
unix_error_string (errno));
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL, UP_KEEPSEL);
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
|
||||
repaint_screen ();
|
||||
}
|
||||
free (dest);
|
||||
@ -1126,7 +1126,7 @@ void other_symlink_cmd (void)
|
||||
if (-1 == mc_symlink (dest, s))
|
||||
message (1, MSG_ERROR, _(" relative symlink: %s "),
|
||||
unix_error_string (errno));
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL, UP_KEEPSEL);
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
|
||||
repaint_screen ();
|
||||
free (s);
|
||||
}
|
||||
|
@ -2096,13 +2096,13 @@ panel_operate (void *source_panel, int operation, char *thedefault)
|
||||
/* Generate confirmation prompt */
|
||||
|
||||
if (!only_one){
|
||||
sprintf (cmd_buf, "%s%d %s%s ", op_names [operation], panel->marked,
|
||||
sprintf (cmd_buf, "%s%d %s%s ", _(op_names [operation]), panel->marked,
|
||||
(panel->marked == panel->dirs_marked) ? _("directories") :
|
||||
(panel->dirs_marked) ? _("files/directories") : _("files"),
|
||||
(operation == OP_DELETE) ? "?" : _(" with source mask:"));
|
||||
} else {
|
||||
source = get_file (panel, &src_stat);
|
||||
sprintf (cmd_buf,"%s%s \"%s\"%s ", op_names [operation],
|
||||
sprintf (cmd_buf,"%s%s \"%s\"%s ", _(op_names [operation]),
|
||||
S_ISDIR (src_stat.st_mode) ? _("directory") : _("file"),
|
||||
name_trunc (source, S_ISDIR (src_stat.st_mode) ? 23 : 28),
|
||||
(operation == OP_DELETE) ? "?" : _(" with source mask:"));
|
||||
@ -2112,7 +2112,7 @@ panel_operate (void *source_panel, int operation, char *thedefault)
|
||||
if (operation == OP_DELETE && confirm_delete){
|
||||
if (know_not_what_am_i_doing)
|
||||
query_set_sel (1);
|
||||
i = query_dialog (op_names [operation], cmd_buf,
|
||||
i = query_dialog (_(op_names [operation]), cmd_buf,
|
||||
D_ERROR, 2, _("&Yes"), _("&No"));
|
||||
if (i != 0)
|
||||
return 0;
|
||||
|
@ -704,7 +704,7 @@ static void hotlist_done (void)
|
||||
{
|
||||
destroy_dlg (hotlist_dlg);
|
||||
if (0)
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL, UP_KEEPSEL);
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
|
||||
repaint_screen ();
|
||||
}
|
||||
|
||||
|
@ -230,7 +230,7 @@ static void listmode_done (void)
|
||||
{
|
||||
destroy_dlg (listmode_dlg);
|
||||
if (0)
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL, UP_KEEPSEL);
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
|
||||
repaint_screen ();
|
||||
}
|
||||
|
||||
|
16
src/main.c
16
src/main.c
@ -473,6 +473,7 @@ update_one_panel_widget (WPanel *panel, int force_update, char *current_file)
|
||||
free (current_file);
|
||||
}
|
||||
|
||||
#ifndef PORT_HAS_UPDATE_PANELS
|
||||
void
|
||||
update_one_panel (int which, int force_update, char *current_file)
|
||||
{
|
||||
@ -494,14 +495,14 @@ update_one_panel (int which, int force_update, char *current_file)
|
||||
* will not reload the other panel.
|
||||
*/
|
||||
void
|
||||
update_panels (int force_update, char *current_file, char *other_file)
|
||||
update_panels (int force_update, char *current_file)
|
||||
{
|
||||
int reload_other = !(force_update & UP_ONLY_CURRENT);
|
||||
WPanel *panel;
|
||||
|
||||
update_one_panel (get_current_index (), force_update, current_file);
|
||||
if (reload_other)
|
||||
update_one_panel (get_other_index (), force_update, other_file);
|
||||
update_one_panel (get_other_index (), force_update, UP_KEEPSEL);
|
||||
|
||||
if (get_current_type () == view_listing)
|
||||
panel = (WPanel *) get_panel_widget (get_current_index ());
|
||||
@ -510,6 +511,7 @@ update_panels (int force_update, char *current_file, char *other_file)
|
||||
|
||||
mc_chdir (panel->cwd);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WANT_PARSE
|
||||
static void select_by_index (WPanel *panel, int i);
|
||||
@ -787,7 +789,7 @@ do_execute (const char *shell, const char *command, int flags)
|
||||
}
|
||||
#endif
|
||||
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL, UP_KEEPSEL);
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
|
||||
|
||||
parse_control_file ();
|
||||
#ifndef __os2__
|
||||
@ -1417,21 +1419,21 @@ void
|
||||
toggle_mix_all_files (void)
|
||||
{
|
||||
mix_all_files = !mix_all_files;
|
||||
update_panels (UP_RELOAD, UP_KEEPSEL, UP_KEEPSEL);
|
||||
update_panels (UP_RELOAD, UP_KEEPSEL);
|
||||
}
|
||||
|
||||
void
|
||||
toggle_show_backup (void)
|
||||
{
|
||||
show_backups = !show_backups;
|
||||
update_panels (UP_RELOAD, UP_KEEPSEL, UP_KEEPSEL);
|
||||
update_panels (UP_RELOAD, UP_KEEPSEL);
|
||||
}
|
||||
|
||||
void
|
||||
toggle_show_hidden (void)
|
||||
{
|
||||
show_dot_files = !show_dot_files;
|
||||
update_panels (UP_RELOAD, UP_KEEPSEL, UP_KEEPSEL);
|
||||
update_panels (UP_RELOAD, UP_KEEPSEL);
|
||||
}
|
||||
|
||||
void
|
||||
@ -1661,7 +1663,7 @@ void suspend_cmd (void)
|
||||
{
|
||||
save_cwds_stat ();
|
||||
do_suspend_cmd ();
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL, UP_KEEPSEL);
|
||||
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
|
||||
do_refresh ();
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ typedef struct {
|
||||
key_callback fn;
|
||||
} key_map;
|
||||
|
||||
void update_panels (int force_update, char *current_file, char *other_file);
|
||||
void update_panels (int force_update, char *current_file);
|
||||
void create_panels (void);
|
||||
void repaint_screen (void);
|
||||
void outrefresh_screen (void);
|
||||
@ -179,8 +179,9 @@ extern Dlg_head *midnight_dlg;
|
||||
* has included panel.h
|
||||
*/
|
||||
#ifdef __PANEL_H
|
||||
void directory_history_add (WPanel *panel, char *s);
|
||||
int do_panel_cd (WPanel *panel, char *new_dir, enum cd_enum cd_type);
|
||||
void directory_history_add (WPanel *panel, char *s);
|
||||
int do_panel_cd (WPanel *panel, char *new_dir, enum cd_enum cd_type);
|
||||
void update_one_panel_widget (WPanel *panel, int force_update, char *current_file);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user