pspp-cvs
[Top][All Lists]
Advanced

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

[Pspp-cvs] pspp/src/ui/gui ChangeLog compute-dialog.c


From: John Darrington
Subject: [Pspp-cvs] pspp/src/ui/gui ChangeLog compute-dialog.c
Date: Sun, 15 Jul 2007 09:59:53 +0000

CVSROOT:        /sources/pspp
Module name:    pspp
Changes by:     John Darrington <jmd>   07/07/15 09:59:53

Modified files:
        src/ui/gui     : ChangeLog compute-dialog.c 

Log message:
        Only generate NUMERIC or STRING command if the type-and-label dialog 
was 
        used.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/ChangeLog?cvsroot=pspp&r1=1.68&r2=1.69
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/compute-dialog.c?cvsroot=pspp&r1=1.7&r2=1.8

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/ChangeLog,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -b -r1.68 -r1.69
--- ChangeLog   12 Jul 2007 12:22:35 -0000      1.68
+++ ChangeLog   15 Jul 2007 09:59:52 -0000      1.69
@@ -1,3 +1,8 @@
+2007-07-15  John Darrington <address@hidden>
+
+       * compute-dialog.c: Only generate NUMERIC/STRING command if the 
+       type-and-label dialog was used.
+
 2007-07-12  John Darrington <address@hidden>
 
        * psppire-data-store.c: Added call to g_sheet_model_range_changed to 

Index: compute-dialog.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/compute-dialog.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- compute-dialog.c    11 Jul 2007 03:59:57 -0000      1.7
+++ compute-dialog.c    15 Jul 2007 09:59:53 -0000      1.8
@@ -48,6 +48,7 @@
 {
   GladeXML *xml;  /* The xml that generated the widgets */
   PsppireDict *dict;
+  gboolean use_type;
 };
 
 
@@ -77,18 +78,15 @@
 
   GtkTreeSelection *selection;
 
-
   /* Clear the target variable entry box */
   gtk_entry_set_text (GTK_ENTRY (target), "");
   g_signal_emit_by_name (target, "changed");
 
-
   /* Clear the syntax area textbuffer */
   gtk_text_buffer_get_start_iter (buffer, &start);
   gtk_text_buffer_get_end_iter (buffer, &end);
   gtk_text_buffer_delete (buffer, &start, &end);
 
-
   /* Unselect all items in the treeview */
   selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (varlist));
   gtk_tree_selection_unselect_all (selection);
@@ -178,7 +176,8 @@
 
   string = g_string_sized_new (64);
 
-  if ( NULL == psppire_dict_lookup_var (cd->dict, target_name ))
+  if ( cd-> use_type && 
+       NULL == psppire_dict_lookup_var (cd->dict, target_name ))
     {
       if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (string_toggle)))
        {
@@ -293,6 +292,8 @@
 
   reset_type_label_dialog (cd);
   response = psppire_dialog_run (PSPPIRE_DIALOG (subdialog));
+  if ( response == PSPPIRE_RESPONSE_CONTINUE)
+    cd->use_type = TRUE;
 }
 
 
@@ -359,6 +360,7 @@
   vs = PSPPIRE_VAR_STORE (gtk_sheet_get_model (var_sheet));
 
   scd.dict = vs->dict;
+  scd.use_type = FALSE;
 
   g_signal_connect (expression, "toggled",
                    G_CALLBACK(on_expression_toggle), &scd);




reply via email to

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