comparison pidgin/gtkimhtml.c @ 25358:f1d814126801

Replace the URL registration assertions with regular checks.
author Richard Laager <rlaager@wiktel.com>
date Tue, 02 Dec 2008 18:47:33 +0000
parents b01a7f17a2bb
children d9da15c9e2a1
comparison
equal deleted inserted replaced
25357:b01a7f17a2bb 25358:f1d814126801
5756 5756
5757 klass = g_type_class_ref(GTK_TYPE_IMHTML); 5757 klass = g_type_class_ref(GTK_TYPE_IMHTML);
5758 g_return_val_if_fail(klass, FALSE); 5758 g_return_val_if_fail(klass, FALSE);
5759 5759
5760 if ((proto = imhtml_find_protocol(name, TRUE))) { 5760 if ((proto = imhtml_find_protocol(name, TRUE))) {
5761 g_return_val_if_fail(!activate, FALSE); 5761 if (activate) {
5762 return FALSE;
5763 }
5762 g_free(proto->name); 5764 g_free(proto->name);
5763 g_free(proto); 5765 g_free(proto);
5764 klass->protocols = g_list_remove(klass->protocols, proto); 5766 klass->protocols = g_list_remove(klass->protocols, proto);
5765 return TRUE; 5767 return TRUE;
5766 } else { 5768 } else if (!activate) {
5767 g_return_val_if_fail(activate, FALSE); 5769 return FALSE;
5768 } 5770 }
5769 5771
5770 proto = g_new0(GtkIMHtmlProtocol, 1); 5772 proto = g_new0(GtkIMHtmlProtocol, 1);
5771 proto->name = g_strdup(name); 5773 proto->name = g_strdup(name);
5772 proto->length = strlen(name); 5774 proto->length = strlen(name);