[five-or-more/gsoc-vala-port: 28/29] Clean up
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [five-or-more/gsoc-vala-port: 28/29] Clean up
- Date: Mon, 13 Aug 2018 05:51:33 +0000 (UTC)
commit 65017fd20569301de3c7832e7b62d35688986a0f
Author: Ruxandra Simion <ruxandra simion93 gmail com>
Date: Wed Aug 8 18:45:52 2018 +0300
Clean up
data/dots.png | Bin 26927 -> 0 bytes
data/five-or-more-preferences.ui | 57 +-
data/five-or-more-vala-preferences.ui | 225 ------
data/five-or-more-vala.ui | 99 ---
data/five-or-more.ui | 30 +-
data/gumball.png | Bin 35735 -> 0 bytes
data/menu.ui | 32 -
data/meson.build | 63 +-
data/org.gnome.five-or-more.gresource.xml | 4 +-
data/translatable_themes.h | 9 -
meson.build | 5 +-
org.gnome.five-or-more.json | 58 +-
org.gnome.five-or-more.json~ | 60 ++
src-vala/meson.build | 34 -
src/balls-preview.c | 171 -----
src/balls-preview.h | 35 -
{src-vala => src}/board.vala | 0
{src-vala => src}/config.vapi | 0
src/five-or-more-app.c | 742 --------------------
src/five-or-more-app.h | 48 --
src/five-or-more.c | 81 ---
src/game-area.c | 1052 -----------------------------
src/game-area.h | 55 --
{src-vala => src}/game.vala | 0
src/games-file-list.c | 435 ------------
src/games-file-list.h | 67 --
src/games-preimage.c | 475 -------------
src/games-preimage.h | 89 ---
{src-vala => src}/main.vala | 0
src/meson.build | 53 +-
{src-vala => src}/next-pieces-widget.vala | 0
{src-vala => src}/piece-generator.vala | 0
{src-vala => src}/piece.vala | 0
{src-vala => src}/preferences-dialog.vala | 0
{src-vala => src}/theme-renderer.vala | 2 -
{src-vala => src}/view.vala | 0
{src-vala => src}/window.vala | 2 +-
37 files changed, 184 insertions(+), 3799 deletions(-)
---
diff --git a/data/five-or-more-preferences.ui b/data/five-or-more-preferences.ui
index 1af3f73..36b0d91 100644
--- a/data/five-or-more-preferences.ui
+++ b/data/five-or-more-preferences.ui
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.12 -->
- <object class="GtkDialog" id="preferences_dialog">
+ <template class="PreferencesDialog" parent="GtkDialog">
<property name="can_focus">False</property>
<property name="resizable">False</property>
<property name="destroy_with_parent">True</property>
<property name="type_hint">dialog</property>
<property name="use-header-bar">1</property>
+ <property name="border-width">18</property>
<child internal-child="headerbar">
<object class="GtkHeaderBar">
<property name="title" translatable="yes">Preferences</property>
@@ -56,7 +57,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
- <property name="label" translatable="yes">_Image:</property>
+ <property name="label" translatable="yes">_Theme:</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -66,6 +67,17 @@
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkComboBoxText" id="theme_box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="active">0</property>
+ <items>
+ <item translatable="yes">balls</item>
+ <item translatable="yes">shapes</item>
+ </items>
+ </object>
+ </child>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
@@ -73,7 +85,7 @@
<property name="halign">start</property>
<property name="label" translatable="yes">B_ackground color:</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">colorbutton1</property>
+ <property name="mnemonic_widget">color_button</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -83,7 +95,7 @@
</packing>
</child>
<child>
- <object class="GtkColorButton" id="colorbutton1">
+ <object class="GtkColorButton" id="color_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -194,41 +206,6 @@
<property name="position">3</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_top">12</property>
- <property name="halign">start</property>
- <property name="label" translatable="yes">General</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_fast_moves">
- <property name="label" translatable="yes">_Use fast moves</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="margin_start">12</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="halign">start</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">5</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">True</property>
@@ -238,5 +215,5 @@
</child>
</object>
</child>
- </object>
+ </template>
</interface>
diff --git a/data/five-or-more.ui b/data/five-or-more.ui
index 542ce6a..57e5db0 100644
--- a/data/five-or-more.ui
+++ b/data/five-or-more.ui
@@ -2,11 +2,12 @@
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkAccelGroup" id="accelgroup"/>
- <object class="GtkApplicationWindow" id="glines_window">
+ <template class="GameWindow" parent="GtkApplicationWindow">
<property name="can_focus">False</property>
<property name="default_width">320</property>
<property name="default_height">400</property>
<property name="icon_name">glines</property>
+ <property name="border-width">18</property>
<accel-groups>
<group name="accelgroup"/>
</accel-groups>
@@ -69,18 +70,23 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">horizontal</property>
+ <property name="spacing">12</property>
<child>
+ <object class="GamesGridFrame" id="grid_frame">
+ <property name="visible">True</property>
+ </object>
<object class="GtkButton" id="new_game_button">
- <property name="visible">True</property>
- <property name="use_underline">True</property>
- <property name="label" translatable="yes">_New Game</property>
- <property name="halign">center</property>
- <property name="valign">end</property>
- <property name="action-name">app.new-game</property>
- <property name="tooltip-text" translatable="yes">Start a new puzzle</property>
- <property name="width-request">120</property>
- <property name="height-request">60</property>
- </object>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ <property name="label" translatable="yes">_New Game</property>
+ <property name="halign">center</property>
+ <property name="valign">end</property>
+ <property name="action-name">app.new-game</property>
+ <property name="tooltip-text" translatable="yes">Start a new puzzle</property>
+ <property name="width-request">120</property>
+ <property name="height-request">60</property>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -89,5 +95,5 @@
</child>
</object>
</child>
- </object>
+ </template>
</interface>
diff --git a/data/meson.build b/data/meson.build
index 92f18d2..328e193 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -1,25 +1,25 @@
-# Desktop file
-i18n.merge_file(
- input: 'five-or-more.desktop.in',
- output: 'five-or-more.desktop',
- type: 'desktop',
- po_dir: po_dir,
- install: true,
- install_dir: join_paths(data_dir, 'applications')
+# Desktop file
+i18n.merge_file (
+ input: 'five-or-more.desktop.in',
+ output: 'five-or-more.desktop',
+ type: 'desktop',
+ po_dir: po_dir,
+ install: true,
+ install_dir: join_paths (data_dir, 'applications')
)
# Themes
-foreach file: ['balls.svg', 'dots.png', 'gumball.png', 'shapes.svg']
- install_data (file,
- install_dir: join_paths(pkgdata_dir, 'themes')
- )
+foreach file: ['balls.svg', 'shapes.svg']
+ install_data (file,
+ install_dir: join_paths(pkgdata_dir, 'themes')
+ )
endforeach
# UI files
-foreach file: ['five-or-more.ui', 'five-or-more-preferences.ui', 'menu.ui']
- install_data(file,
- install_dir: join_paths(pkgdata_dir)
- )
+foreach file: ['five-or-more.ui', 'five-or-more-preferences.ui', 'five-or-more-menu.ui']
+ install_data (file,
+ install_dir: join_paths (pkgdata_dir)
+ )
endforeach
# Icons
@@ -29,29 +29,30 @@ foreach size: [ '16x16', '22x22', '24x24', '32x32', '48x48', '256x256', '512x512
)
endforeach
-install_data(join_paths('icons', 'hicolor', 'symbolic', 'five-or-more-symbolic.svg'),
- install_dir: join_paths (data_dir, 'icons', 'hicolor', 'symbolic', 'apps'))
+install_data (join_paths ('icons', 'hicolor', 'symbolic', 'five-or-more-symbolic.svg'),
+ install_dir: join_paths (data_dir, 'icons', 'hicolor', 'symbolic', 'apps')
+ )
# Appdata
-i18n.merge_file(
- input: 'five-or-more.appdata.xml.in',
- output: 'five-or-more.appdata.xml',
- type: 'xml',
- po_dir: po_dir,
- install: true,
- install_dir: join_paths(data_dir, 'metainfo'),
+i18n.merge_file (
+ input: 'five-or-more.appdata.xml.in',
+ output: 'five-or-more.appdata.xml',
+ type: 'xml',
+ po_dir: po_dir,
+ install: true,
+ install_dir: join_paths (data_dir, 'metainfo'),
)
# Gschema
-install_data('org.gnome.five-or-more.gschema.xml',
- install_dir: join_paths(data_dir, 'glib-2.0', 'schemas')
+install_data ('org.gnome.five-or-more.gschema.xml',
+ install_dir: join_paths (data_dir, 'glib-2.0', 'schemas')
)
# Gresource
-resource_files = files('org.gnome.five-or-more.gresource.xml')
-resources = gnome.compile_resources('five-or-more', resource_files)
+resource_files = files ('org.gnome.five-or-more.gresource.xml')
+resources = gnome.compile_resources ('five-or-more', resource_files)
# Manpage
-install_man(
- 'five-or-more.6'
+install_man (
+ 'five-or-more.6'
)
diff --git a/data/org.gnome.five-or-more.gresource.xml b/data/org.gnome.five-or-more.gresource.xml
index c271d91..9ee751c 100644
--- a/data/org.gnome.five-or-more.gresource.xml
+++ b/data/org.gnome.five-or-more.gresource.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/five-or-more/ui">
- <file preprocess="xml-stripblanks">five-or-more-vala.ui</file>
- <file preprocess="xml-stripblanks" alias="preferences-dialog.ui">five-or-more-vala-preferences.ui</file>
+ <file preprocess="xml-stripblanks">five-or-more.ui</file>
+ <file preprocess="xml-stripblanks" alias="preferences-dialog.ui">five-or-more-preferences.ui</file>
</gresource>
<gresource prefix="/org/gnome/five-or-more/gtk">
<file preprocess="xml-stripblanks" alias="menus.ui">five-or-more-menu.ui</file>
diff --git a/meson.build b/meson.build
index ec8e8c7..dd28078 100644
--- a/meson.build
+++ b/meson.build
@@ -24,8 +24,8 @@ libgnome_games_support_dep = dependency('libgnome-games-support-1')
librsvg_dep = dependency('librsvg-2.0', version: '>= 2.32.0')
# Libraries
-cc = meson.get_compiler('c')
-libmath_dep = cc.find_library('m')
+#cc = meson.get_compiler('c')
+#libmath_dep = cc.find_library('m')
# Configuration
conf = configuration_data()
@@ -52,4 +52,3 @@ subdir('data')
subdir('help')
subdir('po')
subdir('src')
-subdir('src-vala')
diff --git a/org.gnome.five-or-more.json b/org.gnome.five-or-more.json
index 1754037..8e10019 100644
--- a/org.gnome.five-or-more.json
+++ b/org.gnome.five-or-more.json
@@ -1,16 +1,16 @@
{
- "app-id": "org.gnome.five-or-more",
- "runtime": "org.gnome.Platform",
- "runtime-version": "3.28",
- "sdk": "org.gnome.Sdk",
- "command": "five-or-more",
+ "app-id" : "org.gnome.five-or-more",
+ "runtime" : "org.gnome.Platform",
+ "runtime-version" : "3.28",
+ "sdk" : "org.gnome.Sdk",
+ "command" : "five-or-more",
"tags" : [
"nightly"
],
- "rename-icon": "five-or-more",
- "rename-desktop-file":"five-or-more.desktop",
+ "rename-icon" : "five-or-more",
+ "rename-desktop-file" : "five-or-more.desktop",
"desktop-file-name-prefix" : "(Nightly) ",
- "finish-args": [
+ "finish-args" : [
"--share=ipc",
"--socket=x11",
"--socket=wayland",
@@ -20,39 +20,41 @@
"--env=DCONF_USER_CONFIG_DIR=.config/dconf"
],
"build-options" : {
- "cflags": "-O2 -g",
- "cxxflags": "-O2 -g"
+ "cflags" : "-O2 -g",
+ "cxxflags" : "-O2 -g",
+ "env" : {
+ }
},
- "modules": [
+ "modules" : [
{
- "name": "libgee",
- "buildsystem": "meson",
- "sources": [
+ "name" : "libgee",
+ "buildsystem" : "meson",
+ "sources" : [
{
- "type": "git",
- "branch": "meson",
- "url": "https://git.gnome.org/browse/libgee"
+ "type" : "git",
+ "branch" : "meson",
+ "url" : "https://git.gnome.org/browse/libgee"
}
]
},
{
- "name": "libgnome-games-support",
- "sources": [
+ "name" : "libgnome-games-support",
+ "sources" : [
{
- "type": "archive",
- "url":
"https://download.gnome.org/sources/libgnome-games-support/1.4/libgnome-games-support-1.4.0.tar.xz",
- "sha256": "1d89b145da7d4aedae3fa75456d97ed1b4a5bc062a01e7d0db93b006bdf11456"
+ "type" : "archive",
+ "url" :
"https://download.gnome.org/sources/libgnome-games-support/1.4/libgnome-games-support-1.4.0.tar.xz",
+ "sha256" : "1d89b145da7d4aedae3fa75456d97ed1b4a5bc062a01e7d0db93b006bdf11456"
}
]
},
{
- "name": "five-or-more",
- "buildsystem": "meson",
- "sources": [
+ "name" : "five-or-more",
+ "buildsystem" : "meson",
+ "sources" : [
{
- "type": "git",
- "branch": "master",
- "url": "https://git.gnome.org/browse/five-or-more"
+ "type" : "git",
+ "branch" : "master",
+ "url" : "https://git.gnome.org/browse/five-or-more"
}
]
}
diff --git a/org.gnome.five-or-more.json~ b/org.gnome.five-or-more.json~
new file mode 100644
index 0000000..1754037
--- /dev/null
+++ b/org.gnome.five-or-more.json~
@@ -0,0 +1,60 @@
+{
+ "app-id": "org.gnome.five-or-more",
+ "runtime": "org.gnome.Platform",
+ "runtime-version": "3.28",
+ "sdk": "org.gnome.Sdk",
+ "command": "five-or-more",
+ "tags" : [
+ "nightly"
+ ],
+ "rename-icon": "five-or-more",
+ "rename-desktop-file":"five-or-more.desktop",
+ "desktop-file-name-prefix" : "(Nightly) ",
+ "finish-args": [
+ "--share=ipc",
+ "--socket=x11",
+ "--socket=wayland",
+ "--filesystem=xdg-run/dconf",
+ "--filesystem=~/.config/dconf:ro",
+ "--talk-name=ca.desrt.dconf",
+ "--env=DCONF_USER_CONFIG_DIR=.config/dconf"
+ ],
+ "build-options" : {
+ "cflags": "-O2 -g",
+ "cxxflags": "-O2 -g"
+ },
+ "modules": [
+ {
+ "name": "libgee",
+ "buildsystem": "meson",
+ "sources": [
+ {
+ "type": "git",
+ "branch": "meson",
+ "url": "https://git.gnome.org/browse/libgee"
+ }
+ ]
+ },
+ {
+ "name": "libgnome-games-support",
+ "sources": [
+ {
+ "type": "archive",
+ "url":
"https://download.gnome.org/sources/libgnome-games-support/1.4/libgnome-games-support-1.4.0.tar.xz",
+ "sha256": "1d89b145da7d4aedae3fa75456d97ed1b4a5bc062a01e7d0db93b006bdf11456"
+ }
+ ]
+ },
+ {
+ "name": "five-or-more",
+ "buildsystem": "meson",
+ "sources": [
+ {
+ "type": "git",
+ "branch": "master",
+ "url": "https://git.gnome.org/browse/five-or-more"
+ }
+ ]
+ }
+ ]
+}
diff --git a/src-vala/board.vala b/src/board.vala
similarity index 100%
rename from src-vala/board.vala
rename to src/board.vala
diff --git a/src-vala/config.vapi b/src/config.vapi
similarity index 100%
rename from src-vala/config.vapi
rename to src/config.vapi
diff --git a/src-vala/game.vala b/src/game.vala
similarity index 100%
rename from src-vala/game.vala
rename to src/game.vala
diff --git a/src-vala/main.vala b/src/main.vala
similarity index 100%
rename from src-vala/main.vala
rename to src/main.vala
diff --git a/src/meson.build b/src/meson.build
index ee4b1d7..7a87813 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,43 +1,34 @@
#five-or-more executable
-five_or_more_c_sources = [
- 'five-or-more.c',
- 'game-area.h',
- 'game-area.c',
- 'five-or-more-app.c',
- 'five-or-more-app.h',
- 'balls-preview.c',
- 'balls-preview.h',
- 'games-file-list.c',
- 'games-file-list.h',
- 'games-preimage.c',
- 'games-preimage.h'
-]
-
five_or_more_sources = [
- five_or_more_c_sources
+ 'config.vapi',
+ 'board.vala',
+ 'game.vala',
+ 'main.vala',
+ 'next-pieces-widget.vala',
+ 'piece.vala',
+ 'piece-generator.vala',
+ 'preferences-dialog.vala',
+ 'theme-renderer.vala',
+ 'view.vala',
+ 'window.vala',
+ resources,
]
five_or_more_deps = [
- glib_dep,
- gio_dep,
- gtk_dep,
- libgnome_games_support_dep,
- libmath_dep,
- librsvg_dep,
-]
-
-five_or_more_includes = [
- config_h_dir
+ gee_dep,
+ gio_dep,
+ gtk_dep,
+ libgnome_games_support_dep,
+ librsvg_dep,
]
-five_or_more_c_flags = [
- '-include', 'config.h'
+five_or_more_vala_args = [
+ '--gresources', resource_files,
]
executable('five-or-more', five_or_more_sources,
- dependencies: five_or_more_deps,
- include_directories: five_or_more_includes,
- c_args: five_or_more_c_flags,
- install: true
+ dependencies: five_or_more_deps,
+ vala_args: five_or_more_vala_args,
+ install: true,
)
diff --git a/src-vala/next-pieces-widget.vala b/src/next-pieces-widget.vala
similarity index 100%
rename from src-vala/next-pieces-widget.vala
rename to src/next-pieces-widget.vala
diff --git a/src-vala/piece-generator.vala b/src/piece-generator.vala
similarity index 100%
rename from src-vala/piece-generator.vala
rename to src/piece-generator.vala
diff --git a/src-vala/piece.vala b/src/piece.vala
similarity index 100%
rename from src-vala/piece.vala
rename to src/piece.vala
diff --git a/src-vala/preferences-dialog.vala b/src/preferences-dialog.vala
similarity index 100%
rename from src-vala/preferences-dialog.vala
rename to src/preferences-dialog.vala
diff --git a/src-vala/theme-renderer.vala b/src/theme-renderer.vala
similarity index 98%
rename from src-vala/theme-renderer.vala
rename to src/theme-renderer.vala
index a04f318..5b72369 100644
--- a/src-vala/theme-renderer.vala
+++ b/src/theme-renderer.vala
@@ -11,8 +11,6 @@ public class ThemeRenderer
private Rsvg.Handle? theme = null;
public const string themes[] = {
"balls.svg",
- "dots.png",
- "gumball.png",
"shapes.svg",
};
diff --git a/src-vala/view.vala b/src/view.vala
similarity index 100%
rename from src-vala/view.vala
rename to src/view.vala
diff --git a/src-vala/window.vala b/src/window.vala
similarity index 98%
rename from src-vala/window.vala
rename to src/window.vala
index 6bc3388..23a9b76 100644
--- a/src-vala/window.vala
+++ b/src/window.vala
@@ -1,4 +1,4 @@
-[GtkTemplate (ui = "/org/gnome/five-or-more/ui/five-or-more-vala.ui")]
+[GtkTemplate (ui = "/org/gnome/five-or-more/ui/five-or-more.ui")]
public class GameWindow : Gtk.ApplicationWindow
{
[GtkChild]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]