[GTK3] Make dummy preference callbacks functional
This commit is contained in:
parent
8e8e576460
commit
517ad73e64
@ -278,6 +278,7 @@ static void setup_menu(GApplication *app) {
|
|||||||
g_print("Showing hamburger\n");
|
g_print("Showing hamburger\n");
|
||||||
// Attach a custom title bar
|
// Attach a custom title bar
|
||||||
GtkWidget *titlebar = gtkget(GTK_WIDGET, "main_header_bar");
|
GtkWidget *titlebar = gtkget(GTK_WIDGET, "main_header_bar");
|
||||||
|
gtk_header_bar_set_title(GTK_HEADER_BAR(titlebar), gtk_window_get_title(GTK_WINDOW(main_window)));
|
||||||
gtk_window_set_titlebar(GTK_WINDOW(main_window), titlebar);
|
gtk_window_set_titlebar(GTK_WINDOW(main_window), titlebar);
|
||||||
|
|
||||||
// Disable menubar
|
// Disable menubar
|
||||||
@ -769,7 +770,7 @@ G_MODULE_EXPORT void on_boot_rom_location_changed(GtkWidget *w, gpointer user_da
|
|||||||
|
|
||||||
G_MODULE_EXPORT void on_cgb_model_changed(GtkWidget *w, gpointer user_data_gptr) {
|
G_MODULE_EXPORT void on_cgb_model_changed(GtkWidget *w, gpointer user_data_gptr) {
|
||||||
GtkComboBox *box = GTK_COMBO_BOX(w);
|
GtkComboBox *box = GTK_COMBO_BOX(w);
|
||||||
g_print("New value: %s\n", gtk_combo_box_get_active_id(box));
|
config.cgb_revision_name = (gchar *)gtk_combo_box_get_active_id(box);
|
||||||
}
|
}
|
||||||
|
|
||||||
G_MODULE_EXPORT void on_color_correction_changed(GtkWidget *w, gpointer user_data_gptr) {
|
G_MODULE_EXPORT void on_color_correction_changed(GtkWidget *w, gpointer user_data_gptr) {
|
||||||
@ -787,7 +788,7 @@ G_MODULE_EXPORT void on_color_menubar_override_changed(GtkWidget *w, gpointer us
|
|||||||
|
|
||||||
G_MODULE_EXPORT void on_dmg_model_changed(GtkWidget *w, gpointer user_data_gptr) {
|
G_MODULE_EXPORT void on_dmg_model_changed(GtkWidget *w, gpointer user_data_gptr) {
|
||||||
GtkComboBox *box = GTK_COMBO_BOX(w);
|
GtkComboBox *box = GTK_COMBO_BOX(w);
|
||||||
g_print("New value: %s\n", gtk_combo_box_get_active_id(box));
|
config.dmg_revision_name = (gchar *)gtk_combo_box_get_active_id(box);
|
||||||
}
|
}
|
||||||
|
|
||||||
G_MODULE_EXPORT void on_graphic_filter_changed(GtkWidget *w, gpointer user_data_gptr) {
|
G_MODULE_EXPORT void on_graphic_filter_changed(GtkWidget *w, gpointer user_data_gptr) {
|
||||||
@ -814,12 +815,12 @@ G_MODULE_EXPORT void on_keep_aspect_ratio_changed(GtkWidget *w, gpointer user_da
|
|||||||
|
|
||||||
G_MODULE_EXPORT void on_rewind_duration_changed(GtkWidget *w, gpointer user_data_gptr) {
|
G_MODULE_EXPORT void on_rewind_duration_changed(GtkWidget *w, gpointer user_data_gptr) {
|
||||||
GtkComboBox *box = GTK_COMBO_BOX(w);
|
GtkComboBox *box = GTK_COMBO_BOX(w);
|
||||||
g_print("New value: %s\n", gtk_combo_box_get_active_id(box));
|
config.rewind_duration = g_ascii_strtoll(gtk_combo_box_get_active_id(box), NULL, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
G_MODULE_EXPORT void on_sgb_model_changed(GtkWidget *w, gpointer user_data_gptr) {
|
G_MODULE_EXPORT void on_sgb_model_changed(GtkWidget *w, gpointer user_data_gptr) {
|
||||||
GtkComboBox *box = GTK_COMBO_BOX(w);
|
GtkComboBox *box = GTK_COMBO_BOX(w);
|
||||||
g_print("New value: %s\n", gtk_combo_box_get_active_id(box));
|
config.sgb_revision_name = (gchar *)gtk_combo_box_get_active_id(box);
|
||||||
}
|
}
|
||||||
|
|
||||||
G_MODULE_EXPORT void on_use_integer_scaling_changed(GtkWidget *w, gpointer user_data_gptr) {
|
G_MODULE_EXPORT void on_use_integer_scaling_changed(GtkWidget *w, gpointer user_data_gptr) {
|
||||||
|
@ -91,7 +91,7 @@ void save_config_to_key_file(config_t *config, GKeyFile *key_file) {
|
|||||||
#undef EXPAND_GROUP_MEMBER_IF_1
|
#undef EXPAND_GROUP_MEMBER_IF_1
|
||||||
}
|
}
|
||||||
|
|
||||||
G_MODULE_EXPORT void on_preferences_realize(GtkWidget *w, gpointer builder_ptr) {
|
void on_preferences_realize(GtkWidget *w, gpointer builder_ptr) {
|
||||||
GtkWindow *preferences = GTK_WINDOW(w);
|
GtkWindow *preferences = GTK_WINDOW(w);
|
||||||
GtkBuilder *builder = (GtkBuilder *) builder_ptr;
|
GtkBuilder *builder = (GtkBuilder *) builder_ptr;
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ gchar* settings_file_path;
|
|||||||
GKeyFile *key_file;
|
GKeyFile *key_file;
|
||||||
config_t config;
|
config_t config;
|
||||||
|
|
||||||
G_MODULE_EXPORT void on_preferences_realize(GtkWidget *w, gpointer builder_ptr);
|
void on_preferences_realize(GtkWidget *w, gpointer builder_ptr);
|
||||||
|
|
||||||
void print_config(config_t *config);
|
void print_config(config_t *config);
|
||||||
void load_config_from_key_file(config_t *config, GKeyFile *key_file);
|
void load_config_from_key_file(config_t *config, GKeyFile *key_file);
|
||||||
|
Loading…
Reference in New Issue
Block a user