improvements in infos and files tabs
This commit is contained in:
parent
a350d11035
commit
447f39e966
@ -384,6 +384,7 @@
|
|||||||
<object class="GtkTextView" id="progress_textview">
|
<object class="GtkTextView" id="progress_textview">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
|
<property name="editable">False</property>
|
||||||
<property name="wrap_mode">word</property>
|
<property name="wrap_mode">word</property>
|
||||||
<property name="cursor_visible">False</property>
|
<property name="cursor_visible">False</property>
|
||||||
<signal name="size-allocate" handler="on_progress_textview_size_allocate" swapped="no"/>
|
<signal name="size-allocate" handler="on_progress_textview_size_allocate" swapped="no"/>
|
||||||
|
221
gui/manager.ui
221
gui/manager.ui
@ -35,6 +35,96 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="GtkFileChooserDialog" id="PackagesChooserDialog">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="border_width">5</property>
|
||||||
|
<property name="title" translatable="yes">Install local packages</property>
|
||||||
|
<property name="role">GtkFileChooserDialog</property>
|
||||||
|
<property name="modal">True</property>
|
||||||
|
<property name="window_position">center-on-parent</property>
|
||||||
|
<property name="type_hint">dialog</property>
|
||||||
|
<property name="create_folders">False</property>
|
||||||
|
<property name="filter">package_filter</property>
|
||||||
|
<property name="select_multiple">True</property>
|
||||||
|
<signal name="file-activated" handler="on_PackagesChooserDialog_file_activated" swapped="no"/>
|
||||||
|
<child internal-child="vbox">
|
||||||
|
<object class="GtkBox" id="filechooserdialog-vbox1">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="spacing">2</property>
|
||||||
|
<child internal-child="action_area">
|
||||||
|
<object class="GtkButtonBox" id="filechooserdialog-action_area1">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="layout_style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="package_cancel_button">
|
||||||
|
<property name="label">gtk-cancel</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="use_stock">True</property>
|
||||||
|
<signal name="clicked" handler="on_package_cancel_button_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="package_open_button">
|
||||||
|
<property name="label">gtk-open</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="use_stock">True</property>
|
||||||
|
<signal name="clicked" handler="on_package_open_button_clicked" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</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="pack_type">end</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<action-widgets>
|
||||||
|
<action-widget response="0">package_cancel_button</action-widget>
|
||||||
|
<action-widget response="0">package_open_button</action-widget>
|
||||||
|
</action-widgets>
|
||||||
|
</object>
|
||||||
|
<object class="GtkImage" id="cancel_icon">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="stock">gtk-cancel</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkListStore" id="deps_list">
|
||||||
|
<columns>
|
||||||
|
<!-- column-name dep_type -->
|
||||||
|
<column type="gchararray"/>
|
||||||
|
<!-- column-name deps -->
|
||||||
|
<column type="gchararray"/>
|
||||||
|
</columns>
|
||||||
|
</object>
|
||||||
|
<object class="GtkListStore" id="details_list">
|
||||||
|
<columns>
|
||||||
|
<!-- column-name info_type -->
|
||||||
|
<column type="gchararray"/>
|
||||||
|
<!-- column-name _info -->
|
||||||
|
<column type="gchararray"/>
|
||||||
|
</columns>
|
||||||
|
</object>
|
||||||
<object class="GtkWindow" id="ManagerWindow">
|
<object class="GtkWindow" id="ManagerWindow">
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="border_width">2</property>
|
<property name="border_width">2</property>
|
||||||
@ -454,6 +544,7 @@
|
|||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
<property name="xpad">10</property>
|
<property name="xpad">10</property>
|
||||||
|
<property name="selectable">True</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
@ -467,6 +558,7 @@
|
|||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
<property name="xpad">10</property>
|
<property name="xpad">10</property>
|
||||||
|
<property name="selectable">True</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
@ -480,6 +572,7 @@
|
|||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
<property name="xpad">10</property>
|
<property name="xpad">10</property>
|
||||||
|
<property name="selectable">True</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
@ -493,6 +586,7 @@
|
|||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
<property name="xpad">10</property>
|
<property name="xpad">10</property>
|
||||||
|
<property name="selectable">True</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
@ -534,7 +628,9 @@
|
|||||||
<property name="enable_search">False</property>
|
<property name="enable_search">False</property>
|
||||||
<property name="show_expanders">False</property>
|
<property name="show_expanders">False</property>
|
||||||
<child internal-child="selection">
|
<child internal-child="selection">
|
||||||
<object class="GtkTreeSelection" id="deps_treeview_selection"/>
|
<object class="GtkTreeSelection" id="deps_treeview_selection">
|
||||||
|
<property name="mode">none</property>
|
||||||
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkTreeViewColumn" id="dep_type">
|
<object class="GtkTreeViewColumn" id="dep_type">
|
||||||
@ -593,10 +689,11 @@
|
|||||||
<property name="headers_visible">False</property>
|
<property name="headers_visible">False</property>
|
||||||
<property name="headers_clickable">False</property>
|
<property name="headers_clickable">False</property>
|
||||||
<property name="enable_search">False</property>
|
<property name="enable_search">False</property>
|
||||||
<property name="search_column">0</property>
|
|
||||||
<property name="show_expanders">False</property>
|
<property name="show_expanders">False</property>
|
||||||
<child internal-child="selection">
|
<child internal-child="selection">
|
||||||
<object class="GtkTreeSelection" id="treeview-selection6"/>
|
<object class="GtkTreeSelection" id="treeview-selection6">
|
||||||
|
<property name="mode">none</property>
|
||||||
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkTreeViewColumn" id="infotype">
|
<object class="GtkTreeViewColumn" id="infotype">
|
||||||
@ -647,31 +744,11 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkTreeView" id="files_treeview">
|
<object class="GtkTextView" id="files_textview">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="margin_left">5</property>
|
<property name="editable">False</property>
|
||||||
<property name="margin_right">5</property>
|
<property name="cursor_visible">False</property>
|
||||||
<property name="margin_top">5</property>
|
|
||||||
<property name="margin_bottom">5</property>
|
|
||||||
<property name="model">files_list</property>
|
|
||||||
<property name="headers_visible">False</property>
|
|
||||||
<property name="headers_clickable">False</property>
|
|
||||||
<property name="enable_search">False</property>
|
|
||||||
<property name="show_expanders">False</property>
|
|
||||||
<child internal-child="selection">
|
|
||||||
<object class="GtkTreeSelection" id="treeview-selection10"/>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkTreeViewColumn" id="file_column">
|
|
||||||
<child>
|
|
||||||
<object class="GtkCellRendererText" id="cellrenderertext14"/>
|
|
||||||
<attributes>
|
|
||||||
<attribute name="text">0</attribute>
|
|
||||||
</attributes>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
@ -712,96 +789,6 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<object class="GtkFileChooserDialog" id="PackagesChooserDialog">
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="border_width">5</property>
|
|
||||||
<property name="title" translatable="yes">Install local packages</property>
|
|
||||||
<property name="role">GtkFileChooserDialog</property>
|
|
||||||
<property name="modal">True</property>
|
|
||||||
<property name="window_position">center-on-parent</property>
|
|
||||||
<property name="type_hint">dialog</property>
|
|
||||||
<property name="create_folders">False</property>
|
|
||||||
<property name="filter">package_filter</property>
|
|
||||||
<property name="select_multiple">True</property>
|
|
||||||
<signal name="file-activated" handler="on_PackagesChooserDialog_file_activated" swapped="no"/>
|
|
||||||
<child internal-child="vbox">
|
|
||||||
<object class="GtkBox" id="filechooserdialog-vbox1">
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<property name="spacing">2</property>
|
|
||||||
<child internal-child="action_area">
|
|
||||||
<object class="GtkButtonBox" id="filechooserdialog-action_area1">
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="layout_style">end</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="package_cancel_button">
|
|
||||||
<property name="label">gtk-cancel</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<property name="use_stock">True</property>
|
|
||||||
<signal name="clicked" handler="on_package_cancel_button_clicked" swapped="no"/>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="package_open_button">
|
|
||||||
<property name="label">gtk-open</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<property name="use_stock">True</property>
|
|
||||||
<signal name="clicked" handler="on_package_open_button_clicked" swapped="no"/>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</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="pack_type">end</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<placeholder/>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<action-widgets>
|
|
||||||
<action-widget response="0">package_cancel_button</action-widget>
|
|
||||||
<action-widget response="0">package_open_button</action-widget>
|
|
||||||
</action-widgets>
|
|
||||||
</object>
|
|
||||||
<object class="GtkImage" id="cancel_icon">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="stock">gtk-cancel</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkListStore" id="deps_list">
|
|
||||||
<columns>
|
|
||||||
<!-- column-name dep_type -->
|
|
||||||
<column type="gchararray"/>
|
|
||||||
<!-- column-name deps -->
|
|
||||||
<column type="gchararray"/>
|
|
||||||
</columns>
|
|
||||||
</object>
|
|
||||||
<object class="GtkListStore" id="details_list">
|
|
||||||
<columns>
|
|
||||||
<!-- column-name info_type -->
|
|
||||||
<column type="gchararray"/>
|
|
||||||
<!-- column-name _info -->
|
|
||||||
<column type="gchararray"/>
|
|
||||||
</columns>
|
|
||||||
</object>
|
|
||||||
<object class="GtkListStore" id="files_list">
|
<object class="GtkListStore" id="files_list">
|
||||||
<columns>
|
<columns>
|
||||||
<!-- column-name file -->
|
<!-- column-name file -->
|
||||||
|
@ -24,7 +24,7 @@ interface.add_from_file('/usr/share/pamac/gui/manager.ui')
|
|||||||
ManagerWindow = interface.get_object("ManagerWindow")
|
ManagerWindow = interface.get_object("ManagerWindow")
|
||||||
details_list = interface.get_object('details_list')
|
details_list = interface.get_object('details_list')
|
||||||
deps_list = interface.get_object('deps_list')
|
deps_list = interface.get_object('deps_list')
|
||||||
files_list = interface.get_object('files_list')
|
files_textview = interface.get_object('files_textview')
|
||||||
files_scrolledwindow = interface.get_object('files_scrolledwindow')
|
files_scrolledwindow = interface.get_object('files_scrolledwindow')
|
||||||
name_label = interface.get_object('name_label')
|
name_label = interface.get_object('name_label')
|
||||||
desc_label = interface.get_object('desc_label')
|
desc_label = interface.get_object('desc_label')
|
||||||
@ -54,6 +54,7 @@ menu_button = interface.get_object('menu_button')
|
|||||||
main_menu = interface.get_object('main_menu')
|
main_menu = interface.get_object('main_menu')
|
||||||
PackagesChooserDialog = interface.get_object('PackagesChooserDialog')
|
PackagesChooserDialog = interface.get_object('PackagesChooserDialog')
|
||||||
|
|
||||||
|
files_buffer = files_textview.get_buffer()
|
||||||
AboutDialog.set_version(version)
|
AboutDialog.set_version(version)
|
||||||
menu_button.set_popup(main_menu)
|
menu_button.set_popup(main_menu)
|
||||||
|
|
||||||
@ -276,9 +277,11 @@ def set_infos_list(pkg):
|
|||||||
desc = pkg.desc.replace('&', '&')
|
desc = pkg.desc.replace('&', '&')
|
||||||
desc = desc.replace('<->', '/')
|
desc = desc.replace('<->', '/')
|
||||||
desc_label.set_markup(desc)
|
desc_label.set_markup(desc)
|
||||||
|
## don't make url clickable (http://forum.manjaro.org/index.php?topic=7263.0)
|
||||||
|
link_label.set_markup(pkg.url)
|
||||||
# fix & in url
|
# fix & in url
|
||||||
url = pkg.url.replace('&', '&')
|
#url = pkg.url.replace('&', '&')
|
||||||
link_label.set_markup('<a href=\"{_url}\">{_url}</a>'.format(_url = url))
|
#link_label.set_markup('<a href=\"{_url}\">{_url}</a>'.format(_url = url))
|
||||||
licenses_label.set_markup(_('Licenses')+': {}'.format(' '.join(pkg.licenses)))
|
licenses_label.set_markup(_('Licenses')+': {}'.format(' '.join(pkg.licenses)))
|
||||||
|
|
||||||
def set_deps_list(pkg, style):
|
def set_deps_list(pkg, style):
|
||||||
@ -337,10 +340,11 @@ def set_details_list(pkg, style):
|
|||||||
details_list.append([_('Backup files')+':', '\n'.join(["%s" % (file) for (file, md5) in pkg.backup])])
|
details_list.append([_('Backup files')+':', '\n'.join(["%s" % (file) for (file, md5) in pkg.backup])])
|
||||||
|
|
||||||
def set_files_list(pkg):
|
def set_files_list(pkg):
|
||||||
files_list.clear()
|
files_buffer.delete(files_buffer.get_start_iter(), files_buffer.get_end_iter())
|
||||||
if len(pkg.files) != 0:
|
if len(pkg.files) != 0:
|
||||||
for file in pkg.files:
|
for file in pkg.files:
|
||||||
files_list.append(['/'+file[0]])
|
end_iter = files_buffer.get_end_iter()
|
||||||
|
files_buffer.insert(end_iter, '/'+file[0]+'\n')
|
||||||
|
|
||||||
def on_ManagerWindow_delete_event(*args):
|
def on_ManagerWindow_delete_event(*args):
|
||||||
Gtk.main_quit()
|
Gtk.main_quit()
|
||||||
@ -362,7 +366,7 @@ def on_TransValidButton_clicked(*args):
|
|||||||
refresh_packages_list(current_filter[0](current_filter[1]))
|
refresh_packages_list(current_filter[0](current_filter[1]))
|
||||||
|
|
||||||
def on_TransCancelButton_clicked(*args):
|
def on_TransCancelButton_clicked(*args):
|
||||||
transaction.progress_buffer.delete(transaction.progress_buffer.get_start_iter(),transaction.progress_buffer.get_end_iter())
|
transaction.progress_buffer.delete(transaction.progress_buffer.get_start_iter(), transaction.progress_buffer.get_end_iter())
|
||||||
transaction.ConfDialog.hide()
|
transaction.ConfDialog.hide()
|
||||||
trans.release()
|
trans.release()
|
||||||
if current_filter[0]:
|
if current_filter[0]:
|
||||||
@ -370,7 +374,7 @@ def on_TransCancelButton_clicked(*args):
|
|||||||
|
|
||||||
def on_ProgressCloseButton_clicked(*args):
|
def on_ProgressCloseButton_clicked(*args):
|
||||||
transaction.ProgressWindow.hide()
|
transaction.ProgressWindow.hide()
|
||||||
transaction.progress_buffer.delete(transaction.progress_buffer.get_start_iter(),transaction.progress_buffer.get_end_iter())
|
transaction.progress_buffer.delete(transaction.progress_buffer.get_start_iter(), transaction.progress_buffer.get_end_iter())
|
||||||
trans.do_sysupgrade(True)
|
trans.do_sysupgrade(True)
|
||||||
|
|
||||||
def on_ProgressCancelButton_clicked(*args):
|
def on_ProgressCancelButton_clicked(*args):
|
||||||
|
@ -860,7 +860,7 @@ class Transaction():
|
|||||||
action_icon.set_from_file('/usr/share/pamac/icons/24x24/status/package-setup.png')
|
action_icon.set_from_file('/usr/share/pamac/icons/24x24/status/package-setup.png')
|
||||||
progress_bar.set_text('')
|
progress_bar.set_text('')
|
||||||
progress_bar.set_fraction(0)
|
progress_bar.set_fraction(0)
|
||||||
progress_buffer.delete(progress_buffer.get_start_iter(),progress_buffer.get_end_iter())
|
progress_buffer.delete(progress_buffer.get_start_iter(), progress_buffer.get_end_iter())
|
||||||
ProgressCloseButton.set_visible(False)
|
ProgressCloseButton.set_visible(False)
|
||||||
ProgressWindow.show()
|
ProgressWindow.show()
|
||||||
while Gtk.events_pending():
|
while Gtk.events_pending():
|
||||||
|
Loading…
Reference in New Issue
Block a user