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 ""
"Project-Id-Version: Pamac\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \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"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
#: data/polkit/org.manjaro.pamac.policy
msgid "Authentication is required"
msgstr ""
#: ../src/daemon.vala
msgid "Failed to initialize alpm library"
msgstr ""
@ -33,7 +37,7 @@ msgstr ""
msgid "Explicitly installed"
msgstr ""
#: ../src/daemon.vala
#: ../src/daemon.vala ../src/manager_window.vala
msgid "Installed as a dependency for another package"
msgstr ""
@ -368,24 +372,17 @@ msgstr ""
msgid "Deselect"
msgstr ""
#: ../src/manager_window.vala
#: ../src/manager_window.vala ../resources/manager_window.ui
msgid "Install"
msgstr ""
#: ../src/manager_window.vala
#: ../src/manager_window.vala ../resources/manager_window.ui
msgid "Remove"
msgstr ""
#: ../src/manager_window.vala
msgid "Reinstall"
msgstr ""
#: ../src/manager_window.vala
msgid "Install optional dependencies"
msgstr ""
#: ../src/manager_window.vala
msgid "Mark as explicitly installed"
#: ../src/manager_window.vala ../resources/progress_dialog.ui
#: ../resources/manager_window.ui ../resources/updater_window.ui
msgid "Details"
msgstr ""
#: ../src/manager_window.vala
@ -411,6 +408,14 @@ msgstr ""
msgid "Pending"
msgstr ""
#: ../src/manager_window.vala
msgid "Install Reason"
msgstr ""
#: ../src/manager_window.vala
msgid "Mark as explicitly installed"
msgstr ""
#: ../src/manager_window.vala
msgid "Licenses"
msgstr ""
@ -436,10 +441,6 @@ msgstr ""
msgid "Install Date"
msgstr ""
#: ../src/manager_window.vala
msgid "Install Reason"
msgstr ""
#: ../src/manager_window.vala
msgid "Signatures"
msgstr ""
@ -513,11 +514,6 @@ msgstr ""
msgid "Name"
msgstr ""
#: ../src/manager_window.vala
#, c-format
msgid "Choose optional dependencies for %s"
msgstr ""
#: ../src/manager_window.vala ../resources/manager_window.ui
msgid "Install Local Packages"
msgstr ""
@ -570,11 +566,6 @@ msgstr ""
msgid "_Hide"
msgstr ""
#: ../resources/progress_dialog.ui ../resources/manager_window.ui
#: ../resources/updater_window.ui
msgid "Details"
msgstr ""
#: ../resources/history_dialog.ui
msgid "Pamac History"
msgstr ""
@ -640,12 +631,12 @@ msgstr ""
msgid "AUR"
msgstr ""
#: ../resources/manager_window.ui ../resources/updater_window.ui
msgid "_Apply"
#: ../resources/manager_window.ui
msgid "Browse"
msgstr ""
#: ../resources/manager_window.ui
msgid "Browse"
msgid "Reinstall"
msgstr ""
#: ../resources/manager_window.ui
@ -656,6 +647,10 @@ msgstr ""
msgid "Files"
msgstr ""
#: ../resources/manager_window.ui ../resources/updater_window.ui
msgid "_Apply"
msgstr ""
#: ../resources/preferences_dialog.ui
msgid "Remove unrequired dependencies"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Pamac\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

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

View File

