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

« back to all changes in this revision

Viewing changes to lib/unity-gtk-menu-shell.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:
731
731
      if (shell->action_group != NULL)
732
732
        unity_gtk_action_group_disconnect_shell (shell->action_group, shell);
733
733
 
734
 
      if (shell->menu_shell_insert_handler_id)
735
 
        {
736
 
          g_assert (shell->menu_shell != NULL);
737
 
          g_signal_handler_disconnect (shell->menu_shell, shell->menu_shell_insert_handler_id);
738
 
          shell->menu_shell_insert_handler_id = 0;
739
 
        }
 
734
      if (shell->menu_shell != NULL)
 
735
        g_signal_handlers_disconnect_by_data (shell->menu_shell, shell);
740
736
 
741
737
      if (separator_indices != NULL)
742
738
        {
771
767
        {
772
768
          g_object_set_qdata_full (G_OBJECT (menu_shell), menu_shell_quark (), shell, (GDestroyNotify) unity_gtk_menu_shell_clear_menu_shell);
773
769
 
774
 
          shell->menu_shell_insert_handler_id = g_signal_connect (menu_shell, "insert", G_CALLBACK (unity_gtk_menu_shell_handle_shell_insert), shell);
 
770
          g_signal_connect (menu_shell, "insert", G_CALLBACK (unity_gtk_menu_shell_handle_shell_insert), shell);
775
771
        }
776
772
    }
777
773
}
781
777
{
782
778
  g_return_if_fail (UNITY_GTK_IS_MENU_SHELL (shell));
783
779
 
784
 
  shell->menu_shell_insert_handler_id = 0;
785
 
 
786
780
  unity_gtk_menu_shell_set_menu_shell (shell, NULL);
787
781
}
788
782
 
800
794
  unity_gtk_menu_shell_set_menu_shell (shell, NULL);
801
795
 
802
796
  if (settings != NULL)
803
 
    g_signal_handlers_disconnect_by_func (settings, unity_gtk_menu_shell_handle_settings_notify, shell);
 
797
    g_signal_handlers_disconnect_by_data (settings, shell);
804
798
 
805
799
  G_OBJECT_CLASS (unity_gtk_menu_shell_parent_class)->dispose (object);
806
800
}
1085
1079
      g_print ("%s(%s *) %p\n", space, G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS (shell)), shell);
1086
1080
 
1087
1081
      if (shell->menu_shell != NULL)
1088
 
        g_print ("%s  %lu (%s *) %p\n", space, shell->menu_shell_insert_handler_id, G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS (shell->menu_shell)), shell->menu_shell);
1089
 
      else if (shell->menu_shell_insert_handler_id)
1090
 
        g_print ("%s  %lu\n", space, shell->menu_shell_insert_handler_id);
 
1082
        g_print ("%s  (%s *) %p\n", space, G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS (shell->menu_shell)), shell->menu_shell);
1091
1083
 
1092
1084
      if (shell->items != NULL)
1093
1085
        {