Commit b9075446 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

Set the size after initializing everything else.


2000-08-15  Jody Goldberg <jgoldberg@home.com>

	* src/workbook.c (workbook_new) : Set the size after initializing
	  everything else.

	* src/workbook-view.c (workbook_view_set_size) : size the notebook,
	  not the toplevel window.

	* src/colrow.h (ROW_INTERNAL_HEIGHT) : Delete.

	* configure.in : CVS bonobo is 0.18.
parent 331cc9ff
2000-08-15 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c (workbook_new) : Set the size after initializing
everything else.
* src/workbook-view.c (workbook_view_set_size) : size the notebook,
not the toplevel window.
* src/colrow.h (ROW_INTERNAL_HEIGHT) : Delete.
* configure.in : CVS bonobo is 0.18.
2000-08-14 Jody Goldberg <jgoldberg@home.com> 2000-08-14 Jody Goldberg <jgoldberg@home.com>
* src/print-cell.c (print_cell) : Sync with * src/print-cell.c (print_cell) : Sync with
......
2000-08-15 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c (workbook_new) : Set the size after initializing
everything else.
* src/workbook-view.c (workbook_view_set_size) : size the notebook,
not the toplevel window.
* src/colrow.h (ROW_INTERNAL_HEIGHT) : Delete.
* configure.in : CVS bonobo is 0.18.
2000-08-14 Jody Goldberg <jgoldberg@home.com> 2000-08-14 Jody Goldberg <jgoldberg@home.com>
* src/print-cell.c (print_cell) : Sync with * src/print-cell.c (print_cell) : Sync with
......
2000-08-15 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c (workbook_new) : Set the size after initializing
everything else.
* src/workbook-view.c (workbook_view_set_size) : size the notebook,
not the toplevel window.
* src/colrow.h (ROW_INTERNAL_HEIGHT) : Delete.
* configure.in : CVS bonobo is 0.18.
2000-08-14 Jody Goldberg <jgoldberg@home.com> 2000-08-14 Jody Goldberg <jgoldberg@home.com>
* src/print-cell.c (print_cell) : Sync with * src/print-cell.c (print_cell) : Sync with
......
2000-08-15 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c (workbook_new) : Set the size after initializing
everything else.
* src/workbook-view.c (workbook_view_set_size) : size the notebook,
not the toplevel window.
* src/colrow.h (ROW_INTERNAL_HEIGHT) : Delete.
* configure.in : CVS bonobo is 0.18.
2000-08-14 Jody Goldberg <jgoldberg@home.com> 2000-08-14 Jody Goldberg <jgoldberg@home.com>
* src/print-cell.c (print_cell) : Sync with * src/print-cell.c (print_cell) : Sync with
......
2000-08-15 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c (workbook_new) : Set the size after initializing
everything else.
* src/workbook-view.c (workbook_view_set_size) : size the notebook,
not the toplevel window.
* src/colrow.h (ROW_INTERNAL_HEIGHT) : Delete.
* configure.in : CVS bonobo is 0.18.
2000-08-14 Jody Goldberg <jgoldberg@home.com> 2000-08-14 Jody Goldberg <jgoldberg@home.com>
* src/print-cell.c (print_cell) : Sync with * src/print-cell.c (print_cell) : Sync with
......
2000-08-15 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c (workbook_new) : Set the size after initializing
everything else.
* src/workbook-view.c (workbook_view_set_size) : size the notebook,
not the toplevel window.
* src/colrow.h (ROW_INTERNAL_HEIGHT) : Delete.
* configure.in : CVS bonobo is 0.18.
2000-08-14 Jody Goldberg <jgoldberg@home.com> 2000-08-14 Jody Goldberg <jgoldberg@home.com>
* src/print-cell.c (print_cell) : Sync with * src/print-cell.c (print_cell) : Sync with
......
2000-08-15 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c (workbook_new) : Set the size after initializing
everything else.
* src/workbook-view.c (workbook_view_set_size) : size the notebook,
not the toplevel window.
* src/colrow.h (ROW_INTERNAL_HEIGHT) : Delete.
* configure.in : CVS bonobo is 0.18.
2000-08-14 Jody Goldberg <jgoldberg@home.com> 2000-08-14 Jody Goldberg <jgoldberg@home.com>
* src/print-cell.c (print_cell) : Sync with * src/print-cell.c (print_cell) : Sync with
......
...@@ -10,7 +10,6 @@ AC_DISABLE_STATIC ...@@ -10,7 +10,6 @@ AC_DISABLE_STATIC
AC_ISC_POSIX AC_ISC_POSIX
AC_PROG_CC AC_PROG_CC
AC_PROG_CXX
AC_PROG_YACC AC_PROG_YACC
AM_PROG_LEX AM_PROG_LEX
AC_STDC_HEADERS AC_STDC_HEADERS
...@@ -205,10 +204,10 @@ AC_ARG_WITH(bonobo, ...@@ -205,10 +204,10 @@ AC_ARG_WITH(bonobo,
gnumeric_executable=gnumeric gnumeric_executable=gnumeric
AC_SUBST(gnumeric_executable) AC_SUBST(gnumeric_executable)
if $try_bonobo; then if $try_bonobo; then
AC_MSG_CHECKING(for Bonobo == 0.17) AC_MSG_CHECKING(for Bonobo == 0.18)
vers=`gnome-config --modversion bonobo | sed -e "s/bonobo-//" | \ vers=`gnome-config --modversion bonobo | sed -e "s/bonobo-//" | \
awk 'BEGIN { FS = "."; } { printf "%d", $1 * 1000 + $2;}'` awk 'BEGIN { FS = "."; } { printf "%d", $1 * 1000 + $2;}'`
if test "$vers" -eq 17; then if test "$vers" -eq 18; then
AC_MSG_RESULT(found) AC_MSG_RESULT(found)
AC_DEFINE(ENABLE_BONOBO) AC_DEFINE(ENABLE_BONOBO)
have_bonobo=true have_bonobo=true
......
...@@ -262,6 +262,7 @@ gnumeric_bonobo_LDADD = \ ...@@ -262,6 +262,7 @@ gnumeric_bonobo_LDADD = \
$(gnumeric_libs) \ $(gnumeric_libs) \
-lbonobo-print \ -lbonobo-print \
../idl/libGnumeric.a \ ../idl/libGnumeric.a \
../idl/libGnumericGraphs.a \
$(EXTRA_GNOME_LIBS) \ $(EXTRA_GNOME_LIBS) \
$(GNOME_XML_LIB) \ $(GNOME_XML_LIB) \
$(GUILE_LIBS) \ $(GUILE_LIBS) \
......
...@@ -31,7 +31,6 @@ struct _ColRowCollection ...@@ -31,7 +31,6 @@ struct _ColRowCollection
}; };
#define COL_INTERNAL_WIDTH(col) ((col)->size_pixels - ((col)->margin_b + (col)->margin_a + 1)) #define COL_INTERNAL_WIDTH(col) ((col)->size_pixels - ((col)->margin_b + (col)->margin_a + 1))
#define ROW_INTERNAL_HEIGHT(row) ((row)->size_pixels - ((row)->margin_b + (row)->margin_a + 1))
gboolean col_row_foreach (ColRowCollection const *infos, gboolean col_row_foreach (ColRowCollection const *infos,
int first, int last, int first, int last,
......
...@@ -133,9 +133,10 @@ workbook_view_set_size (Workbook const * const wb, ...@@ -133,9 +133,10 @@ workbook_view_set_size (Workbook const * const wb,
{ {
int const screen_width = gdk_screen_width (); int const screen_width = gdk_screen_width ();
int const screen_height = gdk_screen_height (); int const screen_height = gdk_screen_height ();
gtk_window_set_default_size (GTK_WINDOW (wb->toplevel),
MIN (screen_width - 64, width_pixels), gtk_widget_set_usize (wb->notebook,
MIN (screen_height - 64, height_pixels)); MIN (screen_width - 64, width_pixels),
MIN (screen_height - 64, height_pixels));
} }
/** /**
......
...@@ -2663,13 +2663,6 @@ workbook_new (void) ...@@ -2663,13 +2663,6 @@ workbook_new (void)
wb->show_vertical_scrollbar = TRUE; wb->show_vertical_scrollbar = TRUE;
wb->show_notebook_tabs = TRUE; wb->show_notebook_tabs = TRUE;
gtk_window_set_policy (GTK_WINDOW (wb->toplevel), 1, 1, 0);
sx = MAX (gdk_screen_width () - 64, 600);
sy = MAX (gdk_screen_height () - 64, 200);
sx = (sx * 3) / 4;
sy = (sy * 3) / 4;
workbook_view_set_size (wb, sx, sy);
/* Assign a default name */ /* Assign a default name */
do { do {
char *name = g_strdup_printf (_("Book%d.gnumeric"), ++count); char *name = g_strdup_printf (_("Book%d.gnumeric"), ++count);
...@@ -2758,6 +2751,15 @@ workbook_new (void) ...@@ -2758,6 +2751,15 @@ workbook_new (void)
GTK_SIGNAL_FUNC (cb_scroll_wheel_support), GTK_SIGNAL_FUNC (cb_scroll_wheel_support),
wb); wb);
/* Now that everything is initialized set the size */
/* TODO : use gnome-config ? */
gtk_window_set_policy (GTK_WINDOW (wb->toplevel), TRUE, TRUE, FALSE);
sx = MAX (gdk_screen_width () - 64, 600);
sy = MAX (gdk_screen_height () - 64, 200);
sx = (sx * 3) / 4;
sy = (sy * 3) / 4;
workbook_view_set_size (wb, sx, sy);
gtk_widget_show_all (wb->priv->table); gtk_widget_show_all (wb->priv->table);
return wb; return wb;
......
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