1999-09-21 Federico Mena Quintero <federico@redhat.com>

* gscreen.c (x_create_panel): Do not change the dialog head's
	current pointer.

	* gmain.c (x_init_dlg): Only call x_focus_widget() if there is a
	current widget.
	(non_corba_create_panels): Removed the nasty hack that created a
	dummy panel and destroyed it in the idle loop.  Wheeeeeee!

1999-09-21  Federico Mena Quintero  <federico@redhat.com>

	* dlg.c (init_dlg): Walk the list of widgets only if it exists.
	(dlg_broadcast_msg_to): Use safer list-walking code for if someone
	inserts a widget inside the message broadcast.
This commit is contained in:
Miguel de Icaza 1999-09-21 08:09:54 +00:00
parent 0fbbead100
commit c10db1f41c
6 changed files with 76 additions and 84 deletions

View File

@ -1,7 +1,12 @@
1999-09-21 Federico Mena Quintero <federico@redhat.com>
* gscreen.c (x_create_panel): Do not change the dialog head's
current pointer.
* gmain.c (x_init_dlg): Only call x_focus_widget() if there is a
current widget.
(non_corba_create_panels): Removed the nasty hack that created a
dummy panel and destroyed it in the idle loop. Wheeeeeee!
1999-09-20 Federico Mena Quintero <federico@redhat.com>

View File

@ -495,19 +495,7 @@ non_corba_create_panels (char *startup_dir)
dialog_panel_callback, "[panel]", "midnight", DLG_NO_TED);
session_load ();
#if 0
/* The following is a hack. We have to have at least one panel for
* run_dlg() to be happy. So we destroy it in the idle loop if we
* didn't need it in the first place. This idle function is to be run
* at a higher priority than the one used in session_load().
*/
panel = new_panel_at (startup_dir);
gtk_idle_add_priority (GTK_PRIORITY_DEFAULT, idle_destroy_panel, panel);
panel->widget.options |= W_PANEL_HIDDEN;
#endif
run_dlg (desktop_dlg);
desktop_destroy ();
}

View File

@ -141,7 +141,6 @@ option_has_user (char *str)
static gboolean
option_has_owner (struct mntent *mnt)
{
char *p;
struct stat st;
if (strstr (mnt->mnt_opts, "owner") == NULL)

View File

@ -2332,10 +2332,8 @@ x_create_panel (Dlg_head *h, widget_data parent, WPanel *panel)
/*
* Current Working directory
*/
cwd = panel_create_cwd (h, panel, &panel->current_dir);
/* We do not want the focus by default (and the previos add_widget just gave it to us) */
h->current = h->current->prev;
cwd = panel_create_cwd (h, panel, &panel->current_dir);
/*
* We go through a lot of pain, wrestling with gnome_app* and gmc's @#$&*#$ internal structure and
@ -2385,8 +2383,7 @@ x_create_panel (Dlg_head *h, widget_data parent, WPanel *panel)
gtk_container_set_border_width (GTK_CONTAINER (status_line), 3);
gtk_box_pack_start (GTK_BOX (status_line),
gtk_label_new (_("Location:")), FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (status_line),
cwd, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (status_line), cwd, TRUE, TRUE, 0);
dock = gnome_dock_item_new ("gmc-toolbar1",
(GNOME_DOCK_ITEM_BEH_EXCLUSIVE

View File

@ -1,6 +1,8 @@
1999-09-21 Federico Mena Quintero <federico@redhat.com>
* dlg.c (init_dlg): Walk the list of widgets only if it exists.
(dlg_broadcast_msg_to): Use safer list-walking code for if someone
inserts a widget inside the message broadcast.
1999-09-20 Federico Mena Quintero <federico@redhat.com>

View File

@ -390,7 +390,7 @@ int send_message (Dlg_head *h, Widget *w, int msg, int par)
*/
void dlg_broadcast_msg_to (Dlg_head *h, int message, int reverse, int flags)
{
Widget_Item *p, *first;
Widget_Item *p, *first, *wi;
if (!h->current)
return;
@ -407,13 +407,14 @@ void dlg_broadcast_msg_to (Dlg_head *h, int message, int reverse, int flags)
first = p = h->current->next;
#endif
do {
/* if (p->widget->options & flags) */
send_message (h, p->widget, message, 0);
if (reverse)
p = p->prev;
else
p = p->next;
wi = p;
/* if (p->widget->options & flags) */
send_message (h, wi->widget, message, 0);
} while (first != p);
}