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
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
Weblate
gajim
Commits
27ca6e13
Commit
27ca6e13
authored
12 years ago
by
Yann Leboulanger
Browse files
Options
Downloads
Patches
Plain Diff
make output of adhoc command selectable. Fixes #3697
parent
c3574bce
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
data/gui/adhoc_commands_window.ui
+1
-0
1 addition, 0 deletions
data/gui/adhoc_commands_window.ui
src/adhoc_commands.py
+1
-0
1 addition, 0 deletions
src/adhoc_commands.py
src/dataforms_widget.py
+13
-3
13 additions, 3 deletions
src/dataforms_widget.py
with
15 additions
and
3 deletions
data/gui/adhoc_commands_window.ui
+
1
−
0
View file @
27ca6e13
...
...
@@ -172,6 +172,7 @@
<object
class=
"GtkLabel"
id=
"notes_label"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"label"
translatable=
"yes"
>
Please wait while the command is sending...
</property>
<property
name=
"selectable"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
...
...
This diff is collapsed.
Click to expand it.
src/adhoc_commands.py
+
1
−
0
View file @
27ca6e13
...
...
@@ -408,6 +408,7 @@ class CommandWindow:
self
.
data_form_widget
.
set_sensitive
(
True
)
try
:
self
.
data_form_widget
.
selectable
=
True
self
.
data_form_widget
.
data_form
=
self
.
dataform
except
dataforms
.
Error
:
self
.
stage5
(
error
=
_
(
'
Service sent malformed data
'
),
...
...
This diff is collapsed.
Click to expand it.
src/dataforms_widget.py
+
13
−
3
View file @
27ca6e13
...
...
@@ -52,6 +52,7 @@ class DataFormWidget(gtk.Alignment, object):
gtk
.
Alignment
.
__init__
(
self
,
xscale
=
1.0
,
yscale
=
1.0
)
self
.
_data_form
=
None
self
.
selectable
=
False
self
.
xml
=
gtkgui_helpers
.
get_gtk_builder
(
'
data_form_window.ui
'
,
'
data_form_vbox
'
)
...
...
@@ -147,7 +148,8 @@ class DataFormWidget(gtk.Alignment, object):
self
.
clean_data_form
()
self
.
singleform
=
SingleForm
(
self
.
_data_form
)
self
.
singleform
=
SingleForm
(
self
.
_data_form
,
selectable
=
self
.
selectable
)
def
_on_validated
(
widget
):
self
.
emit
(
'
validated
'
)
self
.
singleform
.
connect
(
'
validated
'
,
_on_validated
)
...
...
@@ -314,7 +316,7 @@ class SingleForm(gtk.Table, object):
validated
=
(
gobject
.
SIGNAL_RUN_LAST
|
gobject
.
SIGNAL_ACTION
,
None
,
())
)
def
__init__
(
self
,
dataform
):
def
__init__
(
self
,
dataform
,
selectable
=
False
):
assert
isinstance
(
dataform
,
dataforms
.
SimpleDataForm
)
gtk
.
Table
.
__init__
(
self
)
...
...
@@ -368,6 +370,7 @@ class SingleForm(gtk.Table, object):
commonwidget
=
False
widget
=
gtk
.
Label
(
field
.
value
)
widget
.
set_property
(
'
selectable
'
,
selectable
)
widget
.
set_line_wrap
(
True
)
self
.
attach
(
widget
,
leftattach
,
rightattach
,
linecounter
,
linecounter
+
1
,
xoptions
=
gtk
.
FILL
,
yoptions
=
gtk
.
FILL
)
...
...
@@ -506,7 +509,13 @@ class SingleForm(gtk.Table, object):
textwidget
.
get_buffer
().
connect
(
'
changed
'
,
self
.
on_text_multi_textbuffer_changed
,
field
)
textwidget
.
get_buffer
().
set_text
(
field
.
value
)
textwidget
.
set_sensitive
(
readwrite
)
if
readwrite
:
textwidget
.
set_sensitive
(
True
)
else
:
if
selectable
:
textwidget
.
set_editable
(
True
)
else
:
textwidget
.
set_sensitive
(
False
)
widget
=
gtk
.
ScrolledWindow
()
widget
.
add
(
textwidget
)
...
...
@@ -535,6 +544,7 @@ class SingleForm(gtk.Table, object):
else
:
commonwidget
=
False
widget
=
gtk
.
Label
(
field
.
value
)
widget
.
set_property
(
'
selectable
'
,
selectable
)
widget
.
set_sensitive
(
True
)
widget
.
set_alignment
(
0.0
,
0.5
)
widget
=
decorate_with_tooltip
(
widget
,
field
)
...
...
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