summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJussi Kukkonen <jussi.kukkonen@intel.com>2016-04-27 00:08:55 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-12 23:47:17 +0100
commit7888c74a2198ad9bb2ed6c1e78598992abbe26ac (patch)
tree46a2e04ed205c9a28fa13c4f4eb686b9fe294e24
parentf04d8bc7dfd76a7e9871c47a62f464dbdf812c92 (diff)
downloadpoky-7888c74a2198ad9bb2ed6c1e78598992abbe26ac.tar.gz
oh-puzzles: Remove as we're using puzzles now
(From OE-Core rev: 8f930c67bf8acc39876fe29b368e5bcc15289e2b) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-sato/puzzles/files/oh-puzzles-owl-menu.patch203
-rw-r--r--meta/recipes-sato/puzzles/oh-puzzles_git.bb73
2 files changed, 0 insertions, 276 deletions
diff --git a/meta/recipes-sato/puzzles/files/oh-puzzles-owl-menu.patch b/meta/recipes-sato/puzzles/files/oh-puzzles-owl-menu.patch
deleted file mode 100644
index 7e2c3ab75d..0000000000
--- a/meta/recipes-sato/puzzles/files/oh-puzzles-owl-menu.patch
+++ /dev/null
@@ -1,203 +0,0 @@
1This patch enable owl menu, which is hidden in the title bar to save space on
2small screen. It has not been used for a long time, rebase needed.
3
4Upstream-Status: Inappropriate [enable feature]
5
6Index: src/gtk.c
7===================================================================
8--- src/gtk.c (revision 22)
9+++ src/gtk.c (working copy)
10@@ -28,6 +28,8 @@
11 #include <gdk/gdkx.h>
12 #include <gdk-pixbuf/gdk-pixbuf.h>
13
14+#include <libowl/owlwindowmenu.h>
15+
16 #include <librsvg/rsvg.h>
17
18 #include <X11/Xlib.h>
19@@ -1237,6 +1239,7 @@
20 }
21 }
22
23+#if 0
24 static void
25 add_widget (GtkUIManager *merge,
26 GtkWidget *widget,
27@@ -1247,10 +1250,11 @@
28 gtk_box_pack_start (box, widget, FALSE, FALSE, 0);
29
30 toplevel = gtk_widget_get_toplevel (GTK_WIDGET (box));
31- gtk_widget_show_all (toplevel);
32 }
33+#endif
34
35 static GtkActionEntry toplevel_actions[] = {
36+ { "Top", NULL, "" },
37 { "Game", NULL, N_("Game") },
38 { "Settings", NULL, N_("Settings") },
39 { "Help", NULL, N_("Help") },
40@@ -1303,11 +1307,13 @@
41 frontend *fe)
42 {
43 GString *xml;
44+ GError *error = NULL;
45 gboolean presets = FALSE;
46 GSList *radio_group = NULL;
47 int i;
48
49- xml = g_string_new ("<ui><menubar><placeholder name=\"TypePlaceholder\">"
50+ xml = g_string_new ("<ui><menubar><menu name=\"TopMenu\" action=\"Top\">"
51+ "<placeholder name=\"TypePlaceholder\">"
52 "<menu name=\"SettingsMenu\" action=\"Settings\">");
53
54 for (i = 0; i < midend_num_presets(fe->me); i++) {
55@@ -1359,8 +1365,14 @@
56 "<menuitem name=\"CustomMenu\" action=\"Custom\"/>");
57 }
58
59- g_string_append (xml, "</menu></placeholder></menubar></ui>");
60- gtk_ui_manager_add_ui_from_string (merge, xml->str, -1, NULL);
61+ g_string_append (xml, "</menu></placeholder></menu></menubar></ui>");
62+
63+ gtk_ui_manager_add_ui_from_string (merge, xml->str, -1, &error);
64+ if (error != NULL) {
65+ g_warning ("Error adding custom: %s", error->message);
66+ g_error_free (error);
67+ }
68+
69 g_string_free (xml, TRUE);
70 }
71
72@@ -1434,6 +1446,7 @@
73 new_window(char *arg, char **error)
74 {
75 frontend *fe;
76+ GError *err = NULL;
77 GtkBox *vbox;
78 GtkUIManager *merge;
79 GtkActionGroup *actions;
80@@ -1496,8 +1509,6 @@
81 gtk_window_add_accel_group(GTK_WINDOW(fe->window), fe->accelgroup);
82
83 merge = gtk_ui_manager_new ();
84- g_signal_connect (G_OBJECT (merge), "add_widget",
85- G_CALLBACK (add_widget), vbox);
86
87 actions = gtk_action_group_new ("PuzzleActions");
88 gtk_action_group_add_actions (actions, toplevel_actions,
89@@ -1509,22 +1520,39 @@
90
91 gtk_ui_manager_insert_action_group (merge, actions, 0);
92
93- gtk_ui_manager_add_ui_from_file (merge, DATADIR "/oh-puzzles/ui/menu.xml", NULL);
94+ gtk_ui_manager_add_ui_from_file (merge, DATADIR "/oh-puzzles/ui/menu.xml",
95+ &err);
96+ if (err != NULL) {
97+ g_warning ("Error making UI: %s", err->message);
98+ g_error_free (err);
99+ err = NULL;
100+ }
101
102 if (thegame.can_solve) {
103- char *str = "<ui><menubar><menu name=\"GameMenu\" action=\"Game\">"
104+ char *str = "<ui><menubar><menu name=\"TopMenu\" action=\"Top\">"
105+ "<menu name=\"GameMenu\" action=\"Game\">"
106 "<placeholder name=\"SolvePlaceholder\">"
107 "<separator name=\"SolveSep\"/>"
108 "<menuitem name=\"SolveMenu\" action=\"Solve\"/>"
109- "</placeholder></menu></menubar></ui>";
110+ "</placeholder></menu></menu></menubar></ui>";
111
112- gtk_ui_manager_add_ui_from_string (merge, str, -1, NULL);
113+ gtk_ui_manager_add_ui_from_string (merge, str, -1, &err);
114+ if (err != NULL) {
115+ g_warning ("Error adding solve. %s", err->message);
116+ g_error_free (err);
117+ }
118 }
119
120 if ((n = midend_num_presets(fe->me)) > 0 || thegame.can_configure) {
121 generate_settings_menu (merge, actions, fe);
122 }
123
124+ /* Do this so that the menu is packed now instead of in the idle loop */
125+ gtk_ui_manager_ensure_update (merge);
126+
127+ owl_set_window_menu_item (GTK_WINDOW (fe->window),
128+ GTK_MENU_ITEM (gtk_ui_manager_get_widget (merge, "/menubar/TopMenu")));
129+
130 setup_colours (fe);
131 setup_pixbufs (fe);
132
133@@ -1572,7 +1600,7 @@
134 GDK_BUTTON_RELEASE_MASK |
135 GDK_BUTTON_MOTION_MASK);
136
137- /* The window is shown once the menubar has been added */
138+ gtk_widget_show_all (fe->window);
139 return fe;
140 }
141
142Index: src/menu.xml
143===================================================================
144--- src/menu.xml (revision 22)
145+++ src/menu.xml (working copy)
146@@ -1,26 +1,25 @@
147 <ui>
148 <menubar>
149-<menu name="GameMenu" action="Game">
150- <menuitem name="NewMenu" action="New"/>
151- <menuitem name="RestartMenu" action="Restart"/>
152-<!-- <menuitem name="SpecificMenu" action="Specific"/> -->
153- <menuitem name="RandomMenu" action="Random"/>
154- <separator name="GameSep1"/>
155- <menuitem name="LoadMenu" action="Load"/>
156- <menuitem name="SaveMenu" action="Save"/>
157- <separator name="GameSep2"/>
158- <menuitem name="UndoMenu" action="Undo"/>
159- <menuitem name="RedoMenu" action="Redo"/>
160- <placeholder name="CopyPlaceholder"/>
161- <placeholder name="SolvePlaceholder"/>
162- <separator name="GameSep3"/>
163- <menuitem name="QuitMenu" action="Quit"/>
164-</menu>
165+<menu name="TopMenu" action="Top">
166+ <menu name="GameMenu" action="Game">
167+ <menuitem name="NewMenu" action="New"/>
168+ <menuitem name="RestartMenu" action="Restart"/>
169+ <!-- <menuitem name="SpecificMenu" action="Specific"/> -->
170+ <menuitem name="RandomMenu" action="Random"/>
171+ <separator name="GameSep1"/>
172+ <menuitem name="LoadMenu" action="Load"/>
173+ <menuitem name="SaveMenu" action="Save"/>
174+ <separator name="GameSep2"/>
175+ <menuitem name="UndoMenu" action="Undo"/>
176+ <menuitem name="RedoMenu" action="Redo"/>
177+ <placeholder name="CopyPlaceholder"/>
178+ <placeholder name="SolvePlaceholder"/>
179+ </menu>
180
181-<placeholder name="TypePlaceholder"/>
182-
183-<menu name="HelpMenu" action="Help">
184+ <placeholder name="TypePlaceholder"/>
185 <menuitem name="AboutMenu" action="About"/>
186+ <menuitem name="QuitMenu" action="Quit"/>
187+
188 </menu>
189 </menubar>
190 </ui>
191Index: src/Makefile.am
192===================================================================
193--- src/Makefile.am (revision 22)
194+++ src/Makefile.am (working copy)
195@@ -10,7 +10,7 @@
196 lightup loopy map mines net netslide pattern pegs rect samegame \
197 sixteen slant solo tents twiddle untangle
198
199-libpuzzles_la_LIBADD = $(PUZZLES_LIBS)
200+libpuzzles_la_LIBADD = $(PUZZLES_LIBS) -lowl
201 libpuzzles_la_SOURCES = combi.c \
202 configuration.c \
203 drawing.c \
diff --git a/meta/recipes-sato/puzzles/oh-puzzles_git.bb b/meta/recipes-sato/puzzles/oh-puzzles_git.bb
deleted file mode 100644
index dfa68a659b..0000000000
--- a/meta/recipes-sato/puzzles/oh-puzzles_git.bb
+++ /dev/null
@@ -1,73 +0,0 @@
1SUMMARY = "Portable Puzzle Collection"
2HOMEPAGE = "http://o-hand.com/"
3BUGTRACKER = "http://bugzilla.yoctoproject.org/"
4
5LICENSE = "MIT"
6LIC_FILES_CHKSUM = "file://LICENCE;md5=f56ec6772dd1c7c367067bbea8ea1675 \
7 file://src/tree234.h;endline=28;md5=a188e6d250430ca094a54a82f48472a7 \
8 file://src/tree234.c;endline=28;md5=b4feb1976feebf8f1379093ed52f2945"
9
10SECTION = "x11"
11DEPENDS = "gtk+ gconf intltool-native librsvg gettext-native"
12
13# libowl requires x11 in DISTRO_FEATURES
14DEPENDS_append_poky = " ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libowl', '', d)}"
15
16# Requires gdk/gdkx.h which is provided by gtk when x11 in DISTRO_FEATURES
17REQUIRED_DISTRO_FEATURES = "x11"
18
19SRCREV = "92f1a20e4b72eed7a35b00984d9793b51dc2fb3b"
20PV = "0.2+git${SRCPV}"
21PR = "r10"
22
23SRC_URI = "git://git.yoctoproject.org/${BPN}"
24SRC_URI_append_poky = " file://oh-puzzles-owl-menu.patch;striplevel=0 "
25
26S = "${WORKDIR}/git"
27
28inherit autotools pkgconfig distro_features_check
29
30bindir = "/usr/games"
31
32EXTRA_OEMAKE += "GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1"
33
34do_install_append () {
35 install -d ${D}/${datadir}/applications/
36
37 cd ${D}/${prefix}/games
38 for prog in *; do
39 if [ -x $prog ]; then
40 # Convert prog to Title Case
41 title=$(echo $prog | sed 's/\(^\| \)./\U&/g')
42 echo "making ${D}/${datadir}/applications/$prog.desktop"
43 cat <<STOP > ${D}/${datadir}/applications/$prog.desktop
44[Desktop Entry]
45Name=$title
46Exec=${prefix}/games/$prog
47Icon=applications-games
48Terminal=false
49Type=Application
50Categories=Game;
51StartupNotify=true
52X-MB-SingleInstance=true
53Comment=Play $title.
54STOP
55 fi
56 done
57}
58
59PACKAGES += "${PN}-extra"
60RDEPENDS_${PN}-extra += "oh-puzzles"
61
62FILES_${PN} = "/usr/share/pixmaps /usr/share/oh-puzzles/"
63FILES_${PN}-extra = "/usr/games/ /usr/share/applications /etc/gconf/schemas"
64
65python __anonymous () {
66 var = bb.data.expand("FILES_${PN}", d, 1)
67 data = d.getVar(var, True)
68 for name in ("bridges", "fifteen", "inertia", "map", "samegame", "slant"):
69 data = data + " /usr/games/%s" % name
70 data = data + " /usr/share/applications/%s.desktop" % name
71 data = data + " /etc/gconf/schemas/%s.schemas" % name
72 d.setVar(var, data)
73}