projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Internationalisation.
[pspp-builds.git]
/
src
/
ui
/
gui
/
menu-actions.c
diff --git
a/src/ui/gui/menu-actions.c
b/src/ui/gui/menu-actions.c
index bd56691dc60dda5141c65df39c14e20908eb7d8e..f031ea7030e5a1b75f2898c752a9db36678c1a14 100644
(file)
--- a/
src/ui/gui/menu-actions.c
+++ b/
src/ui/gui/menu-actions.c
@@
-62,6
+62,7
@@
static const gchar untitled[] = N_("Untitled");
static const gchar window_title[] = N_("PSPP Data Editor");
static const gchar window_title[] = N_("PSPP Data Editor");
+/* Sets the title bar to TEXT */
static void
psppire_set_window_title(const gchar *text)
{
static void
psppire_set_window_title(const gchar *text)
{
@@
-70,13
+71,11
@@
psppire_set_window_title(const gchar *text)
gchar *title = g_strdup_printf("%s --- %s", text, gettext(window_title));
gtk_window_set_title(GTK_WINDOW(data_editor), title);
gchar *title = g_strdup_printf("%s --- %s", text, gettext(window_title));
gtk_window_set_title(GTK_WINDOW(data_editor), title);
-
- g_free(title);
}
}
-void
-on_new1_activate (GtkMenuItem *menuitem,
-
gpointer user_data
)
+
+gboolean
+
clear_file(void
)
{
GtkWidget *data_sheet = get_widget_assert(xml, "data_sheet");
GtkWidget *var_sheet = get_widget_assert(xml, "variable_sheet");
{
GtkWidget *data_sheet = get_widget_assert(xml, "data_sheet");
GtkWidget *var_sheet = get_widget_assert(xml, "variable_sheet");
@@
-93,8
+92,18
@@
on_new1_activate (GtkMenuItem *menuitem,
if (psppire_handle)
fh_free(psppire_handle);
psppire_handle = 0 ;
if (psppire_handle)
fh_free(psppire_handle);
psppire_handle = 0 ;
+
+ return TRUE;
}
}
+void
+on_new1_activate (GtkMenuItem *menuitem,
+ gpointer user_data)
+{
+ clear_file();
+}
+
+
static gboolean
populate_case_from_reader(struct ccase *c, gpointer aux)
static gboolean
populate_case_from_reader(struct ccase *c, gpointer aux)
@@
-593,8
+602,10
@@
data_var_select(GtkNotebook *notebook,
switch_menus(page_num);
}
switch_menus(page_num);
}
-static void
-var_data_selection_init()
+
+/* Initialised things on the variable sheet */
+void
+var_data_selection_init(void)
{
notebook = GTK_NOTEBOOK(get_widget_assert(xml, "notebook1"));
menuitems[PAGE_DATA_SHEET] = get_widget_assert(xml, "data1");
{
notebook = GTK_NOTEBOOK(get_widget_assert(xml, "notebook1"));
menuitems[PAGE_DATA_SHEET] = get_widget_assert(xml, "data1");
@@
-626,14
+637,3
@@
on_variables1_activate(GtkMenuItem *menuitem,
select_sheet(PAGE_VAR_SHEET);
}
select_sheet(PAGE_VAR_SHEET);
}
-
-/* Callback which occurs when gtk_main is entered */
-gboolean
-callbacks_on_init(gpointer data)
-{
- psppire_set_window_title(gettext(untitled));
-
- var_data_selection_init();
-
- return FALSE;
-}