G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
}
\f
-
-extern GtkRecentManager *the_recent_mgr;
-
static void
set_paste_menuitem_sensitivity (PsppireDataWindow *de, gboolean x)
{
gtk_ui_manager_get_widget (uim,"/ui/menubar/file/file_recent-files");
- GtkWidget *menu_data =
- gtk_recent_chooser_menu_new_for_manager (the_recent_mgr);
+ GtkWidget *menu_data = gtk_recent_chooser_menu_new_for_manager (
+ gtk_recent_manager_get_default ());
- GtkWidget *menu_files =
- gtk_recent_chooser_menu_new_for_manager (the_recent_mgr);
+ GtkWidget *menu_files = gtk_recent_chooser_menu_new_for_manager (
+ gtk_recent_manager_get_default ());
{
GtkRecentFilter *filter = gtk_recent_filter_new ();
}
}
-extern GtkRecentManager *the_recent_mgr;
-static void add_most_recent (const char *file_name, GtkRecentManager *rm);
-static void delete_recent (const char *file_name, GtkRecentManager *rm);
+static void add_most_recent (const char *file_name);
+static void delete_recent (const char *file_name);
gboolean
psppire_window_load (PsppireWindow *w, const gchar *file)
if ( ok )
{
psppire_window_set_filename (w, file);
- add_most_recent (file, the_recent_mgr);
+ add_most_recent (file);
w->dirty = FALSE;
}
else
- delete_recent (file, the_recent_mgr);
+ delete_recent (file);
return ok;
}
If it's already in the list, it moves it to the top
*/
static void
-add_most_recent (const char *file_name, GtkRecentManager *rm)
+add_most_recent (const char *file_name)
{
gchar *uri = g_filename_to_uri (file_name, NULL, NULL);
if ( uri )
- gtk_recent_manager_add_item (rm, uri);
+ gtk_recent_manager_add_item (gtk_recent_manager_get_default (), uri);
g_free (uri);
}
If FILE_NAME exists in the recent list, then delete it.
*/
static void
-delete_recent (const char *file_name, GtkRecentManager *rm)
+delete_recent (const char *file_name)
{
gchar *uri = g_filename_to_uri (file_name, NULL, NULL);
if ( uri )
- gtk_recent_manager_remove_item (rm, uri, NULL);
+ gtk_recent_manager_remove_item (gtk_recent_manager_get_default (), uri, NULL);
g_free (uri);
}
#include "gl/xalloc.h"
#include "gl/relocatable.h"
-GtkRecentManager *the_recent_mgr;
-
static void inject_renamed_icons (void);
static void create_icon_factory (void);
static void load_data_file (PsppireDataWindow *, const char *);
journal_enable ();
textdomain (PACKAGE);
-
- the_recent_mgr = gtk_recent_manager_get_default ();
-
psppire_selector_set_default_selection_func (GTK_TYPE_ENTRY, insert_source_row_into_entry);
psppire_selector_set_default_selection_func (PSPPIRE_VAR_VIEW_TYPE, insert_source_row_into_tree_view);
psppire_selector_set_default_selection_func (GTK_TYPE_TREE_VIEW, insert_source_row_into_tree_view);