Commit fee74d01 authored by Miguel de Icaza's avatar Miguel de Icaza Committed by Arturo Espinosa

save and restore the last page used during a cell style application.

1998-09-10  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/dialog-cell-format.c (dialog_cell_format): save and restore
	the last page used during a cell style application.

	* src/item-edit.c (item_edit_draw): Do not shift the characters
	one pixel to draw the cursor.
parent a8fed65a
1998-09-10 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/dialog-cell-format.c (dialog_cell_format): save and restore
the last page used during a cell style application.
* src/item-edit.c (item_edit_draw): Do not shift the characters
one pixel to draw the cursor.
1998-09-09 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/dialog-cell-format.c (create_background_radio): Use the new
......
1998-09-10 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/dialog-cell-format.c (dialog_cell_format): save and restore
the last page used during a cell style application.
* src/item-edit.c (item_edit_draw): Do not shift the characters
one pixel to draw the cursor.
1998-09-09 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/dialog-cell-format.c (create_background_radio): Use the new
......
1998-09-10 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/dialog-cell-format.c (dialog_cell_format): save and restore
the last page used during a cell style application.
* src/item-edit.c (item_edit_draw): Do not shift the characters
one pixel to draw the cursor.
1998-09-09 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/dialog-cell-format.c (create_background_radio): Use the new
......
1998-09-10 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/dialog-cell-format.c (dialog_cell_format): save and restore
the last page used during a cell style application.
* src/item-edit.c (item_edit_draw): Do not shift the characters
one pixel to draw the cursor.
1998-09-09 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/dialog-cell-format.c (create_background_radio): Use the new
......
......@@ -6,4 +6,4 @@
#undef HAVE_GETTEXT
#undef HAVE_LC_MESSAGES
#undef HAVE_STPCPY
#undef HAVE_ORBIT
......@@ -17,6 +17,7 @@
/* The main dialog box */
static GtkWidget *cell_format_prop_win = 0;
static int cell_format_last_page_used = 0;
/* These point to the various widgets in the format/number page */
static GtkWidget *number_sample;
......@@ -763,7 +764,10 @@ cell_properties_apply (GtkObject *w, int page, CellList *cells)
static void
cell_properties_close (void)
{
GnomePropertyBox *pbox = GNOME_PROPERTY_BOX (cell_format_prop_win);
gtk_main_quit ();
cell_format_last_page_used = gtk_notebook_current_page (pbox->notebook);
gtk_widget_destroy (cell_format_prop_win);
cell_format_prop_win = 0;
}
......@@ -806,6 +810,10 @@ dialog_cell_format (Sheet *sheet)
gtk_signal_connect (GTK_OBJECT (prop_win), "destroy",
GTK_SIGNAL_FUNC (cell_properties_close), NULL);
gtk_notebook_set_page (
GNOME_PROPERTY_BOX(prop_win)->notebook,
cell_format_last_page_used);
gtk_widget_show (prop_win);
gtk_grab_add (prop_win);
......@@ -817,3 +825,4 @@ dialog_cell_format (Sheet *sheet)
g_list_free (cells);
}
......@@ -17,6 +17,7 @@
/* The main dialog box */
static GtkWidget *cell_format_prop_win = 0;
static int cell_format_last_page_used = 0;
/* These point to the various widgets in the format/number page */
static GtkWidget *number_sample;
......@@ -763,7 +764,10 @@ cell_properties_apply (GtkObject *w, int page, CellList *cells)
static void
cell_properties_close (void)
{
GnomePropertyBox *pbox = GNOME_PROPERTY_BOX (cell_format_prop_win);
gtk_main_quit ();
cell_format_last_page_used = gtk_notebook_current_page (pbox->notebook);
gtk_widget_destroy (cell_format_prop_win);
cell_format_prop_win = 0;
}
......@@ -806,6 +810,10 @@ dialog_cell_format (Sheet *sheet)
gtk_signal_connect (GTK_OBJECT (prop_win), "destroy",
GTK_SIGNAL_FUNC (cell_properties_close), NULL);
gtk_notebook_set_page (
GNOME_PROPERTY_BOX(prop_win)->notebook,
cell_format_last_page_used);
gtk_widget_show (prop_win);
gtk_grab_add (prop_win);
......@@ -817,3 +825,4 @@ dialog_cell_format (Sheet *sheet)
g_list_free (cells);
}
......@@ -79,12 +79,12 @@ item_edit_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
gdk_draw_text (drawable, font, canvas->style->black_gc,
dx, dy + hd - font->descent, text, cursor_pos);
gdk_draw_line (drawable, canvas->style->black_gc,
first_part_len + dx + 1,
first_part_len + dx,
dy + hd - font->descent,
first_part_len + dx + 1,
first_part_len + dx,
dy + hd - (font->ascent + font->descent));
gdk_draw_text (drawable, font, canvas->style->black_gc,
dx + 1 + first_part_len,
dx + first_part_len,
dy + hd - font->descent,
text + cursor_pos, text_len - cursor_pos);
}
......
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