Revert "apprt/gtk: add menu to new tab button to create splits (#7127)"

This reverts commit 14134d61fb, reversing
changes made to 6a876ef8ec.

This causes translation failures, this should be reintroduced when the
CI check passes.
This commit is contained in:
Mitchell Hashimoto
2025-04-19 07:05:38 -07:00
parent 14134d61fb
commit 9beaed45f8
19 changed files with 595 additions and 798 deletions

View File

@@ -25,7 +25,6 @@ const input = @import("../../input.zig");
const CoreSurface = @import("../../Surface.zig");
const App = @import("App.zig");
const Builder = @import("Builder.zig");
const Color = configpkg.Config.Color;
const Surface = @import("Surface.zig");
const Menu = @import("menu.zig").Menu;
@@ -243,19 +242,12 @@ pub fn init(self: *Window, app: *App) !void {
}
{
const btn = adw.SplitButton.new();
btn.setIconName("tab-new-symbolic");
const btn = gtk.Button.newFromIconName("tab-new-symbolic");
btn.as(gtk.Widget).setTooltipText(i18n._("New Tab"));
btn.setDropdownTooltip(i18n._("New Split"));
var builder = Builder.init("menu-headerbar-split_menu", 1, 0, .blp);
defer builder.deinit();
btn.setMenuModel(builder.getObject(gio.MenuModel, "menu"));
_ = adw.SplitButton.signals.clicked.connect(
_ = gtk.Button.signals.clicked.connect(
btn,
*Window,
adwNewTabClick,
gtkTabNewClick,
self,
.{},
);
@@ -832,11 +824,6 @@ fn gtkTabNewClick(_: *gtk.Button, self: *Window) callconv(.c) void {
self.performBindingAction(.{ .new_tab = {} });
}
/// Create a new surface (tab or split).
fn adwNewTabClick(_: *adw.SplitButton, self: *Window) callconv(.c) void {
self.performBindingAction(.{ .new_tab = {} });
}
/// Create a new tab from the AdwTabOverview. We can't copy gtkTabNewClick
/// because we need to return an AdwTabPage from this function.
fn gtkNewTabFromOverview(_: *adw.TabOverview, self: *Window) callconv(.c) *adw.TabPage {

View File

@@ -75,7 +75,6 @@ pub const VersionedBlueprint = struct {
pub const blueprint_files = [_]VersionedBlueprint{
.{ .major = 1, .minor = 5, .name = "prompt-title-dialog" },
.{ .major = 1, .minor = 5, .name = "config-errors-dialog" },
.{ .major = 1, .minor = 0, .name = "menu-headerbar-split_menu" },
.{ .major = 1, .minor = 0, .name = "menu-surface-context_menu" },
.{ .major = 1, .minor = 0, .name = "menu-window-titlebar_menu" },
.{ .major = 1, .minor = 5, .name = "ccw-osc-52-read" },

View File

@@ -1,25 +0,0 @@
using Gtk 4.0;
menu menu {
section {
item {
label: _("Split Up");
action: "win.split-up";
}
item {
label: _("Split Down");
action: "win.split-down";
}
item {
label: _("Split Left");
action: "win.split-left";
}
item {
label: _("Split Right");
action: "win.split-right";
}
}
}