edubuntu-menueditor-1.3.5/0000775000175000017500000000000011674055126015741 5ustar stgraberstgraberedubuntu-menueditor-1.3.5/menueditor/0000775000175000017500000000000011674055126020114 5ustar stgraberstgraberedubuntu-menueditor-1.3.5/menueditor/AddsubmenuDialog.py0000664000175000017500000000623511674055126023703 0ustar stgraberstgraber# -*- coding: utf-8 -*- ### BEGIN LICENSE # Copyright (C) 2009 Révolution Linux #This program is free software: you can redistribute it and/or modify it #under the terms of the GNU General Public License version 3 or (at your option) #any later version, as published by the Free Software Foundation. # #This program is distributed in the hope that it will be useful, but #WITHOUT ANY WARRANTY; without even the implied warranties of #MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR #PURPOSE. See the GNU General Public License for more details. # #You should have received a copy of the GNU General Public License along #with this program. If not, see . ### END LICENSE import sys import os import gtk from menueditor.menueditorconfig import getdatapath class AddsubmenuDialog(gtk.Dialog): __gtype_name__ = "AddsubmenuDialog" def __init__(self): """__init__ - This function is typically not called directly. Creation of a AddsubmenuDialog requires redeading the associated ui file and parsing the ui definition extrenally, and then calling AddsubmenuDialog.finish_initializing(). Use the convenience function NewAddsubmenuDialog to create a AddsubmenuDialog object. """ pass def finish_initializing(self, builder): """finish_initalizing should be called after parsing the ui definition and creating a AddsubmenuDialog object with it in order to finish initializing the start of the new AddsubmenuDialog instance. """ #get a reference to the builder and set up the signals self.builder = builder self.builder.connect_signals(self) def ok(self, widget, data=None): """ok - The user has elected to save the changes. Called before the dialog returns gtk.RESONSE_OK from run(). """ pass def cancel(self, widget, data=None): """cancel - The user has elected cancel changes. Called before the dialog returns gtk.RESPONSE_CANCEL for run() """ pass @property def comment(self): return self.builder.get_object("entComment").get_text() def set_comment(self, text): return self.builder.get_object("entComment").set_text(text) @property def name(self): return self.builder.get_object("entName").get_text() def set_name(self, text): return self.builder.get_object("entName").set_text(text) def NewAddsubmenuDialog(): """NewAddsubmenuDialog - returns a fully instantiated dialog-addsubmenuDialog object. Use this function rather than creating AddsubmenuDialog instance directly. """ #look for the ui file that describes the ui ui_filename = os.path.join(getdatapath(), 'ui', 'AddsubmenuDialog.ui') if not os.path.exists(ui_filename): ui_filename = None builder = gtk.Builder() builder.add_from_file(ui_filename) dialog = builder.get_object("addsubmenu_dialog") dialog.finish_initializing(builder) return dialog if __name__ == "__main__": dialog = NewAddsubmenuDialog() dialog.show() gtk.main() edubuntu-menueditor-1.3.5/menueditor/MenuTreeModel.py0000664000175000017500000001470611674055126023203 0ustar stgraberstgraber# -*- coding: utf-8 -*- ### BEGIN LICENSE # Copyright (C) 2009 Révolution Linux #This program is free software: you can redistribute it and/or modify it #under the terms of the GNU General Public License version 3 or (at your option) #any later version, as published by the Free Software Foundation. # #This program is distributed in the hope that it will be useful, but #WITHOUT ANY WARRANTY; without even the implied warranties of #MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR #PURPOSE. See the GNU General Public License for more details. # #You should have received a copy of the GNU General Public License along #with this program. If not, see . ### END LICENSE import os import os.path import sys, gtk import gmenu def lookup_system_menu_file (menu_file): conf_dirs = None if os.environ.has_key ("XDG_CONFIG_DIRS"): conf_dirs = os.environ["XDG_CONFIG_DIRS"] if not conf_dirs: conf_dirs = "/etc/xdg" for conf_dir in conf_dirs.split (":"): menu_file_path = os.path.join (conf_dir, "menus", menu_file) if os.path.isfile (menu_file_path): return menu_file_path return None def load_icon_from_path (icon_path): if os.path.isfile (icon_path): try: return gtk.gdk.pixbuf_new_from_file_at_size (icon_path, 24, 24) except: pass return None def load_icon_from_data_dirs (icon_value): data_dirs = None if os.environ.has_key ("XDG_DATA_DIRS"): data_dirs = os.environ["XDG_DATA_DIRS"] if not data_dirs: data_dirs = "/usr/local/share/:/usr/share/" for data_dir in data_dirs.split (":"): retval = load_icon_from_path (os.path.join (data_dir, "pixmaps", icon_value)) if retval: return retval retval = load_icon_from_path (os.path.join (data_dir, "icons", icon_value)) if retval: return retval return None def load_icon (icon_theme, icon_value): if not icon_value: return if os.path.isabs (icon_value): icon = load_icon_from_path (icon_value) if icon: return icon icon_name = os.path.basename (icon_value) else: icon_name = icon_value if icon_name.endswith (".png"): icon_name = icon_name[:-len (".png")] elif icon_name.endswith (".xpm"): icon_name = icon_name[:-len (".xpm")] elif icon_name.endswith (".svg"): icon_name = icon_name[:-len (".svg")] try: return icon_theme.load_icon (icon_name, 24, 0) except: return load_icon_from_data_dirs (icon_value) class MenuTreeModel(gtk.TreeStore): ( COLUMN_IS_ENTRY, COLUMN_ID, COLUMN_NAME, COLUMN_ICON, COLUMN_ICON_NAME, COLUMN_MENU_FILE, COLUMN_SYSTEM_VISIBLE, COLUMN_USER_VISIBLE, COLUMN_USER_ADDED, COLUMN_COMMENT ) = range (10) def __init__(self, menu_files): gtk.TreeStore.__init__ (self, bool, str, str, gtk.gdk.Pixbuf, str, \ str, bool, bool, bool, str) self.entries_list_iter = None self.icon_theme = gtk.icon_theme_get_default () if (len (menu_files) < 1): menu_files = ["applications.menu", "settings.menu"] for menu_file in menu_files: tree = gmenu.lookup_tree (menu_file, gmenu.FLAGS_INCLUDE_EXCLUDED) tree.sort_key = gmenu.SORT_DISPLAY_NAME self.__append_directory (tree.root, None, False, menu_file) system_file = lookup_system_menu_file (menu_file) if system_file: system_tree = gmenu.lookup_tree (system_file, gmenu.FLAGS_INCLUDE_EXCLUDED) system_tree.sort_key = gmenu.SORT_DISPLAY_NAME self.__append_directory (system_tree.root, None, True, menu_file) def __append_directory (self, directory, parent_iter, system, menu_file): if not directory: return iter = self.iter_children (parent_iter) while iter: if self[iter][self.COLUMN_ID] == directory.menu_id: break iter = self.iter_next (iter) if not iter: iter = self.append (parent_iter) self[iter][self.COLUMN_IS_ENTRY] = False self[iter][self.COLUMN_ID] = directory.menu_id self[iter][self.COLUMN_NAME] = directory.name self[iter][self.COLUMN_ICON] = load_icon (self.icon_theme, directory.icon) self[iter][self.COLUMN_ICON_NAME] = directory.icon self[iter][self.COLUMN_USER_ADDED] = False self[iter][self.COLUMN_COMMENT] = directory.comment if not menu_file is None: self[iter][self.COLUMN_MENU_FILE] = menu_file if system: self[iter][self.COLUMN_SYSTEM_VISIBLE] = True else: self[iter][self.COLUMN_USER_VISIBLE] = True for child_item in directory.contents: if isinstance (child_item, gmenu.Directory): self.__append_directory (child_item, iter, system, None) if not isinstance (child_item, gmenu.Entry): continue child_iter = self.iter_children (iter) while child_iter: if child_item.type == gmenu.TYPE_ENTRY and \ self[child_iter][self.COLUMN_IS_ENTRY] and \ self[child_iter][self.COLUMN_ID] == child_item.desktop_file_id: break child_iter = self.iter_next (child_iter) if not child_iter: child_iter = self.append (iter) self[child_iter][self.COLUMN_IS_ENTRY] = True self[child_iter][self.COLUMN_ID] = child_item.desktop_file_id self[child_iter][self.COLUMN_NAME] = child_item.display_name self[child_iter][self.COLUMN_ICON] = load_icon (self.icon_theme, child_item.icon) self[child_iter][self.COLUMN_ICON_NAME] = child_item.icon self[child_iter][self.COLUMN_USER_ADDED] = False self[child_iter][self.COLUMN_COMMENT] = child_item.comment if system: self[child_iter][self.COLUMN_SYSTEM_VISIBLE] = not child_item.is_excluded else: self[child_iter][self.COLUMN_USER_VISIBLE] = not child_item.is_excluded edubuntu-menueditor-1.3.5/menueditor/FileWriter.py0000664000175000017500000001556511674055126022556 0ustar stgraberstgraber# -*- coding: utf-8 -*- ### BEGIN LICENSE # Copyright (C) 2009 Révolution Linux #This program is free software: you can redistribute it and/or modify it #under the terms of the GNU General Public License version 3 or (at your option) #any later version, as published by the Free Software Foundation. # #This program is distributed in the hope that it will be useful, but #WITHOUT ANY WARRANTY; without even the implied warranties of #MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR #PURPOSE. See the GNU General Public License for more details. # #You should have received a copy of the GNU General Public License along #with this program. If not, see . ### END LICENSE import os import tempfile from menueditor import MenuTreeModel class FileWriter(): def __init__(self, menu_tree_model, filename): self.model = menu_tree_model self.tmp_dir = tempfile.mkdtemp() self.create_tree() self.sync() self.create_tar_gz(self.tmp_dir,filename) self.cleanup_tmp_dir() def append_menu (self, contents, indent, iter, system_menu_file = None): has_changes = False orig_contents = contents contents += indent + "\n" contents += indent + " %s\n" % self.model[iter][self.model.COLUMN_ID] #only if we are managing a directory. For the moment we do not manage new application user_added = self.model[iter][self.model.COLUMN_USER_ADDED] if user_added: contents += indent + " %s\n" % self.create_directory(self.model,iter) if system_menu_file: contents += indent + ' %s\n' % system_menu_file includes = [] excludes = [] child_iter = self.model.iter_children (iter) while child_iter: if self.model[child_iter][self.model.COLUMN_IS_ENTRY]: desktop_file_id = self.model[child_iter][self.model.COLUMN_ID] system_visible = self.model[child_iter][self.model.COLUMN_SYSTEM_VISIBLE] user_visible = self.model[child_iter][self.model.COLUMN_USER_VISIBLE] if not system_visible and user_visible: includes.append (desktop_file_id) elif system_visible and not user_visible: excludes.append (desktop_file_id) child_iter = self.model.iter_next (child_iter) if len (includes) > 0: contents += indent + " \n" for desktop_file_id in includes: contents += indent + " %s\n" % desktop_file_id contents += indent + " \n" has_changes = True if len (excludes) > 0: contents += indent + " \n" for desktop_file_id in excludes: contents += indent + " %s\n" % desktop_file_id contents += indent + " \n" has_changes = True child_iter = self.model.iter_children (iter) while child_iter: if not self.model[child_iter][self.model.COLUMN_IS_ENTRY]: (contents, subdir_has_changes) = self.append_menu (contents, indent + " ", child_iter) if not has_changes: has_changes = subdir_has_changes child_iter = self.model.iter_next (child_iter) if has_changes: return (contents + indent + "\n", True) else: return (orig_contents, False) def cleanup_tmp_dir(self): """Cleanup a directory tree""" import shutil shutil.rmtree(self.tmp_dir) def create_tar_gz(self,directory,destination): """This function create a tar.gz file of the directory""" import tarfile if os.path.exists(destination): # We have user confirmation to overwrite. os.remove(destination) target = tarfile.TarFile.open(destination, "w:gz") target.add(directory,arcname=os.path.basename(".")) target.close() return True def create_tree(self): """ create the tree containing the files. """ dirs = ['xdg/menus/applications-merged','share/desktop-directories'] for dir in dirs: try: os.makedirs(os.path.join(self.tmp_dir,dir)) except OSError: pass def create_directory(self,model,iter): """This function create the .directory file for submenu.""" # Create the string text = "[Desktop Entry]\n" text += "Name=" + model[iter][self.model.COLUMN_NAME] + "\n" text += "Comment=" + model[iter][self.model.COLUMN_COMMENT] + "\n" text += "Icon=" + model[iter][self.model.COLUMN_ICON_NAME] + "\n" text += "Type=Directory\n" file_dir = os.path.join(self.tmp_dir,"share/desktop-directories") file_name = model[iter][self.model.COLUMN_ID] if not os.path.exists(os.path.join(file_dir,file_name+".directory")): name = os.path.join(file_dir,file_name+".directory") else: old_file = open(os.path.join(file_dir,file_name+".directory")) old_text = old_file.read() old_file.close() if old_text == text: return os.path.basename(os.path.join(file_dir,file_name+".directory")) else: i = 1 while os.path.exists(os.path.join(file_dir,file_name+"_"+str(i)+".directory")): i += 1 name = os.path.join(file_dir,file_name+"_"+str(i)+".directory") file = open(name,'w') file.write(text) file.close() return os.path.basename(name) def sync (self): DTD_DECLARATION = '\n' # get the first element iter = self.model.get_iter_first() while iter: menu_file = None menu_file = self.model.get_value(iter, self.model.COLUMN_MENU_FILE) system_file = None system_file = MenuTreeModel.lookup_system_menu_file(menu_file) if system_file: (contents, has_changes) = self.append_menu (DTD_DECLARATION, \ "", iter, system_file) # if there are changes, write the file else, do nothing if has_changes: file = open(os.path.join(self.tmp_dir, "xdg/menus", menu_file), 'w') file.write(contents) file.close() iter = self.model.iter_next(iter) edubuntu-menueditor-1.3.5/menueditor/AboutMenueditorDialog.py0000664000175000017500000000507611674055126024724 0ustar stgraberstgraber# -*- coding: utf-8 -*- ### BEGIN LICENSE # Copyright (C) 2009 Révolution Linux #This program is free software: you can redistribute it and/or modify it #under the terms of the GNU General Public License version 3 or (at your option) #any later version, as published by the Free Software Foundation. # #This program is distributed in the hope that it will be useful, but #WITHOUT ANY WARRANTY; without even the implied warranties of #MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR #PURPOSE. See the GNU General Public License for more details. # #You should have received a copy of the GNU General Public License along #with this program. If not, see . ### END LICENSE import sys import os import gtk from menueditor.menueditorconfig import getdatapath class AboutMenueditorDialog(gtk.AboutDialog): __gtype_name__ = "AboutMenueditorDialog" def __init__(self): """__init__ - This function is typically not called directly. Creation of a AboutMenueditorDialog requires redeading the associated ui file and parsing the ui definition extrenally, and then calling AboutMenueditorDialog.finish_initializing(). Use the convenience function NewAboutMenueditorDialog to create NewAboutMenueditorDialog objects. """ pass def finish_initializing(self, builder): """finish_initalizing should be called after parsing the ui definition and creating a AboutMenueditorDialog object with it in order to finish initializing the start of the new AboutMenueditorDialog instance. """ #get a reference to the builder and set up the signals self.builder = builder self.builder.connect_signals(self) #code for other initialization actions should be added here def NewAboutMenueditorDialog(): """NewAboutMenueditorDialog - returns a fully instantiated AboutMenueditorDialog object. Use this function rather than creating a AboutMenueditorDialog instance directly. """ #look for the ui file that describes the ui ui_filename = os.path.join(getdatapath(), 'ui', 'AboutMenueditorDialog.ui') if not os.path.exists(ui_filename): ui_filename = None builder = gtk.Builder() builder.add_from_file(ui_filename) dialog = builder.get_object("about_menueditor_dialog") dialog.finish_initializing(builder) return dialog if __name__ == "__main__": dialog = NewAboutMenueditorDialog() dialog.show() gtk.main() edubuntu-menueditor-1.3.5/menueditor/menueditorconfig.py0000664000175000017500000000336311674055126024034 0ustar stgraberstgraber# -*- coding: utf-8 -*- ### BEGIN LICENSE # Copyright (C) 2009 Révolution Linux #This program is free software: you can redistribute it and/or modify it #under the terms of the GNU General Public License version 3 or (at your option) #any later version, as published by the Free Software Foundation. # #This program is distributed in the hope that it will be useful, but #WITHOUT ANY WARRANTY; without even the implied warranties of #MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR #PURPOSE. See the GNU General Public License for more details. # #You should have received a copy of the GNU General Public License along #with this program. If not, see . ### END LICENSE # THIS IS Menueditor CONFIGURATION FILE # YOU CAN PUT THERE SOME GLOBAL VALUE # Do not touch until you know what you're doing. # you're warned :) # where your project will head for your data (for instance, images and ui files) # by default, this is ../data, relative your trunk layout __menueditor_data_directory__ = '../data/' import os class project_path_not_found(Exception): pass def getdatapath(): """Retrieve menueditor data path This path is by default /../data/ in trunk and /usr/share/menueditor in an installed version but this path is specified at installation time. """ # get pathname absolute or relative if __menueditor_data_directory__.startswith('/'): pathname = __menueditor_data_directory__ else: pathname = '/usr/share/edubuntu-menueditor/' abs_data_path = os.path.abspath(pathname) if os.path.exists(abs_data_path): return abs_data_path else: raise project_path_not_found edubuntu-menueditor-1.3.5/menueditor/__init__.py0000664000175000017500000000000011674055126022213 0ustar stgraberstgraberedubuntu-menueditor-1.3.5/AUTHORS0000664000175000017500000000013211674055126017005 0ustar stgraberstgraber# Copyright (C) 2009 Révolution Linux inc edubuntu-menueditor-1.3.5/data/0000775000175000017500000000000011674055126016652 5ustar stgraberstgraberedubuntu-menueditor-1.3.5/data/ui/0000775000175000017500000000000011674055126017267 5ustar stgraberstgraberedubuntu-menueditor-1.3.5/data/ui/AboutMenueditorDialog.ui0000664000175000017500000000440211674055126024054 0ustar stgraberstgraber 5 ../media/edubuntu-icon.svg normal False Menueditor True vertical 2 True Menueditor is used to create tar.gz file of a directory of for being applied by desktop-profiles. 2 True Copyright© 2009-2010 Marc Gariépy <mgariepy@revolutionlinux.com> Révolution Linux Inc. center 3 True end False end 0 edubuntu-menueditor-1.3.5/data/ui/ProfilenameDialog.ui0000664000175000017500000001150511674055126023211 0ustar stgraberstgraber 5 ../media/edubuntu-icon.svg normal False True vertical 2 True vertical True Specify the name of the imported profile. 0 True True _Name True entName False False 0 True True False False 1 1 1 True end gtk-cancel True True True True False False 0 gtk-ok True True True True False False 1 False end 0 button2 button1 edubuntu-menueditor-1.3.5/data/ui/about_menueditor_dialog.xml0000664000175000017500000000063311674055126024677 0ustar stgraberstgraber edubuntu-menueditor-1.3.5/data/ui/menueditor_window.xml0000664000175000017500000000057111674055126023556 0ustar stgraberstgraber edubuntu-menueditor-1.3.5/data/ui/profilemanager_window.xml0000664000175000017500000000061111674055126024371 0ustar stgraberstgraber edubuntu-menueditor-1.3.5/data/ui/AboutProfilemanagerDialog.ui0000664000175000017500000000521611674055126024700 0ustar stgraberstgraber 5 ../media/edubuntu-icon.svg normal False Profilemanager True vertical 2 True vertical True Profilemanager is used as a front-end to apply different menu profiles to groups. 0 True Copyright© 2009-2010 Marc Gariépy <mgariepy@revolutionlinux.com> Révolution Linux Inc. center 1 2 True end False end 0 edubuntu-menueditor-1.3.5/data/ui/about_profilemanager_dialog.xml0000664000175000017500000000065311674055126025521 0ustar stgraberstgraber edubuntu-menueditor-1.3.5/data/ui/MenueditorWindow.ui0000664000175000017500000001563311674055126023141 0ustar stgraberstgraber 450 460 Menueditor ../media/edubuntu-icon.svg True 5 True True _File True True gtk-save True True True True gtk-quit True True True True _Help True True gtk-about True True True gtk-help True True True False 0 True True automatic automatic True True 1 True automatic automatic True True True 2 True True _Add Sub-menu True True _Edit Sub-menu True True _Delete Item True edubuntu-menueditor-1.3.5/data/ui/addsubmenu_dialog.xml0000664000175000017500000000057611674055126023467 0ustar stgraberstgraber edubuntu-menueditor-1.3.5/data/ui/profilename_dialog.xml0000664000175000017500000000060111674055126023626 0ustar stgraberstgraber edubuntu-menueditor-1.3.5/data/ui/ProfilemanagerWindow.ui0000664000175000017500000002760511674055126023763 0ustar stgraberstgraber 600 500 Profilemanager ../media/edubuntu-icon.svg True 5 True True _File True True gtk-save True True True True gtk-quit True True True True _View True True True Show systems groups True True _Help True True gtk-about True True True gtk-help True True True False 0 True 5 True True 0 0 5 Groups False False 0 True True automatic automatic True True 1 0 True True 0 5 Menus False False 0 True True automatic automatic True True 1 1 1 True True 0 0 5 Group and menu associations False False 0 True True automatic automatic True True 1 2 True True Import new profile True True Delete Item True True Remove True edubuntu-menueditor-1.3.5/data/ui/AddsubmenuDialog.ui0000664000175000017500000001500711674055126023040 0ustar stgraberstgraber 5 ../media/edubuntu-icon.svg normal False True vertical 2 True vertical True spread 15 True _Name: True entName False False 0 True True False False 1 False False 12 0 True spread 20 True Co_mment: True entComment False False 0 True True False False 1 False False 12 1 1 True end gtk-cancel True True True True False False 0 gtk-ok True True True True False False 1 False end 0 button2 button1 edubuntu-menueditor-1.3.5/data/media/0000775000175000017500000000000011674055126017731 5ustar stgraberstgraberedubuntu-menueditor-1.3.5/data/media/edubuntu-icon.svg0000664000175000017500000001360711674055126023242 0ustar stgraberstgraber image/svg+xml edubuntu-menueditor-1.3.5/CREDIT0000664000175000017500000000047511674055126016644 0ustar stgraberstgraberI would like to say thanks for the authors of gmenu-simple-editor since I used their code to create menueditor/MenuTreeModel.py and menueditor/FileWriter.py. Code of gmenu-simple-editor is release under GNU General Public License version 2. Mark McLoughlin Havoc Pennington edubuntu-menueditor-1.3.5/LICENSE0000664000175000017500000010437411674055126016757 0ustar stgraberstgraber GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . edubuntu-menueditor-1.3.5/profilemanager.desktop.in0000664000175000017500000000051111674055126022731 0ustar stgraberstgraber[Desktop Entry] Name=Edubuntu menu editor - Profile manager Comment=Edubuntu menu editor - Profile manager Categories=System;Settings; Exec=gksu --desktop /usr/share/applications/profilemanager.desktop profilemanager Icon=/usr/share/edubuntu-menueditor/media/edubuntu-icon.svg StartupNotify=false Terminal=false Type=Application edubuntu-menueditor-1.3.5/.quickly0000664000175000017500000000007611674055126017426 0ustar stgraberstgraberproject = menueditor template = ubuntu-project format = 0.2.5 edubuntu-menueditor-1.3.5/menueditor.10000664000175000017500000000114611674055126020200 0ustar stgraberstgraber\"Created with GNOME Manpages Editor Wizard .\"http://sourceforge.net/projects/gmanedit2 .TH menueditor 1 "January 29, 2010" "" "Edubuntu menueditor" .SH NAME menueditor \- program for creating menu profiles. .SH SYNOPSIS .B menueditor .SH DESCRIPTION This manual page explains the .B menueditor program. This program can be used to create menu profiles for users. .PP \fBmenueditor\fP create archive containing menu files and .directory file for added submenus. .SH "SEE ALSO" profilemanager(1), desktop-profiles(7) .SH BUGS Please report bugs on launchpad : https://bugs.launchpad.net/menueditor/+filebug edubuntu-menueditor-1.3.5/profilemanager/0000775000175000017500000000000011674055126020734 5ustar stgraberstgraberedubuntu-menueditor-1.3.5/profilemanager/profilemanagerconfig.py0000664000175000017500000000341711674055126025474 0ustar stgraberstgraber# -*- coding: utf-8 -*- ### BEGIN LICENSE # Copyright (C) 2009 Révolution Linux #This program is free software: you can redistribute it and/or modify it #under the terms of the GNU General Public License version 3 or (at your option) #any later version, as published by the Free Software Foundation. # #This program is distributed in the hope that it will be useful, but #WITHOUT ANY WARRANTY; without even the implied warranties of #MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR #PURPOSE. See the GNU General Public License for more details. # #You should have received a copy of the GNU General Public License along #with this program. If not, see . ### END LICENSE # THIS IS Profilemanager CONFIGURATION FILE # YOU CAN PUT THERE SOME GLOBAL VALUE # Do not touch until you know what you're doing. # you're warned :) # where your project will head for your data (for instance, images and ui files) # by default, this is ../data, relative your trunk layout __profilemanager_data_directory__ = '../data/' import os class project_path_not_found(Exception): pass def getdatapath(): """Retrieve profilemanager data path This path is by default /../data/ in trunk and /usr/share/profilemanager in an installed version but this path is specified at installation time. """ # get pathname absolute or relative if __profilemanager_data_directory__.startswith('/'): pathname = __profilemanager_data_directory__ else: pathname = '/usr/share/edubuntu-menueditor/' abs_data_path = os.path.abspath(pathname) if os.path.exists(abs_data_path): return abs_data_path else: raise project_path_not_found edubuntu-menueditor-1.3.5/profilemanager/ProfilenameDialog.py0000664000175000017500000000575611674055126024704 0ustar stgraberstgraber# -*- coding: utf-8 -*- ### BEGIN LICENSE # Copyright (C) 2009 Révolution Linux #This program is free software: you can redistribute it and/or modify it #under the terms of the GNU General Public License version 3 or (at your option) #any later version, as published by the Free Software Foundation. # #This program is distributed in the hope that it will be useful, but #WITHOUT ANY WARRANTY; without even the implied warranties of #MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR #PURPOSE. See the GNU General Public License for more details. # #You should have received a copy of the GNU General Public License along #with this program. If not, see . ### END LICENSE import sys import os import gtk from profilemanager.profilemanagerconfig import getdatapath class ProfilenameDialog(gtk.Dialog): __gtype_name__ = "ProfilenameDialog" def __init__(self): """__init__ - This function is typically not called directly. Creation of a ProfilenameDialog requires redeading the associated ui file and parsing the ui definition extrenally, and then calling ProfilenameDialog.finish_initializing(). Use the convenience function NewProfilenameDialog to create a ProfilenameDialog object. """ pass def finish_initializing(self, builder): """finish_initalizing should be called after parsing the ui definition and creating a ProfilenameDialog object with it in order to finish initializing the start of the new ProfilenameDialog instance. """ #get a reference to the builder and set up the signals self.builder = builder self.builder.connect_signals(self) def ok(self, widget, data=None): """ok - The user has elected to save the changes. Called before the dialog returns gtk.RESONSE_OK from run(). """ pass def cancel(self, widget, data=None): """cancel - The user has elected cancel changes. Called before the dialog returns gtk.RESPONSE_CANCEL for run() """ pass @property def name(self): return self.builder.get_object("entName").get_text() def set_name(self, text): return self.builder.get_object("entName").set_text(text) def NewProfilenameDialog(): """NewProfilenameDialog - returns a fully instantiated dialog-ProfilenameDialog object. Use this function rather than creating ProfilenameDialog instance directly. """ #look for the ui file that describes the ui ui_filename = os.path.join(getdatapath(), 'ui', 'ProfilenameDialog.ui') if not os.path.exists(ui_filename): ui_filename = None builder = gtk.Builder() builder.add_from_file(ui_filename) dialog = builder.get_object("profilename_dialog") dialog.finish_initializing(builder) return dialog if __name__ == "__main__": dialog = NewProfilenameDialog() dialog.show() gtk.main() edubuntu-menueditor-1.3.5/profilemanager/__init__.py0000664000175000017500000000000011674055126023033 0ustar stgraberstgraberedubuntu-menueditor-1.3.5/profilemanager/AboutProfilemanagerDialog.py0000664000175000017500000000516711674055126026365 0ustar stgraberstgraber# -*- coding: utf-8 -*- ### BEGIN LICENSE # Copyright (C) 2009 Révolution Linux #This program is free software: you can redistribute it and/or modify it #under the terms of the GNU General Public License version 3 or (at your option) #any later version, as published by the Free Software Foundation. # #This program is distributed in the hope that it will be useful, but #WITHOUT ANY WARRANTY; without even the implied warranties of #MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR #PURPOSE. See the GNU General Public License for more details. # #You should have received a copy of the GNU General Public License along #with this program. If not, see . ### END LICENSE import sys import os import gtk import grp from profilemanager.profilemanagerconfig import getdatapath class AboutProfilemanagerDialog(gtk.AboutDialog): __gtype_name__ = "AboutProfilemanagerDialog" def __init__(self): """__init__ - This function is typically not called directly. Creation of a AboutProfilemanagerDialog requires redeading the associated ui file and parsing the ui definition extrenally, and then calling AboutProfilemanagerDialog.finish_initializing(). Use the convenience function NewAboutProfilemanagerDialog to create NewAboutProfilemanagerDialog objects. """ pass def finish_initializing(self, builder): """finish_initalizing should be called after parsing the ui definition and creating a AboutProfilemanagerDialog object with it in order to finish initializing the start of the new AboutProfilemanagerDialog instance. """ #get a reference to the builder and set up the signals self.builder = builder self.builder.connect_signals(self) #code for other initialization actions should be added here def NewAboutProfilemanagerDialog(): """NewAboutProfilemanagerDialog - returns a fully instantiated AboutProfilemanagerDialog object. Use this function rather than creating a AboutProfilemanagerDialog instance directly. """ #look for the ui file that describes the ui ui_filename = os.path.join(getdatapath(), 'ui', 'AboutProfilemanagerDialog.ui') if not os.path.exists(ui_filename): ui_filename = None builder = gtk.Builder() builder.add_from_file(ui_filename) dialog = builder.get_object("about_profilemanager_dialog") dialog.finish_initializing(builder) return dialog if __name__ == "__main__": dialog = NewAboutProfilemanagerDialog() dialog.show() gtk.main() edubuntu-menueditor-1.3.5/profilemanager/ProfileManagerModels.py0000664000175000017500000002337511674055126025357 0ustar stgraberstgraber# -*- coding: utf-8 -*- ### BEGIN LICENSE # Copyright (C) 2009 Révolution Linux #This program is free software: you can redistribute it and/or modify it #under the terms of the GNU General Public License version 3 or (at your option) #any later version, as published by the Free Software Foundation. # #This program is distributed in the hope that it will be useful, but #WITHOUT ANY WARRANTY; without even the implied warranties of #MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR #PURPOSE. See the GNU General Public License for more details. # #You should have received a copy of the GNU General Public License along #with this program. If not, see . ### END LICENSE import sys import os import gtk import grp import glob, csv class GroupsModel(gtk.ListStore): ( GROUP_NAME, GROUP_GID, ) = range(2) def __init__(self): gtk.ListStore.__init__(self, str, int) self.fill_model(self.get_groups()) def add_group(self, name, gid): # TODO: need to validate the data. gr_name = [] gr_gid = [] for item in self.get_groups(): gr_name.append(item.gr_name) gr_gid.append(item.gr_gid) if gid not in gr_gid and name not in gr_name: self.append([name, gid]) return True else: return False def fill_model(self, list): for item in list: self.append([item.gr_name, item.gr_gid]) def remove_groups(self,list): for item in list: iter_to_remove = self.iter_for_group(item.gr_name) if iter_to_remove: self.remove(iter_to_remove) def append_group_if_valid(self,name): system_groups = self.get_groups() for group in system_groups: if group.gr_name == name: self.append([group.gr_name, group.gr_gid]) def get_groups(self): groups = grp.getgrall() gr_list = [] for group in groups: if group.gr_gid >= 1000 and group.gr_name != "nogroup": gr_list.append(group) return gr_list def get_system_groups(self): groups = grp.getgrall() gr_list = [] for group in groups: if group.gr_gid < 1000: gr_list.append(group) return gr_list def iter_for_group(self, name): # return the iter of the group or None iter = self.get_iter_first() while iter: if self.get_value(iter, self.GROUP_NAME) == name: return iter iter = self.iter_next(iter) return None class MenusModel(gtk.ListStore): ( MENU_NAME, MENU_PATH ) = range(2) def __init__(self): gtk.ListStore.__init__(self, str, str) self.fill_model(self.get_menus_list()) def add_menu(self, name, path): self.append([name, path]) return True def create_tar_gz(self,directory,destination): """This function create a tar.gz file of the directory""" import tarfile if os.path.exists(destination): # We have user confirmation to overwrite. os.remove(destination) target = tarfile.TarFile.open(destination, "w:gz") target.add(directory,arcname=os.path.basename(".")) target.close() return True def fill_model(self, list): for item in list: self.append([item["name"], item["path"]]) def get_menus_list(self): dir_list = [] for path in ["/etc/edubuntu-menueditor","/usr/share/edubuntu-menueditor/menus"]: for dir in os.listdir(path): if os.path.isdir(os.path.join(path,dir)): dir_list.append({"name":dir, "path":os.path.join(path,dir)}) dir_list.sort() return dir_list def import_archive(self, name, archive_path): # this function will create the directory "name" in # /etc/edubuntu-menueditor/name then extract files from the archive. import tarfile dest = os.path.join("/etc/edubuntu-menueditor",name) # if the path doesn't exist, create it, else, return False. if not os.path.exists(dest): tar = tarfile.open(archive_path,"r:gz") os.mkdir(dest) tar.extractall(dest) tar.close() for root, dirs, files in os.walk(os.path.join("/etc/edubuntu-menueditor",name)): for dir in dirs: os.chown(os.path.join(root,dir),0,0) for file in files: os.chown(os.path.join(root,file),0,0) os.chmod(dest,0755) os.chown(dest,0,0) self.add_menu(name,dest) return True else: return False class GroupsManagerModel(gtk.ListStore): ( GROUP, MENU_NAME, MENU_PATH, XDG_DATA_PATH, XDG_CONFIG_PATH, FILE_PATH ) = range(6) def __init__(self,groups_model): gtk.ListStore.__init__(self, str, str, str, str, str, str) self.COMMENT_STRING="#This file is managed by ProfileManager, Do not edit by hand" self.groups_model = groups_model self.fill_model(self.file_parser()) def file_parser(self): # my two row in config file will be like the following: # type-group-profilename ;type ;path ; ;group ;COMMENT1 # XDG_DATA-group-datadir1 ;XDG_DATA ;/etc/profile-manager/datadir1/share/ ; ;group ;COMMENT1 # XDG_CONFIG-group-datadir1 ;XDG_CONFIG ;/etc/profile-manager/datadir1/xdg/ ; ;group ;COMMENT1 # i need to have : # 1- "name" : name # test = {row["names"]:{"GROUP":"group","XDG_DATA":"xdg_data_path","XDG_CONFIG":"xdg_config_path","FILE_PATH":file_path}} content_dict = {} for file in glob.glob("/etc/desktop-profiles/*.listing"): with open(file) as content: data = {} name = "" csvreader = csv.DictReader(content,delimiter=";", \ fieldnames=["name","type","path","priority","group","comment"]) for row in csvreader: # is it our file? if yes, parse it. if row["comment"] == self.COMMENT_STRING: # test the name to be consistant if name == "": name = row["name"].split(row["type"] + "-")[1] elif name != row["name"].split(row["type"] + "-")[1]: #TODO: add stuff here to control what append when the name doesn't match. name = "" print "name doesn't match name : %s, row : %s" % (name, row["name"].split(row["type"] + "-")[1]) # test the group to be consistant if data.has_key("GROUP"): if not data["GROUP"] == row["group"]:\ #TODO: add stuff here to control what appen if the groups doesn't match. break print "Key error, the two groups doesn't match data : %s , row : %s" % (data["GROUP"], row["group"]) else: data["GROUP"] = row["group"] # add the file path to the dict if not data.has_key("FILE_PATH"): data["FILE_PATH"] = file data[row["type"]] = row["path"] if data.has_key("GROUP") and data.has_key("XDG_DATA") and \ data.has_key("XDG_CONFIG") and data.has_key("FILE_PATH") \ and name != "": content_dict[name] = data return content_dict def fill_model(self, dict_data): for entry in dict_data: #if os.path.dirname(dict_data[entry]["XDG_DATA"] == os.path.dirname(dict_data[entry]["XDG_CONFIG"]: menu_path = os.path.dirname(dict_data[entry]["XDG_DATA"]) menu_name = os.path.basename(menu_path) self.append([dict_data[entry]["GROUP"], menu_name, menu_path, \ dict_data[entry]["XDG_DATA"],dict_data[entry]["XDG_CONFIG"],\ dict_data[entry]["FILE_PATH"]]) iter_to_remove = self.groups_model.iter_for_group(dict_data[entry]["GROUP"]) if iter_to_remove: self.groups_model.remove(iter_to_remove) def cleanup_groups(self): iter = self.get_iter_first() while iter: iter_to_remove = self.groups_model.iter_for_group(self.get_value(iter, self.GROUP)) if iter_to_remove: self.groups_model.remove(iter_to_remove) iter = self.iter_next(iter) def save_all_new_files(self): # if the file exist (self.FILE_PATH), i suppose it's right. # if it doesn't, create it! iter = self.get_iter_first() while iter: content = "" group = "" file = self.get_value(iter, self.FILE_PATH) if not os.path.exists(file): group = self.get_value(iter, self.GROUP) content = "XDG_DATA-"+ group + "-" +self.get_value(iter, self.MENU_NAME) + ";XDG_DATA;" + self.get_value(iter, self.XDG_DATA_PATH) + ";10;" + group + ";" + self.COMMENT_STRING + "\n" content += "XDG_CONFIG-" + group + "-" + self.get_value(iter, self.MENU_NAME) + ";XDG_CONFIG;" + self.get_value(iter, self.XDG_CONFIG_PATH) + ";10;" + group + ";" + self.COMMENT_STRING + "\n" opened_file = open(file,"w") opened_file.write(content) opened_file.close() iter = self.iter_next(iter) edubuntu-menueditor-1.3.5/bin/0000775000175000017500000000000011674055126016511 5ustar stgraberstgraberedubuntu-menueditor-1.3.5/bin/menueditor0000775000175000017500000004004211674055126020612 0ustar stgraberstgraber#!/usr/bin/python # -*- coding: utf-8 -*- ### BEGIN LICENSE # Copyright (C) 2009 Révolution Linux #This program is free software: you can redistribute it and/or modify it #under the terms of the GNU General Public License version 3 or (at your option) #any later version, as published by the Free Software Foundation. # #This program is distributed in the hope that it will be useful, but #WITHOUT ANY WARRANTY; without even the implied warranties of #MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR #PURPOSE. See the GNU General Public License for more details. # #You should have received a copy of the GNU General Public License along #with this program. If not, see . ### END LICENSE import sys import os import gtk import gettext from gettext import gettext as _ gettext.textdomain("edubuntu-menueditor") # Check if we are working in the source tree or from the installed # package and mangle the python path accordingly if os.path.dirname(sys.argv[0]) != ".": if sys.argv[0][0] == "/": fullPath = os.path.dirname(sys.argv[0]) else: fullPath = os.getcwd() + "/" + os.path.dirname(sys.argv[0]) else: fullPath = os.getcwd() sys.path.insert(0, os.path.dirname(fullPath)) from menueditor import AboutMenueditorDialog, AddsubmenuDialog, \ MenuTreeModel, FileWriter from menueditor.menueditorconfig import getdatapath class MenueditorWindow(gtk.Window): __gtype_name__ = "MenueditorWindow" TARGETS = [ ('Row', gtk.TARGET_SAME_WIDGET, 0), ] def __init__(self): """__init__ - This function is typically not called directly. Creation a MenueditorWindow requires redeading the associated ui file and parsing the ui definition extrenally, and then calling MenueditorWindow.finish_initializing(). Use the convenience function NewMenueditorWindow to create MenueditorWindow object. """ pass def finish_initializing(self, builder): """finish_initalizing should be called after parsing the ui definition and creating a MenueditorWindow object with it in order to finish initializing the start of the new MenueditorWindow instance. """ #get a reference to the builder and set up the signals self.builder = builder self.builder.connect_signals(self) #code for other initialization actions should be added here self.tvMenuModel = MenuTreeModel.MenuTreeModel([]) self.tvMenu = self.builder.get_object("tvMenu") self.menuPopup = self.builder.get_object("menuPopup") self.setup_tvMenu() self.tvMenu.enable_model_drag_source(gtk.gdk.BUTTON1_MASK, self.TARGETS , gtk.gdk.ACTION_COPY) self.tvMenu.enable_model_drag_dest(self.TARGETS,gtk.gdk.ACTION_COPY) #self.tvDebug = builder.get_object("tvDebug") #self.setup_tvDebug() def about(self, widget, data=None): """about - display the about box for menueditor """ about = AboutMenueditorDialog.NewAboutMenueditorDialog() response = about.run() about.destroy() def launch_help(self, widget, data=None): import webbrowser webbrowser.open("https://wiki.ubuntu.com/Edubuntu/Documentation/Edubuntu-menueditor") def setup_tvMenu(self): self.tvMenu.set_model(self.tvMenuModel) self.tvMenu.get_selection().set_mode (gtk.SELECTION_SINGLE) self.tvMenu.set_headers_visible (True) column = gtk.TreeViewColumn(_("Name")) column.set_spacing(6) cell = gtk.CellRendererPixbuf () column.pack_start (cell, False) column.set_attributes (cell, pixbuf = self.tvMenuModel.COLUMN_ICON) cell = gtk.CellRendererText () column.pack_start (cell, False) column.set_expand(True) column.set_attributes (cell, text = self.tvMenuModel.COLUMN_NAME) # Adding the column Name to the treeview self.tvMenu.append_column(column) column = gtk.TreeViewColumn (_("Show")) cell = gtk.CellRendererToggle() cell.set_property("xalign",.5) cell.set_property("is-expanded",True) column.set_spacing(6) # TODO: add third state : inconsistant = true if not all child are selected. # this will require of using number instead of a bool. cell.connect("toggled", self.on_toggled, self.tvMenuModel) column.pack_start(cell, True) column.set_alignment(0.5) column.set_attributes(cell, active = self.tvMenuModel.COLUMN_USER_VISIBLE) # Adding the column Show to the treeview self.tvMenu.append_column(column) # expand the two menus self.tvMenu.expand_row( (0,), False) self.tvMenu.expand_row( (1,), False) def setup_tvDebug(self): """ This is debug code only for developpement purpose. To have an actual view of the data. """ self.tvDebug.set_model(self.tvMenuModel) self.tvDebug.set_headers_visible(True) lists = [ "COLUMN_IS_ENTRY", "COLUMN_ID", "COLUMN_NAME", "COLUMN_ICON", "COLUMN_ICON_NAME", "COLUMN_MENU_FILE", "COLUMN_SYSTEM_VISIBLE", "COLUMN_USER_VISIBLE", "COLUMN_USER_ADDED", "COLUMN_COMMENT" ] for i in range(10): column = gtk.TreeViewColumn(lists[i]) self.tvDebug.append_column(column) if i == 3: cell=gtk.CellRendererPixbuf() column.set_spacing(6) column.pack_start(cell,True) column.set_attributes(cell, pixbuf = self.tvMenuModel.__getattribute__(lists[i])) else: cell=gtk.CellRendererText() column.pack_start(cell,True) column.set_attributes(cell, text = self.tvMenuModel.__getattribute__(lists[i])) self.tvDebug.expand_all() def treeview_copy_row(self, treeview, model, source, target, drop_position): # TODO: need to insert the item at the correct place. # sort menu then entry, + alpha. source_row = model[source] source_isentry = model.get_value(source,model.COLUMN_IS_ENTRY) target_isentry = model.get_value(target,model.COLUMN_IS_ENTRY) # If the user drop into a desktop, assume he want to drop into the parent. if target_isentry: target = model.iter_parent(target) # Verify the content of the parent to be sure not to make a copy twice. iter = model.iter_children (target) while iter: if model.get_value(iter, model.COLUMN_ID) == \ model.get_value(source, model.COLUMN_ID): return iter = model.iter_next(iter) # test if the user try to drop the items into his parent. # i assume he want to reorder the menu. if model.get_path(model.iter_parent(source)) == model.get_path(target): error_dlg = gtk.MessageDialog(type=gtk.MESSAGE_ERROR, \ message_format = _("Sorry, layout in the menu is not yet supported."), \ buttons=gtk.BUTTONS_OK) error_dlg.run() error_dlg.destroy() return if not source_isentry: new = model.prepend(target, source_row) else: new = model.append(target, source_row) model.set_value(new, model.COLUMN_SYSTEM_VISIBLE ,False) model.set_value(new, model.COLUMN_USER_ADDED, True) # this copy all the children of the source into the new position. for n in range(model.iter_n_children(source)): child = model.iter_nth_child(source, n) self.treeview_copy_row(treeview, model, child, new, gtk.TREE_VIEW_DROP_INTO_OR_BEFORE) treeview.expand_to_path(model.get_path(new)) def on_tvMenu_button_press_event(self, treeview, event): if event.button == 3: x = int(event.x) y = int(event.y) time = event.time pthinfo = treeview.get_path_at_pos(x, y) if pthinfo is not None: path, col, cellx, celly = pthinfo treeview.grab_focus() treeview.set_cursor(path, col, 0) # Show menu item only if they are user added. selection = self.tvMenu.get_selection() model, iter = selection.get_selected() if model[iter][model.COLUMN_USER_ADDED]: self.builder.get_object("menuDelSub").set_property("sensitive",True) if not model[iter][model.COLUMN_IS_ENTRY]: self.builder.get_object("menuEditSub").set_property("sensitive",True) else: self.builder.get_object("menuDelSub").set_property("sensitive",False) self.builder.get_object("menuEditSub").set_property("sensitive",False) self.menuPopup.popup( None, None, None, event.button, time) return True def on_tvMenu_drag_data_received(self, treeview, drag_context, x, y, selection_data, info, eventtime): target_path, drop_position = treeview.get_dest_row_at_pos(x, y) model, source = treeview.get_selection().get_selected() target = model.get_iter(target_path) # test if the target is a child of the source # and if the target and the source are the same. if not model.is_ancestor(source, target) and \ not (model.get_path(source) == model.get_path(target)): self.treeview_copy_row(treeview, model, source, target, drop_position) # drag_context.finish( success=True, del_=bool, time=eventtime) # The del_=False make the copy instead of the moving. drag_context.finish(True, False, eventtime) else: drag_context.finish(False, False, eventtime) def on_menuAddSub_activate(self, widget): # TODO: need to insert new submenu in order by the name selection = self.tvMenu.get_selection() model, iter = selection.get_selected() response, name, comment = (None, "", "") while not name and not (response == gtk.RESPONSE_CANCEL or response == gtk.RESPONSE_DELETE_EVENT): response, name, comment = self.submenuDialog(name, comment) #if response == gtk.RESPONSE_CANCEL or response == gtk.RESPONSE_DELETE_EVENT: # return if response == gtk.RESPONSE_OK and not name: error_dlg = gtk.MessageDialog(type=gtk.MESSAGE_ERROR, \ message_format = _("You need to enter the name with at least one character in the Name field."), \ buttons=gtk.BUTTONS_OK) error_dlg.run() error_dlg.destroy() elif response == gtk.RESPONSE_OK and name: data = (False , "MenuEditor-" + name.replace(" ","_"), \ name, \ MenuTreeModel.load_icon(gtk.icon_theme_get_default(), "distributor-logo"), \ "distributor-logo", None, False, True, True, comment) if model.get_value(iter, model.COLUMN_IS_ENTRY): model.prepend(model.iter_parent(iter),data) else: model.prepend(iter,data) return def on_menuDelSub_activate(self, widget): selection = self.tvMenu.get_selection() model, iter = selection.get_selected() if model[iter][self.tvMenuModel.COLUMN_USER_ADDED]: model.remove(iter) else: pass def on_menuEditSub_activate(self, widget): selection = self.tvMenu.get_selection() model, iter = selection.get_selected() old_name = model[iter][self.tvMenuModel.COLUMN_NAME] old_comment = model[iter][self.tvMenuModel.COLUMN_COMMENT] response, name, comment = self.submenuDialog(old_name, old_comment) if response == gtk.RESPONSE_OK: model.set(iter, model.COLUMN_COMMENT, \ comment, model.COLUMN_NAME, \ name, \ model.COLUMN_ID, \ "MenuEditor-" + name.replace(" ","_")) def on_toggled(self, toggle, path, model): iter = model.get_iter_from_string(path) val = model.get_value(iter, model.COLUMN_USER_VISIBLE) self.set_recursively_child_of_parent(model, iter, model.COLUMN_USER_VISIBLE, not val) def set_recursively_child_of_parent (self, model, parent_iter, column, value): model.set_value(parent_iter, column, value) iter = model.iter_children (parent_iter) while iter: if model.get_value(iter, model.COLUMN_IS_ENTRY): model.set_value(iter, column, value) else: self.set_recursively_child_of_parent(model, iter, column, value) iter = model.iter_next(iter) def create_filechooser_save(self): #TODO: Validate the filename (automaticly add extention, etc) buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, \ gtk.STOCK_SAVE, gtk.RESPONSE_OK) filechooser = gtk.FileChooserDialog(_("Save As..."), \ None, \ gtk.FILE_CHOOSER_ACTION_SAVE, \ buttons) filechooser.set_do_overwrite_confirmation(True) self.add_filters(filechooser) return filechooser def add_filters(self, filechooser): filter = gtk.FileFilter() filter.set_name(_("Archive")) filter.add_pattern("*.tar.gz") filechooser.add_filter(filter) filter = gtk.FileFilter() filter.set_name(_("All files")) filter.add_pattern("*") filechooser.add_filter(filter) def saveDialog(self,widget): filechooser = self.create_filechooser_save() response = filechooser.run() if response == gtk.RESPONSE_OK: FileWriter.FileWriter(self.tvMenuModel, \ filechooser.get_filename()) filechooser.destroy() return def submenuDialog(self, name="", comment=""): NewSubmenuDialog = AddsubmenuDialog.NewAddsubmenuDialog() NewSubmenuDialog.set_name(name) NewSubmenuDialog.set_comment(comment) response = NewSubmenuDialog.run() name = NewSubmenuDialog.name comment = NewSubmenuDialog.comment NewSubmenuDialog.destroy() return (response, name, comment) def quit(self, widget, data=None): """quit - signal handler for closing the MenueditorWindow""" self.destroy() def on_destroy(self, widget, data=None): """on_destroy - called when the MenueditorWindow is close. """ #clean up code for saving application state should be added here gtk.main_quit() def NewMenueditorWindow(): """NewMenueditorWindow - returns a fully instantiated MenueditorWindow object. Use this function rather than creating a MenueditorWindow directly. """ if not gtk.gdk.display_get_default(): logging.critical("Display not found") sys.exit(1) #look for the ui file that describes the ui ui_filename = os.path.join(getdatapath(), 'ui', 'MenueditorWindow.ui') if not os.path.exists(ui_filename): ui_filename = None builder = gtk.Builder() builder.add_from_file(ui_filename) window = builder.get_object("menueditor_window") window.finish_initializing(builder) return window if __name__ == "__main__": #support for command line options import logging, optparse parser = optparse.OptionParser(version="%prog %ver") parser.add_option("-v", "--verbose", action="store_true", dest="verbose", help="Show debug messages") (options, args) = parser.parse_args() #set the logging level to show debug messages if options.verbose: logging.basicConfig(level=logging.DEBUG) logging.debug('logging enabled') #run the application window = NewMenueditorWindow() window.show() gtk.main() edubuntu-menueditor-1.3.5/bin/profilemanager0000775000175000017500000004043211674055126021435 0ustar stgraberstgraber#!/usr/bin/python # -*- coding: utf-8 -*- ### BEGIN LICENSE # Copyright (C) 2009 Révolution Linux #This program is free software: you can redistribute it and/or modify it #under the terms of the GNU General Public License version 3 or (at your option) #any later version, as published by the Free Software Foundation. # #This program is distributed in the hope that it will be useful, but #WITHOUT ANY WARRANTY; without even the implied warranties of #MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR #PURPOSE. See the GNU General Public License for more details. # #You should have received a copy of the GNU General Public License along #with this program. If not, see . ### END LICENSE import sys import os import gtk import grp import shutil import gettext from gettext import gettext as _ gettext.textdomain("edubuntu-menueditor") # Check if we are working in the source tree or from the installed # package and mangle the python path accordingly if os.path.dirname(sys.argv[0]) != ".": if sys.argv[0][0] == "/": fullPath = os.path.dirname(sys.argv[0]) else: fullPath = os.getcwd() + "/" + os.path.dirname(sys.argv[0]) else: fullPath = os.getcwd() sys.path.insert(0, os.path.dirname(fullPath)) from profilemanager import AboutProfilemanagerDialog, ProfileManagerModels, ProfilenameDialog from profilemanager.profilemanagerconfig import getdatapath class ProfilemanagerWindow(gtk.Window): __gtype_name__ = "ProfilemanagerWindow" TARGETS = [ ( 'Row', gtk.TARGET_SAME_APP, 0), ] def __init__(self): """__init__ - This function is typically not called directly. Creation a ProfilemanagerWindow requires redeading the associated ui file and parsing the ui definition extrenally, and then calling ProfilemanagerWindow.finish_initializing(). Use the convenience function NewProfilemanagerWindow to create ProfilemanagerWindow object. """ pass def finish_initializing(self, builder): """finish_initalizing should be called after parsing the ui definition and creating a ProfilemanagerWindow object with it in order to finish initializing the start of the new ProfilemanagerWindow instance. """ #get a reference to the builder and set up the signals self.builder = builder self.builder.connect_signals(self) #code for other initialization actions should be added here # load all needed object self.tvGroups = self.builder.get_object("tvGroups") self.tvMenus = self.builder.get_object("tvMenus") self.tvGroupsManager = self.builder.get_object("tvGroupsManager") self.menuPopup = self.builder.get_object("menuPopup") # Setup models self.tvGroupsModel = ProfileManagerModels.GroupsModel() self.tvMenusModel = ProfileManagerModels.MenusModel() self.tvGroupsManagerModel = ProfileManagerModels.GroupsManagerModel(self.tvGroupsModel) # Fill treeview self.setup_tvGroups() self.setup_tvMenus() self.setup_tvGroupsManager() # Adding DND for tvMenus and tvGroups self.tvMenus.enable_model_drag_source(gtk.gdk.BUTTON1_MASK, self.TARGETS, gtk.gdk.ACTION_DEFAULT|gtk.gdk.ACTION_MOVE|gtk.gdk.ACTION_COPY) self.tvGroups.enable_model_drag_dest( self.TARGETS, gtk.gdk.ACTION_DEFAULT|gtk.gdk.ACTION_MOVE|gtk.gdk.ACTION_COPY) self.tvMenus.connect('drag-data-get', self.on_drag) self.tvGroups.connect('drag-data-received',self.on_drop, self.tvMenus) # This should be added later to enable dnd on both side. self.tvMenus.enable_model_drag_dest( self.TARGETS, gtk.gdk.ACTION_DEFAULT|gtk.gdk.ACTION_MOVE|gtk.gdk.ACTION_COPY) self.tvGroups.enable_model_drag_source(gtk.gdk.BUTTON1_MASK, self.TARGETS, gtk.gdk.ACTION_DEFAULT|gtk.gdk.ACTION_MOVE|gtk.gdk.ACTION_COPY) self.tvGroups.connect('drag-data-get', self.on_drag) self.tvMenus.connect('drag-data-received', self.on_drop, self.tvGroups) def setup_tvGroups(self): self.tvGroups.set_model(self.tvGroupsModel) self.tvGroups.set_headers_visible(False) # setup column Name column = gtk.TreeViewColumn(_("Name")) cell = gtk.CellRendererText() column.pack_start(cell, False) column.set_attributes(cell, text = self.tvGroupsModel.GROUP_NAME) self.tvGroups.append_column(column) # setup column gid column = gtk.TreeViewColumn(_("Gid")) cell = gtk.CellRendererText() column.pack_start(cell, False) column.set_attributes(cell, text = self.tvGroupsModel.GROUP_GID) self.tvGroups.append_column(column) def setup_tvMenus(self): self.tvMenus.set_model(self.tvMenusModel) self.tvMenus.set_headers_visible(False) #setup column Name column = gtk.TreeViewColumn(_("Menu name")) cell = gtk.CellRendererText() column.pack_start(cell, False) column.set_attributes(cell, text = self.tvMenusModel.MENU_NAME) self.tvMenus.append_column(column) #setup column Path column = gtk.TreeViewColumn(_("Menu path")) cell = gtk.CellRendererText() column.pack_start(cell, False) column.set_attributes(cell, text = self.tvMenusModel.MENU_PATH) self.tvMenus.append_column(column) def setup_tvGroupsManager(self): self.tvGroupsManager.set_model(self.tvGroupsManagerModel) self.tvGroupsManager.set_headers_visible(False) column = gtk.TreeViewColumn(_("Groups")) cell = gtk.CellRendererText() column.pack_start(cell, False) column.set_attributes(cell, text = self.tvGroupsManagerModel.GROUP) self.tvGroupsManager.append_column(column) column = gtk.TreeViewColumn(_("Menu name")) cell = gtk.CellRendererText() column.pack_start(cell, False) column.set_attributes(cell, text = self.tvGroupsManagerModel.MENU_NAME) self.tvGroupsManager.append_column(column) column = gtk.TreeViewColumn(_("menu_path")) cell = gtk.CellRendererText() column.pack_start(cell, False) column.set_attributes(cell, text = self.tvGroupsManagerModel.FILE_PATH) self.tvGroupsManager.append_column(column) def add_listing_to_model(self): # make sur we have all needed data before inserting it. basedir = "/etc/desktop-profiles/" data = {} name = "" if self.dict_data.has_key("MENU_NAME") and self.dict_data.has_key("MENU_PATH") and self.dict_data.has_key("GROUP"): name = self.dict_data["GROUP"] + "-" + self.dict_data["MENU_NAME"] data["GROUP"] = self.dict_data["GROUP"] data["FILE_PATH"] = os.path.join(basedir, name + ".listing") data["XDG_DATA"] = os.path.join(self.dict_data["MENU_PATH"], "share") data["XDG_CONFIG"] = os.path.join(self.dict_data["MENU_PATH"], "xdg") self.tvGroupsManagerModel.fill_model({name:data}) def on_cmiviewsystemgroups_toggled(self, status): if status.get_active(): self.tvGroupsModel.fill_model(self.tvGroupsModel.get_system_groups()) self.tvGroupsManagerModel.cleanup_groups() else: self.tvGroupsModel.remove_groups(self.tvGroupsModel.get_system_groups()) def on_drag(self, treeview, drag_context, selection_data, info, eventtime): self.dict_data = {} selection = treeview.get_selection() model, iter = selection.get_selected() if iter: if model == self.tvGroupsModel: self.dict_data["GROUP"] = model[iter][model.GROUP_NAME] self.dict_data["ITER"] = iter else: self.dict_data["MENU_NAME"] = model[iter][model.MENU_NAME] self.dict_data["MENU_PATH"] = model[iter][model.MENU_PATH] def on_drop(self, treeview, drag_context, x, y, selection_data, info, timestamp, src_treeview): target_path, drop_position = treeview.get_dest_row_at_pos(x, y) if not (drop_position == gtk.TREE_VIEW_DROP_INTO_OR_BEFORE or drop_position == gtk.TREE_VIEW_DROP_INTO_OR_AFTER): print _("you need to drop into an item") return model = treeview.get_model() iter = model.get_iter(target_path) if iter: if model == self.tvGroupsModel: if not self.dict_data.has_key("GROUP") and not self.dict_data.has_key("ITER"): self.dict_data["GROUP"] = model[iter][model.GROUP_NAME] self.dict_data["ITER"] = iter elif not self.dict_data.has_key("MENU_NAME") and not self.dict_data.has_key("MENU_PATH"): self.dict_data["MENU_NAME"] = model[iter][model.MENU_NAME] self.dict_data["MENU_PATH"] = model[iter][model.MENU_PATH] self.add_listing_to_model() def on_tv_button_press_event(self, treeview, event): if event.button == 3: time = event.time pathinfo = treeview.get_path_at_pos(int(event.x),int(event.y)) if pathinfo is not None: path, col, cellx, celly = pathinfo treeview.grab_focus() treeview.set_cursor(path, col, 0) # Show menu item only if they are user added. selection = treeview.get_selection() model, iter = selection.get_selected() if model == self.tvMenusModel: self.builder.get_object("menuImport").set_property("visible", True) self.builder.get_object("menuDelete").set_property("visible", True) self.builder.get_object("menuRemove").set_property("visible", False) if model[iter][model.MENU_PATH].startswith("/etc/edubuntu-menueditor/"): self.builder.get_object("menuDelete").set_property("sensitive",True) else: self.builder.get_object("menuDelete").set_property("sensitive",False) self.menuPopup.popup( None, None, None, event.button, time) elif model == self.tvGroupsManagerModel: self.builder.get_object("menuImport").set_property("visible", False) self.builder.get_object("menuDelete").set_property("visible", False) self.builder.get_object("menuRemove").set_property("visible", True) self.menuPopup.popup(None, None, None, event.button, time) else: if treeview == self.tvMenus: self.builder.get_object("menuImport").set_property("visible", True) self.builder.get_object("menuDelete").set_property("visible", True) self.builder.get_object("menuRemove").set_property("visible", False) self.builder.get_object("menuDelete").set_property("sensitive",False) self.menuPopup.popup( None, None, None, event.button, time) return True def on_menuSave_activate(self, widget): self.tvGroupsManagerModel.save_all_new_files() def on_menuDelete_activate(self, widget): selection = self.tvMenus.get_selection() model, iter = selection.get_selected() menu_name = model[iter][model.MENU_NAME] dialog = gtk.MessageDialog(type = gtk.MESSAGE_QUESTION, \ message_format = _("Are you sure you want to delete ") \ + menu_name + _(" from the disk ?"), buttons = gtk.BUTTONS_YES_NO ) response = dialog.run() if response == gtk.RESPONSE_YES: shutil.rmtree(model[iter][model.MENU_PATH]) model.remove(iter) dialog.destroy() def on_menuImport_activate(self, widget): file = "" filechooser = self.create_filechooser_open() response = filechooser.run() if response == gtk.RESPONSE_OK: file = filechooser.get_filename() filechooser.destroy() if file != "": suggest_name = os.path.basename(file).split(".tar.gz")[0] name = self.ask_user(suggest_name) if name != "": self.tvMenusModel.import_archive(name, file) def on_menuRemove_activate(self, widget): selection = self.tvGroupsManager.get_selection() model, iter = selection.get_selected() profile_path = model[iter][model.FILE_PATH] if os.path.exists(profile_path): dialog = gtk.MessageDialog(type = gtk.MESSAGE_QUESTION, \ message_format = _("Are you sure you want to delete ") \ + profile_path + _(" from the disk ?"), buttons = gtk.BUTTONS_YES_NO) response = dialog.run() dialog.destroy() if response == gtk.RESPONSE_NO: return os.remove(profile_path) self.tvGroupsModel.append_group_if_valid(model[iter][model.GROUP]) model.remove(iter) def ask_user(self,suggest_name): name = "" NewProfilenameDialog = ProfilenameDialog.NewProfilenameDialog() NewProfilenameDialog.set_name(suggest_name) response = NewProfilenameDialog.run() if response == gtk.RESPONSE_OK: name = NewProfilenameDialog.name NewProfilenameDialog.destroy() tmp = "" for ch in name: if ch.isalnum() or ch == '.' or ch == '-' or ch == '_': tmp+=ch else: tmp+='_' return tmp def create_filechooser_open(self): buttons = ( gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, \ gtk.STOCK_OPEN, gtk.RESPONSE_OK) filechooser = gtk.FileChooserDialog(_("Open..."), None, \ gtk.FILE_CHOOSER_ACTION_OPEN, \ buttons) filter = gtk.FileFilter() filter.set_name(_("Archive")) filter.add_pattern("*.tar.gz") filechooser.add_filter(filter) filter = gtk.FileFilter() filter.set_name(_("All files")) filter.add_pattern("*") filechooser.add_filter(filter) return filechooser def open_dialog(self): filename = "" filedialog = self.create_filechooser_open() response = filedialog.run() if response == gtk.RESPONSE_OK: filename = filedialog.get_filename() filedialog.destroy() return filename def about(self, widget, data=None): """about - display the about box for profilemanager """ about = AboutProfilemanagerDialog.NewAboutProfilemanagerDialog() response = about.run() about.destroy() def launch_help(self, widget, data=None): import webbrowser webbrowser.open("https://wiki.ubuntu.com/Edubuntu/Documentation/Edubuntu-menueditor") def quit(self, widget, data=None): """quit - signal handler for closing the ProfilemanagerWindow""" self.destroy() def on_destroy(self, widget, data=None): """on_destroy - called when the ProfilemanagerWindow is close. """ #clean up code for saving application state should be added here gtk.main_quit() def NewProfilemanagerWindow(): """NewProfilemanagerWindow - returns a fully instantiated ProfilemanagerWindow object. Use this function rather than creating a ProfilemanagerWindow directly. """ if not gtk.gdk.display_get_default(): logging.critical("Display not found") sys.exit(1) #look for the ui file that describes the ui ui_filename = os.path.join(getdatapath(), 'ui', 'ProfilemanagerWindow.ui') if not os.path.exists(ui_filename): ui_filename = None builder = gtk.Builder() builder.add_from_file(ui_filename) window = builder.get_object("profilemanager_window") window.finish_initializing(builder) return window if __name__ == "__main__": #support for command line options import logging, optparse parser = optparse.OptionParser(version="%prog %ver") parser.add_option("-v", "--verbose", action="store_true", dest="verbose", help="Show debug messages") (options, args) = parser.parse_args() #set the logging level to show debug messages if options.verbose: logging.basicConfig(level=logging.DEBUG) logging.debug('logging enabled') #run the application window = NewProfilemanagerWindow() window.show() gtk.main() edubuntu-menueditor-1.3.5/README0000664000175000017500000000017611674055126016625 0ustar stgraberstgraberTo launch glade for editing the file you should use the following command: GLADE_CATALOG_PATH=./data/ui glade-3 data/ui/*.ui edubuntu-menueditor-1.3.5/setup.py0000664000175000017500000001022411674055126017452 0ustar stgraberstgraber#!/usr/bin/env python # -*- coding: utf-8 -*- ### BEGIN LICENSE # Copyright (C) 2009 Révolution Linux #This program is free software: you can redistribute it and/or modify it #under the terms of the GNU General Public License version 3 or (at your option) #any later version, as published by the Free Software Foundation. # #This program is distributed in the hope that it will be useful, but #WITHOUT ANY WARRANTY; without even the implied warranties of #MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR #PURPOSE. See the GNU General Public License for more details. # #You should have received a copy of the GNU General Public License along #with this program. If not, see . ### END LICENSE ###################### DO NOT TOUCH THIS (HEAD TO THE SECOND PART) ###################### try: import DistUtilsExtra.auto except ImportError: import sys print >> sys.stderr, 'To build menueditor you need https://launchpad.net/python-distutils-extra' sys.exit(1) assert DistUtilsExtra.auto.__version__ >= '2.10', 'needs DistUtilsExtra.auto >= 2.10' import os def update_data_path(prefix, oldvalue=None): try: fin = file('menueditor/menueditorconfig.py', 'r') fout = file(fin.name + '.new', 'w') for line in fin: fields = line.split(' = ') # Separate variable from value if fields[0] == '__menueditor_data_directory__': # update to prefix, store oldvalue if not oldvalue: oldvalue = fields[1] line = "%s = '%s'\n" % (fields[0], prefix) else: # restore oldvalue line = "%s = %s" % (fields[0], oldvalue) fout.write(line) fout.flush() fout.close() fin.close() os.rename(fout.name, fin.name) except (OSError, IOError), e: print ("ERROR: Can't find menueditor/menueditorconfig.py") sys.exit(1) return oldvalue def update_desktop_file(datadir): try: fin = file('menueditor.desktop.in', 'r') fout = file(fin.name + '.new', 'w') for line in fin: if 'Icon=' in line: line = "Icon=%s\n" % (datadir + 'media/edubuntu-icon.svg') fout.write(line) fout.flush() fout.close() fin.close() os.rename(fout.name, fin.name) except (OSError, IOError), e: print ("ERROR: Can't find menueditor.desktop.in") sys.exit(1) class InstallAndUpdateDataDirectory(DistUtilsExtra.auto.install_auto): def run(self): if self.root or self.home: print "WARNING: You don't use a standard --prefix installation, take care that you eventually " \ "need to update quickly/quicklyconfig.py file to adjust __quickly_data_directory__. You can " \ "ignore this warning if you are packaging and uses --prefix." previous_value = update_data_path(self.prefix + '/share/menueditor/') update_desktop_file(self.prefix + '/share/menueditor/') DistUtilsExtra.auto.install_auto.run(self) update_data_path(self.prefix, previous_value) ################################################################################## ###################### YOU SHOULD MODIFY ONLY WHAT IS BELOW ###################### ################################################################################## DistUtilsExtra.auto.setup( name='edubuntu-menueditor', version='0.1', license='GPL-3', author='Marc Gariépy', author_email='mgariepy@revolutionlinux.com', description='UI for creating menus profiles and apply them to users.', long_description='UI for creating menus profiles and apply them to users via desktop-profiles.', url='https://launchpad.net/menueditor', packages = ['menueditor','profilemanager'], package_dir = {'menueditor':'menueditor','profilemanager':'profilemanager'}, data_files=[ ('/usr/bin', ['bin/menueditor','bin/profilemanager']), ('/usr/share/edubuntu-menueditor/menus', []), ('/etc/edubuntu-menueditor', []) ] ) edubuntu-menueditor-1.3.5/profilemanager.10000664000175000017500000000137311674055126021022 0ustar stgraberstgraber.\"Created with GNOME Manpages Editor Wizard .\"http://sourceforge.net/projects/gmanedit2 .TH profilemanager 1 "January 29, 2010" "" "Edubuntu menueditor" .SH NAME profilemanager \- program for applying menu profiles to groups. .SH SYNOPSIS .B profilemanager .SH DESCRIPTION This manual page explains the .B profilemanager program. This program can be used to apply menueditor created profiles to groups of users. .PP \fBprofilemanager\fP apply menu profile to user using desktop-profiles. .SH FILES Those directory contains applicable profiles: .br /usr/share/edubuntu-menueditor/menus/ .br /etc/edubuntu-menueditor/ .SH "SEE ALSO" menueditor(1), destop-profiles(7) .SH BUGS Please report bugs on launchpad : https://bugs.launchpad.net/menueditor/+filebug edubuntu-menueditor-1.3.5/po/0000775000175000017500000000000011674055126016357 5ustar stgraberstgraberedubuntu-menueditor-1.3.5/po/generate-pot.sh0000664000175000017500000000017111674055126021304 0ustar stgraberstgraber#!/bin/sh cd .. python setup.py build_i18n rm -Rf build/ cd po xgettext -L python ../bin/* -j -o edubuntu-menueditor.pot edubuntu-menueditor-1.3.5/po/edubuntu-menueditor.pot0000664000175000017500000000720411674055126023112 0ustar stgraberstgraber# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-09-14 11:23-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: ../data/ui/MenueditorWindow.ui.h:1 msgid "Menueditor" msgstr "" #: ../data/ui/MenueditorWindow.ui.h:2 msgid "_Add Sub-Menu" msgstr "" #: ../data/ui/MenueditorWindow.ui.h:3 msgid "_Delete item" msgstr "" #: ../data/ui/MenueditorWindow.ui.h:4 msgid "_Edit Sub-menu" msgstr "" #: ../data/ui/MenueditorWindow.ui.h:5 ../data/ui/ProfilemanagerWindow.ui.h:9 msgid "_File" msgstr "" #: ../data/ui/MenueditorWindow.ui.h:6 ../data/ui/ProfilemanagerWindow.ui.h:10 msgid "_Help" msgstr "" #: ../data/ui/ProfilenameDialog.ui.h:1 msgid "Specify the name of the imported profile." msgstr "" #: ../data/ui/ProfilenameDialog.ui.h:2 msgid "_Name" msgstr "" #: ../data/ui/AboutProfilemanagerDialog.ui.h:1 #: ../data/ui/AboutMenueditorDialog.ui.h:1 msgid "" "Copyright© 2009-2010 Marc Gariépy " "Révolution Linux Inc." msgstr "" #: ../data/ui/AboutProfilemanagerDialog.ui.h:2 msgid "" "Profilemanager is used as a front-end to apply different menu profiles to " "groups." msgstr "" #: ../data/ui/AboutMenueditorDialog.ui.h:2 msgid "" "Menueditor is used to create tar.gz file of a directory of for being applied " "by desktop-profiles.\n" msgstr "" #: ../data/ui/ProfilemanagerWindow.ui.h:1 msgid "Delete Item" msgstr "" #: ../data/ui/ProfilemanagerWindow.ui.h:2 msgid "Group and menu associations" msgstr "" #: ../data/ui/ProfilemanagerWindow.ui.h:3 ../bin/profilemanager:138 msgid "Groups" msgstr "" #: ../data/ui/ProfilemanagerWindow.ui.h:4 msgid "Import new profile" msgstr "" #: ../data/ui/ProfilemanagerWindow.ui.h:5 msgid "Menus" msgstr "" #: ../data/ui/ProfilemanagerWindow.ui.h:6 msgid "Profilemanager" msgstr "" #: ../data/ui/ProfilemanagerWindow.ui.h:7 msgid "Remove" msgstr "" #: ../data/ui/ProfilemanagerWindow.ui.h:8 msgid "Show systems groups" msgstr "" #: ../data/ui/ProfilemanagerWindow.ui.h:11 msgid "_View" msgstr "" #: ../data/ui/AddsubmenuDialog.ui.h:1 msgid "Co_mment:" msgstr "" #: ../data/ui/AddsubmenuDialog.ui.h:2 msgid "_Name:" msgstr "" #: ../bin/menueditor:91 ../bin/profilemanager:105 msgid "Name" msgstr "" #: ../bin/menueditor:103 msgid "Show" msgstr "" #: ../bin/menueditor:175 msgid "Sorry, layout in the menu is not yet supported." msgstr "" #: ../bin/menueditor:246 msgid "" "You need to enter the name with at least one character in the Name field." msgstr "" #: ../bin/menueditor:303 msgid "Save As..." msgstr "" #: ../bin/menueditor:313 ../bin/profilemanager:307 msgid "Archive" msgstr "" #: ../bin/menueditor:318 ../bin/profilemanager:311 msgid "All files" msgstr "" #: ../bin/profilemanager:111 msgid "Gid" msgstr "" #: ../bin/profilemanager:122 ../bin/profilemanager:144 msgid "Menu name" msgstr "" #: ../bin/profilemanager:128 msgid "Menu path" msgstr "" #: ../bin/profilemanager:149 msgid "menu_path" msgstr "" #: ../bin/profilemanager:190 msgid "you need to drop into an item" msgstr "" #: ../bin/profilemanager:247 ../bin/profilemanager:274 msgid "Are you sure you want to delete " msgstr "" #: ../bin/profilemanager:248 ../bin/profilemanager:275 msgid " from the disk ?" msgstr "" #: ../bin/profilemanager:303 msgid "Open..." msgstr "" edubuntu-menueditor-1.3.5/menueditor.desktop.in0000664000175000017500000000032011674055126022107 0ustar stgraberstgraber[Desktop Entry] Name=Edubuntu menu editor Comment=Edubuntu menu editor Categories=GNOME;GTK;System; Exec=menueditor Icon=/usr/share/edubuntu-menueditor/media/edubuntu-icon.svg Terminal=false Type=Application edubuntu-menueditor-1.3.5/mktestdirs.sh0000664000175000017500000000231311674055126020465 0ustar stgraberstgraber#!/bin/bash # those dirs will be created by the package. mkdir -p /etc/edubuntu-menueditor mkdir -p /usr/share/edubuntu-menueditor/menus mkdir -p /tmp/desktop-profiles/ echo "XDG_DATA-group1-test1;XDG_DATA;/tmp/dir1/test1/share;;group1;#This file is managed by ProfileManager, Do not edit by hand" > /tmp/desktop-profiles/group1-test1.listing echo "XDG_CONFIG-group1-test1;XDG_CONFIG;/tmp/dir1/test1/xdg;;group1;#This file is managed by ProfileManager, Do not edit by hand" >> /tmp/desktop-profiles/group1-test1.listing echo "XDG_DATA-group2-test6;XDG_DATA;/tmp/dir2/test6/share;;group2;#This file is managed by ProfileManager, Do not edit by hand" > /tmp/desktop-profiles/group2-test6.listing echo "XDG_CONFIG-group2-test6;XDG_CONFIG;/tmp/dir2/test6/xdg;;group2;#This file is managed by ProfileManager, Do not edit by hand" >> /tmp/desktop-profiles/group2-test6.listing echo "XDG_DATA-group3-test3;XDG_DATA;/tmp/dir1/test3/share;;group3;#This file is managed by ProfileManager, Do not edit by hand" > /tmp/desktop-profiles/group3-test3.listing echo "XDG_CONFIG-group3-test3;XDG_CONFIG;/tmp/dir1/test3/xdg;;group3;#This file is managed by ProfileManager, Do not edit by hand" >> /tmp/desktop-profiles/group3-test3.listing edubuntu-menueditor-1.3.5/Copyright0000664000175000017500000000131611674055126017635 0ustar stgraberstgraber# Copyright (C) 2009 Révolution Linux #This program is free software: you can redistribute it and/or modify it #under the terms of the GNU General Public License version 3 or (at your option) #any later version, as published by the Free Software Foundation. # #This program is distributed in the hope that it will be useful, but #WITHOUT ANY WARRANTY; without even the implied warranties of #MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR #PURPOSE. See the GNU General Public License for more details. # #You should have received a copy of the GNU General Public License along #with this program. If not, see . edubuntu-menueditor-1.3.5/release.conf0000664000175000017500000000004711674055126020231 0ustar stgraberstgraberNAME=edubuntu-menueditor VERSION=1.3.5