v4.1.0-beta

This commit is contained in:
guinux 2016-05-13 15:44:10 +02:00
parent 2c1910d6b8
commit 6c84122795
10 changed files with 716 additions and 640 deletions

View File

@ -7,16 +7,20 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Pamac\n" "Project-Id-Version: Pamac\n"
"Report-Msgid-Bugs-To: guillaume@manjaro.org\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n"
"POT-Creation-Date: 2016-04-24 08:44+0200\n" "POT-Creation-Date: 2015-08-20 11:53+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n" "Language: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
#: data/polkit/org.manjaro.pamac.policy
msgid "Authentication is required"
msgstr ""
#: ../src/daemon.vala #: ../src/daemon.vala
msgid "Failed to initialize alpm library" msgid "Failed to initialize alpm library"
msgstr "" msgstr ""
@ -33,7 +37,7 @@ msgstr ""
msgid "Explicitly installed" msgid "Explicitly installed"
msgstr "" msgstr ""
#: ../src/daemon.vala #: ../src/daemon.vala ../src/manager_window.vala
msgid "Installed as a dependency for another package" msgid "Installed as a dependency for another package"
msgstr "" msgstr ""
@ -368,24 +372,17 @@ msgstr ""
msgid "Deselect" msgid "Deselect"
msgstr "" msgstr ""
#: ../src/manager_window.vala #: ../src/manager_window.vala ../resources/manager_window.ui
msgid "Install" msgid "Install"
msgstr "" msgstr ""
#: ../src/manager_window.vala #: ../src/manager_window.vala ../resources/manager_window.ui
msgid "Remove" msgid "Remove"
msgstr "" msgstr ""
#: ../src/manager_window.vala #: ../src/manager_window.vala ../resources/progress_dialog.ui
msgid "Reinstall" #: ../resources/manager_window.ui ../resources/updater_window.ui
msgstr "" msgid "Details"
#: ../src/manager_window.vala
msgid "Install optional dependencies"
msgstr ""
#: ../src/manager_window.vala
msgid "Mark as explicitly installed"
msgstr "" msgstr ""
#: ../src/manager_window.vala #: ../src/manager_window.vala
@ -411,6 +408,14 @@ msgstr ""
msgid "Pending" msgid "Pending"
msgstr "" msgstr ""
#: ../src/manager_window.vala
msgid "Install Reason"
msgstr ""
#: ../src/manager_window.vala
msgid "Mark as explicitly installed"
msgstr ""
#: ../src/manager_window.vala #: ../src/manager_window.vala
msgid "Licenses" msgid "Licenses"
msgstr "" msgstr ""
@ -436,10 +441,6 @@ msgstr ""
msgid "Install Date" msgid "Install Date"
msgstr "" msgstr ""
#: ../src/manager_window.vala
msgid "Install Reason"
msgstr ""
#: ../src/manager_window.vala #: ../src/manager_window.vala
msgid "Signatures" msgid "Signatures"
msgstr "" msgstr ""
@ -513,11 +514,6 @@ msgstr ""
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#: ../src/manager_window.vala
#, c-format
msgid "Choose optional dependencies for %s"
msgstr ""
#: ../src/manager_window.vala ../resources/manager_window.ui #: ../src/manager_window.vala ../resources/manager_window.ui
msgid "Install Local Packages" msgid "Install Local Packages"
msgstr "" msgstr ""
@ -570,11 +566,6 @@ msgstr ""
msgid "_Hide" msgid "_Hide"
msgstr "" msgstr ""
#: ../resources/progress_dialog.ui ../resources/manager_window.ui
#: ../resources/updater_window.ui
msgid "Details"
msgstr ""
#: ../resources/history_dialog.ui #: ../resources/history_dialog.ui
msgid "Pamac History" msgid "Pamac History"
msgstr "" msgstr ""
@ -640,12 +631,12 @@ msgstr ""
msgid "AUR" msgid "AUR"
msgstr "" msgstr ""
#: ../resources/manager_window.ui ../resources/updater_window.ui #: ../resources/manager_window.ui
msgid "_Apply" msgid "Browse"
msgstr "" msgstr ""
#: ../resources/manager_window.ui #: ../resources/manager_window.ui
msgid "Browse" msgid "Reinstall"
msgstr "" msgstr ""
#: ../resources/manager_window.ui #: ../resources/manager_window.ui
@ -656,6 +647,10 @@ msgstr ""
msgid "Files" msgid "Files"
msgstr "" msgstr ""
#: ../resources/manager_window.ui ../resources/updater_window.ui
msgid "_Apply"
msgstr ""
#: ../resources/preferences_dialog.ui #: ../resources/preferences_dialog.ui
msgid "Remove unrequired dependencies" msgid "Remove unrequired dependencies"
msgstr "" msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Pamac\n" "Project-Id-Version: Pamac\n"
"Report-Msgid-Bugs-To: guillaume@manjaro.org\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n"
"POT-Creation-Date: 2015-08-20 11:53+0200\n" "POT-Creation-Date: 2016-04-24 08:44+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -1,6 +1,5 @@
MANAGER_RESOURCES_FILES = manager_window.ui \ MANAGER_RESOURCES_FILES = manager_window.ui \
choose_dep_dialog.ui \
history_dialog.ui \ history_dialog.ui \
package-available.png \ package-available.png \
package-available-locked.png \ package-available-locked.png \

View File

