ApplicationWindow: update paste sensitivity according to clipboard
I think it is a better implementation than in gedit. We look at all the target atoms supported by GtkTextBuffer. gedit connects to the GtkClipboard::owner-change signal when the GtkWindow is realized. But I don't think this is still necessary with GTK+ 3. The doc of gtk_widget_get_clipboard() says: “@widget must have a GdkDisplay associated with it, so must be attached to a toplevel window.”, but here @widget *is* a toplevel window, so I think the GdkDisplay is already associated. I've tested and in tepl_application_window_constructed(), the GtkApplicationWindow is not realized but the GtkClipboard isn't NULL. So I think everything is fine.
parent
bea10e5d
Please register or sign in to comment