pull/38/head
parent f043a6a39a
commit ecddb2321f

@ -128,7 +128,7 @@
</child> </child>
<child> <child>
<object class="GtkButton" id="SaveButton"> <object class="GtkButton" id="SaveButton">
<property name="label" translatable="yes">Open</property> <property name="label" translatable="yes">Load</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">True</property> <property name="receives-default">True</property>

@ -67,7 +67,9 @@ void on_file_chooser_selected(GtkWidget *self, filechooser_window *window){
filechooser_window *__yon_filechooser_window = NULL; filechooser_window *__yon_filechooser_window = NULL;
void yon_file_chooser_set_button_label(char *label){ void yon_file_chooser_set_button_label(char *label){
if (__yon_filechooser_window){
gtk_button_set_label(GTK_BUTTON(__yon_filechooser_window->SaveButton),label);
}
} }
void on_file_chooser_exit(GtkWidget *, filechooser_window *){ void on_file_chooser_exit(GtkWidget *, filechooser_window *){

@ -464,6 +464,10 @@ char *yon_custom_config_init(GtkFileChooserAction type){
gtk_file_filter_add_pattern(filter,"*.ini"); gtk_file_filter_add_pattern(filter,"*.ini");
gtk_file_filter_set_name(filter, "*.ini"); gtk_file_filter_set_name(filter, "*.ini");
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog->MainFileChooser),filter); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog->MainFileChooser),filter);
if (type==GTK_FILE_CHOOSER_ACTION_SAVE){
yon_file_chooser_set_button_label(yon_char_get_localised_from_lib(LOAD_CONFIG_LABEL))
}
if (yon_file_chooser_start(dialog)==GTK_RESPONSE_ACCEPT){ if (yon_file_chooser_start(dialog)==GTK_RESPONSE_ACCEPT){
char *file = dialog->last_success_selection; char *file = dialog->last_success_selection;

@ -170,6 +170,7 @@ typedef struct {
} filechooser_window; } filechooser_window;
filechooser_window *yon_file_chooser_window_new(GtkFileChooserAction action); filechooser_window *yon_file_chooser_window_new(GtkFileChooserAction action);
GtkResponseType yon_file_chooser_start(filechooser_window *window); GtkResponseType yon_file_chooser_start(filechooser_window *window);
void yon_file_chooser_set_button_label(char *label);
int yon_confirmation_dialog_call(GtkWidget *self,dialog_confirmation_data *data); int yon_confirmation_dialog_call(GtkWidget *self,dialog_confirmation_data *data);
@ -321,6 +322,7 @@ char *yon_custom_config_init();
#define LOAD_LOCAL_LABEL _("Load local configuration") #define LOAD_LOCAL_LABEL _("Load local configuration")
#define LOAD_GLOBAL_LABEL _("Load global configuration") #define LOAD_GLOBAL_LABEL _("Load global configuration")
#define LOAD_LABEL _("Load") #define LOAD_LABEL _("Load")
#define LOAD_CONFIG_LABEL _("Load file")
#define CANCEL_LABEL _("Cancel") #define CANCEL_LABEL _("Cancel")
#define ACCEPT_LABEL _("Accept") #define ACCEPT_LABEL _("Accept")

Loading…
Cancel
Save