Skip to content

Commit

Permalink
remove undo/redo update code from headerbar, to make it buildable
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksiy-Yakovenko committed Jul 15, 2024
1 parent f468079 commit 447a513
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
41 changes: 41 additions & 0 deletions plugins/ddb_misc_headerbar_GTK3/actiongroup.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
diff --git a/src/headerbarui.c b/src/headerbarui.c
index 76f0bf2..55677d2 100644
--- a/src/headerbarui.c
+++ b/src/headerbarui.c
@@ -1144,14 +1144,15 @@ refresh_undo_redo_menu () {
}

static void init_refresh_undo_redo_menu () {
- GActionGroup *db_action_group = gtk_widget_get_action_group (headerbar, "db");
-
- // Use the menu items
- refresh_undo_redo.undo_menu_item = lookup_widget (GTK_WIDGET(mainwin), "undo");
- refresh_undo_redo.redo_menu_item = lookup_widget (GTK_WIDGET(mainwin), "redo");
-
- refresh_undo_redo.undo_action = g_action_map_lookup_action (G_ACTION_MAP (db_action_group), "undo");
- refresh_undo_redo.redo_action = g_action_map_lookup_action (G_ACTION_MAP (db_action_group), "redo");
+// Disabled because of too high GTK requirement (3.16)
+// GActionGroup *db_action_group = G_ACTION_GROUP(gtk_widget_get_action_group (headerbar, "db"));
+//
+// // Use the menu items
+// refresh_undo_redo.undo_menu_item = lookup_widget (GTK_WIDGET(mainwin), "undo");
+// refresh_undo_redo.redo_menu_item = lookup_widget (GTK_WIDGET(mainwin), "redo");
+//
+// refresh_undo_redo.undo_action = g_action_map_lookup_action (G_ACTION_MAP (db_action_group), "undo");
+// refresh_undo_redo.redo_action = g_action_map_lookup_action (G_ACTION_MAP (db_action_group), "redo");
}

static void
@@ -1195,10 +1196,10 @@ void window_init_hook (void *userdata) {
headerbar_add_menu_btn = GTK_BUILDER_GET_WIDGET(builder, "file_menu_btn");
headerbar_playback_menu_btn = GTK_BUILDER_GET_WIDGET(builder, "playback_menu_btn");

- GActionGroup *group = create_action_group();
+ GActionGroup *group = G_ACTION_GROUP(create_action_group());
gtk_widget_insert_action_group (headerbar, "win", group);

- GActionGroup *deadbeef_action_group = create_action_group_deadbeef();
+ GActionGroup *deadbeef_action_group = G_ACTION_GROUP(create_action_group_deadbeef());
gtk_widget_insert_action_group (headerbar, "db", deadbeef_action_group);

update_plugin_actions();
3 changes: 2 additions & 1 deletion plugins/ddb_misc_headerbar_GTK3/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
url: "https://github.com/saivert/ddb_misc_headerbar_GTK3.git",
patches: [
"build.diff",
"cast.diff"
"cast.diff",
"actiongroup.diff"
],
},
make: {
Expand Down

0 comments on commit 447a513

Please sign in to comment.