Mercurial > gftp.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
226:dbc7a0260d60 | 227:a85a097bbb02 |
---|---|
21 static const char cvsid[] = "$Id$"; | 21 static const char cvsid[] = "$Id$"; |
22 | 22 |
23 static GtkWidget * bm_hostedit, * bm_portedit, * bm_localdiredit, | 23 static GtkWidget * bm_hostedit, * bm_portedit, * bm_localdiredit, |
24 * bm_remotediredit, * bm_useredit, * bm_passedit, * bm_acctedit, * anon_chk, | 24 * bm_remotediredit, * bm_useredit, * bm_passedit, * bm_acctedit, * anon_chk, |
25 * bm_pathedit, * bm_protocol, * tree; | 25 * bm_pathedit, * bm_protocol, * tree; |
26 static GHashTable * new_bookmarks_htable; | 26 static GHashTable * new_bookmarks_htable = NULL; |
27 static gftp_bookmarks_var * new_bookmarks; | 27 static gftp_bookmarks_var * new_bookmarks = NULL; |
28 static GtkItemFactory * edit_factory; | 28 static GtkItemFactory * edit_factory; |
29 | 29 |
30 | 30 |
31 void | 31 void |
32 run_bookmark (gpointer data) | 32 run_bookmark (gpointer data) |
353 { | 353 { |
354 g_hash_table_destroy (new_bookmarks_htable); | 354 g_hash_table_destroy (new_bookmarks_htable); |
355 new_bookmarks_htable = NULL; | 355 new_bookmarks_htable = NULL; |
356 } | 356 } |
357 | 357 |
358 gftp_bookmarks_destroy (new_bookmarks); | 358 if (new_bookmarks != NULL) |
359 new_bookmarks = NULL; | 359 { |
360 gftp_bookmarks_destroy (new_bookmarks); | |
361 new_bookmarks = NULL; | |
362 } | |
360 | 363 |
361 gtk_widget_destroy (dialog); | 364 gtk_widget_destroy (dialog); |
362 } | 365 } |
363 | 366 |
364 | 367 |
786 | 789 |
787 | 790 |
788 static void | 791 static void |
789 edit_entry (gpointer data) | 792 edit_entry (gpointer data) |
790 { | 793 { |
791 GtkWidget * table, * tempwid, * dialog, * menu; | 794 GtkWidget * table, * tempwid, * dialog, * menu, * notebook; |
792 gftp_bookmarks_var * entry; | 795 gftp_bookmarks_var * entry; |
793 int i, num; | 796 int i, num; |
794 char *pos; | 797 char *pos; |
795 | 798 |
796 if (GTK_CLIST (tree)->selection == NULL) | 799 if (GTK_CLIST (tree)->selection == NULL) |
826 gdk_window_set_icon (dialog->window, NULL, gftp_icon->pixmap, | 829 gdk_window_set_icon (dialog->window, NULL, gftp_icon->pixmap, |
827 gftp_icon->bitmap); | 830 gftp_icon->bitmap); |
828 gdk_window_set_icon_name (dialog->window, gftp_version); | 831 gdk_window_set_icon_name (dialog->window, gftp_version); |
829 } | 832 } |
830 | 833 |
831 tempwid = gtk_frame_new (NULL); | 834 notebook = gtk_notebook_new (); |
832 gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), tempwid, TRUE, | 835 gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), notebook, TRUE, |
833 TRUE, 0); | 836 TRUE, 0); |
834 gtk_widget_show (tempwid); | 837 gtk_widget_show (notebook); |
835 | 838 |
836 table = gtk_table_new (11, 2, FALSE); | 839 table = gtk_table_new (11, 2, FALSE); |
837 gtk_container_border_width (GTK_CONTAINER (table), 5); | 840 gtk_container_border_width (GTK_CONTAINER (table), 5); |
838 gtk_table_set_row_spacings (GTK_TABLE (table), 5); | 841 gtk_table_set_row_spacings (GTK_TABLE (table), 5); |
839 gtk_table_set_col_spacings (GTK_TABLE (table), 5); | 842 gtk_table_set_col_spacings (GTK_TABLE (table), 5); |
840 gtk_container_add (GTK_CONTAINER (tempwid), table); | |
841 gtk_widget_show (table); | 843 gtk_widget_show (table); |
844 | |
845 tempwid = gtk_label_new (_("Bookmark")); | |
846 gtk_widget_show (tempwid); | |
847 | |
848 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), table, tempwid); | |
842 | 849 |
843 tempwid = gtk_label_new (_("Description:")); | 850 tempwid = gtk_label_new (_("Description:")); |
844 gtk_misc_set_alignment (GTK_MISC (tempwid), 1, 0.5); | 851 gtk_misc_set_alignment (GTK_MISC (tempwid), 1, 0.5); |
845 gtk_table_attach_defaults (GTK_TABLE (table), tempwid, 0, 1, 0, 1); | 852 gtk_table_attach_defaults (GTK_TABLE (table), tempwid, 0, 1, 0, 1); |
846 gtk_widget_show (tempwid); | 853 gtk_widget_show (tempwid); |
1026 gtk_widget_show (tempwid); | 1033 gtk_widget_show (tempwid); |
1027 #else | 1034 #else |
1028 g_signal_connect (GTK_OBJECT (dialog), "response", | 1035 g_signal_connect (GTK_OBJECT (dialog), "response", |
1029 G_CALLBACK (bmedit_action), (gpointer) entry); | 1036 G_CALLBACK (bmedit_action), (gpointer) entry); |
1030 #endif | 1037 #endif |
1038 | |
1039 /* FIXME gftp_gtk_setup_bookmark_options (notebook); */ | |
1031 | 1040 |
1032 gtk_widget_show (dialog); | 1041 gtk_widget_show (dialog); |
1033 } | 1042 } |
1034 | 1043 |
1035 | 1044 |