diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-06-27 13:13:31 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-06-27 13:13:31 +0000 |
commit | 2865fd2faf5ff0d8ab71d181e441d5b53a1c3bb5 (patch) | |
tree | d042a66a64dfab744a39000a6c903ddd5cf961ac | |
parent | cc44acf7caf3bb828c0eea1b7c4c118b332993be (diff) | |
download | gnunet-gtk-2865fd2faf5ff0d8ab71d181e441d5b53a1c3bb5.tar.gz gnunet-gtk-2865fd2faf5ff0d8ab71d181e441d5b53a1c3bb5.zip |
cosmetics
-rw-r--r-- | contrib/open_directory_dialog.glade | 4 | ||||
-rw-r--r-- | src/fs_event_handler.c | 17 | ||||
-rw-r--r-- | src/main_window_open_directory.c | 5 |
3 files changed, 21 insertions, 5 deletions
diff --git a/contrib/open_directory_dialog.glade b/contrib/open_directory_dialog.glade index 3fe7c99e..d55c0b00 100644 --- a/contrib/open_directory_dialog.glade +++ b/contrib/open_directory_dialog.glade | |||
@@ -2,10 +2,13 @@ | |||
2 | <interface> | 2 | <interface> |
3 | <requires lib="gtk+" version="2.20"/> | 3 | <requires lib="gtk+" version="2.20"/> |
4 | <!-- interface-naming-policy project-wide --> | 4 | <!-- interface-naming-policy project-wide --> |
5 | <object class="GtkFileFilter" id="gnunet_directory_filter"/> | ||
5 | <object class="GtkFileChooserDialog" id="GNUNET_GTK_open_directory_dialog"> | 6 | <object class="GtkFileChooserDialog" id="GNUNET_GTK_open_directory_dialog"> |
7 | <property name="can_default">True</property> | ||
6 | <property name="border_width">5</property> | 8 | <property name="border_width">5</property> |
7 | <property name="type_hint">normal</property> | 9 | <property name="type_hint">normal</property> |
8 | <property name="has_separator">False</property> | 10 | <property name="has_separator">False</property> |
11 | <property name="filter">gnunet_directory_filter</property> | ||
9 | <property name="create_folders">False</property> | 12 | <property name="create_folders">False</property> |
10 | <child internal-child="vbox"> | 13 | <child internal-child="vbox"> |
11 | <object class="GtkVBox" id="dialog-vbox3"> | 14 | <object class="GtkVBox" id="dialog-vbox3"> |
@@ -38,6 +41,7 @@ | |||
38 | <property name="label">gtk-ok</property> | 41 | <property name="label">gtk-ok</property> |
39 | <property name="visible">True</property> | 42 | <property name="visible">True</property> |
40 | <property name="can_focus">True</property> | 43 | <property name="can_focus">True</property> |
44 | <property name="can_default">True</property> | ||
41 | <property name="receives_default">True</property> | 45 | <property name="receives_default">True</property> |
42 | <property name="use_action_appearance">False</property> | 46 | <property name="use_action_appearance">False</property> |
43 | <property name="use_stock">True</property> | 47 | <property name="use_stock">True</property> |
diff --git a/src/fs_event_handler.c b/src/fs_event_handler.c index ebadd9d7..a2d8a885 100644 --- a/src/fs_event_handler.c +++ b/src/fs_event_handler.c | |||
@@ -637,17 +637,20 @@ stop_search (GtkButton *button, | |||
637 | 637 | ||
638 | 638 | ||
639 | /** | 639 | /** |
640 | * Stop completed downloads (or those that failed). | 640 | * Stop completed downloads (or those that failed). Should |
641 | * iterate over the underlying tree store and stop all | ||
642 | * completed entries. Furthermore, if the resulting tree | ||
643 | * store is empty and has no search associated with it, | ||
644 | * the tab should be closed. | ||
641 | */ | 645 | */ |
642 | static void | 646 | static void |
643 | clear_downloads (GtkButton *button, | 647 | clear_downloads (GtkButton *button, |
644 | gpointer user_data) | 648 | gpointer user_data) |
645 | { | 649 | { |
646 | struct SearchTab *tab = user_data; | 650 | struct SearchTab *tab = user_data; |
647 | if (tab->sc != NULL) | 651 | |
648 | { | 652 | GNUNET_assert (tab != NULL); |
649 | } | 653 | GNUNET_break (0); /* not implemented */ |
650 | GNUNET_break (0); | ||
651 | } | 654 | } |
652 | 655 | ||
653 | 656 | ||
@@ -749,6 +752,8 @@ setup_search (struct GNUNET_FS_SearchContext *sc, | |||
749 | "_search_result_label_clear_button")); | 752 | "_search_result_label_clear_button")); |
750 | g_signal_connect(G_OBJECT(tab->clear_button), "clicked", | 753 | g_signal_connect(G_OBJECT(tab->clear_button), "clicked", |
751 | G_CALLBACK(clear_downloads), tab); | 754 | G_CALLBACK(clear_downloads), tab); |
755 | /* FIXME: clear not implemented, hence not visible... */ | ||
756 | gtk_widget_set_visible (tab->clear_button, FALSE); | ||
752 | tab->play_button = GTK_WIDGET (gtk_builder_get_object (tab->builder, | 757 | tab->play_button = GTK_WIDGET (gtk_builder_get_object (tab->builder, |
753 | "_search_result_label_play_button")); | 758 | "_search_result_label_play_button")); |
754 | g_signal_connect(G_OBJECT(tab->play_button), "clicked", | 759 | g_signal_connect(G_OBJECT(tab->play_button), "clicked", |
@@ -921,6 +926,8 @@ GNUNET_GTK_add_to_uri_tab (GtkTreeIter *iter, | |||
921 | utab = setup_search (NULL, NULL); | 926 | utab = setup_search (NULL, NULL); |
922 | gtk_widget_set_visible (utab->close_button, | 927 | gtk_widget_set_visible (utab->close_button, |
923 | FALSE); | 928 | FALSE); |
929 | gtk_widget_set_visible (utab->pause_button, | ||
930 | FALSE); | ||
924 | } | 931 | } |
925 | else | 932 | else |
926 | { | 933 | { |
diff --git a/src/main_window_open_directory.c b/src/main_window_open_directory.c index 75871c50..59171484 100644 --- a/src/main_window_open_directory.c +++ b/src/main_window_open_directory.c | |||
@@ -98,6 +98,7 @@ GNUNET_GTK_main_menu_file_open_gnunet_directory_activate_cb (GtkWidget * dummy, | |||
98 | char *filename; | 98 | char *filename; |
99 | struct GNUNET_DISK_FileHandle *fh; | 99 | struct GNUNET_DISK_FileHandle *fh; |
100 | struct GNUNET_DISK_MapHandle *mh; | 100 | struct GNUNET_DISK_MapHandle *mh; |
101 | GtkFileFilter *ff; | ||
101 | uint64_t fsize; | 102 | uint64_t fsize; |
102 | void * ddata; | 103 | void * ddata; |
103 | 104 | ||
@@ -109,6 +110,10 @@ GNUNET_GTK_main_menu_file_open_gnunet_directory_activate_cb (GtkWidget * dummy, | |||
109 | } | 110 | } |
110 | ad = GTK_WIDGET (gtk_builder_get_object (builder, | 111 | ad = GTK_WIDGET (gtk_builder_get_object (builder, |
111 | "GNUNET_GTK_open_directory_dialog")); | 112 | "GNUNET_GTK_open_directory_dialog")); |
113 | ff = GTK_FILE_FILTER (gtk_builder_get_object (builder, | ||
114 | "gnunet_directory_filter")); | ||
115 | /* FIXME: some day, write a custom file filter for gnunet-directories... */ | ||
116 | gtk_file_filter_add_pattern (ff, "*" GNUNET_FS_DIRECTORY_EXT); | ||
112 | if (GTK_RESPONSE_OK != gtk_dialog_run (GTK_DIALOG (ad))) | 117 | if (GTK_RESPONSE_OK != gtk_dialog_run (GTK_DIALOG (ad))) |
113 | { | 118 | { |
114 | gtk_widget_destroy (ad); | 119 | gtk_widget_destroy (ad); |