Commit 88023663 authored by Jody Goldberg's avatar Jody Goldberg

Make Zoom dialog look better.

Fix minor bug.
rename ut_dia_ prefix to gnumeric_dialog_
parent a10c780e
1999-10-07 Jody Goldberg <jgoldberg@home.com>
* src/item-grid.c (item_grid_find_row,
item_grid_find_col) : Return a value in the overflow case.
From : Jon K Hellan <Jon.K.Hellan@item.ntnu.no>
* src/dialogs/dialog-zoom.glade: Place sheet list inside frame.
Use frame label, not list column label.
Add padding.
Use 0 height drawing area to set minimum width of spin button.
1999-10-06 Miguel de Icaza <miguel@gnu.org>
* src/workbook-format-toolbar.c (change_selection_font): Remove
......
1999-10-07 Jody Goldberg <jgoldberg@home.com>
* src/item-grid.c (item_grid_find_row,
item_grid_find_col) : Return a value in the overflow case.
From : Jon K Hellan <Jon.K.Hellan@item.ntnu.no>
* src/dialogs/dialog-zoom.glade: Place sheet list inside frame.
Use frame label, not list column label.
Add padding.
Use 0 height drawing area to set minimum width of spin button.
1999-10-06 Miguel de Icaza <miguel@gnu.org>
* src/workbook-format-toolbar.c (change_selection_font): Remove
......
......@@ -267,7 +267,7 @@ add_check_buttons (GtkWidget *box, check_button_t *cbs)
button = gtk_check_button_new_with_label (cbs[i].name);
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
if (cbs[i].entry_flag) {
entry = ut_dia_entry_new_with_max_length (dialog, 20);
entry = gnumeric_dialog_entry_new_with_max_length (dialog, 20);
gtk_entry_set_text (GTK_ENTRY (entry),
cbs[i].default_entry);
gtk_box_pack_start (GTK_BOX (hbox), entry,
......@@ -339,7 +339,7 @@ add_output_frame(GtkWidget *box, GSList **output_ops)
_("Output Range:"));
*output_ops = GTK_RADIO_BUTTON (r)->group;
gtk_box_pack_start_defaults (GTK_BOX (hbox), r);
output_range_entry = ut_dia_entry_new_with_max_length
output_range_entry = gnumeric_dialog_entry_new_with_max_length
(GNOME_DIALOG (gtk_widget_get_toplevel (box)), 20);
gtk_box_pack_start_defaults (GTK_BOX (hbox),
output_range_entry);
......@@ -577,7 +577,7 @@ dialog_sampling_tool(Workbook *wb, Sheet *sheet)
else
label =
gtk_label_new (_("Number of Samples:"));
sampling_entry[i] = ut_dia_entry_new_with_max_length
sampling_entry[i] = gnumeric_dialog_entry_new_with_max_length
(GNOME_DIALOG (dialog), 20);
r = gtk_radio_button_new_with_label
(sampling_ops, _(sample_method_ops[i]));
......
......@@ -40,7 +40,7 @@ order_box_new(GtkWidget * parent, const char *frame_text, const char *default_te
GtkTable *tt;
tt = GTK_TABLE(gtk_table_new(0, 0, 0));
gtk_table_attach(tt, gtk_label_new(_("Column:")), 0, 1, 0, 1, 0, 0, 2, 0);
this->rangetext = ut_dia_entry_new_with_max_length
this->rangetext = gnumeric_dialog_entry_new_with_max_length
(GNOME_DIALOG(gtk_widget_get_toplevel(parent)), 5);
gtk_entry_set_text(GTK_ENTRY(this->rangetext), default_text);
gtk_table_attach(tt, this->rangetext, 1, 2, 0, 1, 0, 0, 0, 2);
......
......@@ -273,15 +273,15 @@ dialog_goal_seek (Workbook *wb, Sheet *sheet)
GTK_WINDOW (wb->toplevel));
gnome_dialog_set_default (GNOME_DIALOG(dialog), GNOME_OK);
set_entry = ut_dia_entry_new_with_max_length
set_entry = gnumeric_dialog_entry_new_with_max_length
(GNOME_DIALOG (dialog), MAX_CELL_NAME_LEN);
target_entry = ut_dia_entry_new_with_max_length
target_entry = gnumeric_dialog_entry_new_with_max_length
(GNOME_DIALOG (dialog), MAX_CELL_NAME_LEN);
change_entry = ut_dia_entry_new_with_max_length
change_entry = gnumeric_dialog_entry_new_with_max_length
(GNOME_DIALOG (dialog), MAX_CELL_NAME_LEN);
xmin_entry = ut_dia_entry_new_with_max_length
xmin_entry = gnumeric_dialog_entry_new_with_max_length
(GNOME_DIALOG (dialog), MAX_CELL_NAME_LEN);
xmax_entry = ut_dia_entry_new_with_max_length
xmax_entry = gnumeric_dialog_entry_new_with_max_length
(GNOME_DIALOG (dialog), MAX_CELL_NAME_LEN);
set_label = gtk_label_new (_("Set cell:"));
......
......@@ -55,7 +55,7 @@ dialog_goto_cell (Workbook *wb)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swin),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
entry = ut_dia_entry_new (GNOME_DIALOG (dialog));
entry = gnumeric_dialog_entry_new (GNOME_DIALOG (dialog));
gtk_signal_connect (GTK_OBJECT (clist), "select_row",
GTK_SIGNAL_FUNC (cb_row_selected), entry);
......
......@@ -75,87 +75,119 @@
</child>
<widget>
<class>GtkHBox</class>
<name>hbox2</name>
<homogeneous>False</homogeneous>
<class>GtkVBox</class>
<name>vbox1</name>
<border_width>4</border_width>
<homogeneous>True</homogeneous>
<spacing>0</spacing>
<widget>
<class>GtkVBox</class>
<name>vbox1</name>
<homogeneous>True</homogeneous>
<spacing>0</spacing>
<class>GtkRadioButton</class>
<name>radio_200</name>
<can_focus>True</can_focus>
<label>20_0 %</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>zooms</group>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkRadioButton</class>
<name>radio_100</name>
<can_focus>True</can_focus>
<label>_100 %</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>zooms</group>
<child>
<padding>0</padding>
<expand>True</expand>
<expand>False</expand>
<fill>True</fill>
</child>
</widget>
<widget>
<class>GtkRadioButton</class>
<name>radio_200</name>
<can_focus>True</can_focus>
<label>20_0 %</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>zooms</group>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkRadioButton</class>
<name>radio_75</name>
<can_focus>True</can_focus>
<label>_75 %</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>zooms</group>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkRadioButton</class>
<name>radio_100</name>
<can_focus>True</can_focus>
<label>_100 %</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>zooms</group>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>True</fill>
</child>
</widget>
<widget>
<class>GtkRadioButton</class>
<name>radio_50</name>
<can_focus>True</can_focus>
<label>_50 %</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>zooms</group>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkRadioButton</class>
<name>radio_75</name>
<can_focus>True</can_focus>
<label>_75 %</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>zooms</group>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkRadioButton</class>
<name>radio_25</name>
<can_focus>True</can_focus>
<label>_25%</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>zooms</group>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkRadioButton</class>
<name>radio_50</name>
<can_focus>True</can_focus>
<label>_50 %</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>zooms</group>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkRadioButton</class>
<name>radio_fit_selection</name>
<sensitive>False</sensitive>
<can_focus>True</can_focus>
<label>_Fit Selection %</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>zooms</group>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkHBox</class>
<name>hbox3</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
<widget>
<class>GtkRadioButton</class>
<name>radio_25</name>
<name>radio_custom</name>
<can_focus>True</can_focus>
<label>_25%</label>
<label>_Custom</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>zooms</group>
......@@ -167,14 +199,15 @@
</widget>
<widget>
<class>GtkRadioButton</class>
<name>radio_fit_selection</name>
<sensitive>False</sensitive>
<can_focus>True</can_focus>
<label>_Fit Selection %</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>zooms</group>
<class>GtkLabel</class>
<name>label1</name>
<label>%</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<padding>0</padding>
<expand>False</expand>
......@@ -183,41 +216,22 @@
</widget>
<widget>
<class>GtkHBox</class>
<name>hbox3</name>
<class>GtkVBox</class>
<name>vbox2</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkRadioButton</class>
<name>radio_custom</name>
<can_focus>True</can_focus>
<label>_Custom</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>zooms</group>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>label1</name>
<label>%</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<class>GtkDrawingArea</class>
<name>drawingarea1</name>
<width>60</width>
<height>0</height>
<sensitive>False</sensitive>
<child>
<padding>0</padding>
<expand>False</expand>
......@@ -243,8 +257,8 @@
<page_size>25</page_size>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
</widget>
......@@ -253,39 +267,49 @@
</widget>
<widget>
<class>GtkScrolledWindow</class>
<name>scrolledwindow1</name>
<hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
<vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
<class>GtkFrame</class>
<name>frame1</name>
<label>Sheets</label>
<label_xalign>0</label_xalign>
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
<child>
<padding>0</padding>
<padding>4</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkCList</class>
<name>sheet_list</name>
<can_focus>True</can_focus>
<columns>1</columns>
<column_widths>80</column_widths>
<selection_mode>GTK_SELECTION_EXTENDED</selection_mode>
<show_titles>True</show_titles>
<shadow_type>GTK_SHADOW_IN</shadow_type>
<class>GtkScrolledWindow</class>
<name>scrolledwindow1</name>
<hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
<vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label2</name>
<label>Sheets</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<class>GtkCList</class>
<name>sheet_list</name>
<border_width>4</border_width>
<can_focus>True</can_focus>
<columns>1</columns>
<column_widths>80</column_widths>
<selection_mode>GTK_SELECTION_EXTENDED</selection_mode>
<show_titles>False</show_titles>
<shadow_type>GTK_SHADOW_IN</shadow_type>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label2</name>
<sensitive>False</sensitive>
<label>Sheets</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
</widget>
</widget>
</widget>
......
......@@ -10,7 +10,7 @@
#include "utils-dialog.h"
/*
* ut_dia_entry_new
* gnumeric_dialog_entry_new
*
* @dialog: parent dialog window
*
......@@ -18,7 +18,7 @@
* activate the default button.
*/
GtkWidget *
ut_dia_entry_new (GnomeDialog *dialog)
gnumeric_dialog_entry_new (GnomeDialog *dialog)
{
GtkWidget *entry;
......@@ -29,7 +29,7 @@ ut_dia_entry_new (GnomeDialog *dialog)
}
/*
* ut_dia_entry_new_with_max_length
* gnumeric_dialog_entry_new_with_max_length
*
* @dialog: parent dialog window
* @max: max text length
......@@ -38,7 +38,7 @@ ut_dia_entry_new (GnomeDialog *dialog)
* makes <Enter> activate the default button.
*/
GtkWidget *
ut_dia_entry_new_with_max_length (GnomeDialog *dialog, guint16 max)
gnumeric_dialog_entry_new_with_max_length (GnomeDialog *dialog, guint16 max)
{
GtkWidget *entry;
......@@ -57,7 +57,7 @@ hbox_pack_label_and_entry(char *str, char *default_str,
box = gtk_hbox_new (FALSE, 0);
dialog = GNOME_DIALOG (gtk_widget_get_toplevel (GTK_WIDGET (vbox)));
entry = ut_dia_entry_new_with_max_length (dialog, entry_len);
entry = gnumeric_dialog_entry_new_with_max_length (dialog, entry_len);
label = gtk_label_new (str);
gtk_entry_set_text (GTK_ENTRY (entry), default_str);
......
#ifndef GNUMERIC_UTILS_DIALOG_H
#define GNUMERIC_UTILS_DIALOG_H
GtkWidget *ut_dia_entry_new (GnomeDialog *dialog);
GtkWidget *gnumeric_dialog_entry_new (GnomeDialog *dialog);
GtkWidget *ut_dia_entry_new_with_max_length (GnomeDialog *dialog, guint16 max);
GtkWidget *gnumeric_dialog_entry_new_with_max_length (GnomeDialog *dialog, guint16 max);
GtkWidget *
hbox_pack_label_and_entry(char *str, char *default_str,
......
......@@ -185,6 +185,8 @@ item_grid_find_col (ItemGrid *item_grid, int x, int *col_origin)
col++;
pixel += ci->pixels;
} while (col < SHEET_MAX_COLS);
return SHEET_MAX_COLS-1;
}
/*
......@@ -214,6 +216,7 @@ item_grid_find_row (ItemGrid *item_grid, int y, int *row_origin)
row++;
pixel += ri->pixels;
} while (row < SHEET_MAX_ROWS);
return SHEET_MAX_ROWS-1;
}
/*
......
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