Mercurial > gftp.yaz
diff src/gtk/bookmarks.c @ 227:a85a097bbb02
2003-7-20 Brian Masney <masneyb@gftp.org>
* lib/config_file.c lib/gftp.h - added compare_function to
gftp_config_vars structure. (gftp_set_global_option) use the compare
function to see if the value was actually changed, and if so set the
gftp_configuration_changed variable
* lib/misc.c lib/gftp.h - For glib 1.2, added my version of
g_build_path() since it's not there
* lib/misc.c - GLIB/GTK+ 1.2 fixes
* lib/protocols.c (gftp_fd_open) - cleaned up some
* lib/rfc959.c (rfc959_init) - if the email address is blank, get the
users address here instead of in register_module. It was being blanked
out when the config file was being read
* lib/options.h lib/rfc2068.c lib/rfc959.c lib/sshv2.c - mark the
config variables that can show up in the bookmarks editor
* src/text/gftp-text.c src/gtk/options_dialog.c - use
gftp_set_global_option() to set the new configuration values
* src/gtk/bookmarks.c - fixed crash in bookmarks dialog. Added notebook
widget to the dialog as well. The options that can be edited for this
site will show up in other tabs
* src/gtk/gftp-gtk.c - fixes to the calls to gftp_set_global_option()
* src/gtk/options_dialog.c - added gftp_gtk_setup_bookmark_options()
to display all the editable options for this bookmark
author | masneyb |
---|---|
date | Mon, 21 Jul 2003 00:26:43 +0000 |
parents | cf4098008615 |
children | 35ae2e80962e |
line wrap: on
line diff
--- a/src/gtk/bookmarks.c Mon Jul 21 00:22:46 2003 +0000 +++ b/src/gtk/bookmarks.c Mon Jul 21 00:26:43 2003 +0000 @@ -23,8 +23,8 @@ static GtkWidget * bm_hostedit, * bm_portedit, * bm_localdiredit, * bm_remotediredit, * bm_useredit, * bm_passedit, * bm_acctedit, * anon_chk, * bm_pathedit, * bm_protocol, * tree; -static GHashTable * new_bookmarks_htable; -static gftp_bookmarks_var * new_bookmarks; +static GHashTable * new_bookmarks_htable = NULL; +static gftp_bookmarks_var * new_bookmarks = NULL; static GtkItemFactory * edit_factory; @@ -355,8 +355,11 @@ new_bookmarks_htable = NULL; } - gftp_bookmarks_destroy (new_bookmarks); - new_bookmarks = NULL; + if (new_bookmarks != NULL) + { + gftp_bookmarks_destroy (new_bookmarks); + new_bookmarks = NULL; + } gtk_widget_destroy (dialog); } @@ -788,7 +791,7 @@ static void edit_entry (gpointer data) { - GtkWidget * table, * tempwid, * dialog, * menu; + GtkWidget * table, * tempwid, * dialog, * menu, * notebook; gftp_bookmarks_var * entry; int i, num; char *pos; @@ -828,18 +831,22 @@ gdk_window_set_icon_name (dialog->window, gftp_version); } - tempwid = gtk_frame_new (NULL); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), tempwid, TRUE, + notebook = gtk_notebook_new (); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), notebook, TRUE, TRUE, 0); - gtk_widget_show (tempwid); + gtk_widget_show (notebook); table = gtk_table_new (11, 2, FALSE); gtk_container_border_width (GTK_CONTAINER (table), 5); gtk_table_set_row_spacings (GTK_TABLE (table), 5); gtk_table_set_col_spacings (GTK_TABLE (table), 5); - gtk_container_add (GTK_CONTAINER (tempwid), table); gtk_widget_show (table); + tempwid = gtk_label_new (_("Bookmark")); + gtk_widget_show (tempwid); + + gtk_notebook_append_page (GTK_NOTEBOOK (notebook), table, tempwid); + tempwid = gtk_label_new (_("Description:")); gtk_misc_set_alignment (GTK_MISC (tempwid), 1, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), tempwid, 0, 1, 0, 1); @@ -1029,6 +1036,8 @@ G_CALLBACK (bmedit_action), (gpointer) entry); #endif +/* FIXME gftp_gtk_setup_bookmark_options (notebook); */ + gtk_widget_show (dialog); }