Merge lp:~srxavi/qatora/qatora-srxavi into lp:qatora
- qatora-srxavi
- Merge into qatora-trunk
Proposed by
Guillem Hernandez Sola
Status: | Superseded |
---|---|
Proposed branch: | lp:~srxavi/qatora/qatora-srxavi |
Merge into: | lp:qatora |
Diff against target: |
480 lines (+184/-104) 2 files modified
bin/qatora (+23/-14) data/ui/QatoraWindow.ui (+161/-90) |
To merge this branch: | bzr merge lp:~srxavi/qatora/qatora-srxavi |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Guillem Hernandez Sola | Approve | ||
Review via email: mp+67132@code.launchpad.net |
This proposal has been superseded by a proposal from 2011-07-07.
Commit message
New restyle and functions
Description of the change
New restyle and functions
To post a comment you must log in.
Revision history for this message
Guillem Hernandez Sola (guillemhs) : | # |
review:
Approve
Unmerged revisions
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'bin/qatora' |
2 | --- bin/qatora 2011-07-04 10:18:56 +0000 |
3 | +++ bin/qatora 2011-07-07 08:56:11 +0000 |
4 | @@ -8,6 +8,8 @@ |
5 | import os |
6 | import gtk |
7 | |
8 | +import vte |
9 | + |
10 | import gettext |
11 | |
12 | TextBox = gtk.TextView() |
13 | @@ -92,6 +94,21 @@ |
14 | # Get a reference to the builder and set up the signals. |
15 | self.builder = builder |
16 | self.builder.connect_signals(self) |
17 | + workspace = self.builder.get_object("workspace") |
18 | + terminal = vte.Terminal() |
19 | + terminal.fork_command() |
20 | + terminal.connect("child-exited", lambda x: terminal.fork_command()) |
21 | + terminal.show() |
22 | + workspace.pack2(terminal) |
23 | + workspace.show() |
24 | + self.builder.get_object('mQuit').connect('activate', self.on_destroy) |
25 | + self.builder.get_object('mAbout').connect('activate', self.about) |
26 | + self.builder.get_object('mNew').connect('activate', self.new) |
27 | + self.builder.get_object('bNew').connect('clicked', self.new) |
28 | + self.builder.get_object('bOpen').connect('clicked', self.open_file) |
29 | + self.text_zone = self.builder.get_object('textZone') |
30 | + self.text_buffer = self.text_zone.get_buffer() |
31 | + self.status_bar = self.builder.get_object('statusbar') |
32 | |
33 | def new_file(self, widget, data=None): |
34 | |
35 | @@ -137,17 +154,10 @@ |
36 | window.add(vbox) |
37 | window.show_all() |
38 | |
39 | - def new(menuitem,user_param): |
40 | - |
41 | - _File = "" |
42 | - |
43 | - print "Qatora has been reset!" |
44 | - |
45 | - window.set_title("Untitled - Qatora") |
46 | - |
47 | - textbuffer = TextBox.get_buffer() |
48 | - |
49 | - textbuffer.set_text("") |
50 | + def new(self, widget, data=None): |
51 | + _File = "" |
52 | + self.set_title("Untitled - Qatora") |
53 | + self.text_buffer.set_text("") |
54 | |
55 | def open_file(self, widget, data=None): |
56 | |
57 | @@ -168,14 +178,13 @@ |
58 | global _File |
59 | filename = chooser.get_filename() |
60 | _File = filename |
61 | - textbuffer = TextBox.get_buffer() |
62 | print "Opened File: " + filename |
63 | - StatusBar.push(0,"Opened File: " + filename) |
64 | + self.status_bar.push(0,"Opened File: " + filename) |
65 | index = filename.replace("\\","/").rfind("/") + 1 |
66 | window.set_title(filename[index:] + " - Qatora") |
67 | file = open(filename, "r") |
68 | text = file.read() |
69 | - textbuffer.set_text(text) |
70 | + self.text_buffer.set_text(text) |
71 | file.close() |
72 | elif response == gtk.RESPONSE_CANCEL: |
73 | chooser.destroy() |
74 | |
75 | === modified file 'data/ui/QatoraWindow.ui' |
76 | --- data/ui/QatoraWindow.ui 2011-07-03 17:05:08 +0000 |
77 | +++ data/ui/QatoraWindow.ui 2011-07-07 08:56:11 +0000 |
78 | @@ -1,78 +1,99 @@ |
79 | <?xml version="1.0" encoding="UTF-8"?> |
80 | <interface> |
81 | - <requires lib="gtk+" version="2.16"/> |
82 | + <requires lib="gtk+" version="2.20"/> |
83 | <!-- interface-requires qatora_window 1.0 --> |
84 | <!-- interface-naming-policy project-wide --> |
85 | <!-- interface-local-resource-path ../media --> |
86 | + <object class="GtkAction" id="action1"/> |
87 | + <object class="GtkActionGroup" id="actiongroup1"/> |
88 | + <object class="GtkListStore" id="liststore1"> |
89 | + <columns> |
90 | + <!-- column-name Scripts --> |
91 | + <column type="< defineix una columna nova>"/> |
92 | + </columns> |
93 | + </object> |
94 | <object class="QatoraWindow" id="qatora_window"> |
95 | + <property name="can_focus">False</property> |
96 | <property name="title" translatable="yes">Qatora</property> |
97 | + <property name="default_width">640</property> |
98 | + <property name="default_height">480</property> |
99 | <property name="icon">../media/icon.png</property> |
100 | - <signal name="destroy" handler="on_destroy"/> |
101 | + <signal name="destroy" handler="on_destroy" swapped="no"/> |
102 | <child> |
103 | - <object class="GtkVPaned" id="vpaned1"> |
104 | + <object class="GtkVBox" id="vbox1"> |
105 | <property name="visible">True</property> |
106 | - <property name="can_focus">True</property> |
107 | + <property name="can_focus">False</property> |
108 | <child> |
109 | - <object class="GtkMenuBar" id="menubar1"> |
110 | + <object class="GtkMenuBar" id="menubar"> |
111 | <property name="visible">True</property> |
112 | + <property name="can_focus">False</property> |
113 | <property name="ubuntu_local">True</property> |
114 | <child> |
115 | - <object class="GtkMenuItem" id="menuitem1"> |
116 | + <object class="GtkMenuItem" id="mFile"> |
117 | <property name="visible">True</property> |
118 | + <property name="can_focus">False</property> |
119 | + <property name="use_action_appearance">False</property> |
120 | <property name="label" translatable="yes">_Fitxer</property> |
121 | <property name="use_underline">True</property> |
122 | <child type="submenu"> |
123 | <object class="GtkMenu" id="menu1"> |
124 | <property name="visible">True</property> |
125 | - <property name="ubuntu_local">True</property> |
126 | + <property name="can_focus">False</property> |
127 | <child> |
128 | - <object class="GtkImageMenuItem" id="imagemenuitem1"> |
129 | + <object class="GtkImageMenuItem" id="mNew"> |
130 | <property name="label">gtk-new</property> |
131 | <property name="visible">True</property> |
132 | + <property name="can_focus">False</property> |
133 | + <property name="use_action_appearance">False</property> |
134 | <property name="use_underline">True</property> |
135 | <property name="use_stock">True</property> |
136 | - <signal name="activate" handler="new"/> |
137 | </object> |
138 | </child> |
139 | <child> |
140 | - <object class="GtkImageMenuItem" id="imagemenuitem2"> |
141 | + <object class="GtkImageMenuItem" id="mOpen"> |
142 | <property name="label">gtk-open</property> |
143 | <property name="visible">True</property> |
144 | + <property name="can_focus">False</property> |
145 | + <property name="use_action_appearance">False</property> |
146 | <property name="use_underline">True</property> |
147 | <property name="use_stock">True</property> |
148 | - <signal name="activate" handler="open_file"/> |
149 | </object> |
150 | </child> |
151 | <child> |
152 | - <object class="GtkImageMenuItem" id="imagemenuitem3"> |
153 | + <object class="GtkImageMenuItem" id="mSave"> |
154 | <property name="label">gtk-save</property> |
155 | <property name="visible">True</property> |
156 | + <property name="can_focus">False</property> |
157 | + <property name="use_action_appearance">False</property> |
158 | <property name="use_underline">True</property> |
159 | <property name="use_stock">True</property> |
160 | - <signal name="activate" handler="save"/> |
161 | </object> |
162 | </child> |
163 | <child> |
164 | - <object class="GtkImageMenuItem" id="imagemenuitem4"> |
165 | + <object class="GtkImageMenuItem" id="mSaveAs"> |
166 | <property name="label">gtk-save-as</property> |
167 | <property name="visible">True</property> |
168 | + <property name="can_focus">False</property> |
169 | + <property name="use_action_appearance">False</property> |
170 | <property name="use_underline">True</property> |
171 | <property name="use_stock">True</property> |
172 | - <signal name="activate" handler="save_as"/> |
173 | </object> |
174 | </child> |
175 | <child> |
176 | <object class="GtkSeparatorMenuItem" id="separatormenuitem1"> |
177 | <property name="visible">True</property> |
178 | + <property name="can_focus">False</property> |
179 | + <property name="use_action_appearance">False</property> |
180 | </object> |
181 | </child> |
182 | <child> |
183 | - <object class="GtkImageMenuItem" id="imagemenuitem5"> |
184 | + <object class="GtkImageMenuItem" id="mQuit"> |
185 | <property name="label">gtk-quit</property> |
186 | <property name="visible">True</property> |
187 | + <property name="can_focus">False</property> |
188 | + <property name="use_action_appearance">False</property> |
189 | <property name="use_underline">True</property> |
190 | <property name="use_stock">True</property> |
191 | - <signal name="activate" handler="quit"/> |
192 | </object> |
193 | </child> |
194 | </object> |
195 | @@ -80,42 +101,52 @@ |
196 | </object> |
197 | </child> |
198 | <child> |
199 | - <object class="GtkMenuItem" id="menuitem2"> |
200 | + <object class="GtkMenuItem" id="mEdit"> |
201 | <property name="visible">True</property> |
202 | + <property name="can_focus">False</property> |
203 | + <property name="use_action_appearance">False</property> |
204 | <property name="label" translatable="yes">_Edita</property> |
205 | <property name="use_underline">True</property> |
206 | <child type="submenu"> |
207 | <object class="GtkMenu" id="menu2"> |
208 | <property name="visible">True</property> |
209 | - <property name="ubuntu_local">True</property> |
210 | + <property name="can_focus">False</property> |
211 | <child> |
212 | - <object class="GtkImageMenuItem" id="imagemenuitem6"> |
213 | + <object class="GtkImageMenuItem" id="mCut"> |
214 | <property name="label">gtk-cut</property> |
215 | <property name="visible">True</property> |
216 | + <property name="can_focus">False</property> |
217 | + <property name="use_action_appearance">False</property> |
218 | <property name="use_underline">True</property> |
219 | <property name="use_stock">True</property> |
220 | </object> |
221 | </child> |
222 | <child> |
223 | - <object class="GtkImageMenuItem" id="imagemenuitem7"> |
224 | + <object class="GtkImageMenuItem" id="mCopy"> |
225 | <property name="label">gtk-copy</property> |
226 | <property name="visible">True</property> |
227 | + <property name="can_focus">False</property> |
228 | + <property name="use_action_appearance">False</property> |
229 | <property name="use_underline">True</property> |
230 | <property name="use_stock">True</property> |
231 | </object> |
232 | </child> |
233 | <child> |
234 | - <object class="GtkImageMenuItem" id="imagemenuitem8"> |
235 | + <object class="GtkImageMenuItem" id="mPaste"> |
236 | <property name="label">gtk-paste</property> |
237 | <property name="visible">True</property> |
238 | + <property name="can_focus">False</property> |
239 | + <property name="use_action_appearance">False</property> |
240 | <property name="use_underline">True</property> |
241 | <property name="use_stock">True</property> |
242 | </object> |
243 | </child> |
244 | <child> |
245 | - <object class="GtkImageMenuItem" id="imagemenuitem9"> |
246 | + <object class="GtkImageMenuItem" id="mDelete"> |
247 | <property name="label">gtk-delete</property> |
248 | <property name="visible">True</property> |
249 | + <property name="can_focus">False</property> |
250 | + <property name="use_action_appearance">False</property> |
251 | <property name="use_underline">True</property> |
252 | <property name="use_stock">True</property> |
253 | </object> |
254 | @@ -127,6 +158,8 @@ |
255 | <child> |
256 | <object class="GtkMenuItem" id="menuitem3"> |
257 | <property name="visible">True</property> |
258 | + <property name="can_focus">False</property> |
259 | + <property name="use_action_appearance">False</property> |
260 | <property name="label" translatable="yes">_Visualització</property> |
261 | <property name="use_underline">True</property> |
262 | </object> |
263 | @@ -134,16 +167,20 @@ |
264 | <child> |
265 | <object class="GtkMenuItem" id="menuitem4"> |
266 | <property name="visible">True</property> |
267 | + <property name="can_focus">False</property> |
268 | + <property name="use_action_appearance">False</property> |
269 | <property name="label" translatable="yes">A_juda</property> |
270 | <property name="use_underline">True</property> |
271 | <child type="submenu"> |
272 | <object class="GtkMenu" id="menu3"> |
273 | <property name="visible">True</property> |
274 | - <property name="ubuntu_local">True</property> |
275 | + <property name="can_focus">False</property> |
276 | <child> |
277 | - <object class="GtkImageMenuItem" id="imagemenuitem10"> |
278 | + <object class="GtkImageMenuItem" id="mAbout"> |
279 | <property name="label">gtk-about</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 | </object> |
286 | @@ -154,69 +191,75 @@ |
287 | </child> |
288 | </object> |
289 | <packing> |
290 | - <property name="resize">False</property> |
291 | - <property name="shrink">True</property> |
292 | - </packing> |
293 | - </child> |
294 | - <child> |
295 | - <object class="GtkVPaned" id="vpaned2"> |
296 | + <property name="expand">False</property> |
297 | + <property name="fill">True</property> |
298 | + <property name="position">0</property> |
299 | + </packing> |
300 | + </child> |
301 | + <child> |
302 | + <object class="GtkToolbar" id="toolbar1"> |
303 | + <property name="visible">True</property> |
304 | + <property name="can_focus">False</property> |
305 | + <property name="icon_size_set">True</property> |
306 | + <child> |
307 | + <object class="GtkToolButton" id="bNew"> |
308 | + <property name="visible">True</property> |
309 | + <property name="can_focus">False</property> |
310 | + <property name="use_action_appearance">False</property> |
311 | + <property name="label" translatable="yes">New</property> |
312 | + <property name="use_underline">True</property> |
313 | + <property name="stock_id">gtk-new</property> |
314 | + </object> |
315 | + <packing> |
316 | + <property name="expand">False</property> |
317 | + <property name="homogeneous">True</property> |
318 | + </packing> |
319 | + </child> |
320 | + <child> |
321 | + <object class="GtkMenuToolButton" id="bOpen"> |
322 | + <property name="visible">True</property> |
323 | + <property name="can_focus">False</property> |
324 | + <property name="use_action_appearance">False</property> |
325 | + <property name="label" translatable="yes">toolbutton2</property> |
326 | + <property name="use_underline">True</property> |
327 | + <property name="stock_id">gtk-open</property> |
328 | + </object> |
329 | + <packing> |
330 | + <property name="expand">False</property> |
331 | + <property name="homogeneous">True</property> |
332 | + </packing> |
333 | + </child> |
334 | + <child> |
335 | + <object class="GtkToolButton" id="bPref"> |
336 | + <property name="visible">True</property> |
337 | + <property name="can_focus">False</property> |
338 | + <property name="use_action_appearance">False</property> |
339 | + <property name="label" translatable="yes">toolbutton3</property> |
340 | + <property name="use_underline">True</property> |
341 | + <property name="stock_id">gtk-preferences</property> |
342 | + </object> |
343 | + <packing> |
344 | + <property name="expand">False</property> |
345 | + <property name="homogeneous">True</property> |
346 | + </packing> |
347 | + </child> |
348 | + </object> |
349 | + <packing> |
350 | + <property name="expand">False</property> |
351 | + <property name="fill">True</property> |
352 | + <property name="position">1</property> |
353 | + </packing> |
354 | + </child> |
355 | + <child> |
356 | + <object class="GtkHPaned" id="hpaned1"> |
357 | <property name="visible">True</property> |
358 | <property name="can_focus">True</property> |
359 | + <property name="position">60</property> |
360 | <child> |
361 | - <object class="GtkToolbar" id="toolbar1"> |
362 | + <object class="GtkTreeView" id="treeview2"> |
363 | <property name="visible">True</property> |
364 | - <child> |
365 | - <object class="GtkToolButton" id="toolbutton1"> |
366 | - <property name="visible">True</property> |
367 | - <property name="label" translatable="yes">toolbutton1</property> |
368 | - <property name="use_underline">True</property> |
369 | - <property name="stock_id">gtk-new</property> |
370 | - <signal name="clicked" handler="new_file"/> |
371 | - </object> |
372 | - <packing> |
373 | - <property name="expand">False</property> |
374 | - <property name="homogeneous">True</property> |
375 | - </packing> |
376 | - </child> |
377 | - <child> |
378 | - <object class="GtkToolButton" id="toolbutton2"> |
379 | - <property name="visible">True</property> |
380 | - <property name="label" translatable="yes">toolbutton2</property> |
381 | - <property name="use_underline">True</property> |
382 | - <property name="stock_id">gtk-open</property> |
383 | - <signal name="clicked" handler="open_file"/> |
384 | - </object> |
385 | - <packing> |
386 | - <property name="expand">False</property> |
387 | - <property name="homogeneous">True</property> |
388 | - </packing> |
389 | - </child> |
390 | - <child> |
391 | - <object class="GtkToolButton" id="toolbutton3"> |
392 | - <property name="visible">True</property> |
393 | - <property name="label" translatable="yes">toolbutton3</property> |
394 | - <property name="use_underline">True</property> |
395 | - <property name="stock_id">gtk-save</property> |
396 | - <signal name="clicked" handler="save"/> |
397 | - </object> |
398 | - <packing> |
399 | - <property name="expand">False</property> |
400 | - <property name="homogeneous">True</property> |
401 | - </packing> |
402 | - </child> |
403 | - <child> |
404 | - <object class="GtkToolButton" id="toolbutton4"> |
405 | - <property name="visible">True</property> |
406 | - <property name="label" translatable="yes">toolbutton4</property> |
407 | - <property name="use_underline">True</property> |
408 | - <property name="stock_id">gtk-save-as</property> |
409 | - <signal name="clicked" handler="save_as"/> |
410 | - </object> |
411 | - <packing> |
412 | - <property name="expand">False</property> |
413 | - <property name="homogeneous">True</property> |
414 | - </packing> |
415 | - </child> |
416 | + <property name="can_focus">True</property> |
417 | + <property name="model">liststore1</property> |
418 | </object> |
419 | <packing> |
420 | <property name="resize">False</property> |
421 | @@ -224,11 +267,28 @@ |
422 | </packing> |
423 | </child> |
424 | <child> |
425 | - <object class="GtkHPaned" id="hpaned1"> |
426 | + <object class="GtkVPaned" id="workspace"> |
427 | <property name="visible">True</property> |
428 | <property name="can_focus">True</property> |
429 | + <property name="position">150</property> |
430 | + <property name="position_set">True</property> |
431 | <child> |
432 | - <placeholder/> |
433 | + <object class="GtkScrolledWindow" id="scrolledwindow1"> |
434 | + <property name="visible">True</property> |
435 | + <property name="can_focus">True</property> |
436 | + <property name="hscrollbar_policy">automatic</property> |
437 | + <property name="vscrollbar_policy">automatic</property> |
438 | + <child> |
439 | + <object class="GtkTextView" id="textZone"> |
440 | + <property name="visible">True</property> |
441 | + <property name="can_focus">True</property> |
442 | + </object> |
443 | + </child> |
444 | + </object> |
445 | + <packing> |
446 | + <property name="resize">False</property> |
447 | + <property name="shrink">True</property> |
448 | + </packing> |
449 | </child> |
450 | <child> |
451 | <placeholder/> |
452 | @@ -241,13 +301,24 @@ |
453 | </child> |
454 | </object> |
455 | <packing> |
456 | - <property name="resize">True</property> |
457 | - <property name="shrink">True</property> |
458 | + <property name="expand">True</property> |
459 | + <property name="fill">True</property> |
460 | + <property name="position">2</property> |
461 | + </packing> |
462 | + </child> |
463 | + <child> |
464 | + <object class="GtkStatusbar" id="statusbar"> |
465 | + <property name="visible">True</property> |
466 | + <property name="can_focus">False</property> |
467 | + <property name="spacing">2</property> |
468 | + </object> |
469 | + <packing> |
470 | + <property name="expand">False</property> |
471 | + <property name="fill">True</property> |
472 | + <property name="position">3</property> |
473 | </packing> |
474 | </child> |
475 | </object> |
476 | </child> |
477 | </object> |
478 | - <object class="GtkAction" id="action1"/> |
479 | - <object class="GtkActionGroup" id="actiongroup1"/> |
480 | </interface> |