diff options
author | kwm <kwm@FreeBSD.org> | 2015-08-10 23:57:30 +0800 |
---|---|---|
committer | kwm <kwm@FreeBSD.org> | 2015-08-10 23:57:30 +0800 |
commit | 5eabd39a053af2b458d8217d83692e6c26d90081 (patch) | |
tree | 7ed4da1e218448701d79c744e7216d941485f3a0 /x11-toolkits | |
parent | 013f5a3d620a9eb54d0ac83664a36ea46f3e91dc (diff) | |
download | freebsd-ports-gnome-5eabd39a053af2b458d8217d83692e6c26d90081.tar.gz freebsd-ports-gnome-5eabd39a053af2b458d8217d83692e6c26d90081.tar.zst freebsd-ports-gnome-5eabd39a053af2b458d8217d83692e6c26d90081.zip |
Gtk+ 3.16 removed Type a head support in the filechooser. While Gtk+ 3.17
has another way of archiving this, add type a head back as a optional
(default off) option.
Requested by: novel@
Tested by: novel@
Diffstat (limited to 'x11-toolkits')
-rw-r--r-- | x11-toolkits/gtk30/Makefile | 10 | ||||
-rw-r--r-- | x11-toolkits/gtk30/files/extra-gtk_gtkfilechooserwidget.c | 18 | ||||
-rw-r--r-- | x11-toolkits/gtk30/files/extra-gtk_ui_gtkfilechooserwidget.ui | 11 |
3 files changed, 38 insertions, 1 deletions
diff --git a/x11-toolkits/gtk30/Makefile b/x11-toolkits/gtk30/Makefile index d085707fd4ce..b28f6ff42059 100644 --- a/x11-toolkits/gtk30/Makefile +++ b/x11-toolkits/gtk30/Makefile @@ -55,7 +55,7 @@ GLIB_SCHEMAS= org.gtk.Demo.gschema.xml \ org.gtk.Settings.Debug.gschema.xml \ org.gtk.Settings.FileChooser.gschema.xml -OPTIONS_DEFINE= CUPS CLOUDPRINT COLORD DEBUG BROADWAY +OPTIONS_DEFINE= CUPS CLOUDPRINT COLORD DEBUG BROADWAY TYPEAHEAD OPTIONS_DEFAULT=CUPS COLORD BROADWAY OPTIONS_SUB= yes @@ -76,9 +76,17 @@ CLOUDPRINT_LIB_DEPENDS= librest-0.7.so:${PORTSDIR}/devel/librest \ DEBUG_CONFIGURE_ENABLE=debug +# GTK+ 3.17 has a beter way +TYPEAHEAD_DESC= Re-enable type-a-head functionality in file chooser + # needed for the exists() check, booo .include <bsd.port.options.mk> +.if ${PORT_OPTIONS:MTYPEAHEAD} +EXTRA_PATCHES+= ${FILESDIR}/extra-gtk_gtkfilechooserwidget.c \ + ${FILESDIR}/extra-gtk_ui_gtkfilechooserwidget.ui +.endif + post-patch: @${REINPLACE_CMD} -e 's|[{]libdir[}]/locale|{datadir}/locale|g' \ ${WRKSRC}/configure diff --git a/x11-toolkits/gtk30/files/extra-gtk_gtkfilechooserwidget.c b/x11-toolkits/gtk30/files/extra-gtk_gtkfilechooserwidget.c new file mode 100644 index 000000000000..9fe10951e447 --- /dev/null +++ b/x11-toolkits/gtk30/files/extra-gtk_gtkfilechooserwidget.c @@ -0,0 +1,18 @@ +--- gtk/gtkfilechooserwidget.c.orig 2015-08-10 13:02:47.225114000 +0200 ++++ gtk/gtkfilechooserwidget.c 2015-08-10 13:03:58.007015000 +0200 +@@ -1895,7 +1895,6 @@ file_list_set_sort_column_ids (GtkFileCh + { + GtkFileChooserWidgetPrivate *priv = impl->priv; + +- gtk_tree_view_set_search_column (GTK_TREE_VIEW (priv->browse_files_tree_view), -1); + + gtk_tree_view_column_set_sort_column_id (priv->list_name_column, MODEL_COL_NAME); + gtk_tree_view_column_set_sort_column_id (priv->list_mtime_column, MODEL_COL_MTIME); +@@ -3468,6 +3467,7 @@ load_set_model (GtkFileChooserWidget *im + gtk_tree_view_set_model (GTK_TREE_VIEW (priv->browse_files_tree_view), + GTK_TREE_MODEL (priv->browse_files_model)); + gtk_tree_view_columns_autosize (GTK_TREE_VIEW (priv->browse_files_tree_view)); ++ gtk_tree_view_set_search_column (GTK_TREE_VIEW (priv->browse_files_tree_view), MODEL_COL_NAME); + file_list_set_sort_column_ids (impl); + set_sort_column (impl); + profile_msg (" gtk_tree_view_set_model end", NULL); diff --git a/x11-toolkits/gtk30/files/extra-gtk_ui_gtkfilechooserwidget.ui b/x11-toolkits/gtk30/files/extra-gtk_ui_gtkfilechooserwidget.ui new file mode 100644 index 000000000000..7c6c428cb44e --- /dev/null +++ b/x11-toolkits/gtk30/files/extra-gtk_ui_gtkfilechooserwidget.ui @@ -0,0 +1,11 @@ +--- gtk/ui/gtkfilechooserwidget.ui.orig 2015-07-21 14:07:11.000000000 +0200 ++++ gtk/ui/gtkfilechooserwidget.ui 2015-08-10 13:01:52.186654000 +0200 +@@ -193,7 +193,7 @@ + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="has_tooltip">True</property> +- <property name="enable-search">False</property> ++ <property name="enable-search">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="browse_files_tree_view-atkobject"> + <property name="AtkObject::accessible-name" translatable="yes">Files</property> |