[lightsoff/arnaudb/drop-clutter: 1/2] Drop --gtk-mode CLI option.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [lightsoff/arnaudb/drop-clutter: 1/2] Drop --gtk-mode CLI option.
- Date: Thu, 15 Oct 2020 14:05:06 +0000 (UTC)
commit d9b6ef74044169e7417db80c98a86f5355459c24
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Thu Oct 15 15:59:34 2020 +0200
Drop --gtk-mode CLI option.
src/lightsoff-window.vala | 9 +++------
src/lightsoff.vala | 11 +----------
2 files changed, 4 insertions(+), 16 deletions(-)
---
diff --git a/src/lightsoff-window.vala b/src/lightsoff-window.vala
index 40a467c..c79591f 100644
--- a/src/lightsoff-window.vala
+++ b/src/lightsoff-window.vala
@@ -73,7 +73,7 @@ public class LightsoffWindow : ApplicationWindow
return aspect_frame;
}
- public LightsoffWindow (bool gtk = true)
+ public LightsoffWindow ()
{
settings = new GLib.Settings ("org.gnome.LightsOff");
@@ -87,12 +87,9 @@ public class LightsoffWindow : ApplicationWindow
int level = settings.get_int ("level");
level_changed_cb (level);
- if (gtk)
- this.add (build_gtk_game_container (level, out game_view));
- else
- this.add (build_clutter_game_container (level, out game_view));
+ this.add (build_gtk_game_container (level, out game_view));
- this.set_resizable (gtk);
+ this.set_resizable (true);
game_view.level_changed.connect (level_changed_cb);
game_view.moves_changed.connect (update_subtitle);
diff --git a/src/lightsoff.vala b/src/lightsoff.vala
index 6868946..ad2d168 100644
--- a/src/lightsoff.vala
+++ b/src/lightsoff.vala
@@ -17,15 +17,11 @@ public class LightsOff : Gtk.Application
private LightsoffWindow window;
private static bool version = false;
- private static bool gtk = true;
private const GLib.OptionEntry[] options = {
// --version
{ "version", 0, 0, OptionArg.NONE, ref version, "Display version number", null },
- // --gtk-mode
- { "gtk-mode", 0, 0, OptionArg.NONE, ref gtk, "Use native graphics", null },
-
// list terminator
{ null }
};
@@ -58,7 +54,7 @@ public class LightsOff : Gtk.Application
set_accels_for_action ("win.previous-level", {"<control>Page_Up"});
set_accels_for_action ("win.next-level", {"<control>Page_Down"});
- window = new LightsoffWindow (gtk);
+ window = new LightsoffWindow ();
add_window (window);
}
@@ -147,11 +143,6 @@ public class LightsOff : Gtk.Application
print ("%s %s\n", _("Lights Off"), VERSION);
return 0;
}
- if (!gtk && GtkClutter.init (ref args) != Clutter.InitError.SUCCESS)
- {
- warning ("Failed to initialise Clutter");
- return Posix.EXIT_FAILURE;
- }
var app = new LightsOff ();
return app.run ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]