[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] pspp lib/gtksheet/ChangeLog lib/gtksheet/gtkshe...
From: |
John Darrington |
Subject: |
[Pspp-cvs] pspp lib/gtksheet/ChangeLog lib/gtksheet/gtkshe... |
Date: |
Fri, 21 Sep 2007 01:53:58 +0000 |
CVSROOT: /sources/pspp
Module name: pspp
Changes by: John Darrington <jmd> 07/09/21 01:53:58
Modified files:
lib/gtksheet : ChangeLog gtksheet.c
src/ui/gui : ChangeLog psppire-dict.c psppire-var-store.c
Log message:
Added a BACKEND_CHANGED signal on PsppireDict, and handled it
accordingly.
Closes bug #20821
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/lib/gtksheet/ChangeLog?cvsroot=pspp&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/pspp/lib/gtksheet/gtksheet.c?cvsroot=pspp&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/ChangeLog?cvsroot=pspp&r1=1.87&r2=1.88
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/psppire-dict.c?cvsroot=pspp&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/psppire-var-store.c?cvsroot=pspp&r1=1.27&r2=1.28
Patches:
Index: lib/gtksheet/ChangeLog
===================================================================
RCS file: /sources/pspp/pspp/lib/gtksheet/ChangeLog,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- lib/gtksheet/ChangeLog 24 Jul 2007 13:05:05 -0000 1.18
+++ lib/gtksheet/ChangeLog 21 Sep 2007 01:53:58 -0000 1.19
@@ -1,3 +1,8 @@
+21 Septempber 2007 John Darrington <address@hidden>
+
+ * gtksheet.c (range_update_callback): Scroll to cell 0,0 if the
+ current position is outside the model's range.
+
24 July 2007 John Darrington <address@hidden>
* gtksheet.c gtksheet.h: Removed the `clip' feature, which IMO
Index: lib/gtksheet/gtksheet.c
===================================================================
RCS file: /sources/pspp/pspp/lib/gtksheet/gtksheet.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- lib/gtksheet/gtksheet.c 18 Aug 2007 02:52:35 -0000 1.30
+++ lib/gtksheet/gtksheet.c 21 Sep 2007 01:53:58 -0000 1.31
@@ -1320,6 +1320,15 @@
range.rowi = rowi;
range.coli = coli;
+ if ( MAX_VISIBLE_ROW (sheet) >
+ g_sheet_model_get_row_count (sheet->model)
+ ||
+ MAX_VISIBLE_COLUMN (sheet) >
+ g_sheet_model_get_column_count (sheet->model))
+ {
+ gtk_sheet_move_query (sheet, 0, 0);
+ }
+
if ( ( row0 < 0 && col0 < 0 ) || ( rowi < 0 && coli < 0 ) )
{
gint i;
Index: src/ui/gui/ChangeLog
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/ChangeLog,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -b -r1.87 -r1.88
--- src/ui/gui/ChangeLog 19 Sep 2007 04:29:00 -0000 1.87
+++ src/ui/gui/ChangeLog 21 Sep 2007 01:53:58 -0000 1.88
@@ -1,3 +1,14 @@
+2007-09-27 John Darrington <address@hidden>
+
+ Addressing bug #20821:
+
+ * psppire-dict.c: Added a BACKEND_CHANGED signal to indicate when
+ a PsppireDict's struct dictionary has been replaced.
+
+ * psppire-var-store.c: Added the appropriate method for
+ get_column_count. Added a signal handler for dict:BACKEND_CHANGED,
+ which calls the g_sheet_model_range_changed for the entire sheet.
+
2007-09-18 Ben Pfaff <address@hidden>
* helper.c (create_casereader_from_data_store): New function.
Index: src/ui/gui/psppire-dict.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/psppire-dict.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- src/ui/gui/psppire-dict.c 19 Sep 2007 04:29:00 -0000 1.33
+++ src/ui/gui/psppire-dict.c 21 Sep 2007 01:53:58 -0000 1.34
@@ -42,14 +42,19 @@
/* --- variables --- */
static GObjectClass *parent_class = NULL;
-enum {VARIABLE_CHANGED,
+enum {
+ BACKEND_CHANGED,
+
+ VARIABLE_CHANGED,
VARIABLE_RESIZED,
VARIABLE_INSERTED,
VARIABLE_DELETED,
+
WEIGHT_CHANGED,
FILTER_CHANGED,
SPLIT_CHANGED,
- n_SIGNALS};
+ n_SIGNALS
+};
static guint signals [n_SIGNALS];
@@ -106,6 +111,17 @@
object_class->finalize = psppire_dict_finalize;
+ signals [BACKEND_CHANGED] =
+ g_signal_new ("backend-changed",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_FIRST,
+ 0,
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0);
+
+
signals [VARIABLE_CHANGED] =
g_signal_new ("variable_changed",
G_TYPE_FROM_CLASS (class),
@@ -289,6 +305,7 @@
psppire_dict_replace_dictionary (PsppireDict *dict, struct dictionary *d)
{
struct variable *var = dict_get_weight (d);
+
dict->dict = d;
weight_changed_callback (d, var ? var_get_dict_index (var) : -1, dict);
@@ -299,6 +316,8 @@
split_changed_callback (d, dict);
dict_set_callbacks (dict->dict, &gui_callbacks, dict);
+
+ g_signal_emit (dict, signals [BACKEND_CHANGED], 0);
}
Index: src/ui/gui/psppire-var-store.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/psppire-var-store.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- src/ui/gui/psppire-var-store.c 18 Jul 2007 00:50:59 -0000 1.27
+++ src/ui/gui/psppire-var-store.c 21 Sep 2007 01:53:58 -0000 1.28
@@ -61,6 +61,7 @@
const gchar *text, glong row, glong
column);
static glong psppire_var_store_get_row_count (const GSheetModel * model);
+static glong psppire_var_store_get_column_count (const GSheetModel * model);
static gchar *text_for_column (const struct variable *pv, gint c, GError
**err);
@@ -223,10 +224,12 @@
+
static void
psppire_var_store_sheet_model_init (GSheetModelIface *iface)
{
iface->get_row_count = psppire_var_store_get_row_count;
+ iface->get_column_count = psppire_var_store_get_column_count;
iface->free_strings = TRUE;
iface->get_string = psppire_var_store_get_string;
iface->set_string = psppire_var_store_set_string;
@@ -288,7 +291,13 @@
g_sheet_model_rows_inserted (model, row, 1);
}
+static void
+refresh (PsppireDict *d, gpointer data)
+{
+ PsppireVarStore *vs = data;
+ g_sheet_model_range_changed (G_SHEET_MODEL (vs), -1, -1, -1, -1);
+}
/**
* psppire_var_store_replace_set_dictionary:
@@ -311,9 +320,11 @@
g_signal_connect (dict, "variable-deleted", G_CALLBACK (var_delete_callback),
var_store);
- g_signal_connect (dict, "variable-inserted", G_CALLBACK
(var_insert_callback),
- var_store);
+ g_signal_connect (dict, "variable-inserted",
+ G_CALLBACK (var_insert_callback), var_store);
+ g_signal_connect (dict, "backend-changed", G_CALLBACK (refresh),
+ var_store);
/* The entire model has changed */
g_sheet_model_range_changed (G_SHEET_MODEL (var_store), -1, -1, -1, -1);
@@ -664,6 +675,13 @@
return rows ;
}
+static glong
+psppire_var_store_get_column_count (const GSheetModel * model)
+{
+ return n_COLS ;
+}
+
+
/* Row related funcs */
static glong
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pspp-cvs] pspp lib/gtksheet/ChangeLog lib/gtksheet/gtkshe...,
John Darrington <=