X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-window.h;h=e4422ecc744f72004df81504498988eeca432716;hb=0931dbb924b98df79989e2b4017f538f2ab6b23c;hp=f65e9e3cf31a2fd6900e5827cc5d7ecf85bc7f39;hpb=df8e125c0969d3b6e043b7069d52f069c9e7ee78;p=pspp diff --git a/src/ui/gui/psppire-window.h b/src/ui/gui/psppire-window.h index f65e9e3cf3..e4422ecc74 100644 --- a/src/ui/gui/psppire-window.h +++ b/src/ui/gui/psppire-window.h @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation + Copyright (C) 2008, 2009, 2010, 2011, 2013, 2014, 2020 Free Software Foundation This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,6 +22,7 @@ #include #include #include +#include "psppire-window-base.h" G_BEGIN_DECLS @@ -57,27 +58,32 @@ typedef struct _PsppireWindowIface PsppireWindowIface; struct _PsppireWindow { - GtkWindow parent; + PsppireWindowBase parent; /* */ - gchar *name; - gchar *description; - gchar *basename; + gchar *filename; /* File name, in file name encoding, or NULL. */ + gchar *basename; /* Last component of filename, in UTF-8 */ + gchar *id; /* Dataset name, or NULL. */ + gchar *description; /* e.g. "Data Editor" */ + gchar *list_name; /* Name for "Windows" menu list. */ GHashTable *menuitem_table; - GtkMenuShell *menu; guint insert_handler; guint remove_handler; - gboolean dirty; - GTimeVal savetime; + gboolean added_separator; + + /* The time when the contents of the window was last edited subsequent + to having been saved, or NULL if it has not been edited since the + most recent save. */ + GDateTime *edited; }; struct _PsppireWindowClass { - GtkWindowClass parent_class; + PsppireWindowBaseClass parent_class; }; @@ -86,7 +92,9 @@ struct _PsppireWindowIface GTypeInterface g_iface; void (*save) (PsppireWindow *w); - gboolean (*load) (PsppireWindow *w, const gchar *); + void (*pick_filename) (PsppireWindow *); + gboolean (*load) (PsppireWindow *w, const gchar *filename, + const gchar *encoding, gpointer hint); }; @@ -106,10 +114,16 @@ gboolean psppire_window_get_unsaved (PsppireWindow *); gint psppire_window_query_save (PsppireWindow *); void psppire_window_save (PsppireWindow *w); -gboolean psppire_window_load (PsppireWindow *w, const gchar *file); +void psppire_window_save_as (PsppireWindow *w); +gboolean psppire_window_load (PsppireWindow *w, const gchar *file, + const gchar *encoding, gpointer hint); void psppire_window_open (PsppireWindow *de); GtkWidget *psppire_window_file_chooser_dialog (PsppireWindow *toplevel); +void add_most_recent (const char *file_name, const char *mime_type, + const char *encoding); + +void read_spv_file (const char *filename); G_END_DECLS