{"id":714,"date":"2012-12-29T00:03:25","date_gmt":"2012-12-29T05:03:25","guid":{"rendered":"http:\/\/littlesvr.ca\/grumble\/?p=714"},"modified":"2012-12-29T00:03:25","modified_gmt":"2012-12-29T05:03:25","slug":"gtkfilechooser-not-choosing","status":"publish","type":"post","link":"http:\/\/littlesvr.ca\/grumble\/2012\/12\/29\/gtkfilechooser-not-choosing\/","title":{"rendered":"GtkFileChooser not choosing"},"content":{"rendered":"<p>I maintain a reasonably popular app called Asunder. This app has in its preferences a GtkFileChooserButton, and implementation of the (supposedly) interface GtkFileChooser.<\/p>\n<p>I&#8217;ve been getting bug reports about the selected directory not being saved when you save the preferences and looked into it again today. I could hardly believe what I found.<\/p>\n<p>If I double-click on the directory I want selected and click &#8220;Open&#8221;, what I get looks like this:<\/p>\n<p><a href=\"http:\/\/littlesvr.ca\/grumble\/wp-content\/uploads\/2012\/12\/gtkfilechooserbutton.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-715\" alt=\"gtkfilechooserbutton\" src=\"http:\/\/littlesvr.ca\/grumble\/wp-content\/uploads\/2012\/12\/gtkfilechooserbutton.png\" width=\"438\" height=\"33\" srcset=\"http:\/\/littlesvr.ca\/grumble\/wp-content\/uploads\/2012\/12\/gtkfilechooserbutton.png 438w, http:\/\/littlesvr.ca\/grumble\/wp-content\/uploads\/2012\/12\/gtkfilechooserbutton-300x22.png 300w\" sizes=\"auto, (max-width: 438px) 100vw, 438px\" \/><\/a><\/p>\n<p>But gtk_file_chooser_get_filename() returns.. &#8220;\/home\/andrew&#8221;. I dug and dug through my code and the GTK reference looking for an explanation, but found none. After experimenting some more I found the problem:<\/p>\n<p>This only happens if I double-click on the directory I want (&#8220;temp&#8221; in this case). If instead I single-click on the directory I want &#8211; I get it. Using other GtkFileChooser getters doesn&#8217;t fix anything. So this is not a bug in my code (in fact I don&#8217;t think I could hack around this even if I wanted to), this is probably some retard deciding that his 0.001% use case is more important design-wise than everyone else who uses GTK.<\/p>\n<p>I guess that&#8217;s just the way things are in a lot of open source. Instead of being brushed aside because you&#8217;re not the highest-paying customer your needs are brushed aside because they aren&#8217;t matching someone else&#8217;s vision.<\/p>\n<p>There&#8217;s a chance that this is an honest bug (not a design decision), but how is one to know for sure? I mean look at what they&#8217;ve done to KDE4 and Gnome3.. my faith in open source is starting to waver.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I maintain a reasonably popular app called Asunder. This app has in its preferences a GtkFileChooserButton, and implementation of the (supposedly) interface GtkFileChooser. I&#8217;ve been getting bug reports about the selected directory not being saved when you save the preferences and looked into it again today. I could hardly believe what I found. If I &hellip; <\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4],"tags":[],"class_list":{"0":"entry","1":"post","2":"publish","3":"author-andrew","4":"post-714","6":"format-standard","7":"category-opensource","8":"category-safeforseneca"},"_links":{"self":[{"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/posts\/714","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/comments?post=714"}],"version-history":[{"count":1,"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/posts\/714\/revisions"}],"predecessor-version":[{"id":716,"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/posts\/714\/revisions\/716"}],"wp:attachment":[{"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/media?parent=714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/categories?post=714"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/tags?post=714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}