src/plugin.c

changeset 7956
21d891f33b89
parent 7279
616bdc8cf850
child 8046
c581b20a47d6
equal deleted inserted replaced
7955:fdb05712d343 7956:21d891f33b89
131 131
132 static gint 132 static gint
133 compare_prpl(GaimPlugin *a, GaimPlugin *b) 133 compare_prpl(GaimPlugin *a, GaimPlugin *b)
134 { 134 {
135 /* neg if a before b, 0 if equal, pos if a after b */ 135 /* neg if a before b, 0 if equal, pos if a after b */
136 return ((GAIM_IS_PROTOCOL_PLUGIN(a) 136 if(GAIM_IS_PROTOCOL_PLUGIN(a)) {
137 ? GAIM_PLUGIN_PROTOCOL_INFO(a)->protocol : -1) - 137 if(GAIM_IS_PROTOCOL_PLUGIN(b))
138 ((GAIM_IS_PROTOCOL_PLUGIN(b) 138 return strcmp(a->info->name, b->info->name);
139 ? GAIM_PLUGIN_PROTOCOL_INFO(b)->protocol : -1))); 139 else
140 return -1;
141 } else {
142 if(GAIM_IS_PROTOCOL_PLUGIN(b))
143 return 1;
144 else
145 return 0;
146 }
140 } 147 }
141 148
142 GaimPlugin * 149 GaimPlugin *
143 gaim_plugin_new(gboolean native, const char *path) 150 gaim_plugin_new(gboolean native, const char *path)
144 { 151 {
868 gaim_plugin_destroy(plugin); 875 gaim_plugin_destroy(plugin);
869 876
870 continue; 877 continue;
871 } 878 }
872 879
873 if (GAIM_PLUGIN_PROTOCOL_INFO(plugin)->protocol == GAIM_PROTO_ICQ || 880 if (gaim_find_prpl(plugin->info->id))
874 gaim_find_prpl(GAIM_PLUGIN_PROTOCOL_INFO(plugin)->protocol))
875 { 881 {
876 /* Nothing to see here--move along, move along */ 882 /* Nothing to see here--move along, move along */
877 gaim_plugin_destroy(plugin); 883 gaim_plugin_destroy(plugin);
878 884
879 continue; 885 continue;

mercurial