}
static gboolean
-load_file (PsppireWindow *de, const gchar *file_name)
+load_file (PsppireWindow *de, const gchar *file_name, gpointer not_used)
{
struct string filename;
gchar *utf8_file_name;
g_free (uri);
- open_data_window (window, file);
+ open_data_window (window, file, NULL);
g_free (file);
}
free (encoding);
- if ( psppire_window_load (PSPPIRE_WINDOW (se), file) )
+ if ( psppire_window_load (PSPPIRE_WINDOW (se), file, NULL) )
gtk_widget_show (se);
else
gtk_widget_destroy (se);
}
void
-open_data_window (PsppireWindow *victim, const char *file_name)
+open_data_window (PsppireWindow *victim, const char *file_name, gpointer hint)
{
GtkWidget *window;
else
window = psppire_data_window_new (NULL);
- psppire_window_load (PSPPIRE_WINDOW (window), file_name);
+ psppire_window_load (PSPPIRE_WINDOW (window), file_name, hint);
gtk_widget_show_all (window);
}
bool psppire_data_window_is_empty (PsppireDataWindow *);
void create_data_window (void);
-void open_data_window (PsppireWindow *victim, const char *file_name);
+void open_data_window (PsppireWindow *victim, const char *file_name, gpointer hint);
G_END_DECLS
gboolean ok;
gtk_source_buffer_begin_not_undoable_action (PSPPIRE_SYNTAX_WINDOW (se)->buffer);
- ok = psppire_window_load (PSPPIRE_WINDOW (se), filename);
+ ok = psppire_window_load (PSPPIRE_WINDOW (se), filename, NULL);
gtk_source_buffer_end_not_undoable_action (PSPPIRE_SYNTAX_WINDOW (se)->buffer);
if (ok )
Loads the buffer from the file called FILENAME
*/
gboolean
-syntax_load (PsppireWindow *window, const gchar *filename)
+syntax_load (PsppireWindow *window, const gchar *filename, gpointer not_used)
{
GError *err = NULL;
gchar *text_locale = NULL;
static void delete_recent (const char *file_name);
gboolean
-psppire_window_load (PsppireWindow *w, const gchar *file)
+psppire_window_load (PsppireWindow *w, const gchar *file, gpointer hint)
{
gboolean ok;
PsppireWindowIface *i = PSPPIRE_WINDOW_MODEL_GET_IFACE (w);
g_return_val_if_fail (i->load, FALSE);
- ok = i->load (w, file);
+ ok = i->load (w, file, hint);
if ( ok )
{
gtk_file_chooser_get_extra_widget (GTK_FILE_CHOOSER (dialog)));
if (any_reader_may_open (sysname))
- open_data_window (de, name);
+ open_data_window (de, name, NULL);
else
open_syntax_window (name, encoding);
void (*save) (PsppireWindow *w);
void (*pick_filename) (PsppireWindow *);
- gboolean (*load) (PsppireWindow *w, const gchar *);
+ gboolean (*load) (PsppireWindow *w, const gchar *, gpointer hint);
};
void psppire_window_save (PsppireWindow *w);
void psppire_window_save_as (PsppireWindow *w);
-gboolean psppire_window_load (PsppireWindow *w, const gchar *file);
+gboolean psppire_window_load (PsppireWindow *w, const gchar *file, gpointer hint);
void psppire_window_open (PsppireWindow *de);
GtkWidget *psppire_window_file_chooser_dialog (PsppireWindow *toplevel);
/* Check to see if the file is a .sav or a .por file. If not
assume that it is a syntax file */
if ( any_reader_may_open (filename))
- open_data_window (NULL, filename);
+ open_data_window (NULL, filename, NULL);
else
{
create_data_window ();