Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7550291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:10:27+00:00 2026-05-30T10:10:27+00:00

My app has a GtkFileChooserButton that you can use to open a chooser widget

  • 0

My app has a GtkFileChooserButton that you can use to open a chooser widget and pick a single file .. and then perform operations on that file. This works.

I’ve added drag & drop functionality to the button as well. It works, but it’s buggy.

In short, the first dnd to the FileChooserButton triggers the file-set signal and appears to have worked, — the name changes from “( None )” to the file’s name and if you then click on the button, it pops up a chooser widget showing the proper file selected; HOWEVER, as you can see from the debug output below, get_filename() does not return the filename! Not the first time, anyway.

The second time we dnd a file onto the button (whether it’s a different file or the same file again), all goes well and get_filename() returns the file’s name. Why?

Here’s the debug output from my program when I drag three files on to the button, one at a time:

[on_file-set] FileChooserButton.get_filename() output:
None

[on_file-set] FileChooserButton.get_filename() output:
'/home/ryran/Desktop/priv.txt'

[on_file-set] FileChooserButton.get_filename() output:
'/home/ryran/Desktop/kinamppost'

PS: When I did this, the 1st and 2nd dnd were actually the same file.

If you want to see the full app in action, it’s at http://github.com/ryran/pyrite, and I’d love to post code, but there’s not really anything to post!! I’m not doing drag_dest_set() because FileChooserButton already supports dnd. So ALL I’m doing is defining a cb for the FileChooserButton’s file-set signal. So uhh.. here’s that:

def action_chooserbtn_file_set(self, widget):
    print "[on_file-set] FileChooserButton.get_filename() output:\n{!r}\n".format(widget.get_filename())

For the record I also tried doing all this in concert with defining drag_dest_set, but came up with the same results.

What else to say? I’m starting to think this is a bug.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T10:10:29+00:00Added an answer on May 30, 2026 at 10:10 am

    Turns out this really is a GTK+ bug. Talked to a developer on IRC. He helped me realize that and then encouraged me to post a bug report, which I did — https://bugzilla.gnome.org/show_bug.cgi?id=669718

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My app has a welcome screen that can only be shown in portrait mode.
My app has a widget that lights the LED Flash when we click on
My app has an options menu that is available in almost all Activities, which
My app has a function where it takes user input and then calls HttpGet
my app has a submit feedback form. Is there a way to can capture
My App has a database file in its NSBundle. I want to get update
My app has three tabs, A, B, C that have three distinct activities. Tab
My app has a main screen that the user always starts at, and from
My app has these parts A. Main activity B. Widget provider C. Sync Adapter
My app has an RSS tableView and at another page a WebView. I can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.