diff options
-rw-r--r-- | meta/packages/gtk+/gtk+-2.10.14/small-gtkfilesel.patch | 267 | ||||
-rw-r--r-- | meta/packages/gtk+/gtk+-2.11.6/small-gtkfilesel.patch | 267 | ||||
-rw-r--r-- | meta/packages/gtk+/gtk+_2.10.14.bb | 3 | ||||
-rw-r--r-- | meta/packages/gtk+/gtk+_2.11.6.bb | 3 |
4 files changed, 2 insertions, 538 deletions
diff --git a/meta/packages/gtk+/gtk+-2.10.14/small-gtkfilesel.patch b/meta/packages/gtk+/gtk+-2.10.14/small-gtkfilesel.patch deleted file mode 100644 index 20bf4cf366..0000000000 --- a/meta/packages/gtk+/gtk+-2.10.14/small-gtkfilesel.patch +++ /dev/null | |||
@@ -1,267 +0,0 @@ | |||
1 | diff -urNd ../gtk+-2.4.4-r5/gtk+-2.4.4/gtk/gtkfilesel.c gtk+-2.4.4/gtk/gtkfilesel.c | ||
2 | --- ../gtk+-2.4.4-r5/gtk+-2.4.4/gtk/gtkfilesel.c 2004-07-10 05:02:10.000000000 +0100 | ||
3 | +++ gtk+-2.4.4/gtk/gtkfilesel.c 2004-09-13 13:40:09.000000000 +0100 | ||
4 | @@ -68,6 +68,7 @@ | ||
5 | #include "gtkprivate.h" | ||
6 | #include "gtkscrolledwindow.h" | ||
7 | #include "gtkstock.h" | ||
8 | +#include "gtksignal.h" | ||
9 | #include "gtktreeselection.h" | ||
10 | #include "gtktreeview.h" | ||
11 | #include "gtkvbox.h" | ||
12 | @@ -77,6 +78,7 @@ | ||
13 | #include "gtkmessagedialog.h" | ||
14 | #include "gtkdnd.h" | ||
15 | #include "gtkeventbox.h" | ||
16 | +#include "gtkimage.h" | ||
17 | |||
18 | #undef GTK_DISABLE_DEPRECATED | ||
19 | #include "gtkoptionmenu.h" | ||
20 | @@ -245,7 +247,8 @@ | ||
21 | }; | ||
22 | |||
23 | enum { | ||
24 | - DIR_COLUMN | ||
25 | + DIR_COLUMN, | ||
26 | + ISFILE_COLUMN | ||
27 | }; | ||
28 | |||
29 | enum { | ||
30 | @@ -400,6 +403,12 @@ | ||
31 | GtkTreePath *path, | ||
32 | GtkTreeViewColumn *column, | ||
33 | gpointer user_data); | ||
34 | + | ||
35 | +static void gtk_file_selection_activate (GtkTreeView *tree_view, | ||
36 | + GtkTreePath *path, | ||
37 | + GtkTreeViewColumn *column, | ||
38 | + gpointer user_data); | ||
39 | + | ||
40 | static void gtk_file_selection_file_changed (GtkTreeSelection *selection, | ||
41 | gpointer user_data); | ||
42 | static void gtk_file_selection_dir_activate (GtkTreeView *tree_view, | ||
43 | @@ -419,6 +428,7 @@ | ||
44 | static void gtk_file_selection_create_dir (GtkWidget *widget, gpointer data); | ||
45 | static void gtk_file_selection_delete_file (GtkWidget *widget, gpointer data); | ||
46 | static void gtk_file_selection_rename_file (GtkWidget *widget, gpointer data); | ||
47 | +static void gtk_file_selection_style_set (GtkWidget *widget, GtkStyle *prev_style); | ||
48 | |||
49 | static void free_selected_names (GPtrArray *names); | ||
50 | |||
51 | @@ -578,6 +588,23 @@ | ||
52 | G_PARAM_WRITABLE)); | ||
53 | object_class->destroy = gtk_file_selection_destroy; | ||
54 | widget_class->map = gtk_file_selection_map; | ||
55 | + widget_class->style_set = gtk_file_selection_style_set; | ||
56 | + | ||
57 | + gtk_widget_class_install_style_property (widget_class, | ||
58 | + g_param_spec_boolean ("show_fileops_default", | ||
59 | + _("Show fileop buttons by default"), | ||
60 | + _("Whether file operation buttons are shown by default"), | ||
61 | + TRUE, | ||
62 | + G_PARAM_READABLE)); | ||
63 | + | ||
64 | + gtk_widget_class_install_style_property (widget_class, | ||
65 | + g_param_spec_int ("border_width", | ||
66 | + _("Border width"), | ||
67 | + _("Width of border around the main dialog area"), | ||
68 | + 0, | ||
69 | + G_MAXINT, | ||
70 | + 10, | ||
71 | + G_PARAM_READABLE)); | ||
72 | } | ||
73 | |||
74 | static void gtk_file_selection_set_property (GObject *object, | ||
75 | @@ -649,7 +676,29 @@ | ||
76 | gtk_widget_grab_default (widget); | ||
77 | return FALSE; | ||
78 | } | ||
79 | - | ||
80 | + | ||
81 | +static void | ||
82 | +gtk_file_selection_style_set (GtkWidget *filesel, | ||
83 | + GtkStyle *prev_style) | ||
84 | +{ | ||
85 | + gboolean show_fileops; | ||
86 | + gint border_width; | ||
87 | + | ||
88 | + gtk_widget_style_get (filesel, | ||
89 | + "show_fileops_default", | ||
90 | + &show_fileops, | ||
91 | + "border_width", | ||
92 | + &border_width, | ||
93 | + NULL); | ||
94 | + | ||
95 | + gtk_container_set_border_width (GTK_CONTAINER (filesel), border_width); | ||
96 | + | ||
97 | + if (show_fileops) | ||
98 | + gtk_file_selection_show_fileop_buttons (GTK_FILE_SELECTION (filesel)); | ||
99 | + else | ||
100 | + gtk_file_selection_hide_fileop_buttons (GTK_FILE_SELECTION (filesel)); | ||
101 | +} | ||
102 | + | ||
103 | static void | ||
104 | gtk_file_selection_init (GtkFileSelection *filesel) | ||
105 | { | ||
106 | @@ -674,17 +723,15 @@ | ||
107 | |||
108 | /* The dialog-sized vertical box */ | ||
109 | filesel->main_vbox = dialog->vbox; | ||
110 | - gtk_container_set_border_width (GTK_CONTAINER (filesel), 10); | ||
111 | |||
112 | /* The horizontal box containing create, rename etc. buttons */ | ||
113 | filesel->button_area = gtk_hbutton_box_new (); | ||
114 | gtk_button_box_set_layout (GTK_BUTTON_BOX (filesel->button_area), GTK_BUTTONBOX_START); | ||
115 | - gtk_box_set_spacing (GTK_BOX (filesel->button_area), 0); | ||
116 | gtk_box_pack_start (GTK_BOX (filesel->main_vbox), filesel->button_area, | ||
117 | FALSE, FALSE, 0); | ||
118 | gtk_widget_show (filesel->button_area); | ||
119 | |||
120 | - gtk_file_selection_show_fileop_buttons (filesel); | ||
121 | + gtk_file_selection_style_set (GTK_WIDGET (filesel), NULL); | ||
122 | |||
123 | /* hbox for pulldown menu */ | ||
124 | pulldown_hbox = gtk_hbox_new (TRUE, 5); | ||
125 | @@ -723,25 +770,32 @@ | ||
126 | |||
127 | /* The directories list */ | ||
128 | |||
129 | - model = gtk_list_store_new (1, G_TYPE_STRING); | ||
130 | + model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_BOOLEAN); /* MA */ | ||
131 | filesel->dir_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); | ||
132 | g_object_unref (model); | ||
133 | |||
134 | - column = gtk_tree_view_column_new_with_attributes (_("Folders"), | ||
135 | + column = gtk_tree_view_column_new_with_attributes (/*_("Folders")*/ NULL, | ||
136 | gtk_cell_renderer_text_new (), | ||
137 | "text", DIR_COLUMN, | ||
138 | NULL); | ||
139 | label = gtk_label_new_with_mnemonic (_("Fol_ders")); | ||
140 | gtk_label_set_mnemonic_widget (GTK_LABEL (label), filesel->dir_list); | ||
141 | gtk_widget_show (label); | ||
142 | - gtk_tree_view_column_set_widget (column, label); | ||
143 | + | ||
144 | + /* gtk_tree_view_column_set_widget (column, label); */ | ||
145 | + gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (filesel->dir_list), FALSE); | ||
146 | + | ||
147 | gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); | ||
148 | gtk_tree_view_append_column (GTK_TREE_VIEW (filesel->dir_list), column); | ||
149 | |||
150 | gtk_widget_set_size_request (filesel->dir_list, | ||
151 | DIR_LIST_WIDTH, DIR_LIST_HEIGHT); | ||
152 | g_signal_connect (filesel->dir_list, "row_activated", | ||
153 | - G_CALLBACK (gtk_file_selection_dir_activate), filesel); | ||
154 | + G_CALLBACK (gtk_file_selection_activate), filesel); | ||
155 | + | ||
156 | + g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (filesel->dir_list)), "changed", | ||
157 | + G_CALLBACK (gtk_file_selection_file_changed), filesel); | ||
158 | + | ||
159 | |||
160 | /* gtk_clist_column_titles_passive (GTK_CLIST (filesel->dir_list)); */ | ||
161 | |||
162 | @@ -758,41 +812,6 @@ | ||
163 | gtk_widget_show (filesel->dir_list); | ||
164 | gtk_widget_show (scrolled_win); | ||
165 | |||
166 | - /* The files list */ | ||
167 | - model = gtk_list_store_new (1, G_TYPE_STRING); | ||
168 | - filesel->file_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); | ||
169 | - g_object_unref (model); | ||
170 | - | ||
171 | - column = gtk_tree_view_column_new_with_attributes (_("Files"), | ||
172 | - gtk_cell_renderer_text_new (), | ||
173 | - "text", FILE_COLUMN, | ||
174 | - NULL); | ||
175 | - label = gtk_label_new_with_mnemonic (_("_Files")); | ||
176 | - gtk_label_set_mnemonic_widget (GTK_LABEL (label), filesel->file_list); | ||
177 | - gtk_widget_show (label); | ||
178 | - gtk_tree_view_column_set_widget (column, label); | ||
179 | - gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); | ||
180 | - gtk_tree_view_append_column (GTK_TREE_VIEW (filesel->file_list), column); | ||
181 | - | ||
182 | - gtk_widget_set_size_request (filesel->file_list, | ||
183 | - FILE_LIST_WIDTH, FILE_LIST_HEIGHT); | ||
184 | - g_signal_connect (filesel->file_list, "row_activated", | ||
185 | - G_CALLBACK (gtk_file_selection_file_activate), filesel); | ||
186 | - g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (filesel->file_list)), "changed", | ||
187 | - G_CALLBACK (gtk_file_selection_file_changed), filesel); | ||
188 | - | ||
189 | - /* gtk_clist_column_titles_passive (GTK_CLIST (filesel->file_list)); */ | ||
190 | - | ||
191 | - scrolled_win = gtk_scrolled_window_new (NULL, NULL); | ||
192 | - gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win), GTK_SHADOW_IN); | ||
193 | - gtk_container_add (GTK_CONTAINER (scrolled_win), filesel->file_list); | ||
194 | - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win), | ||
195 | - GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); | ||
196 | - gtk_container_set_border_width (GTK_CONTAINER (scrolled_win), 0); | ||
197 | - gtk_container_add (GTK_CONTAINER (list_container), scrolled_win); | ||
198 | - gtk_widget_show (filesel->file_list); | ||
199 | - gtk_widget_show (scrolled_win); | ||
200 | - | ||
201 | /* action area for packing buttons into. */ | ||
202 | filesel->action_area = gtk_hbox_new (TRUE, 0); | ||
203 | gtk_box_pack_start (GTK_BOX (filesel->main_vbox), filesel->action_area, | ||
204 | @@ -2008,6 +2027,23 @@ | ||
205 | } | ||
206 | |||
207 | static void | ||
208 | +gtk_file_selection_activate (GtkTreeView *tree_view, | ||
209 | + GtkTreePath *path, | ||
210 | + GtkTreeViewColumn *column, | ||
211 | + gpointer user_data) | ||
212 | +{ | ||
213 | + GtkTreeModel *model = gtk_tree_view_get_model (tree_view); | ||
214 | + GtkTreeIter iter; | ||
215 | + gboolean is_file; | ||
216 | + | ||
217 | + gtk_tree_model_get_iter (model, &iter, path); | ||
218 | + gtk_tree_model_get (model, &iter, ISFILE_COLUMN, &is_file, -1); | ||
219 | + | ||
220 | + if (! is_file) | ||
221 | + gtk_file_selection_dir_activate (tree_view, path, column, user_data); | ||
222 | +} | ||
223 | + | ||
224 | +static void | ||
225 | gtk_file_selection_file_activate (GtkTreeView *tree_view, | ||
226 | GtkTreePath *path, | ||
227 | GtkTreeViewColumn *column, | ||
228 | @@ -2103,7 +2139,6 @@ | ||
229 | PossibleCompletion* poss; | ||
230 | GtkTreeIter iter; | ||
231 | GtkListStore *dir_model; | ||
232 | - GtkListStore *file_model; | ||
233 | gchar* filename; | ||
234 | gchar* rem_path = rel_path; | ||
235 | gchar* sel_text; | ||
236 | @@ -2125,10 +2160,8 @@ | ||
237 | g_assert (cmpl_state->reference_dir); | ||
238 | |||
239 | dir_model = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (fs->dir_list))); | ||
240 | - file_model = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (fs->file_list))); | ||
241 | |||
242 | gtk_list_store_clear (dir_model); | ||
243 | - gtk_list_store_clear (file_model); | ||
244 | |||
245 | /* Set the dir list to include ./ and ../ */ | ||
246 | gtk_list_store_append (dir_model, &iter); | ||
247 | @@ -2150,13 +2183,17 @@ | ||
248 | strcmp (filename, ".." G_DIR_SEPARATOR_S) != 0) | ||
249 | { | ||
250 | gtk_list_store_append (dir_model, &iter); | ||
251 | - gtk_list_store_set (dir_model, &iter, DIR_COLUMN, filename, -1); | ||
252 | + gtk_list_store_set (dir_model, &iter, | ||
253 | + DIR_COLUMN, filename, | ||
254 | + ISFILE_COLUMN, FALSE, -1); | ||
255 | } | ||
256 | } | ||
257 | else | ||
258 | { | ||
259 | - gtk_list_store_append (file_model, &iter); | ||
260 | - gtk_list_store_set (file_model, &iter, DIR_COLUMN, filename, -1); | ||
261 | + gtk_list_store_append (dir_model, &iter); | ||
262 | + gtk_list_store_set (dir_model, &iter, | ||
263 | + DIR_COLUMN, filename, | ||
264 | + ISFILE_COLUMN, TRUE, -1); | ||
265 | } | ||
266 | } | ||
267 | |||
diff --git a/meta/packages/gtk+/gtk+-2.11.6/small-gtkfilesel.patch b/meta/packages/gtk+/gtk+-2.11.6/small-gtkfilesel.patch deleted file mode 100644 index 20bf4cf366..0000000000 --- a/meta/packages/gtk+/gtk+-2.11.6/small-gtkfilesel.patch +++ /dev/null | |||
@@ -1,267 +0,0 @@ | |||
1 | diff -urNd ../gtk+-2.4.4-r5/gtk+-2.4.4/gtk/gtkfilesel.c gtk+-2.4.4/gtk/gtkfilesel.c | ||
2 | --- ../gtk+-2.4.4-r5/gtk+-2.4.4/gtk/gtkfilesel.c 2004-07-10 05:02:10.000000000 +0100 | ||
3 | +++ gtk+-2.4.4/gtk/gtkfilesel.c 2004-09-13 13:40:09.000000000 +0100 | ||
4 | @@ -68,6 +68,7 @@ | ||
5 | #include "gtkprivate.h" | ||
6 | #include "gtkscrolledwindow.h" | ||
7 | #include "gtkstock.h" | ||
8 | +#include "gtksignal.h" | ||
9 | #include "gtktreeselection.h" | ||
10 | #include "gtktreeview.h" | ||
11 | #include "gtkvbox.h" | ||
12 | @@ -77,6 +78,7 @@ | ||
13 | #include "gtkmessagedialog.h" | ||
14 | #include "gtkdnd.h" | ||
15 | #include "gtkeventbox.h" | ||
16 | +#include "gtkimage.h" | ||
17 | |||
18 | #undef GTK_DISABLE_DEPRECATED | ||
19 | #include "gtkoptionmenu.h" | ||
20 | @@ -245,7 +247,8 @@ | ||
21 | }; | ||
22 | |||
23 | enum { | ||
24 | - DIR_COLUMN | ||
25 | + DIR_COLUMN, | ||
26 | + ISFILE_COLUMN | ||
27 | }; | ||
28 | |||
29 | enum { | ||
30 | @@ -400,6 +403,12 @@ | ||
31 | GtkTreePath *path, | ||
32 | GtkTreeViewColumn *column, | ||
33 | gpointer user_data); | ||
34 | + | ||
35 | +static void gtk_file_selection_activate (GtkTreeView *tree_view, | ||
36 | + GtkTreePath *path, | ||
37 | + GtkTreeViewColumn *column, | ||
38 | + gpointer user_data); | ||
39 | + | ||
40 | static void gtk_file_selection_file_changed (GtkTreeSelection *selection, | ||
41 | gpointer user_data); | ||
42 | static void gtk_file_selection_dir_activate (GtkTreeView *tree_view, | ||
43 | @@ -419,6 +428,7 @@ | ||
44 | static void gtk_file_selection_create_dir (GtkWidget *widget, gpointer data); | ||
45 | static void gtk_file_selection_delete_file (GtkWidget *widget, gpointer data); | ||
46 | static void gtk_file_selection_rename_file (GtkWidget *widget, gpointer data); | ||
47 | +static void gtk_file_selection_style_set (GtkWidget *widget, GtkStyle *prev_style); | ||
48 | |||
49 | static void free_selected_names (GPtrArray *names); | ||
50 | |||
51 | @@ -578,6 +588,23 @@ | ||
52 | G_PARAM_WRITABLE)); | ||
53 | object_class->destroy = gtk_file_selection_destroy; | ||
54 | widget_class->map = gtk_file_selection_map; | ||
55 | + widget_class->style_set = gtk_file_selection_style_set; | ||
56 | + | ||
57 | + gtk_widget_class_install_style_property (widget_class, | ||
58 | + g_param_spec_boolean ("show_fileops_default", | ||
59 | + _("Show fileop buttons by default"), | ||
60 | + _("Whether file operation buttons are shown by default"), | ||
61 | + TRUE, | ||
62 | + G_PARAM_READABLE)); | ||
63 | + | ||
64 | + gtk_widget_class_install_style_property (widget_class, | ||
65 | + g_param_spec_int ("border_width", | ||
66 | + _("Border width"), | ||
67 | + _("Width of border around the main dialog area"), | ||
68 | + 0, | ||
69 | + G_MAXINT, | ||
70 | + 10, | ||
71 | + G_PARAM_READABLE)); | ||
72 | } | ||
73 | |||
74 | static void gtk_file_selection_set_property (GObject *object, | ||
75 | @@ -649,7 +676,29 @@ | ||
76 | gtk_widget_grab_default (widget); | ||
77 | return FALSE; | ||
78 | } | ||
79 | - | ||
80 | + | ||
81 | +static void | ||
82 | +gtk_file_selection_style_set (GtkWidget *filesel, | ||
83 | + GtkStyle *prev_style) | ||
84 | +{ | ||
85 | + gboolean show_fileops; | ||
86 | + gint border_width; | ||
87 | + | ||
88 | + gtk_widget_style_get (filesel, | ||
89 | + "show_fileops_default", | ||
90 | + &show_fileops, | ||
91 | + "border_width", | ||
92 | + &border_width, | ||
93 | + NULL); | ||
94 | + | ||
95 | + gtk_container_set_border_width (GTK_CONTAINER (filesel), border_width); | ||
96 | + | ||
97 | + if (show_fileops) | ||
98 | + gtk_file_selection_show_fileop_buttons (GTK_FILE_SELECTION (filesel)); | ||
99 | + else | ||
100 | + gtk_file_selection_hide_fileop_buttons (GTK_FILE_SELECTION (filesel)); | ||
101 | +} | ||
102 | + | ||
103 | static void | ||
104 | gtk_file_selection_init (GtkFileSelection *filesel) | ||
105 | { | ||
106 | @@ -674,17 +723,15 @@ | ||
107 | |||
108 | /* The dialog-sized vertical box */ | ||
109 | filesel->main_vbox = dialog->vbox; | ||
110 | - gtk_container_set_border_width (GTK_CONTAINER (filesel), 10); | ||
111 | |||
112 | /* The horizontal box containing create, rename etc. buttons */ | ||
113 | filesel->button_area = gtk_hbutton_box_new (); | ||
114 | gtk_button_box_set_layout (GTK_BUTTON_BOX (filesel->button_area), GTK_BUTTONBOX_START); | ||
115 | - gtk_box_set_spacing (GTK_BOX (filesel->button_area), 0); | ||
116 | gtk_box_pack_start (GTK_BOX (filesel->main_vbox), filesel->button_area, | ||
117 | FALSE, FALSE, 0); | ||
118 | gtk_widget_show (filesel->button_area); | ||
119 | |||
120 | - gtk_file_selection_show_fileop_buttons (filesel); | ||
121 | + gtk_file_selection_style_set (GTK_WIDGET (filesel), NULL); | ||
122 | |||
123 | /* hbox for pulldown menu */ | ||
124 | pulldown_hbox = gtk_hbox_new (TRUE, 5); | ||
125 | @@ -723,25 +770,32 @@ | ||
126 | |||
127 | /* The directories list */ | ||
128 | |||
129 | - model = gtk_list_store_new (1, G_TYPE_STRING); | ||
130 | + model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_BOOLEAN); /* MA */ | ||
131 | filesel->dir_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); | ||
132 | g_object_unref (model); | ||
133 | |||
134 | - column = gtk_tree_view_column_new_with_attributes (_("Folders"), | ||
135 | + column = gtk_tree_view_column_new_with_attributes (/*_("Folders")*/ NULL, | ||
136 | gtk_cell_renderer_text_new (), | ||
137 | "text", DIR_COLUMN, | ||
138 | NULL); | ||
139 | label = gtk_label_new_with_mnemonic (_("Fol_ders")); | ||
140 | gtk_label_set_mnemonic_widget (GTK_LABEL (label), filesel->dir_list); | ||
141 | gtk_widget_show (label); | ||
142 | - gtk_tree_view_column_set_widget (column, label); | ||
143 | + | ||
144 | + /* gtk_tree_view_column_set_widget (column, label); */ | ||
145 | + gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (filesel->dir_list), FALSE); | ||
146 | + | ||
147 | gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); | ||
148 | gtk_tree_view_append_column (GTK_TREE_VIEW (filesel->dir_list), column); | ||
149 | |||
150 | gtk_widget_set_size_request (filesel->dir_list, | ||
151 | DIR_LIST_WIDTH, DIR_LIST_HEIGHT); | ||
152 | g_signal_connect (filesel->dir_list, "row_activated", | ||
153 | - G_CALLBACK (gtk_file_selection_dir_activate), filesel); | ||
154 | + G_CALLBACK (gtk_file_selection_activate), filesel); | ||
155 | + | ||
156 | + g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (filesel->dir_list)), "changed", | ||
157 | + G_CALLBACK (gtk_file_selection_file_changed), filesel); | ||
158 | + | ||
159 | |||
160 | /* gtk_clist_column_titles_passive (GTK_CLIST (filesel->dir_list)); */ | ||
161 | |||
162 | @@ -758,41 +812,6 @@ | ||
163 | gtk_widget_show (filesel->dir_list); | ||
164 | gtk_widget_show (scrolled_win); | ||
165 | |||
166 | - /* The files list */ | ||
167 | - model = gtk_list_store_new (1, G_TYPE_STRING); | ||
168 | - filesel->file_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); | ||
169 | - g_object_unref (model); | ||
170 | - | ||
171 | - column = gtk_tree_view_column_new_with_attributes (_("Files"), | ||
172 | - gtk_cell_renderer_text_new (), | ||
173 | - "text", FILE_COLUMN, | ||
174 | - NULL); | ||
175 | - label = gtk_label_new_with_mnemonic (_("_Files")); | ||
176 | - gtk_label_set_mnemonic_widget (GTK_LABEL (label), filesel->file_list); | ||
177 | - gtk_widget_show (label); | ||
178 | - gtk_tree_view_column_set_widget (column, label); | ||
179 | - gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); | ||
180 | - gtk_tree_view_append_column (GTK_TREE_VIEW (filesel->file_list), column); | ||
181 | - | ||
182 | - gtk_widget_set_size_request (filesel->file_list, | ||
183 | - FILE_LIST_WIDTH, FILE_LIST_HEIGHT); | ||
184 | - g_signal_connect (filesel->file_list, "row_activated", | ||
185 | - G_CALLBACK (gtk_file_selection_file_activate), filesel); | ||
186 | - g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (filesel->file_list)), "changed", | ||
187 | - G_CALLBACK (gtk_file_selection_file_changed), filesel); | ||
188 | - | ||
189 | - /* gtk_clist_column_titles_passive (GTK_CLIST (filesel->file_list)); */ | ||
190 | - | ||
191 | - scrolled_win = gtk_scrolled_window_new (NULL, NULL); | ||
192 | - gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win), GTK_SHADOW_IN); | ||
193 | - gtk_container_add (GTK_CONTAINER (scrolled_win), filesel->file_list); | ||
194 | - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win), | ||
195 | - GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); | ||
196 | - gtk_container_set_border_width (GTK_CONTAINER (scrolled_win), 0); | ||
197 | - gtk_container_add (GTK_CONTAINER (list_container), scrolled_win); | ||
198 | - gtk_widget_show (filesel->file_list); | ||
199 | - gtk_widget_show (scrolled_win); | ||
200 | - | ||
201 | /* action area for packing buttons into. */ | ||
202 | filesel->action_area = gtk_hbox_new (TRUE, 0); | ||
203 | gtk_box_pack_start (GTK_BOX (filesel->main_vbox), filesel->action_area, | ||
204 | @@ -2008,6 +2027,23 @@ | ||
205 | } | ||
206 | |||
207 | static void | ||
208 | +gtk_file_selection_activate (GtkTreeView *tree_view, | ||
209 | + GtkTreePath *path, | ||
210 | + GtkTreeViewColumn *column, | ||
211 | + gpointer user_data) | ||
212 | +{ | ||
213 | + GtkTreeModel *model = gtk_tree_view_get_model (tree_view); | ||
214 | + GtkTreeIter iter; | ||
215 | + gboolean is_file; | ||
216 | + | ||
217 | + gtk_tree_model_get_iter (model, &iter, path); | ||
218 | + gtk_tree_model_get (model, &iter, ISFILE_COLUMN, &is_file, -1); | ||
219 | + | ||
220 | + if (! is_file) | ||
221 | + gtk_file_selection_dir_activate (tree_view, path, column, user_data); | ||
222 | +} | ||
223 | + | ||
224 | +static void | ||
225 | gtk_file_selection_file_activate (GtkTreeView *tree_view, | ||
226 | GtkTreePath *path, | ||
227 | GtkTreeViewColumn *column, | ||
228 | @@ -2103,7 +2139,6 @@ | ||
229 | PossibleCompletion* poss; | ||
230 | GtkTreeIter iter; | ||
231 | GtkListStore *dir_model; | ||
232 | - GtkListStore *file_model; | ||
233 | gchar* filename; | ||
234 | gchar* rem_path = rel_path; | ||
235 | gchar* sel_text; | ||
236 | @@ -2125,10 +2160,8 @@ | ||
237 | g_assert (cmpl_state->reference_dir); | ||
238 | |||
239 | dir_model = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (fs->dir_list))); | ||
240 | - file_model = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (fs->file_list))); | ||
241 | |||
242 | gtk_list_store_clear (dir_model); | ||
243 | - gtk_list_store_clear (file_model); | ||
244 | |||
245 | /* Set the dir list to include ./ and ../ */ | ||
246 | gtk_list_store_append (dir_model, &iter); | ||
247 | @@ -2150,13 +2183,17 @@ | ||
248 | strcmp (filename, ".." G_DIR_SEPARATOR_S) != 0) | ||
249 | { | ||
250 | gtk_list_store_append (dir_model, &iter); | ||
251 | - gtk_list_store_set (dir_model, &iter, DIR_COLUMN, filename, -1); | ||
252 | + gtk_list_store_set (dir_model, &iter, | ||
253 | + DIR_COLUMN, filename, | ||
254 | + ISFILE_COLUMN, FALSE, -1); | ||
255 | } | ||
256 | } | ||
257 | else | ||
258 | { | ||
259 | - gtk_list_store_append (file_model, &iter); | ||
260 | - gtk_list_store_set (file_model, &iter, DIR_COLUMN, filename, -1); | ||
261 | + gtk_list_store_append (dir_model, &iter); | ||
262 | + gtk_list_store_set (dir_model, &iter, | ||
263 | + DIR_COLUMN, filename, | ||
264 | + ISFILE_COLUMN, TRUE, -1); | ||
265 | } | ||
266 | } | ||
267 | |||
diff --git a/meta/packages/gtk+/gtk+_2.10.14.bb b/meta/packages/gtk+/gtk+_2.10.14.bb index 461ae7a793..a9e39ab98b 100644 --- a/meta/packages/gtk+/gtk+_2.10.14.bb +++ b/meta/packages/gtk+/gtk+_2.10.14.bb | |||
@@ -1,7 +1,7 @@ | |||
1 | require gtk+.inc | 1 | require gtk+.inc |
2 | 2 | ||
3 | DEPENDS += "cairo" | 3 | DEPENDS += "cairo" |
4 | PR = "r16" | 4 | PR = "r17" |
5 | 5 | ||
6 | # disable per default - untested and not all patches included. | 6 | # disable per default - untested and not all patches included. |
7 | DEFAULT_PREFERENCE = "-1" | 7 | DEFAULT_PREFERENCE = "-1" |
@@ -9,7 +9,6 @@ DEFAULT_PREFERENCE = "-1" | |||
9 | SRC_URI = "ftp://ftp.gtk.org/pub/gtk/v2.10/gtk+-${PV}.tar.bz2 \ | 9 | SRC_URI = "ftp://ftp.gtk.org/pub/gtk/v2.10/gtk+-${PV}.tar.bz2 \ |
10 | file://gtklabel-resize-patch;patch=1 \ | 10 | file://gtklabel-resize-patch;patch=1 \ |
11 | file://menu-deactivate.patch;patch=1 \ | 11 | file://menu-deactivate.patch;patch=1 \ |
12 | file://small-gtkfilesel.patch;patch=1 \ | ||
13 | file://run-iconcache.patch;patch=1 \ | 12 | file://run-iconcache.patch;patch=1 \ |
14 | file://disable-print.patch;patch=1 \ | 13 | file://disable-print.patch;patch=1 \ |
15 | file://hardcoded_libtool.patch;patch=1 \ | 14 | file://hardcoded_libtool.patch;patch=1 \ |
diff --git a/meta/packages/gtk+/gtk+_2.11.6.bb b/meta/packages/gtk+/gtk+_2.11.6.bb index 6b1ceef63d..6aa9d052af 100644 --- a/meta/packages/gtk+/gtk+_2.11.6.bb +++ b/meta/packages/gtk+/gtk+_2.11.6.bb | |||
@@ -1,14 +1,13 @@ | |||
1 | require gtk+.inc | 1 | require gtk+.inc |
2 | 2 | ||
3 | DEPENDS += "cairo" | 3 | DEPENDS += "cairo" |
4 | PR = "r1" | 4 | PR = "r2" |
5 | 5 | ||
6 | # disable per default - untested and not all patches included. | 6 | # disable per default - untested and not all patches included. |
7 | DEFAULT_PREFERENCE = "-1" | 7 | DEFAULT_PREFERENCE = "-1" |
8 | 8 | ||
9 | SRC_URI = "http://download.gnome.org/sources/gtk+/2.11/gtk+-${PV}.tar.bz2 \ | 9 | SRC_URI = "http://download.gnome.org/sources/gtk+/2.11/gtk+-${PV}.tar.bz2 \ |
10 | file://xsettings.patch;patch=1 \ | 10 | file://xsettings.patch;patch=1 \ |
11 | file://small-gtkfilesel.patch;patch=1 \ | ||
12 | file://run-iconcache.patch;patch=1 \ | 11 | file://run-iconcache.patch;patch=1 \ |
13 | file://disable-print.patch;patch=1 \ | 12 | file://disable-print.patch;patch=1 \ |
14 | file://hardcoded_libtool.patch;patch=1 \ | 13 | file://hardcoded_libtool.patch;patch=1 \ |