[alacarte] MainWindow: Use the appropriate editor when right-clicking on items
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [alacarte] MainWindow: Use the appropriate editor when right-clicking on items
- Date: Fri, 11 Jan 2013 06:40:29 +0000 (UTC)
commit b2ade7ec88217fd05533903110da24c0e6d51a83
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Jan 11 01:31:16 2013 -0500
MainWindow: Use the appropriate editor when right-clicking on items
Alacarte/MainWindow.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/Alacarte/MainWindow.py b/Alacarte/MainWindow.py
index 29dd1e5..bff2137 100644
--- a/Alacarte/MainWindow.py
+++ b/Alacarte/MainWindow.py
@@ -298,14 +298,16 @@ class MainWindow(object):
if isinstance(item, GMenu.TreeEntry):
file_path = os.path.join(util.getUserItemPath(), item.get_desktop_file_id())
file_type = 'Item'
+ Editor = LauncherEditor
elif isinstance(item, GMenu.TreeDirectory):
file_path = os.path.join(util.getUserDirectoryPath(), os.path.split(item.get_desktop_file_path())[1])
file_type = 'Menu'
+ Editor = DirectoryEditor
if not os.path.isfile(file_path):
shutil.copy(item.get_desktop_file_path(), file_path)
- editor = LauncherEditor(file_path)
+ editor = Editor(file_path)
editor.run()
def on_menu_tree_cursor_changed(self, treeview):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]