@ -95,17 +95,16 @@
<property name="icon_name">system-software-install</property> <property name="icon_name">system-software-install</property>
<property name="gravity">center</property> <property name="gravity">center</property>
<property name="show_menubar">False</property> <property name="show_menubar">False</property>
<child>
<object class="GtkBox" id="main_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child> <child>
<object class="GtkStack" id="main_stack"> <object class="GtkStack" id="main_stack">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="transition_type">slide-left-right</property> <property name="transition_type">slide-left-right</property>
<child>
<object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child> <child>
<object class="GtkBox" id="box3"> <object class="GtkBox" id="box3">
<property name="visible">True</property> <property name="visible">True</property>
@ -383,6 +382,7 @@
<property name="fixed_height_mode">True</property> <property name="fixed_height_mode">True</property>
<property name="show_expanders">False</property> <property name="show_expanders">False</property>
<property name="rubber_banding">True</property> <property name="rubber_banding">True</property>
<property name="activate_on_single_click">True</property>
<signal name="button-press-event" handler="on_packages_treeview_button_press_event" swapped="no"/> <signal name="button-press-event" handler="on_packages_treeview_button_press_event" swapped="no"/>
<signal name="row-activated" handler="on_packages_treeview_row_activated" swapped="no"/> <signal name="row-activated" handler="on_packages_treeview_row_activated" swapped="no"/>
<child internal-child="selection"> <child internal-child="selection">
@ -499,7 +499,7 @@
<property name="fixed_height_mode">True</property> <property name="fixed_height_mode">True</property>
<property name="show_expanders">False</property> <property name="show_expanders">False</property>
<property name="rubber_banding">True</property> <property name="rubber_banding">True</property>
<property name="enable_grid_lines">horizontal</property> <property name="activate_on_single_click">True</property>
<signal name="button-press-event" handler="on_aur_treeview_button_press_event" swapped="no"/> <signal name="button-press-event" handler="on_aur_treeview_button_press_event" swapped="no"/>
<signal name="row-activated" handler="on_aur_treeview_row_activated" swapped="no"/> <signal name="row-activated" handler="on_aur_treeview_row_activated" swapped="no"/>
<child internal-child="selection"> <child internal-child="selection">
@ -596,26 +596,347 @@
</packing> </packing>
</child> </child>
</object> </object>
<packing>
<property name="name">browse</property>
<property name="title" translatable="yes">Browse</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkBox" id="box8">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkBox" id="box9">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_top">3</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">18</property>
<child>
<object class="GtkLabel" id="name_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_start">6</property>
<property name="margin_end">6</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="desc_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_start">6</property>
<property name="margin_end">6</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="link_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_start">6</property>
<property name="margin_end">6</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="licenses_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_start">6</property>
<property name="margin_end">6</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
<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">0</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkButtonBox" id="details_buttonbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<property name="layout_style">start</property>
<child>
<object class="GtkToggleButton" id="remove_togglebutton">
<property name="label" translatable="yes">Remove</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="toggled" handler="on_remove_togglebutton_toggled" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="reinstall_togglebutton">
<property name="label" translatable="yes">Reinstall</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="toggled" handler="on_reinstall_togglebutton_toggled" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="install_togglebutton">
<property name="label" translatable="yes">Install</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="toggled" handler="on_install_togglebutton_toggled" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</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="position">0</property>
</packing>
</child>
<child>
<object class="GtkStackSwitcher" id="properties_stackswitcher">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="stack">properties_stack</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkStack" id="properties_stack">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkScrolledWindow" id="details_scrolledwindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkViewport" id="viewport1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkGrid" id="details_grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="row_spacing">12</property>
<property name="column_spacing">12</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="name">details</property>
<property name="title" translatable="yes">Details</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="deps_scrolledwindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkViewport" id="viewport2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkGrid" id="deps_grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="row_spacing">3</property>
<property name="column_spacing">3</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="name">deps</property>
<property name="title" translatable="yes">Dependencies</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="files_scrolledwindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkTextView" id="files_textview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="pixels_above_lines">3</property>
<property name="pixels_below_lines">3</property>
<property name="editable">False</property>
<property name="left_margin">6</property>
<property name="right_margin">6</property>
<property name="cursor_visible">False</property>
</object>
</child>
</object>
<packing>
<property name="name">files</property>
<property name="title" translatable="yes">Files</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">details</property>
<property name="title" translatable="yes">Details</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSeparator" id="separator">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child> <child>
<object class="GtkBox" id="transaction_infobox"> <object class="GtkBox" id="transaction_infobox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="margin_left">6</property> <property name="border_width">6</property>
<property name="margin_right">6</property>
<property name="margin_bottom">6</property>
<property name="spacing">12</property> <property name="spacing">12</property>
<child> <child>
<object class="GtkLabel" id="transaction_infos_label"> <object class="GtkLabel" id="transaction_infos_label">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="halign">start</property> <property name="halign">start</property>
<property name="margin_left">6</property>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">True</property>
@ -628,7 +949,6 @@
<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">6</property> <property name="spacing">6</property>
<property name="homogeneous">True</property>
<property name="layout_style">start</property> <property name="layout_style">start</property>
<child> <child>
<object class="GtkButton" id="details_button"> <object class="GtkButton" id="details_button">
@ -682,268 +1002,12 @@
</packing> </packing>
</child> </child>
</object> </object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="name">browse</property>
<property name="title" translatable="yes">Browse</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkBox" id="box8">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="name_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_left">6</property>
<property name="margin_right">6</property>
<property name="margin_start">6</property>
<property name="margin_end">6</property>
<property name="margin_top">6</property>
<property name="margin_bottom">6</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="desc_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_left">6</property>
<property name="margin_right">6</property>
<property name="margin_start">6</property>
<property name="margin_end">6</property>
<property name="margin_top">6</property>
<property name="margin_bottom">6</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="link_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_left">6</property>
<property name="margin_right">6</property>
<property name="margin_start">6</property>
<property name="margin_end">6</property>
<property name="margin_top">6</property>
<property name="margin_bottom">6</property>
</object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">2</property> <property name="position">2</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkLabel" id="licenses_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_left">6</property>
<property name="margin_right">6</property>
<property name="margin_start">6</property>
<property name="margin_end">6</property>
<property name="margin_top">6</property>
<property name="margin_bottom">6</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkStackSwitcher" id="properties_stackswitcher">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stack">properties_stack</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkStack" id="properties_stack">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkScrolledWindow" id="details_scrolledwindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="details_treeview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_visible">False</property>
<property name="headers_clickable">False</property>
<property name="enable_search">False</property>
<property name="search_column">0</property>
<property name="show_expanders">False</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection9">
<property name="mode">none</property>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="infotype">
<property name="sizing">autosize</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext6">
<property name="yalign">0</property>
<property name="wrap_mode">word</property>
</object>
<attributes>
<attribute name="markup">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="info">
<property name="sizing">autosize</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext7">
<property name="wrap_mode">word</property>
</object>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="name">details</property>
<property name="title" translatable="yes">Details</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="deps_scrolledwindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="deps_treeview">
<property name="visible">True</property>
<property name="can_focus">True</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>
<property name="activate_on_single_click">True</property>
<signal name="row-activated" handler="on_deps_treeview_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection" id="deps_treeview_selection"/>
</child>
<child>
<object class="GtkTreeViewColumn" id="dep_type_treeview_column">
<property name="sizing">autosize</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext3">
<property name="yalign">0</property>
</object>
<attributes>
<attribute name="markup">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="deps_treeview_column">
<property name="sizing">autosize</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext5"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="name">deps</property>
<property name="title" translatable="yes">Dependencies</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="files_scrolledwindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTextView" id="files_textview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="pixels_above_lines">3</property>
<property name="editable">False</property>
<property name="left_margin">6</property>
<property name="right_margin">6</property>
<property name="cursor_visible">False</property>
<property name="input_purpose">name</property>
</object>
</child>
</object>
<packing>
<property name="name">files</property>
<property name="title" translatable="yes">Files</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">details</property>
<property name="title" translatable="yes">Details</property>
<property name="position">1</property>
</packing>
</child>
</object> </object>
</child> </child>
<child type="titlebar"> <child type="titlebar">

View File

@ -2,7 +2,6 @@
<gresources> <gresources>
<gresource prefix="/org/manjaro/pamac/manager"> <gresource prefix="/org/manjaro/pamac/manager">
<file preprocess="xml-stripblanks">manager_window.ui</file> <file preprocess="xml-stripblanks">manager_window.ui</file>
<file preprocess="xml-stripblanks">choose_dep_dialog.ui</file>
<file preprocess="to-pixdata">package-available.png</file> <file preprocess="to-pixdata">package-available.png</file>
<file preprocess="to-pixdata">package-available-locked.png</file> <file preprocess="to-pixdata">package-available-locked.png</file>
<file preprocess="to-pixdata">package-install.png</file> <file preprocess="to-pixdata">package-install.png</file>

View File

@ -94,7 +94,7 @@ libpamac.so: $(COMMON_SOURCES) $(TRANSACTION_SOURCES) $(PREFERENCES_SOURCES) ../
$(TRANSACTION_SOURCES) \ $(TRANSACTION_SOURCES) \
$(PREFERENCES_SOURCES) $(PREFERENCES_SOURCES)
pamac-manager: libpamac.so choose_dep_dialog.vala ../resources/manager_resources.c manager_window.vala manager.vala pamac-manager: libpamac.so ../resources/manager_resources.c manager_window.vala manager.vala
valac -o pamac-manager \ valac -o pamac-manager \
$(COMMON_VALA_FLAGS) \ $(COMMON_VALA_FLAGS) \
$(PAMAC_LIB_FLAGS) \ $(PAMAC_LIB_FLAGS) \
@ -103,7 +103,6 @@ pamac-manager: libpamac.so choose_dep_dialog.vala ../resources/manager_resources
--pkg=gdk-3.0 \ --pkg=gdk-3.0 \
--gresources=$(MANAGER_GRESOURCE_FILE) \ --gresources=$(MANAGER_GRESOURCE_FILE) \
../resources/manager_resources.c \ ../resources/manager_resources.c \
choose_dep_dialog.vala \
manager_window.vala \ manager_window.vala \
manager.vala manager.vala

View File

@ -317,6 +317,7 @@ namespace Pamac {
} }
private void refresh () { private void refresh () {
write_log_file ("synchronizing package lists");
intern_lock = true; intern_lock = true;
current_error = ErrorInfos (); current_error = ErrorInfos ();
int force = (force_refresh) ? 1 : 0; int force = (force_refresh) ? 1 : 0;
@ -529,8 +530,22 @@ namespace Pamac {
return initialise_pkg_struct (get_syncpkg (pkgname)); return initialise_pkg_struct (get_syncpkg (pkgname));
} }
private unowned Alpm.Package? find_dbs_satisfier (string depstring) {
unowned Alpm.Package? pkg = null;
unowned Alpm.List<unowned Alpm.DB> syncdbs = alpm_handle.syncdbs;
while (syncdbs != null) {
unowned Alpm.DB db = syncdbs.data;
pkg = Alpm.find_satisfier (db.pkgcache, depstring);
if (pkg != null) {
break;
}
syncdbs.next ();
}
return pkg;
}
public AlpmPackage find_sync_satisfier (string depstring) { public AlpmPackage find_sync_satisfier (string depstring) {
return initialise_pkg_struct (alpm_handle.find_dbs_satisfier (alpm_handle.syncdbs, depstring)); return initialise_pkg_struct (find_dbs_satisfier (depstring));
} }
private Alpm.List<unowned Alpm.Package> search_all_dbs (string search_string) { private Alpm.List<unowned Alpm.Package> search_all_dbs (string search_string) {
@ -769,7 +784,7 @@ namespace Pamac {
foreach (unowned Json.Node? _node in list) { foreach (unowned Json.Node? _node in list) {
unowned string depstring = _node.get_string (); unowned string depstring = _node.get_string ();
if (Alpm.find_satisfier (alpm_handle.localdb.pkgcache, depstring) == null) { if (Alpm.find_satisfier (alpm_handle.localdb.pkgcache, depstring) == null) {
if (alpm_handle.find_dbs_satisfier (alpm_handle.syncdbs, depstring) == null) { if (find_dbs_satisfier (depstring) == null) {
success = yield set_aur_dep_list (depstring); success = yield set_aur_dep_list (depstring);
} }
} }
@ -785,7 +800,7 @@ namespace Pamac {
foreach (unowned Json.Node? _node in list) { foreach (unowned Json.Node? _node in list) {
unowned string depstring = _node.get_string (); unowned string depstring = _node.get_string ();
if (Alpm.find_satisfier (alpm_handle.localdb.pkgcache, depstring) == null) { if (Alpm.find_satisfier (alpm_handle.localdb.pkgcache, depstring) == null) {
if (alpm_handle.find_dbs_satisfier (alpm_handle.syncdbs, depstring) == null) { if (find_dbs_satisfier (depstring) == null) {
success = yield set_aur_dep_list (depstring); success = yield set_aur_dep_list (depstring);
} }
} }
@ -802,7 +817,7 @@ namespace Pamac {
foreach (unowned Json.Node? _node in list) { foreach (unowned Json.Node? _node in list) {
unowned string depstring = _node.get_string (); unowned string depstring = _node.get_string ();
if (Alpm.find_satisfier (alpm_handle.localdb.pkgcache, depstring) == null) { if (Alpm.find_satisfier (alpm_handle.localdb.pkgcache, depstring) == null) {
if (alpm_handle.find_dbs_satisfier (alpm_handle.syncdbs, depstring) == null) { if (find_dbs_satisfier (depstring) == null) {
success = yield set_aur_dep_list (depstring); success = yield set_aur_dep_list (depstring);
} }
} }
@ -976,6 +991,7 @@ namespace Pamac {
if (alpm_pkg.desc != null) { if (alpm_pkg.desc != null) {
desc = alpm_pkg.desc; desc = alpm_pkg.desc;
} }
details.origin = (uint) alpm_pkg.origin;
// url can be null // url can be null
if (alpm_pkg.url != null) { if (alpm_pkg.url != null) {
url = alpm_pkg.url; url = alpm_pkg.url;
@ -1625,8 +1641,8 @@ namespace Pamac {
private void write_log_file (string event) { private void write_log_file (string event) {
var now = new DateTime.now_local (); var now = new DateTime.now_local ();
string log = "%s %s".printf (now.format ("[%Y-%m-%d %H:%M]"), event); string log = "%s [PAMAC] %s".printf (now.format ("[%Y-%m-%d %H:%M]"), event);
var file = GLib.File.new_for_path ("/var/log/pamac.log"); var file = GLib.File.new_for_path ("/var/log/pacman.log");
try { try {
// creating a DataOutputStream to the file // creating a DataOutputStream to the file
var dos = new DataOutputStream (file.append_to (FileCreateFlags.NONE)); var dos = new DataOutputStream (file.append_to (FileCreateFlags.NONE));
@ -1692,37 +1708,12 @@ private void cb_event (Alpm.Event.Data data) {
break; break;
} }
break; break;
case Alpm.Event.Type.PACKAGE_OPERATION_DONE:
switch (data.package_operation_operation) {
case Alpm.Package.Operation.INSTALL:
string log = "Installed %s (%s)\n".printf (data.package_operation_newpkg.name, data.package_operation_newpkg.version);
write_log_file (log);
break;
case Alpm.Package.Operation.REMOVE:
string log = "Removed %s (%s)\n".printf (data.package_operation_oldpkg.name, data.package_operation_oldpkg.version);
write_log_file (log);
break;
case Alpm.Package.Operation.REINSTALL:
string log = "Reinstalled %s (%s)\n".printf (data.package_operation_newpkg.name, data.package_operation_newpkg.version);
write_log_file (log);
break;
case Alpm.Package.Operation.UPGRADE:
string log = "Upgraded %s (%s -> %s)\n".printf (data.package_operation_oldpkg.name, data.package_operation_oldpkg.version, data.package_operation_newpkg.version);
write_log_file (log);
break;
case Alpm.Package.Operation.DOWNGRADE:
string log = "Downgraded %s (%s -> %s)\n".printf (data.package_operation_oldpkg.name, data.package_operation_oldpkg.version, data.package_operation_newpkg.version);
write_log_file (log);
break;
}
break;
case Alpm.Event.Type.DELTA_PATCH_START: case Alpm.Event.Type.DELTA_PATCH_START:
details += data.delta_patch_delta.to; details += data.delta_patch_delta.to;
details += data.delta_patch_delta.delta; details += data.delta_patch_delta.delta;
break; break;
case Alpm.Event.Type.SCRIPTLET_INFO: case Alpm.Event.Type.SCRIPTLET_INFO:
details += data.scriptlet_info_line; details += data.scriptlet_info_line;
write_log_file (data.scriptlet_info_line);
break; break;
case Alpm.Event.Type.PKGDOWNLOAD_START: case Alpm.Event.Type.PKGDOWNLOAD_START:
details += data.pkgdownload_file; details += data.pkgdownload_file;

View File

@ -79,11 +79,11 @@ namespace Pamac {
[GtkChild] [GtkChild]
Gtk.StackSwitcher packages_stackswitcher; Gtk.StackSwitcher packages_stackswitcher;
[GtkChild] [GtkChild]
Gtk.TreeView deps_treeview; Gtk.StackSwitcher properties_stackswitcher;
[GtkChild] [GtkChild]
Gtk.TreeViewColumn deps_treeview_column; Gtk.Grid deps_grid;
[GtkChild] [GtkChild]
Gtk.TreeView details_treeview; Gtk.Grid details_grid;
[GtkChild] [GtkChild]
Gtk.ScrolledWindow files_scrolledwindow; Gtk.ScrolledWindow files_scrolledwindow;
[GtkChild] [GtkChild]
@ -95,6 +95,12 @@ namespace Pamac {
[GtkChild] [GtkChild]
Gtk.Label licenses_label; Gtk.Label licenses_label;
[GtkChild] [GtkChild]
Gtk.ToggleButton remove_togglebutton;
[GtkChild]
Gtk.ToggleButton reinstall_togglebutton;
[GtkChild]
Gtk.ToggleButton install_togglebutton;
[GtkChild]
Gtk.TextView files_textview; Gtk.TextView files_textview;
[GtkChild] [GtkChild]
Gtk.Box search_aur_box; Gtk.Box search_aur_box;
@ -114,9 +120,7 @@ namespace Pamac {
Gtk.MenuItem deselect_item; Gtk.MenuItem deselect_item;
Gtk.MenuItem install_item; Gtk.MenuItem install_item;
Gtk.MenuItem remove_item; Gtk.MenuItem remove_item;
Gtk.MenuItem reinstall_item; Gtk.MenuItem details_item;
Gtk.MenuItem install_optional_deps_item;
Gtk.MenuItem explicitly_installed_item;
GLib.List<string> selected_pkgs; GLib.List<string> selected_pkgs;
GLib.List<string> selected_aur; GLib.List<string> selected_aur;
@ -125,8 +129,6 @@ namespace Pamac {
Gtk.ListStore groups_list; Gtk.ListStore groups_list;
Gtk.ListStore states_list; Gtk.ListStore states_list;
Gtk.ListStore repos_list; Gtk.ListStore repos_list;
Gtk.ListStore deps_list;
Gtk.ListStore details_list;
Gtk.ListStore packages_list; Gtk.ListStore packages_list;
Gtk.ListStore aur_list; Gtk.ListStore aur_list;
@ -167,15 +169,9 @@ namespace Pamac {
right_click_menu.append (remove_item); right_click_menu.append (remove_item);
var separator_item = new Gtk.SeparatorMenuItem (); var separator_item = new Gtk.SeparatorMenuItem ();
right_click_menu.append (separator_item); right_click_menu.append (separator_item);
reinstall_item = new Gtk.MenuItem.with_label (dgettext (null, "Reinstall")); details_item = new Gtk.MenuItem.with_label (dgettext (null, "Details"));
reinstall_item.activate.connect (on_reinstall_item_activate); details_item.activate.connect (on_details_item_activate);
right_click_menu.append (reinstall_item); right_click_menu.append (details_item);
install_optional_deps_item = new Gtk.MenuItem.with_label (dgettext (null, "Install optional dependencies"));
install_optional_deps_item.activate.connect (on_install_optional_deps_item_activate);
right_click_menu.append (install_optional_deps_item);
explicitly_installed_item = new Gtk.MenuItem.with_label (dgettext (null, "Mark as explicitly installed"));
explicitly_installed_item.activate.connect (on_explicitly_installed_item_activate);
right_click_menu.append (explicitly_installed_item);
right_click_menu.show_all (); right_click_menu.show_all ();
search_list = new Gtk.ListStore (1, typeof (string)); search_list = new Gtk.ListStore (1, typeof (string));
@ -186,12 +182,6 @@ namespace Pamac {
states_treeview.set_model (states_list); states_treeview.set_model (states_list);
repos_list = new Gtk.ListStore (1, typeof (string)); repos_list = new Gtk.ListStore (1, typeof (string));
repos_treeview.set_model (repos_list); repos_treeview.set_model (repos_list);
deps_list = new Gtk.ListStore (2, typeof (string), typeof (string));
deps_treeview.set_model (deps_list);
// title is not visible, it is just defined to find it
deps_treeview_column.title = "deps";
details_list = new Gtk.ListStore (2, typeof (string), typeof (string));
details_treeview.set_model (details_list);
packages_list = new Gtk.ListStore (7, packages_list = new Gtk.ListStore (7,
typeof (uint), //origin typeof (uint), //origin
@ -322,6 +312,9 @@ namespace Pamac {
void on_set_pkgreason_finished () { void on_set_pkgreason_finished () {
refresh_packages_list (); refresh_packages_list ();
if (main_stack.visible_child_name == "details") {
display_package_properties (current_package_displayed);
}
} }
void support_aur (bool enable_aur, bool search_aur) { void support_aur (bool enable_aur, bool search_aur) {
@ -390,6 +383,106 @@ namespace Pamac {
selection.changed.connect_after (on_states_treeview_selection_changed); selection.changed.connect_after (on_states_treeview_selection_changed);
} }
void on_mark_explicit_button_clicked (Gtk.Button button) {
transaction.start_set_pkgreason (current_package_displayed, 0); //Alpm.Package.Reason.EXPLICIT
}
Gtk.Widget populate_details_grid (string detail_type, string detail, Gtk.Widget? previous_widget) {
var label = new Gtk.Label ("<b>%s</b>".printf (detail_type + ":"));
label.use_markup = true;
label.halign = Gtk.Align.START;
details_grid.attach_next_to (label, previous_widget, Gtk.PositionType.BOTTOM);
if (!transaction_running
&& detail_type == dgettext (null, "Install Reason")
&& detail == dgettext (null, "Installed as a dependency for another package")) {
var box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12);
box.homogeneous = false;
box.hexpand = true;
var label2 = new Gtk.Label (detail);
label2.halign = Gtk.Align.START;
box.pack_start (label2, false);
var mark_explicit_button = new Gtk.Button.with_label (dgettext (null, "Mark as explicitly installed"));
mark_explicit_button.margin = 3;
mark_explicit_button.clicked.connect (on_mark_explicit_button_clicked);
box.pack_end (mark_explicit_button, false);
details_grid.attach_next_to (box, label, Gtk.PositionType.RIGHT);
} else {
var label2 = new Gtk.Label (detail);
label2.halign = Gtk.Align.START;
details_grid.attach_next_to (label2, label, Gtk.PositionType.RIGHT);
}
return label as Gtk.Widget;
}
string find_install_button_dep_name (Gtk.Button button) {
string dep_name = "";
Gtk.Container container = button.get_parent ();
container.foreach ((widget) => {
if (widget.name == "GtkButton") {
var dep_button = widget as Gtk.Button;
AlpmPackage pkg = transaction.find_sync_satisfier (dep_button.label);
if (pkg.name != "") {
dep_name = pkg.name;
}
}
});
return dep_name;
}
void on_install_dep_button_toggled (Gtk.ToggleButton button) {
string dep_name = find_install_button_dep_name (button);
if (button.active) {
button.get_style_context ().add_class (Gtk.STYLE_CLASS_SUGGESTED_ACTION);
transaction.to_install.add (dep_name);
} else {
button.get_style_context ().remove_class (Gtk.STYLE_CLASS_SUGGESTED_ACTION);
transaction.to_install.remove (dep_name);
}
set_pendings_operations ();
}
Gtk.Widget populate_dep_grid (string dep_type, string[] dep_list, Gtk.Widget? previous_widget, bool add_install_button = false) {
var label = new Gtk.Label ("<b>%s</b>".printf (dep_type + ":"));
label.use_markup = true;
label.halign = Gtk.Align.START;
label.valign = Gtk.Align.START;
label.margin_top = 6;
deps_grid.attach_next_to (label, previous_widget, Gtk.PositionType.BOTTOM);
var box = new Gtk.Box (Gtk.Orientation.VERTICAL, 3);
box.hexpand = true;
foreach (unowned string dep in dep_list) {
if (add_install_button) {
var box2 = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12);
box2.homogeneous = false;
var dep_button = new Gtk.Button.with_label (dep);
dep_button.relief = Gtk.ReliefStyle.NONE;
dep_button.clicked.connect (on_dep_button_clicked);
box2.pack_start (dep_button, false);
if (transaction.find_installed_satisfier (dep).name == "") {
var install_dep_button = new Gtk.ToggleButton.with_label (dgettext (null, "Install"));
install_dep_button.margin = 3;
install_dep_button.toggled.connect (on_install_dep_button_toggled);
box2.pack_end (install_dep_button, false);
string dep_name = find_install_button_dep_name (install_dep_button);
install_dep_button.active = (dep_name in transaction.to_install);
}
box.pack_start (box2);
} else {
var dep_button = new Gtk.Button.with_label (dep);
dep_button.relief = Gtk.ReliefStyle.NONE;
dep_button.halign = Gtk.Align.START;
dep_button.clicked.connect (on_dep_button_clicked);
box.pack_start (dep_button, false);
}
}
deps_grid.attach_next_to (box, label, Gtk.PositionType.RIGHT);
return label as Gtk.Widget;
}
void destroy_widget (Gtk.Widget widget) {
widget.destroy ();
}
void set_package_details (string pkgname) { void set_package_details (string pkgname) {
AlpmPackageDetails details = transaction.get_pkg_details (pkgname); AlpmPackageDetails details = transaction.get_pkg_details (pkgname);
// infos // infos
@ -405,139 +498,120 @@ namespace Pamac {
licenses.append (license); licenses.append (license);
} }
licenses_label.set_text (licenses.str); licenses_label.set_text (licenses.str);
if (details.origin == 2) { //Alpm.Package.From.LOCALDB
install_togglebutton.visible = false;
remove_togglebutton.visible = true;
remove_togglebutton.active = transaction.to_remove.contains (details.name);
AlpmPackage find_pkg = transaction.get_sync_pkg (details.name);
if (find_pkg.name != "") {
if (find_pkg.version == details.version) {
reinstall_togglebutton.visible = true;
reinstall_togglebutton.active = transaction.to_install.contains (details.name);
}
}
} else if (details.origin == 3) { //Alpm.Package.From.SYNCDB
remove_togglebutton.visible = false;
reinstall_togglebutton.visible = false;
install_togglebutton.visible = true;
install_togglebutton.active = transaction.to_install.contains (details.name);
}
// details // details
details_list.clear (); details_grid.foreach (destroy_widget);
details_list.insert_with_values (null, -1, Gtk.Widget? previous_widget = null;
0, "<b>%s</b>".printf (dgettext (null, "Repository") + ":"), if (details.repo != "") {
1, details.repo); previous_widget = populate_details_grid (dgettext (null, "Repository"), details.repo, previous_widget);
var iter = Gtk.TreeIter (); }
if (details.groups.length > 0) { if (details.groups.length > 0) {
var label = new Gtk.Label ("<b>%s</b>".printf (dgettext (null, "Groups") + ":"));
label.use_markup = true;
label.halign = Gtk.Align.START;
label.valign = Gtk.Align.START;
details_grid.attach_next_to (label, previous_widget, Gtk.PositionType.BOTTOM);
var box = new Gtk.Box (Gtk.Orientation.VERTICAL, 6);
foreach (unowned string name in details.groups) { foreach (unowned string name in details.groups) {
details_list.insert_with_values (out iter, -1, var label2 = new Gtk.Label (name);
1, name); label2.halign = Gtk.Align.START;
box.pack_start (label2);
} }
Gtk.TreePath path = details_list.get_path (iter); details_grid.attach_next_to (box, label, Gtk.PositionType.RIGHT);
int pos = (path.get_indices ()[0]) - (details.groups.length - 1); previous_widget = label as Gtk.Widget;
details_list.get_iter (out iter, new Gtk.TreePath.from_indices (pos));
details_list.set (iter, 0, "<b>%s</b>".printf (dgettext (null, "Groups") + ":"));
} }
details_list.insert_with_values (null, -1, previous_widget = populate_details_grid (dgettext (null, "Packager"), details.packager, previous_widget);
0, "<b>%s</b>".printf (dgettext (null, "Packager") + ":"), previous_widget = populate_details_grid (dgettext (null, "Build Date"), details.builddate, previous_widget);
1, details.packager);
details_list.insert_with_values (null, -1,
0, "<b>%s</b>".printf (dgettext (null, "Build Date") + ":"),
1, details.builddate);
if (details.installdate != "") { if (details.installdate != "") {
details_list.insert_with_values (null, -1, previous_widget = populate_details_grid (dgettext (null, "Install Date"), details.installdate, previous_widget);
0, "<b>%s</b>".printf (dgettext (null, "Install Date") + ":"),
1, details.installdate);
} }
if (details.reason != "") { if (details.reason != "") {
details_list.insert_with_values (null, -1, previous_widget = populate_details_grid (dgettext (null, "Install Reason"), details.reason, previous_widget);
0, "<b>%s</b>".printf (dgettext (null, "Install Reason") + ":"),
1, details.reason);
} }
if (details.has_signature != "") { if (details.has_signature != "") {
details_list.insert_with_values (null, -1, previous_widget = populate_details_grid (dgettext (null, "Signatures"), details.has_signature, previous_widget);
0, "<b>%s</b>".printf (dgettext (null, "Signatures") + ":"),
1, details.has_signature);
} }
if (details.backups.length > 0) { if (details.backups.length > 0) {
var label = new Gtk.Label ("<b>%s</b>".printf (dgettext (null, "Backup files") + ":"));
label.use_markup = true;
label.halign = Gtk.Align.START;
label.valign = Gtk.Align.START;
details_grid.attach_next_to (label, previous_widget, Gtk.PositionType.BOTTOM);
var box = new Gtk.Box (Gtk.Orientation.VERTICAL, 12);
foreach (unowned string name in details.backups) { foreach (unowned string name in details.backups) {
details_list.insert_with_values (out iter, -1, var label2 = new Gtk.Label (name);
1, name); label2.halign = Gtk.Align.START;
box.pack_start (label2);
} }
Gtk.TreePath path = details_list.get_path (iter); details_grid.attach_next_to (box, label, Gtk.PositionType.RIGHT);
int pos = (path.get_indices ()[0]) - (details.backups.length - 1);
details_list.get_iter (out iter, new Gtk.TreePath.from_indices (pos));
details_list.set (iter, 0, "<b>%s</b>".printf (dgettext (null, "Backup files") + ":"));
} }
details_grid.show_all ();
// deps // deps
deps_list.clear (); deps_grid.foreach (destroy_widget);
previous_widget = null;
if (details.depends.length > 0) { if (details.depends.length > 0) {
foreach (unowned string name in details.depends) { previous_widget = populate_dep_grid (dgettext (null, "Depends On"), details.depends, previous_widget);
deps_list.insert_with_values (out iter, -1,
1, name);
}
Gtk.TreePath path = deps_list.get_path (iter);
int pos = (path.get_indices ()[0]) - (details.depends.length - 1);
deps_list.get_iter (out iter, new Gtk.TreePath.from_indices (pos));
deps_list.set (iter, 0, "<b>%s</b>".printf (dgettext (null, "Depends On") + ":"));
} }
if (details.optdepends.length > 0) { if (details.optdepends.length > 0) {
foreach (unowned string name in details.optdepends) { previous_widget = populate_dep_grid (dgettext (null, "Optional Dependencies"), details.optdepends, previous_widget, true);
var optdep = new StringBuilder (name);
if (transaction.find_installed_satisfier (optdep.str).name != "") {
optdep.append (" [");
optdep.append (dgettext (null, "Installed"));
optdep.append ("]");
}
deps_list.insert_with_values (out iter, -1,
1, optdep.str);
}
Gtk.TreePath path = deps_list.get_path (iter);
int pos = (path.get_indices ()[0]) - (details.optdepends.length - 1);
deps_list.get_iter (out iter, new Gtk.TreePath.from_indices (pos));
deps_list.set (iter, 0, "<b>%s</b>".printf (dgettext (null, "Optional Dependencies") + ":"));
} }
if (details.requiredby.length > 0) { if (details.requiredby.length > 0) {
foreach (unowned string name in details.requiredby) { previous_widget = populate_dep_grid (dgettext (null, "Required By"), details.requiredby, previous_widget);
deps_list.insert_with_values (out iter, -1,
1, name);
}
Gtk.TreePath path = deps_list.get_path (iter);
int pos = (path.get_indices ()[0]) - (details.requiredby.length - 1);
deps_list.get_iter (out iter, new Gtk.TreePath.from_indices (pos));
deps_list.set (iter, 0, "<b>%s</b>".printf (dgettext (null, "Required By") + ":"));
} }
if (details.optionalfor.length > 0) { if (details.optionalfor.length > 0) {
foreach (unowned string name in details.optionalfor) { previous_widget = populate_dep_grid (dgettext (null, "Optional For"), details.optionalfor, previous_widget);
deps_list.insert_with_values (out iter, -1,
1, name);
}
Gtk.TreePath path = deps_list.get_path (iter);
int pos = (path.get_indices ()[0]) - (details.optionalfor.length - 1);
deps_list.get_iter (out iter, new Gtk.TreePath.from_indices (pos));
deps_list.set (iter, 0, "<b>%s</b>".printf (dgettext (null, "Optional For") + ":"));
} }
if (details.provides.length > 0) { if (details.provides.length > 0) {
var label = new Gtk.Label ("<b>%s</b>".printf (dgettext (null, "Provides") + ":"));
label.use_markup = true;
label.halign = Gtk.Align.START;
label.valign = Gtk.Align.START;
label.margin_top = 6;
deps_grid.attach_next_to (label, previous_widget, Gtk.PositionType.BOTTOM);
var box = new Gtk.Box (Gtk.Orientation.VERTICAL, 12);
box.margin = 3;
foreach (unowned string name in details.provides) { foreach (unowned string name in details.provides) {
deps_list.insert_with_values (out iter, -1, var label2 = new Gtk.Label (name);
1, name); label2.halign = Gtk.Align.START;
label2.margin_start = 12;
box.pack_start (label2);
} }
Gtk.TreePath path = deps_list.get_path (iter); deps_grid.attach_next_to (box, label, Gtk.PositionType.RIGHT);
int pos = (path.get_indices ()[0]) - (details.provides.length - 1); previous_widget = label as Gtk.Widget;
deps_list.get_iter (out iter, new Gtk.TreePath.from_indices (pos));
deps_list.set (iter, 0, "<b>%s</b>".printf (dgettext (null, "Provides") + ":"));
} }
if (details.replaces.length > 0) { if (details.replaces.length > 0) {
foreach (unowned string name in details.replaces) { previous_widget = populate_dep_grid (dgettext (null, "Replaces"), details.replaces, previous_widget);
deps_list.insert_with_values (out iter, -1,
1, name);
}
Gtk.TreePath path = deps_list.get_path (iter);
int pos = (path.get_indices ()[0]) - (details.replaces.length - 1);
deps_list.get_iter (out iter, new Gtk.TreePath.from_indices (pos));
deps_list.set (iter, 0, "<b>%s</b>".printf (dgettext (null, "Replaces") + ":"));
} }
if (details.conflicts.length > 0) { if (details.conflicts.length > 0) {
foreach (unowned string name in details.conflicts) { previous_widget = populate_dep_grid (dgettext (null, "Conflicts With"), details.conflicts, previous_widget);
deps_list.insert_with_values (out iter, -1,
1, name);
}
Gtk.TreePath path = deps_list.get_path (iter);
int pos = (path.get_indices ()[0]) - (details.conflicts.length - 1);
deps_list.get_iter (out iter, new Gtk.TreePath.from_indices (pos));
deps_list.set (iter, 0, "<b>%s</b>".printf (dgettext (null, "Conflicts With") + ":"));
} }
deps_grid.show_all ();
// files // files
if (details.files.length > 0) { if (details.files.length > 0) {
files_scrolledwindow.visible = true; files_scrolledwindow.visible = true;
StringBuilder text = new StringBuilder (); StringBuilder text = new StringBuilder ();
foreach (unowned string file in details.files) { foreach (unowned string file in details.files) {
text.append (file); if (text.len > 0) {
text.append ("\n"); text.append ("\n");
} }
text.append (file);
}
files_textview.buffer.set_text (text.str, (int) text.len); files_textview.buffer.set_text (text.str, (int) text.len);
} else { } else {
files_scrolledwindow.visible = false; files_scrolledwindow.visible = false;
@ -549,8 +623,12 @@ namespace Pamac {
desc_label.set_text (""); desc_label.set_text ("");
link_label.set_text (""); link_label.set_text ("");
licenses_label.set_text (""); licenses_label.set_text ("");
details_list.clear (); remove_togglebutton.visible = false;
deps_list.clear (); reinstall_togglebutton.visible = false;
install_togglebutton.visible = false;
properties_stackswitcher.visible = false;
details_grid.foreach (destroy_widget);
deps_grid.foreach (destroy_widget);
this.get_window ().set_cursor (new Gdk.Cursor.for_display (Gdk.Display.get_default (), Gdk.CursorType.WATCH)); this.get_window ().set_cursor (new Gdk.Cursor.for_display (Gdk.Display.get_default (), Gdk.CursorType.WATCH));
while (Gtk.events_pending ()) { while (Gtk.events_pending ()) {
Gtk.main_iteration (); Gtk.main_iteration ();
@ -571,118 +649,125 @@ namespace Pamac {
licenses.append (license); licenses.append (license);
} }
licenses_label.set_text (licenses.str); licenses_label.set_text (licenses.str);
install_togglebutton.visible = true;
install_togglebutton.active = transaction.to_build.contains (details.name);
AlpmPackage pkg = transaction.get_installed_pkg (details.name);
if (pkg.name != "") {
remove_togglebutton.visible = true;
remove_togglebutton.active = transaction.to_remove.contains (pkg.name);
}
// details // details
details_list.clear (); properties_stackswitcher.visible = true;
details_grid.foreach (destroy_widget);
Gtk.Widget? previous_widget = null;
if (details.packagebase != details.name) { if (details.packagebase != details.name) {
details_list.insert_with_values (null, -1, previous_widget = populate_details_grid (dgettext (null, "Package Base"), details.packagebase, previous_widget);
0, "<b>%s</b>".printf (dgettext (null, "Package Base") + ":"),
1, details.packagebase);
} }
if (details.maintainer != "") { if (details.maintainer != "") {
details_list.insert_with_values (null, -1, previous_widget = populate_details_grid (dgettext (null, "Maintainer"), details.maintainer, previous_widget);
0, "<b>%s</b>".printf (dgettext (null, "Maintainer") + ":"),
1, details.maintainer);
} }
GLib.Time time = GLib.Time.local ((time_t) details.firstsubmitted); GLib.Time time = GLib.Time.local ((time_t) details.firstsubmitted);
details_list.insert_with_values (null, -1, previous_widget = populate_details_grid (dgettext (null, "First Submitted"), time.format ("%a %d %b %Y %X %Z"), previous_widget);
0, "<b>%s</b>".printf (dgettext (null, "First Submitted") + ":"),
1, time.format ("%a %d %b %Y %X %Z"));
time = GLib.Time.local ((time_t) details.lastmodified); time = GLib.Time.local ((time_t) details.lastmodified);
details_list.insert_with_values (null, -1, previous_widget = populate_details_grid (dgettext (null, "Last Modified"), time.format ("%a %d %b %Y %X %Z"), previous_widget);
0, "<b>%s</b>".printf (dgettext (null, "Last Modified") + ":"), previous_widget = populate_details_grid (dgettext (null, "Votes"), details.numvotes.to_string (), previous_widget);
1, time.format ("%a %d %b %Y %X %Z"));
details_list.insert_with_values (null, -1,
0, "<b>%s</b>".printf (dgettext (null, "Votes") + ":"),
1, details.numvotes.to_string ());
if (details.outofdate != 0) { if (details.outofdate != 0) {
time = GLib.Time.local ((time_t) details.outofdate); time = GLib.Time.local ((time_t) details.outofdate);
details_list.insert_with_values (null, -1, previous_widget = populate_details_grid (dgettext (null, "Out of Date"), time.format ("%a %d %b %Y %X %Z"), previous_widget);
0, "<b>%s</b>".printf (dgettext (null, "Out of Date") + ":"),
1, time.format ("%a %d %b %Y %X %Z"));
} }
details_grid.show_all ();
// deps // deps
deps_list.clear (); previous_widget = null;
var iter = Gtk.TreeIter ();
if (details.depends.length > 0) { if (details.depends.length > 0) {
foreach (unowned string name in details.depends) { previous_widget = populate_dep_grid (dgettext (null, "Depends On"), details.depends, previous_widget);
deps_list.insert_with_values (out iter, -1,
1, name);
}
Gtk.TreePath path = deps_list.get_path (iter);
int pos = (path.get_indices ()[0]) - (details.depends.length - 1);
deps_list.get_iter (out iter, new Gtk.TreePath.from_indices (pos));
deps_list.set (iter, 0, "<b>%s</b>".printf (dgettext (null, "Depends On") + ":"));
} }
if (details.makedepends.length > 0) { if (details.makedepends.length > 0) {
foreach (unowned string name in details.makedepends) { previous_widget = populate_dep_grid (dgettext (null, "Make Dependencies"), details.makedepends, previous_widget);
deps_list.insert_with_values (out iter, -1,
1, name);
}
Gtk.TreePath path = deps_list.get_path (iter);
int pos = (path.get_indices ()[0]) - (details.makedepends.length - 1);
deps_list.get_iter (out iter, new Gtk.TreePath.from_indices (pos));
deps_list.set (iter, 0, "<b>%s</b>".printf (dgettext (null, "Make Dependencies") + ":"));
} }
if (details.checkdepends.length > 0) { if (details.checkdepends.length > 0) {
foreach (unowned string name in details.checkdepends) { previous_widget = populate_dep_grid (dgettext (null, "Check Dependencies"), details.checkdepends, previous_widget);
deps_list.insert_with_values (out iter, -1,
1, name);
}
Gtk.TreePath path = deps_list.get_path (iter);
int pos = (path.get_indices ()[0]) - (details.checkdepends.length - 1);
deps_list.get_iter (out iter, new Gtk.TreePath.from_indices (pos));
deps_list.set (iter, 0, "<b>%s</b>".printf (dgettext (null, "Check Dependencies") + ":"));
} }
if (details.optdepends.length > 0) { if (details.optdepends.length > 0) {
foreach (unowned string name in details.optdepends) { previous_widget = populate_dep_grid (dgettext (null, "Optional Dependencies"), details.optdepends, previous_widget);
var optdep = new StringBuilder (name);
if (transaction.find_installed_satisfier (optdep.str).name != "") {
optdep.append (" [");
optdep.append (dgettext (null, "Installed"));
optdep.append ("]");
}
deps_list.insert_with_values (out iter, -1,
1, optdep.str);
}
Gtk.TreePath path = deps_list.get_path (iter);
int pos = (path.get_indices ()[0]) - (details.optdepends.length - 1);
deps_list.get_iter (out iter, new Gtk.TreePath.from_indices (pos));
deps_list.set (iter, 0, "<b>%s</b>".printf (dgettext (null, "Optional Dependencies") + ":"));
} }
if (details.provides.length > 0) { if (details.provides.length > 0) {
var label = new Gtk.Label ("<b>%s</b>".printf (dgettext (null, "Provides") + ":"));
label.use_markup = true;
label.halign = Gtk.Align.START;
label.valign = Gtk.Align.START;
label.margin_top = 6;
deps_grid.attach_next_to (label, previous_widget, Gtk.PositionType.BOTTOM);
var box = new Gtk.Box (Gtk.Orientation.VERTICAL, 12);
box.margin = 3;
foreach (unowned string name in details.provides) { foreach (unowned string name in details.provides) {
deps_list.insert_with_values (out iter, -1, var label2 = new Gtk.Label (name);
1, name); label2.halign = Gtk.Align.START;
label2.margin_start = 12;
box.pack_start (label2);
} }
Gtk.TreePath path = deps_list.get_path (iter); deps_grid.attach_next_to (box, label, Gtk.PositionType.RIGHT);
int pos = (path.get_indices ()[0]) - (details.provides.length - 1); previous_widget = label as Gtk.Widget;
deps_list.get_iter (out iter, new Gtk.TreePath.from_indices (pos));
deps_list.set (iter, 0, "<b>%s</b>".printf (dgettext (null, "Provides") + ":"));
} }
if (details.replaces.length > 0) { if (details.replaces.length > 0) {
foreach (unowned string name in details.replaces) { previous_widget = populate_dep_grid (dgettext (null, "Replaces"), details.replaces, previous_widget);
deps_list.insert_with_values (out iter, -1,
1, name);
}
Gtk.TreePath path = deps_list.get_path (iter);
int pos = (path.get_indices ()[0]) - (details.replaces.length - 1);
deps_list.get_iter (out iter, new Gtk.TreePath.from_indices (pos));
deps_list.set (iter, 0, "<b>%s</b>".printf (dgettext (null, "Replaces") + ":"));
} }
if (details.conflicts.length > 0) { if (details.conflicts.length > 0) {
foreach (unowned string name in details.conflicts) { previous_widget = populate_dep_grid (dgettext (null, "Conflicts With"), details.conflicts, previous_widget);
deps_list.insert_with_values (out iter, -1,
1, name);
}
Gtk.TreePath path = deps_list.get_path (iter);
int pos = (path.get_indices ()[0]) - (details.conflicts.length - 1);
deps_list.get_iter (out iter, new Gtk.TreePath.from_indices (pos));
deps_list.set (iter, 0, "<b>%s</b>".printf (dgettext (null, "Conflicts With") + ":"));
} }
deps_grid.show_all ();
this.get_window ().set_cursor (null); this.get_window ().set_cursor (null);
}); });
} }
[GtkCallback]
void on_install_togglebutton_toggled () {
if (install_togglebutton.active) {
install_togglebutton.get_style_context ().add_class (Gtk.STYLE_CLASS_SUGGESTED_ACTION);
if (transaction.get_pkg_origin (current_package_displayed) == 3) { //Alpm.Package.From.SYNCDB
transaction.to_install.add (current_package_displayed);
} else {
transaction.to_build.add (current_package_displayed);
}
} else {
install_togglebutton.get_style_context ().remove_class (Gtk.STYLE_CLASS_SUGGESTED_ACTION);
if (transaction.to_install.remove (current_package_displayed)) {
} else {
transaction.to_build.remove (current_package_displayed);
}
}
set_pendings_operations ();
}
[GtkCallback]
void on_remove_togglebutton_toggled () {
if (remove_togglebutton.active) {
reinstall_togglebutton.active = false;
reinstall_togglebutton.get_style_context ().remove_class (Gtk.STYLE_CLASS_SUGGESTED_ACTION);
remove_togglebutton.get_style_context ().add_class (Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION);
transaction.to_install.remove (current_package_displayed);
transaction.to_remove.add (current_package_displayed);
} else {
remove_togglebutton.get_style_context ().remove_class (Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION);
transaction.to_remove.remove (current_package_displayed);
}
set_pendings_operations ();
}
[GtkCallback]
void on_reinstall_togglebutton_toggled () {
if (reinstall_togglebutton.active) {
remove_togglebutton.active = false;
remove_togglebutton.get_style_context ().remove_class (Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION);
reinstall_togglebutton.get_style_context ().add_class (Gtk.STYLE_CLASS_SUGGESTED_ACTION);
transaction.to_remove.remove (current_package_displayed);
transaction.to_install.add (current_package_displayed);
} else {
reinstall_togglebutton.get_style_context ().remove_class (Gtk.STYLE_CLASS_SUGGESTED_ACTION);
transaction.to_install.remove (current_package_displayed);
}
set_pendings_operations ();
}
void populate_packages_list (AlpmPackage[] pkgs) { void populate_packages_list (AlpmPackage[] pkgs) {
// populate liststore // populate liststore
packages_treeview.freeze_notify (); packages_treeview.freeze_notify ();
@ -768,7 +853,7 @@ namespace Pamac {
void display_package_properties (string pkgname) { void display_package_properties (string pkgname) {
current_package_displayed = pkgname; current_package_displayed = pkgname;
set_package_details (pkgname); set_package_details (current_package_displayed);
} }
void display_aur_properties (string pkgname) { void display_aur_properties (string pkgname) {
@ -789,17 +874,11 @@ namespace Pamac {
} }
} }
[GtkCallback] void on_dep_button_clicked (Gtk.Button button) {
void on_deps_treeview_row_activated (Gtk.TreeView treeview, Gtk.TreePath path, Gtk.TreeViewColumn column) {
if (column.title == "deps") {
if (display_package_queue.find_custom (current_package_displayed, strcmp) == null) { if (display_package_queue.find_custom (current_package_displayed, strcmp) == null) {
display_package_queue.push_tail (current_package_displayed); display_package_queue.push_tail (current_package_displayed);
} }
var treemodel = treeview.get_model (); string depstring = button.label;
Gtk.TreeIter iter;
treemodel.get_iter (out iter, path);
string depstring;
treemodel.get (iter, 1, out depstring);
// if depstring contains a version restriction search a satisfier directly // if depstring contains a version restriction search a satisfier directly
if (">" in depstring || "=" in depstring || "<" in depstring) { if (">" in depstring || "=" in depstring || "<" in depstring) {
var pkg = transaction.find_installed_satisfier (depstring); var pkg = transaction.find_installed_satisfier (depstring);
@ -842,7 +921,6 @@ namespace Pamac {
} }
} }
} }
}
void on_packages_state_icon_activated (Gtk.TreePath path) { void on_packages_state_icon_activated (Gtk.TreePath path) {
Gtk.TreeIter iter; Gtk.TreeIter iter;
@ -946,15 +1024,16 @@ namespace Pamac {
set_pendings_operations (); set_pendings_operations ();
} }
void on_reinstall_item_activate () { void on_details_item_activate () {
foreach (unowned string pkgname in selected_pkgs) { // show details for the first selected package
transaction.to_remove.remove (pkgname); if (selected_pkgs.length () == 1) {
if (transaction.get_pkg_origin (pkgname) == 2) { //Alpm.Package.From.LOCALDB display_package_properties (selected_pkgs.data);
transaction.to_install.add (pkgname); main_stack.visible_child_name = "details";
} else if (selected_aur.length () == 1) {
display_aur_properties (selected_aur.data);
main_stack.visible_child_name = "details";
} }
} }
set_pendings_operations ();
}
void on_remove_item_activate () { void on_remove_item_activate () {
foreach (unowned string pkgname in selected_pkgs) { foreach (unowned string pkgname in selected_pkgs) {
@ -981,53 +1060,6 @@ namespace Pamac {
set_pendings_operations (); set_pendings_operations ();
} }
void choose_opt_dep (GLib.List<string> pkgnames) {
foreach (unowned string pkgname in pkgnames) {
var choose_dep_dialog = new ChooseDependenciesDialog (this);
//~ int length = 0;
foreach (unowned string optdep in transaction.get_pkg_uninstalled_optdeps (pkgname)) {
//~ length++;
choose_dep_dialog.deps_list.insert_with_values (null, -1,
0, false,
1, optdep);
}
choose_dep_dialog.title = dgettext (null, "Choose optional dependencies for %s").printf (pkgname);
//~ var headerbar = choose_dep_dialog.get_header_bar () as Gtk.HeaderBar;
//~ headerbar.subtitle = ngettext ("%s has %u uninstalled optional dependency",
//~ "%s has %u uninstalled optional dependencies",
//~ length).printf (pkgname, length);
if (choose_dep_dialog.run () == Gtk.ResponseType.OK) {
choose_dep_dialog.deps_list.foreach ((model, path, iter) => {
bool selected;
string name;
choose_dep_dialog.deps_list.get (iter, 0, out selected, 1, out name);
if (selected) {
AlpmPackage sync_pkg = transaction.find_sync_satisfier (name);
if (sync_pkg.name != "") {
transaction.to_install.add (sync_pkg.name);
}
}
return false;
});
}
choose_dep_dialog.destroy ();
while (Gtk.events_pending ()) {
Gtk.main_iteration ();
}
}
}
void on_install_optional_deps_item_activate () {
choose_opt_dep (selected_pkgs);
set_pendings_operations ();
}
void on_explicitly_installed_item_activate () {
foreach (unowned string pkgname in selected_pkgs) {
transaction.start_set_pkgreason (pkgname, 0); //Alpm.Package.Reason.EXPLICIT
}
}
void on_packages_stack_visible_child_changed () { void on_packages_stack_visible_child_changed () {
// do nothing if it we want to see pendings AUR operations // do nothing if it we want to see pendings AUR operations
switch (filters_stack.visible_child_name) { switch (filters_stack.visible_child_name) {
@ -1086,9 +1118,6 @@ namespace Pamac {
deselect_item.sensitive = false; deselect_item.sensitive = false;
install_item.sensitive = false; install_item.sensitive = false;
remove_item.sensitive = false; remove_item.sensitive = false;
reinstall_item.sensitive = false;
install_optional_deps_item.sensitive = false;
explicitly_installed_item.sensitive = false;
if (selected_paths.length () == 1) { if (selected_paths.length () == 1) {
Gtk.TreePath path = selected_paths.data; Gtk.TreePath path = selected_paths.data;
Gtk.TreeIter iter; Gtk.TreeIter iter;
@ -1098,30 +1127,17 @@ namespace Pamac {
string pkgversion; string pkgversion;
packages_list.get (iter, 0, out origin, 1, out pkgname, 3, out pkgversion); packages_list.get (iter, 0, out origin, 1, out pkgname, 3, out pkgversion);
selected_pkgs.append (pkgname); selected_pkgs.append (pkgname);
details_item.sensitive = true;
if (transaction.to_install.contains (pkgname) if (transaction.to_install.contains (pkgname)
|| transaction.to_remove.contains (pkgname)) { || transaction.to_remove.contains (pkgname)) {
deselect_item.sensitive = true; deselect_item.sensitive = true;
} else if (origin == 2) { //Alpm.Package.From.LOCALDB } else if (origin == 2) { //Alpm.Package.From.LOCALDB
remove_item.sensitive = true; remove_item.sensitive = true;
foreach (unowned string optdep in transaction.get_pkg_uninstalled_optdeps (pkgname)) {
if (transaction.find_installed_satisfier (optdep).name == "") {
install_optional_deps_item.sensitive = true;
break;
}
}
if (transaction.get_pkg_reason (pkgname) == 1) { //Alpm.Package.Reason.DEPEND
explicitly_installed_item.sensitive = true;
}
AlpmPackage find_pkg = transaction.get_sync_pkg (pkgname);
if (find_pkg.name != "") {
if (find_pkg.version == pkgversion) {
reinstall_item.sensitive = true;
}
}
} else if (origin == 3) { //Alpm.Package.From.SYNCDB } else if (origin == 3) { //Alpm.Package.From.SYNCDB
install_item.sensitive = true; install_item.sensitive = true;
} }
} else { } else {
details_item.sensitive = false;
foreach (unowned Gtk.TreePath path in selected_paths) { foreach (unowned Gtk.TreePath path in selected_paths) {
Gtk.TreeIter iter; Gtk.TreeIter iter;
packages_list.get_iter (out iter, path); packages_list.get_iter (out iter, path);
@ -1168,9 +1184,11 @@ namespace Pamac {
deselect_item.sensitive = false; deselect_item.sensitive = false;
install_item.sensitive = false; install_item.sensitive = false;
remove_item.sensitive = false; remove_item.sensitive = false;
reinstall_item.sensitive = false; if (selected_paths.length () == 1) {
install_optional_deps_item.sensitive = false; details_item.sensitive = true;
explicitly_installed_item.sensitive = false; } else {
details_item.sensitive = false;
}
foreach (unowned Gtk.TreePath path in selected_paths) { foreach (unowned Gtk.TreePath path in selected_paths) {
Gtk.TreeIter iter; Gtk.TreeIter iter;
aur_list.get_iter (out iter, path); aur_list.get_iter (out iter, path);
@ -1493,6 +1511,10 @@ namespace Pamac {
if (transaction_running) { if (transaction_running) {
transaction.show_progress (); transaction.show_progress ();
} else { } else {
main_stack.visible_child_name = "browse";
filters_stack.notify["visible-child"].disconnect (on_filters_stack_visible_child_changed);
filters_stack.visible_child_name = "states";
filters_stack.notify["visible-child"].connect (on_filters_stack_visible_child_changed);
Gtk.TreeIter iter; Gtk.TreeIter iter;
// show "Pending" in states_list // show "Pending" in states_list
// "Pending" is at indice 3 // "Pending" is at indice 3
@ -1501,7 +1523,7 @@ namespace Pamac {
selection.changed.disconnect (on_states_treeview_selection_changed); selection.changed.disconnect (on_states_treeview_selection_changed);
selection.select_iter (iter); selection.select_iter (iter);
selection.changed.connect_after (on_states_treeview_selection_changed); selection.changed.connect_after (on_states_treeview_selection_changed);
filters_stack.visible_child_name = "states"; refresh_packages_list ();
} }
} }
@ -1520,6 +1542,9 @@ namespace Pamac {
transaction.clear_lists (); transaction.clear_lists ();
set_pendings_operations (); set_pendings_operations ();
refresh_packages_list (); refresh_packages_list ();
if (main_stack.visible_child_name == "details") {
display_package_properties (current_package_displayed);
}
} }
} }
@ -1542,6 +1567,9 @@ namespace Pamac {
void on_transaction_finished (bool success) { void on_transaction_finished (bool success) {
refresh_packages_list (); refresh_packages_list ();
if (main_stack.visible_child_name == "details") {
display_package_properties (current_package_displayed);
}
transaction.to_load.remove_all (); transaction.to_load.remove_all ();
if (refreshing) { if (refreshing) {
if (success) { if (success) {

View File

@ -32,6 +32,7 @@ namespace Pamac {
public string version; public string version;
public string desc; public string desc;
public string repo; public string repo;
public uint origin;
public string url; public string url;
public string packager; public string packager;
public string builddate; public string builddate;

View File

@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
const string VERSION = "4.0.0"; const string VERSION = "4.1.0";
namespace Pamac { namespace Pamac {
[DBus (name = "org.manjaro.pamac")] [DBus (name = "org.manjaro.pamac")]