Commit 1a5a3140 authored by Almer S. Tigelaar's avatar Almer S. Tigelaar Committed by Almer S. Tigelaar
Browse files

Callback timer routine, re-enables the toolbars.

2001-05-02  Almer S. Tigelaar  <almer@gnome.org>

	* src/workbook-edit.c (cb_thaw_ui_toolbar): Callback timer
	routine, re-enables the toolbars.
	(workbook_edit_set_sensitive): Add a ui timer to eliminate
	toolbar flickering.

	* src/sheet.c (sheet_menu_state_enable_insert): Clean-up.
parent 63eff1d1
......@@ -71,10 +71,6 @@ Long term breakage
PARTIAL : we need to merge the StyleFormat and the regexp. Currently only
works for Text formats.
- We should put the sensitization/desensitization of the toolbars
on a timer/idle hander so that it will not trigger until a second
or so after the edit starts/ends. This will decrease the irritating
flashing when entering data quickly.
- The currency list in the format dialog needs to be sorted for the locale
- When applying a currency symbol we need to store the NON-localized id.
- Inc/Dec precision should work. Try "44", click $, then add/remove decimals.
......
2001-05-02 Almer S. Tigelaar <almer@gnome.org>
* src/workbook-edit.c (cb_thaw_ui_toolbar): Callback timer
routine, re-enables the toolbars.
(workbook_edit_set_sensitive): Add a ui timer to eliminate
toolbar flickering.
* src/sheet.c (sheet_menu_state_enable_insert): Clean-up.
2001-05-01 Almer S. Tigelaar <almer@gnome.org>
* src/parser.y (yylex): Seek for matching )'s for ('s and
......
2001-05-02 Almer S. Tigelaar <almer@gnome.org>
* src/workbook-edit.c (cb_thaw_ui_toolbar): Callback timer
routine, re-enables the toolbars.
(workbook_edit_set_sensitive): Add a ui timer to eliminate
toolbar flickering.
* src/sheet.c (sheet_menu_state_enable_insert): Clean-up.
2001-05-01 Almer S. Tigelaar <almer@gnome.org>
* src/parser.y (yylex): Seek for matching )'s for ('s and
......
2001-05-02 Almer S. Tigelaar <almer@gnome.org>
* src/workbook-edit.c (cb_thaw_ui_toolbar): Callback timer
routine, re-enables the toolbars.
(workbook_edit_set_sensitive): Add a ui timer to eliminate
toolbar flickering.
* src/sheet.c (sheet_menu_state_enable_insert): Clean-up.
2001-05-01 Almer S. Tigelaar <almer@gnome.org>
* src/parser.y (yylex): Seek for matching )'s for ('s and
......
2001-05-02 Almer S. Tigelaar <almer@gnome.org>
* src/workbook-edit.c (cb_thaw_ui_toolbar): Callback timer
routine, re-enables the toolbars.
(workbook_edit_set_sensitive): Add a ui timer to eliminate
toolbar flickering.
* src/sheet.c (sheet_menu_state_enable_insert): Clean-up.
2001-05-01 Almer S. Tigelaar <almer@gnome.org>
* src/parser.y (yylex): Seek for matching )'s for ('s and
......
2001-05-02 Almer S. Tigelaar <almer@gnome.org>
* src/workbook-edit.c (cb_thaw_ui_toolbar): Callback timer
routine, re-enables the toolbars.
(workbook_edit_set_sensitive): Add a ui timer to eliminate
toolbar flickering.
* src/sheet.c (sheet_menu_state_enable_insert): Clean-up.
2001-05-01 Almer S. Tigelaar <almer@gnome.org>
* src/parser.y (yylex): Seek for matching )'s for ('s and
......
......@@ -3826,10 +3826,6 @@ sheet_menu_state_enable_insert (Sheet *sheet, gboolean col, gboolean row)
if (!col_change && !row_change && !cell_change)
return;
sheet->priv->enable_insert_cols = col;
sheet->priv->enable_insert_rows = row;
sheet->priv->enable_insert_cells = (col|row);
WORKBOOK_FOREACH_VIEW (sheet->workbook, view, {
if (sheet == wb_view_cur_sheet (view)) {
WORKBOOK_VIEW_FOREACH_CONTROL(view, wbc,
......
......@@ -74,6 +74,7 @@ struct _WorkbookControlGUI {
GtkWidget *func_button;
gboolean updating_ui;
gint ui_timer;
/* Auto completion */
void *auto_complete; /* GtkType is (Complete *) */
......
......@@ -54,6 +54,31 @@ workbook_auto_complete_destroy (WorkbookControlGUI *wbcg)
}
static gboolean
cb_thaw_ui_toolbar (gpointer *data)
{
WorkbookControlGUI *wbcg = (WorkbookControlGUI *)data;
g_return_val_if_fail (IS_WORKBOOK_CONTROL_GUI (wbcg), FALSE);
#ifdef ENABLE_BONOBO
#warning FIXME : how to quickly sensitize and desensitize a toolbar
#else
gtk_widget_set_sensitive (wbcg->standard_toolbar, TRUE);
gtk_widget_set_sensitive (wbcg->format_toolbar, TRUE);
gtk_widget_set_sensitive (wbcg->object_toolbar, TRUE);
#endif
if (wbcg->ui_timer != 0) {
gtk_timeout_remove (wbcg->ui_timer);
wbcg->ui_timer = 0;
}
return TRUE;
}
/* In milliseconds */
#define UI_THAW_DELAY 500
static void
workbook_edit_set_sensitive (WorkbookControlGUI *wbcg, gboolean flag1, gboolean flag2)
{
......@@ -61,15 +86,28 @@ workbook_edit_set_sensitive (WorkbookControlGUI *wbcg, gboolean flag1, gboolean
gtk_widget_set_sensitive (wbcg->ok_button, flag1);
gtk_widget_set_sensitive (wbcg->cancel_button, flag1);
/* Toolbars are insensitive while editing */
gtk_widget_set_sensitive (wbcg->func_button, flag2);
/* Remove previous ui timer */
if (wbcg->ui_timer != 0) {
gtk_timeout_remove (wbcg->ui_timer);
wbcg->ui_timer = 0;
}
/* Toolbars are insensitive while editing */
if (flag2) {
/* We put the re-enabling of the ui on a timer */
wbcg->ui_timer = gtk_timeout_add (UI_THAW_DELAY, (GtkFunction) cb_thaw_ui_toolbar,
wbcg);
} else {
#ifdef ENABLE_BONOBO
#warning FIXME : how to quickly sensitize and desensitize a toolbar
#else
gtk_widget_set_sensitive (wbcg->standard_toolbar, flag2);
gtk_widget_set_sensitive (wbcg->format_toolbar, flag2);
gtk_widget_set_sensitive (wbcg->object_toolbar, flag2);
gtk_widget_set_sensitive (wbcg->standard_toolbar, flag2);
gtk_widget_set_sensitive (wbcg->format_toolbar, flag2);
gtk_widget_set_sensitive (wbcg->object_toolbar, flag2);
#endif
}
}
gboolean
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment