pspp-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pspp-cvs] psppire ./README ./TODO ./psppicon.png ./psppir...


From: John Darrington
Subject: [Pspp-cvs] psppire ./README ./TODO ./psppicon.png ./psppir...
Date: Thu, 22 Dec 2005 08:56:59 +0000

CVSROOT:        /cvsroot/pspp
Module name:    psppire
Branch:         
Changes by:     John Darrington <address@hidden>        05/12/22 08:56:59

Modified files:
        .              : README TODO psppicon.png psppire.glade 
        src            : ChangeLog var_sheet.c var_type_dialog.c 
                         var_type_dialog.h 

Log message:
        Made "toolbars" menu item invisible (until it does something).
        Made the variable sheet update when the var_type_dialog is closed with 
OK.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/psppire/README.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/psppire/TODO.diff?tr1=1.18&tr2=1.19&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/psppire/psppicon.png.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/psppire/psppire.glade.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/psppire/src/ChangeLog.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/psppire/src/var_sheet.c.diff?tr1=1.29&tr2=1.30&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/psppire/src/var_type_dialog.c.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/psppire/src/var_type_dialog.h.diff?tr1=1.6&tr2=1.7&r1=text&r2=text

Patches:
Index: psppire/README
diff -u psppire/README:1.6 psppire/README:1.7
--- psppire/README:1.6  Sat Dec  3 00:13:34 2005
+++ psppire/README      Thu Dec 22 08:56:59 2005
@@ -13,12 +13,11 @@
      formated).
 *    Load/Save data to a system file.
 *    Clear the data and variable sheets (using File-->New).
-
+*    Add Missing Values.
+*    Change details of Custom Currencies, Dates or Dollar formats.
 
 What you can't (yet) do:
 
-*    Add Missing Values.
-*    Change details of Custom Currencies, Dates or Dollar formats.
 *    Enter more cases than the hard coded limits.
 *    Statistical analysis.
 
Index: psppire/TODO
diff -u psppire/TODO:1.18 psppire/TODO:1.19
--- psppire/TODO:1.18   Sun Dec 18 09:44:42 2005
+++ psppire/TODO        Thu Dec 22 08:56:59 2005
@@ -37,8 +37,6 @@
 Task List
 =========
 
-Phase 1 Issues
---------------
 * Value labels currently don't work properly for Date, Dot, Comma variables.
 
 * Implement mechanism for handling errors (use GError ?). 
@@ -47,18 +45,10 @@
 
 * Load/Save portable files.
 
-* Wishlist:
-
-** Support clipboard to cut and paste to/from Gnumeric and other Psppire 
-   instances.
-
-Phase 2 Issues
---------------
-
 * data_sheet.c: value_format_func is one big memory leak.
 
 * The number of cases is limited to the hard coded sheet dimensions. It 
-  need to be unlimited.
+  needs to be unlimited.
 
 * Inserting variables in middle of var sheet.
 
@@ -66,3 +56,9 @@
 
 * Changing variable types and/or formats should do sensible conversion of
   data values.
+
+* Wishlist:
+
+** Support clipboard to cut and paste to/from Gnumeric and other Psppire 
+   instances.
+
Index: psppire/psppicon.png
Index: psppire/psppire.glade
diff -u psppire/psppire.glade:1.16 psppire/psppire.glade:1.17
--- psppire/psppire.glade:1.16  Sun Dec 18 04:57:43 2005
+++ psppire/psppire.glade       Thu Dec 22 08:56:59 2005
@@ -164,7 +164,6 @@
 
                  <child>
                    <widget class="GtkMenuItem" id="toolbars1">
-                     <property name="visible">True</property>
                      <property name="label" 
translatable="yes">Toolbars</property>
                      <property name="use_underline">True</property>
                      <signal name="activate" handler="on_toolbars1_activate" 
last_modification_time="Thu, 24 Nov 2005 10:41:14 GMT"/>
Index: psppire/src/ChangeLog
diff -u psppire/src/ChangeLog:1.11 psppire/src/ChangeLog:1.12
--- psppire/src/ChangeLog:1.11  Sun Dec 18 04:57:43 2005
+++ psppire/src/ChangeLog       Thu Dec 22 08:56:59 2005
@@ -1,3 +1,8 @@
+Thu Dec 22 16:54:56 WST 2005 John Darrington <address@hidden>
+
+       * var_type_dialog.[ch] var_sheet.c: Added callback function to update
+       the variable sheet when the var_type_dialog is closed using OK.
+
 Sun Dec 18 12:41:56 WST 2005 John Darrington <address@hidden>
 
        * var_type_dialog.c: Implemented custom currency type selection.
Index: psppire/src/var_sheet.c
diff -u psppire/src/var_sheet.c:1.29 psppire/src/var_sheet.c:1.30
--- psppire/src/var_sheet.c:1.29        Wed Dec 14 11:39:12 2005
+++ psppire/src/var_sheet.c     Thu Dec 22 08:56:59 2005
@@ -204,7 +204,11 @@
   var->measure = active_item + 1;
 }
 
-
+static void
+set_variable_changed(struct variable *var)
+{
+  pspp_dict_var_changed(pspp_dictionary, var->index);
+}
 
 
 /* Callback whenever the cell on the var sheet is entered or left.
@@ -336,7 +340,8 @@
 
          }
 
-       var_type_dialog_set_state(var_type_dialog, var);
+       var_type_dialog_set_variable(var_type_dialog, 
+                                    set_variable_changed, var);
 
        g_signal_connect_swapped(GTK_OBJECT(customEntry),
                                 "clicked",
Index: psppire/src/var_type_dialog.c
diff -u psppire/src/var_type_dialog.c:1.8 psppire/src/var_type_dialog.c:1.9
--- psppire/src/var_type_dialog.c:1.8   Sun Dec 18 04:57:43 2005
+++ psppire/src/var_type_dialog.c       Thu Dec 22 08:56:59 2005
@@ -659,12 +659,11 @@
 
 }
 
-
-
 /* Set up the state of the dialog box to match the variable VAR */
 void
-var_type_dialog_set_state(struct var_type_dialog *dialog, 
-                         struct variable *var)
+var_type_dialog_set_variable(struct var_type_dialog *dialog, 
+                            variable_changed_func set_variable_changed,
+                            struct variable *var)
 {
   /* Populate width and decimals */
   const struct fmt_spec write_spec = var->write;
@@ -672,6 +671,7 @@
   g_assert(dialog);
 
   dialog->var = var;
+  dialog->var_change_func = set_variable_changed;
   
   GString *str = g_string_new("");
   
@@ -774,7 +774,6 @@
 
 /* Callback for when the var type dialog is closed using the OK button. 
    It sets the appropriate variable accordingly. */
-
 static gint
 on_var_type_ok_clicked(GtkWidget *w, gpointer data)
 {
@@ -837,6 +836,8 @@
     }
 
 
+  dialog->var_change_func(dialog->var);
+
   gtk_widget_hide(dialog->window);
 
   return FALSE;
@@ -852,6 +853,3 @@
   return FALSE;
 }
 
-
-
-
Index: psppire/src/var_type_dialog.h
diff -u psppire/src/var_type_dialog.h:1.6 psppire/src/var_type_dialog.h:1.7
--- psppire/src/var_type_dialog.h:1.6   Sun Dec 18 04:57:43 2005
+++ psppire/src/var_type_dialog.h       Thu Dec 22 08:56:59 2005
@@ -40,6 +40,10 @@
     num_BUTTONS
   };
 
+struct variable;
+
+typedef void (*variable_changed_func)(struct variable *var);
+
 struct var_type_dialog
 {
   GtkWidget *window;
@@ -47,6 +51,9 @@
   /* Variable to be updated */
   struct variable *var;
 
+  /* Function to be run when the dialog changes a variable */
+  variable_changed_func var_change_func;
+
   /* Local copy of format specifier */
   struct fmt_spec *fmt_l;
 
@@ -84,14 +91,12 @@
 };
 
 
-struct variable;
-
 struct var_type_dialog * var_type_dialog_create(GladeXML *xml);
 
 
-void var_type_dialog_set_state(struct var_type_dialog *dialog, 
-                              struct variable *var);
-
+void var_type_dialog_set_variable(struct var_type_dialog *dialog, 
+                                 variable_changed_func set_variable_changed,
+                                 struct variable *var);
 
 void var_type_dialog_show(struct var_type_dialog *dialog);
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]