92
95
private void fill_icon_table () {
94
string.joinv("|", {group_enum_to_string(Group.UNKNOWN),"help-browser"}), /* fall though value */
95
string.joinv("|", {group_enum_to_string(Group.ACCESSIBILITY), "preferences-desktop-accessibility"}),
96
string.joinv("|", {group_enum_to_string(Group.ACCESSORIES), "applications-accessories"}),
97
string.joinv("|", {group_enum_to_string(Group.ADMIN_TOOLS), "system-lock-screen"}),
98
string.joinv("|", {group_enum_to_string(Group.COLLECTIONS), "pk-collection-installed"}),
99
string.joinv("|", {group_enum_to_string(Group.COMMUNICATION), "folder-remote"}),
100
string.joinv("|", {group_enum_to_string(Group.DESKTOP_GNOME), "pk-desktop-gnome"}),
101
string.joinv("|", {group_enum_to_string(Group.DESKTOP_KDE), "pk-desktop-kde"}),
102
string.joinv("|", {group_enum_to_string(Group.DESKTOP_OTHER), "user-desktop"}),
103
string.joinv("|", {group_enum_to_string(Group.DESKTOP_XFCE), "pk-desktop-xfce"}),
104
string.joinv("|", {group_enum_to_string(Group.DOCUMENTATION), "x-office-address-book"}),
105
string.joinv("|", {group_enum_to_string(Group.EDUCATION), "utilities-system-monitor"}),
106
string.joinv("|", {group_enum_to_string(Group.ELECTRONICS), "video-display"}),
107
string.joinv("|", {group_enum_to_string(Group.FONTS), "preferences-desktop-font"}),
108
string.joinv("|", {group_enum_to_string(Group.GAMES), "applications-games"}),
109
string.joinv("|", {group_enum_to_string(Group.GRAPHICS), "applications-graphics"}),
110
string.joinv("|", {group_enum_to_string(Group.INTERNET), "applications-internet"}),
111
string.joinv("|", {group_enum_to_string(Group.LEGACY), "media-floppy"}),
112
string.joinv("|", {group_enum_to_string(Group.LOCALIZATION), "preferences-desktop-locale"}),
113
string.joinv("|", {group_enum_to_string(Group.MAPS), "applications-multimedia"}),
114
string.joinv("|", {group_enum_to_string(Group.MULTIMEDIA), "applications-multimedia"}),
115
string.joinv("|", {group_enum_to_string(Group.NETWORK), "network-wired"}),
116
string.joinv("|", {group_enum_to_string(Group.OFFICE), "applications-office"}),
117
string.joinv("|", {group_enum_to_string(Group.OTHER), "applications-other"}),
118
string.joinv("|", {group_enum_to_string(Group.POWER_MANAGEMENT), "battery"}),
119
string.joinv("|", {group_enum_to_string(Group.PROGRAMMING), "applications-development"}),
120
string.joinv("|", {group_enum_to_string(Group.PUBLISHING), "accessories-dictionary"}),
121
string.joinv("|", {group_enum_to_string(Group.REPOS), "system-file-manager"}),
122
string.joinv("|", {group_enum_to_string(Group.SCIENCE), "application-certificate"}),
123
string.joinv("|", {group_enum_to_string(Group.SECURITY), "network-wireless-encrypted"}),
124
string.joinv("|", {group_enum_to_string(Group.SERVERS), "network-server"}),
125
string.joinv("|", {group_enum_to_string(Group.SYSTEM), "applications-system"}),
126
string.joinv("|", {group_enum_to_string(Group.VIRTUALIZATION), "computer"}),
127
string.joinv("|", {group_enum_to_string(Group.VENDOR), "application-certificate"}),
128
string.joinv("|", {group_enum_to_string(Group.NEWEST), "dialog-information"})
132
private string group_to_icon_name(string group) {
133
foreach (string couple in icon_table) {
134
if (couple.split("|")[0] == group) {
135
return couple.split("|")[1];
142
98
public void get_categories () {
144
for (int i = 0; i < Group.LAST; i++) {
145
if (i != Group.COLLECTIONS && i != Group.NEWEST)
146
category_added(group_to_icon_name(group_enum_to_string((Group)i)), group_enum_to_string((Group)i));
99
/* Need a wrapper for /usr/share/app-install/desktop/applications.menu*/
149
101
category_added("applications-accessories", "Accessories");
150
102
category_added("applications-internet", "Internet");