@ -96,16 +96,15 @@
<property name="gravity">center</property>
<property name="show_menubar">False</property>
<child>
<object class="GtkStack" id="main_stack">
<object class="GtkBox" id="main_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="transition_type">slide-left-right</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="box2">
<object class="GtkStack" id="main_stack">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<property name="transition_type">slide-left-right</property>
<child>
<object class="GtkBox" id="box3">
<property name="visible">True</property>
@ -383,6 +382,7 @@
<property name="fixed_height_mode">True</property>
<property name="show_expanders">False</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="row-activated" handler="on_packages_treeview_row_activated" swapped="no"/>
<child internal-child="selection">
@ -499,7 +499,7 @@
<property name="fixed_height_mode">True</property>
<property name="show_expanders">False</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="row-activated" handler="on_aur_treeview_row_activated" swapped="no"/>
<child internal-child="selection">
@ -597,46 +597,85 @@
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="name">browse</property>
<property name="title" translatable="yes">Browse</property>
</packing>
</child>
<child>
<object class="GtkBox" id="transaction_infobox">
<object class="GtkBox" id="box4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">6</property>
<property name="margin_right">6</property>
<property name="margin_bottom">6</property>
<property name="spacing">12</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="transaction_infos_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_left">6</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButtonBox" id="transaction_infos_buttonbox">
<object class="GtkBox" id="box8">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<property name="homogeneous">True</property>
<property name="layout_style">start</property>
<child>
<object class="GtkButton" id="details_button">
<property name="label" translatable="yes">Details</property>
<object class="GtkBox" id="box9">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="on_details_button_clicked" swapped="no"/>
<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>
<property name="expand">True</property>
@ -645,78 +684,62 @@
</packing>
</child>
<child>
<object class="GtkButton" id="apply_button">
<property name="label" translatable="yes">_Apply</property>
<object class="GtkButtonBox" id="details_buttonbox">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_apply_button_clicked" swapped="no"/>
<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">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="cancel_button">
<property name="label" translatable="yes">_Cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_cancel_button_clicked" 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">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>
@ -725,16 +748,11 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="desc_label">
<object class="GtkStackSwitcher" id="properties_stackswitcher">
<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>
<property name="halign">center</property>
<property name="stack">properties_stack</property>
</object>
<packing>
<property name="expand">False</property>
@ -743,53 +761,239 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="link_label">
<object class="GtkStack" id="properties_stack">
<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>
<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">False</property>
<property name="expand">True</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_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="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>
<object class="GtkBox" id="transaction_infobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="transaction_infos_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkStackSwitcher" id="properties_stackswitcher">
<object class="GtkButtonBox" id="transaction_infos_buttonbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stack">properties_stack</property>
<property name="spacing">6</property>
<property name="layout_style">start</property>
<child>
<object class="GtkButton" id="details_button">
<property name="label" translatable="yes">Details</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="on_details_button_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="apply_button">
<property name="label" translatable="yes">_Apply</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_apply_button_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="cancel_button">
<property name="label" translatable="yes">_Cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_cancel_button_clicked" 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>
@ -797,151 +1001,11 @@
<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>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>

View File

