56 lines
2.5 KiB
Plaintext
56 lines
2.5 KiB
Plaintext
$OpenBSD: patch-Alacarte_MainWindow_py,v 1.2 2011/09/13 07:20:37 ajacoutot Exp $
|
|
|
|
From 8c33986006604f4fa308c439466f7de9b5c9227a Mon Sep 17 00:00:00 2001
|
|
From: Josselin Mouette <joss@debian.org>
|
|
Date: Mon, 22 Aug 2011 18:47:47 +0000
|
|
Subject: Fix Python error on startup with gnome-menus 2.91.6+
|
|
|
|
Try gnome-desktop-item-edit, and if not found fallback to exo-desktop-item-edit.
|
|
|
|
--- Alacarte/MainWindow.py.orig Tue Sep 8 16:24:13 2009
|
|
+++ Alacarte/MainWindow.py Tue Sep 13 08:54:29 2011
|
|
@@ -71,7 +71,6 @@ class MainWindow:
|
|
def run(self):
|
|
self.loadMenus()
|
|
self.editor.applications.tree.add_monitor(self.menuChanged, None)
|
|
- self.editor.settings.tree.add_monitor(self.menuChanged, None)
|
|
self.tree.get_object('mainwindow').show_all()
|
|
gtk.main()
|
|
|
|
@@ -295,7 +294,10 @@ class MainWindow:
|
|
else:
|
|
parent = menus[iter][2]
|
|
file_path = os.path.join(util.getUserDirectoryPath(), util.getUniqueFileId('alacarte-made', '.directory'))
|
|
- process = subprocess.Popen(['gnome-desktop-item-edit', file_path], env=os.environ)
|
|
+ try:
|
|
+ process = subprocess.Popen(['gnome-desktop-item-edit', file_path], env=os.environ)
|
|
+ except:
|
|
+ process = subprocess.Popen(['exo-desktop-item-edit', file_path], env=os.environ)
|
|
gobject.timeout_add(100, self.waitForNewMenuProcess, process, parent.menu_id, file_path)
|
|
|
|
def on_new_item_button_clicked(self, button):
|
|
@@ -308,7 +310,10 @@ class MainWindow:
|
|
else:
|
|
parent = menus[iter][2]
|
|
file_path = os.path.join(util.getUserItemPath(), util.getUniqueFileId('alacarte-made', '.desktop'))
|
|
- process = subprocess.Popen(['gnome-desktop-item-edit', file_path], env=os.environ)
|
|
+ try:
|
|
+ process = subprocess.Popen(['gnome-desktop-item-edit', file_path], env=os.environ)
|
|
+ except:
|
|
+ process = subprocess.Popen(['exo-desktop-item-edit', file_path], env=os.environ)
|
|
gobject.timeout_add(100, self.waitForNewItemProcess, process, parent.menu_id, file_path)
|
|
|
|
def on_new_separator_button_clicked(self, button):
|
|
@@ -379,7 +384,10 @@ class MainWindow:
|
|
self.editor._MenuEditor__addUndo([item,])
|
|
if file_path not in self.edit_pool:
|
|
self.edit_pool.append(file_path)
|
|
- process = subprocess.Popen(['gnome-desktop-item-edit', file_path], env=os.environ)
|
|
+ try:
|
|
+ process = subprocess.Popen(['gnome-desktop-item-edit', file_path], env=os.environ)
|
|
+ except:
|
|
+ process = subprocess.Popen(['exo-desktop-item-edit', file_path], env=os.environ)
|
|
gobject.timeout_add(100, self.waitForEditProcess, process, file_path)
|
|
|
|
def on_menu_tree_cursor_changed(self, treeview):
|