updated on Thu Jan 19 04:14:35 UTC 2012
[aur-mirror.git] / mintmenu / arch-patch.diff
blob794d0d1caa0ec0f16efa29e3614c6403d5e08754
1 diff -Nur usr.orig/bin/mintmenu usr/bin/mintmenu
2 --- usr.orig/bin/mintmenu 2011-03-29 18:45:21.000000000 +0200
3 +++ usr/bin/mintmenu 2011-03-31 16:42:53.233371129 +0200
4 @@ -1,4 +1,4 @@
5 -#!/usr/bin/python
6 +#!/usr/bin/python2
8 import sys, os
10 diff -Nur usr.orig/lib/bonobo/servers/mintMenu.server usr/lib/bonobo/servers/mintMenu.server
11 --- usr.orig/lib/bonobo/servers/mintMenu.server 2011-03-29 18:45:21.000000000 +0200
12 +++ usr/lib/bonobo/servers/mintMenu.server 2011-03-31 16:42:53.236704440 +0200
13 @@ -21,6 +21,6 @@
14 <oaf_attribute name="name" type="string" value="mintMenu"/>
15 <oaf_attribute name="description" type="string" value="Advanced Gnome Menu"/>
16 <oaf_attribute name="panel:category" type="string" value="Utilities"/>
17 - <oaf_attribute name="panel:icon" type="string" value="/usr/lib/linuxmint/mintMenu/mint-logo.svg"/>
18 + <oaf_attribute name="panel:icon" type="string" value="/usr/share/archlinux/icons/archlinux-icon-tango-32.svg"/>
19 </oaf_server>
20 </oaf_info>
21 diff -Nur usr.orig/lib/linuxmint/mintMenu/compile.py usr/lib/linuxmint/mintMenu/compile.py
22 --- usr.orig/lib/linuxmint/mintMenu/compile.py 2011-03-29 18:45:21.000000000 +0200
23 +++ usr/lib/linuxmint/mintMenu/compile.py 2011-03-31 16:42:53.236704440 +0200
24 @@ -1,4 +1,4 @@
25 -#!/usr/bin/env python
26 +#!/usr/bin/env python2
28 import compileall
30 diff -Nur usr.orig/lib/linuxmint/mintMenu/mintMenuConfig.glade usr/lib/linuxmint/mintMenu/mintMenuConfig.glade
31 --- usr.orig/lib/linuxmint/mintMenu/mintMenuConfig.glade 2011-03-29 18:45:21.000000000 +0200
32 +++ usr/lib/linuxmint/mintMenu/mintMenuConfig.glade 2011-03-31 16:42:53.243371062 +0200
33 @@ -745,14 +745,6 @@
34 </packing>
35 </child>
36 <child>
37 - <widget class="GtkCheckButton" id="use_apt">
38 - <property name="label" translatable="yes">Search for packages to install</property>
39 - <property name="visible">True</property>
40 - <property name="can_focus">True</property>
41 - <property name="receives_default">False</property>
42 - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
43 - <property name="draw_indicator">True</property>
44 - </widget>
45 <packing>
46 <property name="right_attach">2</property>
47 <property name="top_attach">6</property>
48 diff -Nur usr.orig/lib/linuxmint/mintMenu/mintMenuConfig.py usr/lib/linuxmint/mintMenu/mintMenuConfig.py
49 --- usr.orig/lib/linuxmint/mintMenu/mintMenuConfig.py 2011-03-29 18:45:21.000000000 +0200
50 +++ usr/lib/linuxmint/mintMenu/mintMenuConfig.py 2011-03-31 16:42:53.246704374 +0200
51 @@ -1,4 +1,4 @@
52 -#!/usr/bin/env python
53 +#!/usr/bin/env python2
55 import sys
57 @@ -53,7 +53,6 @@
58 wTree.get_widget("showAppComments").set_label(_("Show application comments"))
59 wTree.get_widget("showCategoryIcons").set_label(_("Show category icons"))
60 wTree.get_widget("hover").set_label(_("Hover"))
61 - wTree.get_widget("use_apt").set_label(_("Search for packages to install"))
62 wTree.get_widget("swapGeneric").set_label(_("Swap name and generic name"))
64 wTree.get_widget("label11").set_text(_("Border width:"))
65 @@ -118,7 +117,6 @@
67 self.startWithFavorites = wTree.get_widget( "startWithFavorites" )
68 self.showAppComments = wTree.get_widget( "showAppComments" )
69 - self.useAPT = wTree.get_widget( "use_apt" )
70 self.showCategoryIcons = wTree.get_widget( "showCategoryIcons" )
71 self.showRecentPlugin = wTree.get_widget( "showRecentPlugin" )
72 self.showApplicationsPlugin = wTree.get_widget( "showApplicationsPlugin" )
73 @@ -188,7 +186,6 @@
75 self.bindGconfValueToWidget( self.gconf, "bool", "start_with_favorites", self.startWithFavorites, "toggled", self.startWithFavorites.set_active, self.startWithFavorites.get_active )
76 self.bindGconfValueToWidget( self.gconfApplications, "bool", "show_application_comments", self.showAppComments, "toggled", self.showAppComments.set_active, self.showAppComments.get_active )
77 - self.bindGconfValueToWidget( self.gconfApplications, "bool", "use_apt", self.useAPT, "toggled", self.useAPT.set_active, self.useAPT.get_active )
78 self.bindGconfValueToWidget( self.gconfApplications, "bool", "show_category_icons", self.showCategoryIcons, "toggled", self.showCategoryIcons.set_active, self.showCategoryIcons.get_active )
79 self.bindGconfValueToWidget( self.gconfApplications, "bool", "categories_mouse_over", self.hover, "toggled", self.hover.set_active, self.hover.get_active )
80 self.bindGconfValueToWidget( self.gconfApplications, "bool", "swap_generic_name", self.swapGeneric, "toggled", self.swapGeneric.set_active, self.swapGeneric.get_active )
81 diff -Nur usr.orig/lib/linuxmint/mintMenu/mintMenu.py usr/lib/linuxmint/mintMenu/mintMenu.py
82 --- usr.orig/lib/linuxmint/mintMenu/mintMenu.py 2011-03-29 19:47:23.000000000 +0200
83 +++ usr/lib/linuxmint/mintMenu/mintMenu.py 2011-03-31 16:45:22.807930600 +0200
84 @@ -1,4 +1,4 @@
85 -#!/usr/bin/env python
86 +#!/usr/bin/env python2
88 try:
89 import sys
90 @@ -46,7 +46,7 @@
91 NAME = _("Menu")
92 PATH = os.path.abspath( os.path.dirname( sys.argv[0] ) )
94 -ICON = "/usr/lib/linuxmint/mintMenu/visualisation-logo.png"
95 +ICON = "/usr/share/archlinux/icons/archlinux-icon-tango-16.svg"
97 sys.path.append( os.path.join( PATH , "plugins") )
99 @@ -735,10 +735,10 @@
100 about = gtk.AboutDialog()
101 about.set_name("mintMenu")
102 import commands
103 - version = commands.getoutput("/usr/lib/linuxmint/common/version.py mintmenu")
104 + version = "__version__"
105 about.set_version(version)
106 try:
107 - h = open('/usr/share/common-licenses/GPL','r')
108 + h = open('/usr/share/licenses/common/GPL2/license.txt','r')
109 s = h.readlines()
110 gpl = ""
111 for line in s:
112 diff -Nur usr.orig/lib/linuxmint/mintMenu/mintRemove.py usr/lib/linuxmint/mintMenu/mintRemove.py
113 --- usr.orig/lib/linuxmint/mintMenu/mintRemove.py 2011-03-29 18:45:21.000000000 +0200
114 +++ usr/lib/linuxmint/mintMenu/mintRemove.py 2011-03-31 16:42:53.253370997 +0200
115 @@ -1,4 +1,4 @@
116 -#!/usr/bin/env python
117 +#!/usr/bin/env python2
119 try:
120 import pygtk
121 @@ -42,21 +42,22 @@
123 def run(self):
124 removePackages = string.split(self.package)
125 - cmd = ["sudo", "/usr/sbin/synaptic", "--hide-main-window", \
126 - "--non-interactive", "--parent-window-id", self.window_id]
127 - cmd.append("--progress-str")
128 - cmd.append("\"" + _("Please wait, this can take some time") + "\"")
129 - cmd.append("--finish-str")
130 - cmd.append("\"" + _("Application removed successfully") + "\"")
131 - f = tempfile.NamedTemporaryFile()
132 - for pkg in removePackages:
133 - f.write("%s\tdeinstall\n" % pkg)
134 - cmd.append("--set-selections-file")
135 - cmd.append("%s" % f.name)
136 - f.flush()
137 - comnd = Popen(' '.join(cmd), shell=True)
138 + cmd = ["sudo", "gnome-terminal", "-e", \
139 + "\"/usr/lib/linuxmint/mintMenu/removescript", self.package, "\""]
140 +# cmd.append("--progress-str")
141 +# cmd.append("\"" + _("Please wait, this can take some time") + "\"")
142 +# cmd.append("--finish-str")
143 +# cmd.append("\"" + _("Application removed successfully") + "\"")
144 + comnd = Popen(' '.join(cmd), shell=True)
145 +# f = tempfile.NamedTemporaryFile()
146 +# for pkg in removePackages:
147 +# cmd.append("%s" % f.name)
148 +# f.flush()
149 +# comnd = Popen(' '.join(cmd), shell=True)
150 +# f.write("%s\tdeinstall\n" % pkg)
151 +# cmd.append("--set-selections-file")
152 returnCode = comnd.wait()
153 - f.close()
154 +# f.close()
155 gtk.main_quit()
156 sys.exit(0)
158 @@ -81,13 +82,14 @@
162 - package = commands.getoutput("dpkg -S " + self.desktopFile)
163 - package = package[:package.find(":")]
164 - if package == "dpkg":
165 +# package = commands.getoutput("dpkg -S " + self.desktopFile)
166 + package = commands.getoutput("pacman -Qqo " + self.desktopFile)
168 + if package[:6] == "error:":
169 warnDlg = gtk.Dialog(title="MintMenu", parent=None, flags=0, buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL))
170 warnDlg.add_button(gtk.STOCK_REMOVE, gtk.RESPONSE_OK)
171 warnDlg.vbox.set_spacing(10)
172 - warnDlg.set_icon_from_file("/usr/share/linuxmint/logo.png")
173 + warnDlg.set_icon_from_file("/usr/share/archlinux/icons/archlinux-icon-tango-32.svg")
174 labelSpc = gtk.Label(" ")
175 warnDlg.vbox.pack_start(labelSpc)
176 labelSpc.show()
177 @@ -123,7 +125,7 @@
178 treeview.append_column(column1)
180 model = gtk.ListStore(str)
181 - dependenciesString = commands.getoutput("apt-get -s -q remove " + package + " | grep Remv")
182 + dependenciesString = commands.getoutput("pacman -Rsp " + package + "|sed -e 's/-[0-9].*//'")
183 dependencies = string.split(dependenciesString, "\n")
184 for dependency in dependencies:
185 dependency = dependency.replace("Remv ", "")
186 diff -Nur usr.orig/lib/linuxmint/mintMenu/plugins/applications.py usr/lib/linuxmint/mintMenu/plugins/applications.py
187 --- usr.orig/lib/linuxmint/mintMenu/plugins/applications.py 2011-03-29 20:50:01.000000000 +0200
188 +++ usr/lib/linuxmint/mintMenu/plugins/applications.py 2011-03-31 16:42:53.256704308 +0200
189 @@ -1,4 +1,4 @@
190 -#!/usr/bin/env python
191 +#!/usr/bin/env python2
193 import gtk
194 import gtk.glade
195 @@ -282,7 +282,6 @@
196 self.gconf.notifyAdd( "swap_generic_name", self.changeSwapGenericName )
197 self.gconf.notifyAdd( "show_category_icons", self.changeShowCategoryIcons )
198 self.gconf.notifyAdd( "show_application_comments", self.changeShowApplicationComments )
199 - self.gconf.notifyAdd( "use_apt", self.switchAPTUsage)
200 self.gconf.notifyAdd( "fav_cols", self.changeFavCols )
202 self.gconf.bindGconfEntryToVar( "int", "category_hover_delay", self, "categoryhoverdelay" )
203 @@ -317,18 +316,12 @@
204 #for f in mymenu.directory.AppDirs:
205 # self.menuFileMonitors.append( filemonitor.addMonitor(f, self.onMenuChanged, mymenu.directory.Filename ) )
207 - self.refresh_apt_cache()
208 self.suggestions = []
209 self.current_suggestion = None
210 self.get_panel()
212 self.wTree.get_widget("searchButton").connect( "button-release-event", self.searchPopup )
214 - def refresh_apt_cache(self):
215 - if self.useAPT:
216 - os.system("mkdir -p %s/.linuxmint/mintMenu/" % home)
217 - os.system("/usr/lib/linuxmint/mintMenu/plugins/get_apt_cache.py > %s/.linuxmint/mintMenu/apt.cache &" % home)
219 def get_panel(self):
220 self.panel = None
221 self.panel_position = 0
222 @@ -339,10 +332,6 @@
223 self.panel = gconf.client_get_default().get_string("/apps/panel/applets/" + applet + "/toplevel_id")
224 self.panel_position = gconf.client_get_default().get_int("/apps/panel/applets/" + applet + "/position") + 1
226 - def apturl_install(self, widget, pkg_name):
227 - os.system("xdg-open apt://" + pkg_name + " &")
228 - self.mintMenuWin.hide()
230 def __del__( self ):
231 print u"Applications plugin deleted"
233 @@ -416,10 +405,6 @@
234 if isinstance( child, FavApplicationLauncher):
235 child.setIconSize( self.faviconsize )
237 - def switchAPTUsage( self, client, connection_id, entry, args ):
238 - self.useAPT = entry.get_value().get_bool()
239 - self.refresh_apt_cache()
241 def changeShowApplicationComments( self, client, connection_id, entry, args ):
242 self.showapplicationcomments = entry.get_value().get_bool()
243 for child in self.applicationsBox:
244 @@ -443,9 +428,6 @@
245 self.favoritesBox.remove( fav )
246 self.favoritesPositionOnGrid( fav )
248 - def RegenPlugin( self, *args, **kargs ):
249 - self.refresh_apt_cache()
251 # save old config - this is necessary because the app will notified when it sets the default values and you don't want the to reload itself several times
252 oldcategories_mouse_over = self.categories_mouse_over
253 oldtotalrecent = self.totalrecent
254 @@ -478,7 +460,6 @@
255 self.showcategoryicons = self.gconf.get( "bool", "show_category_icons", True )
256 self.categoryhoverdelay = self.gconf.get( "int", "category_hover_delay", 150 )
257 self.showapplicationcomments = self.gconf.get( "bool", "show_application_comments", True )
258 - self.useAPT = self.gconf.get( "bool", "use_apt", True )
260 self.lastActiveTab = self.gconf.get( "int", "last_active_tab", 0 )
261 self.defaultTab = self.gconf.get( "int", "default_tab", -1 )
262 @@ -635,140 +616,6 @@
263 #self.applicationsBox.add(self.last_separator)
264 #self.suggestions.append(self.last_separator)
266 - def add_apt_filter_results(self, keyword):
267 - try:
268 - # Wait to see if the keyword has changed.. before doing anything
269 - time.sleep(0.3)
270 - current_keyword = keyword
271 - gtk.gdk.threads_enter()
272 - try:
273 - current_keyword = self.searchEntry.get_text()
274 - finally:
275 - gtk.gdk.threads_leave()
276 - if keyword != current_keyword:
277 - return
278 - found_packages = []
279 - found_in_name = []
280 - found_elsewhere = []
281 - keywords = keyword.split(" ")
282 - command = "cat %(home)s/.linuxmint/mintMenu/apt.cache" % {'home':home}
283 - for word in keywords:
284 - command = "%(command)s | grep %(word)s" % {'command':command, 'word':word}
285 - pkgs = commands.getoutput(command)
286 - pkgs = pkgs.split("\n")
287 - for pkg in pkgs:
288 - values = string.split(pkg, "###")
289 - if len(values) == 4:
290 - status = values[0]
291 - if (status == "ERROR"):
292 - print "Could not refresh APT cache"
293 - elif (status == "CACHE"):
294 - name = values[1]
295 - summary = values[2]
296 - description = values[3].replace("~~~", "\n")
297 - package = PackageDescriptor(name, summary, description)
298 - #See if all keywords are in the name (so we put these results at the top of the list)
299 - some_found = False
300 - some_not_found = False
301 - for word in keywords:
302 - if word in package.name:
303 - some_found = True
304 - else:
305 - some_not_found = True
306 - if some_found and not some_not_found:
307 - found_in_name.append(package)
308 - else:
309 - found_elsewhere.append(package)
310 - else:
311 - print "Invalid status code: " + status
312 - found_packages.extend(found_in_name)
313 - found_packages.extend(found_elsewhere)
314 - gtk.gdk.threads_enter()
315 - try:
316 - if keyword == self.searchEntry.get_text() and len(found_packages) > 0:
317 - last_separator = gtk.EventBox()
318 - last_separator.add(gtk.HSeparator())
319 - last_separator.set_size_request(-1, 20)
320 - last_separator.type = "separator"
321 - self.mintMenuWin.SetPaneColors( [ last_separator ] )
322 - last_separator.show_all()
323 - self.applicationsBox.add(last_separator)
324 - self.suggestions.append(last_separator)
325 - for pkg in found_packages:
326 - name = pkg.name
327 - for word in keywords:
328 - if word != "":
329 - name = name.replace(word, "<b>%s</b>" % word);
330 - suggestionButton = SuggestionButton(gtk.STOCK_ADD, self.iconSize, "")
331 - suggestionButton.connect("clicked", self.apturl_install, pkg.name)
332 - suggestionButton.set_text(_("Install package '%s'") % name)
333 - suggestionButton.set_tooltip_text("%s\n\n%s\n\n%s" % (pkg.name, pkg.summary, pkg.description))
334 - suggestionButton.set_icon_size(self.iconSize)
335 - self.applicationsBox.add(suggestionButton)
336 - self.suggestions.append(suggestionButton)
337 - #if cache != self.current_results:
338 - # self.current_results.append(pkg)
339 - finally:
340 - gtk.gdk.threads_leave()
342 - #if len(found_packages) == 0:
343 - # gtk.gdk.threads_enter()
344 - # try:
345 - # self.applicationsBox.remove(self.last_separator)
346 - # self.suggestions.remove(self.last_separator)
347 - # finally:
348 - # gtk.gdk.threads_leave()
350 - except Exception, detail:
351 - print detail
354 - def add_apt_filter_results_sync(self, cache, keyword):
355 - try:
356 - found_packages = []
357 - keywords = keyword.split(" ")
358 - if cache is not None:
359 - for pkg in cache:
360 - some_found = False
361 - some_not_found = False
362 - for word in keywords:
363 - if word in pkg.name:
364 - some_found = True
365 - else:
366 - some_not_found = True
367 - if some_found and not some_not_found:
368 - found_packages.append(pkg)
370 - if len(found_packages) > 0:
371 - last_separator = gtk.EventBox()
372 - last_separator.add(gtk.HSeparator())
373 - last_separator.set_size_request(-1, 20)
374 - last_separator.type = "separator"
375 - self.mintMenuWin.SetPaneColors( [ last_separator ] )
376 - last_separator.show_all()
377 - self.applicationsBox.add(last_separator)
378 - self.suggestions.append(last_separator)
380 - for pkg in found_packages:
381 - name = pkg.name
382 - for word in keywords:
383 - if word != "":
384 - name = name.replace(word, "<b>%s</b>" % word);
385 - suggestionButton = SuggestionButton(gtk.STOCK_ADD, self.iconSize, "")
386 - suggestionButton.connect("clicked", self.apturl_install, pkg.name)
387 - suggestionButton.set_text(_("Install package '%s'") % name)
388 - suggestionButton.set_tooltip_text("%s\n\n%s\n\n%s" % (pkg.name, pkg.summary.capitalize(), pkg.description))
389 - suggestionButton.set_icon_size(self.iconSize)
390 - self.applicationsBox.add(suggestionButton)
391 - self.suggestions.append(suggestionButton)
393 - #if len(found_packages) == 0:
394 - # self.applicationsBox.remove(self.last_separator)
395 - # self.suggestions.remove(self.last_separator)
397 - except Exception, detail:
398 - print detail
400 def Filter( self, widget, category = None ):
401 self.filterTimer = None
403 @@ -788,28 +635,8 @@
404 if (shown):
405 showns = True
407 - if (not showns and os.path.exists("/usr/lib/linuxmint/mintInstall/icon.svg")):
408 - if len(text) >= 3:
409 - if self.current_suggestion is not None and self.current_suggestion in text:
410 - # We're restricting our search...
411 - self.add_search_suggestions(text)
412 - #if (len(self.current_results) > 0):
413 - #self.add_apt_filter_results_sync(self.current_results, text)
414 - #else:
415 - thr = threading.Thread(name="mint-menu-apt-filter", group=None, target=self.add_apt_filter_results, args=([text]), kwargs={})
416 - thr.start()
417 - else:
418 - self.current_results = []
419 - self.add_search_suggestions(text)
420 - thr = threading.Thread(name="mint-menu-apt-filter", group=None, target=self.add_apt_filter_results, args=([text]), kwargs={})
421 - thr.start()
422 - self.current_suggestion = text
423 - else:
424 - self.current_suggestion = None
425 - self.current_results = []
426 - else:
427 - self.current_suggestion = None
428 - self.current_results = []
429 + self.current_suggestion = None
430 + self.current_results = []
432 for i in self.categoriesBox.get_children():
433 i.set_relief( gtk.RELIEF_NONE )
434 @@ -1027,36 +854,36 @@
435 img = gtk.Image()
436 img.set_from_file('/usr/lib/linuxmint/mintMenu/search_engines/software.png')
437 menuItem.set_image(img)
438 - menuItem.connect("activate", self.search_mint_software)
439 + menuItem.connect("activate", self.search_arch_software)
440 menu.append(menuItem)
442 - menuItem = gtk.ImageMenuItem(_("Find Tutorials"))
443 + menuItem = gtk.ImageMenuItem(_("AUR Software"))
444 img = gtk.Image()
445 - img.set_from_file('/usr/lib/linuxmint/mintMenu/search_engines/tutorials.png')
446 + img.set_from_file('/usr/lib/linuxmint/mintMenu/search_engines/ideas.png')
447 menuItem.set_image(img)
448 - menuItem.connect("activate", self.search_mint_tutorials)
449 + menuItem.connect("activate", self.search_aur_software)
450 menu.append(menuItem)
452 - menuItem = gtk.ImageMenuItem(_("Find Hardware"))
453 + menuItem = gtk.ImageMenuItem(_("Find Bugs"))
454 img = gtk.Image()
455 img.set_from_file('/usr/lib/linuxmint/mintMenu/search_engines/hardware.png')
456 menuItem.set_image(img)
457 - menuItem.connect("activate", self.search_mint_hardware)
458 + menuItem.connect("activate", self.search_arch_bugs)
459 menu.append(menuItem)
461 - menuItem = gtk.ImageMenuItem(_("Find Ideas"))
462 + menuItem = gtk.ImageMenuItem(_("Search Arch Wiki"))
463 img = gtk.Image()
464 - img.set_from_file('/usr/lib/linuxmint/mintMenu/search_engines/ideas.png')
465 + img.set_from_file('/usr/lib/linuxmint/mintMenu/search_engines/tutorials.png')
466 menuItem.set_image(img)
467 - menuItem.connect("activate", self.search_mint_ideas)
468 + menuItem.connect("activate", self.search_arch_wiki)
469 menu.append(menuItem)
471 - menuItem = gtk.ImageMenuItem(_("Find Users"))
472 - img = gtk.Image()
473 - img.set_from_file('/usr/lib/linuxmint/mintMenu/search_engines/users.png')
474 - menuItem.set_image(img)
475 - menuItem.connect("activate", self.search_mint_users)
476 - menu.append(menuItem)
477 +# menuItem = gtk.ImageMenuItem(_("Find Users"))
478 +# img = gtk.Image()
479 +# img.set_from_file('/usr/lib/linuxmint/mintMenu/search_engines/users.png')
480 +# menuItem.set_image(img)
481 +# menuItem.connect("activate", self.search_mint_users)
482 +# menu.append(menuItem)
484 menu.show_all()
485 #menu.popup( None, None, self.pos_func, 3, 0)
486 @@ -1090,34 +917,34 @@
487 os.system("gnome-dictionary \"" + text + "\" &")
488 self.mintMenuWin.hide()
490 - def search_mint_tutorials(self, widget):
491 + def search_aur_software(self, widget):
492 text = self.searchEntry.get_text()
493 text = text.replace(" ", "%20")
494 - os.system("xdg-open \"http://community.linuxmint.com/index.php/tutorial/search/0/" + text + "\" &")
495 + os.system("xdg-open \"http://aur.archlinux.org/packages.php?O=0&K=" + text + "\" &")
496 self.mintMenuWin.hide()
498 - def search_mint_ideas(self, widget):
499 + def search_arch_wiki(self, widget):
500 text = self.searchEntry.get_text()
501 text = text.replace(" ", "%20")
502 - os.system("xdg-open \"http://community.linuxmint.com/index.php/idea/search/0/" + text + "\" &")
503 + os.system("xdg-open \"http://wiki.archlinux.org/index.php?title=Special:Search&search=" + text + "\" &")
504 self.mintMenuWin.hide()
506 - def search_mint_users(self, widget):
507 - text = self.searchEntry.get_text()
508 - text = text.replace(" ", "%20")
509 - os.system("xdg-open \"http://community.linuxmint.com/index.php/user/search/0/" + text + "\" &")
510 - self.mintMenuWin.hide()
511 +# def search_mint_users(self, widget):
512 +# text = self.searchEntry.get_text()
513 +# text = text.replace(" ", "%20")
514 +# os.system("xdg-open \"http://community.linuxmint.com/index.php/user/search/0/" + text + "\" &")
515 +# self.mintMenuWin.hide()
517 - def search_mint_hardware(self, widget):
518 + def search_arch_bugs(self, widget):
519 text = self.searchEntry.get_text()
520 text = text.replace(" ", "%20")
521 - os.system("xdg-open \"http://community.linuxmint.com/index.php/hardware/search/0/" + text + "\" &")
522 + os.system("xdg-open \"https://bugs.archlinux.org/index.php?string=" + text + "&project=0\" &")
523 self.mintMenuWin.hide()
525 - def search_mint_software(self, widget):
526 + def search_arch_software(self, widget):
527 text = self.searchEntry.get_text()
528 text = text.replace(" ", "%20")
529 - os.system("xdg-open \"http://community.linuxmint.com/index.php/software/search/0/" + text + "\" &")
530 + os.system("xdg-open \"http://www.archlinux.org/packages/?q=" + text + "\" &")
531 self.mintMenuWin.hide()
534 diff -Nur usr.orig/lib/linuxmint/mintMenu/plugins/easybuttons.py usr/lib/linuxmint/mintMenu/plugins/easybuttons.py
535 --- usr.orig/lib/linuxmint/mintMenu/plugins/easybuttons.py 2011-03-29 18:45:21.000000000 +0200
536 +++ usr/lib/linuxmint/mintMenu/plugins/easybuttons.py 2011-03-31 16:42:53.260037619 +0200
537 @@ -1,4 +1,4 @@
538 -#!/usr/bin/env python
539 +#!/usr/bin/env python2
541 import gtk
542 import pango
543 @@ -368,7 +368,7 @@
544 def execute( self, *args ):
545 if self.appExec:
546 if self.useTerminal:
547 - cmd = "x-terminal-emulator -e \"" + self.appExec + "\""
548 + cmd = "gnome-terminal -e \"" + self.appExec + "\""
549 Execute(cmd)
550 else:
551 Execute(self.appExec)
552 diff -Nur usr.orig/lib/linuxmint/mintMenu/plugins/easyfiles.py usr/lib/linuxmint/mintMenu/plugins/easyfiles.py
553 --- usr.orig/lib/linuxmint/mintMenu/plugins/easyfiles.py 2011-03-29 18:45:21.000000000 +0200
554 +++ usr/lib/linuxmint/mintMenu/plugins/easyfiles.py 2011-03-31 16:42:53.263370930 +0200
555 @@ -1,4 +1,4 @@
556 -#!/usr/bin/env python
557 +#!/usr/bin/env python2
559 import os
560 import os.path
561 diff -Nur usr.orig/lib/linuxmint/mintMenu/plugins/easygconf.py usr/lib/linuxmint/mintMenu/plugins/easygconf.py
562 --- usr.orig/lib/linuxmint/mintMenu/plugins/easygconf.py 2011-03-29 18:45:21.000000000 +0200
563 +++ usr/lib/linuxmint/mintMenu/plugins/easygconf.py 2011-03-31 16:42:53.263370930 +0200
564 @@ -1,4 +1,4 @@
565 -#!/usr/bin/env python
566 +#!/usr/bin/env python2
568 import gconf
570 @@ -62,7 +62,7 @@
571 return self.client.set_string( key, value )
573 if type == "int":
574 - return self.client.set_int( key, value )
575 + return self.client.set_int( key, int(round(value)) )
577 if type == "color":
578 if self.evalColor( value ):
579 diff -Nur usr.orig/lib/linuxmint/mintMenu/plugins/get_apt_cache.py usr/lib/linuxmint/mintMenu/plugins/get_apt_cache.py
580 --- usr.orig/lib/linuxmint/mintMenu/plugins/get_apt_cache.py 2011-03-29 18:45:21.000000000 +0200
581 +++ usr/lib/linuxmint/mintMenu/plugins/get_apt_cache.py 2011-03-31 16:42:53.266704241 +0200
582 @@ -1,4 +1,4 @@
583 -#!/usr/bin/env python
584 +#!/usr/bin/env python2
586 import apt, sys
588 diff -Nur usr.orig/lib/linuxmint/mintMenu/plugins/places.py usr/lib/linuxmint/mintMenu/plugins/places.py
589 --- usr.orig/lib/linuxmint/mintMenu/plugins/places.py 2011-03-29 19:47:59.000000000 +0200
590 +++ usr/lib/linuxmint/mintMenu/plugins/places.py 2011-03-31 16:42:53.270037552 +0200
591 @@ -1,4 +1,4 @@
592 -#!/usr/bin/env python
593 +#!/usr/bin/env python2
595 import gtk
596 import gtk.glade
597 diff -Nur usr.orig/lib/linuxmint/mintMenu/plugins/system_management.py usr/lib/linuxmint/mintMenu/plugins/system_management.py
598 --- usr.orig/lib/linuxmint/mintMenu/plugins/system_management.py 2011-03-29 20:45:19.000000000 +0200
599 +++ usr/lib/linuxmint/mintMenu/plugins/system_management.py 2011-03-31 16:42:53.270037552 +0200
600 @@ -1,4 +1,4 @@
601 -#!/usr/bin/env python
602 +#!/usr/bin/env python2
604 import gtk
605 import gtk.glade
606 @@ -52,7 +52,7 @@
607 self.gconf.notifyAdd( "show_lock_screen", self.RegenPlugin )
608 self.gconf.notifyAdd( "show_logout", self.RegenPlugin )
609 self.gconf.notifyAdd( "show_package_manager", self.RegenPlugin )
610 - self.gconf.notifyAdd( "show_software_manager", self.RegenPlugin )
611 + self.gconf.notifyAdd( "show_root_terminal", self.RegenPlugin )
612 self.gconf.notifyAdd( "show_terminal", self.RegenPlugin )
613 self.gconf.notifyAdd( "show_quit", self.RegenPlugin )
614 self.gconf.notifyAdd( "allowScrollbar", self.RegenPlugin )
615 @@ -105,7 +105,7 @@
617 # Check toggles
619 - self.showSoftwareManager = self.gconf.get( "bool", "show_software_manager", True )
620 + self.showSoftwareManager = self.gconf.get( "bool", "show_root_terminal", True )
621 self.showPackageManager = self.gconf.get( "bool", "show_package_manager", True )
622 self.showControlCenter = self.gconf.get( "bool", "show_control_center", True )
623 self.showTerminal = self.gconf.get( "bool", "show_terminal", True )
624 @@ -131,16 +131,15 @@
625 def do_standard_items( self ):
627 if ( self.showSoftwareManager == True ):
628 - if os.path.exists("/usr/lib/linuxmint/mintInstall/icon.svg"):
629 - Button1 = easyButton( "applications-other", self.iconsize, [_("Software Manager")], -1, -1 )
630 - Button1.connect( "clicked", self.ButtonClicked, "mintinstall" )
631 - Button1.show()
632 - self.systemBtnHolder.pack_start( Button1, False, False )
633 - self.mintMenuWin.setTooltip( Button1, _("Browse and install available software") )
634 + Button1 = easyButton( "gksu-root-terminal", self.iconsize, [_("Root Terminal")], -1, -1 )
635 + Button1.connect( "clicked", self.ButtonClicked, "gksu -l gnome-terminal" )
636 + Button1.show()
637 + self.systemBtnHolder.pack_start( Button1, False, False )
638 + self.mintMenuWin.setTooltip( Button1, _("Open a terminal as the root user") )
640 if ( self.showPackageManager == True ):
641 - Button2 = easyButton( "applications-system", self.iconsize, [_("Package Manager")], -1, -1 )
642 - Button2.connect( "clicked", self.ButtonClicked, "gksu /usr/sbin/synaptic" )
643 + Button2 = easyButton( "pacman", self.iconsize, [_("Package Manager")], -1, -1 )
644 + Button2.connect( "clicked", self.ButtonClicked, "gksu /usr/bin/wakka" )
645 Button2.show()
646 self.systemBtnHolder.pack_start( Button2, False, False )
647 self.mintMenuWin.setTooltip( Button2, _("Install, remove and upgrade software packages") )
648 @@ -157,7 +156,7 @@
650 if ( self.showTerminal == True ):
651 Button4 = easyButton( "gnome-terminal", self.iconsize, [_("Terminal")], -1, -1 )
652 - Button4.connect( "clicked", self.ButtonClicked, "x-terminal-emulator" )
653 + Button4.connect( "clicked", self.ButtonClicked, "gnome-terminal" )
654 Button4.show()
655 self.systemBtnHolder.pack_start( Button4, False, False )
656 self.mintMenuWin.setTooltip( Button4, _("Use the command line") )