Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gajim-plugins
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Malte L
gajim-plugins
Commits
0d99f3a2
Commit
0d99f3a2
authored
Apr 15, 2019
by
Daniel Brötzmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[pgp] Update dialog GUI
parent
466a4e91
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
9 deletions
+24
-9
pgp/gtk/choose_key.ui
pgp/gtk/choose_key.ui
+4
-2
pgp/gtk/config.py
pgp/gtk/config.py
+6
-1
pgp/gtk/config.ui
pgp/gtk/config.ui
+4
-2
pgp/gtk/key.py
pgp/gtk/key.py
+10
-4
No files found.
pgp/gtk/choose_key.ui
View file @
0d99f3a2
...
@@ -11,9 +11,11 @@
...
@@ -11,9 +11,11 @@
</columns>
</columns>
</object>
</object>
<object
class=
"GtkBox"
id=
"box"
>
<object
class=
"GtkBox"
id=
"box"
>
<property
name=
"width_request"
>
500
</property>
<property
name=
"height_request"
>
300
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"border_width"
>
6
</property>
<property
name=
"border_width"
>
18
</property>
<property
name=
"orientation"
>
vertical
</property>
<property
name=
"orientation"
>
vertical
</property>
<property
name=
"spacing"
>
6
</property>
<property
name=
"spacing"
>
6
</property>
<child>
<child>
...
@@ -62,7 +64,7 @@
...
@@ -62,7 +64,7 @@
<packing>
<packing>
<property
name=
"expand"
>
True
</property>
<property
name=
"expand"
>
True
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
<property
name=
"position"
>
0
</property>
</packing>
</packing>
</child>
</child>
</object>
</object>
...
...
pgp/gtk/config.py
View file @
0d99f3a2
...
@@ -18,6 +18,7 @@ from pathlib import Path
...
@@ -18,6 +18,7 @@ from pathlib import Path
from
gi.repository
import
Gtk
from
gi.repository
import
Gtk
from
gi.repository
import
Gdk
from
gi.repository
import
Gdk
from
gi.repository
import
GLib
from
gajim.common
import
app
from
gajim.common
import
app
...
@@ -64,6 +65,9 @@ class Page(Gtk.Box):
...
@@ -64,6 +65,9 @@ class Page(Gtk.Box):
self
.
_plugin
=
plugin
self
.
_plugin
=
plugin
self
.
_label
=
Gtk
.
Label
()
self
.
_label
=
Gtk
.
Label
()
self
.
_button
=
Gtk
.
Button
(
label
=
_
(
'Assign Key'
))
self
.
_button
=
Gtk
.
Button
(
label
=
_
(
'Assign Key'
))
self
.
_button
.
get_style_context
().
add_class
(
'suggested-action'
)
self
.
_button
.
set_halign
(
Gtk
.
Align
.
CENTER
)
self
.
_button
.
set_margin_top
(
18
)
self
.
_button
.
connect
(
'clicked'
,
self
.
_on_assign
)
self
.
_button
.
connect
(
'clicked'
,
self
.
_on_assign
)
self
.
_load_key
()
self
.
_load_key
()
...
@@ -101,4 +105,5 @@ class Page(Gtk.Box):
...
@@ -101,4 +105,5 @@ class Page(Gtk.Box):
self
.
_label
.
set_text
(
_
(
'No key assigned'
))
self
.
_label
.
set_text
(
_
(
'No key assigned'
))
else
:
else
:
key_id
,
key_user
=
key_data
key_id
,
key_user
=
key_data
self
.
_label
.
set_text
(
'%s %s'
%
(
key_id
,
key_user
))
self
.
_label
.
set_markup
(
'<b><tt>%s</tt> %s</b>'
%
\
(
key_id
,
GLib
.
markup_escape_text
(
key_user
)))
pgp/gtk/config.ui
View file @
0d99f3a2
...
@@ -3,8 +3,6 @@
...
@@ -3,8 +3,6 @@
<interface>
<interface>
<requires
lib=
"gtk+"
version=
"3.20"
/>
<requires
lib=
"gtk+"
version=
"3.20"
/>
<object
class=
"GtkBox"
id=
"config_box"
>
<object
class=
"GtkBox"
id=
"config_box"
>
<property
name=
"width_request"
>
500
</property>
<property
name=
"height_request"
>
400
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"spacing"
>
12
</property>
<property
name=
"spacing"
>
12
</property>
...
@@ -22,8 +20,12 @@
...
@@ -22,8 +20,12 @@
</child>
</child>
<child>
<child>
<object
class=
"GtkStack"
id=
"stack"
>
<object
class=
"GtkStack"
id=
"stack"
>
<property
name=
"width_request"
>
400
</property>
<property
name=
"height_request"
>
350
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"border_width"
>
18
</property>
<property
name=
"transition_type"
>
crossfade
</property>
<property
name=
"transition_type"
>
crossfade
</property>
<child>
<child>
<placeholder/>
<placeholder/>
...
...
pgp/gtk/key.py
View file @
0d99f3a2
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
from
pathlib
import
Path
from
pathlib
import
Path
from
gi.repository
import
Gtk
from
gi.repository
import
Gtk
from
gi.repository
import
GLib
from
gajim.common
import
app
from
gajim.common
import
app
from
gajim.plugins.plugins_i18n
import
_
from
gajim.plugins.plugins_i18n
import
_
...
@@ -30,7 +31,7 @@ class KeyDialog(Gtk.Dialog):
...
@@ -30,7 +31,7 @@ class KeyDialog(Gtk.Dialog):
self
.
set_transient_for
(
transient
)
self
.
set_transient_for
(
transient
)
self
.
set_resizable
(
True
)
self
.
set_resizable
(
True
)
self
.
set_default_size
(
500
,
300
)
self
.
set_default_size
(
450
,
-
1
)
self
.
_plugin
=
plugin
self
.
_plugin
=
plugin
self
.
_jid
=
jid
self
.
_jid
=
jid
...
@@ -38,10 +39,14 @@ class KeyDialog(Gtk.Dialog):
...
@@ -38,10 +39,14 @@ class KeyDialog(Gtk.Dialog):
self
.
_label
=
Gtk
.
Label
()
self
.
_label
=
Gtk
.
Label
()
self
.
_assign_button
=
Gtk
.
Button
(
label
=
'assign'
)
self
.
_assign_button
=
Gtk
.
Button
(
label
=
_
(
'Assign Key'
))
self
.
_assign_button
.
get_style_context
().
add_class
(
'suggested-action'
)
self
.
_assign_button
.
set_halign
(
Gtk
.
Align
.
CENTER
)
self
.
_assign_button
.
set_margin_top
(
18
)
self
.
_assign_button
.
connect
(
'clicked'
,
self
.
_choose_key
)
self
.
_assign_button
.
connect
(
'clicked'
,
self
.
_choose_key
)
box
=
Gtk
.
Box
(
orientation
=
Gtk
.
Orientation
.
VERTICAL
)
box
=
Gtk
.
Box
(
orientation
=
Gtk
.
Orientation
.
VERTICAL
)
box
.
set_border_width
(
18
)
box
.
add
(
self
.
_label
)
box
.
add
(
self
.
_label
)
box
.
add
(
self
.
_assign_button
)
box
.
add
(
self
.
_assign_button
)
...
@@ -82,7 +87,8 @@ class KeyDialog(Gtk.Dialog):
...
@@ -82,7 +87,8 @@ class KeyDialog(Gtk.Dialog):
self
.
_label
.
set_text
(
_
(
'No key assigned'
))
self
.
_label
.
set_text
(
_
(
'No key assigned'
))
else
:
else
:
key_id
,
key_user
=
key_data
key_id
,
key_user
=
key_data
self
.
_label
.
set_text
(
'%s %s'
%
(
key_id
,
key_user
))
self
.
_label
.
set_markup
(
'<b><tt>%s</tt> %s</b>'
%
\
(
key_id
,
GLib
.
markup_escape_text
(
key_user
)))
class
ChooseGPGKeyDialog
(
Gtk
.
Dialog
):
class
ChooseGPGKeyDialog
(
Gtk
.
Dialog
):
...
@@ -97,8 +103,8 @@ class ChooseGPGKeyDialog(Gtk.Dialog):
...
@@ -97,8 +103,8 @@ class ChooseGPGKeyDialog(Gtk.Dialog):
self
.
set_resizable
(
True
)
self
.
set_resizable
(
True
)
self
.
set_default_size
(
500
,
300
)
self
.
set_default_size
(
500
,
300
)
self
.
add_button
(
_
(
'OK'
),
Gtk
.
ResponseType
.
OK
)
self
.
add_button
(
_
(
'Cancel'
),
Gtk
.
ResponseType
.
CANCEL
)
self
.
add_button
(
_
(
'Cancel'
),
Gtk
.
ResponseType
.
CANCEL
)
self
.
add_button
(
_
(
'OK'
),
Gtk
.
ResponseType
.
OK
)
self
.
_selected_key
=
None
self
.
_selected_key
=
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment