1 diff -Naur awn-extras-0.4.0.orig/applets/maintained/cairo-menu/gnome-menu-builder.c awn-extras-0.4.0/applets/maintained/cairo-menu/gnome-menu-builder.c
2 --- awn-extras-0.4.0.orig/applets/maintained/cairo-menu/gnome-menu-builder.c 2010-04-10 01:26:19.000000000 +0200
3 +++ awn-extras-0.4.0/applets/maintained/cairo-menu/gnome-menu-builder.c 2011-12-16 20:34:22.612913317 +0100
5 #include "cairo-menu-applet.h"
7 GMenuTree * main_menu_tree = NULL;
8 -GMenuTree * settings_menu_tree = NULL;
10 GtkWidget * menu_build (MenuInstance * instance);
11 static GtkWidget * submenu_build (MenuInstance * instance);
13 gmenu_tree_remove_monitor (main_menu_tree,(GMenuTreeChangedFunc)_submenu_modified_cb,instance);
17 -_remove_settings_submenu_cb(MenuInstance * instance,GObject *where_the_object_was)
19 - g_debug ("%s",__func__);
20 - GMenuTreeDirectory *main_root;
21 - gmenu_tree_remove_monitor (settings_menu_tree,(GMenuTreeChangedFunc)_submenu_modified_cb,instance);
25 submenu_build (MenuInstance * instance)
27 GMenuTreeDirectory *main_root;
28 - GMenuTreeDirectory *settings_root;
29 GtkWidget * menu = NULL;
31 if the menu is set then clear any menu items (except for places or recent)
34 main_menu_tree = gmenu_tree_lookup("applications.menu", GMENU_TREE_FLAGS_NONE);
36 - if (!settings_menu_tree)
38 - settings_menu_tree = gmenu_tree_lookup("settings.menu", GMENU_TREE_FLAGS_NONE);
40 g_assert (main_menu_tree);
42 get_places_menu() and get_recent_menu() are
44 main_root = gmenu_tree_get_root_directory(main_menu_tree);
45 g_assert (gmenu_tree_item_get_type( (GMenuTreeItem*)main_root) == GMENU_TREE_ITEM_DIRECTORY);
47 - settings_root = gmenu_tree_get_root_directory(settings_menu_tree);
48 if ( menu_dir = find_menu_dir (instance,main_root) )
50 /* if instance->menu then we're refreshing in a monitor callback*/
52 menu = fill_er_up(instance,menu_dir,instance->menu);
53 g_object_weak_ref (G_OBJECT(menu), (GWeakNotify)_remove_main_submenu_cb,instance);
55 - else if ( settings_root && (menu_dir = find_menu_dir (instance,settings_root)) )
57 - gmenu_tree_remove_monitor (main_menu_tree,(GMenuTreeChangedFunc)_submenu_modified_cb,instance);
58 - gmenu_tree_add_monitor (main_menu_tree,(GMenuTreeChangedFunc)_submenu_modified_cb,instance);
59 - menu = fill_er_up(instance,menu_dir,instance->menu);
60 - g_object_weak_ref (G_OBJECT(menu), (GWeakNotify)_remove_settings_submenu_cb,instance);
64 gmenu_tree_item_unref(menu_dir);
66 gmenu_tree_item_unref(main_root);
69 - gmenu_tree_item_unref(settings_root);
72 return instance->menu = menu;
76 main_menu_tree = gmenu_tree_lookup("applications.menu", GMENU_TREE_FLAGS_NONE);
78 - if (!settings_menu_tree)
80 - settings_menu_tree = gmenu_tree_lookup("settings.menu", GMENU_TREE_FLAGS_NONE);
86 menu_item = gtk_separator_menu_item_new ();
87 gtk_menu_shell_append(GTK_MENU_SHELL(instance->menu),menu_item);
89 - if (settings_menu_tree)
91 - root = gmenu_tree_get_root_directory(settings_menu_tree);
92 - gmenu_tree_remove_monitor (settings_menu_tree,(GMenuTreeChangedFunc)_menu_modified_cb,instance);
93 - gmenu_tree_add_monitor (settings_menu_tree,(GMenuTreeChangedFunc)_menu_modified_cb,instance);
94 - if (!instance->menu)
96 - g_debug ("%s: No applications menu????",__func__);
97 - instance->menu = fill_er_up(instance,root,instance->menu);
101 - sub_menu = fill_er_up (instance, root,instance->menu);
103 - sub_menu = fill_er_up(instance,root,NULL);
104 - c = g_malloc0 (sizeof(CallbackContainer));
105 - c->icon_name = g_strdup(gmenu_tree_directory_get_icon (root));
106 - image = get_gtk_image (c->icon_name);
107 - txt = gmenu_tree_entry_get_name((GMenuTreeEntry*)root);
108 - menu_item = cairo_menu_item_new_with_label (txt?txt:"unknown");
109 - gtk_menu_item_set_submenu (GTK_MENU_ITEM(menu_item),sub_menu);
112 - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item),image);
114 - gtk_menu_shell_append(GTK_MENU_SHELL(instance->menu),menu_item);
115 - c->file_path = g_strdup(gmenu_tree_directory_get_desktop_file_path (root));
116 - c->display_name = g_strdup ("Settings");
117 - drop_data = g_strdup_printf("cairo_menu_item_dir:///@@@%s@@@%s@@@%s\n",c->file_path,c->display_name,c->icon_name);
118 - cairo_menu_item_set_source (AWN_CAIRO_MENU_ITEM(menu_item),drop_data);
119 - g_free (drop_data);
120 - c->instance = instance;
121 - g_signal_connect (menu_item, "button-press-event",G_CALLBACK(_button_press_dir),c);
122 - g_object_weak_ref (G_OBJECT(menu_item),(GWeakNotify)_free_callback_container,c);
125 - gmenu_tree_item_unref(root);
128 /*TODO Check to make sure it is needed. Should not be displayed if
129 all flags are of the NO persuasion.*/
130 diff -Naur awn-extras-0.4.0.orig/applets/maintained/yama/yama.py awn-extras-0.4.0/applets/maintained/yama/yama.py
131 --- awn-extras-0.4.0.orig/applets/maintained/yama/yama.py 2010-03-31 16:21:24.000000000 +0200
132 +++ awn-extras-0.4.0/applets/maintained/yama/yama.py 2011-12-16 20:37:48.243326388 +0100
135 def build_menu(self):
136 self.applications_items = []
137 - self.settings_items = []
138 self.session_items = []
143 self.create_places_submenu(self.menu)
146 - tree = gmenu.lookup_tree("settings.menu")
147 - self.append_directory(tree.root, self.menu, item_list=self.settings_items)
148 - tree.add_monitor(self.menu_changed_cb, self.settings_items)
150 """ Session actions """
152 self.append_session_actions(self.menu)
154 for i in xrange(len(items)):
155 items.pop().destroy()
157 - index = len(self.applications_items) + 2 if items is self.settings_items else 0 # + 2 = separator + Places
158 + index = len(self.applications_items) + 0
159 self.append_directory(tree.root, self.menu, index=index, item_list=items)
160 # Refresh menu to re-initialize the widget
162 diff -Naur awn-extras-0.4.0.orig/applets/unmaintained/main-menu/applet.c awn-extras-0.4.0/applets/unmaintained/main-menu/applet.c
163 --- awn-extras-0.4.0.orig/applets/unmaintained/main-menu/applet.c 2009-10-27 20:45:03.000000000 +0100
164 +++ awn-extras-0.4.0/applets/unmaintained/main-menu/applet.c 2011-12-16 20:27:28.792248015 +0100
167 GMenuTreeDirectory *root;
168 GMenuTreeDirectory *apps;
169 - GMenuTreeDirectory *settings;
175 GMenuTreeDirectory *temp= menu->root;
176 menu->root = gmenu_tree_item_get_parent (GMENU_TREE_ITEM (temp));
177 - if (menu->root == menu->settings)
178 - menu->root = gmenu_tree_get_root_directory (menu->tree);
183 if (app->root == GMENU_TREE_DIRECTORY(gmenu_tree_get_root_directory ((GMenuTree*)app->apps)))
185 list = g_slist_copy (apps);
186 - sets = g_slist_copy (gmenu_tree_directory_get_contents (app->settings));
187 - list = g_slist_concat (list, sets);
188 list = g_slist_sort (list, (GCompareFunc)_compare);
192 g_warning ("Unable to find applications.menu");
195 - app->settings = gmenu_tree_get_root_directory (
196 - gmenu_tree_lookup ("settings.menu", GMENU_TREE_FLAGS_NONE));
197 - if (!app->settings)
199 - g_warning ("Unable to find settings.menu");
202 app->tree = (GMenuTree*)app->apps;
204 app->menu = awn_applet_create_default_menu (app->applet);
205 diff -Naur awn-extras-0.4.0.orig/applets/unmaintained/MiMenu/menus.py awn-extras-0.4.0/applets/unmaintained/MiMenu/menus.py
206 --- awn-extras-0.4.0.orig/applets/unmaintained/MiMenu/menus.py 2009-08-14 14:29:59.000000000 +0200
207 +++ awn-extras-0.4.0/applets/unmaintained/MiMenu/menus.py 2011-12-16 20:30:42.060104523 +0100
210 MENUCORE = gmenu.lookup_tree('applications.menu')
211 MENUROOT = MENUCORE.get_root_directory()
212 - SYSTEMMENUCORE = gmenu.lookup_tree('settings.menu')
213 - SYSTEMMENUROOT = SYSTEMMENUCORE.get_root_directory()
217 diff -Naur awn-extras-0.4.0.orig/applets/unmaintained/MiMenu/mimenu.py awn-extras-0.4.0/applets/unmaintained/MiMenu/mimenu.py
218 --- awn-extras-0.4.0.orig/applets/unmaintained/MiMenu/mimenu.py 2009-10-27 20:45:47.000000000 +0100
219 +++ awn-extras-0.4.0/applets/unmaintained/MiMenu/mimenu.py 2011-12-16 20:30:35.897158422 +0100
221 tree1.set_headers_visible (0)
222 tree1.append_column(column1)
223 tree1.append_column(column2)
224 - lst1,self.objlist1 = menus.get_menus(menus.data.MENUROOT,
225 - root2=menus.data.SYSTEMMENUROOT)
226 + lst1,self.objlist1 = menus.get_menus(menus.data.MENUROOT)
227 model = menus.set_model(tree1,lst1,self.theme,self.location_icon)
228 tree1.connect('cursor_changed', self.treeclick,
229 tree1,self.objlist1,False)