Ted Gould has proposed merging lp:~ted/indicator-appmenu/blacklist-by-desktop into lp:indicator-appmenu.
Requested reviews: Indicator Applet Developers (indicator-applet-developers) Use the BAMF stub feature to decide, based on .desktop file, whether an application should have stub menus or not. -- https://code.launchpad.net/~ted/indicator-appmenu/blacklist-by-desktop/+merge/35333 Your team ayatana-commits is subscribed to branch lp:indicator-appmenu.
=== modified file 'src/indicator-appmenu.c' --- src/indicator-appmenu.c 2010-09-09 14:33:37 +0000 +++ src/indicator-appmenu.c 2010-09-13 20:54:40 +0000 @@ -620,10 +620,12 @@ g_return_val_if_fail(IS_INDICATOR_APPMENU(io), NULL); IndicatorAppmenu * iapp = INDICATOR_APPMENU(io); + /* If we have a focused app with menus, use it's windows */ if (iapp->default_app != NULL) { return window_menus_get_entries(iapp->default_app); } + /* Else, let's go with desktop windows if there isn't a focused window */ if (iapp->active_window == NULL) { if (iapp->desktop_menu == NULL) { return NULL; @@ -632,6 +634,19 @@ } } + /* Oh, now we're looking at stubs. */ + + BamfApplication * app = bamf_matcher_get_application_for_window(iapp->matcher, iapp->active_window); + if (app != NULL) { + /* First check to see if we can find an app, then if we can + check to see if it has an opinion on whether we should + show the stubs or not. */ + if (bamf_application_get_show_menu_stubs(app) == FALSE) { + /* If it blocks them, fall out. */ + return NULL; + } + } + GList * output = NULL; int i;
_______________________________________________ Mailing list: https://launchpad.net/~ayatana-commits Post to : ayatana-commits@lists.launchpad.net Unsubscribe : https://launchpad.net/~ayatana-commits More help : https://help.launchpad.net/ListHelp