Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mesonium
gajim
Commits
53d6c8c2
Commit
53d6c8c2
authored
4 years ago
by
Daniel Brötzmann
Browse files
Options
Downloads
Patches
Plain Diff
MessageInputTextView: Fix GTK warning when closing chat control
Fixes #10146
parent
1cb58072
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gajim/gtk/message_input.py
+13
-0
13 additions, 0 deletions
gajim/gtk/message_input.py
with
13 additions
and
0 deletions
gajim/gtk/message_input.py
+
13
−
0
View file @
53d6c8c2
...
...
@@ -18,6 +18,7 @@
# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
from
gi.repository
import
Gtk
from
gi.repository
import
Gdk
from
gi.repository
import
GLib
from
gi.repository
import
GObject
from
gi.repository
import
Pango
...
...
@@ -108,6 +109,18 @@ def __init__(self):
self
.
connect
(
'
focus-in-event
'
,
self
.
_on_grab_focus
)
self
.
connect
(
'
grab-focus
'
,
self
.
_on_grab_focus
)
self
.
connect
(
'
focus-out-event
'
,
self
.
_on_focus_out
)
self
.
connect
(
'
destroy
'
,
self
.
_on_destroy
)
def
_on_destroy
(
self
,
*
args
):
# We restore the TextView’s drag destination to avoid a GTK warning
# when closing the control. ChatControlBase.shutdown() calls destroy()
# on the control’s main box, causing GTK to recursively destroy the
# child widgets. GTK then tries to set a target list on the TextView,
# resulting in a warning because the Widget has no drag destination.
self
.
drag_dest_set
(
Gtk
.
DestDefaults
.
ALL
,
None
,
Gdk
.
DragAction
.
DEFAULT
)
def
_on_buffer_changed
(
self
,
*
args
):
text
=
self
.
get_text
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment