Merge lp:~marcobiscaro2112/unity-launcher-editor/port-to-gtk3 into lp:unity-launcher-editor

Proposed by Marco Biscaro
Status: Merged
Merged at revision: 63
Proposed branch: lp:~marcobiscaro2112/unity-launcher-editor/port-to-gtk3
Merge into: lp:unity-launcher-editor
Diff against target: 5804 lines (+380/-4337)
25 files modified
ule (+2/-10)
unitylaunchereditor/addassistant.py (+40/-43)
unitylaunchereditor/appgui.py (+0/-35)
unitylaunchereditor/core/desktop.py (+0/-1)
unitylaunchereditor/core/iconmanager.py (+9/-9)
unitylaunchereditor/core/utils.py (+0/-2)
unitylaunchereditor/data/application.glade (+0/-623)
unitylaunchereditor/data/application.glade.old (+0/-775)
unitylaunchereditor/data/application2.glade (+0/-645)
unitylaunchereditor/dialogs/app.py (+64/-66)
unitylaunchereditor/dialogs/dialogs.py (+24/-249)
unitylaunchereditor/dialogs/launcherdialog.py (+36/-41)
unitylaunchereditor/dialogs/quicklistdialog.py (+15/-15)
unitylaunchereditor/locale/unity-launcher-editor.pot (+0/-79)
unitylaunchereditor/mainwindow.py (+0/-440)
unitylaunchereditor/newlauncher.py (+0/-267)
unitylaunchereditor/utils.py (+0/-152)
unitylaunchereditor/widgets.py (+0/-276)
unitylaunchereditor/widgets/dialogheader.py (+23/-77)
unitylaunchereditor/widgets/groupinfo.py (+46/-51)
unitylaunchereditor/widgets/groupsdialog.py (+0/-245)
unitylaunchereditor/widgets/groupview.py (+28/-28)
unitylaunchereditor/widgets/labels.py (+0/-118)
unitylaunchereditor/widgets/launcherinfo.py (+53/-54)
unitylaunchereditor/widgets/launcherview.py (+40/-36)
To merge this branch: bzr merge lp:~marcobiscaro2112/unity-launcher-editor/port-to-gtk3
Reviewer Review Type Date Requested Status
Laudeci Oliveira Approve
Review via email: mp+83650@code.launchpad.net

Description of the change

As described here [1] "We strongly recommend not using PyGTK for new projects and to port existing applications from PyGTK to PyGObject."

That's what I've done. I've ported the code and everything except the filter in 'New Launcher' dialog works fine. This is better than before the port, when nothing was working in oneiric.

[1] https://live.gnome.org/PyGTK

To post a comment you must log in.
Revision history for this message
Marco Biscaro (marcobiscaro2112) wrote :

I removed some files that were not being used (commit 64). I'm not sure if I should do this, but it can be easily undone if necessary.

