Projet

Général

Profil

Compréhension globale des profils pour gnome

Source officielle de doc: http://developer.gnome.org/menu-spec/

au début sont les fichier .desktop

Ils se trouvent dans /usr/share/applications, on peut-y ajouter des catégories personnalisées comme par exemple abuledu-cycle1-Office:

Categories=Education;abuledu-cycle1-Education;abuledu-cycle2-Education;

ensuite il est question des .directory

Ils se trouvent dans /usr/share/desktop-directories, exemple de abuledu-cycle1-Education.directory

[Desktop Entry]
Name=abuledu-cycle1-Education
Icon=/usr/share/icons/AbulEdu/48x48/menu_abu.png
Type=Directory
X-Ubuntu-Gettext-Domain=gnome-menus

ensuite on a le .menu

Et le fichier /etc/xdg/menus/applications.menu auquel on peut ajouter des choses sympa:

  <!-- Education -->
  <Menu>
    <Name>Education</Name>
    <Directory>Education.directory</Directory>
    <Include>
      <And>
        <Category>Education</Category>
    <Not><Category>Science</Category></Not>
      </And>
    </Include>
  </Menu> <!-- End Education -->

  <!-- Education -->
  <Menu>
    <Name>abuledu-cycle1-Education</Name>
    <Directory>abuledu-cycle1-Education.directory</Directory>
    <Include>
      <And>
        <Category>abuledu-cycle1-Education</Category>
      </And>
    </Include>
  </Menu> <!-- End Education -->

  <!-- Education -->
  <Menu>
    <Name>abuledu-cycle2-Education</Name>
    <Directory>abuledu-cycle2-Education.directory</Directory>
    <Include>
      <And>
        <Category>abuledu-cycle2-Education</Category>
      </And>
    </Include>
  </Menu> <!-- End Education -->

et enfin se trouve le profil de l'utilisateur

Dans lequel on peut déterminer des menus dans son top .gconf/apps/panel/general/%gconf.xml

        <li type="string">
            <stringvalue>object_6</stringvalue>
        </li>

et ensuite définition de l'objet object_6 comme ceci .gconf/apps/panel/objects/object_6/%gconf.xml

<?xml version="1.0"?>
<gconf>
    <entry name="arrow" mtime="1311691794" type="bool" value="false"/>
    <entry name="attached_toplevel_id" mtime="1311689458" schema="/schemas/apps/panel/objects/attached_toplevel_id"/>
    <entry name="position" mtime="1311689748" schema="/schemas/apps/panel/objects/position" type="int" value="410"/>
    <entry name="use_menu_path" mtime="1311690520" schema="/schemas/apps/panel/objects/use_menu_path" type="bool" value="false"/>
    <entry name="action_type" mtime="1311690520" schema="/schemas/apps/panel/objects/action_type" type="string">
        <stringvalue>lock</stringvalue>
    </entry>
    <entry name="toplevel_id" mtime="1311689458" schema="/schemas/apps/panel/objects/toplevel_id" type="string">
        <stringvalue>top_panel_screen0</stringvalue>
    </entry>
    <entry name="tooltip" mtime="1311689458" schema="/schemas/apps/panel/objects/tooltip" type="string">
        <stringvalue>AbulEdu-Menu principal</stringvalue>
    </entry>
    <entry name="use_custom_icon" mtime="1311690448" schema="/schemas/apps/panel/objects/use_custom_icon" type="bool" value="true"/>
    <entry name="object_type" mtime="1311689458" schema="/schemas/apps/panel/objects/object_type" type="string">
        <stringvalue>menu-object</stringvalue>
    </entry>
    <entry name="panel_right_stick" mtime="1311689458" schema="/schemas/apps/panel/objects/panel_right_stick" type="bool" value="false"/>
    <entry name="locked" mtime="1311691755" schema="/schemas/apps/panel/objects/locked" type="bool" value="false"/>
    <entry name="custom_icon" mtime="1311690479" schema="/schemas/apps/panel/objects/custom_icon" type="string">
        <stringvalue>/usr/share/icons/AbulEdu/48x48/menu_abu.png</stringvalue>
    </entry>
    <entry name="bonobo_iid" mtime="1311689458" schema="/schemas/apps/panel/objects/bonobo_iid"/>
    <entry name="launcher_location" mtime="1311689458" schema="/schemas/apps/panel/objects/launcher_location"/>
    <entry name="menu_path" mtime="1311689458" schema="/schemas/apps/panel/objects/menu_path" type="string">
        <stringvalue>applications:/abuledu-cycle1/</stringvalue>
    </entry>
</gconf>

La par exemple ce menu fait appel au menu applications:/abuledu-cycle1/ lequel fait appel aux icones .desktop dont les "Categories" sont abuledu-cycle1

Redmine Appliance - Powered by TurnKey Linux