Commit 68dc3d8d authored by Jody Goldberg's avatar Jody Goldberg

Some UI fixes.

parent 23d9c1a4
1999-10-05 Jody Goldberg <jgoldberg@home.com>
From : Jon K Hellan <Jon.K.Hellan@item.ntnu.no>
* src/dialogs/sheet-rename.glade: Made OK button default.
* dialog-simple-input.c
(dialog_get_number) : gnome_dialog_run instead of run_and_close -
otherwise entry widget is destroyed before it is read. Make
<Enter> in entry field activate default button.
(dialog_get_sheet_name) : As above
* src/workbook.c (workbook_rename_sheet): Update notebook label
* src/workbook-cmd-format.c
(workbook_cmd_format_column_width,
workbook_cmd_format_row_height): Off by one error.
1999-10-04 Jody Goldberg <jgoldberg@home.com>
From: Nick Lamb <njl98r@ecs.soton.ac.uk>
* src/cursors.c (cursors_init, create_bitmap_and_mask_from_xpm) :
A small patch to invert the logic when handling black vs white in
cursors. This works around a problem with some Xservers.
Bug 808.
1999-09-30 Miguel de Icaza <miguel@gnu.org>
* src/Gnumeric-value.idl: New file, move the value structure
......
1999-10-05 Jody Goldberg <jgoldberg@home.com>
From : Jon K Hellan <Jon.K.Hellan@item.ntnu.no>
* src/dialogs/sheet-rename.glade: Made OK button default.
* dialog-simple-input.c
(dialog_get_number) : gnome_dialog_run instead of run_and_close -
otherwise entry widget is destroyed before it is read. Make
<Enter> in entry field activate default button.
(dialog_get_sheet_name) : As above
* src/workbook.c (workbook_rename_sheet): Update notebook label
* src/workbook-cmd-format.c
(workbook_cmd_format_column_width,
workbook_cmd_format_row_height): Off by one error.
1999-10-04 Jody Goldberg <jgoldberg@home.com>
From: Nick Lamb <njl98r@ecs.soton.ac.uk>
* src/cursors.c (cursors_init, create_bitmap_and_mask_from_xpm) :
A small patch to invert the logic when handling black vs white in
cursors. This works around a problem with some Xservers.
Bug 808.
1999-09-30 Miguel de Icaza <miguel@gnu.org>
* src/Gnumeric-value.idl: New file, move the value structure
......
......@@ -57,7 +57,13 @@ create_bitmap_and_mask_from_xpm (GdkBitmap **bitmap, GdkBitmap **mask, gchar **x
if (xpm [y + yofs][x] != transparent_color){
maskv |= 1 << pix;
if (xpm [y + yofs][x] != black_color){
/*
* Invert the colours here because it seems
* to workaround a bug the Matrox G100 Xserver?
* We reverse the foreground & background in the next
* routine to compensate.
*/
if (xpm [y + yofs][x] == black_color){
value |= 1 << pix;
}
}
......@@ -85,10 +91,14 @@ cursors_init (void)
else {
create_bitmap_and_mask_from_xpm (
&bitmap, &mask, gnumeric_cursors [i].xpm);
/* The foreground and background colours are reversed.
* See comment above for explanation.
*/
gnumeric_cursors [i].cursor =
gdk_cursor_new_from_pixmap (
bitmap, mask,
&gs_white, &gs_black,
&gs_black, &gs_white,
gnumeric_cursors [i].hot_x,
gnumeric_cursors [i].hot_y);
}
......
......@@ -42,10 +42,12 @@ dialog_get_number (Workbook *wb, const char *glade_file, double *init_and_return
gtk_entry_set_text (GTK_ENTRY (entry), buffer);
}
gnome_dialog_editable_enters (dialog, GTK_EDITABLE (entry));
gnome_dialog_set_parent (dialog, GTK_WINDOW (wb->toplevel));
switch (gnome_dialog_run_and_close (dialog)){
switch (gnome_dialog_run (dialog)){
case 1: /* cancel */
break;
case -1: /* window manager close */
return FALSE;
......@@ -53,6 +55,7 @@ dialog_get_number (Workbook *wb, const char *glade_file, double *init_and_return
*init_and_return = atof (gtk_entry_get_text (GTK_ENTRY (entry)));
}
gnome_dialog_close (dialog);
gtk_object_destroy (GTK_OBJECT (gui));
return TRUE;
......@@ -64,7 +67,7 @@ dialog_get_sheet_name (Workbook *wb, const char *current)
GladeXML *gui;
GnomeDialog *dialog;
GtkWidget *entry;
char *str;
char *str = NULL;
gui = glade_xml_new (GNUMERIC_GLADEDIR "/sheet-rename.glade", NULL);
if (!gui)
......@@ -78,10 +81,12 @@ dialog_get_sheet_name (Workbook *wb, const char *current)
entry = glade_xml_get_widget (gui, "entry");
gtk_entry_set_text (GTK_ENTRY (entry), current);
gnome_dialog_editable_enters (dialog, GTK_EDITABLE (entry));
gnome_dialog_set_parent (dialog, GTK_WINDOW (wb->toplevel));
switch (gnome_dialog_run_and_close (dialog)){
switch (gnome_dialog_run (dialog)){
case 1: /* cancel */
break;
case -1: /* window manager close */
return NULL;
......@@ -89,6 +94,7 @@ dialog_get_sheet_name (Workbook *wb, const char *current)
str = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry)));
}
gnome_dialog_close (dialog);
gtk_object_destroy (GTK_OBJECT (gui));
return str;
......
......@@ -117,6 +117,7 @@
<class>GtkButton</class>
<name>button1</name>
<can_default>True</can_default>
<has_default>True</has_default>
<can_focus>True</can_focus>
<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
</widget>
......
......@@ -91,7 +91,7 @@ workbook_cmd_format_column_width (GtkWidget *widget, Workbook *wb)
SheetSelection *ss = l->data;
int col;
for (col = ss->user.start.col; col < ss->user.end.col; col++)
for (col = ss->user.start.col; col <= ss->user.end.col; col++)
sheet_col_set_width_units (sheet, col, value);
}
sheet_set_dirty (sheet, TRUE);
......@@ -170,7 +170,7 @@ workbook_cmd_format_row_height (GtkWidget *widget, Workbook *wb)
SheetSelection *ss = l->data;
int row;
for (row = ss->user.start.row; row < ss->user.end.row; row++)
for (row = ss->user.start.row; row <= ss->user.end.row; row++)
sheet_row_set_height_units (sheet, row, value, TRUE);
}
sheet_set_dirty (sheet, TRUE);
......
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