Revision history for this message
Laudeci Oliveira (laudeci) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ule'
2--- ule 2011-06-23 15:52:56 +0000
3+++ ule 2011-11-28 17:31:26 +0000
4@@ -22,22 +22,14 @@
5 BASE_PATH=os.path.dirname(os.path.abspath(sys.argv[0]))
6 sys.path.append(os.path.dirname(BASE_PATH +'/'))
7
8+from gi.repository import Gtk
9 from gi.repository import Gio
10 from unitylaunchereditor.dialogs.app import MainWindow
11
12-try:
13- import gtk
14-except:
15- print "You need to install pyGTK or GTKv2 ",
16- print "or set your PYTHONPATH correctly."
17- print "try: export PYTHONPATH=",
18- print "/usr/local/lib/python2.X/site-packages/"
19- sys.exit(1)
20-
21 def main():
22 app = MainWindow(Gio.Settings('com.canonical.Unity.Launcher'))
23 app.show_all()
24- gtk.main()
25+ Gtk.main()
26
27 if __name__ == "__main__":
28 main()
29
30=== modified file 'unitylaunchereditor/addassistant.py'
31--- unitylaunchereditor/addassistant.py 2011-06-13 20:07:33 +0000
32+++ unitylaunchereditor/addassistant.py 2011-11-28 17:31:26 +0000
33@@ -1,34 +1,32 @@
34 from os.path import expanduser, join
35-import gobject
36-import gtk
37-from pango import WRAP_WORD,ELLIPSIZE_END
38+from gi.repository import GObject
39+from gi.repository import Gtk
40
41 from gio import app_info_get_all,ThemedIcon, AppInfo
42 from os.path import isfile
43 from unitylaunchereditor.core.iconmanager import IconManager
44-from unitylaunchereditor.dialogs.dialogs import MessageBox
45 from unitylaunchereditor.core.translation import _
46 from unitylaunchereditor.widgets.launcherview import LauncherView
47 from unitylaunchereditor.widgets.launcherinfo import LauncherInfo
48 from unitylaunchereditor.core.utils import normalize_path
49
50-class PageFromInfo(gtk.VBox):
51+class PageFromInfo(Gtk.VBox):
52 __gsignals__ = { 'add-clicked': (
53- gobject.SIGNAL_RUN_LAST,
54- gobject.TYPE_NONE,
55- (gobject.TYPE_PYOBJECT,),
56+ GObject.SIGNAL_RUN_LAST,
57+ GObject.TYPE_NONE,
58+ (GObject.TYPE_PYOBJECT,),
59 ),
60 }
61
62 def __init__(self):
63- super(PageFromInfo, self).__init__()
64+ Gtk.VBox.__init__(self)
65 self.set_border_width(12)
66
67 self.launcherinfo = LauncherInfo()
68
69- bbox = gtk.HButtonBox()
70- bbox.set_layout(gtk.BUTTONBOX_END)
71- button = gtk.Button(stock=gtk.STOCK_ADD)
72+ bbox = Gtk.HButtonBox()
73+ bbox.set_layout(Gtk.ButtonBoxStyle.END)
74+ button = Gtk.Button(stock=Gtk.STOCK_ADD)
75 button.connect('clicked', self.__on_add_clicked)
76
77 bbox.pack_end(button, expand=False, fill=False, padding=6)
78@@ -51,30 +49,30 @@
79 self.emit('add-clicked', obj)
80
81
82-class PageFromFile(gtk.VBox):
83+class PageFromFile(Gtk.VBox):
84 __gsignals__ = { 'add-clicked': (
85- gobject.SIGNAL_RUN_LAST,
86- gobject.TYPE_NONE,
87- (gobject.TYPE_STRING,),
88+ GObject.SIGNAL_RUN_LAST,
89+ GObject.TYPE_NONE,
90+ (GObject.TYPE_STRING,),
91 ),
92 }
93 def __init__(self):
94- super(PageFromFile, self).__init__()
95+ Gtk.VBox.__init__(self)
96 self.set_border_width(12)
97- self.__gtk_file= gtk.FileChooserWidget()
98+ self.__gtk_file = Gtk.FileChooserWidget()
99
100- filter = gtk.FileFilter()
101+ filter = Gtk.FileFilter()
102 filter.set_name("Desktop files")
103 filter.add_mime_type("application/x-desktop")
104 filter.add_pattern("*.desktop")
105
106 self.__gtk_file.set_filter(filter)
107 self.__gtk_file.set_current_folder(expanduser('~/.local/share/applications/'))
108- self.pack_start(self.__gtk_file,True,True)
109+ self.pack_start(self.__gtk_file, True, True, 0)
110
111- self.bbox = gtk.HButtonBox()
112- self.bbox.set_layout(gtk.BUTTONBOX_END)
113- button = gtk.Button(stock=gtk.STOCK_ADD)
114+ self.bbox = Gtk.HButtonBox()
115+ self.bbox.set_layout(Gtk.ButtonBoxStyle.END)
116+ button = Gtk.Button(stock=Gtk.STOCK_ADD)
117 button.connect('clicked', self.__on_add_clicked)
118 self.bbox.pack_end(button, expand=False, fill=False, padding=0)
119 self.pack_start(self.bbox,fill=True,expand=False,padding=6)
120@@ -84,33 +82,32 @@
121 self.emit('add-clicked', filename)
122
123
124-class PageFromSystem(gtk.Frame):
125+class PageFromSystem(Gtk.Frame):
126 __gsignals__ = { 'add-clicked': (
127- gobject.SIGNAL_RUN_LAST,
128- gobject.TYPE_NONE,
129- (gobject.TYPE_PYOBJECT,gobject.TYPE_PYOBJECT,),
130+ GObject.SIGNAL_RUN_LAST,
131+ GObject.TYPE_NONE,
132+ (Gtk.TreeModel.__gtype__, Gtk.TreeIter.__gtype__,),
133 ),
134 }
135 def __init__(self):
136- super(PageFromSystem,self).__init__()
137+ Gtk.Frame.__init__(self)
138 self.icon_manager = IconManager()
139- self.set_shadow_type(gtk.SHADOW_NONE)
140+ self.set_shadow_type(Gtk.ShadowType.NONE)
141 self.set_border_width(12)
142- self.vbox1 = gtk.VBox()
143- self.bbox = gtk.HButtonBox()
144- self.bbox.set_layout(gtk.BUTTONBOX_END)
145- button = gtk.Button(stock=gtk.STOCK_ADD)
146+ self.vbox1 = Gtk.VBox()
147+ self.bbox = Gtk.HButtonBox()
148+ self.bbox.set_layout(Gtk.ButtonBoxStyle.END)
149+ button = Gtk.Button(stock=Gtk.STOCK_ADD)
150 button.connect('clicked', self.__on_add_clicked)
151 self.bbox.pack_end(button, expand=False, fill=True, padding=0)
152
153- self.scrolledwindow1 = gtk.ScrolledWindow()
154- self.scrolledwindow1.set_shadow_type(gtk.SHADOW_ETCHED_IN)
155-
156-
157- self.hbox1 = gtk.HBox()
158- self.label2 = gtk.Label('Find an item to add to panel:')
159- self.txtSearch = gtk.Entry()
160- self.txtSearch.set_icon_from_stock (gtk.ENTRY_ICON_SECONDARY, gtk.STOCK_CLEAR)
161+ self.scrolledwindow1 = Gtk.ScrolledWindow()
162+ self.scrolledwindow1.set_shadow_type(Gtk.ShadowType.ETCHED_IN)
163+
164+ self.hbox1 = Gtk.HBox()
165+ self.label2 = Gtk.Label('Find an item to add to panel:')
166+ self.txtSearch = Gtk.Entry()
167+ self.txtSearch.set_icon_from_stock (Gtk.EntryIconPosition.SECONDARY, Gtk.STOCK_CLEAR)
168 self.txtSearch.connect("changed", self.on_change)
169 self.txtSearch.connect("icon-press", lambda x, y, z : self.txtSearch.set_text(''))
170
171@@ -136,7 +133,7 @@
172 #if self.txtSearch.get_text_length()>3:
173 self.lvwApplications.refilter()
174
175- def match_type(self, model, iter):
176+ def match_type(self, model, iter, data):
177 value = model.get_value(iter, 4)
178
179 if self.txtSearch.get_text_length() == 0:
180@@ -161,4 +158,4 @@
181 row=(pix, title, appinfo, sname.upper(),appinfo.get_id())
182 self.lvwApplications.add_row(row)
183
184- return
185\ No newline at end of file
186+ return
187
188=== removed file 'unitylaunchereditor/appgui.py'
189--- unitylaunchereditor/appgui.py 2011-06-07 15:07:14 +0000
190+++ unitylaunchereditor/appgui.py 1970-01-01 00:00:00 +0000
191@@ -1,35 +0,0 @@
192-from gi.repository import Gio
193-from mainwindow import MainWindow
194-import os
195-from gobject import GError
196-
197-class AppGUI:
198- """XXX: add docs."""
199-
200- def __init__(self):
201- """Display the main window."""
202- self.gsettings = Gio.Settings('com.canonical.Unity.Launcher')
203- self.main_window = MainWindow(self)
204- self.main_window.show()
205- self.get_unity_list()
206-
207- def save_unity_list(self, menu_items):
208- try:
209- print str(menu_items)
210- self.gsettings.set_strv('favorites', menu_items)
211- self.get_unity_list()
212- return True
213- except GError, e:
214- return False
215- #return_code = os.system('unity --reset') #subprocess.call(['unity','--reset'])
216- #if return_code != 0:
217- # print "Settings fail to transition to new unity compiz favorites"
218-
219- def get_unity_list(self):
220- """ Create a list of items from unity's Launcher Panel."""
221- unity = self.gsettings.get_value('favorites')
222-
223- self.main_window.load_launcher_from_list(unity)
224-
225-
226-
227
228=== modified file 'unitylaunchereditor/core/desktop.py'
229--- unitylaunchereditor/core/desktop.py 2011-06-13 20:07:33 +0000
230+++ unitylaunchereditor/core/desktop.py 2011-11-28 17:31:26 +0000
231@@ -17,7 +17,6 @@
232 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
233
234 from os.path import isfile, join
235-import gtk
236 from ConfigParser import ConfigParser
237
238
239
240=== modified file 'unitylaunchereditor/core/iconmanager.py'
241--- unitylaunchereditor/core/iconmanager.py 2011-06-07 15:07:44 +0000
242+++ unitylaunchereditor/core/iconmanager.py 2011-11-28 17:31:26 +0000
243@@ -17,9 +17,9 @@
244 #####################################################################
245
246 from gio import AppInfo, FileIcon, ThemedIcon, content_type_get_icon
247-import gobject
248-import gtk
249-from gtk.gdk import INTERP_BILINEAR, pixbuf_new_from_file_at_size
250+from gi.repository import GObject
251+from gi.repository import Gtk
252+from gi.repository.GdkPixbuf import Pixbuf
253 from os import listdir
254 from os.path import exists, isdir, isfile, join
255
256@@ -27,7 +27,7 @@
257
258 class IconManager:
259 def __init__(self):
260- self.icontheme = gtk.icon_theme_get_default()
261+ self.icontheme = Gtk.IconTheme.get_default()
262 # add the humanity icon theme to the iconpath, as not all icon
263 # themes contain all the icons we need
264 # this *shouldn't* lead to any performance regressions
265@@ -50,7 +50,7 @@
266 return self.get_icon_with_name('image-missing', size)
267
268 if pixbuf.get_height() != size:
269- return pixbuf.scale_simple(size, size, INTERP_BILINEAR)
270+ return pixbuf.scale_simple(size, size, Pixbuf.INTERP_BILINEAR)
271
272 return pixbuf
273
274@@ -77,14 +77,14 @@
275 def mime_type_get_icon(self,mime, size = 24):
276 try:
277 gicon = content_type_get_icon(mime)
278- iconinfo = self.icontheme.choose_icon(gicon.get_names(), size, gtk.ICON_LOOKUP_USE_BUILTIN)
279+ iconinfo = self.icontheme.choose_icon(gicon.get_names(), size, Gtk.IconLookupFlags.USE_BUILTIN)
280 if not iconinfo:
281 pixbuf = self.get_icon_with_name('application-x-executable', size)
282 else:
283 pixbuf = iconinfo.load_icon()
284
285 if pixbuf.get_width() != size:
286- return pixbuf.scale_simple(size, size, INTERP_BILINEAR)
287+ return pixbuf.scale_simple(size, size, Gtk.INTERP_BILINEAR)
288 except:
289 return self.get_icon_with_name('image-missing', size)
290
291@@ -109,7 +109,7 @@
292 else:
293 names_list.append(name)
294
295- iconinfo = self.icontheme.choose_icon(names_list, size, gtk.ICON_LOOKUP_USE_BUILTIN)
296+ iconinfo = self.icontheme.choose_icon(names_list, size, Gtk.IconLookupFlags.USE_BUILTIN)
297 if not iconinfo:
298 return self.get_icon_with_name('application-x-executable', size)
299
300@@ -120,4 +120,4 @@
301 else:
302 return self.get_icon_with_name(app, size)
303 except:
304- return self.get_icon_with_name('image-missing', size)
305\ No newline at end of file
306+ return self.get_icon_with_name('image-missing', size)
307
308=== modified file 'unitylaunchereditor/core/utils.py'
309--- unitylaunchereditor/core/utils.py 2011-06-13 20:07:33 +0000
310+++ unitylaunchereditor/core/utils.py 2011-11-28 17:31:26 +0000
311@@ -16,9 +16,7 @@
312 #
313 #####################################################################
314
315-import gtk
316 import re
317-from gobject import GError
318 from os.path import basename, exists, expanduser, isfile, join
319
320 def normalize_path(str_path, exist_only = False):
321
322=== removed file 'unitylaunchereditor/data/application.glade'
323--- unitylaunchereditor/data/application.glade 2011-06-07 15:07:14 +0000
324+++ unitylaunchereditor/data/application.glade 1970-01-01 00:00:00 +0000
325@@ -1,623 +0,0 @@
326-<?xml version="1.0" encoding="UTF-8"?>
327-<interface>
328- <requires lib="gtk+" version="2.24"/>
329- <!-- interface-naming-policy project-wide -->
330- <object class="GtkWindow" id="window1">
331- <property name="can_focus">False</property>
332- <child>
333- <object class="GtkVBox" id="vbox1">
334- <property name="visible">True</property>
335- <property name="can_focus">False</property>
336- <property name="border_width">12</property>
337- <child>
338- <object class="GtkVBox" id="vbox2">
339- <property name="visible">True</property>
340- <property name="can_focus">False</property>
341- <child>
342- <object class="GtkHBox" id="hbox1">
343- <property name="visible">True</property>
344- <property name="can_focus">False</property>
345- <child>
346- <object class="GtkLabel" id="label1">
347- <property name="visible">True</property>
348- <property name="can_focus">False</property>
349- <property name="xalign">0</property>
350- <property name="yalign">0</property>
351- <property name="ypad">10</property>
352- <property name="label" translatable="yes">&lt;span font_size="large" color="white"&gt;&lt;b&gt;&lt;big&gt;%s&lt;/big&gt;&lt;/b&gt;&lt;/span&gt;
353-&lt;span color="white"&gt;%s&lt;/span&gt;</property>
354- <property name="use_markup">True</property>
355- </object>
356- <packing>
357- <property name="expand">False</property>
358- <property name="fill">False</property>
359- <property name="padding">10</property>
360- <property name="position">0</property>
361- </packing>
362- </child>
363- <child>
364- <object class="GtkImage" id="image1">
365- <property name="visible">True</property>
366- <property name="can_focus">False</property>
367- <property name="xalign">0</property>
368- <property name="yalign">0</property>
369- <property name="stock">gtk-missing-image</property>
370- </object>
371- <packing>
372- <property name="expand">False</property>
373- <property name="fill">False</property>
374- <property name="pack_type">end</property>
375- <property name="position">1</property>
376- </packing>
377- </child>
378- </object>
379- <packing>
380- <property name="expand">False</property>
381- <property name="fill">False</property>
382- <property name="position">0</property>
383- </packing>
384- </child>
385- <child>
386- <object class="GtkHSeparator" id="hseparator1">
387- <property name="visible">True</property>
388- <property name="can_focus">False</property>
389- </object>
390- <packing>
391- <property name="expand">False</property>
392- <property name="fill">True</property>
393- <property name="position">1</property>
394- </packing>
395- </child>
396- </object>
397- <packing>
398- <property name="expand">False</property>
399- <property name="fill">True</property>
400- <property name="position">0</property>
401- </packing>
402- </child>
403- <child>
404- <object class="GtkHPaned" id="hpaned1">
405- <property name="visible">True</property>
406- <property name="can_focus">True</property>
407- <property name="position">200</property>
408- <property name="position_set">True</property>
409- <child>
410- <object class="GtkFrame" id="frame1">
411- <property name="visible">True</property>
412- <property name="can_focus">False</property>
413- <property name="label_xalign">0</property>
414- <child>
415- <object class="GtkAlignment" id="alignment4">
416- <property name="visible">True</property>
417- <property name="can_focus">False</property>
418- <property name="top_padding">5</property>
419- <property name="bottom_padding">5</property>
420- <property name="left_padding">5</property>
421- <property name="right_padding">5</property>
422- <child>
423- <object class="GtkVPaned" id="vpaned1">
424- <property name="visible">True</property>
425- <property name="can_focus">True</property>
426- <child>
427- <object class="GtkHBox" id="hbox5">
428- <property name="visible">True</property>
429- <property name="can_focus">False</property>
430- <child>
431- <object class="GtkToolbar" id="toolbar2">
432- <property name="visible">True</property>
433- <property name="can_focus">False</property>
434- <property name="orientation">vertical</property>
435- <property name="toolbar_style">icons</property>
436- <child>
437- <object class="GtkToolButton" id="cmdAdd">
438- <property name="visible">True</property>
439- <property name="can_focus">False</property>
440- <property name="use_action_appearance">False</property>
441- <property name="label" translatable="yes">toolbutton1</property>
442- <property name="use_underline">True</property>
443- <property name="stock_id">gtk-add</property>
444- </object>
445- <packing>
446- <property name="expand">False</property>
447- <property name="homogeneous">True</property>
448- </packing>
449- </child>
450- <child>
451- <object class="GtkToolButton" id="cmdRemove">
452- <property name="visible">True</property>
453- <property name="sensitive">False</property>
454- <property name="can_focus">False</property>
455- <property name="use_action_appearance">False</property>
456- <property name="label" translatable="yes">toolbutton2</property>
457- <property name="use_underline">True</property>
458- <property name="stock_id">gtk-remove</property>
459- </object>
460- <packing>
461- <property name="expand">False</property>
462- <property name="homogeneous">True</property>
463- </packing>
464- </child>
465- </object>
466- <packing>
467- <property name="expand">False</property>
468- <property name="fill">True</property>
469- <property name="position">-1</property>
470- </packing>
471- </child>
472- <child>
473- <object class="GtkScrolledWindow" id="list_container">
474- <property name="visible">True</property>
475- <property name="can_focus">True</property>
476- <property name="hscrollbar_policy">never</property>
477- <property name="vscrollbar_policy">automatic</property>
478- <child>
479- <placeholder/>
480- </child>
481- </object>
482- <packing>
483- <property name="expand">True</property>
484- <property name="fill">True</property>
485- <property name="position">1</property>
486- </packing>
487- </child>
488- </object>
489- <packing>
490- <property name="resize">False</property>
491- <property name="shrink">True</property>
492- </packing>
493- </child>
494- <child>
495- <object class="GtkViewport" id="viewport2">
496- <property name="visible">True</property>
497- <property name="can_focus">False</property>
498- <property name="shadow_type">etched-in</property>
499- <child>
500- <object class="GtkHBox" id="hbox2">
501- <property name="visible">True</property>
502- <property name="can_focus">False</property>
503- <child>
504- <object class="GtkFrame" id="frame3">
505- <property name="visible">True</property>
506- <property name="can_focus">False</property>
507- <property name="border_width">4</property>
508- <property name="label_xalign">0</property>
509- <property name="label_yalign">0</property>
510- <property name="shadow_type">none</property>
511- <child>
512- <object class="GtkAlignment" id="alignment5">
513- <property name="visible">True</property>
514- <property name="can_focus">False</property>
515- <property name="left_padding">12</property>
516- <child>
517- <object class="GtkVBox" id="vbox5">
518- <property name="visible">True</property>
519- <property name="can_focus">False</property>
520- <child>
521- <object class="GtkButton" id="cmdIcon">
522- <property name="width_request">96</property>
523- <property name="height_request">96</property>
524- <property name="visible">True</property>
525- <property name="can_focus">True</property>
526- <property name="receives_default">True</property>
527- <property name="use_action_appearance">False</property>
528- <child>
529- <object class="GtkImage" id="imgIcon">
530- <property name="visible">True</property>
531- <property name="can_focus">False</property>
532- <property name="stock">gtk-missing-image</property>
533- </object>
534- </child>
535- </object>
536- <packing>
537- <property name="expand">False</property>
538- <property name="fill">False</property>
539- <property name="position">0</property>
540- </packing>
541- </child>
542- <child>
543- <placeholder/>
544- </child>
545- </object>
546- </child>
547- </object>
548- </child>
549- </object>
550- <packing>
551- <property name="expand">False</property>
552- <property name="fill">True</property>
553- <property name="position">0</property>
554- </packing>
555- </child>
556- <child>
557- <object class="GtkFrame" id="frame4">
558- <property name="visible">True</property>
559- <property name="can_focus">False</property>
560- <property name="border_width">4</property>
561- <property name="label_xalign">0</property>
562- <property name="label_yalign">0</property>
563- <property name="shadow_type">none</property>
564- <child>
565- <object class="GtkAlignment" id="alignment6">
566- <property name="visible">True</property>
567- <property name="can_focus">False</property>
568- <property name="left_padding">12</property>
569- <child>
570- <object class="GtkTable" id="table2">
571- <property name="visible">True</property>
572- <property name="can_focus">False</property>
573- <property name="border_width">5</property>
574- <property name="n_rows">4</property>
575- <property name="n_columns">2</property>
576- <property name="column_spacing">5</property>
577- <property name="row_spacing">5</property>
578- <child>
579- <object class="GtkEntry" id="txtName">
580- <property name="visible">True</property>
581- <property name="can_focus">True</property>
582- <property name="invisible_char">•</property>
583- <property name="invisible_char_set">True</property>
584- <property name="primary_icon_activatable">False</property>
585- <property name="secondary_icon_activatable">False</property>
586- <property name="primary_icon_sensitive">True</property>
587- <property name="secondary_icon_sensitive">True</property>
588- </object>
589- <packing>
590- <property name="left_attach">1</property>
591- <property name="right_attach">2</property>
592- <property name="y_options"></property>
593- </packing>
594- </child>
595- <child>
596- <object class="GtkEventBox" id="eventbox3">
597- <property name="visible">True</property>
598- <property name="can_focus">False</property>
599- <child>
600- <object class="GtkLabel" id="label4">
601- <property name="visible">True</property>
602- <property name="can_focus">False</property>
603- <property name="xalign">0</property>
604- <property name="label" translatable="yes">Name:</property>
605- </object>
606- </child>
607- </object>
608- <packing>
609- <property name="x_options">GTK_FILL</property>
610- <property name="y_options"></property>
611- </packing>
612- </child>
613- <child>
614- <object class="GtkEventBox" id="eventbox4">
615- <property name="visible">True</property>
616- <property name="can_focus">False</property>
617- <child>
618- <object class="GtkLabel" id="label5">
619- <property name="visible">True</property>
620- <property name="can_focus">False</property>
621- <property name="xalign">0</property>
622- <property name="yalign">0</property>
623- <property name="label" translatable="yes">Command:</property>
624- </object>
625- </child>
626- </object>
627- <packing>
628- <property name="top_attach">1</property>
629- <property name="bottom_attach">2</property>
630- <property name="x_options">GTK_FILL</property>
631- <property name="y_options">GTK_FILL</property>
632- </packing>
633- </child>
634- <child>
635- <object class="GtkEventBox" id="eventbox1">
636- <property name="visible">True</property>
637- <property name="can_focus">False</property>
638- <child>
639- <object class="GtkLabel" id="label8">
640- <property name="visible">True</property>
641- <property name="can_focus">False</property>
642- <property name="xalign">0</property>
643- <property name="yalign">0</property>
644- <property name="label" translatable="yes">Comment:</property>
645- </object>
646- </child>
647- </object>
648- <packing>
649- <property name="top_attach">2</property>
650- <property name="bottom_attach">3</property>
651- <property name="x_options">GTK_FILL</property>
652- <property name="y_options">GTK_FILL</property>
653- </packing>
654- </child>
655- <child>
656- <object class="GtkEventBox" id="eventbox2">
657- <property name="visible">True</property>
658- <property name="can_focus">False</property>
659- <child>
660- <placeholder/>
661- </child>
662- </object>
663- <packing>
664- <property name="top_attach">3</property>
665- <property name="bottom_attach">4</property>
666- <property name="x_options">GTK_FILL</property>
667- <property name="y_options">GTK_FILL</property>
668- </packing>
669- </child>
670- <child>
671- <object class="GtkHBox" id="hbox4">
672- <property name="visible">True</property>
673- <property name="can_focus">False</property>
674- <child>
675- <object class="GtkEntry" id="txtCommand">
676- <property name="visible">True</property>
677- <property name="can_focus">True</property>
678- <property name="invisible_char">•</property>
679- <property name="invisible_char_set">True</property>
680- <property name="primary_icon_activatable">False</property>
681- <property name="secondary_icon_activatable">False</property>
682- <property name="primary_icon_sensitive">True</property>
683- <property name="secondary_icon_sensitive">True</property>
684- </object>
685- <packing>
686- <property name="expand">True</property>
687- <property name="fill">True</property>
688- <property name="position">0</property>
689- </packing>
690- </child>
691- <child>
692- <object class="GtkButton" id="cmdRun">
693- <property name="label" translatable="yes">...</property>
694- <property name="visible">True</property>
695- <property name="can_focus">True</property>
696- <property name="receives_default">True</property>
697- <property name="use_action_appearance">False</property>
698- </object>
699- <packing>
700- <property name="expand">False</property>
701- <property name="fill">True</property>
702- <property name="position">1</property>
703- </packing>
704- </child>
705- </object>
706- <packing>
707- <property name="left_attach">1</property>
708- <property name="right_attach">2</property>
709- <property name="top_attach">1</property>
710- <property name="bottom_attach">2</property>
711- <property name="y_options">GTK_FILL</property>
712- </packing>
713- </child>
714- <child>
715- <object class="GtkScrolledWindow" id="scrolledwindow3">
716- <property name="visible">True</property>
717- <property name="can_focus">True</property>
718- <property name="hscrollbar_policy">automatic</property>
719- <property name="vscrollbar_policy">automatic</property>
720- <property name="shadow_type">in</property>
721- <child>
722- <object class="GtkTextView" id="txtComment">
723- <property name="visible">True</property>
724- <property name="can_focus">True</property>
725- <property name="wrap_mode">word</property>
726- </object>
727- </child>
728- </object>
729- <packing>
730- <property name="left_attach">1</property>
731- <property name="right_attach">2</property>
732- <property name="top_attach">2</property>
733- <property name="bottom_attach">3</property>
734- <property name="x_options">GTK_FILL</property>
735- <property name="y_options">GTK_FILL</property>
736- </packing>
737- </child>
738- <child>
739- <object class="GtkCheckButton" id="chkTerminal">
740- <property name="label" translatable="yes">Run in terminal</property>
741- <property name="visible">True</property>
742- <property name="can_focus">True</property>
743- <property name="receives_default">False</property>
744- <property name="use_action_appearance">False</property>
745- <property name="draw_indicator">True</property>
746- </object>
747- <packing>
748- <property name="left_attach">1</property>
749- <property name="right_attach">2</property>
750- <property name="top_attach">3</property>
751- <property name="bottom_attach">4</property>
752- <property name="y_options">GTK_FILL</property>
753- </packing>
754- </child>
755- </object>
756- </child>
757- </object>
758- </child>
759- </object>
760- <packing>
761- <property name="expand">True</property>
762- <property name="fill">True</property>
763- <property name="position">1</property>
764- </packing>
765- </child>
766- </object>
767- </child>
768- </object>
769- <packing>
770- <property name="resize">False</property>
771- <property name="shrink">False</property>
772- </packing>
773- </child>
774- </object>
775- </child>
776- </object>
777- </child>
778- <child type="label">
779- <object class="GtkLabel" id="label3">
780- <property name="visible">True</property>
781- <property name="can_focus">False</property>
782- <property name="label" translatable="yes">&lt;b&gt;Launchers&lt;/b&gt;</property>
783- <property name="use_markup">True</property>
784- </object>
785- </child>
786- </object>
787- <packing>
788- <property name="resize">False</property>
789- <property name="shrink">True</property>
790- </packing>
791- </child>
792- <child>
793- <object class="GtkFrame" id="frame2">
794- <property name="visible">True</property>
795- <property name="can_focus">False</property>
796- <property name="label_xalign">0</property>
797- <child>
798- <object class="GtkAlignment" id="alignment3">
799- <property name="visible">True</property>
800- <property name="can_focus">False</property>
801- <property name="bottom_padding">9</property>
802- <property name="left_padding">6</property>
803- <property name="right_padding">9</property>
804- <child>
805- <object class="GtkVBox" id="vbox4">
806- <property name="visible">True</property>
807- <property name="can_focus">False</property>
808- <child>
809- <object class="GtkToolbar" id="toolbar1">
810- <property name="visible">True</property>
811- <property name="can_focus">False</property>
812- <child>
813- <object class="GtkToolButton" id="btnAdd">
814- <property name="visible">True</property>
815- <property name="can_focus">False</property>
816- <property name="use_action_appearance">False</property>
817- <property name="label" translatable="yes">toolbutton1</property>
818- <property name="use_underline">True</property>
819- <property name="stock_id">gtk-add</property>
820- </object>
821- <packing>
822- <property name="expand">False</property>
823- <property name="homogeneous">True</property>
824- </packing>
825- </child>
826- <child>
827- <object class="GtkToolButton" id="btnEdit">
828- <property name="visible">True</property>
829- <property name="sensitive">False</property>
830- <property name="can_focus">False</property>
831- <property name="use_action_appearance">False</property>
832- <property name="label" translatable="yes">toolbutton1</property>
833- <property name="use_underline">True</property>
834- <property name="stock_id">gtk-edit</property>
835- </object>
836- <packing>
837- <property name="expand">False</property>
838- <property name="homogeneous">True</property>
839- </packing>
840- </child>
841- <child>
842- <object class="GtkToolButton" id="btnRemove">
843- <property name="visible">True</property>
844- <property name="sensitive">False</property>
845- <property name="can_focus">False</property>
846- <property name="use_action_appearance">False</property>
847- <property name="label" translatable="yes">toolbutton2</property>
848- <property name="use_underline">True</property>
849- <property name="stock_id">gtk-remove</property>
850- </object>
851- <packing>
852- <property name="expand">False</property>
853- <property name="homogeneous">True</property>
854- </packing>
855- </child>
856- </object>
857- <packing>
858- <property name="expand">False</property>
859- <property name="fill">True</property>
860- <property name="position">0</property>
861- </packing>
862- </child>
863- <child>
864- <object class="GtkScrolledWindow" id="group_container">
865- <property name="visible">True</property>
866- <property name="can_focus">True</property>
867- <property name="hscrollbar_policy">automatic</property>
868- <property name="vscrollbar_policy">automatic</property>
869- <child>
870- <placeholder/>
871- </child>
872- </object>
873- <packing>
874- <property name="expand">True</property>
875- <property name="fill">True</property>
876- <property name="position">1</property>
877- </packing>
878- </child>
879- </object>
880- </child>
881- </object>
882- </child>
883- <child type="label">
884- <object class="GtkLabel" id="label6">
885- <property name="visible">True</property>
886- <property name="can_focus">False</property>
887- <property name="label" translatable="yes">&lt;b&gt;Quicklist Groups&lt;/b&gt;</property>
888- <property name="use_markup">True</property>
889- </object>
890- </child>
891- </object>
892- <packing>
893- <property name="resize">True</property>
894- <property name="shrink">True</property>
895- </packing>
896- </child>
897- </object>
898- <packing>
899- <property name="expand">True</property>
900- <property name="fill">True</property>
901- <property name="position">1</property>
902- </packing>
903- </child>
904- <child>
905- <object class="GtkHButtonBox" id="hbuttonbox1">
906- <property name="visible">True</property>
907- <property name="can_focus">False</property>
908- <property name="spacing">6</property>
909- <property name="layout_style">end</property>
910- <child>
911- <object class="GtkButton" id="cmdSave">
912- <property name="label" translatable="yes">Save</property>
913- <property name="visible">True</property>
914- <property name="can_focus">True</property>
915- <property name="receives_default">True</property>
916- <property name="use_action_appearance">False</property>
917- </object>
918- <packing>
919- <property name="expand">False</property>
920- <property name="fill">False</property>
921- <property name="position">0</property>
922- </packing>
923- </child>
924- <child>
925- <object class="GtkButton" id="cmdClose">
926- <property name="label" translatable="yes">Close</property>
927- <property name="visible">True</property>
928- <property name="can_focus">True</property>
929- <property name="receives_default">True</property>
930- <property name="use_action_appearance">False</property>
931- </object>
932- <packing>
933- <property name="expand">False</property>
934- <property name="fill">False</property>
935- <property name="position">1</property>
936- </packing>
937- </child>
938- </object>
939- <packing>
940- <property name="expand">False</property>
941- <property name="fill">True</property>
942- <property name="position">2</property>
943- </packing>
944- </child>
945- </object>
946- </child>
947- </object>
948-</interface>
949
950=== removed file 'unitylaunchereditor/data/application.glade.old'
951--- unitylaunchereditor/data/application.glade.old 2011-06-07 15:07:44 +0000
952+++ unitylaunchereditor/data/application.glade.old 1970-01-01 00:00:00 +0000
953@@ -1,775 +0,0 @@
954-<?xml version="1.0" encoding="UTF-8"?>
955-<interface>
956- <requires lib="gtk+" version="2.24"/>
957- <!-- interface-naming-policy project-wide -->
958- <object class="GtkVBox" id="add_new_laucher_box">
959- <property name="visible">True</property>
960- <property name="can_focus">False</property>
961- <property name="spacing">6</property>
962- <child>
963- <object class="GtkRadioButton" id="radiobutton1">
964- <property name="label" translatable="yes">Selecionar existente</property>
965- <property name="visible">True</property>
966- <property name="can_focus">True</property>
967- <property name="receives_default">False</property>
968- <property name="use_action_appearance">False</property>
969- <property name="active">True</property>
970- <property name="draw_indicator">True</property>
971- <property name="group">radiobutton2</property>
972- </object>
973- <packing>
974- <property name="expand">False</property>
975- <property name="fill">True</property>
976- <property name="position">0</property>
977- </packing>
978- </child>
979- <child>
980- <object class="GtkHBox" id="hbox7">
981- <property name="visible">True</property>
982- <property name="can_focus">False</property>
983- <child>
984- <object class="GtkLabel" id="label12">
985- <property name="visible">True</property>
986- <property name="can_focus">False</property>
987- <property name="label" translatable="yes">Search:</property>
988- </object>
989- <packing>
990- <property name="expand">False</property>
991- <property name="fill">False</property>
992- <property name="padding">6</property>
993- <property name="position">0</property>
994- </packing>
995- </child>
996- <child>
997- <object class="GtkEntry" id="entry2">
998- <property name="visible">True</property>
999- <property name="can_focus">True</property>
1000- <property name="invisible_char">•</property>
1001- <property name="invisible_char_set">True</property>
1002- <property name="secondary_icon_stock">gtk-find</property>
1003- <property name="primary_icon_activatable">False</property>
1004- <property name="secondary_icon_activatable">True</property>
1005- <property name="primary_icon_sensitive">True</property>
1006- <property name="secondary_icon_sensitive">True</property>
1007- <property name="secondary_icon_tooltip_text" translatable="yes">search</property>
1008- </object>
1009- <packing>
1010- <property name="expand">True</property>
1011- <property name="fill">True</property>
1012- <property name="position">1</property>
1013- </packing>
1014- </child>
1015- </object>
1016- <packing>
1017- <property name="expand">False</property>
1018- <property name="fill">True</property>
1019- <property name="position">1</property>
1020- </packing>
1021- </child>
1022- <child>
1023- <object class="GtkAlignment" id="alignment6">
1024- <property name="visible">True</property>
1025- <property name="can_focus">False</property>
1026- <property name="top_padding">6</property>
1027- <property name="bottom_padding">6</property>
1028- <property name="left_padding">6</property>
1029- <property name="right_padding">6</property>
1030- <child>
1031- <object class="GtkScrolledWindow" id="scrolledwindow4">
1032- <property name="visible">True</property>
1033- <property name="can_focus">True</property>
1034- <property name="hscrollbar_policy">never</property>
1035- <property name="vscrollbar_policy">automatic</property>
1036- <property name="shadow_type">in</property>
1037- <child>
1038- <object class="GtkTreeView" id="lvwAddLaunchers">
1039- <property name="visible">True</property>
1040- <property name="can_focus">True</property>
1041- <property name="reorderable">True</property>
1042- <property name="search_column">1</property>
1043- <property name="rubber_banding">True</property>
1044- </object>
1045- </child>
1046- </object>
1047- </child>
1048- </object>
1049- <packing>
1050- <property name="expand">True</property>
1051- <property name="fill">True</property>
1052- <property name="padding">2</property>
1053- <property name="position">2</property>
1054- </packing>
1055- </child>
1056- <child>
1057- <object class="GtkRadioButton" id="radiobutton2">
1058- <property name="label" translatable="yes">Adicionar novo</property>
1059- <property name="visible">True</property>
1060- <property name="can_focus">True</property>
1061- <property name="receives_default">False</property>
1062- <property name="use_action_appearance">False</property>
1063- <property name="xalign">0.49000000953674316</property>
1064- <property name="active">True</property>
1065- <property name="draw_indicator">True</property>
1066- </object>
1067- <packing>
1068- <property name="expand">False</property>
1069- <property name="fill">True</property>
1070- <property name="position">3</property>
1071- </packing>
1072- </child>
1073- <child>
1074- <object class="GtkHBox" id="hbox6">
1075- <property name="visible">True</property>
1076- <property name="can_focus">False</property>
1077- <child>
1078- <object class="GtkLabel" id="label11">
1079- <property name="visible">True</property>
1080- <property name="can_focus">False</property>
1081- <property name="label" translatable="yes">Name:</property>
1082- </object>
1083- <packing>
1084- <property name="expand">False</property>
1085- <property name="fill">False</property>
1086- <property name="padding">6</property>
1087- <property name="position">0</property>
1088- </packing>
1089- </child>
1090- <child>
1091- <object class="GtkEntry" id="entry1">
1092- <property name="visible">True</property>
1093- <property name="can_focus">True</property>
1094- <property name="invisible_char">•</property>
1095- <property name="invisible_char_set">True</property>
1096- <property name="primary_icon_activatable">False</property>
1097- <property name="secondary_icon_activatable">False</property>
1098- <property name="primary_icon_sensitive">True</property>
1099- <property name="secondary_icon_sensitive">True</property>
1100- </object>
1101- <packing>
1102- <property name="expand">True</property>
1103- <property name="fill">True</property>
1104- <property name="position">1</property>
1105- </packing>
1106- </child>
1107- </object>
1108- <packing>
1109- <property name="expand">False</property>
1110- <property name="fill">True</property>
1111- <property name="position">4</property>
1112- </packing>
1113- </child>
1114- </object>
1115- <object class="GtkListStore" id="liststore1"/>
1116- <object class="GtkListStore" id="lstTarget">
1117- <columns>
1118- <!-- column-name GObject1 -->
1119- <column type="GObject"/>
1120- </columns>
1121- </object>
1122- <object class="GtkWindow" id="window1">
1123- <property name="can_focus">False</property>
1124- <property name="window_position">center</property>
1125- <child>
1126- <object class="GtkVBox" id="vbox2624">
1127- <property name="visible">True</property>
1128- <property name="can_focus">False</property>
1129- <property name="border_width">12</property>
1130- <property name="spacing">6</property>
1131- <child>
1132- <object class="GtkHPaned" id="hpaned2">
1133- <property name="visible">True</property>
1134- <property name="can_focus">True</property>
1135- <property name="position">170</property>
1136- <property name="position_set">True</property>
1137- <child>
1138- <object class="GtkVBox" id="vbox1">
1139- <property name="visible">True</property>
1140- <property name="can_focus">False</property>
1141- <property name="spacing">6</property>
1142- <child>
1143- <object class="GtkLabel" id="label1">
1144- <property name="visible">True</property>
1145- <property name="can_focus">False</property>
1146- <property name="xalign">0</property>
1147- <property name="label" translatable="yes">&lt;b&gt;Launcher Items&lt;/b&gt;</property>
1148- <property name="use_markup">True</property>
1149- </object>
1150- <packing>
1151- <property name="expand">False</property>
1152- <property name="fill">False</property>
1153- <property name="position">0</property>
1154- </packing>
1155- </child>
1156- <child>
1157- <object class="GtkScrolledWindow" id="list_container">
1158- <property name="visible">True</property>
1159- <property name="can_focus">True</property>
1160- <property name="hscrollbar_policy">never</property>
1161- <property name="vscrollbar_policy">automatic</property>
1162- <property name="shadow_type">in</property>
1163- <child>
1164- <placeholder/>
1165- </child>
1166- </object>
1167- <packing>
1168- <property name="expand">True</property>
1169- <property name="fill">True</property>
1170- <property name="position">1</property>
1171- </packing>
1172- </child>
1173- <child>
1174- <object class="GtkHButtonBox" id="hbuttonbox2">
1175- <property name="visible">True</property>
1176- <property name="can_focus">False</property>
1177- <property name="layout_style">end</property>
1178- <child>
1179- <object class="GtkButton" id="cmdAdd">
1180- <property name="visible">True</property>
1181- <property name="can_focus">True</property>
1182- <property name="receives_default">True</property>
1183- <property name="use_action_appearance">False</property>
1184- <child>
1185- <object class="GtkImage" id="image1">
1186- <property name="visible">True</property>
1187- <property name="can_focus">False</property>
1188- <property name="stock">gtk-add</property>
1189- </object>
1190- </child>
1191- </object>
1192- <packing>
1193- <property name="expand">False</property>
1194- <property name="fill">False</property>
1195- <property name="position">0</property>
1196- </packing>
1197- </child>
1198- <child>
1199- <object class="GtkButton" id="cmdRemove">
1200- <property name="visible">True</property>
1201- <property name="can_focus">True</property>
1202- <property name="receives_default">True</property>
1203- <property name="use_action_appearance">False</property>
1204- <child>
1205- <object class="GtkImage" id="image2">
1206- <property name="visible">True</property>
1207- <property name="can_focus">False</property>
1208- <property name="stock">gtk-remove</property>
1209- </object>
1210- </child>
1211- </object>
1212- <packing>
1213- <property name="expand">False</property>
1214- <property name="fill">False</property>
1215- <property name="position">1</property>
1216- </packing>
1217- </child>
1218- </object>
1219- <packing>
1220- <property name="expand">False</property>
1221- <property name="fill">True</property>
1222- <property name="position">2</property>
1223- </packing>
1224- </child>
1225- </object>
1226- <packing>
1227- <property name="resize">False</property>
1228- <property name="shrink">True</property>
1229- </packing>
1230- </child>
1231- <child>
1232- <object class="GtkVBox" id="vbox2">
1233- <property name="visible">True</property>
1234- <property name="can_focus">False</property>
1235- <property name="spacing">6</property>
1236- <child>
1237- <object class="GtkLabel" id="Properties">
1238- <property name="visible">True</property>
1239- <property name="can_focus">False</property>
1240- <property name="xalign">0</property>
1241- <property name="label" translatable="yes">&lt;b&gt;Properties&lt;/b&gt;</property>
1242- <property name="use_markup">True</property>
1243- </object>
1244- <packing>
1245- <property name="expand">False</property>
1246- <property name="fill">False</property>
1247- <property name="position">0</property>
1248- </packing>
1249- </child>
1250- <child>
1251- <object class="GtkVBox" id="vbox3">
1252- <property name="visible">True</property>
1253- <property name="can_focus">False</property>
1254- <child>
1255- <object class="GtkHBox" id="hbox2">
1256- <property name="visible">True</property>
1257- <property name="can_focus">False</property>
1258- <child>
1259- <object class="GtkFrame" id="frame3">
1260- <property name="visible">True</property>
1261- <property name="can_focus">False</property>
1262- <property name="border_width">4</property>
1263- <property name="label_xalign">0</property>
1264- <property name="label_yalign">0</property>
1265- <property name="shadow_type">none</property>
1266- <child>
1267- <object class="GtkAlignment" id="alignment4">
1268- <property name="visible">True</property>
1269- <property name="can_focus">False</property>
1270- <property name="left_padding">12</property>
1271- <child>
1272- <object class="GtkHBox" id="hbox1">
1273- <property name="visible">True</property>
1274- <property name="can_focus">False</property>
1275- <child>
1276- <object class="GtkLabel" id="label7">
1277- <property name="visible">True</property>
1278- <property name="can_focus">False</property>
1279- <property name="xalign">0</property>
1280- <property name="yalign">0</property>
1281- <property name="label" translatable="yes">Icon:</property>
1282- </object>
1283- <packing>
1284- <property name="expand">True</property>
1285- <property name="fill">True</property>
1286- <property name="position">0</property>
1287- </packing>
1288- </child>
1289- <child>
1290- <object class="GtkVBox" id="vbox5">
1291- <property name="visible">True</property>
1292- <property name="can_focus">False</property>
1293- <child>
1294- <object class="GtkButton" id="cmdIcon">
1295- <property name="width_request">96</property>
1296- <property name="height_request">96</property>
1297- <property name="visible">True</property>
1298- <property name="can_focus">True</property>
1299- <property name="receives_default">True</property>
1300- <property name="use_action_appearance">False</property>
1301- <child>
1302- <object class="GtkImage" id="imgIcon">
1303- <property name="visible">True</property>
1304- <property name="can_focus">False</property>
1305- <property name="stock">gtk-missing-image</property>
1306- </object>
1307- </child>
1308- </object>
1309- <packing>
1310- <property name="expand">False</property>
1311- <property name="fill">False</property>
1312- <property name="position">0</property>
1313- </packing>
1314- </child>
1315- <child>
1316- <placeholder/>
1317- </child>
1318- </object>
1319- <packing>
1320- <property name="expand">False</property>
1321- <property name="fill">False</property>
1322- <property name="position">1</property>
1323- </packing>
1324- </child>
1325- </object>
1326- </child>
1327- </object>
1328- </child>
1329- </object>
1330- <packing>
1331- <property name="expand">False</property>
1332- <property name="fill">True</property>
1333- <property name="position">0</property>
1334- </packing>
1335- </child>
1336- <child>
1337- <object class="GtkFrame" id="frame1">
1338- <property name="visible">True</property>
1339- <property name="can_focus">False</property>
1340- <property name="border_width">4</property>
1341- <property name="label_xalign">0</property>
1342- <property name="label_yalign">0</property>
1343- <property name="shadow_type">none</property>
1344- <child>
1345- <object class="GtkAlignment" id="alignment2">
1346- <property name="visible">True</property>
1347- <property name="can_focus">False</property>
1348- <property name="left_padding">12</property>
1349- <child>
1350- <object class="GtkTable" id="table2">
1351- <property name="visible">True</property>
1352- <property name="can_focus">False</property>
1353- <property name="border_width">5</property>
1354- <property name="n_rows">4</property>
1355- <property name="n_columns">2</property>
1356- <property name="column_spacing">5</property>
1357- <property name="row_spacing">5</property>
1358- <child>
1359- <object class="GtkEntry" id="txtName">
1360- <property name="visible">True</property>
1361- <property name="can_focus">True</property>
1362- <property name="invisible_char">•</property>
1363- <property name="invisible_char_set">True</property>
1364- <property name="primary_icon_activatable">False</property>
1365- <property name="secondary_icon_activatable">False</property>
1366- <property name="primary_icon_sensitive">True</property>
1367- <property name="secondary_icon_sensitive">True</property>
1368- </object>
1369- <packing>
1370- <property name="left_attach">1</property>
1371- <property name="right_attach">2</property>
1372- <property name="y_options"></property>
1373- </packing>
1374- </child>
1375- <child>
1376- <object class="GtkEventBox" id="eventbox3">
1377- <property name="visible">True</property>
1378- <property name="can_focus">False</property>
1379- <child>
1380- <object class="GtkLabel" id="label2">
1381- <property name="visible">True</property>
1382- <property name="can_focus">False</property>
1383- <property name="xalign">0</property>
1384- <property name="label" translatable="yes">Name:</property>
1385- </object>
1386- </child>
1387- </object>
1388- <packing>
1389- <property name="x_options">GTK_FILL</property>
1390- <property name="y_options"></property>
1391- </packing>
1392- </child>
1393- <child>
1394- <object class="GtkEventBox" id="eventbox4">
1395- <property name="visible">True</property>
1396- <property name="can_focus">False</property>
1397- <child>
1398- <object class="GtkLabel" id="label4">
1399- <property name="visible">True</property>
1400- <property name="can_focus">False</property>
1401- <property name="xalign">0</property>
1402- <property name="label" translatable="yes">Command:</property>
1403- </object>
1404- </child>
1405- </object>
1406- <packing>
1407- <property name="top_attach">1</property>
1408- <property name="bottom_attach">2</property>
1409- <property name="x_options">GTK_FILL</property>
1410- <property name="y_options">GTK_FILL</property>
1411- </packing>
1412- </child>
1413- <child>
1414- <object class="GtkEventBox" id="eventbox1">
1415- <property name="visible">True</property>
1416- <property name="can_focus">False</property>
1417- <child>
1418- <object class="GtkLabel" id="label5">
1419- <property name="visible">True</property>
1420- <property name="can_focus">False</property>
1421- <property name="xalign">0</property>
1422- <property name="yalign">0</property>
1423- <property name="label" translatable="yes">Comment:</property>
1424- </object>
1425- </child>
1426- </object>
1427- <packing>
1428- <property name="top_attach">2</property>
1429- <property name="bottom_attach">3</property>
1430- <property name="x_options">GTK_FILL</property>
1431- <property name="y_options">GTK_FILL</property>
1432- </packing>
1433- </child>
1434- <child>
1435- <object class="GtkEventBox" id="eventbox2">
1436- <property name="visible">True</property>
1437- <property name="can_focus">False</property>
1438- <child>
1439- <placeholder/>
1440- </child>
1441- </object>
1442- <packing>
1443- <property name="top_attach">3</property>
1444- <property name="bottom_attach">4</property>
1445- <property name="x_options">GTK_FILL</property>
1446- <property name="y_options">GTK_FILL</property>
1447- </packing>
1448- </child>
1449- <child>
1450- <object class="GtkHBox" id="hbox3">
1451- <property name="visible">True</property>
1452- <property name="can_focus">False</property>
1453- <child>
1454- <object class="GtkEntry" id="txtCommand">
1455- <property name="visible">True</property>
1456- <property name="can_focus">True</property>
1457- <property name="invisible_char">•</property>
1458- <property name="invisible_char_set">True</property>
1459- <property name="primary_icon_activatable">False</property>
1460- <property name="secondary_icon_activatable">False</property>
1461- <property name="primary_icon_sensitive">True</property>
1462- <property name="secondary_icon_sensitive">True</property>
1463- </object>
1464- <packing>
1465- <property name="expand">True</property>
1466- <property name="fill">True</property>
1467- <property name="position">0</property>
1468- </packing>
1469- </child>
1470- <child>
1471- <object class="GtkButton" id="cmdRun">
1472- <property name="label" translatable="yes">...</property>
1473- <property name="visible">True</property>
1474- <property name="can_focus">True</property>
1475- <property name="receives_default">True</property>
1476- <property name="use_action_appearance">False</property>
1477- </object>
1478- <packing>
1479- <property name="expand">False</property>
1480- <property name="fill">True</property>
1481- <property name="position">1</property>
1482- </packing>
1483- </child>
1484- </object>
1485- <packing>
1486- <property name="left_attach">1</property>
1487- <property name="right_attach">2</property>
1488- <property name="top_attach">1</property>
1489- <property name="bottom_attach">2</property>
1490- </packing>
1491- </child>
1492- <child>
1493- <object class="GtkScrolledWindow" id="scrolledwindow3">
1494- <property name="visible">True</property>
1495- <property name="can_focus">True</property>
1496- <property name="hscrollbar_policy">automatic</property>
1497- <property name="vscrollbar_policy">automatic</property>
1498- <property name="shadow_type">in</property>
1499- <child>
1500- <object class="GtkTextView" id="txtComment">
1501- <property name="visible">True</property>
1502- <property name="can_focus">True</property>
1503- <property name="wrap_mode">word</property>
1504- </object>
1505- </child>
1506- </object>
1507- <packing>
1508- <property name="left_attach">1</property>
1509- <property name="right_attach">2</property>
1510- <property name="top_attach">2</property>
1511- <property name="bottom_attach">3</property>
1512- <property name="x_options">GTK_FILL</property>
1513- <property name="y_options">GTK_FILL</property>
1514- </packing>
1515- </child>
1516- <child>
1517- <object class="GtkCheckButton" id="chkTerminal">
1518- <property name="label" translatable="yes">Run in terminal</property>
1519- <property name="visible">True</property>
1520- <property name="can_focus">True</property>
1521- <property name="receives_default">False</property>
1522- <property name="use_action_appearance">False</property>
1523- <property name="draw_indicator">True</property>
1524- </object>
1525- <packing>
1526- <property name="left_attach">1</property>
1527- <property name="right_attach">2</property>
1528- <property name="top_attach">3</property>
1529- <property name="bottom_attach">4</property>
1530- <property name="y_options">GTK_FILL</property>
1531- </packing>
1532- </child>
1533- </object>
1534- </child>
1535- </object>
1536- </child>
1537- </object>
1538- <packing>
1539- <property name="expand">True</property>
1540- <property name="fill">True</property>
1541- <property name="position">1</property>
1542- </packing>
1543- </child>
1544- </object>
1545- <packing>
1546- <property name="expand">False</property>
1547- <property name="fill">False</property>
1548- <property name="position">0</property>
1549- </packing>
1550- </child>
1551- <child>
1552- <object class="GtkFrame" id="frame2">
1553- <property name="visible">True</property>
1554- <property name="can_focus">False</property>
1555- <property name="label_xalign">0</property>
1556- <child>
1557- <object class="GtkAlignment" id="alignment3">
1558- <property name="visible">True</property>
1559- <property name="can_focus">False</property>
1560- <property name="bottom_padding">9</property>
1561- <property name="left_padding">6</property>
1562- <property name="right_padding">9</property>
1563- <child>
1564- <object class="GtkVBox" id="vbox4">
1565- <property name="visible">True</property>
1566- <property name="can_focus">False</property>
1567- <child>
1568- <object class="GtkToolbar" id="toolbar1">
1569- <property name="visible">True</property>
1570- <property name="can_focus">False</property>
1571- <child>
1572- <object class="GtkToolButton" id="btnAdd">
1573- <property name="visible">True</property>
1574- <property name="can_focus">False</property>
1575- <property name="use_action_appearance">False</property>
1576- <property name="label" translatable="yes">toolbutton1</property>
1577- <property name="use_underline">True</property>
1578- <property name="stock_id">gtk-add</property>
1579- </object>
1580- <packing>
1581- <property name="expand">False</property>
1582- <property name="homogeneous">True</property>
1583- </packing>
1584- </child>
1585- <child>
1586- <object class="GtkToolButton" id="btnEdit">
1587- <property name="visible">True</property>
1588- <property name="sensitive">False</property>
1589- <property name="can_focus">False</property>
1590- <property name="use_action_appearance">False</property>
1591- <property name="label" translatable="yes">toolbutton1</property>
1592- <property name="use_underline">True</property>
1593- <property name="stock_id">gtk-edit</property>
1594- </object>
1595- <packing>
1596- <property name="expand">False</property>
1597- <property name="homogeneous">True</property>
1598- </packing>
1599- </child>
1600- <child>
1601- <object class="GtkToolButton" id="btnRemove">
1602- <property name="visible">True</property>
1603- <property name="sensitive">False</property>
1604- <property name="can_focus">False</property>
1605- <property name="use_action_appearance">False</property>
1606- <property name="label" translatable="yes">toolbutton2</property>
1607- <property name="use_underline">True</property>
1608- <property name="stock_id">gtk-remove</property>
1609- </object>
1610- <packing>
1611- <property name="expand">False</property>
1612- <property name="homogeneous">True</property>
1613- </packing>
1614- </child>
1615- </object>
1616- <packing>
1617- <property name="expand">False</property>
1618- <property name="fill">True</property>
1619- <property name="position">0</property>
1620- </packing>
1621- </child>
1622- <child>
1623- <object class="GtkScrolledWindow" id="group_container">
1624- <property name="visible">True</property>
1625- <property name="can_focus">True</property>
1626- <property name="hscrollbar_policy">automatic</property>
1627- <property name="vscrollbar_policy">automatic</property>
1628- <child>
1629- <placeholder/>
1630- </child>
1631- </object>
1632- <packing>
1633- <property name="expand">True</property>
1634- <property name="fill">True</property>
1635- <property name="position">1</property>
1636- </packing>
1637- </child>
1638- </object>
1639- </child>
1640- </object>
1641- </child>
1642- <child type="label">
1643- <object class="GtkLabel" id="label6">
1644- <property name="visible">True</property>
1645- <property name="can_focus">False</property>
1646- <property name="label" translatable="yes">&lt;b&gt;Quicklist Groups&lt;/b&gt;</property>
1647- <property name="use_markup">True</property>
1648- </object>
1649- </child>
1650- </object>
1651- <packing>
1652- <property name="expand">True</property>
1653- <property name="fill">True</property>
1654- <property name="position">1</property>
1655- </packing>
1656- </child>
1657- </object>
1658- <packing>
1659- <property name="expand">True</property>
1660- <property name="fill">True</property>
1661- <property name="position">1</property>
1662- </packing>
1663- </child>
1664- <child>
1665- <object class="GtkAlignment" id="alignment1">
1666- <property name="visible">True</property>
1667- <property name="can_focus">False</property>
1668- <property name="xalign">0</property>
1669- <child>
1670- <object class="GtkHButtonBox" id="hbuttonbox1">
1671- <property name="visible">True</property>
1672- <property name="can_focus">False</property>
1673- <property name="layout_style">end</property>
1674- <child>
1675- <object class="GtkButton" id="cmdSave">
1676- <property name="label">gtk-save</property>
1677- <property name="visible">True</property>
1678- <property name="can_focus">True</property>
1679- <property name="receives_default">True</property>
1680- <property name="use_action_appearance">False</property>
1681- <property name="use_stock">True</property>
1682- </object>
1683- <packing>
1684- <property name="expand">False</property>
1685- <property name="fill">False</property>
1686- <property name="position">0</property>
1687- </packing>
1688- </child>
1689- <child>
1690- <object class="GtkButton" id="cmdClose">
1691- <property name="label" translatable="yes">Close</property>
1692- <property name="visible">True</property>
1693- <property name="can_focus">True</property>
1694- <property name="receives_default">True</property>
1695- <property name="use_action_appearance">False</property>
1696- </object>
1697- <packing>
1698- <property name="expand">False</property>
1699- <property name="fill">False</property>
1700- <property name="position">1</property>
1701- </packing>
1702- </child>
1703- </object>
1704- </child>
1705- </object>
1706- <packing>
1707- <property name="expand">False</property>
1708- <property name="fill">True</property>
1709- <property name="position">2</property>
1710- </packing>
1711- </child>
1712- </object>
1713- <packing>
1714- <property name="resize">True</property>
1715- <property name="shrink">True</property>
1716- </packing>
1717- </child>
1718- </object>
1719- <packing>
1720- <property name="expand">True</property>
1721- <property name="fill">True</property>
1722- <property name="position">0</property>
1723- </packing>
1724- </child>
1725- </object>
1726- </child>
1727- </object>
1728-</interface>
1729
1730=== removed file 'unitylaunchereditor/data/application2.glade'
1731--- unitylaunchereditor/data/application2.glade 2011-06-07 15:07:44 +0000
1732+++ unitylaunchereditor/data/application2.glade 1970-01-01 00:00:00 +0000
1733@@ -1,645 +0,0 @@
1734-<?xml version="1.0" encoding="UTF-8"?>
1735-<interface>
1736- <requires lib="gtk+" version="2.24"/>
1737- <!-- interface-naming-policy project-wide -->
1738- <object class="GtkWindow" id="window1">
1739- <property name="can_focus">False</property>
1740- <child>
1741- <object class="GtkVBox" id="vbox1">
1742- <property name="visible">True</property>
1743- <property name="can_focus">False</property>
1744- <property name="border_width">12</property>
1745- <child>
1746- <object class="GtkHBox" id="hbox1">
1747- <property name="visible">True</property>
1748- <property name="can_focus">False</property>
1749- <child>
1750- <object class="GtkVBox" id="vbox2">
1751- <property name="visible">True</property>
1752- <property name="can_focus">False</property>
1753- <child>
1754- <object class="GtkLabel" id="label1">
1755- <property name="visible">True</property>
1756- <property name="can_focus">False</property>
1757- <property name="xalign">0</property>
1758- <property name="yalign">0</property>
1759- <property name="xpad">12</property>
1760- <property name="label" translatable="yes">&lt;span font_size="large" color="white"&gt;&lt;b&gt;&lt;big&gt;Create a Launcher&lt;/big&gt;&lt;/b&gt;&lt;/span&gt;</property>
1761- <property name="use_markup">True</property>
1762- </object>
1763- <packing>
1764- <property name="expand">False</property>
1765- <property name="fill">True</property>
1766- <property name="position">0</property>
1767- </packing>
1768- </child>
1769- <child>
1770- <object class="GtkLabel" id="label2">
1771- <property name="visible">True</property>
1772- <property name="can_focus">False</property>
1773- <property name="xalign">0.059999998658895493</property>
1774- <property name="xpad">12</property>
1775- <property name="label" translatable="yes">&lt;span color="white"&gt;Create a Launcher item using an application installed on your system&lt;/span&gt;</property>
1776- <property name="use_markup">True</property>
1777- </object>
1778- <packing>
1779- <property name="expand">False</property>
1780- <property name="fill">True</property>
1781- <property name="position">1</property>
1782- </packing>
1783- </child>
1784- </object>
1785- <packing>
1786- <property name="expand">False</property>
1787- <property name="fill">True</property>
1788- <property name="position">0</property>
1789- </packing>
1790- </child>
1791- <child>
1792- <object class="GtkAlignment" id="alignment1">
1793- <property name="visible">True</property>
1794- <property name="can_focus">False</property>
1795- <child>
1796- <object class="GtkImage" id="image1">
1797- <property name="visible">True</property>
1798- <property name="can_focus">False</property>
1799- <property name="xalign">0</property>
1800- <property name="stock">gtk-missing-image</property>
1801- <property name="icon-size">6</property>
1802- </object>
1803- </child>
1804- </object>
1805- <packing>
1806- <property name="expand">False</property>
1807- <property name="fill">True</property>
1808- <property name="padding">15</property>
1809- <property name="pack_type">end</property>
1810- <property name="position">1</property>
1811- </packing>
1812- </child>
1813- </object>
1814- <packing>
1815- <property name="expand">False</property>
1816- <property name="fill">False</property>
1817- <property name="position">0</property>
1818- </packing>
1819- </child>
1820- <child>
1821- <object class="GtkHSeparator" id="hseparator1">
1822- <property name="height_request">50</property>
1823- <property name="visible">True</property>
1824- <property name="can_focus">False</property>
1825- </object>
1826- <packing>
1827- <property name="expand">False</property>
1828- <property name="fill">False</property>
1829- <property name="position">1</property>
1830- </packing>
1831- </child>
1832- <child>
1833- <object class="GtkHPaned" id="hpaned1">
1834- <property name="visible">True</property>
1835- <property name="can_focus">True</property>
1836- <property name="position">200</property>
1837- <property name="position_set">True</property>
1838- <child>
1839- <object class="GtkVPaned" id="vpaned1">
1840- <property name="visible">True</property>
1841- <property name="can_focus">True</property>
1842- <child>
1843- <object class="GtkHBox" id="hbox5">
1844- <property name="visible">True</property>
1845- <property name="can_focus">False</property>
1846- <child>
1847- <object class="GtkScrolledWindow" id="list_container">
1848- <property name="visible">True</property>
1849- <property name="can_focus">True</property>
1850- <property name="hscrollbar_policy">never</property>
1851- <property name="vscrollbar_policy">automatic</property>
1852- <property name="shadow_type">in</property>
1853- <child>
1854- <placeholder/>
1855- </child>
1856- </object>
1857- <packing>
1858- <property name="expand">True</property>
1859- <property name="fill">True</property>
1860- <property name="position">0</property>
1861- </packing>
1862- </child>
1863- <child>
1864- <object class="GtkToolbar" id="toolbar2">
1865- <property name="visible">True</property>
1866- <property name="can_focus">False</property>
1867- <property name="orientation">vertical</property>
1868- <property name="toolbar_style">icons</property>
1869- <child>
1870- <object class="GtkToolButton" id="btnAdd1">
1871- <property name="visible">True</property>
1872- <property name="can_focus">False</property>
1873- <property name="use_action_appearance">False</property>
1874- <property name="label" translatable="yes">toolbutton1</property>
1875- <property name="use_underline">True</property>
1876- <property name="stock_id">gtk-add</property>
1877- </object>
1878- <packing>
1879- <property name="expand">False</property>
1880- <property name="homogeneous">True</property>
1881- </packing>
1882- </child>
1883- <child>
1884- <object class="GtkToolButton" id="btnRemove1">
1885- <property name="visible">True</property>
1886- <property name="sensitive">False</property>
1887- <property name="can_focus">False</property>
1888- <property name="use_action_appearance">False</property>
1889- <property name="label" translatable="yes">toolbutton2</property>
1890- <property name="use_underline">True</property>
1891- <property name="stock_id">gtk-remove</property>
1892- </object>
1893- <packing>
1894- <property name="expand">False</property>
1895- <property name="homogeneous">True</property>
1896- </packing>
1897- </child>
1898- </object>
1899- <packing>
1900- <property name="expand">False</property>
1901- <property name="fill">True</property>
1902- <property name="position">1</property>
1903- </packing>
1904- </child>
1905- </object>
1906- <packing>
1907- <property name="resize">False</property>
1908- <property name="shrink">True</property>
1909- </packing>
1910- </child>
1911- <child>
1912- <object class="GtkViewport" id="viewport2">
1913- <property name="visible">True</property>
1914- <property name="can_focus">False</property>
1915- <property name="shadow_type">etched-in</property>
1916- <child>
1917- <object class="GtkHBox" id="hbox2">
1918- <property name="visible">True</property>
1919- <property name="can_focus">False</property>
1920- <child>
1921- <object class="GtkFrame" id="frame3">
1922- <property name="visible">True</property>
1923- <property name="can_focus">False</property>
1924- <property name="border_width">4</property>
1925- <property name="label_xalign">0</property>
1926- <property name="label_yalign">0</property>
1927- <property name="shadow_type">none</property>
1928- <child>
1929- <object class="GtkAlignment" id="alignment4">
1930- <property name="visible">True</property>
1931- <property name="can_focus">False</property>
1932- <property name="left_padding">12</property>
1933- <child>
1934- <object class="GtkHBox" id="hbox3">
1935- <property name="visible">True</property>
1936- <property name="can_focus">False</property>
1937- <child>
1938- <object class="GtkLabel" id="label7">
1939- <property name="visible">True</property>
1940- <property name="can_focus">False</property>
1941- <property name="xalign">0</property>
1942- <property name="yalign">0</property>
1943- <property name="label" translatable="yes">Icon:</property>
1944- </object>
1945- <packing>
1946- <property name="expand">True</property>
1947- <property name="fill">True</property>
1948- <property name="position">0</property>
1949- </packing>
1950- </child>
1951- <child>
1952- <object class="GtkVBox" id="vbox5">
1953- <property name="visible">True</property>
1954- <property name="can_focus">False</property>
1955- <child>
1956- <object class="GtkButton" id="cmdIcon">
1957- <property name="width_request">96</property>
1958- <property name="height_request">96</property>
1959- <property name="visible">True</property>
1960- <property name="can_focus">True</property>
1961- <property name="receives_default">True</property>
1962- <property name="use_action_appearance">False</property>
1963- <child>
1964- <object class="GtkImage" id="imgIcon">
1965- <property name="visible">True</property>
1966- <property name="can_focus">False</property>
1967- <property name="stock">gtk-missing-image</property>
1968- </object>
1969- </child>
1970- </object>
1971- <packing>
1972- <property name="expand">False</property>
1973- <property name="fill">False</property>
1974- <property name="position">0</property>
1975- </packing>
1976- </child>
1977- <child>
1978- <placeholder/>
1979- </child>
1980- </object>
1981- <packing>
1982- <property name="expand">False</property>
1983- <property name="fill">False</property>
1984- <property name="position">1</property>
1985- </packing>
1986- </child>
1987- </object>
1988- </child>
1989- </object>
1990- </child>
1991- </object>
1992- <packing>
1993- <property name="expand">False</property>
1994- <property name="fill">True</property>
1995- <property name="position">0</property>
1996- </packing>
1997- </child>
1998- <child>
1999- <object class="GtkFrame" id="frame1">
2000- <property name="visible">True</property>
2001- <property name="can_focus">False</property>
2002- <property name="border_width">4</property>
2003- <property name="label_xalign">0</property>
2004- <property name="label_yalign">0</property>
2005- <property name="shadow_type">none</property>
2006- <child>
2007- <object class="GtkAlignment" id="alignment2">
2008- <property name="visible">True</property>
2009- <property name="can_focus">False</property>
2010- <property name="left_padding">12</property>
2011- <child>
2012- <object class="GtkTable" id="table2">
2013- <property name="visible">True</property>
2014- <property name="can_focus">False</property>
2015- <property name="border_width">5</property>
2016- <property name="n_rows">4</property>
2017- <property name="n_columns">2</property>
2018- <property name="column_spacing">5</property>
2019- <property name="row_spacing">5</property>
2020- <child>
2021- <object class="GtkEntry" id="txtName">
2022- <property name="visible">True</property>
2023- <property name="can_focus">True</property>
2024- <property name="invisible_char">•</property>
2025- <property name="invisible_char_set">True</property>
2026- <property name="primary_icon_activatable">False</property>
2027- <property name="secondary_icon_activatable">False</property>
2028- <property name="primary_icon_sensitive">True</property>
2029- <property name="secondary_icon_sensitive">True</property>
2030- </object>
2031- <packing>
2032- <property name="left_attach">1</property>
2033- <property name="right_attach">2</property>
2034- <property name="y_options"></property>
2035- </packing>
2036- </child>
2037- <child>
2038- <object class="GtkEventBox" id="eventbox3">
2039- <property name="visible">True</property>
2040- <property name="can_focus">False</property>
2041- <child>
2042- <object class="GtkLabel" id="label3">
2043- <property name="visible">True</property>
2044- <property name="can_focus">False</property>
2045- <property name="xalign">0</property>
2046- <property name="label" translatable="yes">Name:</property>
2047- </object>
2048- </child>
2049- </object>
2050- <packing>
2051- <property name="x_options">GTK_FILL</property>
2052- <property name="y_options"></property>
2053- </packing>
2054- </child>
2055- <child>
2056- <object class="GtkEventBox" id="eventbox4">
2057- <property name="visible">True</property>
2058- <property name="can_focus">False</property>
2059- <child>
2060- <object class="GtkLabel" id="label4">
2061- <property name="visible">True</property>
2062- <property name="can_focus">False</property>
2063- <property name="xalign">0</property>
2064- <property name="yalign">0</property>
2065- <property name="label" translatable="yes">Command:</property>
2066- </object>
2067- </child>
2068- </object>
2069- <packing>
2070- <property name="top_attach">1</property>
2071- <property name="bottom_attach">2</property>
2072- <property name="x_options">GTK_FILL</property>
2073- <property name="y_options">GTK_FILL</property>
2074- </packing>
2075- </child>
2076- <child>
2077- <object class="GtkEventBox" id="eventbox1">
2078- <property name="visible">True</property>
2079- <property name="can_focus">False</property>
2080- <child>
2081- <object class="GtkLabel" id="label5">
2082- <property name="visible">True</property>
2083- <property name="can_focus">False</property>
2084- <property name="xalign">0</property>
2085- <property name="yalign">0</property>
2086- <property name="label" translatable="yes">Comment:</property>
2087- </object>
2088- </child>
2089- </object>
2090- <packing>
2091- <property name="top_attach">2</property>
2092- <property name="bottom_attach">3</property>
2093- <property name="x_options">GTK_FILL</property>
2094- <property name="y_options">GTK_FILL</property>
2095- </packing>
2096- </child>
2097- <child>
2098- <object class="GtkEventBox" id="eventbox2">
2099- <property name="visible">True</property>
2100- <property name="can_focus">False</property>
2101- <child>
2102- <placeholder/>
2103- </child>
2104- </object>
2105- <packing>
2106- <property name="top_attach">3</property>
2107- <property name="bottom_attach">4</property>
2108- <property name="x_options">GTK_FILL</property>
2109- <property name="y_options">GTK_FILL</property>
2110- </packing>
2111- </child>
2112- <child>
2113- <object class="GtkHBox" id="hbox4">
2114- <property name="visible">True</property>
2115- <property name="can_focus">False</property>
2116- <child>
2117- <object class="GtkEntry" id="txtCommand">
2118- <property name="visible">True</property>
2119- <property name="can_focus">True</property>
2120- <property name="invisible_char">•</property>
2121- <property name="invisible_char_set">True</property>
2122- <property name="primary_icon_activatable">False</property>
2123- <property name="secondary_icon_activatable">False</property>
2124- <property name="primary_icon_sensitive">True</property>
2125- <property name="secondary_icon_sensitive">True</property>
2126- </object>
2127- <packing>
2128- <property name="expand">True</property>
2129- <property name="fill">True</property>
2130- <property name="position">0</property>
2131- </packing>
2132- </child>
2133- <child>
2134- <object class="GtkButton" id="cmdRun">
2135- <property name="label" translatable="yes">...</property>
2136- <property name="visible">True</property>
2137- <property name="can_focus">True</property>
2138- <property name="receives_default">True</property>
2139- <property name="use_action_appearance">False</property>
2140- </object>
2141- <packing>
2142- <property name="expand">False</property>
2143- <property name="fill">True</property>
2144- <property name="position">1</property>
2145- </packing>
2146- </child>
2147- </object>
2148- <packing>
2149- <property name="left_attach">1</property>
2150- <property name="right_attach">2</property>
2151- <property name="top_attach">1</property>
2152- <property name="bottom_attach">2</property>
2153- <property name="y_options">GTK_FILL</property>
2154- </packing>
2155- </child>
2156- <child>
2157- <object class="GtkScrolledWindow" id="scrolledwindow3">
2158- <property name="visible">True</property>
2159- <property name="can_focus">True</property>
2160- <property name="hscrollbar_policy">automatic</property>
2161- <property name="vscrollbar_policy">automatic</property>
2162- <property name="shadow_type">in</property>
2163- <child>
2164- <object class="GtkTextView" id="txtComment">
2165- <property name="visible">True</property>
2166- <property name="can_focus">True</property>
2167- <property name="wrap_mode">word</property>
2168- </object>
2169- </child>
2170- </object>
2171- <packing>
2172- <property name="left_attach">1</property>
2173- <property name="right_attach">2</property>
2174- <property name="top_attach">2</property>
2175- <property name="bottom_attach">3</property>
2176- <property name="x_options">GTK_FILL</property>
2177- <property name="y_options">GTK_FILL</property>
2178- </packing>
2179- </child>
2180- <child>
2181- <object class="GtkCheckButton" id="chkTerminal">
2182- <property name="label" translatable="yes">Run in terminal</property>
2183- <property name="visible">True</property>
2184- <property name="can_focus">True</property>
2185- <property name="receives_default">False</property>
2186- <property name="use_action_appearance">False</property>
2187- <property name="draw_indicator">True</property>
2188- </object>
2189- <packing>
2190- <property name="left_attach">1</property>
2191- <property name="right_attach">2</property>
2192- <property name="top_attach">3</property>
2193- <property name="bottom_attach">4</property>
2194- <property name="y_options">GTK_FILL</property>
2195- </packing>
2196- </child>
2197- </object>
2198- </child>
2199- </object>
2200- </child>
2201- </object>
2202- <packing>
2203- <property name="expand">True</property>
2204- <property name="fill">True</property>
2205- <property name="position">1</property>
2206- </packing>
2207- </child>
2208- </object>
2209- </child>
2210- </object>
2211- <packing>
2212- <property name="resize">True</property>
2213- <property name="shrink">True</property>
2214- </packing>
2215- </child>
2216- </object>
2217- <packing>
2218- <property name="resize">False</property>
2219- <property name="shrink">True</property>
2220- </packing>
2221- </child>
2222- <child>
2223- <object class="GtkFrame" id="frame2">
2224- <property name="visible">True</property>
2225- <property name="can_focus">False</property>
2226- <property name="label_xalign">0</property>
2227- <child>
2228- <object class="GtkAlignment" id="alignment3">
2229- <property name="visible">True</property>
2230- <property name="can_focus">False</property>
2231- <property name="bottom_padding">9</property>
2232- <property name="left_padding">6</property>
2233- <property name="right_padding">9</property>
2234- <child>
2235- <object class="GtkVBox" id="vbox4">
2236- <property name="visible">True</property>
2237- <property name="can_focus">False</property>
2238- <child>
2239- <object class="GtkToolbar" id="toolbar1">
2240- <property name="visible">True</property>
2241- <property name="can_focus">False</property>
2242- <child>
2243- <object class="GtkToolButton" id="btnAdd">
2244- <property name="visible">True</property>
2245- <property name="can_focus">False</property>
2246- <property name="use_action_appearance">False</property>
2247- <property name="label" translatable="yes">toolbutton1</property>
2248- <property name="use_underline">True</property>
2249- <property name="stock_id">gtk-add</property>
2250- </object>
2251- <packing>
2252- <property name="expand">False</property>
2253- <property name="homogeneous">True</property>
2254- </packing>
2255- </child>
2256- <child>
2257- <object class="GtkToolButton" id="btnEdit">
2258- <property name="visible">True</property>
2259- <property name="sensitive">False</property>
2260- <property name="can_focus">False</property>
2261- <property name="use_action_appearance">False</property>
2262- <property name="label" translatable="yes">toolbutton1</property>
2263- <property name="use_underline">True</property>
2264- <property name="stock_id">gtk-edit</property>
2265- </object>
2266- <packing>
2267- <property name="expand">False</property>
2268- <property name="homogeneous">True</property>
2269- </packing>
2270- </child>
2271- <child>
2272- <object class="GtkToolButton" id="btnRemove">
2273- <property name="visible">True</property>
2274- <property name="sensitive">False</property>
2275- <property name="can_focus">False</property>
2276- <property name="use_action_appearance">False</property>
2277- <property name="label" translatable="yes">toolbutton2</property>
2278- <property name="use_underline">True</property>
2279- <property name="stock_id">gtk-remove</property>
2280- </object>
2281- <packing>
2282- <property name="expand">False</property>
2283- <property name="homogeneous">True</property>
2284- </packing>
2285- </child>
2286- </object>
2287- <packing>
2288- <property name="expand">False</property>
2289- <property name="fill">True</property>
2290- <property name="position">0</property>
2291- </packing>
2292- </child>
2293- <child>
2294- <object class="GtkScrolledWindow" id="group_container">
2295- <property name="visible">True</property>
2296- <property name="can_focus">True</property>
2297- <property name="hscrollbar_policy">automatic</property>
2298- <property name="vscrollbar_policy">automatic</property>
2299- <child>
2300- <placeholder/>
2301- </child>
2302- </object>
2303- <packing>
2304- <property name="expand">True</property>
2305- <property name="fill">True</property>
2306- <property name="position">1</property>
2307- </packing>
2308- </child>
2309- </object>
2310- </child>
2311- </object>
2312- </child>
2313- <child type="label">
2314- <object class="GtkLabel" id="label6">
2315- <property name="visible">True</property>
2316- <property name="can_focus">False</property>
2317- <property name="label" translatable="yes">&lt;b&gt;Quicklist Groups&lt;/b&gt;</property>
2318- <property name="use_markup">True</property>
2319- </object>
2320- </child>
2321- </object>
2322- <packing>
2323- <property name="resize">True</property>
2324- <property name="shrink">True</property>
2325- </packing>
2326- </child>
2327- </object>
2328- <packing>
2329- <property name="expand">True</property>
2330- <property name="fill">True</property>
2331- <property name="position">2</property>
2332- </packing>
2333- </child>
2334- <child>
2335- <object class="GtkHButtonBox" id="hbuttonbox1">
2336- <property name="visible">True</property>
2337- <property name="can_focus">False</property>
2338- <property name="spacing">6</property>
2339- <property name="layout_style">end</property>
2340- <child>
2341- <object class="GtkButton" id="cmdCancel">
2342- <property name="label" translatable="yes">button</property>
2343- <property name="visible">True</property>
2344- <property name="can_focus">True</property>
2345- <property name="receives_default">True</property>
2346- <property name="use_action_appearance">False</property>
2347- </object>
2348- <packing>
2349- <property name="expand">False</property>
2350- <property name="fill">False</property>
2351- <property name="position">0</property>
2352- </packing>
2353- </child>
2354- <child>
2355- <object class="GtkButton" id="cmdClose">
2356- <property name="label" translatable="yes">button</property>
2357- <property name="visible">True</property>
2358- <property name="can_focus">True</property>
2359- <property name="receives_default">True</property>
2360- <property name="use_action_appearance">False</property>
2361- </object>
2362- <packing>
2363- <property name="expand">False</property>
2364- <property name="fill">False</property>
2365- <property name="position">1</property>
2366- </packing>
2367- </child>
2368- </object>
2369- <packing>
2370- <property name="expand">False</property>
2371- <property name="fill">True</property>
2372- <property name="position">3</property>
2373- </packing>
2374- </child>
2375- </object>
2376- </child>
2377- </object>
2378-</interface>
2379
2380=== modified file 'unitylaunchereditor/dialogs/app.py'
2381--- unitylaunchereditor/dialogs/app.py 2011-06-13 20:07:33 +0000
2382+++ unitylaunchereditor/dialogs/app.py 2011-11-28 17:31:26 +0000
2383@@ -15,8 +15,8 @@
2384 # GNU General Public License for more details.
2385 #
2386 #####################################################################
2387-import gobject
2388-import gtk
2389+from gi.repository import GObject
2390+from gi.repository import Gtk
2391
2392 from gio import ThemedIcon, FileIcon, File
2393 from os.path import join
2394@@ -29,7 +29,7 @@
2395 from unitylaunchereditor.widgets.dialogheader import DialogHeader
2396 from unitylaunchereditor.widgets.launcherview import LauncherView
2397 from unitylaunchereditor.widgets.launcherinfo import LauncherInfo
2398-from unitylaunchereditor.widgets.groupview import GroupView, GroupView
2399+from unitylaunchereditor.widgets.groupview import GroupView
2400 from unitylaunchereditor.dialogs.launcherdialog import AddLauncherDialog,EditLauncherDialog
2401 from unitylaunchereditor.dialogs.quicklistdialog import QuicklistDialog
2402 from unitylaunchereditor.dialogs.dialogs import DialogType,MessageBox
2403@@ -43,25 +43,24 @@
2404 TOOLBUTTON_EDIT,
2405 TOOLBUTTON_REMOVE) = range(3)
2406
2407-class MainWindow(gtk.Window):
2408+class MainWindow(Gtk.Window):
2409 def __init__(self, gsettings):
2410- super(MainWindow, self).__init__()
2411+ Gtk.Window.__init__(self, title="Unity Launcher Editor")
2412 log.info('Application started.')
2413- self.set_title("Unity Launcher Editor")
2414 self.gsettings = gsettings
2415
2416 self.set_default_size(700, 500)
2417 self.set_size_request(700, 500)
2418- self.set_position(gtk.WIN_POS_CENTER)
2419+ self.set_position(Gtk.WindowPosition.CENTER)
2420
2421- main_box = gtk.VBox()
2422+ main_box = Gtk.VBox()
2423 self.add(main_box)
2424
2425 #header labels and imagem
2426 self.__create_header(main_box)
2427
2428- main_panel = gtk.HPaned()
2429- main_box.pack_start(main_panel,fill=True, expand=True)
2430+ main_panel = Gtk.HPaned()
2431+ main_box.pack_start(main_panel, True, True, 0)
2432
2433 #laucher list
2434 self.__create_launcher(main_panel)
2435@@ -73,7 +72,7 @@
2436 self.__create_bottom_box(main_box)
2437
2438 self.__populate()
2439- self.connect('delete-event', lambda x,y:gtk.main_quit())
2440+ self.connect('delete-event', Gtk.main_quit)
2441
2442 def __create_header(self, container):
2443 self.header_title = DialogHeader(_('Unity Launcher Editor'))
2444@@ -87,70 +86,70 @@
2445 #header image icon
2446 img_path = resource_filename(__name__, join("../data", 'plugin-unityshell.png'))
2447 self.header_title.set_icon(img_path)
2448- self.header_title.add_start(gtk.HSeparator())
2449- container.pack_start(self.header_title, expand=False)
2450+ self.header_title.add_start(Gtk.HSeparator())
2451+ container.pack_start(self.header_title, False, False, 0)
2452
2453 def __create_launcher(self, container):
2454- vbox = gtk.VBox()
2455- toolbar_view = gtk.Toolbar()
2456- toolbar_view.set_style(gtk.TOOLBAR_ICONS)
2457+ vbox = Gtk.VBox()
2458+ toolbar_view = Gtk.Toolbar()
2459+ toolbar_view.set_style(Gtk.ToolbarStyle.ICONS)
2460
2461- add_buttom = gtk.ToolButton()
2462- add_buttom.set_icon_name(gtk.STOCK_NEW)
2463+ add_buttom = Gtk.ToolButton()
2464+ add_buttom.set_icon_name(Gtk.STOCK_NEW)
2465 add_buttom.set_use_action_appearance(False)
2466- add_buttom.set_tooltip_text(_('Create a new Launcher item.'))
2467- add_buttom.connect('clicked', self.__on_laucher_button_click, TOOLBUTTON_ADD)
2468+ add_buttom.set_tooltip_text(_('Create a new Launcher item'))
2469+ add_buttom.connect('clicked', self.__on_launcher_button_click, TOOLBUTTON_ADD)
2470
2471- edit_buttom = gtk.ToolButton()
2472- edit_buttom.set_icon_name(gtk.STOCK_PROPERTIES)
2473+ edit_buttom = Gtk.ToolButton()
2474+ edit_buttom.set_icon_name(Gtk.STOCK_PROPERTIES)
2475 edit_buttom.set_use_action_appearance(False)
2476- edit_buttom.set_tooltip_text(_('Edit select Launcher information.'))
2477- edit_buttom.connect('clicked', self.__on_laucher_button_click, TOOLBUTTON_EDIT)
2478+ edit_buttom.set_tooltip_text(_('Edit select Launcher information'))
2479+ edit_buttom.connect('clicked', self.__on_launcher_button_click, TOOLBUTTON_EDIT)
2480
2481- remove_buttom = gtk.ToolButton()
2482- remove_buttom.set_icon_name(gtk.STOCK_DELETE)
2483+ remove_buttom = Gtk.ToolButton()
2484+ remove_buttom.set_icon_name(Gtk.STOCK_DELETE)
2485 remove_buttom.set_use_action_appearance(False)
2486- remove_buttom.set_tooltip_text(_('Remove selected Launcher.'))
2487- remove_buttom.connect('clicked', self.__on_laucher_button_click, TOOLBUTTON_REMOVE)
2488+ remove_buttom.set_tooltip_text(_('Remove selected Launcher'))
2489+ remove_buttom.connect('clicked', self.__on_launcher_button_click, TOOLBUTTON_REMOVE)
2490
2491 toolbar_view.insert(add_buttom, TOOLBUTTON_ADD)
2492 toolbar_view.insert(edit_buttom, TOOLBUTTON_EDIT)
2493 toolbar_view.insert(remove_buttom, TOOLBUTTON_REMOVE)
2494
2495 self.launcher_view = LauncherView()
2496- hscroll = gtk.ScrolledWindow()
2497- hscroll.set_shadow_type(gtk.SHADOW_ETCHED_IN)
2498+ hscroll = Gtk.ScrolledWindow()
2499+ hscroll.set_shadow_type(Gtk.ShadowType.ETCHED_IN)
2500 hscroll.set_border_width(5)
2501 hscroll.set_size_request(200,200)
2502 hscroll.add(self.launcher_view)
2503
2504
2505- vbox.pack_start(toolbar_view, expand = False)
2506- vbox.pack_start(hscroll, expand = True)
2507+ vbox.pack_start(toolbar_view, False, False, 0)
2508+ vbox.pack_start(hscroll, True, True, 0)
2509 container.set_position(100)
2510 container.pack1(vbox, resize=False, shrink=False)
2511
2512 def __create_group_view(self, container):
2513- vbox = gtk.VBox()
2514- toolbar_view = gtk.Toolbar()
2515- toolbar_view.set_style(gtk.TOOLBAR_ICONS)
2516+ vbox = Gtk.VBox()
2517+ toolbar_view = Gtk.Toolbar()
2518+ toolbar_view.set_style(Gtk.ToolbarStyle.ICONS)
2519
2520- add_button = gtk.ToolButton()
2521- add_button.set_icon_name(gtk.STOCK_ADD)
2522+ add_button = Gtk.ToolButton()
2523+ add_button.set_icon_name(Gtk.STOCK_ADD)
2524 add_button.set_use_action_appearance(False)
2525- add_button.set_tooltip_text(_('Add a new quicklist group.'))
2526+ add_button.set_tooltip_text(_('Add a new quicklist group'))
2527 add_button.connect('clicked', self.__on_quicklist_button_click, TOOLBUTTON_ADD)
2528
2529- self.edit_button = gtk.ToolButton()
2530- self.edit_button.set_icon_name(gtk.STOCK_EDIT)
2531+ self.edit_button = Gtk.ToolButton()
2532+ self.edit_button.set_icon_name(Gtk.STOCK_EDIT)
2533 self.edit_button.set_use_action_appearance(False)
2534- self.edit_button.set_tooltip_text(_('Change select quicklist group information.'))
2535+ self.edit_button.set_tooltip_text(_('Change select quicklist group information'))
2536 self.edit_button.connect('clicked', self.__on_quicklist_button_click, TOOLBUTTON_EDIT)
2537
2538- self.remove_button = gtk.ToolButton()
2539- self.remove_button.set_icon_name(gtk.STOCK_REMOVE)
2540+ self.remove_button = Gtk.ToolButton()
2541+ self.remove_button.set_icon_name(Gtk.STOCK_REMOVE)
2542 self.remove_button.set_use_action_appearance(False)
2543- self.remove_button.set_tooltip_text(_('Remove selected quicklist group.'))
2544+ self.remove_button.set_tooltip_text(_('Remove selected quicklist group'))
2545 self.remove_button.connect('clicked', self.__on_quicklist_button_click, TOOLBUTTON_REMOVE)
2546
2547 toolbar_view.insert(add_button, TOOLBUTTON_ADD)
2548@@ -158,14 +157,14 @@
2549 toolbar_view.insert(self.remove_button, TOOLBUTTON_REMOVE)
2550
2551 self.group_view = GroupView()
2552- hscroll = gtk.ScrolledWindow()
2553- hscroll.set_shadow_type(gtk.SHADOW_ETCHED_IN)
2554+ hscroll = Gtk.ScrolledWindow()
2555+ hscroll.set_shadow_type(Gtk.ShadowType.ETCHED_IN)
2556 hscroll.set_border_width(5)
2557 hscroll.set_size_request(200,200)
2558 hscroll.add(self.group_view)
2559
2560- vbox.pack_start(toolbar_view, expand = False)
2561- vbox.pack_start(hscroll, expand = True)
2562+ vbox.pack_start(toolbar_view, False, False, 0)
2563+ vbox.pack_start(hscroll, True, True, 0)
2564
2565 container.pack2(vbox, resize=False, shrink=False)
2566 #list group signals
2567@@ -173,18 +172,18 @@
2568
2569 def __create_bottom_box(self, container):
2570 #Bottom button list for save and close
2571- button_close = gtk.Button(stock=gtk.STOCK_CLOSE)
2572- button_save = gtk.Button(stock=gtk.STOCK_SAVE)
2573- bottom_box = gtk.HButtonBox()
2574- bottom_box.set_layout(gtk.BUTTONBOX_END)
2575+ button_close = Gtk.Button(stock=Gtk.STOCK_CLOSE)
2576+ button_save = Gtk.Button(stock=Gtk.STOCK_SAVE)
2577+ bottom_box = Gtk.HButtonBox()
2578+ bottom_box.set_layout(Gtk.ButtonBoxStyle.END)
2579 bottom_box.set_border_width(12)
2580- bottom_box.pack_end(button_save)
2581- bottom_box.pack_end(button_close)
2582- button_close.connect('clicked', lambda x: gtk.main_quit())
2583+ bottom_box.pack_end(button_save, False, False, 0)
2584+ bottom_box.pack_end(button_close, False, False, 0)
2585+ button_close.connect('clicked', Gtk.main_quit)
2586 button_save.connect('clicked', self.save_launchers)
2587
2588- container.pack_start(gtk.HSeparator(), False,True,0)
2589- container.pack_start(bottom_box, expand=False)
2590+ container.pack_start(Gtk.HSeparator(), False, True, 0)
2591+ container.pack_start(bottom_box, False, False, 0)
2592
2593 def new_from_info(self, info):
2594 file_path = normalize_path('%s.desktop' % info['Name'])
2595@@ -236,7 +235,7 @@
2596 self.new_from_file(menu_item, False)
2597 self.launcher_view.connect('selection-changed', self.__launcher_view_row_change)
2598 #make first row active
2599- self.launcher_view.set_cursor((0,))
2600+ self.launcher_view.set_selected_iter(0)
2601
2602 return
2603 def __on_quicklist_button_click(self, widget, button_type):
2604@@ -307,11 +306,11 @@
2605 objDesktop.remove_sections(shortcut_group_name)
2606 objDesktop.set('X-Ayatana-Desktop-Shortcuts', groups)
2607
2608- def __on_laucher_button_click(self, widget, button_type):
2609+ def __on_launcher_button_click(self, widget, button_type):
2610
2611 if button_type == TOOLBUTTON_ADD:
2612 dialog = AddLauncherDialog(self)
2613- dialog.set_position(gtk.WIN_POS_CENTER_ALWAYS)
2614+ dialog.set_position(Gtk.WindowPosition.CENTER_ALWAYS)
2615 dialog.show_all()
2616 if button_type == TOOLBUTTON_EDIT:
2617 if self.launcher_view.is_selected:
2618@@ -340,7 +339,7 @@
2619 parent=self,
2620 action_text=_('Remove Launcher'),
2621 message=_('You are about to remove a Launcher item, are you sure?'),
2622- dlg_type=DialogType.DIALOG_MESSAGE
2623+ dlg_type=DialogType.DIALOG_CONFIRMATION,
2624 )
2625 result, text = dialog.run()
2626 if result:
2627@@ -386,16 +385,15 @@
2628 self.edit_button.set_sensitive(True)
2629 self.remove_button.set_sensitive(True)
2630 else:
2631- self.edit_button.set_sensitive(True)
2632- self.remove_button.set_sensitive(True)
2633+ self.edit_button.set_sensitive(False)
2634+ self.remove_button.set_sensitive(False)
2635
2636 def __save_unity_list(self, menu_items):
2637 try:
2638- print str(menu_items)
2639 self.gsettings.set_strv('favorites', menu_items)
2640 self.__populate()
2641 return True
2642- except gobject.GError, e:
2643+ except GObject.GError, e:
2644 return False
2645 #return_code = os.system('unity --reset') #subprocess.call(['unity','--reset'])
2646 #if return_code != 0:
2647@@ -441,4 +439,4 @@
2648 message=_("There's a problem with your application, \n controller not found."),
2649 dlg_type=DialogType.DIALOG_MESSAGE
2650 ).run()
2651-
2652\ No newline at end of file
2653+
2654
2655=== modified file 'unitylaunchereditor/dialogs/dialogs.py'
2656--- unitylaunchereditor/dialogs/dialogs.py 2011-06-07 15:07:44 +0000
2657+++ unitylaunchereditor/dialogs/dialogs.py 2011-11-28 17:31:26 +0000
2658@@ -1,4 +1,4 @@
2659-import gtk
2660+from gi.repository import Gtk
2661 from unitylaunchereditor.core.translation import _
2662 class DialogType:
2663 """ Class to define constants for define Message class types"""
2664@@ -8,16 +8,16 @@
2665 DIALOG_CONFIRMATION
2666 ) = range(3)
2667
2668-class FileChooser(gtk.FileChooserDialog):
2669+class FileChooser(Gtk.FileChooserDialog):
2670 def __init__(self, title='Open...', filters=None):
2671 super(FileChooser, self).__init__(
2672 title,
2673 None,
2674- gtk.FILE_CHOOSER_ACTION_OPEN, (
2675- gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
2676- gtk.STOCK_OPEN, gtk.RESPONSE_OK)
2677+ Gtk.FileChooserAction.OPEN, (
2678+ Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
2679+ Gtk.STOCK_OPEN, Gtk.ResponseType.OK)
2680 )
2681- self.set_default_response(gtk.RESPONSE_OK)
2682+ self.set_default_response(Gtk.ResponseType.OK)
2683 if filters:
2684 self.add_filter(filters)
2685
2686@@ -28,12 +28,12 @@
2687 filename = self.get_filename()
2688 if destroy:
2689 self.destroy()
2690- if resp == gtk.RESPONSE_OK:
2691+ if resp == Gtk.ResponseType.OK:
2692 return True, filename
2693 else:
2694 return False, None
2695
2696-class MessageBox(gtk.MessageDialog):
2697+class MessageBox(Gtk.MessageDialog):
2698 def __init__(self,
2699 window_title="",
2700 parent=None,
2701@@ -47,17 +47,17 @@
2702 self.dialog_type = dlg_type
2703
2704 if dlg_type == DialogType.DIALOG_MESSAGE:
2705- icon = gtk.MESSAGE_WARNING
2706- buttons = gtk.BUTTONS_OK
2707+ icon = Gtk.MessageType.WARNING
2708+ buttons = Gtk.ButtonsType.OK
2709 elif dlg_type == DialogType.DIALOG_INPUT:
2710- icon = gtk.MESSAGE_QUESTION
2711- buttons = gtk.BUTTONS_CANCEL
2712+ icon = Gtk.MessageType.QUESTION
2713+ buttons = Gtk.ButtonsType.CANCEL
2714 elif dlg_type == DialogType.DIALOG_CONFIRMATION:
2715- icon = gtk.MESSAGE_QUESTION
2716- buttons = gtk.BUTTONS_YES_NO
2717+ icon = Gtk.MessageType.QUESTION
2718+ buttons = Gtk.ButtonsType.YES_NO
2719
2720 super(MessageBox, self).__init__(parent,
2721- gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
2722+ Gtk.DialogFlags.MODAL | Gtk.DialogFlags.DESTROY_WITH_PARENT,
2723 icon, buttons)
2724 self.set_title(window_title)
2725 self.set_markup(text)
2726@@ -65,18 +65,18 @@
2727 if dlg_type == DialogType.DIALOG_INPUT:
2728
2729 # create a horizontal box to pack the entry and a label
2730- self.text = gtk.Entry()
2731- self.text.set_activates_default(gtk.TRUE)
2732- hbox = gtk.HBox()
2733- hbox.pack_start(gtk.Label(label_text), False, 5, 5)
2734+ self.text = Gtk.Entry()
2735+ self.text.set_activates_default(Gtk.TRUE)
2736+ hbox = Gtk.HBox()
2737+ hbox.pack_start(Gtk.Label(label_text), False, 5, 5)
2738 hbox.pack_end(self.text)
2739 self.vbox.pack_end(hbox, True, True, 0)
2740- self.ok_button = self.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
2741+ self.ok_button = self.add_button(Gtk.STOCK_OK, Gtk.ResponseType.OK)
2742 self.ok_button.grab_default()
2743
2744 self.ok_button.set_sensitive(False)
2745- self.set_alternative_button_order([gtk.RESPONSE_CANCEL, gtk.RESPONSE_OK])
2746- self.set_default_response(gtk.RESPONSE_OK)
2747+ self.set_alternative_button_order([Gtk.ResponseType.CANCEL, Gtk.ResponseType.OK])
2748+ self.set_default_response(Gtk.ResponseType.OK)
2749 self.text.connect('changed', lambda widget: self.ok_button.set_sensitive(widget.get_text_length() > 0))
2750
2751 self.show_all()
2752@@ -90,233 +90,8 @@
2753 text = self.text.get_text()
2754 if destroy:
2755 self.destroy()
2756- if resp == gtk.RESPONSE_YES or resp == gtk.RESPONSE_OK:
2757- if dialog_type == DialogType.DIALOG_INPUT:
2758- return True, text
2759- else:
2760- return True, text
2761+ if resp == Gtk.ResponseType.YES or resp == Gtk.ResponseType.OK:
2762+ return True, text
2763 else:
2764 return False, text
2765
2766-class GroupsDialog(gtk.Dialog):
2767- """XXX: add docs."""
2768-
2769- def __init__(self, title=_('Add Group...'), parent=None):
2770- super(GroupsDialog, self).__init__(title,
2771- None, (gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT |
2772- gtk.DIALOG_NO_SEPARATOR),
2773- (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL))
2774-
2775-
2776- self.set_resizable(False)
2777-
2778- if parent:
2779- self.set_transient_for(parent)
2780-
2781- self.add_group_panel = self.create_widgets()
2782- self.vbox.pack_start(self.add_group_panel, True, True, 0)
2783- self.vbox.show_all()
2784-
2785- self.ok_button = self.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
2786- self.ok_button.grab_default()
2787- self.ok_button.set_sensitive(False)
2788- self.set_alternative_button_order(
2789- [gtk.RESPONSE_CANCEL, gtk.RESPONSE_OK])
2790-
2791- self.txtName.connect('changed', self.on_change)
2792- self.txtCommand.connect('changed', self.on_change)
2793- self.cmdGRun.connect('clicked', self.open_executable)
2794-
2795- def create_widgets(self):
2796- '''
2797- this will create input widgets for our dialog
2798- without depending on glade for that and
2799- solving the file not found error report.
2800- '''
2801-
2802- frame4 = gtk.Frame()
2803- frame4.set_shadow_type(gtk.SHADOW_NONE)
2804-
2805- align = gtk.Alignment()
2806- align.set_padding(0, 0, 12, 0)
2807-
2808- table = gtk.Table(rows=4, columns=2, homogeneous=False)
2809- table.set_col_spacings(5)
2810- table.set_row_spacings(5)
2811-
2812- label8 = gtk.Label(_('Group Name:'))
2813- label8.set_alignment(0, 0.5)
2814- eventbox8 = gtk.EventBox()
2815- eventbox8.add(label8)
2816-
2817- table.attach(eventbox8,
2818- left_attach=0,
2819- right_attach=1,
2820- top_attach=0,
2821- bottom_attach=1,
2822- xoptions=gtk.FILL,
2823- yoptions=gtk.FILL,
2824- xpadding=0,
2825- ypadding=0)
2826-
2827-
2828- label5 = gtk.Label(_('Command Name:'))
2829- label5.set_alignment(0, 0.5)
2830- eventbox5 = gtk.EventBox()
2831- eventbox5.add(label5)
2832- table.attach(eventbox5,
2833- left_attach=0,
2834- right_attach=1,
2835- top_attach=1,
2836- bottom_attach=2,
2837- xoptions=gtk.FILL,
2838- yoptions=gtk.FILL,
2839- xpadding=0,
2840- ypadding=0)
2841-
2842-
2843- label6 = gtk.Label(_('Command:'))
2844- label6.set_alignment(0, 0.5)
2845- eventbox6 = gtk.EventBox()
2846- eventbox6.add(label6)
2847- table.attach(eventbox6,
2848- left_attach=0,
2849- right_attach=1,
2850- top_attach=2,
2851- bottom_attach=3,
2852- xoptions=gtk.FILL,
2853- yoptions=gtk.FILL,
2854- xpadding=0,
2855- ypadding=0)
2856-
2857- label7 = gtk.Label(_('Target Environment:'))
2858- label7.set_alignment(0, 0.5)
2859- eventbox7 = gtk.EventBox()
2860- eventbox7.add(label7)
2861- table.attach(eventbox7,
2862- left_attach=0,
2863- right_attach=1,
2864- top_attach=3,
2865- bottom_attach=4,
2866- xoptions=gtk.FILL,
2867- yoptions=gtk.FILL,
2868- xpadding=0,
2869- ypadding=0)
2870-
2871- self.txtGroup = gtk.Entry()
2872- table.attach(self.txtGroup,
2873- left_attach=1,
2874- right_attach=2,
2875- top_attach=0,
2876- bottom_attach=1,
2877- xoptions=gtk.FILL,
2878- yoptions=gtk.FILL,
2879- xpadding=0,
2880- ypadding=0)
2881-
2882- self.txtName = gtk.Entry()
2883- self.txtName.set_name('Name')
2884- table.attach(self.txtName,
2885- left_attach=1,
2886- right_attach=2,
2887- top_attach=1,
2888- bottom_attach=2,
2889- xoptions=gtk.EXPAND | gtk.FILL,
2890- #yoptions=gtk.None,
2891- xpadding=0,
2892- ypadding=0)
2893-
2894- hbox4 = gtk.HBox()
2895- self.txtCommand = gtk.Entry()
2896- self.txtCommand.set_name('Exec')
2897- self.cmdGRun = gtk.Button('...')
2898-
2899- hbox4.pack_start(self.txtCommand, expand=True, fill=True, padding=0)
2900- hbox4.pack_start(self.cmdGRun, expand=False, fill=True, padding=0)
2901-
2902- table.attach(hbox4,
2903- left_attach=1,
2904- right_attach=2,
2905- top_attach=2,
2906- bottom_attach=3,
2907- xoptions=gtk.EXPAND | gtk.FILL,
2908- yoptions=gtk.EXPAND | gtk.FILL,
2909- xpadding=0,
2910- ypadding=0)
2911-
2912- self.cmbTargetEnvironment = gtk.ComboBox()
2913- self.cmbTargetEnvironment.set_name('TargetEnvironment')
2914-
2915- self.combo_model = gtk.ListStore(TYPE_STRING)
2916- for target_key in ['Unity', 'Message Menu', 'Unity;Message Menu']:
2917- self.combo_model.append([target_key])
2918-
2919- celltitle = gtk.CellRendererText()
2920-
2921- self.cmbTargetEnvironment.pack_start(celltitle, False)
2922- self.cmbTargetEnvironment.add_attribute(celltitle, 'text', 0)
2923- self.cmbTargetEnvironment.set_model(self.combo_model)
2924- self.cmbTargetEnvironment.set_active(0)
2925-
2926- table.attach(self.cmbTargetEnvironment,
2927- left_attach=1,
2928- right_attach=2,
2929- top_attach=3,
2930- bottom_attach=4,
2931- xoptions=gtk.EXPAND | gtk.FILL,
2932- yoptions=gtk.EXPAND | gtk.FILL,
2933- xpadding=0,
2934- ypadding=0)
2935-
2936- align.add(table)
2937- frame4.add(align)
2938-
2939- return frame4
2940-
2941- def populate(self, values):
2942- try:
2943- self.txtGroup.set_text(values['GroupName'])
2944- self.txtGroup.set_sensitive(False)
2945- self.txtName.set_text(values['Name'])
2946- self.txtCommand.set_text(values['Exec'])
2947- except:
2948- pass
2949- try:
2950- for n in range(len(self.combo_model)):
2951- if self.combo_model[n][0] == values['TargetEnvironment']:
2952- self.cmbTargetEnvironment.set_active(n)
2953- except:
2954- pass
2955-
2956- def run(self, destroy=True):
2957- """Returns True if yes was clicked, False otherwise."""
2958- resp = super(GroupsDialog, self).run()
2959- obj = None
2960- if resp == gtk.RESPONSE_OK:
2961- obj = {'GroupName': self.txtGroup.get_text(),
2962- 'Name': self.txtName.get_text(),
2963- 'Exec': self.txtCommand.get_text(),
2964- 'TargetEnvironment': (
2965- self.cmbTargetEnvironment.get_active_text()),
2966- }
2967- print obj
2968- if destroy:
2969- self.destroy()
2970- if resp == gtk.RESPONSE_OK:
2971- return True, obj
2972- else:
2973- return False, None
2974-
2975- def on_change(self, widget):
2976- if (self.txtName.get_text_length() == 0 or
2977- self.txtCommand.get_text_length() == 0):
2978- self.ok_button.set_sensitive(False)
2979- else:
2980- self.ok_button.set_sensitive(True)
2981-
2982- def open_executable(self, widget):
2983- dialog = FileChooser()
2984- response, filename = dialog.run()
2985- if response:
2986- self.txtCommand.set_text(filename)
2987-
2988
2989=== modified file 'unitylaunchereditor/dialogs/launcherdialog.py'
2990--- unitylaunchereditor/dialogs/launcherdialog.py 2011-06-13 20:08:40 +0000
2991+++ unitylaunchereditor/dialogs/launcherdialog.py 2011-11-28 17:31:26 +0000
2992@@ -15,14 +15,14 @@
2993 # GNU General Public License for more details.
2994 #
2995 #####################################################################
2996-import gobject
2997-import gtk
2998-from pango import ELLIPSIZE_END
2999+from gi.repository import GObject
3000+from gi.repository import Gtk
3001+from gi.repository import Gdk
3002 from unitylaunchereditor.core.translation import _
3003 from unitylaunchereditor.core.constants import TITLES, DESCRIPTION
3004 from unitylaunchereditor.addassistant import PageFromSystem, PageFromFile, PageFromInfo
3005 from unitylaunchereditor.widgets.launcherinfo import LauncherInfo
3006-from unitylaunchereditor.widgets.dialogheader import HeaderBoxButton, DialogHeader
3007+from unitylaunchereditor.widgets.dialogheader import DialogHeader
3008 from unitylaunchereditor.core.log import Logger
3009 from unitylaunchereditor.core.utils import normalize_path, nullstring
3010 from unitylaunchereditor.dialogs.dialogs import MessageBox
3011@@ -30,16 +30,16 @@
3012
3013 log = Logger()
3014
3015-class AddLauncherDialog(gtk.Window):
3016+class AddLauncherDialog(Gtk.Window):
3017
3018 def __init__(self, parent = None):
3019- super(AddLauncherDialog, self).__init__()
3020+ Gtk.Window.__init__(self)
3021 self.parent_module = parent
3022 if parent:
3023 self.set_transient_for(parent)
3024
3025 self.set_modal(True)
3026- self.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG)
3027+ self.set_type_hint(Gdk.WindowTypeHint.DIALOG)
3028 self.set_resizable(False)
3029 self.set_default_size(650, 450)
3030 self.set_size_request(650, 450)
3031@@ -47,39 +47,37 @@
3032 self.set_title(_('Add Launcher...'))
3033
3034 #header controls
3035- self.label_box = HeaderBoxButton(TITLES[0])
3036+ self.label_box = DialogHeader(TITLES[0])
3037 self.label_box.set_description(DESCRIPTION[0])
3038
3039 #this will hold pages for each option
3040- notebook= gtk.Notebook()
3041- notebook.set_border_width(0)
3042- notebook.set_show_border(False)
3043- notebook.set_show_tabs(False)
3044+ notebook = Gtk.Notebook()
3045+ notebook.set_size_request(650, 350)
3046
3047- fra=PageFromSystem()
3048+ fra = PageFromSystem()
3049 fra.connect('add-clicked', self.__on_add_clicked)
3050- notebook.append_page(fra)
3051+ notebook.append_page(fra, Gtk.Label(_('From System')))
3052
3053 pfile = PageFromFile()
3054 pfile.connect('add-clicked', self.__on_newfile_clicked)
3055- notebook.append_page(pfile)
3056+ notebook.append_page(pfile, Gtk.Label(_('From File')))
3057
3058- pnew=PageFromInfo()
3059+ pnew = PageFromInfo()
3060 pnew.connect('add-clicked', self.__on_new_frominfo_clicked)
3061
3062- notebook.append_page(pnew)
3063+ notebook.append_page(pnew, Gtk.Label(_('Custom')))
3064 #----
3065- bottom_box = gtk.HButtonBox()
3066- bottom_box.set_layout(gtk.BUTTONBOX_END)
3067+ bottom_box = Gtk.HButtonBox()
3068+ bottom_box.set_layout(Gtk.ButtonBoxStyle.END)
3069 bottom_box.set_border_width(6)
3070- close_button = gtk.Button(stock=gtk.STOCK_CLOSE)
3071- bottom_box.pack_start(close_button, fill=True, expand=False)
3072+ close_button = Gtk.Button(stock=Gtk.STOCK_CLOSE)
3073+ bottom_box.pack_start(close_button, True, False, 0)
3074
3075- self.label_box.add_start(notebook, True,True,0)
3076- self.label_box.add_start(gtk.HSeparator(), fill=True, expand=False)
3077+ self.label_box.add_start(notebook, True, True, 0)
3078+ self.label_box.add_start(Gtk.HSeparator(), fill=True, expand=False)
3079 self.label_box.add_end(bottom_box, fill=True, expand=False)
3080
3081- self.label_box.connect('button-clicked', self.change_page, notebook.set_current_page)
3082+ notebook.connect('switch-page', self.change_page)
3083 close_button.connect('clicked', lambda w: self.hide())
3084 self.add(self.label_box)
3085 self.label_box.set_icon('gtk-execute')
3086@@ -104,45 +102,42 @@
3087 if not new_item:
3088 MessageBox('Erro',self.parent_module,action_text=_("Erro inserting item."),message=_("Item already exists in the list.") ).run()
3089
3090- def change_page(self, widget,id, show_page):
3091+ def change_page(self, widget, page, id):
3092 #TODO: use our own icons
3093 icon_names={0:'gtk-execute', 1: 'gtk-file',2:'gtk-about'}
3094
3095- show_page(id)
3096-
3097 self.label_box.set_title(TITLES[id])
3098 self.label_box.set_description(DESCRIPTION[id])
3099 self.label_box.set_icon(icon_names[id])
3100
3101-class EditLauncherDialog(gtk.Dialog):
3102+class EditLauncherDialog(Gtk.Dialog):
3103 """XXX: add docs."""
3104 def __init__(self, title=_('Edit Launcher...'), parent=None):
3105-
3106- super(EditLauncherDialog, self).__init__(title,
3107- None, (gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT),
3108- (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL))
3109+ Gtk.Dialog.__init__(self, title,
3110+ None, (Gtk.DialogFlags.MODAL | Gtk.DialogFlags.DESTROY_WITH_PARENT),
3111+ (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL))
3112
3113 self.set_modal(True)
3114- self.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG)
3115+ self.set_type_hint(Gdk.WindowTypeHint.DIALOG)
3116 self.set_resizable(False)
3117
3118 if parent:
3119 self.set_transient_for(parent)
3120
3121- self.ok_button = self.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
3122+ self.ok_button = self.add_button(Gtk.STOCK_OK, Gtk.ResponseType.OK)
3123 self.ok_button.grab_default()
3124 self.ok_button.set_sensitive(False)
3125- self.set_alternative_button_order([gtk.RESPONSE_CANCEL, gtk.RESPONSE_OK])
3126+# self.set_alternative_button_order(Gtk.ResponseType.CANCEL, Gtk.ResponseType.OK)
3127 #header controls
3128 self.label_box = DialogHeader(_('Edit Launcher'))
3129 self.label_box.set_description(_('Fill the fields below with your Launcher information.'))
3130- self.label_box.set_icon(gtk.STOCK_EDIT)
3131- self.label_box.add_start(gtk.HSeparator(), expand=False)
3132+ self.label_box.set_icon(Gtk.STOCK_EDIT)
3133+ self.label_box.add_start(Gtk.HSeparator(), expand=False)
3134
3135 self.launcher = LauncherInfo()
3136 self.label_box.add_start(self.launcher)
3137 self.launcher.connect('field-changed', self._on_change)
3138- self.label_box.add_start(gtk.HSeparator(), expand=False)
3139+ self.label_box.add_start(Gtk.HSeparator(), expand=False)
3140 self.vbox.pack_start(self.label_box, True, True, 0)
3141 self.vbox.show_all()
3142
3143@@ -175,14 +170,14 @@
3144 """Returns True if yes was clicked, False otherwise."""
3145 resp = super(EditLauncherDialog, self).run()
3146 obj = None
3147- if resp == gtk.RESPONSE_OK:
3148+ if resp == Gtk.ResponseType.OK:
3149 obj = {'Name': self.launcher.launcher_name}
3150 obj['Exec']= self.launcher.launcher_command
3151 obj['Comment'] = self.launcher.launcher_comment
3152 obj['Icon'] = self.launcher.launcher_icon_name
3153 if destroy:
3154 self.destroy()
3155- if resp == gtk.RESPONSE_OK:
3156+ if resp == Gtk.ResponseType.OK:
3157 return True, obj
3158 else:
3159- return False, None
3160\ No newline at end of file
3161+ return False, None
3162
3163=== modified file 'unitylaunchereditor/dialogs/quicklistdialog.py'
3164--- unitylaunchereditor/dialogs/quicklistdialog.py 2011-06-13 20:08:40 +0000
3165+++ unitylaunchereditor/dialogs/quicklistdialog.py 2011-11-28 17:31:26 +0000
3166@@ -15,10 +15,10 @@
3167 # GNU General Public License for more details.
3168 #
3169 #####################################################################
3170-import gobject
3171-import gtk
3172+from gi.repository import GObject
3173+from gi.repository import Gtk
3174 from unitylaunchereditor.widgets.groupinfo import GroupInfo
3175-from unitylaunchereditor.widgets.dialogheader import HeaderBoxButton, DialogHeader
3176+from unitylaunchereditor.widgets.dialogheader import DialogHeader
3177 from unitylaunchereditor.core.log import Logger
3178 from unitylaunchereditor.core.utils import nullstring
3179 from unitylaunchereditor.dialogs.dialogs import MessageBox
3180@@ -26,13 +26,13 @@
3181
3182 log = Logger()
3183
3184-class QuicklistDialog(gtk.Dialog):
3185+class QuicklistDialog(Gtk.Dialog):
3186 """XXX: add docs."""
3187 def __init__(self, title=_('Edit Launcher...'), parent=None):
3188
3189- super(QuicklistDialog, self).__init__(title,
3190- None, (gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT),
3191- (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL))
3192+ Gtk.Dialog.__init__(self, title,
3193+ None, (Gtk.DialogFlags.MODAL | Gtk.DialogFlags.DESTROY_WITH_PARENT),
3194+ (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL))
3195
3196 self.set_modal(True)
3197 self.set_resizable(False)
3198@@ -42,20 +42,20 @@
3199 if parent:
3200 self.set_transient_for(parent)
3201
3202- self.ok_button = self.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
3203+ self.ok_button = self.add_button(Gtk.STOCK_OK, Gtk.ResponseType.OK)
3204 self.ok_button.grab_default()
3205 self.ok_button.set_sensitive(False)
3206- self.set_alternative_button_order([gtk.RESPONSE_CANCEL, gtk.RESPONSE_OK])
3207+# self.set_alternative_button_order(Gtk.ResponseType.CANCEL, Gtk.ResponseType.OK, -1)
3208 #header controls
3209 self.label_box = DialogHeader(_('Add quicklist group'))
3210 self.label_box.set_description(_('Fill the fields below with your quicklist group information.'))
3211- self.label_box.set_icon(gtk.STOCK_EDIT)
3212- self.label_box.add_start(gtk.HSeparator(), expand=False)
3213+ self.label_box.set_icon(Gtk.STOCK_EDIT)
3214+ self.label_box.add_start(Gtk.HSeparator(), expand=False)
3215
3216 self.groupinfo = GroupInfo()
3217 self.label_box.add_start(self.groupinfo)
3218 self.groupinfo.connect('field-changed', self._on_change)
3219- self.label_box.add_start(gtk.HSeparator(), expand=False)
3220+ self.label_box.add_start(Gtk.HSeparator(), expand=False)
3221 self.vbox.pack_start(self.label_box, True, True, 0)
3222 self.vbox.show_all()
3223
3224@@ -90,7 +90,7 @@
3225 """Returns True if yes was clicked, False otherwise."""
3226 resp = super(QuicklistDialog, self).run()
3227 obj = None
3228- if resp == gtk.RESPONSE_OK:
3229+ if resp == Gtk.ResponseType.OK:
3230 obj = {'GroupName':self.groupinfo.quicklist_group_name}
3231 obj['Name']= self.groupinfo.quicklist_name
3232 obj['Exec']= self.groupinfo.quicklist_command
3233@@ -98,7 +98,7 @@
3234 obj['Visible'] = self.groupinfo.chkVisible.get_active()
3235 if destroy:
3236 self.destroy()
3237- if resp == gtk.RESPONSE_OK:
3238+ if resp == Gtk.ResponseType.OK:
3239 return True, obj
3240 else:
3241- return False, None
3242\ No newline at end of file
3243+ return False, None
3244
3245=== removed directory 'unitylaunchereditor/locale'
3246=== removed directory 'unitylaunchereditor/locale/en'
3247=== removed directory 'unitylaunchereditor/locale/pt_BR'
3248=== removed file 'unitylaunchereditor/locale/unity-launcher-editor.pot'
3249--- unitylaunchereditor/locale/unity-launcher-editor.pot 2011-05-15 03:37:51 +0000
3250+++ unitylaunchereditor/locale/unity-launcher-editor.pot 1970-01-01 00:00:00 +0000
3251@@ -1,79 +0,0 @@
3252-# SOME DESCRIPTIVE TITLE.
3253-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3254-# This file is distributed under the same license as the PACKAGE package.
3255-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
3256-#
3257-#, fuzzy
3258-msgid ""
3259-msgstr ""
3260-"Project-Id-Version: PACKAGE VERSION\n"
3261-"Report-Msgid-Bugs-To: \n"
3262-"POT-Creation-Date: 2011-05-15 00:23-0300\n"
3263-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
3264-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
3265-"Language-Team: LANGUAGE <LL@li.org>\n"
3266-"Language: \n"
3267-"MIME-Version: 1.0\n"
3268-"Content-Type: text/plain; charset=CHARSET\n"
3269-"Content-Transfer-Encoding: 8bit\n"
3270-
3271-#: groupsdialog.py:29
3272-msgid "Add Group..."
3273-msgstr ""
3274-
3275-#: groupsdialog.py:41 mainwindow.py:48
3276-#, python-format
3277-msgid "Critical: couldn't find glade file: %s"
3278-msgstr ""
3279-
3280-#: mainwindow.py:141
3281-msgid "Save"
3282-msgstr ""
3283-
3284-#: mainwindow.py:142
3285-msgid "Save changes"
3286-msgstr ""
3287-
3288-#: mainwindow.py:143
3289-msgid "Do you want to save your changes?"
3290-msgstr ""
3291-
3292-#: mainwindow.py:226 mainwindow.py:276 mainwindow.py:287
3293-msgid "Remove"
3294-msgstr ""
3295-
3296-#: mainwindow.py:227
3297-msgid "Remove Group"
3298-msgstr ""
3299-
3300-#: mainwindow.py:228
3301-msgid "You are about to remove a Quick List Group, are you sure?"
3302-msgstr ""
3303-
3304-#: mainwindow.py:277 mainwindow.py:288
3305-msgid "Remove Launcher"
3306-msgstr ""
3307-
3308-#: mainwindow.py:278
3309-msgid "You are about to remove a Launcher item, are you sure?"
3310-msgstr ""
3311-
3312-#: mainwindow.py:289
3313-msgid "No launcher selected"
3314-msgstr ""
3315-
3316-#: mainwindow.py:298
3317-msgid "Add Launcher"
3318-msgstr ""
3319-
3320-#: mainwindow.py:299
3321-msgid "Add a new launcher..."
3322-msgstr ""
3323-
3324-#: mainwindow.py:300
3325-msgid "Type a launcher name to create a new launcher."
3326-msgstr ""
3327-
3328-#: mainwindow.py:302
3329-msgid "Name:"
3330-msgstr ""
3331
3332=== removed file 'unitylaunchereditor/mainwindow.py'
3333--- unitylaunchereditor/mainwindow.py 2011-06-07 15:07:14 +0000
3334+++ unitylaunchereditor/mainwindow.py 1970-01-01 00:00:00 +0000
3335@@ -1,440 +0,0 @@
3336-# -*- coding: utf-8 -*-
3337-#####################################################################
3338-# Laudeci Oliveira <laudeci@ubuntu.com>
3339-# Ursula Junque <ursinha@ubuntu.com>
3340-#
3341-# Copyright 2011 unity-launcher-editor-dev.
3342-#
3343-# This program is free software; you can redistribute it and/or modify
3344-# it under the terms of the GNU General Public License as published
3345-# by the Free Software Foundation; version 3 only.
3346-#
3347-# This program is distributed in the hope that it will be useful,
3348-# but WITHOUT ANY WARRANTY; without even the implied warranty of
3349-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3350-# GNU General Public License for more details.
3351-#
3352-#####################################################################
3353-
3354-import gtk
3355-from gtk.gdk import Pixbuf
3356-import gobject
3357-from gobject import TYPE_STRING
3358-from os.path import basename, exists, expanduser, join
3359-from pkg_resources import resource_filename
3360-from gio import FileIcon, ThemedIcon,File
3361-from unitylaunchereditor.core.desktop import DesktopParser
3362-from unitylaunchereditor.core.iconmanager import IconManager,IMAGE_SIZE
3363-from unitylaunchereditor.core.translation import _, LOCALE
3364-from unitylaunchereditor.dialogs.dialogs import DialogType
3365-from unitylaunchereditor.dialogs.dialogs import FileChooser, MessageBox, GroupsDialog
3366-from unitylaunchereditor.widgets.launcherview import LauncherView
3367-from unitylaunchereditor.widgets.grouptree import GroupTree
3368-from unitylaunchereditor.core.utils import nullstring
3369-from unitylaunchereditor.core import iconmanager
3370-from unitylaunchereditor.dialogs.launcheradd import HeaderBase
3371-
3372-
3373-#constantes for toolbar buttons
3374-(TOOLBUTTON_ADD,
3375-TOOLBUTTON_EDIT,
3376-TOOLBUTTON_REMOVE) = range(3)
3377-
3378-class MainWindow(object):
3379-
3380- builder = gtk.Builder()
3381-
3382- def __init__(self, controller=None, glade_file="application.glade"):
3383- self.controller = controller
3384- glade_path = resource_filename(__name__, join("data", glade_file))
3385- try:
3386- self.builder.add_from_file(glade_path)
3387- except gobject.GError:
3388- if not exists(glade_path):
3389- print _("Critical: couldn't find glade file: %s") % glade_path
3390- raise
3391- except Exception, exc:
3392- print ("Something else went wrong: %s") % exc
3393- raise
3394-
3395- window_name = "window1"
3396- self.window = self.builder.get_object(window_name)
3397-
3398- header = gtk.EventBox()
3399- header.set_visible_window(True)
3400- header.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color('#3c3b37'))
3401-
3402- self.header = HeaderBase()
3403- header.add(self.header)
3404- self.header.set_title('Teessste')
3405- self.header.set_description('')
3406- img=gtk.Image()
3407- img.set_from_file(resource_filename(__name__, join("data", 'plugin-unityshell.png')))
3408- self.header.set_icon(img.get_pixbuf())
3409- self.builder.get_object('vbox1').pack_start(header,False,False)
3410- self.builder.get_object('vbox1').reorder_child(header,0)
3411- self.window.show_all()
3412- # launcher Objects
3413- self.list_container = self.builder.get_object('list_container')
3414- self.listview_launcher = LauncherView()
3415- self.list_container.add_with_viewport(self.listview_launcher)
3416- # groups objects
3417- self.group_container = self.builder.get_object('group_container')
3418- self.tvwGroups = GroupTree()
3419- self.group_container.add_with_viewport(self.tvwGroups)
3420-
3421- # info Widgets
3422- self.imgIcon = self.builder.get_object('imgIcon')
3423- self.txtName = self.builder.get_object('txtName')
3424- self.txtName.set_name('Name')
3425- self.txtComment = self.builder.get_object('txtComment')
3426- self.txtComment.set_name('Comment')
3427- self.txtCommand = self.builder.get_object('txtCommand')
3428- self.txtCommand.set_name('Exec')
3429-
3430- self.chkTerminal = self.builder.get_object('chkTerminal')
3431- self.chkTerminal.set_name('Terminal')
3432-
3433- # button widgets
3434- self.cmdIcon = self.builder.get_object('cmdIcon')
3435- self.cmdSave = self.builder.get_object('cmdSave')
3436-
3437- #toolbar widgets
3438- self.btnRemove = self.builder.get_object('btnRemove')
3439- self.btnEdit = self.builder.get_object('btnEdit')
3440-
3441- # set signals
3442- self.setup_signals()
3443-
3444- def setup_signals(self):
3445- # window close
3446- self.window.connect('delete-event', gtk.main_quit)
3447-
3448- #buttons event
3449- self.builder.get_object('cmdClose').connect('clicked', gtk.main_quit)
3450- self.builder.get_object('cmdAdd').connect('clicked', self.add_new_launcher)
3451- self.cmdSave.connect('clicked', self.save_launchers)
3452- self.builder.get_object('cmdRemove').connect('clicked', self.remove_from_launcher)
3453- self.cmdIcon.connect('clicked', self.load_icon_from_file)
3454- self.builder.get_object('cmdRun').connect('clicked', self.open_executable)
3455- self.chkTerminal.connect('toggled', self.chk_toggle)
3456-
3457- #editable events
3458- self.txtName.connect('focus-out-event', self.on_txt_focus_out)
3459- self.txtComment.connect('focus-out-event', self.on_txt_focus_out)
3460- self.txtCommand.connect('focus-out-event', self.on_txt_focus_out)
3461-
3462- #list group signals
3463- self.tvwGroups.connect('selection-changed', self.on_tvwgroups_row_change)
3464-
3465- #group signals
3466- self.builder.get_object('btnAdd').connect('clicked', self.add_remove_group, TOOLBUTTON_ADD)
3467- self.btnRemove.connect('clicked', self.add_remove_group, TOOLBUTTON_REMOVE)
3468- self.btnEdit.connect('clicked', self.add_remove_group, TOOLBUTTON_EDIT)
3469-
3470- def show(self):
3471- self.window.show_all()
3472-
3473- def normalize_path(self, str_path):
3474- file_name = basename(str_path)
3475- str_path = '%s/.local/share/applications/%s' % (expanduser('~'),
3476- file_name)
3477- return str_path
3478-
3479- def load_launcher_from_list(self, unity_items):
3480- self.listview_launcher.clear_list();
3481- for menu_item in unity_items:
3482- obj=DesktopParser(menu_item)
3483- sname = obj.get('Name')
3484- desc = obj.get('Comment')
3485- icon = obj.get('Icon')
3486- pix = IconManager().get_icon(ThemedIcon('image-missing'),IMAGE_SIZE)
3487- if icon:
3488- if icon.rfind('.') != -1:
3489- pix = IconManager().get_icon(FileIcon(File(icon)),IMAGE_SIZE)
3490- else:
3491- pix = IconManager().get_icon(ThemedIcon(icon),IMAGE_SIZE)
3492- data = (pix, '%s' % sname, obj, sname.upper(), menu_item)
3493- self.listview_launcher.add_row(data)
3494-
3495- self.listview_launcher.connect('selection-changed', self.listview_launcher_row_change)
3496- #make first row active
3497- self.listview_launcher.set_cursor((0,))
3498-
3499- def save_launchers(self, widget):
3500- dialog = MessageBox(self.window,
3501- window_title=_('Save'),
3502- action_text=_('Save changes'),
3503- message=_('Do you want to save your changes?'),
3504- dlg_type=DialogType.DIALOG_CONFIRMATION,
3505- label_text=None
3506- )
3507- result, text = dialog.run()
3508- if result:
3509- launchers = []
3510- for row in self.listview_launcher.get_rows():
3511- file_path = self.normalize_path(row["path"])
3512- fli = open(file_path, 'w')
3513-
3514- obj = row["obj"]
3515- obj.write(fli)
3516- fli.close()
3517- launchers.append(file_path)
3518-
3519- if self.controller:
3520- self.controller.save_unity_list(launchers)
3521- MessageBox(self.window,
3522- window_title=_('Information'),
3523- action_text=_('Changes saved'),
3524- message=_('Your changes were successfuly saved.\n\n To apply the changes to your launcher you will need to <b>logout</b> and login again.'),
3525- dlg_type=DialogType.DIALOG_MESSAGE,
3526- label_text=None
3527- ).run()
3528- else:
3529- MessageBox(self.window,
3530- window_title=_('Error'),
3531- action_text=_('Changes not saved'),
3532- message=_("There's a problem with your application, \n controller not found."),
3533- dlg_type=DialogType.DIALOG_MESSAGE,
3534- label_text=None
3535- ).run()
3536-
3537-
3538- def chk_toggle(self, widget):
3539- # only run when gaving the focus
3540- # this will prevent execution when setting the value by code.
3541-
3542- if widget.is_focus():
3543- objDesktop = self.listview_launcher.get_selected_desktop()
3544- value = widget.get_active()
3545- option = widget.get_name()
3546- objDesktop.set(option, value)
3547-
3548- def on_txt_focus_out(self, widget, event):
3549- ilength = 0
3550- if isinstance(widget, gtk.TextView):
3551- buffer = widget.get_buffer()
3552- value = buffer.get_text(buffer.get_start_iter(),
3553- buffer.get_end_iter())
3554- ilength = len(value)
3555- else:
3556- ilength = widget.get_text_length()
3557- value = widget.get_text()
3558-
3559- if ilength > 0:
3560- objDesktop = self.listview_launcher.get_selected_desktop()
3561- option = widget.get_name()
3562- objDesktop.set(option, value)
3563- if option == 'Name' or option == 'Comment':
3564- sname = objDesktop.get('Name')
3565- desc = objDesktop.get('Comment')
3566- self.listview_launcher.set_value('<b>%s</b>\n%s' % (sname, desc), self.listview_launcher.COLUMN_NAME)
3567-
3568- def add_remove_group(self, widget, operation):
3569-
3570- objDesktop = self.listview_launcher.get_selected_desktop()
3571-
3572- if operation == TOOLBUTTON_ADD:
3573- #TODO : update ayatana entry
3574-
3575- dialog = GroupsDialog(parent=self.window)
3576- result, group = dialog.run()
3577- if result:
3578- root = self.tvwGroups.add_root(group['GroupName'])
3579-
3580- shortcut_group_name = "%s Shortcut Group" % group['GroupName']
3581- self.tvwGroups.add_root_row(root, 'Name', group['Name'])
3582- self.tvwGroups.add_root_row(root, 'Exec', group['Exec'])
3583- self.tvwGroups.add_root_row(root, 'TargetEnvironment', group['TargetEnvironment'])
3584-
3585- items = objDesktop.get('X-Ayatana-Desktop-Shortcuts')
3586- if items is None:
3587- items = []
3588- else:
3589- items = [n for n in items if n != '']
3590- items.append(group['GroupName'])
3591- objDesktop.set('X-Ayatana-Desktop-Shortcuts', items)
3592-
3593- objDesktop.append_section(shortcut_group_name)
3594- objDesktop.set('Name', group['Name'] , None, shortcut_group_name)
3595- objDesktop.set('Exec', group['Exec'] , None, shortcut_group_name)
3596- objDesktop.set('TargetEnvironment', group['TargetEnvironment'] , None, shortcut_group_name)
3597- self.tvwGroups.expand(root, True)
3598-
3599-
3600-
3601- elif operation == TOOLBUTTON_REMOVE:
3602- dialog = MessageBox(self.window,
3603- window_title=_('Remove') ,
3604- action_text=_('Remove Group'),
3605- message=_('You are about to remove a Quick List Group, are you sure?'),
3606- dlg_type=DialogType.DIALOG_CONFIRMATION,
3607- label_text=None
3608- )
3609- result = dialog.run()
3610-
3611- if result[0]:
3612- root_iter = self.tvwGroups.get_selected_root()
3613- group = self.tvwGroups.get_root_text()
3614- shortcut_group_name = "%s Shortcut Group" % group
3615-
3616- self.tvwGroups.remove_root(root_iter)
3617-
3618- items = objDesktop.get('X-Ayatana-Desktop-Shortcuts')
3619- items.remove(group)
3620- groups = [x for x in items if x != '']
3621- objDesktop.remove_sections(shortcut_group_name)
3622- objDesktop.set('X-Ayatana-Desktop-Shortcuts', groups)
3623-
3624- elif operation == TOOLBUTTON_EDIT:
3625- root_iter = self.tvwGroups.get_selected_root()
3626-
3627- root_text = self.tvwGroups.get_root_text()
3628-
3629- shortcut_group_name = "%s Shortcut Group" % root_text
3630-
3631- items = self.tvwGroups.get_children_values(root_iter)
3632-
3633- dialog = GroupsDialog(parent=self.window)
3634- dialog.populate(items)
3635- result, group = dialog.run()
3636-
3637- if result:
3638- self.tvwGroups.set_child_value(root_iter, 0, group['Name'])
3639- self.tvwGroups.set_child_value(root_iter, 1, group['Exec'])
3640- self.tvwGroups.set_child_value(root_iter, 2, group['TargetEnvironment'])
3641-
3642- objDesktop.set('Name', group['Name'] , LOCALE, shortcut_group_name)
3643- objDesktop.set('Exec', group['Exec'] ,LOCALE, shortcut_group_name)
3644- objDesktop.set('TargetEnvironment', group['TargetEnvironment'] , LOCALE, shortcut_group_name)
3645-
3646-
3647-
3648- def remove_from_launcher(self, widget):
3649- """Signal handler for button to remoce an item from the Launcher List"""
3650-
3651- if self.listview_launcher.is_selected:
3652- dialog = MessageBox(window_title=_('Remove') ,
3653- parent=self.window,
3654- action_text=_('Remove Launcher'),
3655- message=_('You are about to remove a Launcher item, are you sure?'),
3656- dlg_type=DialogType.DIALOG_CONFIRMATION,
3657- label_text=None
3658- )
3659- result, text = dialog.run()
3660- if result:
3661- self.listview_launcher.remove_current_row()
3662-
3663- else:
3664- MessageBox(self.window, window_title=_('Remove') ,
3665- action_text=_('Remove Launcher'),
3666- message=_('No launcher selected'),
3667- dlg_type=DialogType.DIALOG_CONFIRMATION,
3668- label_text=None
3669- ).run()
3670-
3671- def add_new_launcher(self, widget):
3672- """Signal handler for button to add a new item into the Launcher List"""
3673-
3674- dialog = MessageBox(self.window,
3675- window_title=_('Add Launcher') ,
3676- action_text=_('Add a new launcher...') ,
3677- message=_('Type a launcher name to create a new launcher.'),
3678- dlg_type=DialogType.DIALOG_INPUT,
3679- label_text=_('Name:')
3680- )
3681-
3682- result, text = dialog.run()
3683-
3684- if result and len(text) > 0:
3685- desktop_parser = DesktopParser()
3686- desktop_parser.set('Name', text)
3687- desktop_parser.set('Terminal', False)
3688- desktop_parser.set('Icon', 'wft')
3689- path_name = join(expanduser('~/.local/share/applications/'),
3690- '%s.desktop' % text)
3691- row_iter = self.listview_launcher.add_row(path_name, True, desktop_parser)
3692- return row_iter
3693-
3694- def open_executable(self, widget):
3695- dialog = FileChooser()
3696- response, filename = dialog.run()
3697- if response:
3698- self.txtCommand.set_text(filename)
3699- objDesktop = self.listview_launcher.get_selected_desktop()
3700- objDesktop.set(self.txtCommand.get_name(), filename)
3701-
3702-
3703- def load_icon_from_file(self, widget):
3704- # XXX: Here maybe we could make a list with all mimetypes and patterns
3705- # somewhere else and just iterate over them here.
3706- filter = gtk.FileFilter()
3707- filter.set_name("Images")
3708- filter.add_mime_type("image/png")
3709- filter.add_mime_type("image/jpeg")
3710- filter.add_mime_type("image/gif")
3711- filter.add_mime_type("image/svg+xml")
3712- filter.add_pattern("*.png")
3713- filter.add_pattern("*.jpg")
3714- filter.add_pattern("*.gif")
3715- filter.add_pattern("*.tif")
3716- filter.add_pattern("*.xpm")
3717- filter.add_pattern("*.svg")
3718-
3719- dialog = FileChooser(filters=filter)
3720- response, filename = dialog.run()
3721- if response:
3722- pixbuf = get_icon(filename)
3723- self.imgIcon.set_from_pixbuf(pixbuf)
3724- # TODO: add code to write changes here
3725- # the best way is to put an apply button?
3726- objDesktop = self.listview_launcher.get_selected_desktop()
3727- objDesktop.set('Icon', filename)
3728- self.listview_launcher.set_value(pixbuf, self.listview_launcher.COLUMN_ICON)
3729-
3730- def listview_launcher_row_change(self, widget, model, row_iter, objDesktop):
3731-
3732- #disable groups toobar buttons
3733- self.btnEdit.set_sensitive(False)
3734- self.btnRemove.set_sensitive(False)
3735-
3736- # show properties
3737- self.imgIcon.set_from_pixbuf(widget.get_selected_icon())
3738-
3739- self.txtName.set_text(nullstring(objDesktop.get('Name', locale = LOCALE)))
3740- self.txtComment.get_buffer().set_text(
3741- nullstring(objDesktop.get('Comment', locale = LOCALE)))
3742- self.txtCommand.set_text(nullstring(objDesktop.get('Exec')))
3743-
3744- checked = objDesktop.get('Terminal')
3745- if not checked:
3746- checked = False
3747-
3748- self.chkTerminal.set_active(checked)
3749- items = [item.replace(' Shortcut Group','') for item in objDesktop._sections]
3750- #items = objDesktop.get('X-Ayatana-Desktop-Shortcuts')
3751- items.remove('Desktop Entry')
3752- self.tvwGroups.clear()
3753-
3754- if items:
3755- if isinstance(items, str):
3756- items = [items]
3757-
3758- for group in items:
3759- if group != '':
3760- root = self.tvwGroups.add_root(group)
3761- for key in ('Name', 'Exec', 'TargetEnvironment'):
3762- value = objDesktop.get(key, "%s Shortcut Group" % group, locale = LOCALE )
3763- if value:
3764- self.tvwGroups.add_root_row(root, key, value)
3765- self.tvwGroups.expand_all()
3766-
3767-
3768- def on_tvwgroups_row_change(self, widget, root_iter):
3769- if root_iter:
3770- self.btnEdit.set_sensitive(True)
3771- self.btnRemove.set_sensitive(True)
3772- else:
3773- self.btnEdit.set_sensitive(True)
3774- self.btnRemove.set_sensitive(True)
3775-
3776
3777=== removed file 'unitylaunchereditor/newlauncher.py'
3778--- unitylaunchereditor/newlauncher.py 2011-05-26 11:04:59 +0000
3779+++ unitylaunchereditor/newlauncher.py 1970-01-01 00:00:00 +0000
3780@@ -1,267 +0,0 @@
3781-# -*- coding: utf-8 -*-
3782-#####################################################################
3783-# Laudeci Oliveira <laudeci@ubuntu.com>
3784-# Ursula Junques <ursinha@ubuntu.com>
3785-#
3786-# Copyright 2011 unity-launcher-editor-dev.
3787-#
3788-# This program is free software; you can redistribute it and/or modify
3789-# it under the terms of the GNU General Public License as published
3790-# by the Free Software Foundation; version 3 only.
3791-#
3792-# This program is distributed in the hope that it will be useful,
3793-# but WITHOUT ANY WARRANTY; without even the implied warranty of
3794-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3795-# GNU General Public License for more details.
3796-#
3797-#####################################################################
3798-
3799-import gtk
3800-import gobject
3801-import glob
3802-import pango
3803-from desktop import DesktopParser
3804-from os.path import exists, expanduser, isdir, isfile, join
3805-from xdg import BaseDirectory
3806-from pkg_resources import resource_filename
3807-from utils import DialogType, FileChooser, get_icon, MessageBox, nullstring
3808-# Constants for column mapping
3809-(COLUMN_ICON,
3810- COLUMN_NAME,
3811- COLUMN_DESKTOP,
3812- COLUMN_PATH,
3813- COLUMN_COMMENT,
3814- COLUMN_SORT) = range(6)
3815-
3816-class AddLauncherDialog(gtk.Dialog):
3817- """XXX: add docs."""
3818- def __init__(self, title='Add Launcher...'):
3819- super(AddLauncherDialog, self).__init__(title,
3820- None, (gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT |
3821- gtk.DIALOG_NO_SEPARATOR),
3822- (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL))
3823-
3824- glade_file = "application.glade"
3825- self.builder = gtk.Builder()
3826- glade_path = resource_filename(__name__, join("data", glade_file))
3827- #glade_path = join(expanduser("~/Desktop/unity-launcher-editor/data"), glade_file)
3828- if not exists(glade_path):
3829- raise Exception("Critical: couldn't find glade file: %s" % glade_path)
3830- self.builder.add_from_file(glade_path)
3831- self.add_panel = self.builder.get_object('add_new_laucher_box')
3832-
3833- self.ok_button = self.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
3834- self.ok_button.grab_default()
3835- self.ok_button.set_sensitive(False)
3836- self.set_alternative_button_order(
3837- [gtk.RESPONSE_CANCEL, gtk.RESPONSE_OK])
3838-
3839- self.lvwAddLaunchers = self.builder.get_object('lvwAddLaunchers')
3840- self.txtSearch = self.builder.get_object('entry2')
3841- self.txtSearch.connect("icon-press", lambda x, y, z : self.filter.refilter())
3842-
3843- self.listmodel = gtk.ListStore(gtk.gdk.Pixbuf, gobject.TYPE_STRING,
3844- gobject.TYPE_PYOBJECT, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING)
3845-
3846- self.filter = self.listmodel.filter_new()
3847- self.filter.set_visible_func(self.match_type)
3848- self.sorter = gtk.TreeModelSort(self.filter)
3849- render_pixbuf = gtk.CellRendererPixbuf()
3850- render_text = gtk.CellRendererText()
3851-
3852- col = gtk.TreeViewColumn()
3853-
3854- col.pack_start(render_pixbuf, expand=False)
3855- col.add_attribute(render_pixbuf, 'pixbuf', COLUMN_ICON)
3856- col.pack_start(render_text, expand=True)
3857- col.add_attribute(render_text, 'text', COLUMN_NAME)
3858- self.lvwAddLaunchers.append_column(col)
3859- render_comment = gtk.CellRendererText()
3860-
3861- col = gtk.TreeViewColumn()
3862- col.pack_start(render_comment, expand=True)
3863- col.add_attribute(render_comment, 'text', COLUMN_COMMENT)
3864- #render_comment.set_property('ellipsize',pango.ELLIPSIZE_END)
3865- render_comment.set_property('wrap-mode',pango.WRAP_WORD)
3866- render_comment.set_property('wrap-width',500)
3867- self.lvwAddLaunchers.append_column(col)
3868- self.lvwAddLaunchers.set_model(self.sorter)
3869- #self.lvwAddLaunchers.set_search_entry(self.txtSearch);
3870- apps_list = []
3871- for n in ['/usr/share/']:#BaseDirectory.xdg_data_dirs:
3872- desktop_dir = '%sapplications' % n
3873-
3874- for launcher_location in glob.glob('%s/*.desktop' % desktop_dir):
3875- # blacklist ubiquity as will have two ubiquity in the netbook live session then
3876- if not "ubiquity" in launcher_location:
3877- apps_list.append(launcher_location) #= self.register_new_app(launcher_location, apps_list)
3878- apps_list.sort()
3879- self.populate(apps_list)
3880- self.listmodel.set_sort_column_id(COLUMN_SORT,gtk.SORT_ASCENDING)
3881- self.vbox.pack_start(self.add_panel, True, True, 0)
3882-
3883-
3884- def match_type(self, model, iter):
3885- value = model.get_value(iter, COLUMN_DESKTOP)
3886-
3887- if self.txtSearch.get_text_length() == 0:
3888- return True
3889- if self.txtSearch.get_text().lower() in value.get("Name").lower():
3890- return True
3891- else:
3892- return False
3893-
3894- def populate(self, values):
3895- var = []
3896- from gio import app_info_get_all
3897-
3898- items = app_info_get_all()
3899- for appinfo in items:
3900- sname=appinfo.get_name()
3901- icon = appinfo.get_icon()
3902-
3903- if icon is None:
3904- pix = get_icon('image-missing', 16)
3905- else:
3906- icon = icon.to_string()
3907- pix = get_icon(icon, 16)
3908-
3909- comm = appinfo.get_description()
3910- self.listmodel.append((pix, '%s' % sname, None, appinfo.get_id(), comm,sname.upper()))
3911-
3912- return
3913- for menu_item in values:
3914- print menu_item
3915- desktop_parser = DesktopParser(menu_item)
3916- desktop_parser.update_keys()
3917- sname = desktop_parser.get('Name')
3918- icon = desktop_parser.get('Icon')
3919- comm = desktop_parser.get('Exec')
3920- if sname is None:
3921- sname = desktop_parser.get('Name', 'en')
3922- if icon is None:
3923- pix = get_icon('image-missing', 16)
3924- else:
3925- pix = get_icon(icon, 16)
3926- var.append(('%s' % sname, pix, desktop_parser, menu_item, comm,sname.upper()))
3927-
3928- #self.listmodel.append((pix, '%s' % sname, desktop_parser, menu_item))
3929- #var.sort()
3930-
3931- for sname, pix, desktop_parser, menu_item, comm, ssort in var:
3932- self.listmodel.append((pix, '%s' % sname, desktop_parser, menu_item, comm,ssort.upper()))
3933- #self.main_window.listview_launcher.set_model(store)
3934-
3935- def get_desktop_dir(self):
3936- ''' no python binding from xdg to get the desktop directory? '''
3937-
3938- possible_desktop_folder = None
3939- try:
3940- for line in file('%s/user-dirs.dirs' % BaseDirectory.xdg_config_home):
3941- values = line.split('=')
3942- if values[0] == 'XDG_DESKTOP_DIR':
3943- try:
3944- possible_desktop_folder = values[1][1:-2].replace('$HOME', expanduser('~'))
3945- if isdir(possible_desktop_folder):
3946- return possible_desktop_folder
3947- else:
3948- possible_desktop_folder = None
3949- break
3950- except IndexError:
3951- continue
3952- except IOError:
3953- pass
3954- return expanduser('~/Desktop')
3955-
3956-
3957- def register_new_app(self, launcher_location, apps_list):
3958- ''' append a new app with full desktop path if valid, take care of dups '''
3959-
3960- # default distribution launcher don't go into that function (as don't have an aboslute path)
3961- entry = ""
3962- if exists(launcher_location):
3963- print " == %s: exists" % launcher_location
3964- # try to strip the full path we had in unity mutter if it's part of a xdg path:
3965- # or try to get that for other desktop file based on name.
3966- candidate_desktop_filename = launcher_location.split("/")[-1]
3967- # some desktop file with modified exec key (like in cairo-dock contains 01desktopfilename.desktop, strip that)
3968- try:
3969- candidate_cairodock_desktop_filename = candidate_desktop_filename.split("01")[1]
3970- except IndexError:
3971- candidate_cairodock_desktop_filename = ""
3972- for xdg_dir in BaseDirectory.xdg_data_dirs:
3973- xdg_app_dir = join(xdg_dir, "applications", "")
3974- if launcher_location.startswith(xdg_app_dir):
3975- candidate_desktop_file = launcher_location.split(xdg_app_dir)[1]
3976- # if really the xdg path is the path to the launcher
3977- if not '/' in candidate_desktop_file:
3978- entry = candidate_desktop_file
3979- print " Direct match found for system desktop file"
3980- break
3981- # second chance: try to see if the desktop filename is in xdg path and so, assume it's a match
3982- if not entry and exists("%s/%s" % (xdg_app_dir, candidate_desktop_filename)):
3983- entry = candidate_desktop_filename
3984- print" Similar desktop file name with system desktop file"
3985- break
3986- # third chance: try to see if a tweaked cairo-dock like deskto file name is in xdg path
3987- if not entry and exists("%s/%s" % (xdg_app_dir, candidate_cairodock_desktop_filename)):
3988- entry = candidate_cairodock_desktop_filename
3989- print " Similar Cairo-Dock -like desktop file name with system desktop file"
3990- break
3991- # fourth and last chance: try to find a corresponding Exec key.
3992- # Wait! scanning /usr/share/applications is heavy !!!
3993- # Don't panic, we have the bamf.index for that :)
3994- if not entry:
3995- exec_arg = ""
3996- try:
3997- for line in open(launcher_location):
3998- if "Exec=" in line:
3999- exec_arg = line.split("Exec=")[1]
4000- break
4001- except IOError:
4002- print " Can't open %s for reading Exec" % launcher_location
4003- if exec_arg:
4004- try:
4005- for line in open("/usr/share/applications/bamf.index"):
4006- if exec_arg in line:
4007- entry = line.split()[0]
4008- print " Coherent exec key found with system desktop file"
4009- break
4010- except IOError:
4011- print " No bamf.index file found on the system!"
4012-
4013- if not entry:
4014- entry = launcher_location
4015- print " %s: real entry is %s" % (launcher_location, entry)
4016- if entry not in apps_list:
4017- print " --- adding %s as not in app_list" % entry
4018- apps_list.append(entry)
4019- else:
4020- print" --- NOT adding %s as already in app_list" % entry
4021- else:
4022- print" == %s: doesn't exist" % launcher_location
4023-
4024- return apps_list
4025-
4026- def run(self, destroy=True):
4027- """Returns True if yes was clicked, False otherwise."""
4028- resp = super(AddLauncherDialog, self).run()
4029- obj = None
4030- if resp == gtk.RESPONSE_OK:
4031- obj = {'GroupName': self.txtGroup.get_text(),
4032- 'Name': self.txtName.get_text(),
4033- 'Exec': self.txtCommand.get_text(),
4034- 'TargetEnvironment': (
4035- self.cmbTargetEnvironment.get_active_text()),
4036- }
4037- if destroy:
4038- self.destroy()
4039- if resp == gtk.RESPONSE_OK:
4040- return True, obj
4041- else:
4042- return False, None
4043-
4044-
4045-if __name__ == "__main__":
4046- dialog = AddLauncherDialog()
4047- result, group = dialog.run()
4048
4049=== removed file 'unitylaunchereditor/utils.py'
4050--- unitylaunchereditor/utils.py 2011-05-21 19:45:30 +0000
4051+++ unitylaunchereditor/utils.py 1970-01-01 00:00:00 +0000
4052@@ -1,152 +0,0 @@
4053-# -*- coding: utf-8 -*-
4054-#####################################################################
4055-# Laudeci Oliveira <laudeci@ubuntu.com>
4056-# Ursula Junque <ursinha@ubuntu.com>
4057-#
4058-# Copyright 2011 unity-launcher-editor-dev.
4059-#
4060-# This program is free software; you can redistribute it and/or modify
4061-# it under the terms of the GNU General Public License as published
4062-# by the Free Software Foundation; version 3 only.
4063-#
4064-# This program is distributed in the hope that it will be useful,
4065-# but WITHOUT ANY WARRANTY; without even the implied warranty of
4066-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4067-# GNU General Public License for more details.
4068-#
4069-#####################################################################
4070-
4071-import gtk
4072-from gobject import GError
4073-from os.path import isfile
4074-
4075-
4076-def get_icon(filename, size=48):
4077- image_size = size
4078- image = gtk.Image()
4079- icon_theme = gtk.icon_theme_get_default()
4080-
4081- if isfile(filename):
4082- image.set_from_file(filename)
4083- icon = image.get_pixbuf()
4084- # resize the image to 48 pixels
4085- if icon:
4086- icon = icon.scale_simple(image_size, image_size,
4087- gtk.gdk.INTERP_BILINEAR)
4088- else:
4089- try:
4090- # to fix skype error loading a named icon like skype.png and no
4091- # skype
4092- icon = icon_theme.load_icon(filename.split('.')[0], image_size, 0)
4093- except:
4094- # returns a default icon, which unity uses when no icon is found.
4095- try:
4096- icon = icon_theme.load_icon('twf', image_size, 0)
4097- except GError:
4098- # icon not found, defaulting to the last fallback
4099- icon = icon_theme.load_icon('image-missing', image_size, 0)
4100- return icon
4101-
4102-
4103-def nullstring(text):
4104- if text is None:
4105- text = ''
4106- return text
4107-
4108-
4109-class DialogType:
4110- """ Class to define constants for define Message class types"""
4111- (
4112- DIALOG_INPUT,
4113- DIALOG_MESSAGE,
4114- DIALOG_CONFIRMATION
4115- ) = range(3)
4116-
4117-class FileChooser(gtk.FileChooserDialog):
4118- def __init__(self, title='Open...', filters=None):
4119- super(FileChooser, self).__init__(
4120- title,
4121- None,
4122- gtk.FILE_CHOOSER_ACTION_OPEN, (
4123- gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
4124- gtk.STOCK_OPEN, gtk.RESPONSE_OK)
4125- )
4126- self.set_default_response(gtk.RESPONSE_OK)
4127- if filters:
4128- self.add_filter(filters)
4129-
4130- def run(self, destroy=True):
4131- """Returns True if yes was clicked, False otherwise."""
4132- resp = super(FileChooser, self).run()
4133-
4134- filename = self.get_filename()
4135- if destroy:
4136- self.destroy()
4137- if resp == gtk.RESPONSE_OK:
4138- return True, filename
4139- else:
4140- return False, None
4141-
4142-class MessageBox(gtk.MessageDialog):
4143- def __init__(self, parent,
4144- window_title,
4145- action_text,
4146- message,
4147- dlg_type=DialogType.DIALOG_MESSAGE,
4148- label_text=None):
4149-
4150- text = "<b>%s</b>\n\n%s" % (action_text, message)
4151-
4152- self.dialog_type = dlg_type
4153-
4154- if dlg_type == DialogType.DIALOG_MESSAGE:
4155- icon = gtk.MESSAGE_WARNING
4156- buttons = gtk.BUTTONS_OK
4157- elif dlg_type == DialogType.DIALOG_INPUT:
4158- icon = gtk.MESSAGE_QUESTION
4159- buttons = gtk.BUTTONS_CANCEL
4160- elif dlg_type == DialogType.DIALOG_CONFIRMATION:
4161- icon = gtk.MESSAGE_QUESTION
4162- buttons = gtk.BUTTONS_YES_NO
4163-
4164- super(MessageBox, self).__init__(parent,
4165- gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
4166- icon, buttons)
4167- self.set_title(window_title)
4168- self.set_markup(text)
4169- self.set_transient_for(parent)
4170- if dlg_type == DialogType.DIALOG_INPUT:
4171-
4172- # create a horizontal box to pack the entry and a label
4173- self.text = gtk.Entry()
4174- self.text.set_activates_default(gtk.TRUE)
4175- hbox = gtk.HBox()
4176- hbox.pack_start(gtk.Label(label_text), False, 5, 5)
4177- hbox.pack_end(self.text)
4178- self.vbox.pack_end(hbox, True, True, 0)
4179- self.ok_button = self.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
4180- self.ok_button.grab_default()
4181-
4182- self.ok_button.set_sensitive(False)
4183- self.set_alternative_button_order([gtk.RESPONSE_CANCEL, gtk.RESPONSE_OK])
4184- self.set_default_response(gtk.RESPONSE_OK)
4185- self.text.connect('changed', lambda widget: self.ok_button.set_sensitive(widget.get_text_length() > 0))
4186-
4187- self.show_all()
4188-
4189- def run(self, destroy=True):
4190- """Returns True if yes was clicked, False otherwise."""
4191- resp = super(MessageBox, self).run()
4192- dialog_type = self.dialog_type
4193- text = None
4194- if self.dialog_type == DialogType.DIALOG_INPUT:
4195- text = self.text.get_text()
4196- if destroy:
4197- self.destroy()
4198- if resp == gtk.RESPONSE_YES or resp == gtk.RESPONSE_OK:
4199- if dialog_type == DialogType.DIALOG_INPUT:
4200- return True, text
4201- else:
4202- return True, text
4203- else:
4204- return False, text
4205
4206=== removed file 'unitylaunchereditor/widgets.py'
4207--- unitylaunchereditor/widgets.py 2011-06-07 15:07:44 +0000
4208+++ unitylaunchereditor/widgets.py 1970-01-01 00:00:00 +0000
4209@@ -1,276 +0,0 @@
4210-# -*- coding: utf-8 -*-
4211-
4212-# Authors: Natalia B. Bidart <nataliabidart@canonical.com>
4213-# Authors: Evan Dandrea <evan.dandrea@canonical.com>
4214-#
4215-# Copyright 2009-2010 Canonical Ltd.
4216-#
4217-# This program is free software; you can redistribute it and/or
4218-# modify it under the terms of the GNU General Public License
4219-# as published by the Free Software Foundation; either version 2
4220-# of the License, or (at your option) any later version.
4221-#
4222-# This program is distributed in the hope that it will be useful, but
4223-# WITHOUT ANY WARRANTY; without even the implied warranties of
4224-# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
4225-# PURPOSE. See the GNU General Public License for more details.
4226-#
4227-# You should have received a copy of the GNU General Public License along
4228-# with this program. If not, see <http://www.gnu.org/licenses/>.
4229-
4230-"""A set of useful widgets."""
4231-
4232-from os.path import expanduser, join
4233-import gobject
4234-import gtk
4235-from pango import WRAP_WORD
4236-
4237-from gio import app_info_get_all,ThemedIcon, AppInfo
4238-
4239-from unitylaunchereditor.core.iconmanager import IconManager
4240-from unitylaunchereditor.core.util.dialogs import MessageBox
4241-from unitylaunchereditor.core.translation import _
4242-from unitylaunchereditor.widgets.launcherview import LauncherView
4243-from unitylaunchereditor.widgets.launcherinfo import LauncherInfo
4244-from unitylaunchereditor.addassistant import PageFromSystem, PageFromFile
4245-
4246-DEFAULT_PADDING = (10, 10)
4247-
4248-
4249-class Loading(gtk.HBox):
4250- """A spinner and a label."""
4251-
4252- def __init__(self, label, fg_color=None, *args, **kwargs):
4253- super(Loading, self).__init__(*args, **kwargs)
4254- self.label = gtk.Label(label)
4255- self.spinner = gtk.Spinner()
4256- self.spinner.start()
4257-
4258- if fg_color is not None:
4259- self.spinner.modify_fg(gtk.STATE_NORMAL, gtk.gdk.Color(fg_color))
4260- self.label.modify_fg(gtk.STATE_NORMAL, gtk.gdk.Color(fg_color))
4261-
4262- self.pack_start(self.spinner, expand=False)
4263- self.pack_start(self.label, expand=False)
4264- self.set_spacing(5)
4265-
4266- self.show_all()
4267-
4268-
4269-class LabelLoading(gtk.Alignment):
4270- """A spinner and a label."""
4271-
4272- def __init__(self, loading_label, fg_color=None, *args, **kwargs):
4273- super(LabelLoading, self).__init__(*args, **kwargs)
4274- self.loading = Loading(loading_label, fg_color=fg_color)
4275-
4276- self.label = gtk.Label()
4277- self.label.set_selectable(True)
4278- self.label.show()
4279- if fg_color is not None:
4280- self.label.modify_fg(gtk.STATE_NORMAL, gtk.gdk.Color(fg_color))
4281-
4282- self.add(self.loading)
4283-
4284- self.show()
4285- self.set(xalign=0.5, yalign=0.5, xscale=0, yscale=0)
4286- self.set_padding(padding_top=5, padding_bottom=0,
4287- padding_left=5, padding_right=5)
4288- self.start()
4289-
4290- @property
4291- def active(self):
4292- """Whether the Loading widget is visible or not."""
4293- return self.gLabelLoadinget_child() is self.loading
4294-
4295- def start(self):
4296- """Show the Loading instead of the Label widget."""
4297- for child in self.get_children():
4298- self.remove(child)
4299-
4300- self.add(self.loading)
4301-
4302- def stop(self):
4303- """Show the label instead of the Loading widget."""
4304- for child in self.get_children():
4305- self.remove(child)
4306-
4307- self.add(self.label)
4308-
4309- def set_text(self, text):
4310- """Set 'text' to be the label's text."""
4311- self.label.set_text(text)
4312-
4313- def set_markup(self, text):
4314- """Set 'text' to be the label's markup."""
4315- self.label.set_markup(text)
4316-
4317- def get_text(self):
4318- """Get the label's text."""
4319- return self.label.get_text()
4320-
4321- def get_label(self):
4322- """Get the label's markup."""
4323- return self.label.get_label()
4324-
4325-
4326-class PanelTitle(gtk.Label):
4327- """A box with a given color and text."""
4328-
4329- def __init__(self, markup='', fg_color=None, **kwargs):
4330- super(PanelTitle, self).__init__(fg_color, **kwargs)
4331- self.set_markup(markup)
4332- self.set_padding(*DEFAULT_PADDING)
4333- self.set_property('xalign', 0.0)
4334- self.set_line_wrap(True)
4335- self.set_line_wrap_mode(WRAP_WORD)
4336- self.set_selectable(False)
4337- if fg_color:
4338- self.modify_fg(gtk.STATE_NORMAL, gtk.gdk.Color(fg_color))
4339-
4340- self.show_all()
4341-
4342-def on_size_allocate(widget, allocation, label):
4343- """Resize labels according to who 'widget' is being resized."""
4344- label.set_size_request(allocation.width - 2, -1)
4345-
4346-class UbuntuOneBin(gtk.VBox):
4347- """A Ubuntu One bin."""
4348-
4349- TITLE = ''
4350-
4351- def __init__(self, title=None):
4352- gtk.VBox.__init__(self)
4353- self._is_processing = False
4354-
4355- if title is None:
4356- title = self.TITLE
4357-
4358- title = '<span font_size="large" color="white">%s</span>' % title
4359- self.title = PanelTitle(markup=title)
4360- self.pack_start(self.title, expand=False)
4361-
4362- self.message = LabelLoading('loading...')
4363- #self.pack_start(self.message, expand=False)
4364-
4365- self.connect('size-allocate', on_size_allocate, self.title)
4366-
4367- self.show_all()
4368- def set_title(self,value):
4369- self.title.set_markup('<span font_size="large" color="white">%s</span>' % value)
4370- def _get_is_processing(self):
4371- """Is this panel processing a request?"""
4372- return self._is_processing
4373-
4374- def _set_is_processing(self, new_value):
4375- """Set if this panel is processing a request."""
4376- if new_value:
4377- self.message.start()
4378- self.set_sensitive(False)
4379- else:
4380- self.message.stop()
4381- self.set_sensitive(True)
4382-
4383- self._is_processing = new_value
4384-
4385- is_processing = property(fget=_get_is_processing, fset=_set_is_processing)
4386-
4387-class Doit(gtk.HBox):
4388- def __init__(self):
4389- super(Doit, self).__init__()
4390- hsep = gtk.HSeparator()
4391- hsep.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color('#43413c'))
4392-
4393- hsep2 = gtk.HSeparator()
4394- hsep2.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color('#43413c'))
4395-
4396- hbbox = gtk.HButtonBox()
4397- hbbox.set_layout(gtk.BUTTONBOX_SPREAD)
4398- hbbox.set_spacing(-1)
4399-
4400- self.grad1 = gtk.RadioButton(group=None, label="From System")
4401- self.grad2 = gtk.RadioButton(group=self.grad1, label="From File")
4402- self.grad3 = gtk.RadioButton(group=self.grad1, label="Custom")
4403-
4404- self.grad1.set_property('draw_indicator', False)
4405- self.grad2.set_property('draw_indicator', False)
4406- self.grad3.set_property('draw_indicator', False)
4407-
4408- hbbox.pack_start(self.grad1, False,False,-5)
4409- hbbox.pack_start(self.grad2, False,False,-5)
4410- hbbox.pack_start(self.grad3, False,False,-5)
4411-
4412-
4413- self.pack_start(hsep)
4414- self.pack_start(hbbox, False,True,0)
4415- self.pack_start(hsep2)
4416-
4417-def change_page(widget,note, id, u1):
4418- messages = {
4419- 0:"Create a Launcher from System",
4420- 1:"Create a Launcher from file",
4421- 2:"Create a custom Launcher"
4422- }
4423- note(id)
4424- u1.set_title(messages[id])
4425-
4426-if __name__ == "__main__":
4427- b= gtk.Window()
4428- b.set_resizable(False)
4429- b.present_with_time(1)
4430- b.set_urgency_hint(True)
4431-
4432- b.set_default_size(700, 500)
4433- b.set_size_request(700, 500)
4434-
4435- itself = gtk.VBox()
4436- header = gtk.EventBox()
4437- header.set_visible_window(True)
4438- header.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color('#3c3b37'))
4439-
4440- notebook= gtk.Notebook()
4441- notebook.set_border_width(0)
4442- notebook.set_show_border(False)
4443- notebook.set_show_tabs(False)
4444- button_box = gtk.HButtonBox()
4445- button_box.set_layout(gtk.BUTTONBOX_END)
4446- button_box.set_border_width(6)
4447- #button_box.pack_start(gtk.Button('cancel'))
4448- close_button = gtk.Button('Close')
4449- button_box.pack_start(close_button)
4450- close_button.connect('clicked', lambda w: gtk.main_quit())
4451- itself.show_all()
4452-
4453- u1=UbuntuOneBin('Create a Launcher from System')
4454- vbox2 = gtk.VBox()
4455- vbox2.pack_start(u1, False,False)
4456- don=Doit()
4457-
4458- don.grad1.connect('toggled', change_page, notebook.set_current_page, 0, u1)
4459- don.grad2.connect('toggled', change_page,notebook.set_current_page,1, u1)
4460- don.grad3.connect('toggled', change_page,notebook.set_current_page,2,u1)
4461- vbox2.pack_start(don, False,False)
4462-
4463- header.add(vbox2)
4464- button_box.show_all()
4465- itself.pack_start(header, False,True)
4466- itself.pack_start(notebook, True,True,0)
4467- itself.pack_start(gtk.HSeparator(), False,True,0)
4468- itself.pack_start(button_box, False,True,0)
4469-
4470- fra=PageFromSystem()
4471-
4472- notebook.append_page(fra)
4473-
4474- pfile = PageFromFile()
4475- notebook.append_page(pfile)
4476-
4477- pnew=LauncherInfo()
4478- notebook.append_page(pnew)
4479- itself.show_all()
4480- b.add(itself)
4481- b.connect('delete-event', lambda w, e: gtk.main_quit())
4482-
4483- b.set_title("Add Launcher...")
4484- #.show_all()
4485- gtk.main()
4486
4487=== modified file 'unitylaunchereditor/widgets/dialogheader.py'
4488--- unitylaunchereditor/widgets/dialogheader.py 2011-06-08 20:27:45 +0000
4489+++ unitylaunchereditor/widgets/dialogheader.py 2011-11-28 17:31:26 +0000
4490@@ -15,27 +15,27 @@
4491 # GNU General Public License for more details.
4492 #
4493 #####################################################################
4494-import gobject
4495-import gtk
4496-from pango import ELLIPSIZE_END
4497+from gi.repository import GObject
4498+from gi.repository import Gtk
4499+from gi.repository import Pango
4500
4501 from unitylaunchereditor.core.translation import _
4502
4503-class DialogHeader(gtk.VBox):
4504+class DialogHeader(Gtk.VBox):
4505 __title__ = 'WARNING: can not get name'
4506 __desc__ = ' '
4507
4508 def __init__(self, title = None):
4509- super(DialogHeader,self).__init__()
4510+ Gtk.VBox.__init__(self)
4511 self.set_border_width(0)
4512 if title:
4513 self.__title__ = title
4514 if self.__title__ and self.__desc__:
4515 self.__draw_title()
4516
4517- self.inner_vbox = gtk.VBox(False, 0)
4518+ self.inner_vbox = Gtk.VBox(False, 0)
4519 self.inner_vbox.set_border_width(0)
4520- self.pack_start(self.inner_vbox)
4521+ self.pack_start(self.inner_vbox, False, False, 0)
4522
4523 def set_title(self, title):
4524 self.__title__ = title
4525@@ -50,7 +50,7 @@
4526 if value.rfind('.') != -1:
4527 self.image.set_from_file(value)
4528 else:
4529- self.image.set_from_icon_name(value, gtk.ICON_SIZE_DIALOG)
4530+ self.image.set_from_icon_name(value, Gtk.IconSize.DIALOG)
4531 else:
4532 self.image.set_from_pixbuf(value)
4533
4534@@ -61,93 +61,39 @@
4535 self.inner_vbox.pack_end(child, expand, fill, padding)
4536
4537 def __draw_title(self):
4538-
4539- vbox = gtk.VBox()
4540+ vbox = Gtk.VBox()
4541 self.pack_start(vbox, False, False, 0)
4542
4543- align = gtk.Alignment(0.5, 0.5, 1.0, 1.0)
4544+ align = Gtk.Alignment()
4545+ align.set(0.5, 0.5, 1.0, 1.0)
4546 align.set_padding(5, 5, 5, 5)
4547- vbox.pack_start(align)
4548+ vbox.pack_start(align, False, False, 0)
4549
4550- hbox = gtk.HBox(False, 6)
4551+ hbox = Gtk.HBox(False, 6)
4552 align.add(hbox)
4553
4554- inner_vbox = gtk.VBox(False, 0)
4555- hbox.pack_start(inner_vbox)
4556+ inner_vbox = Gtk.VBox(False, 0)
4557+ hbox.pack_start(inner_vbox, False, False, 0)
4558
4559- align = gtk.Alignment(0.5, 0.5, 1.0, 1.0)
4560+ align = Gtk.Alignment()
4561+ align.set(0.5, 0.5, 1.0, 1.0)
4562 inner_vbox.pack_start(align, False, False, 0)
4563
4564- inner_hbox = gtk.HBox(False, 0)
4565+ inner_hbox = Gtk.HBox(False, 0)
4566 align.add(inner_hbox)
4567
4568- self.label_title = gtk.Label()
4569+ self.label_title = Gtk.Label()
4570 self.label_title.set_markup('<b><big>%s</big></b>' % self.__title__)
4571 self.label_title.set_alignment(0, 0.5)
4572 inner_hbox.pack_start(self.label_title, False, False, 0)
4573
4574- self.label_desc = gtk.Label(self.__desc__)
4575- self.label_desc.set_ellipsize(ELLIPSIZE_END)
4576+ self.label_desc = Gtk.Label(self.__desc__)
4577+ self.label_desc.set_ellipsize(Pango.EllipsizeMode.END)
4578 self.label_desc.set_alignment(0, 0.5)
4579 inner_vbox.pack_start(self.label_desc, False, False, 0)
4580
4581- self.image =gtk.Image()
4582- self.image.set_from_icon_name('aptoncd', gtk.ICON_SIZE_DIALOG)
4583+ self.image = Gtk.Image()
4584+ self.image.set_from_icon_name('aptoncd', Gtk.IconSize.DIALOG)
4585 self.image.set_alignment(0, 0)
4586 self.image.set_padding(5, 5)
4587 hbox.pack_end(self.image, False, False, 0)
4588-
4589-class HeaderBoxButton(DialogHeader):
4590- __gsignals__ = { 'button-clicked': (
4591- gobject.SIGNAL_RUN_LAST,
4592- gobject.TYPE_NONE,
4593- (gobject.TYPE_INT,),
4594- ),
4595- }
4596-
4597- def __init__(self, title=None, color=None):
4598- super(HeaderBoxButton, self).__init__()
4599- if title:
4600- self.set_title(title)
4601-
4602- self.button_box = gtk.HBox()
4603- #------------------------------------
4604- hsep = gtk.HSeparator()
4605- #hsep.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color('#43413c'))
4606-
4607- hsep2 = gtk.HSeparator()
4608- #hsep2.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color(color))
4609-
4610- hbbox = gtk.HButtonBox()
4611- hbbox.set_layout(gtk.BUTTONBOX_CENTER)
4612- hbbox.set_spacing(-1)
4613-
4614- system_tab = gtk.RadioButton(group=None, label=_('From System'))
4615- file_tab = gtk.RadioButton(group=system_tab, label=_('From File'))
4616- custom_tab = gtk.RadioButton(group=system_tab, label=_('Custom'))
4617-
4618- system_tab.set_property('draw_indicator', False)
4619- system_tab.set_name('system_tab')
4620- file_tab.set_property('draw_indicator', False)
4621- file_tab.set_name('file_tab')
4622- custom_tab.set_property('draw_indicator', False)
4623- custom_tab.set_name('custom_tab')
4624-
4625- hbbox.pack_start(system_tab, False,False,-5)
4626- hbbox.pack_start(file_tab, False,False,-5)
4627- hbbox.pack_start(custom_tab, False,False,-5)
4628-
4629- self.button_box.pack_start(hsep)
4630- self.button_box.pack_start(hbbox, False,True,0)
4631- self.button_box.pack_start(hsep2)
4632-
4633- self.add_start(self.button_box, False,False)
4634- system_tab.connect('toggled', self._on_clicked, 0)
4635- file_tab.connect('toggled', self._on_clicked, 1)
4636- custom_tab.connect('toggled', self._on_clicked, 2)
4637-
4638- self.show_all()
4639-
4640- def _on_clicked(self,w,id):
4641- print getattr(w, 'name')
4642- self.emit('button-clicked',id)
4643\ No newline at end of file
4644
4645=== modified file 'unitylaunchereditor/widgets/groupinfo.py'
4646--- unitylaunchereditor/widgets/groupinfo.py 2011-06-13 20:08:40 +0000
4647+++ unitylaunchereditor/widgets/groupinfo.py 2011-11-28 17:31:26 +0000
4648@@ -16,8 +16,8 @@
4649 #
4650 #####################################################################
4651
4652-import gtk
4653-import gobject
4654+from gi.repository import Gtk
4655+from gi.repository import GObject
4656 from gio import File,FileIcon,ThemedIcon
4657 from unitylaunchereditor.core.iconmanager import IconManager
4658 from unitylaunchereditor.core.constants import IMAGE_SIZE
4659@@ -27,16 +27,16 @@
4660
4661 log = Logger('GroupInfo')
4662
4663-class GroupInfo(gtk.HBox):
4664+class GroupInfo(Gtk.HBox):
4665 __gsignals__ = { 'field-changed': (
4666- gobject.SIGNAL_RUN_LAST,
4667- gobject.TYPE_NONE,
4668- (gobject.TYPE_STRING,),
4669+ GObject.SIGNAL_RUN_LAST,
4670+ GObject.TYPE_NONE,
4671+ (GObject.TYPE_STRING,),
4672 ),
4673 }
4674
4675 def __init__(self,edit_group=False):
4676- super(GroupInfo,self).__init__()
4677+ Gtk.HBox.__init__(self)
4678 self.set_border_width(12)
4679 self.editing = edit_group
4680 self.__group_name =""
4681@@ -76,53 +76,49 @@
4682
4683 def __create_text_frame(self):
4684
4685- label_gname = gtk.Label(_('Group Name:'))
4686+ label_gname = Gtk.Label(_('Group Name:'))
4687 label_gname.set_alignment(xalign=0, yalign=0)
4688- self.entry_gname = gtk.Entry()
4689+ self.entry_gname = Gtk.Entry()
4690 self.entry_gname.set_sensitive(not self.editing)
4691 self.entry_gname.connect('changed', self._on_change)
4692 self.entry_gname.connect('focus-out-event', self.__on_txt_focus_out, 'quicklist_group_name')
4693
4694
4695- label_name = gtk.Label(_('Launcher Name:'))
4696+ label_name = Gtk.Label(_('Launcher Name:'))
4697 label_name.set_alignment(xalign=0, yalign=0)
4698- self.entry_name = gtk.Entry()
4699+ self.entry_name = Gtk.Entry()
4700 #entry_name.set_name()
4701 self.entry_name.connect('focus-out-event', self.__on_txt_focus_out, 'quicklist_name')
4702 self.entry_name.connect('changed', self._on_change)
4703
4704- label_command = gtk.Label(_('Command:'))
4705+ label_command = Gtk.Label(_('Command:'))
4706 label_command.set_alignment(xalign=0, yalign=0)
4707- self.entry_command = gtk.Entry()
4708+ self.entry_command = Gtk.Entry()
4709 self.entry_command.connect('focus-out-event', self.__on_txt_focus_out, 'quicklist_command')
4710 self.entry_command.connect('changed', self._on_change)
4711
4712- button_command = gtk.Button('...')
4713- hbox = gtk.HBox()
4714- hbox.pack_start(self.entry_command)
4715+ button_command = Gtk.Button('...')
4716+ hbox = Gtk.HBox()
4717+ hbox.pack_start(self.entry_command, False, False, 0)
4718 hbox.pack_start(button_command, expand=False, fill=True, padding=0)
4719 button_command.connect('clicked', self.__do_choose_run, self.entry_command)
4720
4721- self.combo_label= gtk.Label('Environment:')
4722+ self.combo_label= Gtk.Label('Environment:')
4723 self.combo_label.set_alignment(xalign=0, yalign=0)
4724- self.cmbTargetEnvironment = gtk.ComboBox()
4725+ self.cmbTargetEnvironment = Gtk.ComboBoxText()
4726 self.cmbTargetEnvironment.set_name('TargetEnvironment')
4727
4728- self.combo_model = gtk.ListStore(gobject.TYPE_STRING)
4729+ self.combo_model = Gtk.ListStore(GObject.TYPE_STRING)
4730 for target_key in ['Unity', 'Message Menu', 'Unity;Message Menu']:
4731 self.combo_model.append([target_key])
4732
4733- celltitle = gtk.CellRendererText()
4734-
4735- self.cmbTargetEnvironment.pack_start(celltitle, False)
4736- self.cmbTargetEnvironment.add_attribute(celltitle, 'text', 0)
4737 self.cmbTargetEnvironment.set_model(self.combo_model)
4738 self.cmbTargetEnvironment.set_active(0)
4739
4740- self.chkVisible = gtk.CheckButton()
4741+ self.chkVisible = Gtk.CheckButton()
4742 self.chkVisible.set_label('Visible')
4743
4744- table = gtk.Table(rows=5, columns=2, homogeneous=False)
4745+ table = Gtk.Table(rows=5, columns=2, homogeneous=False)
4746 table.set_col_spacings(5)
4747 table.set_row_spacings(5)
4748
4749@@ -131,8 +127,8 @@
4750 right_attach=1,
4751 top_attach=0,
4752 bottom_attach=1,
4753- xoptions=gtk.FILL,
4754- yoptions=gtk.FILL,
4755+ xoptions=Gtk.AttachOptions.FILL,
4756+ yoptions=Gtk.AttachOptions.FILL,
4757 xpadding=0,
4758 ypadding=0)
4759
4760@@ -141,8 +137,8 @@
4761 right_attach=2,
4762 top_attach=0,
4763 bottom_attach=1,
4764- xoptions=gtk.FILL|gtk.EXPAND ,
4765- yoptions=gtk.FILL,
4766+ xoptions=Gtk.AttachOptions.FILL|Gtk.AttachOptions.EXPAND ,
4767+ yoptions=Gtk.AttachOptions.FILL,
4768 xpadding=0,
4769 ypadding=0
4770 )
4771@@ -152,8 +148,8 @@
4772 right_attach=1,
4773 top_attach=1,
4774 bottom_attach=2,
4775- xoptions=gtk.FILL,
4776- yoptions=gtk.FILL,
4777+ xoptions=Gtk.AttachOptions.FILL,
4778+ yoptions=Gtk.AttachOptions.FILL,
4779 xpadding=0,
4780 ypadding=0)
4781
4782@@ -162,8 +158,8 @@
4783 right_attach=2,
4784 top_attach=1,
4785 bottom_attach=2,
4786- xoptions=gtk.FILL|gtk.EXPAND ,
4787- yoptions=gtk.FILL,
4788+ xoptions=Gtk.AttachOptions.FILL|Gtk.AttachOptions.EXPAND ,
4789+ yoptions=Gtk.AttachOptions.FILL,
4790 xpadding=0,
4791 ypadding=0
4792 )
4793@@ -173,8 +169,8 @@
4794 right_attach=1,
4795 top_attach=2,
4796 bottom_attach=3,
4797- xoptions=gtk.FILL,
4798- yoptions=gtk.FILL,
4799+ xoptions=Gtk.AttachOptions.FILL,
4800+ yoptions=Gtk.AttachOptions.FILL,
4801 xpadding=0,
4802 ypadding=0)
4803
4804@@ -183,8 +179,8 @@
4805 right_attach=2,
4806 top_attach=2,
4807 bottom_attach=3,
4808- xoptions=gtk.FILL|gtk.EXPAND ,
4809- yoptions=gtk.FILL,
4810+ xoptions=Gtk.AttachOptions.FILL|Gtk.AttachOptions.EXPAND ,
4811+ yoptions=Gtk.AttachOptions.FILL,
4812 xpadding=0,
4813 ypadding=0)
4814
4815@@ -193,8 +189,8 @@
4816 right_attach=1,
4817 top_attach=3,
4818 bottom_attach=4,
4819- xoptions=gtk.FILL,
4820- yoptions=gtk.FILL,
4821+ xoptions=Gtk.AttachOptions.FILL,
4822+ yoptions=Gtk.AttachOptions.FILL,
4823 xpadding=0,
4824 ypadding=0)
4825
4826@@ -203,18 +199,18 @@
4827 right_attach=2,
4828 top_attach=3,
4829 bottom_attach=4,
4830- xoptions=gtk.FILL,
4831- yoptions=gtk.FILL,
4832+ xoptions=Gtk.AttachOptions.FILL,
4833+ yoptions=Gtk.AttachOptions.FILL,
4834 xpadding=0,
4835 ypadding=0)
4836
4837- table.attach(gtk.Label(),
4838+ table.attach(Gtk.Label(),
4839 left_attach=0,
4840 right_attach=1,
4841 top_attach=4,
4842 bottom_attach=5,
4843- xoptions=gtk.FILL,
4844- yoptions=gtk.FILL,
4845+ xoptions=Gtk.AttachOptions.FILL,
4846+ yoptions=Gtk.AttachOptions.FILL,
4847 xpadding=0,
4848 ypadding=0)
4849
4850@@ -223,13 +219,13 @@
4851 right_attach=2,
4852 top_attach=4,
4853 bottom_attach=5,
4854- xoptions=gtk.FILL|gtk.EXPAND,
4855- yoptions=gtk.FILL,
4856+ xoptions=Gtk.AttachOptions.FILL|Gtk.AttachOptions.EXPAND,
4857+ yoptions=Gtk.AttachOptions.FILL,
4858 xpadding=0,
4859 ypadding=0)
4860
4861- frame = gtk.Frame()
4862- frame.set_shadow_type(gtk.SHADOW_NONE)
4863+ frame = Gtk.Frame()
4864+ frame.set_shadow_type(Gtk.ShadowType.NONE)
4865 frame.set_label_align(xalign=0, yalign=0)
4866 frame.add(table)
4867
4868@@ -240,8 +236,7 @@
4869
4870 def __on_txt_focus_out(self, widget, event, prop_name):
4871 ilength = 0
4872- if isinstance(widget, gtk.CheckButton):
4873- print getattr(self, prop_name)
4874+ if isinstance(widget, Gtk.CheckButton):
4875 value = widget.get_active()
4876 ilength = 1
4877 else:
4878@@ -260,4 +255,4 @@
4879 if response:
4880 self.quicklist_command=filename
4881 if entry_widget:
4882- entry_widget.set_text(filename)
4883\ No newline at end of file
4884+ entry_widget.set_text(filename)
4885
4886=== removed file 'unitylaunchereditor/widgets/groupsdialog.py'
4887--- unitylaunchereditor/widgets/groupsdialog.py 2011-06-07 15:07:44 +0000
4888+++ unitylaunchereditor/widgets/groupsdialog.py 1970-01-01 00:00:00 +0000
4889@@ -1,245 +0,0 @@
4890-# -*- coding: utf-8 -*-
4891-#####################################################################
4892-# Laudeci Oliveira <laudeci@ubuntu.com>
4893-# Ursula Junque <ursinha@ubuntu.com>
4894-#
4895-# Copyright 2011 unity-launcher-editor-dev.
4896-#
4897-# This program is free software; you can redistribute it and/or modify
4898-# it under the terms of the GNU General Public License as published
4899-# by the Free Software Foundation; version 3 only.
4900-#
4901-# This program is distributed in the hope that it will be useful,
4902-# but WITHOUT ANY WARRANTY; without even the implied warranty of
4903-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4904-# GNU General Public License for more details.
4905-#
4906-#####################################################################
4907-
4908-import gtk
4909-from gobject import TYPE_STRING
4910-from utils import FileChooser
4911-from translation import _
4912-
4913-class GroupsDialog(gtk.Dialog):
4914- """XXX: add docs."""
4915-
4916- def __init__(self, title=_('Add Group...'), parent=None):
4917- super(GroupsDialog, self).__init__(title,
4918- None, (gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT |
4919- gtk.DIALOG_NO_SEPARATOR),
4920- (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL))
4921-
4922-
4923- self.set_resizable(False)
4924-
4925- if parent:
4926- self.set_transient_for(parent)
4927-
4928- self.add_group_panel = self.create_widgets()
4929- self.vbox.pack_start(self.add_group_panel, True, True, 0)
4930- self.vbox.show_all()
4931-
4932- self.ok_button = self.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
4933- self.ok_button.grab_default()
4934- self.ok_button.set_sensitive(False)
4935- self.set_alternative_button_order(
4936- [gtk.RESPONSE_CANCEL, gtk.RESPONSE_OK])
4937-
4938- self.txtName.connect('changed', self.on_change)
4939- self.txtCommand.connect('changed', self.on_change)
4940- self.cmdGRun.connect('clicked', self.open_executable)
4941-
4942- def create_widgets(self):
4943- '''
4944- this will create input widgets for our dialog
4945- without depending on glade for that and
4946- solving the file not found error report.
4947- '''
4948-
4949- frame4 = gtk.Frame()
4950- frame4.set_shadow_type(gtk.SHADOW_NONE)
4951-
4952- align = gtk.Alignment()
4953- align.set_padding(0, 0, 12, 0)
4954-
4955- table = gtk.Table(rows=4, columns=2, homogeneous=False)
4956- table.set_col_spacings(5)
4957- table.set_row_spacings(5)
4958-
4959- label8 = gtk.Label(_('Group Name:'))
4960- label8.set_alignment(0, 0.5)
4961- eventbox8 = gtk.EventBox()
4962- eventbox8.add(label8)
4963-
4964- table.attach(eventbox8,
4965- left_attach=0,
4966- right_attach=1,
4967- top_attach=0,
4968- bottom_attach=1,
4969- xoptions=gtk.FILL,
4970- yoptions=gtk.FILL,
4971- xpadding=0,
4972- ypadding=0)
4973-
4974-
4975- label5 = gtk.Label(_('Command Name:'))
4976- label5.set_alignment(0, 0.5)
4977- eventbox5 = gtk.EventBox()
4978- eventbox5.add(label5)
4979- table.attach(eventbox5,
4980- left_attach=0,
4981- right_attach=1,
4982- top_attach=1,
4983- bottom_attach=2,
4984- xoptions=gtk.FILL,
4985- yoptions=gtk.FILL,
4986- xpadding=0,
4987- ypadding=0)
4988-
4989-
4990- label6 = gtk.Label(_('Command:'))
4991- label6.set_alignment(0, 0.5)
4992- eventbox6 = gtk.EventBox()
4993- eventbox6.add(label6)
4994- table.attach(eventbox6,
4995- left_attach=0,
4996- right_attach=1,
4997- top_attach=2,
4998- bottom_attach=3,
4999- xoptions=gtk.FILL,
5000- yoptions=gtk.FILL,
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches