Merge lp:~jsonic/gamedb/gtkbuilder into lp:gamedb

Proposed by Juhani Numminen
Status: Merged
Merge reported by: Juhani Numminen
Merged at revision: not available
Proposed branch: lp:~jsonic/gamedb/gtkbuilder
Merge into: lp:gamedb
Diff against target: 1081 lines (+471/-531)
3 files modified
data/gamedb.glade (+0/-505)
data/gamedb.ui (+445/-0)
gamedb (+26/-26)
To merge this branch: bzr merge lp:~jsonic/gamedb/gtkbuilder
Reviewer Review Type Date Requested Status
Juhani Numminen Pending
Review via email: mp+84981@code.launchpad.net

Description of the change

Change from libGlade to newer, preferred GTK Builder API.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'data/gamedb.glade'
2--- data/gamedb.glade 2011-11-05 14:48:12 +0000
3+++ data/gamedb.glade 1970-01-01 00:00:00 +0000
4@@ -1,505 +0,0 @@
5-<?xml version="1.0" encoding="UTF-8"?>
6-<glade-interface>
7- <!-- interface-requires gtk+ 2.16 -->
8- <!-- interface-naming-policy toplevel-contextual -->
9- <widget class="GtkAboutDialog" id="aboutDlg">
10- <property name="can_focus">False</property>
11- <property name="border_width">5</property>
12- <property name="title" translatable="yes">About GameDB</property>
13- <property name="icon_name">gamedb</property>
14- <property name="type_hint">dialog</property>
15- <property name="program_name">GameDB</property>
16- <property name="copyright" translatable="yes">Copyright (c) 2011 Juhani Numminen</property>
17- <property name="comments" translatable="yes">A Game Database application written in Python using PyGTK. Licenced under GNU GPL version 3</property>
18- <property name="website">http://launchpad.net/gamedb/</property>
19- <property name="license" translatable="yes">This program is free software: you can redistribute it and/or modify
20-it under the terms of the GNU General Public License as published by
21-the Free Software Foundation, either version 3 of the License, or
22-(at your option) any later version.
23-
24-This program is distributed in the hope that it will be useful,
25-but WITHOUT ANY WARRANTY; without even the implied warranty of
26-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27-GNU General Public License for more details.
28-
29-You should have received a copy of the GNU General Public License
30-along with this program. If not, see http://www.gnu.org/licenses/</property>
31- <property name="translator_credits" translatable="yes">translator-credits</property>
32- <property name="logo_icon_name">gamedb</property>
33- <child internal-child="vbox">
34- <widget class="GtkVBox" id="dialog-vbox3">
35- <property name="visible">True</property>
36- <property name="can_focus">False</property>
37- <property name="spacing">2</property>
38- <child internal-child="action_area">
39- <widget class="GtkHButtonBox" id="dialog-action_area3">
40- <property name="visible">True</property>
41- <property name="can_focus">False</property>
42- <property name="layout_style">end</property>
43- </widget>
44- <packing>
45- <property name="expand">False</property>
46- <property name="fill">True</property>
47- <property name="pack_type">end</property>
48- <property name="position">0</property>
49- </packing>
50- </child>
51- </widget>
52- </child>
53- </widget>
54- <widget class="GtkDialog" id="gameDlg">
55- <property name="visible">True</property>
56- <property name="can_focus">False</property>
57- <property name="title" translatable="yes">Game Properties</property>
58- <property name="icon_name">gamedb</property>
59- <property name="type_hint">dialog</property>
60- <child internal-child="vbox">
61- <widget class="GtkVBox" id="dialog-vbox1">
62- <property name="visible">True</property>
63- <property name="can_focus">False</property>
64- <child internal-child="action_area">
65- <widget class="GtkHButtonBox" id="dialog-action_area1">
66- <property name="visible">True</property>
67- <property name="can_focus">False</property>
68- <property name="layout_style">end</property>
69- <child>
70- <widget class="GtkButton" id="cancelbutton1">
71- <property name="label">gtk-cancel</property>
72- <property name="response_id">-6</property>
73- <property name="visible">True</property>
74- <property name="can_focus">True</property>
75- <property name="can_default">True</property>
76- <property name="receives_default">False</property>
77- <property name="use_action_appearance">False</property>
78- <property name="use_stock">True</property>
79- </widget>
80- <packing>
81- <property name="expand">False</property>
82- <property name="fill">False</property>
83- <property name="position">0</property>
84- </packing>
85- </child>
86- <child>
87- <widget class="GtkButton" id="okbutton1">
88- <property name="label">gtk-ok</property>
89- <property name="response_id">-5</property>
90- <property name="visible">True</property>
91- <property name="can_focus">True</property>
92- <property name="can_default">True</property>
93- <property name="receives_default">False</property>
94- <property name="use_action_appearance">False</property>
95- <property name="use_stock">True</property>
96- </widget>
97- <packing>
98- <property name="expand">False</property>
99- <property name="fill">False</property>
100- <property name="position">1</property>
101- </packing>
102- </child>
103- </widget>
104- <packing>
105- <property name="expand">False</property>
106- <property name="fill">True</property>
107- <property name="pack_type">end</property>
108- <property name="position">0</property>
109- </packing>
110- </child>
111- <child>
112- <widget class="GtkTable" id="table2">
113- <property name="visible">True</property>
114- <property name="can_focus">False</property>
115- <property name="n_rows">4</property>
116- <property name="n_columns">2</property>
117- <property name="column_spacing">1</property>
118- <property name="row_spacing">3</property>
119- <child>
120- <widget class="GtkLabel" id="label1">
121- <property name="visible">True</property>
122- <property name="can_focus">False</property>
123- <property name="xalign">0</property>
124- <property name="label" translatable="yes">Name:</property>
125- </widget>
126- <packing>
127- <property name="x_options">GTK_FILL</property>
128- <property name="y_options"></property>
129- </packing>
130- </child>
131- <child>
132- <widget class="GtkLabel" id="label2">
133- <property name="visible">True</property>
134- <property name="can_focus">False</property>
135- <property name="xalign">0</property>
136- <property name="label" translatable="yes">Platform: </property>
137- </widget>
138- <packing>
139- <property name="top_attach">1</property>
140- <property name="bottom_attach">2</property>
141- <property name="x_options">GTK_FILL</property>
142- <property name="y_options"></property>
143- </packing>
144- </child>
145- <child>
146- <widget class="GtkLabel" id="label3">
147- <property name="visible">True</property>
148- <property name="can_focus">False</property>
149- <property name="xalign">0</property>
150- <property name="label" translatable="yes">Rating: </property>
151- </widget>
152- <packing>
153- <property name="top_attach">2</property>
154- <property name="bottom_attach">3</property>
155- <property name="x_options">GTK_FILL</property>
156- <property name="y_options"></property>
157- </packing>
158- </child>
159- <child>
160- <widget class="GtkLabel" id="label4">
161- <property name="visible">True</property>
162- <property name="can_focus">False</property>
163- <property name="xalign">0</property>
164- <property name="label" translatable="yes">Year: </property>
165- </widget>
166- <packing>
167- <property name="top_attach">3</property>
168- <property name="bottom_attach">4</property>
169- <property name="x_options">GTK_FILL</property>
170- <property name="y_options"></property>
171- </packing>
172- </child>
173- <child>
174- <widget class="GtkEntry" id="enName">
175- <property name="visible">True</property>
176- <property name="can_focus">True</property>
177- <property name="primary_icon_activatable">False</property>
178- <property name="secondary_icon_activatable">False</property>
179- <property name="primary_icon_sensitive">True</property>
180- <property name="secondary_icon_sensitive">True</property>
181- </widget>
182- <packing>
183- <property name="left_attach">1</property>
184- <property name="right_attach">2</property>
185- <property name="y_options"></property>
186- </packing>
187- </child>
188- <child>
189- <widget class="GtkEntry" id="enRating">
190- <property name="visible">True</property>
191- <property name="can_focus">True</property>
192- <property name="primary_icon_activatable">False</property>
193- <property name="secondary_icon_activatable">False</property>
194- <property name="primary_icon_sensitive">True</property>
195- <property name="secondary_icon_sensitive">True</property>
196- </widget>
197- <packing>
198- <property name="left_attach">1</property>
199- <property name="right_attach">2</property>
200- <property name="top_attach">2</property>
201- <property name="bottom_attach">3</property>
202- <property name="y_options"></property>
203- </packing>
204- </child>
205- <child>
206- <widget class="GtkEntry" id="enYear">
207- <property name="visible">True</property>
208- <property name="can_focus">True</property>
209- <property name="primary_icon_activatable">False</property>
210- <property name="secondary_icon_activatable">False</property>
211- <property name="primary_icon_sensitive">True</property>
212- <property name="secondary_icon_sensitive">True</property>
213- </widget>
214- <packing>
215- <property name="left_attach">1</property>
216- <property name="right_attach">2</property>
217- <property name="top_attach">3</property>
218- <property name="bottom_attach">4</property>
219- <property name="y_options"></property>
220- </packing>
221- </child>
222- <child>
223- <widget class="GtkEntry" id="enPlatform">
224- <property name="visible">True</property>
225- <property name="can_focus">True</property>
226- <property name="invisible_char">●</property>
227- <property name="primary_icon_activatable">False</property>
228- <property name="secondary_icon_activatable">False</property>
229- <property name="primary_icon_sensitive">True</property>
230- <property name="secondary_icon_sensitive">True</property>
231- </widget>
232- <packing>
233- <property name="left_attach">1</property>
234- <property name="right_attach">2</property>
235- <property name="top_attach">1</property>
236- <property name="bottom_attach">2</property>
237- <property name="y_options"></property>
238- </packing>
239- </child>
240- </widget>
241- <packing>
242- <property name="expand">True</property>
243- <property name="fill">True</property>
244- <property name="position">2</property>
245- </packing>
246- </child>
247- </widget>
248- </child>
249- </widget>
250- <widget class="GtkWindow" id="mainWindow">
251- <property name="visible">True</property>
252- <property name="can_focus">False</property>
253- <property name="title" translatable="yes">Game Database</property>
254- <property name="window_position">center</property>
255- <property name="default_width">450</property>
256- <property name="default_height">300</property>
257- <property name="icon_name">gamedb</property>
258- <signal name="destroy" handler="quit_app" swapped="no"/>
259- <child>
260- <widget class="GtkVBox" id="vbox1">
261- <property name="visible">True</property>
262- <property name="can_focus">False</property>
263- <child>
264- <widget class="GtkMenuBar" id="menubar1">
265- <property name="visible">True</property>
266- <property name="can_focus">False</property>
267- <child>
268- <widget class="GtkMenuItem" id="menuitemFile">
269- <property name="visible">True</property>
270- <property name="can_focus">False</property>
271- <property name="use_action_appearance">False</property>
272- <property name="label" translatable="yes">_File</property>
273- <property name="use_underline">True</property>
274- <child>
275- <widget class="GtkMenu" id="menuFile">
276- <property name="can_focus">False</property>
277- <child>
278- <widget class="GtkImageMenuItem" id="new1">
279- <property name="label">gtk-new</property>
280- <property name="visible">True</property>
281- <property name="can_focus">False</property>
282- <property name="use_action_appearance">False</property>
283- <property name="use_underline">True</property>
284- <property name="use_stock">True</property>
285- <signal name="activate" handler="clear_games" swapped="no"/>
286- </widget>
287- </child>
288- <child>
289- <widget class="GtkImageMenuItem" id="open1">
290- <property name="label">gtk-open</property>
291- <property name="visible">True</property>
292- <property name="can_focus">False</property>
293- <property name="use_action_appearance">False</property>
294- <property name="use_underline">True</property>
295- <property name="use_stock">True</property>
296- <signal name="activate" handler="file_open" swapped="no"/>
297- </widget>
298- </child>
299- <child>
300- <widget class="GtkImageMenuItem" id="save1">
301- <property name="label">gtk-save</property>
302- <property name="visible">True</property>
303- <property name="can_focus">False</property>
304- <property name="use_action_appearance">False</property>
305- <property name="use_underline">True</property>
306- <property name="use_stock">True</property>
307- <signal name="activate" handler="file_save" swapped="no"/>
308- </widget>
309- </child>
310- <child>
311- <widget class="GtkImageMenuItem" id="save_as1">
312- <property name="label">gtk-save-as</property>
313- <property name="visible">True</property>
314- <property name="can_focus">False</property>
315- <property name="use_action_appearance">False</property>
316- <property name="use_underline">True</property>
317- <property name="use_stock">True</property>
318- <signal name="activate" handler="save_as" swapped="no"/>
319- </widget>
320- </child>
321- <child>
322- <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
323- <property name="visible">True</property>
324- <property name="can_focus">False</property>
325- </widget>
326- </child>
327- <child>
328- <widget class="GtkImageMenuItem" id="quit1">
329- <property name="label">gtk-quit</property>
330- <property name="visible">True</property>
331- <property name="can_focus">False</property>
332- <property name="use_action_appearance">False</property>
333- <property name="use_underline">True</property>
334- <property name="use_stock">True</property>
335- <signal name="activate" handler="quit_app" swapped="no"/>
336- </widget>
337- </child>
338- </widget>
339- </child>
340- </widget>
341- </child>
342- <child>
343- <widget class="GtkMenuItem" id="menuitemGame">
344- <property name="visible">True</property>
345- <property name="can_focus">False</property>
346- <property name="use_action_appearance">False</property>
347- <property name="label" translatable="yes">Game</property>
348- <property name="use_underline">True</property>
349- <child>
350- <widget class="GtkMenu" id="menuGame">
351- <property name="can_focus">False</property>
352- <child>
353- <widget class="GtkImageMenuItem" id="add1">
354- <property name="label">gtk-add</property>
355- <property name="visible">True</property>
356- <property name="can_focus">False</property>
357- <property name="use_action_appearance">False</property>
358- <property name="use_underline">True</property>
359- <property name="use_stock">True</property>
360- <signal name="activate" handler="add_game" swapped="no"/>
361- </widget>
362- </child>
363- <child>
364- <widget class="GtkImageMenuItem" id="edit1">
365- <property name="label">gtk-edit</property>
366- <property name="visible">True</property>
367- <property name="can_focus">False</property>
368- <property name="use_action_appearance">False</property>
369- <property name="use_underline">True</property>
370- <property name="use_stock">True</property>
371- <signal name="activate" handler="edit_game" swapped="no"/>
372- </widget>
373- </child>
374- <child>
375- <widget class="GtkImageMenuItem" id="remove1">
376- <property name="label">gtk-remove</property>
377- <property name="visible">True</property>
378- <property name="can_focus">False</property>
379- <property name="use_action_appearance">False</property>
380- <property name="use_underline">True</property>
381- <property name="use_stock">True</property>
382- <signal name="activate" handler="remove_game" swapped="no"/>
383- </widget>
384- </child>
385- </widget>
386- </child>
387- </widget>
388- </child>
389- <child>
390- <widget class="GtkMenuItem" id="menuitemHelp">
391- <property name="visible">True</property>
392- <property name="can_focus">False</property>
393- <property name="use_action_appearance">False</property>
394- <property name="label" translatable="yes">_Help</property>
395- <property name="use_underline">True</property>
396- <child>
397- <widget class="GtkMenu" id="menuHelp">
398- <property name="can_focus">False</property>
399- <child>
400- <widget class="GtkMenuItem" id="about1">
401- <property name="visible">True</property>
402- <property name="can_focus">False</property>
403- <property name="use_action_appearance">False</property>
404- <property name="label" translatable="yes">_About</property>
405- <property name="use_underline">True</property>
406- <signal name="activate" handler="show_about_dlg" swapped="no"/>
407- </widget>
408- </child>
409- </widget>
410- </child>
411- </widget>
412- </child>
413- </widget>
414- <packing>
415- <property name="expand">False</property>
416- <property name="fill">False</property>
417- <property name="position">0</property>
418- </packing>
419- </child>
420- <child>
421- <widget class="GtkToolbar" id="toolbar1">
422- <property name="visible">True</property>
423- <property name="can_focus">False</property>
424- <property name="toolbar_style">both</property>
425- <child>
426- <widget class="GtkToolButton" id="tbAddGame">
427- <property name="visible">True</property>
428- <property name="can_focus">False</property>
429- <property name="use_action_appearance">False</property>
430- <property name="label" translatable="yes">Add Game</property>
431- <property name="use_underline">True</property>
432- <property name="stock_id">gtk-add</property>
433- <signal name="clicked" handler="add_game" swapped="no"/>
434- </widget>
435- <packing>
436- <property name="expand">False</property>
437- <property name="homogeneous">True</property>
438- </packing>
439- </child>
440- <child>
441- <widget class="GtkToolButton" id="tbEditGame">
442- <property name="visible">True</property>
443- <property name="can_focus">False</property>
444- <property name="use_action_appearance">False</property>
445- <property name="label" translatable="yes">Edit Game</property>
446- <property name="use_underline">True</property>
447- <property name="stock_id">gtk-edit</property>
448- <signal name="clicked" handler="edit_game" swapped="no"/>
449- </widget>
450- <packing>
451- <property name="expand">False</property>
452- <property name="homogeneous">True</property>
453- </packing>
454- </child>
455- <child>
456- <widget class="GtkToolButton" id="tbRemoveGame">
457- <property name="visible">True</property>
458- <property name="can_focus">False</property>
459- <property name="use_action_appearance">False</property>
460- <property name="label" translatable="yes">Remove Game</property>
461- <property name="use_underline">True</property>
462- <property name="stock_id">gtk-remove</property>
463- <signal name="clicked" handler="remove_game" swapped="no"/>
464- </widget>
465- <packing>
466- <property name="expand">False</property>
467- <property name="homogeneous">True</property>
468- </packing>
469- </child>
470- </widget>
471- <packing>
472- <property name="expand">False</property>
473- <property name="fill">False</property>
474- <property name="position">1</property>
475- </packing>
476- </child>
477- <child>
478- <widget class="GtkScrolledWindow" id="scrolledwindow1">
479- <property name="visible">True</property>
480- <property name="can_focus">True</property>
481- <property name="shadow_type">in</property>
482- <child>
483- <widget class="GtkTreeView" id="gameView">
484- <property name="visible">True</property>
485- <property name="can_focus">True</property>
486- </widget>
487- </child>
488- </widget>
489- <packing>
490- <property name="expand">True</property>
491- <property name="fill">True</property>
492- <property name="position">2</property>
493- </packing>
494- </child>
495- <child>
496- <widget class="GtkStatusbar" id="statusbar1">
497- <property name="visible">True</property>
498- <property name="can_focus">False</property>
499- </widget>
500- <packing>
501- <property name="expand">False</property>
502- <property name="fill">False</property>
503- <property name="position">3</property>
504- </packing>
505- </child>
506- </widget>
507- </child>
508- </widget>
509-</glade-interface>
510
511=== added file 'data/gamedb.ui'
512--- data/gamedb.ui 1970-01-01 00:00:00 +0000
513+++ data/gamedb.ui 2011-12-08 15:55:40 +0000
514@@ -0,0 +1,445 @@
515+<?xml version="1.0"?>
516+<interface>
517+ <requires lib="gtk+" version="2.16"/>
518+ <!-- interface-naming-policy toplevel-contextual -->
519+ <object class="GtkAboutDialog" id="aboutDlg">
520+ <property name="border_width">5</property>
521+ <property name="title" translatable="yes">About GameDB</property>
522+ <property name="icon_name">gamedb</property>
523+ <property name="type_hint">dialog</property>
524+ <property name="program_name">GameDB</property>
525+ <property name="copyright">Copyright (c) 2011 Juhani Numminen</property>
526+ <property name="comments" translatable="yes">A Game Database application written in Python using PyGTK. Licenced under GNU GPL version 3</property>
527+ <property name="website">https://launchpad.net/gamedb/</property>
528+ <property name="license" translatable="yes">This program is free software: you can redistribute it and/or modify
529+it under the terms of the GNU General Public License as published by
530+the Free Software Foundation, either version 3 of the License, or
531+(at your option) any later version.
532+
533+This program is distributed in the hope that it will be useful,
534+but WITHOUT ANY WARRANTY; without even the implied warranty of
535+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
536+GNU General Public License for more details.
537+
538+You should have received a copy of the GNU General Public License
539+along with this program. If not, see http://www.gnu.org/licenses/</property>
540+ <property name="translator_credits" translatable="yes">translator-credits</property>
541+ <property name="logo_icon_name">gamedb</property>
542+ <child internal-child="vbox">
543+ <object class="GtkVBox" id="dialog-vbox3">
544+ <property name="visible">True</property>
545+ <property name="orientation">vertical</property>
546+ <property name="spacing">2</property>
547+ <child internal-child="action_area">
548+ <object class="GtkHButtonBox" id="dialog-action_area3">
549+ <property name="visible">True</property>
550+ <property name="layout_style">end</property>
551+ </object>
552+ <packing>
553+ <property name="expand">False</property>
554+ <property name="pack_type">end</property>
555+ <property name="position">0</property>
556+ </packing>
557+ </child>
558+ </object>
559+ </child>
560+ </object>
561+ <object class="GtkDialog" id="gameDlg">
562+ <property name="visible">True</property>
563+ <property name="title" translatable="yes">Game Properties</property>
564+ <property name="icon_name">gamedb</property>
565+ <property name="type_hint">dialog</property>
566+ <child internal-child="vbox">
567+ <object class="GtkVBox" id="dialog-vbox1">
568+ <property name="visible">True</property>
569+ <property name="orientation">vertical</property>
570+ <child>
571+ <object class="GtkTable" id="table2">
572+ <property name="visible">True</property>
573+ <property name="n_rows">4</property>
574+ <property name="n_columns">2</property>
575+ <property name="column_spacing">1</property>
576+ <property name="row_spacing">3</property>
577+ <child>
578+ <object class="GtkLabel" id="label1">
579+ <property name="visible">True</property>
580+ <property name="xalign">0</property>
581+ <property name="label" translatable="yes">Name:</property>
582+ </object>
583+ <packing>
584+ <property name="x_options">GTK_FILL</property>
585+ <property name="y_options"></property>
586+ </packing>
587+ </child>
588+ <child>
589+ <object class="GtkLabel" id="label2">
590+ <property name="visible">True</property>
591+ <property name="xalign">0</property>
592+ <property name="label" translatable="yes">Platform:</property>
593+ </object>
594+ <packing>
595+ <property name="top_attach">1</property>
596+ <property name="bottom_attach">2</property>
597+ <property name="x_options">GTK_FILL</property>
598+ <property name="y_options"></property>
599+ </packing>
600+ </child>
601+ <child>
602+ <object class="GtkLabel" id="label3">
603+ <property name="visible">True</property>
604+ <property name="xalign">0</property>
605+ <property name="label" translatable="yes">Rating:</property>
606+ </object>
607+ <packing>
608+ <property name="top_attach">2</property>
609+ <property name="bottom_attach">3</property>
610+ <property name="x_options">GTK_FILL</property>
611+ <property name="y_options"></property>
612+ </packing>
613+ </child>
614+ <child>
615+ <object class="GtkLabel" id="label4">
616+ <property name="visible">True</property>
617+ <property name="xalign">0</property>
618+ <property name="label" translatable="yes">Year:</property>
619+ </object>
620+ <packing>
621+ <property name="top_attach">3</property>
622+ <property name="bottom_attach">4</property>
623+ <property name="x_options">GTK_FILL</property>
624+ <property name="y_options"></property>
625+ </packing>
626+ </child>
627+ <child>
628+ <object class="GtkEntry" id="enName">
629+ <property name="visible">True</property>
630+ <property name="can_focus">True</property>
631+ <property name="primary_icon_sensitive">True</property>
632+ <property name="secondary_icon_sensitive">True</property>
633+ </object>
634+ <packing>
635+ <property name="left_attach">1</property>
636+ <property name="right_attach">2</property>
637+ <property name="y_options"></property>
638+ </packing>
639+ </child>
640+ <child>
641+ <object class="GtkEntry" id="enRating">
642+ <property name="visible">True</property>
643+ <property name="can_focus">True</property>
644+ <property name="primary_icon_sensitive">True</property>
645+ <property name="secondary_icon_sensitive">True</property>
646+ </object>
647+ <packing>
648+ <property name="left_attach">1</property>
649+ <property name="right_attach">2</property>
650+ <property name="top_attach">2</property>
651+ <property name="bottom_attach">3</property>
652+ <property name="y_options"></property>
653+ </packing>
654+ </child>
655+ <child>
656+ <object class="GtkEntry" id="enYear">
657+ <property name="visible">True</property>
658+ <property name="can_focus">True</property>
659+ <property name="primary_icon_sensitive">True</property>
660+ <property name="secondary_icon_sensitive">True</property>
661+ </object>
662+ <packing>
663+ <property name="left_attach">1</property>
664+ <property name="right_attach">2</property>
665+ <property name="top_attach">3</property>
666+ <property name="bottom_attach">4</property>
667+ <property name="y_options"></property>
668+ </packing>
669+ </child>
670+ <child>
671+ <object class="GtkEntry" id="enPlatform">
672+ <property name="visible">True</property>
673+ <property name="can_focus">True</property>
674+ <property name="invisible_char">&#x25CF;</property>
675+ <property name="primary_icon_sensitive">True</property>
676+ <property name="secondary_icon_sensitive">True</property>
677+ </object>
678+ <packing>
679+ <property name="left_attach">1</property>
680+ <property name="right_attach">2</property>
681+ <property name="top_attach">1</property>
682+ <property name="bottom_attach">2</property>
683+ <property name="y_options"></property>
684+ </packing>
685+ </child>
686+ </object>
687+ <packing>
688+ <property name="position">2</property>
689+ </packing>
690+ </child>
691+ <child internal-child="action_area">
692+ <object class="GtkHButtonBox" id="dialog-action_area1">
693+ <property name="visible">True</property>
694+ <property name="layout_style">end</property>
695+ <child>
696+ <object class="GtkButton" id="cancelbutton1">
697+ <property name="label">gtk-cancel</property>
698+ <property name="visible">True</property>
699+ <property name="can_focus">True</property>
700+ <property name="can_default">True</property>
701+ <property name="receives_default">False</property>
702+ <property name="use_stock">True</property>
703+ </object>
704+ <packing>
705+ <property name="expand">False</property>
706+ <property name="fill">False</property>
707+ <property name="position">0</property>
708+ </packing>
709+ </child>
710+ <child>
711+ <object class="GtkButton" id="okbutton1">
712+ <property name="label">gtk-ok</property>
713+ <property name="visible">True</property>
714+ <property name="can_focus">True</property>
715+ <property name="can_default">True</property>
716+ <property name="receives_default">False</property>
717+ <property name="use_stock">True</property>
718+ </object>
719+ <packing>
720+ <property name="expand">False</property>
721+ <property name="fill">False</property>
722+ <property name="position">1</property>
723+ </packing>
724+ </child>
725+ </object>
726+ <packing>
727+ <property name="expand">False</property>
728+ <property name="pack_type">end</property>
729+ <property name="position">0</property>
730+ </packing>
731+ </child>
732+ </object>
733+ </child>
734+ <action-widgets>
735+ <action-widget response="-6">cancelbutton1</action-widget>
736+ <action-widget response="-5">okbutton1</action-widget>
737+ </action-widgets>
738+ </object>
739+ <object class="GtkWindow" id="mainWindow">
740+ <property name="visible">True</property>
741+ <property name="title" translatable="yes">Game Database</property>
742+ <property name="window_position">center</property>
743+ <property name="default_width">450</property>
744+ <property name="default_height">300</property>
745+ <property name="icon_name">gamedb</property>
746+ <signal name="destroy" handler="quit_app"/>
747+ <child>
748+ <object class="GtkVBox" id="vbox1">
749+ <property name="visible">True</property>
750+ <property name="orientation">vertical</property>
751+ <child>
752+ <object class="GtkMenuBar" id="menubar1">
753+ <property name="visible">True</property>
754+ <child>
755+ <object class="GtkMenuItem" id="menuitemFile">
756+ <property name="visible">True</property>
757+ <property name="label" translatable="yes">_File</property>
758+ <property name="use_underline">True</property>
759+ <child type="submenu">
760+ <object class="GtkMenu" id="menuFile">
761+ <child>
762+ <object class="GtkImageMenuItem" id="new1">
763+ <property name="label">gtk-new</property>
764+ <property name="visible">True</property>
765+ <property name="use_underline">True</property>
766+ <property name="use_stock">True</property>
767+ <signal name="activate" handler="clear_games"/>
768+ </object>
769+ </child>
770+ <child>
771+ <object class="GtkImageMenuItem" id="open1">
772+ <property name="label">gtk-open</property>
773+ <property name="visible">True</property>
774+ <property name="use_underline">True</property>
775+ <property name="use_stock">True</property>
776+ <signal name="activate" handler="file_open"/>
777+ </object>
778+ </child>
779+ <child>
780+ <object class="GtkImageMenuItem" id="save1">
781+ <property name="label">gtk-save</property>
782+ <property name="visible">True</property>
783+ <property name="use_underline">True</property>
784+ <property name="use_stock">True</property>
785+ <signal name="activate" handler="file_save"/>
786+ </object>
787+ </child>
788+ <child>
789+ <object class="GtkImageMenuItem" id="save_as1">
790+ <property name="label">gtk-save-as</property>
791+ <property name="visible">True</property>
792+ <property name="use_underline">True</property>
793+ <property name="use_stock">True</property>
794+ <signal name="activate" handler="save_as"/>
795+ </object>
796+ </child>
797+ <child>
798+ <object class="GtkSeparatorMenuItem" id="separatormenuitem1">
799+ <property name="visible">True</property>
800+ </object>
801+ </child>
802+ <child>
803+ <object class="GtkImageMenuItem" id="quit1">
804+ <property name="label">gtk-quit</property>
805+ <property name="visible">True</property>
806+ <property name="use_underline">True</property>
807+ <property name="use_stock">True</property>
808+ <signal name="activate" handler="quit_app"/>
809+ </object>
810+ </child>
811+ </object>
812+ </child>
813+ </object>
814+ </child>
815+ <child>
816+ <object class="GtkMenuItem" id="menuitemGame">
817+ <property name="visible">True</property>
818+ <property name="label" translatable="yes">Game</property>
819+ <property name="use_underline">True</property>
820+ <child type="submenu">
821+ <object class="GtkMenu" id="menuGame">
822+ <child>
823+ <object class="GtkImageMenuItem" id="add1">
824+ <property name="label">gtk-add</property>
825+ <property name="visible">True</property>
826+ <property name="use_underline">True</property>
827+ <property name="use_stock">True</property>
828+ <signal name="activate" handler="add_game"/>
829+ </object>
830+ </child>
831+ <child>
832+ <object class="GtkImageMenuItem" id="edit1">
833+ <property name="label">gtk-edit</property>
834+ <property name="visible">True</property>
835+ <property name="use_underline">True</property>
836+ <property name="use_stock">True</property>
837+ <signal name="activate" handler="edit_game"/>
838+ </object>
839+ </child>
840+ <child>
841+ <object class="GtkImageMenuItem" id="remove1">
842+ <property name="label">gtk-remove</property>
843+ <property name="visible">True</property>
844+ <property name="use_underline">True</property>
845+ <property name="use_stock">True</property>
846+ <signal name="activate" handler="remove_game"/>
847+ </object>
848+ </child>
849+ </object>
850+ </child>
851+ </object>
852+ </child>
853+ <child>
854+ <object class="GtkMenuItem" id="menuitemHelp">
855+ <property name="visible">True</property>
856+ <property name="label" translatable="yes">_Help</property>
857+ <property name="use_underline">True</property>
858+ <child type="submenu">
859+ <object class="GtkMenu" id="menuHelp">
860+ <child>
861+ <object class="GtkImageMenuItem" id="about1">
862+ <property name="label">gtk-about</property>
863+ <property name="visible">True</property>
864+ <property name="use_underline">True</property>
865+ <property name="use_stock">True</property>
866+ <signal name="activate" handler="show_about_dlg"/>
867+ </object>
868+ </child>
869+ </object>
870+ </child>
871+ </object>
872+ </child>
873+ </object>
874+ <packing>
875+ <property name="expand">False</property>
876+ <property name="fill">False</property>
877+ <property name="position">0</property>
878+ </packing>
879+ </child>
880+ <child>
881+ <object class="GtkToolbar" id="toolbar1">
882+ <property name="visible">True</property>
883+ <property name="toolbar_style">both</property>
884+ <child>
885+ <object class="GtkToolButton" id="tbAddGame">
886+ <property name="visible">True</property>
887+ <property name="label" translatable="yes">Add Game</property>
888+ <property name="use_underline">True</property>
889+ <property name="stock_id">gtk-add</property>
890+ <signal name="clicked" handler="add_game"/>
891+ </object>
892+ <packing>
893+ <property name="expand">False</property>
894+ <property name="homogeneous">True</property>
895+ </packing>
896+ </child>
897+ <child>
898+ <object class="GtkToolButton" id="tbEditGame">
899+ <property name="visible">True</property>
900+ <property name="label" translatable="yes">Edit Game</property>
901+ <property name="use_underline">True</property>
902+ <property name="stock_id">gtk-edit</property>
903+ <signal name="clicked" handler="edit_game"/>
904+ </object>
905+ <packing>
906+ <property name="expand">False</property>
907+ <property name="homogeneous">True</property>
908+ </packing>
909+ </child>
910+ <child>
911+ <object class="GtkToolButton" id="tbRemoveGame">
912+ <property name="visible">True</property>
913+ <property name="label" translatable="yes">Remove Game</property>
914+ <property name="use_underline">True</property>
915+ <property name="stock_id">gtk-remove</property>
916+ <signal name="clicked" handler="remove_game"/>
917+ </object>
918+ <packing>
919+ <property name="expand">False</property>
920+ <property name="homogeneous">True</property>
921+ </packing>
922+ </child>
923+ </object>
924+ <packing>
925+ <property name="expand">False</property>
926+ <property name="fill">False</property>
927+ <property name="position">1</property>
928+ </packing>
929+ </child>
930+ <child>
931+ <object class="GtkScrolledWindow" id="scrolledwindow1">
932+ <property name="visible">True</property>
933+ <property name="can_focus">True</property>
934+ <property name="shadow_type">in</property>
935+ <child>
936+ <object class="GtkTreeView" id="gameView">
937+ <property name="visible">True</property>
938+ <property name="can_focus">True</property>
939+ </object>
940+ </child>
941+ </object>
942+ <packing>
943+ <property name="position">2</property>
944+ </packing>
945+ </child>
946+ <child>
947+ <object class="GtkStatusbar" id="statusbar1">
948+ <property name="visible">True</property>
949+ </object>
950+ <packing>
951+ <property name="expand">False</property>
952+ <property name="fill">False</property>
953+ <property name="position">3</property>
954+ </packing>
955+ </child>
956+ </object>
957+ </child>
958+ </object>
959+</interface>
960
961=== modified file 'gamedb'
962--- gamedb 2011-11-06 07:25:03 +0000
963+++ gamedb 2011-12-08 15:55:40 +0000
964@@ -30,13 +30,13 @@
965 import pygtk
966 pygtk.require("2.0")
967 import gtk
968-import gtk.glade
969 import gobject
970
971 FILE_EXT = "gdb"
972 APP_NAME = "gamedb"
973 LANG_DIR = "/usr/share/locale/"
974-DATA_DIR = "/usr/share/gamedb/"
975+DATA_DIR = "data/"
976+#DATA_DIR = "/usr/share/gamedb/"
977
978 class GameDb:
979 """This is a Game DataBase application"""
980@@ -66,9 +66,7 @@
981
982 gettext.bindtextdomain(APP_NAME, LANG_DIR)
983 gettext.textdomain(APP_NAME)
984- #Add these two lines here to get Glade stuff to translate
985- gtk.glade.bindtextdomain(APP_NAME, LANG_DIR)
986- gtk.glade.textdomain(APP_NAME)
987+
988 # Get the language to use
989 self.lang = gettext.translation(APP_NAME, LANG_DIR
990 , languages=langs, fallback = True)
991@@ -79,14 +77,15 @@
992 _ = self.lang.gettext
993
994
995- #Set the Glade file
996- self.gladefile = DATA_DIR + "gamedb.glade"
997- try:
998- # Trying to open from local directory
999- self.wTree = gtk.glade.XML(self.gladefile, "mainWindow")
1000- except:
1001- self.show_dlg(_("Error opening glade file."))
1002- sys.exit(1)
1003+ #Set the UI file
1004+ self.uifile = DATA_DIR + "gamedb.ui"
1005+ #try:
1006+ # Trying to open from local directory
1007+ self.builder = gtk.Builder()
1008+ self.builder.add_objects_from_file(self.uifile, ["mainWindow"])
1009+ #except:
1010+ # self.show_dlg(_("Error opening ui file."))
1011+ # sys.exit(1)
1012
1013 #Create our dictionary and connect it
1014 dic = {"quit_app" : self.quit_app
1015@@ -98,7 +97,7 @@
1016 , "save_as" : self.save_as
1017 , "show_about_dlg" : self.show_about_dlg
1018 , "clear_games" : self.clear_games}
1019- self.wTree.signal_autoconnect(dic)
1020+ self.builder.connect_signals(self)
1021
1022 # Set the project file and 'saved'
1023 self.project_file = ""
1024@@ -117,7 +116,7 @@
1025 self.sYear = _("Year")
1026
1027 #Get the treeView from the widget Tree
1028- self.gameView = self.wTree.get_widget("gameView")
1029+ self.gameView = self.builder.get_object("gameView")
1030 #Add all of the List Columns to the gameView
1031 self.add_game_list_column(self.sName, self.cName)
1032 self.add_game_list_column(self.sPlatform, self.cPlatform)
1033@@ -378,8 +377,8 @@
1034 return result
1035
1036 def show_about_dlg(self, widget=None):
1037- wTree = gtk.glade.XML(self.gladefile, "aboutDlg")
1038- about_dlg = wTree.get_widget("aboutDlg")
1039+ self.builder.add_objects_from_file(self.uifile, ["aboutDlg"])
1040+ about_dlg = self.builder.get_object("aboutDlg")
1041 about_dlg.set_version(__version__)
1042 about_dlg.run()
1043 about_dlg.destroy()
1044@@ -407,8 +406,8 @@
1045 """Initialize the class.
1046 game - a Game object"""
1047
1048- #setup the glade file
1049- self.gladefile = DATA_DIR+"gamedb.glade"
1050+ #setup the ui file
1051+ self.uifile = DATA_DIR + "gamedb.ui"
1052 #setup the game that we will return
1053 if (game):
1054 #They have passed a game object
1055@@ -420,18 +419,19 @@
1056 def run(self):
1057 """This function will show the GameDlg"""
1058
1059- #load the dialog from the glade file
1060- self.wTree = gtk.glade.XML(self.gladefile, "gameDlg")
1061+ #load the dialog from the ui file
1062+ self.builder = gtk.Builder()
1063+ self.builder.add_objects_from_file(self.uifile, ["gameDlg"])
1064 #Get the actual dialog widget
1065- self.dlg = self.wTree.get_widget("gameDlg")
1066+ self.dlg = self.builder.get_object("gameDlg")
1067 #Get all of the Entry Widgets and set their text
1068- self.enName = self.wTree.get_widget("enName")
1069+ self.enName = self.builder.get_object("enName")
1070 self.enName.set_text(self.game.name)
1071- self.enPlatform = self.wTree.get_widget("enPlatform")
1072+ self.enPlatform = self.builder.get_object("enPlatform")
1073 self.enPlatform.set_text(self.game.platform)
1074- self.enRating = self.wTree.get_widget("enRating")
1075+ self.enRating = self.builder.get_object("enRating")
1076 self.enRating.set_text(self.game.rating)
1077- self.enYear = self.wTree.get_widget("enYear")
1078+ self.enYear = self.builder.get_object("enYear")
1079 self.enYear.set_text(self.game.year)
1080
1081 #run the dialog and store the response

Subscribers

People subscribed via source and target branches

to all changes: