gnumeric r16642 - in trunk: . src
- From: jody svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r16642 - in trunk: . src
- Date: Sun, 22 Jun 2008 11:26:25 +0000 (UTC)
Author: jody
Date: Sun Jun 22 11:26:24 2008
New Revision: 16642
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16642&view=rev
Log:
* Add alignment to row/col headers for small scales. [#154687]
* Fix object leakage when quiting with a selected object caused by the recent change.
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/src/gnm-pane.c
trunk/src/sheet-control-gui.c
trunk/src/wbc-gtk.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Sun Jun 22 11:26:24 2008
@@ -16,6 +16,8 @@
* Fix highlighting of merged cells. [#127415]
* Fix PageSetup on windows.
* Make object insertion more flexible. [#97216]
+ * Add alignment to row/col headers for small scales. [#154687]
+ * Support Some XLM functions commonly used in charting.
Morten:
* Fix Excel export problem for strings that need quoting. [#530704]
Modified: trunk/src/gnm-pane.c
==============================================================================
--- trunk/src/gnm-pane.c (original)
+++ trunk/src/gnm-pane.c Sun Jun 22 11:26:24 2008
@@ -48,10 +48,7 @@
#include <goffice/cut-n-paste/foocanvas/foo-canvas-rect-ellipse.h>
#include <gsf/gsf-impl-utils.h>
-#include <gtk/gtkdnd.h>
-#include <gtk/gtkseparatormenuitem.h>
-#include <gtk/gtkimagemenuitem.h>
-#include <gtk/gtklabel.h>
+#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include <string.h>
@@ -964,6 +961,7 @@
gboolean is_col_header)
{
Sheet *sheet;
+ GtkWidget *alignment;
FooCanvas *canvas = gnm_simple_canvas_new (scg);
FooCanvasGroup *group = FOO_CANVAS_GROUP (canvas->root);
FooCanvasItem *item = foo_canvas_item_new (group,
@@ -980,10 +978,14 @@
if (is_col_header) {
pane->col.canvas = canvas;
pane->col.item = ITEM_BAR (item);
+ alignment = pane->col.alignment = gtk_alignment_new (0, 1, 1, 0);
} else {
pane->row.canvas = canvas;
pane->row.item = ITEM_BAR (item);
+ alignment = pane->row.alignment = gtk_alignment_new (1, 0, 0, 1);
}
+ gtk_container_add (GTK_CONTAINER (alignment), GTK_WIDGET (canvas));
+
pane->size_guide.points = NULL;
pane->size_guide.start = NULL;
pane->size_guide.guide = NULL;
Modified: trunk/src/sheet-control-gui.c
==============================================================================
--- trunk/src/sheet-control-gui.c (original)
+++ trunk/src/sheet-control-gui.c Sun Jun 22 11:26:24 2008
@@ -1093,7 +1093,7 @@
GTK_EXPAND | GTK_FILL | GTK_SHRINK,
0, 0);
gtk_table_attach (scg->inner_table,
- GTK_WIDGET (scg->pane[1]->col.canvas),
+ GTK_WIDGET (scg->pane[1]->col.alignment),
1, 2, 0, 1,
GTK_FILL | GTK_SHRINK,
GTK_FILL,
@@ -1127,7 +1127,7 @@
GTK_FILL | GTK_SHRINK,
0, 0);
gtk_table_attach (scg->inner_table,
- GTK_WIDGET (scg->pane[3]->row.canvas),
+ GTK_WIDGET (scg->pane[3]->row.alignment),
0, 1, 1, 2,
GTK_FILL | GTK_SHRINK,
GTK_FILL,
@@ -1415,12 +1415,12 @@
GTK_FILL,
GTK_FILL,
0, 0);
- gtk_table_attach (scg->inner_table, GTK_WIDGET (scg->pane[0]->col.canvas),
+ gtk_table_attach (scg->inner_table, GTK_WIDGET (scg->pane[0]->col.alignment),
2, 3, 0, 1,
GTK_EXPAND | GTK_FILL | GTK_SHRINK,
GTK_FILL,
0, 0);
- gtk_table_attach (scg->inner_table, GTK_WIDGET (scg->pane[0]->row.canvas),
+ gtk_table_attach (scg->inner_table, GTK_WIDGET (scg->pane[0]->row.alignment),
0, 1, 2, 3,
GTK_FILL,
GTK_EXPAND | GTK_FILL | GTK_SHRINK,
@@ -1632,16 +1632,16 @@
SCG_FOREACH_PANE (scg, pane, {
if (pane->col.canvas != NULL) {
if (sheet->hide_col_header)
- gtk_widget_hide (GTK_WIDGET (pane->col.canvas));
+ gtk_widget_hide (GTK_WIDGET (pane->col.alignment));
else
- gtk_widget_show (GTK_WIDGET (pane->col.canvas));
+ gtk_widget_show (GTK_WIDGET (pane->col.alignment));
}
if (pane->row.canvas != NULL) {
if (sheet->hide_row_header)
- gtk_widget_hide (GTK_WIDGET (pane->row.canvas));
+ gtk_widget_hide (GTK_WIDGET (pane->row.alignment));
else
- gtk_widget_show (GTK_WIDGET (pane->row.canvas));
+ gtk_widget_show (GTK_WIDGET (pane->row.alignment));
}
});
@@ -1943,12 +1943,13 @@
if (scg->wbcg != NULL) /* Can be NULL during destruction */
wbcg_insert_object_clear (scg->wbcg);
+ scg_object_unselect (scg, NULL);
+
/* During destruction we have already been disconnected
* so don't bother changing the cursor */
if (scg->table != NULL &&
scg_sheet (scg) != NULL &&
scg_view (scg) != NULL) {
- scg_object_unselect (scg, NULL);
scg_set_display_cursor (scg);
scg_cursor_visible (scg, TRUE);
}
Modified: trunk/src/wbc-gtk.c
==============================================================================
--- trunk/src/wbc-gtk.c (original)
+++ trunk/src/wbc-gtk.c Sun Jun 22 11:26:24 2008
@@ -4083,7 +4083,7 @@
g_return_if_fail (perr.err != NULL);
wb_control_validation_msg (WORKBOOK_CONTROL (scg_wbcg (scg)),
- VALIDATION_STYLE_PARSE_ERROR, NULL, perr.err->message);
+ VALIDATION_STYLE_INFO, NULL, perr.err->message);
parse_error_free (&perr);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]