~attente/unity-gtk-module/blacklist-anjuta

« back to all changes in this revision

Viewing changes to lib/unity-gtk-menu-item.c

  • Committer: William Hua
  • Date: 2014-03-20 03:03:05 UTC
  • mto: (320.1.2 1208019)
  • mto: This revision was merged to the branch mainline in revision 321.
  • Revision ID: william.hua@canonical.com-20140320030305-afhkyu4m7htxrfdz
Stop using signal handler ids.

Show diffs side-by-side

added added

removed removed

Lines of Context:
321
321
    {
322
322
      UnityGtkMenuShell *child_shell = item->child_shell;
323
323
 
324
 
      if (item->menu_item_notify_handler_id)
325
 
        {
326
 
          g_warn_if_fail (item->menu_item != NULL);
327
 
          g_signal_handler_disconnect (item->menu_item, item->menu_item_notify_handler_id);
328
 
          item->menu_item_notify_handler_id = 0;
329
 
        }
 
324
      if (item->menu_item != NULL)
 
325
        g_signal_handlers_disconnect_by_data (item->menu_item, item);
330
326
 
331
327
      if (child_shell != NULL)
332
328
        {
339
335
      item->menu_item = menu_item;
340
336
 
341
337
      if (menu_item != NULL)
342
 
        item->menu_item_notify_handler_id = g_signal_connect (menu_item, "notify", G_CALLBACK (unity_gtk_menu_item_handle_item_notify), item);
 
338
        g_signal_connect (menu_item, "notify", G_CALLBACK (unity_gtk_menu_item_handle_item_notify), item);
343
339
    }
344
340
}
345
341
 
709
705
        g_print ("%s%u (%s *) %p\n", space, item->item_index, G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS (item)), item);
710
706
 
711
707
      if (item->menu_item != NULL)
712
 
        g_print ("%s  %lu (%s *) %p\n", space, item->menu_item_notify_handler_id, G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS (item->menu_item)), item->menu_item);
713
 
      else if (item->menu_item_notify_handler_id)
714
 
        g_print ("%s  %lu\n", space, item->menu_item_notify_handler_id);
 
708
        g_print ("%s  (%s *) %p\n", space, G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS (item->menu_item)), item->menu_item);
715
709
 
716
710
      if (item->parent_shell != NULL)
717
711
        g_print ("%s  (%s *) %p\n", space, G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS (item->parent_shell)), item->parent_shell);