@ -2,7 +2,6 @@
<gresources>
<gresource prefix="/org/manjaro/pamac/manager">
<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-locked.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) \
$(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 \
$(COMMON_VALA_FLAGS) \
$(PAMAC_LIB_FLAGS) \
@ -103,7 +103,6 @@ pamac-manager: libpamac.so choose_dep_dialog.vala ../resources/manager_resources
--pkg=gdk-3.0 \
--gresources=$(MANAGER_GRESOURCE_FILE) \
../resources/manager_resources.c \
choose_dep_dialog.vala \
manager_window.vala \
manager.vala

View File

@ -317,6 +317,7 @@ namespace Pamac {
}
private void refresh () {
write_log_file ("synchronizing package lists");
intern_lock = true;
current_error = ErrorInfos ();
int force = (force_refresh) ? 1 : 0;
@ -529,8 +530,22 @@ namespace Pamac {
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) {
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) {
@ -769,7 +784,7 @@ namespace Pamac {
foreach (unowned Json.Node? _node in list) {
unowned string depstring = _node.get_string ();
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);
}
}
@ -785,7 +800,7 @@ namespace Pamac {
foreach (unowned Json.Node? _node in list) {
unowned string depstring = _node.get_string ();
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);
}
}
@ -802,7 +817,7 @@ namespace Pamac {
foreach (unowned Json.Node? _node in list) {
unowned string depstring = _node.get_string ();
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);
}
}
@ -976,6 +991,7 @@ namespace Pamac {
if (alpm_pkg.desc != null) {
desc = alpm_pkg.desc;
}
details.origin = (uint) alpm_pkg.origin;
// url can be null
if (alpm_pkg.url != null) {
url = alpm_pkg.url;
@ -1625,8 +1641,8 @@ namespace Pamac {
private void write_log_file (string event) {
var now = new DateTime.now_local ();
string log = "%s %s".printf (now.format ("[%Y-%m-%d %H:%M]"), event);
var file = GLib.File.new_for_path ("/var/log/pamac.log");
string log = "%s [PAMAC] %s".printf (now.format ("[%Y-%m-%d %H:%M]"), event);
var file = GLib.File.new_for_path ("/var/log/pacman.log");
try {
// creating a DataOutputStream to the file
var dos = new DataOutputStream (file.append_to (FileCreateFlags.NONE));
@ -1692,37 +1708,12 @@ private void cb_event (Alpm.Event.Data data) {
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:
details += data.delta_patch_delta.to;
details += data.delta_patch_delta.delta;
break;
case Alpm.Event.Type.SCRIPTLET_INFO:
details += data.scriptlet_info_line;
write_log_file (data.scriptlet_info_line);
break;
case Alpm.Event.Type.PKGDOWNLOAD_START:
details += data.pkgdownload_file;

View File

@ -79,11 +79,11 @@ namespace Pamac {
[GtkChild]
Gtk.StackSwitcher packages_stackswitcher;
[GtkChild]
Gtk.TreeView deps_treeview;
Gtk.StackSwitcher properties_stackswitcher;
[GtkChild]
Gtk.TreeViewColumn deps_treeview_column;
Gtk.Grid deps_grid;
[GtkChild]
Gtk.TreeView details_treeview;
Gtk.Grid details_grid;
[GtkChild]
Gtk.ScrolledWindow files_scrolledwindow;
[GtkChild]
@ -95,6 +95,12 @@ namespace Pamac {
[GtkChild]
Gtk.Label licenses_label;
[GtkChild]
Gtk.ToggleButton remove_togglebutton;
[GtkChild]
Gtk.ToggleButton reinstall_togglebutton;
[GtkChild]
Gtk.ToggleButton install_togglebutton;
[GtkChild]
Gtk.TextView files_textview;
[GtkChild]
Gtk.Box search_aur_box;
@ -114,9 +120,7 @@ namespace Pamac {
Gtk.MenuItem deselect_item;
Gtk.MenuItem install_item;
Gtk.MenuItem remove_item;
Gtk.MenuItem reinstall_item;
Gtk.MenuItem install_optional_deps_item;
Gtk.MenuItem explicitly_installed_item;
Gtk.MenuItem details_item;
GLib.List<string> selected_pkgs;
GLib.List<string> selected_aur;
@ -125,8 +129,6 @@ namespace Pamac {
Gtk.ListStore groups_list;
Gtk.ListStore states_list;
Gtk.ListStore repos_list;
Gtk.ListStore deps_list;
Gtk.ListStore details_list;
Gtk.ListStore packages_list;
Gtk.ListStore aur_list;
@ -167,15 +169,9 @@ namespace Pamac {
right_click_menu.append (remove_item);
var separator_item = new Gtk.SeparatorMenuItem ();
right_click_menu.append (separator_item);
reinstall_item = new Gtk.MenuItem.with_label (dgettext (null, "Reinstall"));
reinstall_item.activate.connect (on_reinstall_item_activate);
right_click_menu.append (reinstall_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);
details_item = new Gtk.MenuItem.with_label (dgettext (null, "Details"));
details_item.activate.connect (on_details_item_activate);
right_click_menu.append (details_item);
right_click_menu.show_all ();
search_list = new Gtk.ListStore (1, typeof (string));
@ -186,12 +182,6 @@ namespace Pamac {
states_treeview.set_model (states_list);
repos_list = new Gtk.ListStore (1, typeof (string));
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,
typeof (uint), //origin
@ -322,6 +312,9 @@ namespace Pamac {
void on_set_pkgreason_finished () {
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) {
@ -390,6 +383,106 @@ namespace Pamac {
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) {
AlpmPackageDetails details = transaction.get_pkg_details (pkgname);
// infos
@ -405,138 +498,119 @@ namespace Pamac {
licenses.append (license);
}
licenses_label.set_text (licenses.str);
// details
details_list.clear ();
details_list.insert_with_values (null, -1,
0, "<b>%s</b>".printf (dgettext (null, "Repository") + ":"),
1, details.repo);
var iter = Gtk.TreeIter ();
if (details.groups.length > 0) {
foreach (unowned string name in details.groups) {
details_list.insert_with_values (out iter, -1,
1, name);
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);
}
}
Gtk.TreePath path = details_list.get_path (iter);
int pos = (path.get_indices ()[0]) - (details.groups.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, "Groups") + ":"));
} 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_list.insert_with_values (null, -1,
0, "<b>%s</b>".printf (dgettext (null, "Packager") + ":"),
1, details.packager);
details_list.insert_with_values (null, -1,
0, "<b>%s</b>".printf (dgettext (null, "Build Date") + ":"),
1, details.builddate);
// details
details_grid.foreach (destroy_widget);
Gtk.Widget? previous_widget = null;
if (details.repo != "") {
previous_widget = populate_details_grid (dgettext (null, "Repository"), details.repo, previous_widget);
}
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) {
var label2 = new Gtk.Label (name);
label2.halign = Gtk.Align.START;
box.pack_start (label2);
}
details_grid.attach_next_to (box, label, Gtk.PositionType.RIGHT);
previous_widget = label as Gtk.Widget;
}
previous_widget = populate_details_grid (dgettext (null, "Packager"), details.packager, previous_widget);
previous_widget = populate_details_grid (dgettext (null, "Build Date"), details.builddate, previous_widget);
if (details.installdate != "") {
details_list.insert_with_values (null, -1,
0, "<b>%s</b>".printf (dgettext (null, "Install Date") + ":"),
1, details.installdate);
previous_widget = populate_details_grid (dgettext (null, "Install Date"), details.installdate, previous_widget);
}
if (details.reason != "") {
details_list.insert_with_values (null, -1,
0, "<b>%s</b>".printf (dgettext (null, "Install Reason") + ":"),
1, details.reason);
previous_widget = populate_details_grid (dgettext (null, "Install Reason"), details.reason, previous_widget);
}
if (details.has_signature != "") {
details_list.insert_with_values (null, -1,
0, "<b>%s</b>".printf (dgettext (null, "Signatures") + ":"),
1, details.has_signature);
previous_widget = populate_details_grid (dgettext (null, "Signatures"), details.has_signature, previous_widget);
}
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) {
details_list.insert_with_values (out iter, -1,
1, name);
var label2 = new Gtk.Label (name);
label2.halign = Gtk.Align.START;
box.pack_start (label2);
}
Gtk.TreePath path = details_list.get_path (iter);
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.attach_next_to (box, label, Gtk.PositionType.RIGHT);
}
details_grid.show_all ();
// deps
deps_list.clear ();
deps_grid.foreach (destroy_widget);
previous_widget = null;
if (details.depends.length > 0) {
foreach (unowned string name in details.depends) {
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") + ":"));
previous_widget = populate_dep_grid (dgettext (null, "Depends On"), details.depends, previous_widget);
}
if (details.optdepends.length > 0) {
foreach (unowned string name in details.optdepends) {
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") + ":"));
previous_widget = populate_dep_grid (dgettext (null, "Optional Dependencies"), details.optdepends, previous_widget, true);
}
if (details.requiredby.length > 0) {
foreach (unowned string name in details.requiredby) {
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") + ":"));
previous_widget = populate_dep_grid (dgettext (null, "Required By"), details.requiredby, previous_widget);
}
if (details.optionalfor.length > 0) {
foreach (unowned string name in details.optionalfor) {
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") + ":"));
previous_widget = populate_dep_grid (dgettext (null, "Optional For"), details.optionalfor, previous_widget);
}
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) {
deps_list.insert_with_values (out iter, -1,
1, name);
var label2 = new Gtk.Label (name);
label2.halign = Gtk.Align.START;
label2.margin_start = 12;
box.pack_start (label2);
}
Gtk.TreePath path = deps_list.get_path (iter);
int pos = (path.get_indices ()[0]) - (details.provides.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, "Provides") + ":"));
deps_grid.attach_next_to (box, label, Gtk.PositionType.RIGHT);
previous_widget = label as Gtk.Widget;
}
if (details.replaces.length > 0) {
foreach (unowned string name in details.replaces) {
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") + ":"));
previous_widget = populate_dep_grid (dgettext (null, "Replaces"), details.replaces, previous_widget);
}
if (details.conflicts.length > 0) {
foreach (unowned string name in details.conflicts) {
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") + ":"));
previous_widget = populate_dep_grid (dgettext (null, "Conflicts With"), details.conflicts, previous_widget);
}
deps_grid.show_all ();
// files
if (details.files.length > 0) {
files_scrolledwindow.visible = true;
StringBuilder text = new StringBuilder ();
foreach (unowned string file in details.files) {
if (text.len > 0) {
text.append ("\n");
}
text.append (file);
text.append ("\n");
}
files_textview.buffer.set_text (text.str, (int) text.len);
} else {
@ -549,8 +623,12 @@ namespace Pamac {
desc_label.set_text ("");
link_label.set_text ("");
licenses_label.set_text ("");
details_list.clear ();
deps_list.clear ();
remove_togglebutton.visible = false;
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));
while (Gtk.events_pending ()) {
Gtk.main_iteration ();
@ -571,118 +649,125 @@ namespace Pamac {
licenses.append (license);
}
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_list.clear ();
properties_stackswitcher.visible = true;
details_grid.foreach (destroy_widget);
Gtk.Widget? previous_widget = null;
if (details.packagebase != details.name) {
details_list.insert_with_values (null, -1,
0, "<b>%s</b>".printf (dgettext (null, "Package Base") + ":"),
1, details.packagebase);
previous_widget = populate_details_grid (dgettext (null, "Package Base"), details.packagebase, previous_widget);
}
if (details.maintainer != "") {
details_list.insert_with_values (null, -1,
0, "<b>%s</b>".printf (dgettext (null, "Maintainer") + ":"),
1, details.maintainer);
previous_widget = populate_details_grid (dgettext (null, "Maintainer"), details.maintainer, previous_widget);
}
GLib.Time time = GLib.Time.local ((time_t) details.firstsubmitted);
details_list.insert_with_values (null, -1,
0, "<b>%s</b>".printf (dgettext (null, "First Submitted") + ":"),
1, time.format ("%a %d %b %Y %X %Z"));
previous_widget = populate_details_grid (dgettext (null, "First Submitted"), time.format ("%a %d %b %Y %X %Z"), previous_widget);
time = GLib.Time.local ((time_t) details.lastmodified);
details_list.insert_with_values (null, -1,
0, "<b>%s</b>".printf (dgettext (null, "Last Modified") + ":"),
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 ());
previous_widget = populate_details_grid (dgettext (null, "Last Modified"), time.format ("%a %d %b %Y %X %Z"), previous_widget);
previous_widget = populate_details_grid (dgettext (null, "Votes"), details.numvotes.to_string (), previous_widget);
if (details.outofdate != 0) {
time = GLib.Time.local ((time_t) details.outofdate);
details_list.insert_with_values (null, -1,
0, "<b>%s</b>".printf (dgettext (null, "Out of Date") + ":"),
1, time.format ("%a %d %b %Y %X %Z"));
previous_widget = populate_details_grid (dgettext (null, "Out of Date"), time.format ("%a %d %b %Y %X %Z"), previous_widget);
}
details_grid.show_all ();
// deps
deps_list.clear ();
var iter = Gtk.TreeIter ();
previous_widget = null;
if (details.depends.length > 0) {
foreach (unowned string name in details.depends) {
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") + ":"));
previous_widget = populate_dep_grid (dgettext (null, "Depends On"), details.depends, previous_widget);
}
if (details.makedepends.length > 0) {
foreach (unowned string name in details.makedepends) {
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") + ":"));
previous_widget = populate_dep_grid (dgettext (null, "Make Dependencies"), details.makedepends, previous_widget);
}
if (details.checkdepends.length > 0) {
foreach (unowned string name in details.checkdepends) {
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") + ":"));
previous_widget = populate_dep_grid (dgettext (null, "Check Dependencies"), details.checkdepends, previous_widget);
}
if (details.optdepends.length > 0) {
foreach (unowned string name in details.optdepends) {
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") + ":"));
previous_widget = populate_dep_grid (dgettext (null, "Optional Dependencies"), details.optdepends, previous_widget);
}
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) {
deps_list.insert_with_values (out iter, -1,
1, name);
var label2 = new Gtk.Label (name);
label2.halign = Gtk.Align.START;
label2.margin_start = 12;
box.pack_start (label2);
}
Gtk.TreePath path = deps_list.get_path (iter);
int pos = (path.get_indices ()[0]) - (details.provides.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, "Provides") + ":"));
deps_grid.attach_next_to (box, label, Gtk.PositionType.RIGHT);
previous_widget = label as Gtk.Widget;
}
if (details.replaces.length > 0) {
foreach (unowned string name in details.replaces) {
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") + ":"));
previous_widget = populate_dep_grid (dgettext (null, "Replaces"), details.replaces, previous_widget);
}
if (details.conflicts.length > 0) {
foreach (unowned string name in details.conflicts) {
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") + ":"));
previous_widget = populate_dep_grid (dgettext (null, "Conflicts With"), details.conflicts, previous_widget);
}
deps_grid.show_all ();
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) {
// populate liststore
packages_treeview.freeze_notify ();
@ -767,8 +852,8 @@ namespace Pamac {
}
void display_package_properties (string pkgname) {
current_package_displayed = pkgname;
set_package_details (pkgname);
current_package_displayed = pkgname;
set_package_details (current_package_displayed);
}
void display_aur_properties (string pkgname) {
@ -789,17 +874,11 @@ namespace Pamac {
}
}
[GtkCallback]
void on_deps_treeview_row_activated (Gtk.TreeView treeview, Gtk.TreePath path, Gtk.TreeViewColumn column) {
if (column.title == "deps") {
void on_dep_button_clicked (Gtk.Button button) {
if (display_package_queue.find_custom (current_package_displayed, strcmp) == null) {
display_package_queue.push_tail (current_package_displayed);
}
var treemodel = treeview.get_model ();
Gtk.TreeIter iter;
treemodel.get_iter (out iter, path);
string depstring;
treemodel.get (iter, 1, out depstring);
string depstring = button.label;
// if depstring contains a version restriction search a satisfier directly
if (">" in depstring || "=" in depstring || "<" in depstring) {
var pkg = transaction.find_installed_satisfier (depstring);
@ -841,7 +920,6 @@ namespace Pamac {
});
}
}
}
}
void on_packages_state_icon_activated (Gtk.TreePath path) {
@ -946,14 +1024,15 @@ namespace Pamac {
set_pendings_operations ();
}
void on_reinstall_item_activate () {
foreach (unowned string pkgname in selected_pkgs) {
transaction.to_remove.remove (pkgname);
if (transaction.get_pkg_origin (pkgname) == 2) { //Alpm.Package.From.LOCALDB
transaction.to_install.add (pkgname);
}
void on_details_item_activate () {
// show details for the first selected package
if (selected_pkgs.length () == 1) {
display_package_properties (selected_pkgs.data);
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 () {
@ -981,53 +1060,6 @@ namespace Pamac {
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 () {
// do nothing if it we want to see pendings AUR operations
switch (filters_stack.visible_child_name) {
@ -1086,9 +1118,6 @@ namespace Pamac {
deselect_item.sensitive = false;
install_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) {
Gtk.TreePath path = selected_paths.data;
Gtk.TreeIter iter;
@ -1098,30 +1127,17 @@ namespace Pamac {
string pkgversion;
packages_list.get (iter, 0, out origin, 1, out pkgname, 3, out pkgversion);
selected_pkgs.append (pkgname);
details_item.sensitive = true;
if (transaction.to_install.contains (pkgname)
|| transaction.to_remove.contains (pkgname)) {
deselect_item.sensitive = true;
} else if (origin == 2) { //Alpm.Package.From.LOCALDB
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
install_item.sensitive = true;
}
} else {
details_item.sensitive = false;
foreach (unowned Gtk.TreePath path in selected_paths) {
Gtk.TreeIter iter;
packages_list.get_iter (out iter, path);
@ -1168,9 +1184,11 @@ namespace Pamac {
deselect_item.sensitive = false;
install_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) {
details_item.sensitive = true;
} else {
details_item.sensitive = false;
}
foreach (unowned Gtk.TreePath path in selected_paths) {
Gtk.TreeIter iter;
aur_list.get_iter (out iter, path);
@ -1493,6 +1511,10 @@ namespace Pamac {
if (transaction_running) {
transaction.show_progress ();
} 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;
// show "Pending" in states_list
// "Pending" is at indice 3
@ -1501,7 +1523,7 @@ namespace Pamac {
selection.changed.disconnect (on_states_treeview_selection_changed);
selection.select_iter (iter);
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 ();
set_pendings_operations ();
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) {
refresh_packages_list ();
if (main_stack.visible_child_name == "details") {
display_package_properties (current_package_displayed);
}
transaction.to_load.remove_all ();
if (refreshing) {
if (success) {

View File

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

View File

@ -17,7 +17,7 @@
* 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 {
[DBus (name = "org.manjaro.pamac")]