manabu-desktop 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/bin/manabu-desktop +5 -0
- data/layouts/img/gaku-logo-128.png +0 -0
- data/layouts/img/gaku-logo.png +0 -0
- data/layouts/img/manabu-kun-128.png +0 -0
- data/layouts/img/manabu-kun.png +0 -0
- data/layouts/login.glade +153 -0
- data/layouts/main_menu.glade +113 -0
- data/lib/screens/base.rb +33 -0
- data/lib/screens/login.rb +14 -0
- data/lib/screens/main_menu.rb +22 -0
- data/lib/toolbox.rb +12 -0
- data/manabu-desktop.gemspec +31 -0
- metadata +100 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c5463ef8c2c2183a6bf22dc0c42d2524657b3c97
|
4
|
+
data.tar.gz: 440212f0b9c492583bf6a7d0bb191e25fdc71e2c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1588d5019fd78bd3b65b5b9afcadc63d07621d3018a015c25ba9a22cfa5f8e80a176c018d0eef38352c47197d968772787cba6e121ffe5ff6ccbf432e2501697
|
7
|
+
data.tar.gz: 57ff51c12098636fb8091ba63c2f1885ed94efaae3d76f7da0e945134671640e5c50b6d6ec3a619e675d7feded698a31e6e41ce90cdf6e906bb8dd39ee71aa43
|
data/bin/manabu-desktop
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/layouts/login.glade
ADDED
@@ -0,0 +1,153 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!-- Generated with glade 3.20.0 -->
|
3
|
+
<interface>
|
4
|
+
<requires lib="gtk+" version="3.20"/>
|
5
|
+
<object class="GtkWindow" id="login.window">
|
6
|
+
<property name="can_focus">False</property>
|
7
|
+
<child>
|
8
|
+
<object class="GtkBox" id="login.box">
|
9
|
+
<property name="visible">True</property>
|
10
|
+
<property name="can_focus">False</property>
|
11
|
+
<property name="orientation">vertical</property>
|
12
|
+
<child>
|
13
|
+
<object class="GtkImage" id="logo.image">
|
14
|
+
<property name="visible">True</property>
|
15
|
+
<property name="can_focus">False</property>
|
16
|
+
<property name="pixbuf">./img/gaku-logo-128.png</property>
|
17
|
+
</object>
|
18
|
+
<packing>
|
19
|
+
<property name="expand">False</property>
|
20
|
+
<property name="fill">True</property>
|
21
|
+
<property name="position">0</property>
|
22
|
+
</packing>
|
23
|
+
</child>
|
24
|
+
<child>
|
25
|
+
<object class="GtkBox" id="login.server.box">
|
26
|
+
<property name="visible">True</property>
|
27
|
+
<property name="can_focus">False</property>
|
28
|
+
<property name="homogeneous">True</property>
|
29
|
+
<child>
|
30
|
+
<object class="GtkLabel" id="login.server.label">
|
31
|
+
<property name="visible">True</property>
|
32
|
+
<property name="can_focus">False</property>
|
33
|
+
<property name="label" translatable="yes">login.server</property>
|
34
|
+
</object>
|
35
|
+
<packing>
|
36
|
+
<property name="expand">False</property>
|
37
|
+
<property name="fill">True</property>
|
38
|
+
<property name="position">0</property>
|
39
|
+
</packing>
|
40
|
+
</child>
|
41
|
+
<child>
|
42
|
+
<object class="GtkComboBoxText" id="login.server.dropdown">
|
43
|
+
<property name="visible">True</property>
|
44
|
+
<property name="can_focus">False</property>
|
45
|
+
<property name="has_entry">True</property>
|
46
|
+
<child internal-child="entry">
|
47
|
+
<object class="GtkEntry">
|
48
|
+
<property name="can_focus">False</property>
|
49
|
+
</object>
|
50
|
+
</child>
|
51
|
+
</object>
|
52
|
+
<packing>
|
53
|
+
<property name="expand">False</property>
|
54
|
+
<property name="fill">True</property>
|
55
|
+
<property name="position">1</property>
|
56
|
+
</packing>
|
57
|
+
</child>
|
58
|
+
</object>
|
59
|
+
<packing>
|
60
|
+
<property name="expand">False</property>
|
61
|
+
<property name="fill">True</property>
|
62
|
+
<property name="position">1</property>
|
63
|
+
</packing>
|
64
|
+
</child>
|
65
|
+
<child>
|
66
|
+
<object class="GtkBox" id="login.user.box">
|
67
|
+
<property name="visible">True</property>
|
68
|
+
<property name="can_focus">False</property>
|
69
|
+
<property name="homogeneous">True</property>
|
70
|
+
<child>
|
71
|
+
<object class="GtkLabel" id="login.user.label">
|
72
|
+
<property name="visible">True</property>
|
73
|
+
<property name="can_focus">False</property>
|
74
|
+
<property name="label" translatable="yes">login.user</property>
|
75
|
+
</object>
|
76
|
+
<packing>
|
77
|
+
<property name="expand">False</property>
|
78
|
+
<property name="fill">True</property>
|
79
|
+
<property name="position">0</property>
|
80
|
+
</packing>
|
81
|
+
</child>
|
82
|
+
<child>
|
83
|
+
<object class="GtkEntry">
|
84
|
+
<property name="visible">True</property>
|
85
|
+
<property name="can_focus">True</property>
|
86
|
+
</object>
|
87
|
+
<packing>
|
88
|
+
<property name="expand">False</property>
|
89
|
+
<property name="fill">True</property>
|
90
|
+
<property name="position">1</property>
|
91
|
+
</packing>
|
92
|
+
</child>
|
93
|
+
</object>
|
94
|
+
<packing>
|
95
|
+
<property name="expand">False</property>
|
96
|
+
<property name="fill">True</property>
|
97
|
+
<property name="position">2</property>
|
98
|
+
</packing>
|
99
|
+
</child>
|
100
|
+
<child>
|
101
|
+
<object class="GtkBox" id="login.pass.box">
|
102
|
+
<property name="visible">True</property>
|
103
|
+
<property name="can_focus">False</property>
|
104
|
+
<property name="homogeneous">True</property>
|
105
|
+
<child>
|
106
|
+
<object class="GtkLabel" id="login.pass.label">
|
107
|
+
<property name="visible">True</property>
|
108
|
+
<property name="can_focus">False</property>
|
109
|
+
<property name="label" translatable="yes">login.pass</property>
|
110
|
+
</object>
|
111
|
+
<packing>
|
112
|
+
<property name="expand">False</property>
|
113
|
+
<property name="fill">True</property>
|
114
|
+
<property name="position">0</property>
|
115
|
+
</packing>
|
116
|
+
</child>
|
117
|
+
<child>
|
118
|
+
<object class="GtkEntry">
|
119
|
+
<property name="visible">True</property>
|
120
|
+
<property name="can_focus">True</property>
|
121
|
+
</object>
|
122
|
+
<packing>
|
123
|
+
<property name="expand">False</property>
|
124
|
+
<property name="fill">True</property>
|
125
|
+
<property name="position">1</property>
|
126
|
+
</packing>
|
127
|
+
</child>
|
128
|
+
</object>
|
129
|
+
<packing>
|
130
|
+
<property name="expand">False</property>
|
131
|
+
<property name="fill">True</property>
|
132
|
+
<property name="position">3</property>
|
133
|
+
</packing>
|
134
|
+
</child>
|
135
|
+
<child>
|
136
|
+
<object class="GtkButton" id="login.button">
|
137
|
+
<property name="label" translatable="yes">login.button</property>
|
138
|
+
<property name="visible">True</property>
|
139
|
+
<property name="can_focus">True</property>
|
140
|
+
<property name="receives_default">True</property>
|
141
|
+
</object>
|
142
|
+
<packing>
|
143
|
+
<property name="expand">False</property>
|
144
|
+
<property name="fill">True</property>
|
145
|
+
<property name="padding">2</property>
|
146
|
+
<property name="pack_type">end</property>
|
147
|
+
<property name="position">4</property>
|
148
|
+
</packing>
|
149
|
+
</child>
|
150
|
+
</object>
|
151
|
+
</child>
|
152
|
+
</object>
|
153
|
+
</interface>
|
@@ -0,0 +1,113 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!-- Generated with glade 3.20.0 -->
|
3
|
+
<interface>
|
4
|
+
<requires lib="gtk+" version="3.20"/>
|
5
|
+
<object class="GtkImage" id="connect_button.icon">
|
6
|
+
<property name="visible">True</property>
|
7
|
+
<property name="can_focus">False</property>
|
8
|
+
<property name="stock">gtk-connect</property>
|
9
|
+
</object>
|
10
|
+
<object class="GtkImage" id="exit_button.icon">
|
11
|
+
<property name="visible">True</property>
|
12
|
+
<property name="can_focus">False</property>
|
13
|
+
<property name="stock">gtk-quit</property>
|
14
|
+
</object>
|
15
|
+
<object class="GtkImage" id="settings_button.icon">
|
16
|
+
<property name="visible">True</property>
|
17
|
+
<property name="can_focus">False</property>
|
18
|
+
<property name="stock">gtk-properties</property>
|
19
|
+
</object>
|
20
|
+
<object class="GtkWindow" id="main_menu.window">
|
21
|
+
<property name="can_focus">False</property>
|
22
|
+
<property name="resizable">False</property>
|
23
|
+
<property name="default_width">256</property>
|
24
|
+
<property name="default_height">256</property>
|
25
|
+
<property name="gravity">south</property>
|
26
|
+
<child>
|
27
|
+
<object class="GtkBox" id="menu.box">
|
28
|
+
<property name="visible">True</property>
|
29
|
+
<property name="can_focus">False</property>
|
30
|
+
<property name="orientation">vertical</property>
|
31
|
+
<property name="spacing">6</property>
|
32
|
+
<property name="baseline_position">bottom</property>
|
33
|
+
<child>
|
34
|
+
<object class="GtkImage" id="logo.image">
|
35
|
+
<property name="visible">True</property>
|
36
|
+
<property name="can_focus">False</property>
|
37
|
+
<property name="has_tooltip">True</property>
|
38
|
+
<property name="pixbuf">img/manabu-kun-128.png</property>
|
39
|
+
</object>
|
40
|
+
<packing>
|
41
|
+
<property name="expand">False</property>
|
42
|
+
<property name="fill">True</property>
|
43
|
+
<property name="position">0</property>
|
44
|
+
</packing>
|
45
|
+
</child>
|
46
|
+
<child>
|
47
|
+
<object class="GtkButton" id="connect.button">
|
48
|
+
<property name="label" translatable="yes">connect.button</property>
|
49
|
+
<property name="visible">True</property>
|
50
|
+
<property name="can_focus">True</property>
|
51
|
+
<property name="receives_default">True</property>
|
52
|
+
<property name="image">connect_button.icon</property>
|
53
|
+
<property name="always_show_image">True</property>
|
54
|
+
</object>
|
55
|
+
<packing>
|
56
|
+
<property name="expand">False</property>
|
57
|
+
<property name="fill">True</property>
|
58
|
+
<property name="position">1</property>
|
59
|
+
</packing>
|
60
|
+
</child>
|
61
|
+
<child>
|
62
|
+
<object class="GtkButton" id="settings.button">
|
63
|
+
<property name="label" translatable="yes">settings.button</property>
|
64
|
+
<property name="visible">True</property>
|
65
|
+
<property name="can_focus">True</property>
|
66
|
+
<property name="receives_default">True</property>
|
67
|
+
<property name="image">settings_button.icon</property>
|
68
|
+
<property name="always_show_image">True</property>
|
69
|
+
</object>
|
70
|
+
<packing>
|
71
|
+
<property name="expand">False</property>
|
72
|
+
<property name="fill">True</property>
|
73
|
+
<property name="position">2</property>
|
74
|
+
</packing>
|
75
|
+
</child>
|
76
|
+
<child>
|
77
|
+
<object class="GtkButton" id="exit.button">
|
78
|
+
<property name="label" translatable="yes">exit.button</property>
|
79
|
+
<property name="visible">True</property>
|
80
|
+
<property name="can_focus">True</property>
|
81
|
+
<property name="receives_default">True</property>
|
82
|
+
<property name="image">exit_button.icon</property>
|
83
|
+
<property name="always_show_image">True</property>
|
84
|
+
</object>
|
85
|
+
<packing>
|
86
|
+
<property name="expand">False</property>
|
87
|
+
<property name="fill">True</property>
|
88
|
+
<property name="position">3</property>
|
89
|
+
</packing>
|
90
|
+
</child>
|
91
|
+
<child>
|
92
|
+
<object class="GtkStatusbar" id="status.bar">
|
93
|
+
<property name="visible">True</property>
|
94
|
+
<property name="can_focus">False</property>
|
95
|
+
<property name="margin_left">10</property>
|
96
|
+
<property name="margin_right">10</property>
|
97
|
+
<property name="margin_start">10</property>
|
98
|
+
<property name="margin_end">10</property>
|
99
|
+
<property name="margin_top">6</property>
|
100
|
+
<property name="margin_bottom">6</property>
|
101
|
+
<property name="orientation">vertical</property>
|
102
|
+
<property name="spacing">2</property>
|
103
|
+
</object>
|
104
|
+
<packing>
|
105
|
+
<property name="expand">False</property>
|
106
|
+
<property name="fill">True</property>
|
107
|
+
<property name="position">4</property>
|
108
|
+
</packing>
|
109
|
+
</child>
|
110
|
+
</object>
|
111
|
+
</child>
|
112
|
+
</object>
|
113
|
+
</interface>
|
data/lib/screens/base.rb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
require_relative '../toolbox'
|
2
|
+
require 'gtk3'
|
3
|
+
|
4
|
+
module ManabuDesktop
|
5
|
+
module Screens
|
6
|
+
class Base
|
7
|
+
attr_accessor :window, :builder
|
8
|
+
|
9
|
+
def initialize(layout)
|
10
|
+
@builder = Gtk::Builder.new()
|
11
|
+
@builder.add_from_file("#{__dir__}/../../layouts/#{layout}.glade")
|
12
|
+
|
13
|
+
@builder.connect_signals do |handler|
|
14
|
+
begin
|
15
|
+
method(handler)
|
16
|
+
rescue
|
17
|
+
puts "#{handler} not yet implemented!"
|
18
|
+
method('not_yet_implemented')
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
@window = builder.get_object("#{layout}.window")
|
23
|
+
@window.signal_connect('delete-event') { |_widget| Gtk.main_quit }
|
24
|
+
end
|
25
|
+
|
26
|
+
def _show()
|
27
|
+
@window.show()
|
28
|
+
|
29
|
+
Gtk.main()
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require_relative 'base'
|
2
|
+
require_relative 'login'
|
3
|
+
|
4
|
+
module ManabuDesktop
|
5
|
+
module Screens
|
6
|
+
class MainMenu < ManabuDesktop::Screens::Base
|
7
|
+
def initialize()
|
8
|
+
super('main_menu')
|
9
|
+
|
10
|
+
connect_button = @builder.get_object('connect.button')
|
11
|
+
connect_button.signal_connect('clicked') { ManabuDesktop::Screens::Login.new }
|
12
|
+
|
13
|
+
settings_button = @builder.get_object('settings.button')
|
14
|
+
settings_button.signal_connect('clicked') { puts 'Settings coming soon' }
|
15
|
+
|
16
|
+
exit_button = @builder.get_object('exit.button')
|
17
|
+
exit_button.signal_connect('clicked') { |_widget| Gtk.main_quit }
|
18
|
+
_show()
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/toolbox.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'i18n'
|
2
|
+
|
3
|
+
I18n.load_path = Dir["#{__dir__}/../locales/*.yml"]
|
4
|
+
|
5
|
+
# TODO there must be a better way to determine language
|
6
|
+
@lang = (ENV['LANG'][/^([^_]*)/]).to_sym
|
7
|
+
if I18n.available_locales.include? @lang
|
8
|
+
I18n.locale = @lang
|
9
|
+
else
|
10
|
+
I18n.locale = :en
|
11
|
+
@lang = :en
|
12
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = 'manabu-desktop'
|
3
|
+
s.version = '0.0.1'
|
4
|
+
s.licenses = ['GPLv3']
|
5
|
+
s.summary = 'GTK based GUI client for Manabu/GAKU Engine'
|
6
|
+
s.description = 'Manabu Desktop is a GTK front end for the Manabu client.'
|
7
|
+
s.post_install_message = \
|
8
|
+
'╔═════════════════════════╼' +
|
9
|
+
"║Manabu GTK GUI for ⚙学 GAKU Engine [学エンジン] " +
|
10
|
+
'╟─────────────────────────╼' +
|
11
|
+
'║©2015 (株)幻創社 [Phantom Creation Inc.]' +
|
12
|
+
'║http://www.gakuengine.com' +
|
13
|
+
'╟─────────────────────────╼' +
|
14
|
+
'║Manabu GTK is Open Sourced under the GPLv3.' +
|
15
|
+
'╚═════════════════════════╼'
|
16
|
+
s.authors = ['Rei Kagetsuki']
|
17
|
+
s.email = 'info@gakuengine.com'
|
18
|
+
s.homepage = 'http://www.gakuengine.com'
|
19
|
+
|
20
|
+
s.files = Dir.glob('lib/**/*.rb') +
|
21
|
+
Dir.glob('layouts/**/*.glade') +
|
22
|
+
Dir.glob('layouts/**/*.png') +
|
23
|
+
['bin/manabu-desktop', 'manabu-desktop.gemspec']
|
24
|
+
s.require_paths = ['lib']
|
25
|
+
s.bindir = 'bin'
|
26
|
+
s.executables << 'manabu-desktop'
|
27
|
+
|
28
|
+
s.add_dependency 'manabu'
|
29
|
+
s.add_dependency 'gtk3'
|
30
|
+
s.add_dependency 'i18n'
|
31
|
+
end
|
metadata
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: manabu-desktop
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Rei Kagetsuki
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-12-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: manabu
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: gtk3
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: i18n
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Manabu Desktop is a GTK front end for the Manabu client.
|
56
|
+
email: info@gakuengine.com
|
57
|
+
executables:
|
58
|
+
- manabu-desktop
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- bin/manabu-desktop
|
63
|
+
- layouts/img/gaku-logo-128.png
|
64
|
+
- layouts/img/gaku-logo.png
|
65
|
+
- layouts/img/manabu-kun-128.png
|
66
|
+
- layouts/img/manabu-kun.png
|
67
|
+
- layouts/login.glade
|
68
|
+
- layouts/main_menu.glade
|
69
|
+
- lib/screens/base.rb
|
70
|
+
- lib/screens/login.rb
|
71
|
+
- lib/screens/main_menu.rb
|
72
|
+
- lib/toolbox.rb
|
73
|
+
- manabu-desktop.gemspec
|
74
|
+
homepage: http://www.gakuengine.com
|
75
|
+
licenses:
|
76
|
+
- GPLv3
|
77
|
+
metadata: {}
|
78
|
+
post_install_message: "╔═════════════════════════╼║Manabu GTK GUI for ⚙学 GAKU Engine
|
79
|
+
[学エンジン] ╟─────────────────────────╼║©2015 (株)幻創社 [Phantom Creation Inc.]║http://www.gakuengine.com╟─────────────────────────╼║Manabu
|
80
|
+
GTK is Open Sourced under the GPLv3.╚═════════════════════════╼"
|
81
|
+
rdoc_options: []
|
82
|
+
require_paths:
|
83
|
+
- lib
|
84
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
requirements: []
|
95
|
+
rubyforge_project:
|
96
|
+
rubygems_version: 2.6.14
|
97
|
+
signing_key:
|
98
|
+
specification_version: 4
|
99
|
+
summary: GTK based GUI client for Manabu/GAKU Engine
|
100
|
+
test_files: []
|