Skip to content

Commit 85a9548

Browse files
authored
Merge branch 'main' into lenemter/fix-clip
2 parents f0b085a + c36970d commit 85a9548

File tree

8 files changed

+35
-13
lines changed

8 files changed

+35
-13
lines changed

daemon-gtk3/WindowMenu.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,12 @@ public class Gala.Daemon.WindowMenu : Gtk.Menu {
174174
SignalHandler.unblock (always_on_top, always_on_top_sid);
175175
SignalHandler.unblock (on_visible_workspace, on_visible_workspace_sid);
176176

177-
move_right.sensitive = !on_visible_workspace.active;
177+
move_right.sensitive = !on_visible_workspace.active && Gala.WindowFlags.ALLOWS_MOVE_RIGHT in flags;
178178
if (move_right.sensitive) {
179179
move_right_accellabel.accel_string = keybind_settings.get_strv ("move-to-workspace-right")[0];
180180
}
181181

182-
move_left.sensitive = !on_visible_workspace.active;
182+
move_left.sensitive = !on_visible_workspace.active && Gala.WindowFlags.ALLOWS_MOVE_LEFT in flags;
183183
if (move_left.sensitive) {
184184
move_left_accellabel.accel_string = keybind_settings.get_strv ("move-to-workspace-left")[0];
185185
}

daemon/DBus.vala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ public enum Gala.WindowFlags {
3636
ALWAYS_ON_TOP,
3737
ON_ALL_WORKSPACES,
3838
CAN_CLOSE,
39-
IS_TILED
39+
IS_TILED,
40+
ALLOWS_MOVE_LEFT,
41+
ALLOWS_MOVE_RIGHT
4042
}
4143

4244
[DBus (name = "org.pantheon.gala")]

daemon/WindowMenu.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,12 @@ public class Gala.Daemon.WindowMenu : Gtk.Popover {
200200
SignalHandler.unblock (always_on_top, always_on_top_sid);
201201
SignalHandler.unblock (on_visible_workspace, on_visible_workspace_sid);
202202

203-
move_right.sensitive = !on_visible_workspace.active;
203+
move_right.sensitive = !on_visible_workspace.active && Gala.WindowFlags.ALLOWS_MOVE_RIGHT in flags;
204204
if (move_right.sensitive) {
205205
move_right_accellabel.accel_string = keybind_settings.get_strv ("move-to-workspace-right")[0];
206206
}
207207

208-
move_left.sensitive = !on_visible_workspace.active;
208+
move_left.sensitive = !on_visible_workspace.active && Gala.WindowFlags.ALLOWS_MOVE_LEFT in flags;
209209
if (move_left.sensitive) {
210210
move_left_accellabel.accel_string = keybind_settings.get_strv ("move-to-workspace-left")[0];
211211
}

lib/WindowManager.vala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ namespace Gala {
5656
ALWAYS_ON_TOP,
5757
ON_ALL_WORKSPACES,
5858
CAN_CLOSE,
59-
IS_TILED
59+
IS_TILED,
60+
ALLOWS_MOVE_LEFT,
61+
ALLOWS_MOVE_RIGHT
6062
}
6163

6264
/**

po/ru.po

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ msgstr ""
88
"Project-Id-Version: beat-box\n"
99
"Report-Msgid-Bugs-To: https://github.com/elementary/gala/issues\n"
1010
"POT-Creation-Date: 2025-06-03 19:09+0000\n"
11-
"PO-Revision-Date: 2025-04-21 05:55+0000\n"
12-
"Last-Translator: кубик круглый <megarainbow29@gmail.com>\n"
11+
"PO-Revision-Date: 2025-06-06 11:55+0000\n"
12+
"Last-Translator: lenemter <lenemter@gmail.com>\n"
1313
"Language-Team: Russian <https://l10n.elementaryos.org/projects/desktop/gala/"
1414
"ru/>\n"
1515
"Language: ru\n"
@@ -18,7 +18,7 @@ msgstr ""
1818
"Content-Transfer-Encoding: 8bit\n"
1919
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
2020
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
21-
"X-Generator: Weblate 5.10.4\n"
21+
"X-Generator: Weblate 5.11.4\n"
2222
"X-Launchpad-Export-Date: 2017-02-21 05:47+0000\n"
2323

2424
#: daemon/DBus.vala:82 daemon-gtk3/BackgroundMenu.vala:11
@@ -279,16 +279,15 @@ msgstr "Снимок экрана от %s"
279279

280280
#. / TRANSLATORS: %s represents a name of file manager
281281
#: src/ScreenshotManager.vala:170
282-
#, fuzzy, c-format
283-
#| msgid "Show in Files"
282+
#, c-format
284283
msgid "Show in %s"
285-
msgstr "Показать в Файлах"
284+
msgstr "Показать в %s"
286285

287286
#. / TRANSLATORS: %s represents a name of image viewer
288287
#: src/ScreenshotManager.vala:176
289288
#, c-format
290289
msgid "Open in %s"
291-
msgstr ""
290+
msgstr "Открыть в %s"
292291

293292
#: src/ScreenshotManager.vala:184 src/ScreenshotManager.vala:543
294293
msgid "Screenshot taken"

src/Widgets/MultitaskingView/WindowCloneContainer.vala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
public class Gala.WindowCloneContainer : ActorTarget {
1111
public signal void window_selected (Meta.Window window);
1212
public signal void requested_close ();
13+
public signal void last_window_closed ();
1314

1415
public int padding_top { get; set; default = 12; }
1516
public int padding_left { get; set; default = 12; }
@@ -105,6 +106,10 @@ public class Gala.WindowCloneContainer : ActorTarget {
105106
break;
106107
}
107108
}
109+
110+
if (get_n_children () == 0) {
111+
last_window_closed ();
112+
}
108113
}
109114

110115
/**

src/Widgets/WindowOverview.vala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ public class Gala.WindowOverview : ActorTarget, RootTarget, ActivatableComponent
134134
};
135135
window_clone_container.window_selected.connect (thumb_selected);
136136
window_clone_container.requested_close.connect (() => close ());
137+
window_clone_container.last_window_closed.connect (() => close ());
137138

138139
add_child (window_clone_container);
139140
}

src/WindowManager.vala

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -937,6 +937,19 @@ namespace Gala {
937937
if (window.can_close ())
938938
flags |= WindowFlags.CAN_CLOSE;
939939

940+
unowned var workspace = window.get_workspace ();
941+
if (workspace != null) {
942+
unowned var manager = window.display.get_workspace_manager ();
943+
var workspace_index = workspace.workspace_index;
944+
if (workspace_index != 0) {
945+
flags |= WindowFlags.ALLOWS_MOVE_LEFT;
946+
}
947+
948+
if (workspace_index != manager.n_workspaces - 2 || Utils.get_n_windows (workspace) != 1) {
949+
flags |= WindowFlags.ALLOWS_MOVE_RIGHT;
950+
}
951+
}
952+
940953
daemon_manager.show_window_menu.begin (flags, x, y);
941954
break;
942955
case Meta.WindowMenuType.APP:

0 commit comments

Comments
 (0)