~awn-extras/awn-extras/trunk

« back to all changes in this revision

Viewing changes to applets/unmaintained/main-menu/applet.c

  • Committer: Julien Lavergne
  • Date: 2012-04-28 13:42:52 UTC
  • Revision ID: gilir@ubuntu.com-20120428134252-i6zo785mm14b5xow
Description: Make the main-menu work even if settings.menu does not exist
 The file settings.menu is no longer provided in gnome-menus and the "main-menu"
 applet refuses to work because of this.
 .
 Solution:
 - Comment out the "return FALSE" line which makes the applet abort.
 - Add a "&& app->settings" so that we only try to add settings.menu to the menu
   if it exists. The code worked without this when there was and there was not a
   settings menu present. This just avoids the many "Critical" warning/errors
   about trying to read a NULL settings.menu when none is not found.
Author: Miguel A. Colón Vélez <debian.micove@gmail.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
295
295
  gtk_box_pack_start (GTK_BOX (vbox), table, TRUE, TRUE, 0);
296
296
 
297
297
  apps = gmenu_tree_directory_get_contents (app->root);
298
 
  if (app->root == GMENU_TREE_DIRECTORY(gmenu_tree_get_root_directory ((GMenuTree*)app->apps)))
 
298
  if (app->root == GMENU_TREE_DIRECTORY(gmenu_tree_get_root_directory ((GMenuTree*)app->apps)) && app->settings)
299
299
  {
300
300
    list = g_slist_copy (apps);
301
301
    sets = g_slist_copy (gmenu_tree_directory_get_contents (app->settings));
422
422
  if (!app->settings)
423
423
  {
424
424
    g_warning ("Unable to find settings.menu");
425
 
    return FALSE;
 
425
    //return FALSE;
426
426
  }
427
427
  app->tree =  (GMenuTree*)app->apps;
428
428