[gnome-chess/mcatanzaro/gtk4] progress
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-chess/mcatanzaro/gtk4] progress
- Date: Wed, 23 Dec 2020 00:46:08 +0000 (UTC)
commit f721d05d1657cb93953a5c122a01e4d94af5de6f
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Tue Dec 22 16:13:19 2020 -0600
progress
data/gnome-chess.ui | 2 +-
src/gnome-chess.vala | 14 +++++++++++---
2 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/data/gnome-chess.ui b/data/gnome-chess.ui
index d353ae4..38f7011 100644
--- a/data/gnome-chess.ui
+++ b/data/gnome-chess.ui
@@ -239,7 +239,7 @@
<property name="hexpand">1</property>
<property name="can-focus">0</property>
<property name="model">history-model</property>
-<!-- <signal name="changed" handler="history_combo_changed_cb" swapped="no"/> -->
+ <signal name="changed" handler="history_combo_changed_cb" swapped="no"/>
<child>
<object class="GtkCellRendererText">
<property name="ellipsize">PANGO_ELLIPSIZE_END</property>
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index 7c8a517..eb54343 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -142,7 +142,17 @@ Copyright © 2015–2016 Sahil Sareen""";
add_action_entries (app_entries, this);
set_accels_for_action ("app.help", {"F1"});
set_accels_for_action ("app.quit", {"<Primary>q", "<Primary>w"});
- Builder builder = new Builder.from_resource ("/org/gnome/Chess/ui/gnome-chess.ui");
+
+ Builder builder = new Builder ();
+ builder.set_current_object (this);
+ try
+ {
+ builder.add_from_resource ("/org/gnome/Chess/ui/gnome-chess.ui");
+ }
+ catch (Error e)
+ {
+ error ("Failed to load UI resource: %s", e.message);
+ }
window = (ApplicationWindow) builder.get_object ("gnome_chess_app");
window.set_default_size (settings.get_int ("width"), settings.get_int ("height"));
@@ -1741,7 +1751,6 @@ return null;
[CCode (cname = "history_combo_changed_cb", instance_pos = -1)]
public void history_combo_changed_cb (ComboBox combo)
{
-#if 0
TreeIter iter;
if (!combo.get_active_iter (out iter))
return;
@@ -1750,7 +1759,6 @@ return null;
if (game == null || move_number == game.n_moves)
move_number = -1;
scene.move_number = move_number;
-#endif
}
[CCode (cname = "history_latest_clicked_cb", instance_pos = -1)]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]