CristianHenzel / ClipIt

ClipIt clipboard manager for GTK+
https://github.com/CristianHenzel/ClipIt
GNU General Public License v3.0
651 stars 83 forks source link

Search history action shows and hides the dialog #9

Closed pluton8 closed 7 years ago

pluton8 commented 12 years ago

shantzu, please consider my tiny patch. I think it's more convenient to be able to open and close the "Manage History" dialog with the same hotkey.

CristianHenzel commented 12 years ago

You have also based this on the master branch, but in the 1.4.2 branch, I have made some changes to check if there is any other window open and raise that one, if it's the case. If you want this implemented, you should rewrite it in the 1.4.2 branch, and check specifically if the preferences dialog is open, before closing it.

pluton8 commented 12 years ago

I have a trouble checking if the Manage History dialog is the currently active window (not hidden under other windows) in order to close it. I've tried using gtk_window_is_active(), gtk_window_has_toplevel_focus(), gtk_widget_is_focus(), gtk_widget_has_focus(), even gtk_widget_get_visible() methods. None of them worked out. shantzu, could you please give me a hint how to perform such a test?

CristianHenzel commented 12 years ago

Hello,

and sorry for the very late answer. Unfortunately I don't know of an easy way to do this.