~aacid/libdbusmenu/prefer_pixmap_over_unknown_icon_name

« back to all changes in this revision

Viewing changes to libdbusmenu-gtk/parser.c

  • Committer: Albert Astals
  • Date: 2012-10-16 10:57:42 UTC
  • Revision ID: albert.astals@canonical.com-20121016105742-dn6roska5y01akcf
Call gtk_menu_set_active with the position of the activated menu item

Fixes interaction with GtkRecentChooserMenu (bug 752674)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1121
1121
 
1122
1122
      if (GTK_IS_MENU_ITEM (child))
1123
1123
        {
 
1124
          GtkWidget *parent = gtk_widget_get_parent(child);
 
1125
          if (GTK_IS_MENU (parent))
 
1126
          {
 
1127
            gint pos = get_child_position (child);
 
1128
            if (pos >= 0)
 
1129
              gtk_menu_set_active (GTK_MENU(parent), pos);
 
1130
          }
 
1131
 
1124
1132
          gdk_threads_enter ();
1125
1133
          gtk_menu_item_activate (GTK_MENU_ITEM (child));
1126
1134
          gdk_threads_leave ();