Decrease time for starting from 20 seconds to 10 seconds.
Fri Mar 12 12:06:18 1999 Owen Taylor <otaylor@redhat.com> * capplets/wm-properties/wm-exec.c (start_do): Decrease time for starting from 20 seconds to 10 seconds. * capplets/wm-properties/wm-properties-capplet.c (add_dialog): Track selected row properly on adds and deletes. * capplets/wm-properties/wm-properties-capplet.c: Fix bug where wm-properties capplet wouldn't exit upon succesful completion.
This commit is contained in:
parent
e4d28750e7
commit
14049208d8
3 changed files with 58 additions and 8 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
Fri Mar 12 12:06:18 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* capplets/wm-properties/wm-exec.c (start_do): Decrease
|
||||||
|
time for starting from 20 seconds to 10 seconds.
|
||||||
|
|
||||||
|
* capplets/wm-properties/wm-properties-capplet.c (add_dialog):
|
||||||
|
Track selected row properly on adds and deletes.
|
||||||
|
|
||||||
|
* capplets/wm-properties/wm-properties-capplet.c: Fix
|
||||||
|
bug where wm-properties capplet wouldn't exit upon
|
||||||
|
succesful completion.
|
||||||
|
|
||||||
Fri Mar 12 10:53:10 1999 Owen Taylor <otaylor@redhat.com>
|
Fri Mar 12 10:53:10 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* capplets/theme-switcher/main.c (main): Wait for
|
* capplets/theme-switcher/main.c (main): Wait for
|
||||||
|
|
|
@ -269,7 +269,7 @@ start_do (RestartInfo *info)
|
||||||
{
|
{
|
||||||
gnome_desktop_entry_launch (info->dentry);
|
gnome_desktop_entry_launch (info->dentry);
|
||||||
|
|
||||||
info->retries = 20;
|
info->retries = 10;
|
||||||
gtk_timeout_add (1000, start_timeout, info);
|
gtk_timeout_add (1000, start_timeout, info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,11 @@ static WindowManager *selected_wm;
|
||||||
static GtkWidget *restart_dialog = NULL;
|
static GtkWidget *restart_dialog = NULL;
|
||||||
static GtkWidget *restart_label = NULL;
|
static GtkWidget *restart_label = NULL;
|
||||||
guint restart_dialog_timeout;
|
guint restart_dialog_timeout;
|
||||||
|
gchar *restart_name = NULL;
|
||||||
|
|
||||||
|
/* Time until dialog times out */
|
||||||
|
gdouble restart_remaining_time;
|
||||||
|
gint restart_displayed_time;
|
||||||
|
|
||||||
GnomeClient *client = NULL;
|
GnomeClient *client = NULL;
|
||||||
gchar *argv0;
|
gchar *argv0;
|
||||||
|
@ -100,19 +105,41 @@ typedef enum {
|
||||||
*/
|
*/
|
||||||
StateType state = STATE_IDLE;
|
StateType state = STATE_IDLE;
|
||||||
|
|
||||||
/* Set TRUE when we've exited the main loop, but state != IDLE
|
/* Set TRUE when we've exited the main loop, but restart_pending
|
||||||
*/
|
*/
|
||||||
gboolean quit_pending = FALSE;
|
gboolean quit_pending = FALSE;
|
||||||
|
|
||||||
|
/* Set TRUE when we're waiting for the WM to restart
|
||||||
|
*/
|
||||||
|
gboolean restart_pending = FALSE;
|
||||||
|
|
||||||
/* Set TRUE while we are filling in the list
|
/* Set TRUE while we are filling in the list
|
||||||
*/
|
*/
|
||||||
gboolean in_fill = FALSE;
|
gboolean in_fill = FALSE;
|
||||||
|
|
||||||
|
static void
|
||||||
|
restart_label_update (void)
|
||||||
|
{
|
||||||
|
gchar *tmp;
|
||||||
|
|
||||||
|
if ((gint)restart_remaining_time != restart_displayed_time) {
|
||||||
|
restart_displayed_time = restart_remaining_time;
|
||||||
|
|
||||||
|
tmp = g_strdup_printf ("Starting %s\n"
|
||||||
|
"(%d seconds left before operation times out)",
|
||||||
|
restart_name,
|
||||||
|
restart_displayed_time);
|
||||||
|
gtk_label_set_text (GTK_LABEL (restart_label), tmp);
|
||||||
|
g_free (tmp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
restart_dialog_raise (gpointer data)
|
restart_dialog_raise (gpointer data)
|
||||||
{
|
{
|
||||||
if (restart_dialog && GTK_WIDGET_REALIZED (restart_dialog)) {
|
if (restart_dialog && GTK_WIDGET_REALIZED (restart_dialog)) {
|
||||||
|
restart_remaining_time -= 0.25;
|
||||||
|
restart_label_update();
|
||||||
gdk_window_raise (restart_dialog->window);
|
gdk_window_raise (restart_dialog->window);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -165,13 +192,16 @@ show_restart_dialog (gchar *name)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!restart_dialog_timeout) {
|
if (!restart_dialog_timeout) {
|
||||||
gtk_timeout_add (250, restart_dialog_raise, NULL);
|
restart_dialog_timeout = gtk_timeout_add (250, restart_dialog_raise, NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp = g_strdup_printf ("Starting %s", name);
|
restart_remaining_time = 10.0;
|
||||||
gtk_label_set_text (GTK_LABEL (restart_label), tmp);
|
restart_displayed_time = -1;
|
||||||
g_free (tmp);
|
if (restart_name)
|
||||||
|
g_free (restart_name);
|
||||||
|
|
||||||
|
restart_name = g_strdup (name);
|
||||||
|
restart_label_update ();
|
||||||
|
|
||||||
gtk_widget_show_all (restart_dialog);
|
gtk_widget_show_all (restart_dialog);
|
||||||
}
|
}
|
||||||
|
@ -334,6 +364,7 @@ restart_finalize ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
restart_pending = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -496,6 +527,7 @@ restart (gboolean force)
|
||||||
show_restart_dialog (selected_wm->dentry->name);
|
show_restart_dialog (selected_wm->dentry->name);
|
||||||
if (state != STATE_OK && state != STATE_CANCEL)
|
if (state != STATE_OK && state != STATE_CANCEL)
|
||||||
gtk_widget_set_sensitive (capplet, FALSE);
|
gtk_widget_set_sensitive (capplet, FALSE);
|
||||||
|
restart_pending = TRUE;
|
||||||
wm_restart (selected_wm,
|
wm_restart (selected_wm,
|
||||||
capplet->window,
|
capplet->window,
|
||||||
restart_callback,
|
restart_callback,
|
||||||
|
@ -854,7 +886,9 @@ add_dialog (void)
|
||||||
|
|
||||||
wm_list_add (wm);
|
wm_list_add (wm);
|
||||||
|
|
||||||
|
selected_wm = wm;
|
||||||
update_gui();
|
update_gui();
|
||||||
|
|
||||||
capplet_widget_state_changed (CAPPLET_WIDGET (capplet), TRUE);
|
capplet_widget_state_changed (CAPPLET_WIDGET (capplet), TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -898,6 +932,7 @@ delete (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
wm_list_delete (selected_wm);
|
wm_list_delete (selected_wm);
|
||||||
|
selected_wm = current_wm;
|
||||||
update_gui();
|
update_gui();
|
||||||
capplet_widget_state_changed (CAPPLET_WIDGET (capplet), TRUE);
|
capplet_widget_state_changed (CAPPLET_WIDGET (capplet), TRUE);
|
||||||
}
|
}
|
||||||
|
@ -971,6 +1006,9 @@ wm_setup (void)
|
||||||
GTK_SIGNAL_FUNC (delete), NULL);
|
GTK_SIGNAL_FUNC (delete), NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (util_vbox), delete_button, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (util_vbox), delete_button, FALSE, FALSE, 0);
|
||||||
config_button = gtk_button_new_with_label ("");
|
config_button = gtk_button_new_with_label ("");
|
||||||
|
|
||||||
|
gtk_misc_set_padding (GTK_MISC (GTK_BIN (config_button)->child),
|
||||||
|
GNOME_PAD_SMALL, 0);
|
||||||
gtk_signal_connect (GTK_OBJECT (config_button), "clicked",
|
gtk_signal_connect (GTK_OBJECT (config_button), "clicked",
|
||||||
GTK_SIGNAL_FUNC (run_config), NULL);
|
GTK_SIGNAL_FUNC (run_config), NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (bottom), config_button, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (bottom), config_button, FALSE, FALSE, 0);
|
||||||
|
@ -1028,7 +1066,7 @@ main (int argc, char **argv)
|
||||||
|
|
||||||
capplet_gtk_main ();
|
capplet_gtk_main ();
|
||||||
|
|
||||||
if (state != STATE_IDLE) {
|
if (restart_pending) {
|
||||||
quit_pending = TRUE;
|
quit_pending = TRUE;
|
||||||
gtk_main();
|
gtk_main();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue