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
257b1b7e
Commit
257b1b7e
authored
18 years ago
by
Liorithiel
Browse files
Options
Downloads
Patches
Plain Diff
Data forms: labels are aligned with top of widgets, default instructions gone,
borders removed.
parent
a06937d9
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/glade/adhoc_commands_window.glade
+1
-0
1 addition, 0 deletions
data/glade/adhoc_commands_window.glade
data/glade/data_form_window.glade
+2
-2
2 additions, 2 deletions
data/glade/data_form_window.glade
src/dataforms_widget.py
+12
-14
12 additions, 14 deletions
src/dataforms_widget.py
with
15 additions
and
16 deletions
data/glade/adhoc_commands_window.glade
+
1
−
0
View file @
257b1b7e
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
<property
name=
"type_hint"
>
GDK_WINDOW_TYPE_HINT_NORMAL
</property>
<property
name=
"type_hint"
>
GDK_WINDOW_TYPE_HINT_NORMAL
</property>
<property
name=
"gravity"
>
GDK_GRAVITY_NORTH_WEST
</property>
<property
name=
"gravity"
>
GDK_GRAVITY_NORTH_WEST
</property>
<property
name=
"focus_on_map"
>
True
</property>
<property
name=
"focus_on_map"
>
True
</property>
<property
name=
"urgency_hint"
>
False
</property>
<signal
name=
"destroy"
handler=
"on_adhoc_commands_window_destroy"
last_modification_time=
"Thu, 22 Jun 2006 22:50:45 GMT"
/>
<signal
name=
"destroy"
handler=
"on_adhoc_commands_window_destroy"
last_modification_time=
"Thu, 22 Jun 2006 22:50:45 GMT"
/>
<child>
<child>
...
...
This diff is collapsed.
Click to expand it.
data/glade/data_form_window.glade
+
2
−
2
View file @
257b1b7e
...
@@ -466,7 +466,7 @@
...
@@ -466,7 +466,7 @@
<widget
class=
"GtkNotebook"
id=
"data_form_types_notebook"
>
<widget
class=
"GtkNotebook"
id=
"data_form_types_notebook"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"show_tabs"
>
False
</property>
<property
name=
"show_tabs"
>
False
</property>
<property
name=
"show_border"
>
Tru
e
</property>
<property
name=
"show_border"
>
Fals
e
</property>
<property
name=
"tab_pos"
>
GTK_POS_TOP
</property>
<property
name=
"tab_pos"
>
GTK_POS_TOP
</property>
<property
name=
"scrollable"
>
False
</property>
<property
name=
"scrollable"
>
False
</property>
<property
name=
"enable_popup"
>
False
</property>
<property
name=
"enable_popup"
>
False
</property>
...
@@ -483,7 +483,7 @@
...
@@ -483,7 +483,7 @@
<child>
<child>
<widget
class=
"GtkViewport"
id=
"single_form_viewport"
>
<widget
class=
"GtkViewport"
id=
"single_form_viewport"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"shadow_type"
>
GTK_SHADOW_
I
N
</property>
<property
name=
"shadow_type"
>
GTK_SHADOW_N
ONE
</property>
<child>
<child>
<placeholder/>
<placeholder/>
...
...
This diff is collapsed.
Click to expand it.
src/dataforms_widget.py
+
12
−
14
View file @
257b1b7e
...
@@ -67,19 +67,10 @@ class DataFormWidget(gtk.Alignment, object):
...
@@ -67,19 +67,10 @@ class DataFormWidget(gtk.Alignment, object):
# create appropriate description for instructions field if there isn't any
# create appropriate description for instructions field if there isn't any
if
dataform
.
instructions
==
''
:
if
dataform
.
instructions
==
''
:
if
dataform
.
type
==
'
result
'
:
self
.
instructions_label
.
set_no_show_all
(
True
)
# form is single
self
.
instructions_label
.
hide
()
instructions
=
_
(
'
This is result of query.
'
)
else
:
# form is writable (TODO: move that to build_*_data_form()?)
if
isinstance
(
dataform
,
dataforms
.
SimpleDataForm
):
instructions
=
_
(
'
Fill in the form.
'
)
else
:
instructions
=
_
(
'
Edit items on the list
'
)
else
:
else
:
instructions
=
dataform
.
instructions
self
.
instructions_label
.
set_text
(
instructions
)
self
.
instructions_label
.
set_text
(
instructions
)
def
get_data_form
(
self
):
def
get_data_form
(
self
):
"""
Data form displayed in the widget or None if no form.
"""
"""
Data form displayed in the widget or None if no form.
"""
...
@@ -267,7 +258,7 @@ class SingleForm(gtk.Table, object):
...
@@ -267,7 +258,7 @@ class SingleForm(gtk.Table, object):
assert
isinstance
(
dataform
,
dataforms
.
SimpleDataForm
)
assert
isinstance
(
dataform
,
dataforms
.
SimpleDataForm
)
gtk
.
Table
.
__init__
(
self
)
gtk
.
Table
.
__init__
(
self
)
self
.
set_col_spacings
(
6
)
self
.
set_col_spacings
(
12
)
self
.
set_row_spacings
(
6
)
self
.
set_row_spacings
(
6
)
self
.
tooltips
=
gtk
.
Tooltips
()
self
.
tooltips
=
gtk
.
Tooltips
()
...
@@ -297,10 +288,12 @@ class SingleForm(gtk.Table, object):
...
@@ -297,10 +288,12 @@ class SingleForm(gtk.Table, object):
if
field
.
type
==
'
hidden
'
:
continue
if
field
.
type
==
'
hidden
'
:
continue
commonlabel
=
True
commonlabel
=
True
commonlabelcenter
=
False
commonwidget
=
True
commonwidget
=
True
widget
=
None
widget
=
None
if
field
.
type
==
'
boolean
'
:
if
field
.
type
==
'
boolean
'
:
commonlabelcenter
=
True
widget
=
gtk
.
CheckButton
()
widget
=
gtk
.
CheckButton
()
widget
.
connect
(
'
toggled
'
,
self
.
on_boolean_checkbutton_toggled
,
field
)
widget
.
connect
(
'
toggled
'
,
self
.
on_boolean_checkbutton_toggled
,
field
)
widget
.
set_active
(
field
.
value
)
widget
.
set_active
(
field
.
value
)
...
@@ -403,6 +396,7 @@ class SingleForm(gtk.Table, object):
...
@@ -403,6 +396,7 @@ class SingleForm(gtk.Table, object):
del
xml
del
xml
elif
field
.
type
==
'
text-private
'
:
elif
field
.
type
==
'
text-private
'
:
commonlabelcenter
=
True
widget
=
gtk
.
Entry
()
widget
=
gtk
.
Entry
()
widget
.
connect
(
'
changed
'
,
self
.
on_text_single_entry_changed
,
field
)
widget
.
connect
(
'
changed
'
,
self
.
on_text_single_entry_changed
,
field
)
widget
.
set_visibility
(
False
)
widget
.
set_visibility
(
False
)
...
@@ -428,6 +422,7 @@ class SingleForm(gtk.Table, object):
...
@@ -428,6 +422,7 @@ class SingleForm(gtk.Table, object):
else
:
# field.type == 'text-single' or field.type is nonstandard:
else
:
# field.type == 'text-single' or field.type is nonstandard:
# JEP says that if we don't understand some type, we
# JEP says that if we don't understand some type, we
# should handle it as text-single
# should handle it as text-single
commonlabelcenter
=
True
if
readwrite
:
if
readwrite
:
widget
=
gtk
.
Entry
()
widget
=
gtk
.
Entry
()
widget
.
connect
(
'
changed
'
,
self
.
on_text_single_entry_changed
,
field
)
widget
.
connect
(
'
changed
'
,
self
.
on_text_single_entry_changed
,
field
)
...
@@ -446,7 +441,10 @@ class SingleForm(gtk.Table, object):
...
@@ -446,7 +441,10 @@ class SingleForm(gtk.Table, object):
if
commonlabel
and
field
.
label
is
not
None
:
if
commonlabel
and
field
.
label
is
not
None
:
label
=
gtk
.
Label
(
field
.
label
)
label
=
gtk
.
Label
(
field
.
label
)
label
.
set_alignment
(
0.0
,
0.5
)
if
commonlabelcenter
:
label
.
set_alignment
(
0.0
,
0.5
)
else
:
label
.
set_alignment
(
0.0
,
0.0
)
label
=
decorate_with_tooltip
(
label
,
field
)
label
=
decorate_with_tooltip
(
label
,
field
)
self
.
attach
(
label
,
0
,
1
,
linecounter
,
linecounter
+
1
,
self
.
attach
(
label
,
0
,
1
,
linecounter
,
linecounter
+
1
,
xoptions
=
gtk
.
FILL
,
yoptions
=
gtk
.
FILL
)
xoptions
=
gtk
.
FILL
,
yoptions
=
gtk
.
FILL
)
...
...
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