updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / awn-extras-applets / remove-settings-menu.patch
blob60eeda1d532481278e86467fd061406952303b43
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
4 @@ -34,7 +34,6 @@
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);
12 @@ -749,19 +748,10 @@
13 gmenu_tree_remove_monitor (main_menu_tree,(GMenuTreeChangedFunc)_submenu_modified_cb,instance);
16 -static void
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);
24 static GtkWidget *
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)
32 @@ -771,10 +761,6 @@
34 main_menu_tree = gmenu_tree_lookup("applications.menu", GMENU_TREE_FLAGS_NONE);
36 - if (!settings_menu_tree)
37 - {
38 - settings_menu_tree = gmenu_tree_lookup("settings.menu", GMENU_TREE_FLAGS_NONE);
39 - }
40 g_assert (main_menu_tree);
42 get_places_menu() and get_recent_menu() are
43 @@ -808,7 +794,6 @@
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);
46 g_assert (main_root);
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*/
51 @@ -817,22 +802,11 @@
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)) )
56 - {
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);
61 - }
62 if (menu_dir)
64 gmenu_tree_item_unref(menu_dir);
66 gmenu_tree_item_unref(main_root);
67 - if (settings_root)
68 - {
69 - gmenu_tree_item_unref(settings_root);
70 - }
72 return instance->menu = menu;
74 @@ -862,10 +836,6 @@
76 main_menu_tree = gmenu_tree_lookup("applications.menu", GMENU_TREE_FLAGS_NONE);
78 - if (!settings_menu_tree)
79 - {
80 - settings_menu_tree = gmenu_tree_lookup("settings.menu", GMENU_TREE_FLAGS_NONE);
81 - }
83 if (main_menu_tree)
85 @@ -884,44 +854,6 @@
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)
90 - {
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)
95 - {
96 - g_debug ("%s: No applications menu????",__func__);
97 - instance->menu = fill_er_up(instance,root,instance->menu);
98 - }
99 - else
101 - sub_menu = fill_er_up (instance, root,instance->menu);
102 -#if 0
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);
110 - if (image)
112 - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item),image);
113 - }
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);
123 -#endif
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
133 @@ -113,7 +113,6 @@
135 def build_menu(self):
136 self.applications_items = []
137 - self.settings_items = []
138 self.session_items = []
140 """ Applications """
141 @@ -126,11 +125,6 @@
142 """ Places """
143 self.create_places_submenu(self.menu)
145 - """ System """
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 """
151 if dbus is not None:
152 self.append_session_actions(self.menu)
153 @@ -227,7 +221,7 @@
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
161 self.menu.show_all()
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
165 @@ -43,7 +43,6 @@
166 GMenuTree *tree;
167 GMenuTreeDirectory *root;
168 GMenuTreeDirectory *apps;
169 - GMenuTreeDirectory *settings;
171 } Menu;
173 @@ -243,8 +242,6 @@
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);
179 populate (menu);
182 @@ -299,8 +296,6 @@
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);
190 else
191 @@ -419,13 +414,6 @@
192 g_warning ("Unable to find applications.menu");
193 return FALSE;
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");
200 - return FALSE;
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
208 @@ -12,8 +12,6 @@
209 class MenuDateStore:
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()
214 PATH = []
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
220 @@ -69,8 +69,7 @@
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)