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
56
Issues
56
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gajim
gajim-plugins
Commits
3f284e85
Commit
3f284e85
authored
Oct 06, 2016
by
Philipp Hörist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Harmonize layout of Installed/Available tab
parent
ec72d03e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
58 deletions
+91
-58
plugin_installer/config_dialog.ui
plugin_installer/config_dialog.ui
+72
-43
plugin_installer/plugin_installer.py
plugin_installer/plugin_installer.py
+19
-15
No files found.
plugin_installer/config_dialog.ui
View file @
3f284e85
...
...
@@ -6,8 +6,7 @@
<property
name=
"can_focus"
>
False
</property>
<child>
<object
class=
"GtkHPaned"
id=
"hpaned2"
>
<property
name=
"width_request"
>
1024
</property>
<property
name=
"height_request"
>
480
</property>
<property
name=
"width_request"
>
800
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"position"
>
340
</property>
...
...
@@ -57,19 +56,22 @@
</packing>
</child>
<child>
<object
class=
"Gtk
VBox"
id=
"vbox4
"
>
<object
class=
"Gtk
Box"
id=
"vbox2
"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"border_width"
>
5
</property>
<property
name=
"border_width"
>
6
</property>
<property
name=
"orientation"
>
vertical
</property>
<property
name=
"spacing"
>
6
</property>
<child>
<object
class=
"GtkLabel"
id=
"plugin_name_label
1
"
>
<object
class=
"GtkLabel"
id=
"plugin_name_label"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
>
<
empty
&
gt;
</property>
<property
name=
"label"
translatable=
"yes"
>
&
lt;empty
&
gt;
</property>
<property
name=
"selectable"
>
True
</property>
<property
name=
"ellipsize"
>
end
</property>
<property
name=
"xalign"
>
0
</property>
<attributes>
<attribute
name=
"weight"
value=
"bold"
/>
</attributes>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
...
...
@@ -78,15 +80,54 @@
</packing>
</child>
<child>
<object
class=
"GtkHBox"
id=
"hbox8"
>
<object
class=
"GtkBox"
id=
"hbox1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"spacing"
>
6
</property>
<child>
<object
class=
"GtkLabel"
id=
"label5"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Version:
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"plugin_version_label"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
>
<
empty
>
</property>
<property
name=
"selectable"
>
True
</property>
<property
name=
"xalign"
>
0
</property>
</object>
<packing>
<property
name=
"expand"
>
True
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkBox"
id=
"hbox3"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"spacing"
>
6
</property>
<child>
<object
class=
"GtkLabel"
id=
"label
8
"
>
<object
class=
"GtkLabel"
id=
"label
4
"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Authors:
</property>
<property
name=
"yalign"
>
0
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
...
...
@@ -95,14 +136,15 @@
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"plugin_authors_label
1
"
>
<object
class=
"GtkLabel"
id=
"plugin_authors_label"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"xpad"
>
6
</property>
<property
name=
"label"
>
<
empty
>
</property>
<property
name=
"wrap_mode"
>
word-char
</property>
<property
name=
"selectable"
>
True
</property>
<property
name=
"ellipsize"
>
end
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"yalign"
>
0
</property>
</object>
<packing>
<property
name=
"expand"
>
True
</property>
...
...
@@ -114,15 +156,15 @@
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
<property
name=
"position"
>
2
</property>
</packing>
</child>
<child>
<object
class=
"Gtk
HBox"
id=
"hbox9
"
>
<object
class=
"Gtk
Box"
id=
"hbox4
"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<child>
<object
class=
"GtkLabel"
id=
"label
9
"
>
<object
class=
"GtkLabel"
id=
"label
6
"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Homepage:
</property>
...
...
@@ -134,9 +176,7 @@
</packing>
</child>
<child>
<object
class=
"GtkLinkButton"
id=
"plugin_homepage_linkbutton1"
>
<property
name=
"label"
>
button
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<object
class=
"GtkLinkButton"
id=
"plugin_homepage_linkbutton"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
...
...
@@ -154,19 +194,20 @@
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
2
</property>
<property
name=
"position"
>
3
</property>
</packing>
</child>
<child>
<object
class=
"Gtk
VBox"
id=
"vbox5
"
>
<object
class=
"Gtk
Box"
id=
"vbox3
"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"orientation"
>
vertical
</property>
<child>
<object
class=
"Gtk
HBox"
id=
"hbox10
"
>
<object
class=
"Gtk
Box"
id=
"hbox5
"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<child>
<object
class=
"GtkLabel"
id=
"label
10
"
>
<object
class=
"GtkLabel"
id=
"label
7
"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Description:
</property>
...
...
@@ -178,18 +219,7 @@
</packing>
</child>
<child>
<object
class=
"GtkAlignment"
id=
"alignment4"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property
name=
"expand"
>
True
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
</packing>
<placeholder/>
</child>
</object>
<packing>
...
...
@@ -202,6 +232,7 @@
<object
class=
"GtkScrolledWindow"
id=
"scrolledwindow1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"shadow_type"
>
in
</property>
<child>
<placeholder/>
</child>
...
...
@@ -216,7 +247,7 @@
<packing>
<property
name=
"expand"
>
True
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
3
</property>
<property
name=
"position"
>
4
</property>
</packing>
</child>
<child>
...
...
@@ -236,11 +267,10 @@
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"sensitive"
>
False
</property>
<property
name=
"can_focus"
>
Fals
e
</property>
<property
name=
"can_focus"
>
Tru
e
</property>
<property
name=
"receives_default"
>
True
</property>
<signal
name=
"clicked"
handler=
"on_inslall_upgrade_clicked"
swapped=
"no"
/>
<child>
<object
class=
"GtkHBox"
id=
"hbox
1
"
>
<object
class=
"GtkHBox"
id=
"hbox
6
"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<child>
...
...
@@ -289,13 +319,13 @@
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
False
</property>
<property
name=
"position"
>
4
</property>
<property
name=
"position"
>
5
</property>
</packing>
</child>
</object>
<packing>
<property
name=
"resize"
>
True
</property>
<property
name=
"shrink"
>
Tru
e
</property>
<property
name=
"shrink"
>
Fals
e
</property>
</packing>
</child>
</object>
...
...
@@ -307,15 +337,17 @@
<object
class=
"GtkVBox"
id=
"hbox111"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"border_width"
>
6
</property>
<child>
<object
class=
"GtkHBox"
id=
"hbox2"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"spacing"
>
6
</property>
<child>
<object
class=
"GtkLabel"
id=
"label2"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
F
tp s
erver:
</property>
<property
name=
"label"
translatable=
"yes"
>
F
TP S
erver:
</property>
<property
name=
"xalign"
>
0
</property>
</object>
<packing>
...
...
@@ -379,9 +411,6 @@
<property
name=
"position"
>
2
</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
...
...
plugin_installer/plugin_installer.py
View file @
3f284e85
...
...
@@ -203,10 +203,10 @@ class PluginInstaller(GajimPlugin):
self
.
page_num
=
self
.
notebook
.
append_page
(
self
.
hpaned
,
Gtk
.
Label
.
new
(
_
(
'Available'
)))
widgets_to_extract
=
(
'plugin_name_label1'
,
'available_treeview'
,
'progressbar'
,
'inslall_upgrade_button
'
,
'plugin_authors_label1'
,
'plugin_authors_label1
'
,
'plugin_homepage_linkbutton1
'
)
widgets_to_extract
=
(
'plugin_name_label'
,
'available_treeview'
,
'progressbar
'
,
'inslall_upgrade_button'
,
'plugin_authors_label
'
,
'plugin_homepage_linkbutton'
,
'plugin_version_label
'
)
for
widget_name
in
widgets_to_extract
:
setattr
(
self
,
widget_name
,
self
.
xml
.
get_object
(
widget_name
))
...
...
@@ -266,6 +266,7 @@ class PluginInstaller(GajimPlugin):
self
.
_clear_available_plugin_info
()
self
.
plugin_description_textview
=
HtmlTextView
()
self
.
plugin_description_textview
.
set_wrap_mode
(
Gtk
.
WrapMode
.
WORD
)
sw
=
self
.
xml
.
get_object
(
'scrolledwindow1'
)
sw
.
add
(
self
.
plugin_description_textview
)
...
...
@@ -375,19 +376,21 @@ class PluginInstaller(GajimPlugin):
model
,
iter
=
treeview_selection
.
get_selected
()
self
.
xml
.
get_object
(
'scrolledwindow1'
).
get_children
()[
0
].
destroy
()
self
.
plugin_description_textview
=
HtmlTextView
()
self
.
plugin_description_textview
.
set_wrap_mode
(
Gtk
.
WrapMode
.
WORD
)
sw
=
self
.
xml
.
get_object
(
'scrolledwindow1'
)
sw
.
add
(
self
.
plugin_description_textview
)
sw
.
show_all
()
if
iter
:
self
.
plugin_name_label1
.
set_text
(
model
.
get_value
(
iter
,
C_NAME
))
self
.
plugin_authors_label1
.
set_text
(
model
.
get_value
(
iter
,
C_AUTHORS
))
self
.
plugin_homepage_linkbutton1
.
set_uri
(
model
.
get_value
(
iter
,
self
.
plugin_name_label
.
set_text
(
model
.
get_value
(
iter
,
C_NAME
))
self
.
plugin_version_label
.
set_text
(
model
.
get_value
(
iter
,
C_VERSION
))
self
.
plugin_authors_label
.
set_text
(
model
.
get_value
(
iter
,
C_AUTHORS
))
self
.
plugin_homepage_linkbutton
.
set_uri
(
model
.
get_value
(
iter
,
C_HOMEPAGE
))
self
.
plugin_homepage_linkbutton
1
.
set_label
(
model
.
get_value
(
iter
,
self
.
plugin_homepage_linkbutton
.
set_label
(
model
.
get_value
(
iter
,
C_HOMEPAGE
))
label
=
self
.
plugin_homepage_linkbutton
1
.
get_children
()[
0
]
label
=
self
.
plugin_homepage_linkbutton
.
get_children
()[
0
]
label
.
set_ellipsize
(
Pango
.
EllipsizeMode
.
END
)
self
.
plugin_homepage_linkbutton
1
.
set_property
(
'sensitive'
,
True
)
self
.
plugin_homepage_linkbutton
.
set_property
(
'sensitive'
,
True
)
desc
=
_
(
model
.
get_value
(
iter
,
C_DESCRIPTION
))
if
not
desc
.
startswith
(
'<body '
):
desc
=
'<body xmlns=
\'
http://www.w3.org/1999/xhtml
\'
>'
+
\
...
...
@@ -400,11 +403,12 @@ class PluginInstaller(GajimPlugin):
self
.
_clear_available_plugin_info
()
def
_clear_available_plugin_info
(
self
):
self
.
plugin_name_label1
.
set_text
(
''
)
self
.
plugin_authors_label1
.
set_text
(
''
)
self
.
plugin_homepage_linkbutton1
.
set_uri
(
''
)
self
.
plugin_homepage_linkbutton1
.
set_label
(
''
)
self
.
plugin_homepage_linkbutton1
.
set_property
(
'sensitive'
,
False
)
self
.
plugin_name_label
.
set_text
(
''
)
self
.
plugin_version_label
.
set_text
(
''
)
self
.
plugin_authors_label
.
set_text
(
''
)
self
.
plugin_homepage_linkbutton
.
set_uri
(
''
)
self
.
plugin_homepage_linkbutton
.
set_label
(
''
)
self
.
plugin_homepage_linkbutton
.
set_property
(
'sensitive'
,
False
)
def
scan_dir_for_plugin
(
self
,
path
):
plugins_found
=
[]
...
...
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