# HG changeset patch # User masneyb # Date 1153361790 0 # Node ID 942dd9c2a0644ef9dae79d5c77aed61c4d919921 # Parent 9a6477042520aaf2b78f7b7bc28645e0a67b001a 2006-7-19 Brian Masney * src/gtk/gftp-gtk.c - fixed the default protocol dropdown when some protocols are disabled (from Aurelien Jarno ) (closes #312724) diff -r 9a6477042520 -r 942dd9c2a064 ChangeLog --- a/ChangeLog Thu Jul 20 01:54:39 2006 +0000 +++ b/ChangeLog Thu Jul 20 02:16:30 2006 +0000 @@ -1,4 +1,8 @@ 2006-7-19 Brian Masney + * src/gtk/gftp-gtk.c - fixed the default protocol dropdown when some + protocols are disabled (from Aurelien Jarno ) + (closes #312724) + * src/gtk/bookmarks.c - fixed segfault in the bookmarks editor (from Grant Hammond ) (closes #329261 and #169617) @@ -3428,7 +3432,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.444 2006/07/20 01:54:39 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.445 2006/07/20 02:16:29 masneyb Exp $ tags * debian/* - updated files from Debian maintainer diff -r 9a6477042520 -r 942dd9c2a064 src/gtk/gftp-gtk.c --- a/src/gtk/gftp-gtk.c Thu Jul 20 01:54:39 2006 +0000 +++ b/src/gtk/gftp-gtk.c Thu Jul 20 02:16:30 2006 +0000 @@ -432,7 +432,7 @@ GtkWidget *toolbar, *box, *tempwid; gftp_config_list_vars * tmplistvar; char *default_protocol, *tempstr; - int i, num; + int i, j, num; toolbar = gtk_handle_box_new (); @@ -551,14 +551,16 @@ num = 0; gftp_lookup_global_option ("default_protocol", &default_protocol); protocol_menu = gtk_menu_new (); - for (i = 0; gftp_protocols[i].name; i++) + for (i = 0, j = 0; gftp_protocols[i].name; i++) { if (!gftp_protocols[i].shown) continue; if (default_protocol != NULL && strcmp (gftp_protocols[i].name, default_protocol) == 0) - num = i; + num = j; + + j++; tempwid = gtk_menu_item_new_with_label (gftp_protocols[i].name); gtk_object_set_user_data (GTK_OBJECT (tempwid), GINT_TO_POINTER(i));