mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 18:14:25 +03:00
1999-03-14 Miguel de Icaza <miguel@nuclecu.unam.mx>
* dlg.c (dlg_select_nth_widget): Handle the case where h->current points to NULL.
This commit is contained in:
parent
e8c91869f8
commit
30a80d6c8a
@ -5,7 +5,7 @@ AC_INIT(create_vcs)
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
PACKAGE=mc
|
||||
VERSION=4.5.24
|
||||
VERSION=4.5.25
|
||||
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
|
||||
AC_SUBST(VERSION)
|
||||
|
@ -1,3 +1,8 @@
|
||||
1999-03-12 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||
|
||||
* gview.c (scrollbar_moved): Better, but still shaggy when you
|
||||
drag with the scrollbar.
|
||||
|
||||
1999-03-12 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gdesktop.c (create_panel_from_desktop): Do not assert that
|
||||
|
@ -74,6 +74,19 @@ scrollbar_moved (GtkAdjustment *adj, WView *view)
|
||||
view_move_forward (view, 1);
|
||||
}
|
||||
|
||||
/* Update the ajd->value */
|
||||
gtk_signal_handler_block_by_func (
|
||||
GTK_OBJECT (view->sadj),
|
||||
GTK_SIGNAL_FUNC (scrollbar_moved),
|
||||
view);
|
||||
|
||||
gtk_adjustment_set_value (adj, view->start_display);
|
||||
|
||||
gtk_signal_handler_unblock_by_func (
|
||||
GTK_OBJECT (view->sadj),
|
||||
GTK_SIGNAL_FUNC (scrollbar_moved),
|
||||
view);
|
||||
|
||||
/* To force a display */
|
||||
view->dirty = max_dirt_limit + 1;
|
||||
view_update (view, 0);
|
||||
|
90
po/mc.pot
90
po/mc.pot
@ -6,7 +6,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: 1999-03-11 19:23-0500\n"
|
||||
"POT-Creation-Date: 1999-03-12 20:02-0600\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -47,7 +47,7 @@ msgstr ""
|
||||
msgid "The GNOME edition of the Midnight Commander file manager."
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gcmd.c:127 src/main.c:844 src/screen.c:2050
|
||||
#: gnome/gcmd.c:127 src/main.c:844 src/screen.c:2053
|
||||
msgid " The Midnight Commander "
|
||||
msgstr ""
|
||||
|
||||
@ -57,14 +57,14 @@ msgstr ""
|
||||
|
||||
#: gnome/gcmd.c:129 gtkedit/editcmd.c:2248 src/cmd.c:251 src/file.c:1860
|
||||
#: src/file.c:2232 src/filegui.c:602 src/hotlist.c:1035 src/main.c:846
|
||||
#: src/screen.c:2052 src/subshell.c:706 src/subshell.c:732 src/tree.c:755
|
||||
#: src/screen.c:2055 src/subshell.c:706 src/subshell.c:732 src/tree.c:755
|
||||
#: src/view.c:404
|
||||
msgid "&Yes"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gcmd.c:129 gtkedit/editcmd.c:2248 src/cmd.c:251 src/file.c:1860
|
||||
#: src/file.c:2232 src/filegui.c:601 src/hotlist.c:1035 src/main.c:846
|
||||
#: src/screen.c:2052 src/subshell.c:706 src/subshell.c:732 src/tree.c:755
|
||||
#: src/screen.c:2055 src/subshell.c:706 src/subshell.c:732 src/tree.c:755
|
||||
#: src/view.c:404
|
||||
msgid "&No"
|
||||
msgstr ""
|
||||
@ -181,7 +181,7 @@ msgstr ""
|
||||
msgid "Enter extra arguments:"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gdesktop.c:420 gnome/gdesktop.c:2071
|
||||
#: gnome/gdesktop.c:420 gnome/gdesktop.c:2072
|
||||
msgid "Warning"
|
||||
msgstr ""
|
||||
|
||||
@ -203,45 +203,45 @@ msgid "Error"
|
||||
msgstr ""
|
||||
|
||||
#. Create the link to the user's home directory so that he will have an icon
|
||||
#: gnome/gdesktop.c:2067
|
||||
#: gnome/gdesktop.c:2068
|
||||
msgid "Home directory"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gdesktop.c:2072
|
||||
#: gnome/gdesktop.c:2073
|
||||
#, c-format
|
||||
msgid "Could not symlink %s to %s; will not have initial desktop icons."
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gdesktop.c:2401 gnome/glayout.c:355
|
||||
#: gnome/gdesktop.c:2402 gnome/glayout.c:355
|
||||
msgid "_Terminal"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gdesktop.c:2401 gnome/glayout.c:355
|
||||
#: gnome/gdesktop.c:2402 gnome/glayout.c:355
|
||||
msgid "Launch a new terminal in the current directory"
|
||||
msgstr ""
|
||||
|
||||
#. If this ever changes, make sure you update create_new_menu accordingly.
|
||||
#: gnome/gdesktop.c:2403 gnome/glayout.c:357
|
||||
#: gnome/gdesktop.c:2404 gnome/glayout.c:357
|
||||
msgid "_Directory..."
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gdesktop.c:2403 gnome/glayout.c:357
|
||||
#: gnome/gdesktop.c:2404 gnome/glayout.c:357
|
||||
msgid "Creates a new directory"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gdesktop.c:2411 gnome/glayout.c:440
|
||||
#: gnome/gdesktop.c:2412 gnome/glayout.c:440
|
||||
msgid "Arrange Icons"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gdesktop.c:2412
|
||||
#: gnome/gdesktop.c:2413
|
||||
msgid "Create New Window"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gdesktop.c:2414
|
||||
#: gnome/gdesktop.c:2415
|
||||
msgid "Rescan Mountable Devices"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gdesktop.c:2415 gnome/glayout.c:443
|
||||
#: gnome/gdesktop.c:2416 gnome/glayout.c:443
|
||||
msgid "Rescan Desktop"
|
||||
msgstr ""
|
||||
|
||||
@ -305,7 +305,7 @@ msgid "Replace it?"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gdialogs.c:558 gtkedit/editwidget.c:1067 src/file.c:803
|
||||
#: src/screen.c:2291 src/screen.c:2321 src/tree.c:1024
|
||||
#: src/screen.c:2294 src/screen.c:2324 src/tree.c:1024
|
||||
msgid "Copy"
|
||||
msgstr ""
|
||||
|
||||
@ -484,7 +484,7 @@ msgid ""
|
||||
"Notice that if you choose to terminate the file manager, you will\n"
|
||||
"also terminate the GNOME desktop handler.\n"
|
||||
"\n"
|
||||
"Are you sure you want to quit?"
|
||||
"Are you sure you want to exit?"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/glayout.c:327
|
||||
@ -648,7 +648,7 @@ msgid "Properties"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gpopup.c:253 gnome/gpopup.c:254 gtkedit/editwidget.c:1070
|
||||
#: src/screen.c:2294 src/screen.c:2324
|
||||
#: src/screen.c:2297 src/screen.c:2327
|
||||
msgid "Delete"
|
||||
msgstr ""
|
||||
|
||||
@ -672,7 +672,7 @@ msgstr ""
|
||||
msgid "Open with"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gpopup.c:263 src/screen.c:2289 src/screen.c:2319
|
||||
#: gnome/gpopup.c:263 src/screen.c:2292 src/screen.c:2322
|
||||
msgid "View"
|
||||
msgstr ""
|
||||
|
||||
@ -680,7 +680,7 @@ msgstr ""
|
||||
msgid "View unfiltered"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gpopup.c:265 src/screen.c:2290 src/screen.c:2320 src/view.c:1991
|
||||
#: gnome/gpopup.c:265 src/screen.c:2293 src/screen.c:2323 src/view.c:1991
|
||||
msgid "Edit"
|
||||
msgstr ""
|
||||
|
||||
@ -1046,67 +1046,67 @@ msgstr ""
|
||||
msgid "&Ok"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gview.c:122 src/view.c:683
|
||||
#: gnome/gview.c:135 src/view.c:683
|
||||
#, c-format
|
||||
msgid "Offset 0x%08x"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gview.c:124 src/view.c:685
|
||||
#: gnome/gview.c:137 src/view.c:685
|
||||
#, c-format
|
||||
msgid "Col %d"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gview.c:128 src/view.c:689
|
||||
#: gnome/gview.c:141 src/view.c:689
|
||||
#, c-format
|
||||
msgid "%s bytes"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gview.c:292
|
||||
#: gnome/gview.c:305
|
||||
msgid "_Goto line"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gview.c:293
|
||||
#: gnome/gview.c:306
|
||||
msgid "Jump to a specified line number"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gview.c:295
|
||||
#: gnome/gview.c:308
|
||||
msgid "_Monitor file"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gview.c:295
|
||||
#: gnome/gview.c:308
|
||||
msgid "Monitor file growing"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gview.c:302
|
||||
#: gnome/gview.c:315
|
||||
msgid "Regexp search"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gview.c:303
|
||||
#: gnome/gview.c:316
|
||||
msgid "Regular expression search"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gview.c:312
|
||||
#: gnome/gview.c:325
|
||||
msgid "_Wrap"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gview.c:313
|
||||
#: gnome/gview.c:326
|
||||
msgid "Wrap the text"
|
||||
msgstr ""
|
||||
|
||||
#. Can not use this one yet, as it destroys the viewer, need to fix that
|
||||
#: gnome/gview.c:316
|
||||
#: gnome/gview.c:329
|
||||
msgid "_Parsed view"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gview.c:319
|
||||
#: gnome/gview.c:332
|
||||
msgid "_Formatted"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gview.c:321
|
||||
#: gnome/gview.c:334
|
||||
msgid "_Hex"
|
||||
msgstr ""
|
||||
|
||||
#: gnome/gview.c:327
|
||||
#: gnome/gview.c:340
|
||||
msgid "_Search"
|
||||
msgstr ""
|
||||
|
||||
@ -1142,7 +1142,7 @@ msgstr ""
|
||||
#: gtkedit/edit.c:129 gtkedit/edit.c:224 gtkedit/edit.c:231 gtkedit/edit.c:238
|
||||
#: gtkedit/edit.c:245 gtkedit/edit.c:251 gtkedit/edit.c:308 gtkedit/edit.c:344
|
||||
#: gtkedit/editcmd.c:1945 gtkedit/editwidget.c:950 src/dir.c:386
|
||||
#: src/screen.c:2309 src/tree.c:692 src/tree.c:698 src/wtools.c:222
|
||||
#: src/screen.c:2312 src/tree.c:692 src/tree.c:698 src/wtools.c:222
|
||||
#: vfs/fish.c:224
|
||||
msgid " Error "
|
||||
msgstr ""
|
||||
@ -1214,7 +1214,7 @@ msgstr ""
|
||||
#. Warning message with a query to continue or cancel the operation
|
||||
#: gtkedit/editcmd.c:491 gtkedit/editcmd.c:810 gtkedit/editcmd.c:840
|
||||
#: gtkedit/editcmd.c:987 gtkedit/editcmd.c:1084 src/ext.c:301 src/file.c:620
|
||||
#: src/help.c:318 src/main.c:691 src/screen.c:2066 src/subshell.c:705
|
||||
#: src/help.c:318 src/main.c:691 src/screen.c:2069 src/subshell.c:705
|
||||
#: src/subshell.c:731 src/utilunix.c:388 src/utilunix.c:392 src/utilunix.c:458
|
||||
#: vfs/mcfs.c:170
|
||||
msgid " Warning "
|
||||
@ -1729,8 +1729,8 @@ msgstr ""
|
||||
msgid "Error initialising editor.\n"
|
||||
msgstr ""
|
||||
|
||||
#: gtkedit/editwidget.c:1063 src/help.c:806 src/main.c:1688 src/screen.c:2287
|
||||
#: src/screen.c:2317 src/tree.c:1018 src/view.c:1982
|
||||
#: gtkedit/editwidget.c:1063 src/help.c:806 src/main.c:1688 src/screen.c:2290
|
||||
#: src/screen.c:2320 src/tree.c:1018 src/view.c:1982
|
||||
msgid "Help"
|
||||
msgstr ""
|
||||
|
||||
@ -4293,7 +4293,7 @@ msgid ""
|
||||
" the details. "
|
||||
msgstr ""
|
||||
|
||||
#: src/main.c:1689 src/screen.c:2288 src/screen.c:2318
|
||||
#: src/main.c:1689 src/screen.c:2291 src/screen.c:2321
|
||||
msgid "Menu"
|
||||
msgstr ""
|
||||
|
||||
@ -4643,23 +4643,23 @@ msgstr ""
|
||||
msgid "Unknow tag on display format: "
|
||||
msgstr ""
|
||||
|
||||
#: src/screen.c:2051
|
||||
#: src/screen.c:2054
|
||||
msgid " Do you really want to execute? "
|
||||
msgstr ""
|
||||
|
||||
#: src/screen.c:2066
|
||||
#: src/screen.c:2069
|
||||
msgid " No action taken "
|
||||
msgstr ""
|
||||
|
||||
#: src/screen.c:2292 src/screen.c:2322 src/tree.c:1026
|
||||
#: src/screen.c:2295 src/screen.c:2325 src/tree.c:1026
|
||||
msgid "RenMov"
|
||||
msgstr ""
|
||||
|
||||
#: src/screen.c:2293 src/screen.c:2323 src/tree.c:1030
|
||||
#: src/screen.c:2296 src/screen.c:2326 src/tree.c:1030
|
||||
msgid "Mkdir"
|
||||
msgstr ""
|
||||
|
||||
#: src/screen.c:2309
|
||||
#: src/screen.c:2312
|
||||
#, c-format
|
||||
msgid ""
|
||||
" Can't chdir to %s \n"
|
||||
|
@ -1,3 +1,8 @@
|
||||
1999-03-14 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||
|
||||
* dlg.c (dlg_select_nth_widget): Handle the case where h->current
|
||||
points to NULL.
|
||||
|
||||
1999-03-12 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* file.c (erase_file): Here we need to mc_lstat(), not mc_stat().
|
||||
|
58
src/dlg.c
58
src/dlg.c
@ -339,9 +339,12 @@ int add_widgetl (Dlg_head *where, void *what, WLay layout)
|
||||
int remove_widget (Dlg_head *h, void *what)
|
||||
{
|
||||
Widget_Item *first, *p;
|
||||
|
||||
if (!h->current)
|
||||
return;
|
||||
|
||||
first = p = h->current;
|
||||
|
||||
|
||||
do {
|
||||
if (p->widget == what){
|
||||
/* Remove links to this Widget_Item */
|
||||
@ -422,6 +425,9 @@ void dlg_broadcast_msg (Dlg_head *h, int message, int reverse)
|
||||
|
||||
int dlg_focus (Dlg_head *h)
|
||||
{
|
||||
if (!h->current)
|
||||
return 0;
|
||||
|
||||
if (send_message (h, h->current->widget, WIDGET_FOCUS, 0)){
|
||||
(*h->callback) (h, h->current->dlg_id, DLG_FOCUS);
|
||||
return 1;
|
||||
@ -431,6 +437,9 @@ int dlg_focus (Dlg_head *h)
|
||||
|
||||
int dlg_unfocus (Dlg_head *h)
|
||||
{
|
||||
if (!h->current)
|
||||
return 0;
|
||||
|
||||
if (send_message (h, h->current->widget, WIDGET_UNFOCUS, 0)){
|
||||
(*h->callback) (h, h->current->dlg_id, DLG_UNFOCUS);
|
||||
return 1;
|
||||
@ -442,6 +451,9 @@ static void select_a_widget (Dlg_head *h, int down)
|
||||
{
|
||||
int direction = h->direction;
|
||||
|
||||
if (!h->current)
|
||||
return;
|
||||
|
||||
if (!down)
|
||||
direction = !direction;
|
||||
|
||||
@ -476,6 +488,8 @@ Widget *find_widget_type (Dlg_head *h, callback_fn signature)
|
||||
|
||||
if (!h)
|
||||
return 0;
|
||||
if (!h->current)
|
||||
return 0;
|
||||
|
||||
w = 0;
|
||||
for (i = 0, item = h->current; i < h->count; i++, item = item->next){
|
||||
@ -492,6 +506,10 @@ void dlg_one_up (Dlg_head *h)
|
||||
Widget_Item *old;
|
||||
|
||||
old = h->current;
|
||||
|
||||
if (!old)
|
||||
return;
|
||||
|
||||
/* If it accepts unFOCUSion */
|
||||
if (!dlg_unfocus(h))
|
||||
return;
|
||||
@ -508,6 +526,9 @@ void dlg_one_down (Dlg_head *h)
|
||||
Widget_Item *old;
|
||||
|
||||
old = h->current;
|
||||
if (!old)
|
||||
return;
|
||||
|
||||
if (!dlg_unfocus (h))
|
||||
return;
|
||||
|
||||
@ -520,6 +541,9 @@ void dlg_one_down (Dlg_head *h)
|
||||
|
||||
int dlg_select_widget (Dlg_head *h, void *w)
|
||||
{
|
||||
if (!h->current)
|
||||
return 0;
|
||||
|
||||
if (dlg_unfocus (h)){
|
||||
while (h->current->widget != w)
|
||||
h->current = h->current->next;
|
||||
@ -536,6 +560,9 @@ int send_message_to (Dlg_head *h, Widget *w, int msg, int par)
|
||||
Widget_Item *p = h->current;
|
||||
int v, i;
|
||||
|
||||
if (!h->current)
|
||||
return 0;
|
||||
|
||||
v = 0;
|
||||
for (i = 0; i < h->count; i++){
|
||||
if (w == (void *) p->widget){
|
||||
@ -654,6 +681,9 @@ static int dlg_try_hotkey (Dlg_head *h, int d_key)
|
||||
Widget_Item *hot_cur;
|
||||
Widget_Item *previous;
|
||||
int handled, c;
|
||||
|
||||
if (!h->current)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Explanation: we don't send letter hotkeys to other widgets if
|
||||
@ -714,6 +744,9 @@ static int dlg_try_hotkey (Dlg_head *h, int d_key)
|
||||
int dlg_key_event (Dlg_head *h, int d_key)
|
||||
{
|
||||
int handled;
|
||||
|
||||
if (!h->current)
|
||||
return 0;
|
||||
|
||||
/* TAB used to cycle */
|
||||
if (!h->raw && (d_key == '\t' || d_key == KEY_BTAB))
|
||||
@ -835,8 +868,15 @@ void dlg_run_done (Dlg_head *h)
|
||||
{
|
||||
(*h->callback) (h, h->current->dlg_id, DLG_END);
|
||||
current_dlg = (Dlg_head *) h->previous_dialog;
|
||||
if (current_dlg)
|
||||
x_focus_widget (current_dlg->current);
|
||||
if (current_dlg){
|
||||
|
||||
/*
|
||||
* Special case for the GNOME desktop:
|
||||
* The desktop will not have any widgets
|
||||
*/
|
||||
if (current_dlg->current)
|
||||
x_focus_widget (current_dlg->current);
|
||||
}
|
||||
}
|
||||
|
||||
void dlg_process_event (Dlg_head *h, int key, Gpm_Event *event)
|
||||
@ -917,8 +957,10 @@ destroy_dlg (Dlg_head *h)
|
||||
if (c->widget->destroy)
|
||||
c->widget->destroy (c->widget);
|
||||
c = c->next;
|
||||
g_free (h->current->widget);
|
||||
g_free (h->current);
|
||||
if (h->current){
|
||||
g_free (h->current->widget);
|
||||
g_free (h->current);
|
||||
}
|
||||
h->current = c;
|
||||
}
|
||||
if (h->title)
|
||||
@ -950,6 +992,9 @@ void dlg_replace_widget (Dlg_head *h, Widget *old, Widget *new)
|
||||
{
|
||||
Widget_Item *p = h->current;
|
||||
int should_focus = 0;
|
||||
|
||||
if (!h->current)
|
||||
return;
|
||||
|
||||
do {
|
||||
if (p->widget == old){
|
||||
@ -982,6 +1027,9 @@ void widget_redraw (Dlg_head *h, Widget_Item *w)
|
||||
{
|
||||
Widget_Item *save = h->current;
|
||||
|
||||
if (!h->current)
|
||||
return;
|
||||
|
||||
h->current = w;
|
||||
(*w->widget->callback)(h, h->current->widget, WIDGET_DRAW, 0);
|
||||
h->current = save;
|
||||
|
Loading…
Reference in New Issue
Block a user