void ags_menu_bar_preferences_callback(GtkWidget *menu_item, AgsMenuBar *menu_bar) { AgsWindow *window; window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) menu_bar, AGS_TYPE_WINDOW); if(window->preferences != NULL){ return; } window->preferences = ags_preferences_new(); window->preferences->parent = GTK_WINDOW(window); ags_applicable_reset(AGS_APPLICABLE(window->preferences)); ags_connectable_connect(AGS_CONNECTABLE(window->preferences)); gtk_widget_show_all(GTK_WIDGET(window->preferences)); }
void ags_menu_action_preferences_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; application_context = ags_application_context_get_instance(); window = (AgsWindow *) ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); if(window->preferences != NULL){ return; } window->preferences = ags_preferences_new(); window->preferences->window = GTK_WINDOW(window); ags_connectable_connect(AGS_CONNECTABLE(window->preferences)); ags_applicable_reset(AGS_APPLICABLE(window->preferences)); gtk_widget_show_all(GTK_WIDGET(window->preferences)); }