Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Aug 2015 15:57:30 +0000 (UTC)
From:      Koop Mast <kwm@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r393875 - in head/x11-toolkits/gtk30: . files
Message-ID:  <201508101557.t7AFvUGP007139@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kwm
Date: Mon Aug 10 15:57:30 2015
New Revision: 393875
URL: https://svnweb.freebsd.org/changeset/ports/393875

Log:
  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@

Added:
  head/x11-toolkits/gtk30/files/extra-gtk_gtkfilechooserwidget.c   (contents, props changed)
  head/x11-toolkits/gtk30/files/extra-gtk_ui_gtkfilechooserwidget.ui   (contents, props changed)
Modified:
  head/x11-toolkits/gtk30/Makefile

Modified: head/x11-toolkits/gtk30/Makefile
==============================================================================
--- head/x11-toolkits/gtk30/Makefile	Mon Aug 10 15:47:18 2015	(r393874)
+++ head/x11-toolkits/gtk30/Makefile	Mon Aug 10 15:57:30 2015	(r393875)
@@ -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:$
 
 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

Added: head/x11-toolkits/gtk30/files/extra-gtk_gtkfilechooserwidget.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-toolkits/gtk30/files/extra-gtk_gtkfilechooserwidget.c	Mon Aug 10 15:57:30 2015	(r393875)
@@ -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);

Added: head/x11-toolkits/gtk30/files/extra-gtk_ui_gtkfilechooserwidget.ui
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-toolkits/gtk30/files/extra-gtk_ui_gtkfilechooserwidget.ui	Mon Aug 10 15:57:30 2015	(r393875)
@@ -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>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508101557.t7AFvUGP007139>