projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change g_print to g_warning
[pspp-builds.git]
/
src
/
ui
/
gui
/
data-editor.c
diff --git
a/src/ui/gui/data-editor.c
b/src/ui/gui/data-editor.c
index a94acaf2a0cd4a8f7468c6ca59e288a27ca6c326..f7df21c752e746bec52f647f672db0082e387fba 100644
(file)
--- a/
src/ui/gui/data-editor.c
+++ b/
src/ui/gui/data-editor.c
@@
-320,7
+320,7
@@
new_data_editor (void)
de->toggle_value_labels =
gtk_toggle_action_new ("toggle-value-labels",
de->toggle_value_labels =
gtk_toggle_action_new ("toggle-value-labels",
- _("Labels"),
+ _("
_
Labels"),
_("Show/hide value labels"),
"pspp-value-labels");
_("Show/hide value labels"),
"pspp-value-labels");
@@
-374,7
+374,7
@@
new_data_editor (void)
de->insert_variable =
gtk_action_new ("insert-variable",
de->insert_variable =
gtk_action_new ("insert-variable",
- _("Insert Variable"),
+ _("Insert
_
Variable"),
_("Create a new variable at the current position"),
"pspp-insert-variable");
_("Create a new variable at the current position"),
"pspp-insert-variable");
@@
-393,7
+393,7
@@
new_data_editor (void)
de->insert_case =
gtk_action_new ("insert-case",
de->insert_case =
gtk_action_new ("insert-case",
- _("Insert Case"),
+ _("Insert Ca
_
se"),
_("Create a new case at the current position"),
"pspp-insert-case");
_("Create a new case at the current position"),
"pspp-insert-case");
@@
-414,7
+414,7
@@
new_data_editor (void)
de->invoke_goto_dialog =
gtk_action_new ("goto-case-dialog",
de->invoke_goto_dialog =
gtk_action_new ("goto-case-dialog",
- _("Goto Case"),
+ _("
_
Goto Case"),
_("Jump to a Case in the Data Sheet"),
"gtk-jump-to");
_("Jump to a Case in the Data Sheet"),
"gtk-jump-to");
@@
-434,7
+434,7
@@
new_data_editor (void)
de->invoke_weight_cases_dialog =
gtk_action_new ("weight-cases-dialog",
de->invoke_weight_cases_dialog =
gtk_action_new ("weight-cases-dialog",
- _("Weights"),
+ _("
_
Weights"),
_("Weight cases by variable"),
"pspp-weight-cases");
_("Weight cases by variable"),
"pspp-weight-cases");
@@
-444,7
+444,7
@@
new_data_editor (void)
de->invoke_transpose_dialog =
gtk_action_new ("transpose-dialog",
de->invoke_transpose_dialog =
gtk_action_new ("transpose-dialog",
- _("Transpose"),
+ _("
_
Transpose"),
_("Transpose the cases with the variables"),
NULL);
_("Transpose the cases with the variables"),
NULL);
@@
-456,7
+456,7
@@
new_data_editor (void)
de->invoke_split_file_dialog =
gtk_action_new ("split-file-dialog",
de->invoke_split_file_dialog =
gtk_action_new ("split-file-dialog",
- _("Split"),
+ _("S
_
plit"),
_("Split the active file"),
"pspp-split-file");
_("Split the active file"),
"pspp-split-file");
@@
-467,7
+467,7
@@
new_data_editor (void)
de->invoke_sort_cases_dialog =
gtk_action_new ("sort-cases-dialog",
de->invoke_sort_cases_dialog =
gtk_action_new ("sort-cases-dialog",
- _("Sort"),
+ _("
_
Sort"),
_("Sort cases in the active file"),
"pspp-sort-cases");
_("Sort cases in the active file"),
"pspp-sort-cases");
@@
-476,7
+476,7
@@
new_data_editor (void)
de->invoke_select_cases_dialog =
gtk_action_new ("select-cases-dialog",
de->invoke_select_cases_dialog =
gtk_action_new ("select-cases-dialog",
- _("Select Cases"),
+ _("Select
_
Cases"),
_("Select cases from the active file"),
"pspp-select-cases");
_("Select cases from the active file"),
"pspp-select-cases");
@@
-486,7
+486,7
@@
new_data_editor (void)
de->invoke_compute_dialog =
gtk_action_new ("compute-dialog",
de->invoke_compute_dialog =
gtk_action_new ("compute-dialog",
- _("Compute"),
+ _("
_
Compute"),
_("Compute new values for a variable"),
"pspp-compute");
_("Compute new values for a variable"),
"pspp-compute");
@@
-534,7
+534,7
@@
new_data_editor (void)
de->invoke_comments_dialog =
gtk_action_new ("commments-dialog",
de->invoke_comments_dialog =
gtk_action_new ("commments-dialog",
- _("Data File Comments"),
+ _("Data File
_
Comments"),
_("Commentary text for the data file"),
NULL);
_("Commentary text for the data file"),
NULL);
@@
-543,7
+543,7
@@
new_data_editor (void)
de->invoke_find_dialog =
gtk_action_new ("find-dialog",
de->invoke_find_dialog =
gtk_action_new ("find-dialog",
- _("Find"),
+ _("
_
Find"),
_("Find Case"),
"gtk-find");
_("Find Case"),
"gtk-find");
@@
-583,7
+583,7
@@
new_data_editor (void)
de->invoke_variable_info_dialog =
gtk_action_new ("variable-info-dialog",
de->invoke_variable_info_dialog =
gtk_action_new ("variable-info-dialog",
- _("Variables"),
+ _("
_
Variables"),
_("Jump to Variable"),
"pspp-goto-variable");
_("Jump to Variable"),
"pspp-goto-variable");
@@
-1375,6
+1375,11
@@
data_save_as_dialog (GtkAction *action, struct data_editor *de)
de->save_as_portable =
! gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button_sys));
de->save_as_portable =
! gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button_sys));
+ if ( de->save_as_portable)
+ append_filename_suffix (de, ".por");
+ else
+ append_filename_suffix (de, ".sav");
+
save_file (de);
window_set_name_from_filename (e, de->file_name);
save_file (de);
window_set_name_from_filename (e, de->file_name);
@@
-1506,9
+1511,6
@@
create_data_sheet_variable_popup_menu (struct data_editor *de)
GtkWidget *clear_variable =
gtk_menu_item_new_with_label (_("Clear"));
GtkWidget *clear_variable =
gtk_menu_item_new_with_label (_("Clear"));
- gtk_action_connect_proxy (de->insert_variable,
- insert_variable );
-
gtk_action_connect_proxy (de->delete_variables,
clear_variable );
gtk_action_connect_proxy (de->delete_variables,
clear_variable );
@@
-1539,6
+1541,11
@@
create_data_sheet_variable_popup_menu (struct data_editor *de)
G_CALLBACK (psppire_data_editor_sort_descending),
de->data_editor);
G_CALLBACK (psppire_data_editor_sort_descending),
de->data_editor);
+ g_signal_connect_swapped (G_OBJECT (insert_variable), "activate",
+ G_CALLBACK (gtk_action_activate),
+ de->insert_variable);
+
+
gtk_menu_shell_append (GTK_MENU_SHELL (menu), sort_descending);
gtk_widget_show_all (menu);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), sort_descending);
gtk_widget_show_all (menu);
@@
-1559,16
+1566,16
@@
create_data_sheet_cases_popup_menu (struct data_editor *de)
gtk_menu_item_new_with_label (_("Clear"));
gtk_menu_item_new_with_label (_("Clear"));
- gtk_action_connect_proxy (de->insert_case,
- insert_case);
-
-
gtk_action_connect_proxy (de->delete_cases,
delete_case);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), insert_case);
gtk_action_connect_proxy (de->delete_cases,
delete_case);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), insert_case);
+ g_signal_connect_swapped (G_OBJECT (insert_case), "activate",
+ G_CALLBACK (gtk_action_activate),
+ de->insert_case);
+
gtk_menu_shell_append (GTK_MENU_SHELL (menu),
gtk_separator_menu_item_new ());
gtk_menu_shell_append (GTK_MENU_SHELL (menu),
gtk_separator_menu_item_new ());