Remove unused property from var-sheet
authorJohn Darrington <john@darrington.wattle.id.au>
Sun, 30 Nov 2008 07:53:56 +0000 (16:53 +0900)
committerJohn Darrington <john@darrington.wattle.id.au>
Sun, 30 Nov 2008 07:53:56 +0000 (16:53 +0900)
src/ui/gui/psppire-var-store.c
src/ui/gui/psppire-var-store.h
src/ui/gui/text-data-import-dialog.c

index 7e005e39237691e99d6b8136897c937c34ccbdff..4465fa1dda4cab6aac70eee1f4bbbc5c9219911f 100644 (file)
@@ -43,7 +43,7 @@
 
 enum
   {
-    PSPPIRE_VAR_STORE_TRAILING_ROWS = 1,
+    PROP_0,
     PSPPIRE_VAR_STORE_FORMAT_TYPE
   };
 
@@ -143,10 +143,6 @@ psppire_var_store_set_property (GObject      *object,
 
   switch (property_id)
     {
-    case PSPPIRE_VAR_STORE_TRAILING_ROWS:
-      self->trailing_rows = g_value_get_int (value);
-      break;
-
     case PSPPIRE_VAR_STORE_FORMAT_TYPE:
       self->format_type = g_value_get_enum (value);
       break;
@@ -167,10 +163,6 @@ psppire_var_store_get_property (GObject      *object,
 
   switch (property_id)
     {
-    case PSPPIRE_VAR_STORE_TRAILING_ROWS:
-      g_value_set_int (value, self->trailing_rows);
-      break;
-
     case PSPPIRE_VAR_STORE_FORMAT_TYPE:
       g_value_set_enum (value, self->format_type);
       break;
@@ -195,20 +187,6 @@ psppire_var_store_class_init (PsppireVarStoreClass *class)
   object_class->set_property = psppire_var_store_set_property;
   object_class->get_property = psppire_var_store_get_property;
 
-  /* The minimum value for trailing-rows is 1 to prevent the
-     var-store from ever having 0 rows, which breaks invariants
-     in gtksheet. */
-  pspec = g_param_spec_int ("trailing-rows",
-                            "Trailing rows",
-                            "Number of rows displayed after last variable",
-                            1  /* minimum value */,
-                            100 /* maximum value */,
-                            40  /* default value */,
-                            G_PARAM_READWRITE);
-  g_object_class_install_property (object_class,
-                                   PSPPIRE_VAR_STORE_TRAILING_ROWS,
-                                   pspec);
-
   pspec = g_param_spec_enum ("format-type",
                              "Variable format type",
                              ("Whether variables have input or output "
@@ -216,6 +194,7 @@ psppire_var_store_class_init (PsppireVarStoreClass *class)
                              G_TYPE_PSPPIRE_VAR_STORE_FORMAT_TYPE,
                              PSPPIRE_VAR_STORE_OUTPUT_FORMATS,
                              G_PARAM_READWRITE);
+
   g_object_class_install_property (object_class,
                                    PSPPIRE_VAR_STORE_FORMAT_TYPE,
                                    pspec);
@@ -230,7 +209,6 @@ psppire_var_store_init (PsppireVarStore *var_store)
        g_critical ("Could not parse color \"%s\"", DISABLED_COLOR);
 
   var_store->dict = 0;
-  var_store->trailing_rows = 40;
   var_store->format_type = PSPPIRE_VAR_STORE_OUTPUT_FORMATS;
 }
 
index 72c9192c0ac66fd0da90b46890408c3d7af97183..7ef186a0a1b06067f22dbb6899866558a91ee97a 100644 (file)
@@ -66,7 +66,6 @@ struct _PsppireVarStore
   PsppireDict *dict;
   GdkColor disabled;
   const PangoFontDescription *font_desc;
-  gint trailing_rows;
   PsppireVarStoreFormatType format_type;
 };
 
index 872f11bab5d43c7a7b5cc865ef3b6e45adb974d9..73220e3b9ae4eb843dcd45ba783eed01c80f3b6e 100644 (file)
@@ -1623,7 +1623,6 @@ prepare_formats_page (struct import_assistant *ia)
      hold a reference via ia->formats.dict. */
   var_store = psppire_var_store_new (psppire_dict);
   g_object_set (var_store,
-                "trailing-rows", 1,
                 "format-type", PSPPIRE_VAR_STORE_INPUT_FORMATS,
                 (void *) NULL);
   var_sheet = PSPPIRE_VAR_SHEET (psppire_var_sheet_new ());