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 8178067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:40:36+00:00 2026-06-06T23:40:36+00:00

I made a gtk app with Ubuntu quickly tool.But I have encountered a few

  • 0

I made a gtk app with Ubuntu quickly tool.But I have encountered a few problems with the window close button(the one in the top left of the window).So here’s the thing: I want my app to close in the system tray ,so I write the code in a method ,create a button on my window and connect the “clicked” signal to my method.Everything is working as it should.Now I want my window close button to do the same thing.When i look up on the code written by quickly i found this method:

 def on_destroy(self, widget, data=None):
    # Clean up code for saving application state should be added here.
    Gtk.main_quit()

So instead of Gtk.main_quit() I called my handler for the button I deployed on my window.The thing now is that my app is hiding on the system tray but when i want to unhide it there is no window,although I can see the process of my app is alive.
I want to say that when I use the button i created I can see my app when I unhide it ,so it’s quite obvious that when I press the system close button there’s more than one signal.

So my question is what other signals are called when I close my window from system button?And where is the place quickly implements the handler for the other signals?

Thank for your time!

  • 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-06-06T23:40:37+00:00Added an answer on June 6, 2026 at 11:40 pm

    Your window is "destroy". Connecting to that signal allows you to run some code, but, your window is still destroyed. If you’re aren’t breaking out of the main loop with Gtk.main_quit() then your app is still running. To re-display the window you would need to recreate it.

    Another option is to instead connect a callback function to the "delete-event" of the window. In this signal handler if you return True then the window will not be destroyed. In other words, you could hide the window and return True and then re-show the window later. If you return False from this signal handler then the window will continue to be destroyed.

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

Sidebar

Related Questions

I'm trying to do a python(2.7)/GTK+ app, and I have a window, containing a
For a pop-up menu made in Gtk, I would like to have the first
Made a custom obj called Item with some string fields and one float. .h
I made a dll in c# but i need to export the functions. Is
I made an iphone app to capture image from camera and to set that
I made a Web service in which I have a function to count some
I made a UITableViewCell and I have 20 rows in that table in which
I made this Python script: from gi.repository import Gtk, Gdk, GdkX11, Wnck from subprocess
I have just made my first proper little desktop GUI application that basically wraps
I recently made my first app with pygtk using Anjuta. It works well under

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.