cleanup inlines
[buildroot.git] / package / libgtk2 / single-click.patch
blob250f1629f57c42ea53312d2cd92d9736a4324128
1 Index: gtk+-2.10.6/gtk/gtkcalendar.c
2 ===================================================================
3 --- gtk+-2.10.6.orig/gtk/gtkcalendar.c
4 +++ gtk+-2.10.6/gtk/gtkcalendar.c
5 @@ -2482,9 +2482,11 @@ calendar_main_button_press (GtkCalendar
8 calendar_select_and_focus_day (calendar, day);
9 - }
11 + // This change causes the calendar to disappear after choosing a day
12 +/* }
13 else if (event->type == GDK_2BUTTON_PRESS)
14 - {
15 + {*/
16 priv->in_drag = 0;
17 if (day_month == MONTH_CURRENT)
18 g_signal_emit (calendar,
19 Index: gtk+-2.10.6/gtk/gtkfilesel.c
20 ===================================================================
21 --- gtk+-2.10.6.orig/gtk/gtkfilesel.c
22 +++ gtk+-2.10.6/gtk/gtkfilesel.c
23 @@ -2426,6 +2426,33 @@ gtk_file_selection_file_changed (GtkTree
24 if (fs->last_selected != NULL)
25 g_free (fs->last_selected);
27 + // Single-click directory entry
28 + if (new_names->len == 1)
29 + {
30 + GtkTreeView *tree_view;
31 + GtkTreeModel *model;
32 + GtkTreePath *path;
33 + GtkTreeIter iter;
34 + gboolean is_file;
36 + tree_view = gtk_tree_selection_get_tree_view (selection);
38 + if (gtk_tree_selection_get_selected (selection, &model, &iter))
39 + {
40 + path = gtk_tree_model_get_path (model, &iter);
41 + gtk_tree_model_get (model, &iter, ISFILE_COLUMN, &is_file, -1);
43 + if (!is_file)
44 + {
45 + gtk_file_selection_dir_activate (tree_view, path,
46 + gtk_tree_view_get_column (tree_view, DIR_COLUMN),
47 + user_data);
48 + }
50 + gtk_tree_path_free (path);
51 + }
52 + }
54 fs->last_selected = g_strdup (g_ptr_array_index (new_names, index));
55 filename = get_real_filename (fs->last_selected, FALSE);