projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update remaining gtk_paint_focus calls to Gtk3 signature
[pspp]
/
src
/
ui
/
gui
/
psppire-spreadsheet-model.c
diff --git
a/src/ui/gui/psppire-spreadsheet-model.c
b/src/ui/gui/psppire-spreadsheet-model.c
index 3a14ce6c4695202f31c50d86b3ba956fa1c013f6..f5be69d8705981d52300008499046662675ebafc 100644
(file)
--- a/
src/ui/gui/psppire-spreadsheet-model.c
+++ b/
src/ui/gui/psppire-spreadsheet-model.c
@@
-14,16
+14,23
@@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This file implements a GtkTreeModel. It allows GtkComboBox and
+ GtkTreeView to display the names and non-empty cell ranges of the
+ sheets aka "Tables" of spreadsheet files.
+ It doesn't take any notice of the spreadsheet data itself.
+*/
#include <config.h>
#include <glib.h>
#include <config.h>
#include <glib.h>
-#include "psppire-spreadsheet-model.h"
+#include <gettext.h>
+#define _(msgid) gettext (msgid)
+#define N_(msgid) msgid
+
+#include "psppire-spreadsheet-model.h"
#include "data/spreadsheet-reader.h"
#include "data/spreadsheet-reader.h"
-#include "data/gnumeric-reader.h"
-#include "data/ods-reader.h"
static void psppire_spreadsheet_model_init (PsppireSpreadsheetModel *
spreadsheetModel);
static void psppire_spreadsheet_model_init (PsppireSpreadsheetModel *
spreadsheetModel);
@@
-246,7
+253,7
@@
tree_model_get_value (GtkTreeModel * model, GtkTreeIter * iter,
case PSPPIRE_SPREADSHEET_MODEL_COL_NAME:
{
const char *x =
case PSPPIRE_SPREADSHEET_MODEL_COL_NAME:
{
const char *x =
-
ods
_get_sheet_name (spreadsheetModel->spreadsheet,
+
spreadsheet
_get_sheet_name (spreadsheetModel->spreadsheet,
(gint) iter->user_data);
g_value_set_string (value, x);
(gint) iter->user_data);
g_value_set_string (value, x);
@@
-255,9
+262,10
@@
tree_model_get_value (GtkTreeModel * model, GtkTreeIter * iter,
case PSPPIRE_SPREADSHEET_MODEL_COL_RANGE:
{
char *x =
case PSPPIRE_SPREADSHEET_MODEL_COL_RANGE:
{
char *x =
-
ods
_get_sheet_range (spreadsheetModel->spreadsheet,
+
spreadsheet
_get_sheet_range (spreadsheetModel->spreadsheet,
(gint) iter->user_data);
(gint) iter->user_data);
- g_value_set_string (value, x);
+
+ g_value_set_string (value, x ? x : _("(empty)"));
g_free (x);
}
break;
g_free (x);
}
break;