mirror of
https://github.com/elementary/gala.git
synced 2024-10-05 19:27:25 +03:00
Dialogs: Fix Mutter bindings around dialog creation (#1941)
This commit is contained in:
parent
107dc080e2
commit
48511d7dd0
@ -130,8 +130,6 @@ namespace Gala {
|
|||||||
construct { parent = value; }
|
construct { parent = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Gee.Set<CloseDialog> open_dialogs = new Gee.HashSet<CloseDialog> ();
|
|
||||||
|
|
||||||
// this function isn't exported in glib.vapi
|
// this function isn't exported in glib.vapi
|
||||||
[CCode (cname = "g_locale_from_utf8")]
|
[CCode (cname = "g_locale_from_utf8")]
|
||||||
extern static string locale_from_utf8 (
|
extern static string locale_from_utf8 (
|
||||||
@ -146,10 +144,6 @@ namespace Gala {
|
|||||||
Object (window: window);
|
Object (window: window);
|
||||||
}
|
}
|
||||||
|
|
||||||
~CloseDialog () {
|
|
||||||
open_dialogs.remove (this);
|
|
||||||
}
|
|
||||||
|
|
||||||
construct {
|
construct {
|
||||||
icon = "computer-fail";
|
icon = "computer-fail";
|
||||||
|
|
||||||
@ -163,8 +157,6 @@ namespace Gala {
|
|||||||
body = _("You may choose to wait a short while for the application to continue, or force it to quit entirely.");
|
body = _("You may choose to wait a short while for the application to continue, or force it to quit entirely.");
|
||||||
accept_label = _("Force Quit");
|
accept_label = _("Force Quit");
|
||||||
deny_label = _("Wait");
|
deny_label = _("Wait");
|
||||||
|
|
||||||
open_dialogs.add (this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void show () {
|
public override void show () {
|
||||||
|
@ -2332,15 +2332,8 @@ namespace Gala {
|
|||||||
dialog.show ();
|
dialog.show ();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override unowned Meta.CloseDialog create_close_dialog (Meta.Window window) {
|
public override Meta.CloseDialog? create_close_dialog (Meta.Window window) {
|
||||||
var new_dialog = CloseDialog.open_dialogs.first_match ((d) => d.window == window);
|
return new CloseDialog (window);
|
||||||
|
|
||||||
if (new_dialog == null) {
|
|
||||||
new_dialog = new CloseDialog (window);
|
|
||||||
}
|
|
||||||
|
|
||||||
unowned var dialog = new_dialog;
|
|
||||||
return dialog;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override unowned Meta.PluginInfo? plugin_info () {
|
public override unowned Meta.PluginInfo? plugin_info () {
|
||||||
|
@ -168,6 +168,9 @@ unsigned_long_hash.v type="ulong?"
|
|||||||
warning parent="Meta.Util" cheader_filename="meta/util.h"
|
warning parent="Meta.Util" cheader_filename="meta/util.h"
|
||||||
create_context parent="Meta.Context" name="new" symbol_type="constructor" cheader_filename="meta/meta-context.h"
|
create_context parent="Meta.Context" name="new" symbol_type="constructor" cheader_filename="meta/meta-context.h"
|
||||||
|
|
||||||
|
Plugin.create_close_dialog unowned=false nullable
|
||||||
|
Plugin.create_inhibit_shortcuts_dialog unowned=false
|
||||||
|
|
||||||
BackgroundActor sealed
|
BackgroundActor sealed
|
||||||
BackgroundContent sealed
|
BackgroundContent sealed
|
||||||
BackgroundImage sealed
|
BackgroundImage sealed
|
||||||
|
@ -690,9 +690,9 @@ namespace Meta {
|
|||||||
[NoWrapper]
|
[NoWrapper]
|
||||||
public virtual void confirm_display_change ();
|
public virtual void confirm_display_change ();
|
||||||
[NoWrapper]
|
[NoWrapper]
|
||||||
public virtual unowned Meta.CloseDialog create_close_dialog (Meta.Window window);
|
public virtual Meta.CloseDialog? create_close_dialog (Meta.Window window);
|
||||||
[NoWrapper]
|
[NoWrapper]
|
||||||
public virtual unowned Meta.InhibitShortcutsDialog create_inhibit_shortcuts_dialog (Meta.Window window);
|
public virtual Meta.InhibitShortcutsDialog create_inhibit_shortcuts_dialog (Meta.Window window);
|
||||||
[NoWrapper]
|
[NoWrapper]
|
||||||
public virtual void destroy (Meta.WindowActor actor);
|
public virtual void destroy (Meta.WindowActor actor);
|
||||||
public void destroy_completed (Meta.WindowActor actor);
|
public void destroy_completed (Meta.WindowActor actor);
|
||||||
|
@ -328,6 +328,7 @@ if mutter46_dep.found()
|
|||||||
'--pkg=gio-2.0',
|
'--pkg=gio-2.0',
|
||||||
'--pkg=cairo',
|
'--pkg=cairo',
|
||||||
'--pkg=graphene-gobject-1.0',
|
'--pkg=graphene-gobject-1.0',
|
||||||
|
'--pkg=x11',
|
||||||
vapigen_args,
|
vapigen_args,
|
||||||
files('Cogl-14-custom.vala')
|
files('Cogl-14-custom.vala')
|
||||||
],
|
],
|
||||||
@ -345,6 +346,7 @@ if mutter46_dep.found()
|
|||||||
'--pkg=pangocairo',
|
'--pkg=pangocairo',
|
||||||
'--pkg=gio-2.0',
|
'--pkg=gio-2.0',
|
||||||
'--pkg=glib-2.0',
|
'--pkg=glib-2.0',
|
||||||
|
'--pkg=x11',
|
||||||
vapigen_args
|
vapigen_args
|
||||||
],
|
],
|
||||||
depends: [mtk_target, cogl_target],
|
depends: [mtk_target, cogl_target],
|
||||||
@ -364,6 +366,7 @@ if mutter46_dep.found()
|
|||||||
'--pkg=gio-2.0',
|
'--pkg=gio-2.0',
|
||||||
'--pkg=json-glib-1.0',
|
'--pkg=json-glib-1.0',
|
||||||
'--pkg=pangocairo',
|
'--pkg=pangocairo',
|
||||||
|
'--pkg=x11',
|
||||||
vapigen_args,
|
vapigen_args,
|
||||||
files('Clutter-14-custom.vala')
|
files('Clutter-14-custom.vala')
|
||||||
],
|
],
|
||||||
|
@ -2,3 +2,4 @@ pango
|
|||||||
glib-2.0
|
glib-2.0
|
||||||
gio-2.0
|
gio-2.0
|
||||||
mutter-mtk-14
|
mutter-mtk-14
|
||||||
|
x11
|
||||||
|
Loading…
Reference in New Issue
Block a user