From eb9ace7b82abb0422382b8757f85e216a0ecc274 Mon Sep 17 00:00:00 2001 From: guinux Date: Wed, 4 Mar 2015 15:55:36 +0100 Subject: [PATCH] prepare v2.2 --- po/ar.po | 20 +- po/ast.po | 29 +- po/bg.po | 29 +- po/bn.po | 17 +- po/bs.po | 20 +- po/bs_BA.po | 20 +- po/ca.po | 21 +- po/ca_ES.po | 17 +- po/cs.po | 21 +- po/da.po | 29 +- po/de.po | 29 +- po/el.po | 17 +- po/en_GB.po | 29 +- po/eo.po | 17 +- po/es.po | 29 +- po/et.po | 17 +- po/eu.po | 17 +- po/fa.po | 17 +- po/fa_IR.po | 17 +- po/fi.po | 17 +- po/fo.po | 17 +- po/fr.po | 29 +- po/he.po | 28 +- po/hi.po | 17 +- po/hr.po | 20 +- po/hu.po | 29 +- po/id.po | 25 +- po/is.po | 17 +- po/it.po | 29 +- po/ja.po | 25 +- po/ka.po | 17 +- po/ko.po | 17 +- po/lt.po | 36 +- po/ml.po | 17 +- po/ms.po | 17 +- po/nb.po | 29 +- po/nl.po | 29 +- po/nl_BE.po | 17 +- po/pamac.pot | 12 +- po/pl.po | 36 +- po/pot_head | 4 +- po/pt_BR.po | 29 +- po/pt_PT.po | 17 +- po/ro.po | 36 +- po/ru.po | 36 +- po/si.po | 17 +- po/sk.po | 33 +- po/sl.po | 40 +- po/sr.po | 36 +- po/sr@latin.po | 20 +- po/sr_RS.po | 20 +- po/sr_RS@latin.po | 20 +- po/sv.po | 29 +- po/tr.po | 29 +- po/uk.po | 20 +- po/ur_PK.po | 17 +- po/uz.po | 17 +- po/vi.po | 17 +- po/zh.po | 17 +- po/zh_CN.po | 17 +- po/zh_TW.po | 21 +- resources/manager_window.ui | 3 +- src/Makefile | 85 ++- src/alpm_config.vala | 129 +++-- src/alpm_utils.vala | 75 +++ src/aur.vala | 29 +- src/choose_dep_dialog.vala | 2 +- src/choose_provider_dialog.vala | 2 +- src/common.vala | 168 +----- src/daemon.vala | 875 +++++++++++++++++++++++-------- src/history_dialog.vala | 2 +- src/installer.vala | 6 +- src/manager.vala | 15 +- src/manager_window.vala | 835 ++++++++++++++--------------- src/mirrors_config.vala | 42 +- src/package.vala | 63 ++- src/packages_chooser_dialog.vala | 5 +- src/packages_model.vala | 134 ++--- src/pamac_config.vala | 54 +- src/preferences_dialog.vala | 2 +- src/progress_dialog.vala | 8 +- src/refresh.vala | 2 +- src/transaction.vala | 679 ++++++++++++++++-------- src/transaction_info_dialog.vala | 2 +- src/transaction_sum_dialog.vala | 2 +- src/tray.vala | 60 +-- src/updater.vala | 15 +- src/updater_window.vala | 54 +- vapi/libalpm.vapi | 2 +- 89 files changed, 3038 insertions(+), 1696 deletions(-) create mode 100644 src/alpm_utils.vala diff --git a/po/ar.po b/po/ar.po index b6793a3..bd43f58 100644 --- a/po/ar.po +++ b/po/ar.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Karim Oulad Chalha , 2013-2014 # philm , 2015 @@ -10,15 +10,17 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 17:20+0000\n" "Last-Translator: philm \n" -"Language-Team: Arabic (http://www.transifex.com/projects/p/manjaro-pamac/language/ar/)\n" +"Language-Team: Arabic (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/ar/)\n" +"Language: ar\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: ar\n" -"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" +"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " +"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" #: data/polkit/org.manjaro.pamac.policy msgid "Authentication is required" @@ -223,6 +225,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/ast.po b/po/ast.po index ff7a9f6..53d4e2b 100644 --- a/po/ast.po +++ b/po/ast.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Ḷḷumex03 , 2013-2014 # Ḷḷumex03 , 2014 @@ -13,14 +13,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 17:32+0000\n" "Last-Translator: philm \n" -"Language-Team: Asturian (http://www.transifex.com/projects/p/manjaro-pamac/language/ast/)\n" +"Language-Team: Asturian (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/ast/)\n" +"Language: ast\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: ast\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -172,7 +173,9 @@ msgstr "Permitir que Pacman guete ya instale paquetes dende AUR" msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "Al desaniciar un paquete tamién se desanicien les sos dependencies que dengún paquete rique" +msgstr "" +"Al desaniciar un paquete tamién se desanicien les sos dependencies que " +"dengún paquete rique" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -226,6 +229,14 @@ msgstr "Fallu al aniciar la llibrería alpm" msgid "Failed to synchronize any databases" msgstr "Fallu al sincronizar les bases de datos" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "Fallu al aniciar la transaición" @@ -625,8 +636,12 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "%s tien %u dependencia opcional desinstalada.\nEscueyi si te prestaría instalala:" -msgstr[1] "%s tien %u dependencies opcionales desinstalaes.\nEscueyi si te prestaría instalales:" +msgstr[0] "" +"%s tien %u dependencia opcional desinstalada.\n" +"Escueyi si te prestaría instalala:" +msgstr[1] "" +"%s tien %u dependencies opcionales desinstalaes.\n" +"Escueyi si te prestaría instalales:" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/po/bg.po b/po/bg.po index 78f9c15..e4c0608 100644 --- a/po/bg.po +++ b/po/bg.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Galin Iskrenov , 2013-2015 # Georgi Georgiev , 2014 @@ -15,14 +15,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 06:55+0000\n" "Last-Translator: Galin Iskrenov \n" -"Language-Team: Bulgarian (http://www.transifex.com/projects/p/manjaro-pamac/language/bg/)\n" +"Language-Team: Bulgarian (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/bg/)\n" +"Language: bg\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -174,7 +175,9 @@ msgstr "Позволи на Pamac да търси и инсталира паке msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "Премахвайки пакет, премахвате и зависимости, които не са необходими на други пакети" +msgstr "" +"Премахвайки пакет, премахвате и зависимости, които не са необходими на други " +"пакети" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -228,6 +231,14 @@ msgstr "Не се инициализира alpm library" msgid "Failed to synchronize any databases" msgstr "Неуспешна синхронизация на бази" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "Транзакцията неуспешна" @@ -627,8 +638,12 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "%s има %u неинсталирана допълнителна зависимост.\nИзберете дали да се инсталира:" -msgstr[1] "%s има %u неинсталирани допълнителни зависимости.\nИзберете кои да се инсталират:" +msgstr[0] "" +"%s има %u неинсталирана допълнителна зависимост.\n" +"Изберете дали да се инсталира:" +msgstr[1] "" +"%s има %u неинсталирани допълнителни зависимости.\n" +"Изберете кои да се инсталират:" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/po/bn.po b/po/bn.po index 9b667a4..5d20289 100644 --- a/po/bn.po +++ b/po/bn.po @@ -2,20 +2,21 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-06 09:22+0000\n" "Last-Translator: philm \n" -"Language-Team: Bengali (http://www.transifex.com/projects/p/manjaro-pamac/language/bn/)\n" +"Language-Team: Bengali (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/bn/)\n" +"Language: bn\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: bn\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -221,6 +222,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/bs.po b/po/bs.po index 318d0dd..4b9f0ee 100644 --- a/po/bs.po +++ b/po/bs.po @@ -2,21 +2,23 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2013-04-16 23:37+0000\n" "Last-Translator: FULL NAME \n" -"Language-Team: Bosnian (http://www.transifex.com/projects/p/manjaro-pamac/language/bs/)\n" +"Language-Team: Bosnian (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/bs/)\n" +"Language: bs\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: bs\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: data/polkit/org.manjaro.pamac.policy msgid "Authentication is required" @@ -221,6 +223,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/bs_BA.po b/po/bs_BA.po index 6095aa1..7d8811c 100644 --- a/po/bs_BA.po +++ b/po/bs_BA.po @@ -2,21 +2,23 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2013-04-16 23:37+0000\n" "Last-Translator: FULL NAME \n" -"Language-Team: Bosnian (Bosnia and Herzegovina) (http://www.transifex.com/projects/p/manjaro-pamac/language/bs_BA/)\n" +"Language-Team: Bosnian (Bosnia and Herzegovina) (http://www.transifex.com/" +"projects/p/manjaro-pamac/language/bs_BA/)\n" +"Language: bs_BA\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: bs_BA\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: data/polkit/org.manjaro.pamac.policy msgid "Authentication is required" @@ -221,6 +223,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/ca.po b/po/ca.po index f67681a..d9a67ca 100644 --- a/po/ca.po +++ b/po/ca.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Guillaume Benoit , 2013 # Ramon Buldó , 2013 @@ -14,14 +14,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 17:33+0000\n" "Last-Translator: philm \n" -"Language-Team: Catalan (http://www.transifex.com/projects/p/manjaro-pamac/language/ca/)\n" +"Language-Team: Catalan (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/ca/)\n" +"Language: ca\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: ca\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -173,7 +174,9 @@ msgstr "Permetre a Pamac buscar e instal·lar paquets des d'AUR" msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "En eliminar un paquet, elimina també les seves dependències que no siguin requerides per altres paquets" +msgstr "" +"En eliminar un paquet, elimina també les seves dependències que no siguin " +"requerides per altres paquets" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -227,6 +230,14 @@ msgstr "Ha fallat la inicialització de la llibreria alpm" msgid "Failed to synchronize any databases" msgstr "Ha fallat la sincronització de les bases de dades" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "Ha fallat la inicialització de la transacció" diff --git a/po/ca_ES.po b/po/ca_ES.po index 23168be..d1efb2a 100644 --- a/po/ca_ES.po +++ b/po/ca_ES.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Davidmp , 2014 # Davidmp , 2014 @@ -11,14 +11,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 17:21+0000\n" "Last-Translator: philm \n" -"Language-Team: Catalan (Spain) (http://www.transifex.com/projects/p/manjaro-pamac/language/ca_ES/)\n" +"Language-Team: Catalan (Spain) (http://www.transifex.com/projects/p/manjaro-" +"pamac/language/ca_ES/)\n" +"Language: ca_ES\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: ca_ES\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -224,6 +225,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/cs.po b/po/cs.po index fb61112..b75f399 100644 --- a/po/cs.po +++ b/po/cs.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # halfark , 2014 # Libor Schejbal , 2013 @@ -13,14 +13,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 17:33+0000\n" "Last-Translator: philm \n" -"Language-Team: Czech (http://www.transifex.com/projects/p/manjaro-pamac/language/cs/)\n" +"Language-Team: Czech (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/cs/)\n" +"Language: cs\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: cs\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" #: data/polkit/org.manjaro.pamac.policy @@ -172,7 +173,9 @@ msgstr "Povolit aplikaci Pamac vyhledávat a instalovat balíčky z AUR" msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "Při odebírání balíčku také odebrat jeho závislosti, které nejsou vyžadovány jinými balíčky" +msgstr "" +"Při odebírání balíčku také odebrat jeho závislosti, které nejsou vyžadovány " +"jinými balíčky" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -226,6 +229,14 @@ msgstr "Selhalo načtení knihovny alpm" msgid "Failed to synchronize any databases" msgstr "Selhala synchronizace databází" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "Selhalo spuštění transakce" diff --git a/po/da.po b/po/da.po index 7e6508f..8eb961b 100644 --- a/po/da.po +++ b/po/da.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Andreas Martin Mørch , 2013 # GigoloJoe , 2014 @@ -17,14 +17,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-19 14:31+0000\n" "Last-Translator: Dan Johansen\n" -"Language-Team: Danish (http://www.transifex.com/projects/p/manjaro-pamac/language/da/)\n" +"Language-Team: Danish (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/da/)\n" +"Language: da\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: da\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -176,7 +177,9 @@ msgstr "Gør det muligt for Pamac at søge i og installere pakker fra AUR" msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "Ved fjernelse af pakke, fjern også afhængigheder der ikke bliver brugt af andre pakker" +msgstr "" +"Ved fjernelse af pakke, fjern også afhængigheder der ikke bliver brugt af " +"andre pakker" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -230,6 +233,14 @@ msgstr "Fejl ved initialisering af alpm bibliotek" msgid "Failed to synchronize any databases" msgstr "Fejl ved synkronisering af databaser" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "Fejl i start af overførsel" @@ -629,8 +640,12 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "%s har %u ikke installeret valgfri afhængighed.\nVælg hvis du vil installere den:" -msgstr[1] "%s har %u som ikke installeret valgfrie afhængigheder.\nVælg dem du vil installere:" +msgstr[0] "" +"%s har %u ikke installeret valgfri afhængighed.\n" +"Vælg hvis du vil installere den:" +msgstr[1] "" +"%s har %u som ikke installeret valgfrie afhængigheder.\n" +"Vælg dem du vil installere:" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/po/de.po b/po/de.po index a496867..48fa384 100644 --- a/po/de.po +++ b/po/de.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Guillaume Benoit , 2013 # Tobias B. , 2013 @@ -21,14 +21,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 17:17+0000\n" "Last-Translator: philm \n" -"Language-Team: German (http://www.transifex.com/projects/p/manjaro-pamac/language/de/)\n" +"Language-Team: German (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -180,7 +181,9 @@ msgstr "Erlaube Pamac nach Paketen im AUR zu suchen und zu installieren" msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "Wenn ein Paket entfernt wird, werden auch seine Abhängigkeiten entfernt, soweit sie nicht von einem anderen Paket benötigt werden" +msgstr "" +"Wenn ein Paket entfernt wird, werden auch seine Abhängigkeiten entfernt, " +"soweit sie nicht von einem anderen Paket benötigt werden" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -234,6 +237,14 @@ msgstr "Fehler beim Initialisieren der Alpm-Library" msgid "Failed to synchronize any databases" msgstr "Synchronisieren der Datenbanken fehlgeschlagen" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "Vorgang konnte nicht gestartet werden" @@ -633,8 +644,12 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "%s hat %u nicht installierte optionale Abhängigkeiten.\nBitte wählen Sie die zum Installieren entsprechend aus:" -msgstr[1] "%s hat %u nicht installierte optionale Abhängigkeiten.\nBitte wählen Sie die zu installierenden Abhängigkeiten aus:" +msgstr[0] "" +"%s hat %u nicht installierte optionale Abhängigkeiten.\n" +"Bitte wählen Sie die zum Installieren entsprechend aus:" +msgstr[1] "" +"%s hat %u nicht installierte optionale Abhängigkeiten.\n" +"Bitte wählen Sie die zu installierenden Abhängigkeiten aus:" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/po/el.po b/po/el.po index a0a6513..37d4e2c 100644 --- a/po/el.po +++ b/po/el.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # angel_solomos , 2013 # angel_solomos , 2013 @@ -16,14 +16,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 17:23+0000\n" "Last-Translator: philm \n" -"Language-Team: Greek (http://www.transifex.com/projects/p/manjaro-pamac/language/el/)\n" +"Language-Team: Greek (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/el/)\n" +"Language: el\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: el\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -229,6 +230,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/en_GB.po b/po/en_GB.po index ad853d7..564262e 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # J Fernyhough , 2013 # J Fernyhough , 2013 @@ -11,14 +11,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 17:16+0000\n" "Last-Translator: philm \n" -"Language-Team: English (United Kingdom) (http://www.transifex.com/projects/p/manjaro-pamac/language/en_GB/)\n" +"Language-Team: English (United Kingdom) (http://www.transifex.com/projects/p/" +"manjaro-pamac/language/en_GB/)\n" +"Language: en_GB\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: en_GB\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -170,7 +171,9 @@ msgstr "Allow Pamac to search and install packages from AUR" msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "When removing a package, also remove its dependencies that are not required by other packages" +msgstr "" +"When removing a package, also remove its dependencies that are not required " +"by other packages" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -224,6 +227,14 @@ msgstr "Failed to initialize alpm library" msgid "Failed to synchronize any databases" msgstr "Failed to synchronize any databases" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "Failed to init transaction" @@ -623,8 +634,12 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "%s has %u uninstalled optional dependency.\nChoose if you would like to install it:" -msgstr[1] "%s has %u uninstalled optional dependencies.\nChoose those you would like to install:" +msgstr[0] "" +"%s has %u uninstalled optional dependency.\n" +"Choose if you would like to install it:" +msgstr[1] "" +"%s has %u uninstalled optional dependencies.\n" +"Choose those you would like to install:" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/po/eo.po b/po/eo.po index cc13d21..71d854e 100644 --- a/po/eo.po +++ b/po/eo.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Anderson Tavares , 2013 # Anderson Tavares , 2013 @@ -10,14 +10,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-06 09:22+0000\n" "Last-Translator: philm \n" -"Language-Team: Esperanto (http://www.transifex.com/projects/p/manjaro-pamac/language/eo/)\n" +"Language-Team: Esperanto (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/eo/)\n" +"Language: eo\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -223,6 +224,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/es.po b/po/es.po index 9d24048..c0a6c35 100644 --- a/po/es.po +++ b/po/es.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # danpergal84 , 2013-2015 # Guillaume Benoit , 2013 @@ -13,14 +13,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 17:18+0000\n" "Last-Translator: philm \n" -"Language-Team: Spanish (http://www.transifex.com/projects/p/manjaro-pamac/language/es/)\n" +"Language-Team: Spanish (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/es/)\n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -172,7 +173,9 @@ msgstr "Permitir a Pamac buscar e instalar paquetes desde AUR" msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "Al eliminar un paquete, eliminar también las dependencias que no son requeridas por otros paquetes" +msgstr "" +"Al eliminar un paquete, eliminar también las dependencias que no son " +"requeridas por otros paquetes" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -226,6 +229,14 @@ msgstr "Fallo al iniciar una librería alpm" msgid "Failed to synchronize any databases" msgstr "Fallo al sincronizar bases de datos" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "Fallo al iniciar una operación" @@ -625,8 +636,12 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "%s tiene %u dependencia/s opcional/es no instalada/s.\nPor favor, elige cuál/es quieres instalar:" -msgstr[1] "%s tiene %u dependencia/s opcional/es no instalada/s.\nPor favor, elige cuál/es quieres instalar:" +msgstr[0] "" +"%s tiene %u dependencia/s opcional/es no instalada/s.\n" +"Por favor, elige cuál/es quieres instalar:" +msgstr[1] "" +"%s tiene %u dependencia/s opcional/es no instalada/s.\n" +"Por favor, elige cuál/es quieres instalar:" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/po/et.po b/po/et.po index 7b91b53..319bc9d 100644 --- a/po/et.po +++ b/po/et.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Kus Mis , 2013 # Kus Mis , 2013 @@ -10,14 +10,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-06 09:22+0000\n" "Last-Translator: philm \n" -"Language-Team: Estonian (http://www.transifex.com/projects/p/manjaro-pamac/language/et/)\n" +"Language-Team: Estonian (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/et/)\n" +"Language: et\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: et\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -223,6 +224,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/eu.po b/po/eu.po index 87cef72..4a11605 100644 --- a/po/eu.po +++ b/po/eu.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Sergio Moreno , 2014 # Sergio Moreno , 2014 @@ -10,14 +10,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-06 09:22+0000\n" "Last-Translator: philm \n" -"Language-Team: Basque (http://www.transifex.com/projects/p/manjaro-pamac/language/eu/)\n" +"Language-Team: Basque (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/eu/)\n" +"Language: eu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: eu\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -223,6 +224,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/fa.po b/po/fa.po index 0d73466..2561f7f 100644 --- a/po/fa.po +++ b/po/fa.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Reza Gharibi , 2013 # Hootan Baraary , 2013 @@ -12,14 +12,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-06 09:22+0000\n" "Last-Translator: philm \n" -"Language-Team: Persian (http://www.transifex.com/projects/p/manjaro-pamac/language/fa/)\n" +"Language-Team: Persian (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/fa/)\n" +"Language: fa\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: fa\n" "Plural-Forms: nplurals=1; plural=0;\n" #: data/polkit/org.manjaro.pamac.policy @@ -225,6 +226,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/fa_IR.po b/po/fa_IR.po index 7b096e8..e2b1c50 100644 --- a/po/fa_IR.po +++ b/po/fa_IR.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Reza Gharibi , 2013 # Hootan Baraary , 2013 @@ -16,14 +16,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-06 09:22+0000\n" "Last-Translator: philm \n" -"Language-Team: Persian (Iran) (http://www.transifex.com/projects/p/manjaro-pamac/language/fa_IR/)\n" +"Language-Team: Persian (Iran) (http://www.transifex.com/projects/p/manjaro-" +"pamac/language/fa_IR/)\n" +"Language: fa_IR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: fa_IR\n" "Plural-Forms: nplurals=1; plural=0;\n" #: data/polkit/org.manjaro.pamac.policy @@ -229,6 +230,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/fi.po b/po/fi.po index 9cc443e..ed28eca 100644 --- a/po/fi.po +++ b/po/fi.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Luki , 2013 # Luki , 2013 @@ -15,14 +15,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 17:24+0000\n" "Last-Translator: philm \n" -"Language-Team: Finnish (http://www.transifex.com/projects/p/manjaro-pamac/language/fi/)\n" +"Language-Team: Finnish (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/fi/)\n" +"Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: fi\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -228,6 +229,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/fo.po b/po/fo.po index 5ea6811..e027469 100644 --- a/po/fo.po +++ b/po/fo.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # klaemint, 2014 # klaemint, 2014 @@ -10,14 +10,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-06 09:22+0000\n" "Last-Translator: philm \n" -"Language-Team: Faroese (http://www.transifex.com/projects/p/manjaro-pamac/language/fo/)\n" +"Language-Team: Faroese (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/fo/)\n" +"Language: fo\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: fo\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -223,6 +224,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/fr.po b/po/fr.po index 8007cf2..df8384a 100644 --- a/po/fr.po +++ b/po/fr.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # DasFranck , 2013 # DasFranck , 2013 @@ -15,14 +15,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 17:17+0000\n" "Last-Translator: philm \n" -"Language-Team: French (http://www.transifex.com/projects/p/manjaro-pamac/language/fr/)\n" +"Language-Team: French (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/fr/)\n" +"Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -174,7 +175,9 @@ msgstr "Permettre à Pamac de chercher et installer des paquets depuis AUR" msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "En désinstallant un paquet, désinstaller également les dépendances qui ne sont pas requises par d'autres paquets" +msgstr "" +"En désinstallant un paquet, désinstaller également les dépendances qui ne " +"sont pas requises par d'autres paquets" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -228,6 +231,14 @@ msgstr "L'initialisation de la librairie alpm a échoué" msgid "Failed to synchronize any databases" msgstr "La synchronisation a échoué" +#: ../src/daemon.vala +msgid "No" +msgstr "Non" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "Oui" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "L'initialisation de la transaction a échoué" @@ -627,8 +638,12 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "%s a %u dépendance optionnelle non installée.\nChoisissez si vous voulez l'installer:" -msgstr[1] "%s a %u dépendances optionnelles non installées.\nChoisissez celles que vous voulez installer:" +msgstr[0] "" +"%s a %u dépendance optionnelle non installée.\n" +"Choisissez si vous voulez l'installer:" +msgstr[1] "" +"%s a %u dépendances optionnelles non installées.\n" +"Choisissez celles que vous voulez installer:" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/po/he.po b/po/he.po index 16836ca..fbab2bf 100644 --- a/po/he.po +++ b/po/he.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # DirectorX , 2014 # GenghisKhan , 2013-2015 @@ -12,14 +12,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 22:30+0000\n" "Last-Translator: GenghisKhan \n" -"Language-Team: Hebrew (http://www.transifex.com/projects/p/manjaro-pamac/language/he/)\n" +"Language-Team: Hebrew (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/he/)\n" +"Language: he\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: he\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -171,7 +172,8 @@ msgstr "אפשר לPamac לחפש ולהתקין חבילות מתוך AUR" msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "בעת הסרת חבילה, הסר גם את התלויות שלה אשר לא נחוצות על ידי חבילות אחרות" +msgstr "" +"בעת הסרת חבילה, הסר גם את התלויות שלה אשר לא נחוצות על ידי חבילות אחרות" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -225,6 +227,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "נכשל להתחיל טרנזקציה" @@ -624,8 +634,12 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "לחבילה %s יש תלות רשות %u לא מותקנת.\nבחר אותה אם ברצונך להתקינה:" -msgstr[1] "לחבילה %s יש %u תלויות רשות לא מותקנות.\nבחר את אלה אשר ברצונך להתקין:" +msgstr[0] "" +"לחבילה %s יש תלות רשות %u לא מותקנת.\n" +"בחר אותה אם ברצונך להתקינה:" +msgstr[1] "" +"לחבילה %s יש %u תלויות רשות לא מותקנות.\n" +"בחר את אלה אשר ברצונך להתקין:" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/po/hi.po b/po/hi.po index e38cb11..ada2ec8 100644 --- a/po/hi.po +++ b/po/hi.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # sivananda , 2014 # philm , 2015 @@ -11,14 +11,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 17:24+0000\n" "Last-Translator: philm \n" -"Language-Team: Hindi (http://www.transifex.com/projects/p/manjaro-pamac/language/hi/)\n" +"Language-Team: Hindi (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/hi/)\n" +"Language: hi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: hi\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -224,6 +225,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/hr.po b/po/hr.po index 1fc2514..a3ac7b8 100644 --- a/po/hr.po +++ b/po/hr.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # philm , 2015 # ssik64 , 2014 @@ -11,15 +11,17 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 17:25+0000\n" "Last-Translator: philm \n" -"Language-Team: Croatian (http://www.transifex.com/projects/p/manjaro-pamac/language/hr/)\n" +"Language-Team: Croatian (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/hr/)\n" +"Language: hr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: hr\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" #: data/polkit/org.manjaro.pamac.policy msgid "Authentication is required" @@ -224,6 +226,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/hu.po b/po/hu.po index f41870c..c324417 100644 --- a/po/hu.po +++ b/po/hu.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Lajos Pasztor , 2013 # Lajos Pasztor , 2013-2014 @@ -12,14 +12,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 17:25+0000\n" "Last-Translator: philm \n" -"Language-Team: Hungarian (http://www.transifex.com/projects/p/manjaro-pamac/language/hu/)\n" +"Language-Team: Hungarian (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/hu/)\n" +"Language: hu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: hu\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -171,7 +172,9 @@ msgstr "Pamac kereshet és telepíthet csomagokat az AUR -ból" msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "Csomag eltávolításakor távolítsa el a függőségeket amik nem megköveteltek más csomagok által" +msgstr "" +"Csomag eltávolításakor távolítsa el a függőségeket amik nem megköveteltek " +"más csomagok által" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -225,6 +228,14 @@ msgstr "Nem sikerült inicializálni az alpm könyvtárat" msgid "Failed to synchronize any databases" msgstr "Nem sikerült egyetlen adatbázist sem szinkronizálni" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "Művelet megkezdése sikertelen" @@ -624,8 +635,12 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "%s tartalmaz %u eltávolított opcionális függőséget.\nVálaszd ki azokat amiket telepíteni szeretnél:" -msgstr[1] "%s tartalmaz %u eltávolított opcionális függőséget.\nVálaszd ki azokat amiket telepíteni szeretnél:" +msgstr[0] "" +"%s tartalmaz %u eltávolított opcionális függőséget.\n" +"Válaszd ki azokat amiket telepíteni szeretnél:" +msgstr[1] "" +"%s tartalmaz %u eltávolított opcionális függőséget.\n" +"Válaszd ki azokat amiket telepíteni szeretnél:" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/po/id.po b/po/id.po index 0ef762d..60725fc 100644 --- a/po/id.po +++ b/po/id.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Budiman Jojo , 2014 # Guillaume Benoit , 2013 @@ -19,14 +19,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 17:38+0000\n" "Last-Translator: philm \n" -"Language-Team: Indonesian (http://www.transifex.com/projects/p/manjaro-pamac/language/id/)\n" +"Language-Team: Indonesian (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/id/)\n" +"Language: id\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: id\n" "Plural-Forms: nplurals=1; plural=0;\n" #: data/polkit/org.manjaro.pamac.policy @@ -178,7 +179,9 @@ msgstr "Biarkan Pamac untuk mencari dan menginstal paket dari AUR" msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "Ketika menghapus paket, hapus juga dependensi paket tersebut yang tidak dibuthkan paket lainnya" +msgstr "" +"Ketika menghapus paket, hapus juga dependensi paket tersebut yang tidak " +"dibuthkan paket lainnya" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -232,6 +235,14 @@ msgstr "Gagal menginisialisasi library alpm" msgid "Failed to synchronize any databases" msgstr "Gagal mengsinkronisasikan database apapun" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "Gagal inisialisasi transaksi" @@ -630,7 +641,9 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "%s memiliki %u dependensi opsional tidak terpasang.\nPilih yang ingin kamu pasang:" +msgstr[0] "" +"%s memiliki %u dependensi opsional tidak terpasang.\n" +"Pilih yang ingin kamu pasang:" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/po/is.po b/po/is.po index 4b3b5cf..aa736e0 100644 --- a/po/is.po +++ b/po/is.po @@ -2,20 +2,21 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-06 09:22+0000\n" "Last-Translator: philm \n" -"Language-Team: Icelandic (http://www.transifex.com/projects/p/manjaro-pamac/language/is/)\n" +"Language-Team: Icelandic (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/is/)\n" +"Language: is\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: is\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -221,6 +222,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/it.po b/po/it.po index 68b8d19..93b3597 100644 --- a/po/it.po +++ b/po/it.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Bernardo Miguel Savone , 2013-2014 # Guillaume Benoit , 2013 @@ -14,14 +14,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-27 13:45+0000\n" "Last-Translator: Massimo\n" -"Language-Team: Italian (http://www.transifex.com/projects/p/manjaro-pamac/language/it/)\n" +"Language-Team: Italian (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/it/)\n" +"Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: it\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -173,7 +174,9 @@ msgstr "Permette a Pamac cercare e installare pacchetti dal AUR" msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "Quando si rimuove un pacchetto, rimuovere anche le dipendenze che non sono richieste da altri pacchetti" +msgstr "" +"Quando si rimuove un pacchetto, rimuovere anche le dipendenze che non sono " +"richieste da altri pacchetti" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -227,6 +230,14 @@ msgstr "Inizializzazione della libreria alpm non riuscita" msgid "Failed to synchronize any databases" msgstr "Sincronizzazione non riuscita su nessun database" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "Inizializzazione del trasferimento non riuscita." @@ -626,8 +637,12 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "%s ha %u dipendenze opzionali non installate.\nScegliere se si desidera installarlo." -msgstr[1] "%s ha %u dipendenze opzionali non installate. \nSceglire quelle che si desidera installare" +msgstr[0] "" +"%s ha %u dipendenze opzionali non installate.\n" +"Scegliere se si desidera installarlo." +msgstr[1] "" +"%s ha %u dipendenze opzionali non installate. \n" +"Sceglire quelle che si desidera installare" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/po/ja.po b/po/ja.po index e526961..0787e42 100644 --- a/po/ja.po +++ b/po/ja.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # philm , 2015 # Takefumi Nagata, 2013-2015 @@ -10,14 +10,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-09 21:40+0000\n" "Last-Translator: Takefumi Nagata\n" -"Language-Team: Japanese (http://www.transifex.com/projects/p/manjaro-pamac/language/ja/)\n" +"Language-Team: Japanese (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/ja/)\n" +"Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: ja\n" "Plural-Forms: nplurals=1; plural=0;\n" #: data/polkit/org.manjaro.pamac.policy @@ -169,7 +170,9 @@ msgstr "PamacがAURパッケージを探索し、インストールすること msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "パッケージを削除する際、他のパッケージでは必要とされていない依存パッケージも削除" +msgstr "" +"パッケージを削除する際、他のパッケージでは必要とされていない依存パッケージも" +"削除" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -223,6 +226,14 @@ msgstr "Alpmライブラリの初期化に失敗しました" msgid "Failed to synchronize any databases" msgstr "すべてのデータベースの同期に失敗しました" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "初期処理に失敗しました" @@ -621,7 +632,9 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "%s は未インストールの %uにオプショナルに依存します。\nインストールするパッケージを選択してください:" +msgstr[0] "" +"%s は未インストールの %uにオプショナルに依存します。\n" +"インストールするパッケージを選択してください:" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/po/ka.po b/po/ka.po index 952c336..9b9f1fd 100644 --- a/po/ka.po +++ b/po/ka.po @@ -2,20 +2,21 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-06 09:22+0000\n" "Last-Translator: philm \n" -"Language-Team: Georgian (http://www.transifex.com/projects/p/manjaro-pamac/language/ka/)\n" +"Language-Team: Georgian (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/ka/)\n" +"Language: ka\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: ka\n" "Plural-Forms: nplurals=1; plural=0;\n" #: data/polkit/org.manjaro.pamac.policy @@ -221,6 +222,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/ko.po b/po/ko.po index 9b7a40b..8eec267 100644 --- a/po/ko.po +++ b/po/ko.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # lego37yoon , 2013 # lego37yoon , 2013 @@ -10,14 +10,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-06 09:22+0000\n" "Last-Translator: philm \n" -"Language-Team: Korean (http://www.transifex.com/projects/p/manjaro-pamac/language/ko/)\n" +"Language-Team: Korean (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/ko/)\n" +"Language: ko\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: ko\n" "Plural-Forms: nplurals=1; plural=0;\n" #: data/polkit/org.manjaro.pamac.policy @@ -223,6 +224,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/lt.po b/po/lt.po index 2fecabe..05797f0 100644 --- a/po/lt.po +++ b/po/lt.po @@ -2,22 +2,24 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Moo, 2015 msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-19 21:47+0000\n" "Last-Translator: Moo\n" -"Language-Team: Lithuanian (http://www.transifex.com/projects/p/manjaro-pamac/language/lt/)\n" +"Language-Team: Lithuanian (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/lt/)\n" +"Language: lt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: lt\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n" +"%100<10 || n%100>=20) ? 1 : 2);\n" #: data/polkit/org.manjaro.pamac.policy msgid "Authentication is required" @@ -168,7 +170,9 @@ msgstr "Leisti Pamac ieškoti ir diegti paketus iš AUR" msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "Šalinant paketą, tuo pačiu šalinti ir jo priklausomybes, kurios nėra reikalaujamos kitų paketų" +msgstr "" +"Šalinant paketą, tuo pačiu šalinti ir jo priklausomybes, kurios nėra " +"reikalaujamos kitų paketų" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -222,6 +226,14 @@ msgstr "Nepavyko inicijuoti alpm bibliotekos" msgid "Failed to synchronize any databases" msgstr "Nepavyko sinchronizuoti jokių duomenų bazių" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "Nepavyko inicijuoti operacijos" @@ -622,9 +634,15 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "%s turi %u neįdiegtą pasirinktinę priklausomybę.\nPasirinkite ar jūs norėtumėte ją įdiegti:" -msgstr[1] "%s turi %u neįdiegtas pasirinktines priklausomybes.\nPasirinkite tas, kurias norėtumėte įdiegti:" -msgstr[2] "%s turi %u neįdiegtų pasirinktinų priklausomybių.\nPasirinkite tas, kurias norėtumėte įdiegti:" +msgstr[0] "" +"%s turi %u neįdiegtą pasirinktinę priklausomybę.\n" +"Pasirinkite ar jūs norėtumėte ją įdiegti:" +msgstr[1] "" +"%s turi %u neįdiegtas pasirinktines priklausomybes.\n" +"Pasirinkite tas, kurias norėtumėte įdiegti:" +msgstr[2] "" +"%s turi %u neįdiegtų pasirinktinų priklausomybių.\n" +"Pasirinkite tas, kurias norėtumėte įdiegti:" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/po/ml.po b/po/ml.po index d591d36..19ca6a8 100644 --- a/po/ml.po +++ b/po/ml.po @@ -2,20 +2,21 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-06 09:22+0000\n" "Last-Translator: philm \n" -"Language-Team: Malayalam (http://www.transifex.com/projects/p/manjaro-pamac/language/ml/)\n" +"Language-Team: Malayalam (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/ml/)\n" +"Language: ml\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: ml\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -221,6 +222,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/ms.po b/po/ms.po index cc1436c..f32ff7c 100644 --- a/po/ms.po +++ b/po/ms.po @@ -2,21 +2,22 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Puretech , 2013 msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-06 09:22+0000\n" "Last-Translator: philm \n" -"Language-Team: Malay (http://www.transifex.com/projects/p/manjaro-pamac/language/ms/)\n" +"Language-Team: Malay (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/ms/)\n" +"Language: ms\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: ms\n" "Plural-Forms: nplurals=1; plural=0;\n" #: data/polkit/org.manjaro.pamac.policy @@ -222,6 +223,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/nb.po b/po/nb.po index b962b56..fe95df9 100644 --- a/po/nb.po +++ b/po/nb.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Morten Rene , 2014 # Bård Spein , 2013 @@ -18,14 +18,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 17:38+0000\n" "Last-Translator: philm \n" -"Language-Team: Norwegian Bokmål (http://www.transifex.com/projects/p/manjaro-pamac/language/nb/)\n" +"Language-Team: Norwegian Bokmål (http://www.transifex.com/projects/p/manjaro-" +"pamac/language/nb/)\n" +"Language: nb\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: nb\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -177,7 +178,9 @@ msgstr "Tillat Pamac å søke og installere pakker fra AUR" msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "Når du fjerner en pakke, fjern også dets avhengigheter som ikke kreves av andre pakker" +msgstr "" +"Når du fjerner en pakke, fjern også dets avhengigheter som ikke kreves av " +"andre pakker" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -231,6 +234,14 @@ msgstr "Kunne ikke initialisere alpm bibliotek" msgid "Failed to synchronize any databases" msgstr "Klarte ikke å synkronisere alle databaser" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "Kunne ikke init transaksjon" @@ -630,8 +641,12 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "%s har %u avinstallert valgfrie avhengigheter.\nVelg om du ønsker å installere det:" -msgstr[1] "%s har %u avinstallert valgfrie avhengigheter.\nVelg de du ønsker å installere:" +msgstr[0] "" +"%s har %u avinstallert valgfrie avhengigheter.\n" +"Velg om du ønsker å installere det:" +msgstr[1] "" +"%s har %u avinstallert valgfrie avhengigheter.\n" +"Velg de du ønsker å installere:" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/po/nl.po b/po/nl.po index 7d06c45..60ba8d6 100644 --- a/po/nl.po +++ b/po/nl.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Douwe Bootsma , 2013 # Douwe Bootsma , 2013-2014 @@ -18,14 +18,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 17:31+0000\n" "Last-Translator: philm \n" -"Language-Team: Dutch (http://www.transifex.com/projects/p/manjaro-pamac/language/nl/)\n" +"Language-Team: Dutch (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/nl/)\n" +"Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: nl\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -177,7 +178,9 @@ msgstr "Pamac toestaan om AUR pakketten te zoeken en te installeren" msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "Bij het verwijderen van een pakket ook afhankelijkheden verwijderen die niet meer gebruikt worden door andere pakketten" +msgstr "" +"Bij het verwijderen van een pakket ook afhankelijkheden verwijderen die niet " +"meer gebruikt worden door andere pakketten" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -231,6 +234,14 @@ msgstr "Initialiseren alpm bibliotheek mislukt" msgid "Failed to synchronize any databases" msgstr "Synchroniseren van alle databases mislukt" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "Initialiseren transactie mislukt" @@ -630,8 +641,12 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "%s heeft %u niet geïnstalleerde optionele afhankelijkheden.\nSelecteer welke u wilt installeren:" -msgstr[1] "%s heeft %u niet geïnstalleerde optionele afhankelijkheden.\nSelecteer welke u wilt installeren:" +msgstr[0] "" +"%s heeft %u niet geïnstalleerde optionele afhankelijkheden.\n" +"Selecteer welke u wilt installeren:" +msgstr[1] "" +"%s heeft %u niet geïnstalleerde optionele afhankelijkheden.\n" +"Selecteer welke u wilt installeren:" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/po/nl_BE.po b/po/nl_BE.po index b76b287..9eb64cd 100644 --- a/po/nl_BE.po +++ b/po/nl_BE.po @@ -2,20 +2,21 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-06 09:22+0000\n" "Last-Translator: philm \n" -"Language-Team: Dutch (Belgium) (http://www.transifex.com/projects/p/manjaro-pamac/language/nl_BE/)\n" +"Language-Team: Dutch (Belgium) (http://www.transifex.com/projects/p/manjaro-" +"pamac/language/nl_BE/)\n" +"Language: nl_BE\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: nl_BE\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -221,6 +222,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/pamac.pot b/po/pamac.pot index b64bcba..4532da3 100644 --- a/po/pamac.pot +++ b/po/pamac.pot @@ -5,9 +5,9 @@ # msgid "" msgstr "" -"Project-Id-Version: Pamac 2.1\n" +"Project-Id-Version: Pamac 2.2\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -220,6 +220,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/pl.po b/po/pl.po index 1d7575f..e6cb572 100644 --- a/po/pl.po +++ b/po/pl.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # FadeMind , 2013 # Guillaume Benoit , 2013 @@ -13,15 +13,17 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-06 11:59+0000\n" "Last-Translator: Piotr Strębski \n" -"Language-Team: Polish (http://www.transifex.com/projects/p/manjaro-pamac/language/pl/)\n" +"Language-Team: Polish (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/pl/)\n" +"Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: pl\n" -"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" #: data/polkit/org.manjaro.pamac.policy msgid "Authentication is required" @@ -172,7 +174,9 @@ msgstr "Pozwól Pamacowi wyszukiwać i instalować pakiety z AUR" msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "Podczas usuwania pakietu usuwać także te zależności, które nie są już wymagane przez inne pakiety" +msgstr "" +"Podczas usuwania pakietu usuwać także te zależności, które nie są już " +"wymagane przez inne pakiety" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -226,6 +230,14 @@ msgstr "Błąd uruchomienia biblioteki alpm" msgid "Failed to synchronize any databases" msgstr "Błąd synchronizacji wszystkich baz danych" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "Błąd uruchomienia operacji" @@ -626,9 +638,15 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "%s ma %u niezainstalowaną opcjonalną zależność.\nWybierz ją, jeśli chcesz zainstalować:" -msgstr[1] "%s ma %u niezainstalowane opcjonalne zależności.\nWybierz je, jeśli chcesz zainstalować:" -msgstr[2] "%s ma %u niezainstalowanych opcjonalnych zależności.\nWybierz te pakiety, które chcesz zainstalować:" +msgstr[0] "" +"%s ma %u niezainstalowaną opcjonalną zależność.\n" +"Wybierz ją, jeśli chcesz zainstalować:" +msgstr[1] "" +"%s ma %u niezainstalowane opcjonalne zależności.\n" +"Wybierz je, jeśli chcesz zainstalować:" +msgstr[2] "" +"%s ma %u niezainstalowanych opcjonalnych zależności.\n" +"Wybierz te pakiety, które chcesz zainstalować:" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/po/pot_head b/po/pot_head index 7d2d839..a6a2444 100644 --- a/po/pot_head +++ b/po/pot_head @@ -5,9 +5,9 @@ # msgid "" msgstr "" -"Project-Id-Version: Pamac 2.1\n" +"Project-Id-Version: Pamac 2.2\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-05 20:36+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/pt_BR.po b/po/pt_BR.po index 670d0e3..c799dfb 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Aldo Oliveira , 2014-2015 # Arnt , 2014 @@ -22,14 +22,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-06 12:39+0000\n" "Last-Translator: Aldo Oliveira \n" -"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/manjaro-pamac/language/pt_BR/)\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/" +"manjaro-pamac/language/pt_BR/)\n" +"Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: pt_BR\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -181,7 +182,9 @@ msgstr "Permitir a Pamac que procure e instale os pacotes a partir de AUR" msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "Ao remover um pacote, também remover as dependências que não são exigidas por outros pacotes" +msgstr "" +"Ao remover um pacote, também remover as dependências que não são exigidas " +"por outros pacotes" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -235,6 +238,14 @@ msgstr "Falha ao inicializar biblioteca do Empacotador" msgid "Failed to synchronize any databases" msgstr "Falha ao sincronizar as bases de dados" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "Falha ao inicializar transação" @@ -634,8 +645,12 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "%s tem %u dependência opcional não instalada.\nEscolha se gostaria de instalá-la:" -msgstr[1] "%s tem %u dependências opcionais não instaladas.\nEscolha aquelas que gostaria de instalar:" +msgstr[0] "" +"%s tem %u dependência opcional não instalada.\n" +"Escolha se gostaria de instalá-la:" +msgstr[1] "" +"%s tem %u dependências opcionais não instaladas.\n" +"Escolha aquelas que gostaria de instalar:" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/po/pt_PT.po b/po/pt_PT.po index ed25ffc..65def24 100644 --- a/po/pt_PT.po +++ b/po/pt_PT.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # António Correia , 2014 # António Correia , 2014 @@ -12,14 +12,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 17:40+0000\n" "Last-Translator: philm \n" -"Language-Team: Portuguese (Portugal) (http://www.transifex.com/projects/p/manjaro-pamac/language/pt_PT/)\n" +"Language-Team: Portuguese (Portugal) (http://www.transifex.com/projects/p/" +"manjaro-pamac/language/pt_PT/)\n" +"Language: pt_PT\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: pt_PT\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -225,6 +226,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/ro.po b/po/ro.po index e4b3baf..1458bd7 100644 --- a/po/ro.po +++ b/po/ro.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Alexandru Ianu , 2013-2015 # Guillaume Benoit , 2013 @@ -11,15 +11,17 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-10 02:23+0000\n" "Last-Translator: Alexandru Ianu \n" -"Language-Team: Romanian (http://www.transifex.com/projects/p/manjaro-pamac/language/ro/)\n" +"Language-Team: Romanian (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/ro/)\n" +"Language: ro\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: ro\n" -"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" +"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?" +"2:1));\n" #: data/polkit/org.manjaro.pamac.policy msgid "Authentication is required" @@ -170,7 +172,9 @@ msgstr "Permite Pamac să caute și să instaleze pachete din AUR" msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "Când se elimină un pachet, se vor elimina și acele dependențe ce nu sunt cerute de alte pachete" +msgstr "" +"Când se elimină un pachet, se vor elimina și acele dependențe ce nu sunt " +"cerute de alte pachete" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -224,6 +228,14 @@ msgstr "Nu s-a inițializat librăria alpm" msgid "Failed to synchronize any databases" msgstr "Nu s-au sincronizat bazele de date" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "Nu s-a inițializat tranzacția" @@ -624,9 +636,15 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "%s are %u dependență opțională neinstalată.\nAlegeți dacă o doriți instalată:" -msgstr[1] "%s are %u dependențe opționale neinstalate.\nAlegeți cele pe care le doriți instalate:" -msgstr[2] "%s are %u de dependențe opționale neinstalate.\nAlegeți cele pe care le doriți instalate:" +msgstr[0] "" +"%s are %u dependență opțională neinstalată.\n" +"Alegeți dacă o doriți instalată:" +msgstr[1] "" +"%s are %u dependențe opționale neinstalate.\n" +"Alegeți cele pe care le doriți instalate:" +msgstr[2] "" +"%s are %u de dependențe opționale neinstalate.\n" +"Alegeți cele pe care le doriți instalate:" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/po/ru.po b/po/ru.po index 78399e7..288c6d0 100644 --- a/po/ru.po +++ b/po/ru.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Виктор Кукшиев , 2013 # Daniil , 2013 @@ -23,15 +23,17 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 17:10+0000\n" "Last-Translator: Виктор Кукшиев \n" -"Language-Team: Russian (http://www.transifex.com/projects/p/manjaro-pamac/language/ru/)\n" +"Language-Team: Russian (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/ru/)\n" +"Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: ru\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: data/polkit/org.manjaro.pamac.policy msgid "Authentication is required" @@ -182,7 +184,9 @@ msgstr "Разрешить Pamac искать и устанавливать па msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "При удалении пакета, также произвести удаление неиспользуемых сопутствующих зависимостей" +msgstr "" +"При удалении пакета, также произвести удаление неиспользуемых сопутствующих " +"зависимостей" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -236,6 +240,14 @@ msgstr "Ошибка инициализации библиотеки alpm" msgid "Failed to synchronize any databases" msgstr "Ошибка синхронизации со всеми базами данных" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "Ошибка начала транзакции" @@ -636,9 +648,15 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "%s имеет %u неустановленную дополнительную зависимость.\nУкажите, если вы хотите их установить:" -msgstr[1] "%s имеет %u несколько неустановленных дополнительных зависимостей.\nВыберите те, которые вы хотели бы установить:" -msgstr[2] "%s имеет %u неустановленныx дополнительных зависимостей.\nВыберите те, которые вы хотели бы установить:" +msgstr[0] "" +"%s имеет %u неустановленную дополнительную зависимость.\n" +"Укажите, если вы хотите их установить:" +msgstr[1] "" +"%s имеет %u несколько неустановленных дополнительных зависимостей.\n" +"Выберите те, которые вы хотели бы установить:" +msgstr[2] "" +"%s имеет %u неустановленныx дополнительных зависимостей.\n" +"Выберите те, которые вы хотели бы установить:" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/po/si.po b/po/si.po index 72fcea7..524a084 100644 --- a/po/si.po +++ b/po/si.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Enindu Alahapperuma , 2014 # Enindu Alahapperuma , 2014 @@ -10,14 +10,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-06 09:22+0000\n" "Last-Translator: philm \n" -"Language-Team: Sinhala (http://www.transifex.com/projects/p/manjaro-pamac/language/si/)\n" +"Language-Team: Sinhala (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/si/)\n" +"Language: si\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: si\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -223,6 +224,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/sk.po b/po/sk.po index 5e7147b..b18c430 100644 --- a/po/sk.po +++ b/po/sk.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Dušan Kazik, 2014 # Dušan Kazik , 2014-2015 @@ -14,14 +14,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 21:12+0000\n" "Last-Translator: Dušan Kazik \n" -"Language-Team: Slovak (http://www.transifex.com/projects/p/manjaro-pamac/language/sk/)\n" +"Language-Team: Slovak (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/sk/)\n" +"Language: sk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: sk\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" #: data/polkit/org.manjaro.pamac.policy @@ -173,7 +174,9 @@ msgstr "Umožniť programu Pamac vyhľadať a inštalovať balíky z repozitára msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "Pri odstránení balíka tiež odstráni závislosti, ktoré nie sú potrebné inými balíkmi" +msgstr "" +"Pri odstránení balíka tiež odstráni závislosti, ktoré nie sú potrebné inými " +"balíkmi" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -227,6 +230,14 @@ msgstr "Zlyhala inicializácia knižnice alpm" msgid "Failed to synchronize any databases" msgstr "Zlyhalo synchronizovanie akejkoľvek databázy" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "Zlyhalo zahájenie transakcie" @@ -627,9 +638,15 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "%s obsahuje %u odinštalovanú voliteľnú závislosť.\nZvoľte ju, ak ju chcete nainštalovať:" -msgstr[1] "%s obsahuje %u odinštalované voliteľné závislosti. Zvoľte tie, ktoré chcete nainštalovať:" -msgstr[2] "%s obsahuje %u odinštalovaných voliteľných závislostí. Zvoľte tie, ktoré chcete nainštalovať:" +msgstr[0] "" +"%s obsahuje %u odinštalovanú voliteľnú závislosť.\n" +"Zvoľte ju, ak ju chcete nainštalovať:" +msgstr[1] "" +"%s obsahuje %u odinštalované voliteľné závislosti. Zvoľte tie, ktoré chcete " +"nainštalovať:" +msgstr[2] "" +"%s obsahuje %u odinštalovaných voliteľných závislostí. Zvoľte tie, ktoré " +"chcete nainštalovať:" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/po/sl.po b/po/sl.po index c198d5d..38354db 100644 --- a/po/sl.po +++ b/po/sl.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # ansich , 2014 # Nenad Latinović , 2013 @@ -14,15 +14,17 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-19 15:25+0000\n" "Last-Translator: ansich \n" -"Language-Team: Slovenian (http://www.transifex.com/projects/p/manjaro-pamac/language/sl/)\n" +"Language-Team: Slovenian (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/sl/)\n" +"Language: sl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: sl\n" -"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3);\n" #: data/polkit/org.manjaro.pamac.policy msgid "Authentication is required" @@ -173,7 +175,9 @@ msgstr "Dovoli Pamacu da išče in namešča pakete iz AUR" msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "Ob odstranjevanju paketov odstrani tudi tiste odvisnosti, ki niso zahtevani s strani drugih paketov" +msgstr "" +"Ob odstranjevanju paketov odstrani tudi tiste odvisnosti, ki niso zahtevani " +"s strani drugih paketov" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -227,6 +231,14 @@ msgstr "Začenjanje alpm knjižnice je spodletelo" msgid "Failed to synchronize any databases" msgstr "Ni bilo mogoče sinhronizirati nobene podatkovne baze" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "Ni bilo mogoče začeti transakcije" @@ -628,10 +640,18 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "%s ima %u odstranjeno izbirno odvisnost.\nIzberite, če jo želite namestiti:" -msgstr[1] "%s ima %u odstranjeni izbirni odvisnosti.\nIzberite tiste, ki jih želite namestiti:" -msgstr[2] "%s ima %u odstranjenih izbirnih odvisnosti.\nIzberite tiste, ki jih želite namestiti:" -msgstr[3] "%s ima %u odstranjenih izbirnih odvisnosti.\nIzberite tiste, ki jih želite namestiti:" +msgstr[0] "" +"%s ima %u odstranjeno izbirno odvisnost.\n" +"Izberite, če jo želite namestiti:" +msgstr[1] "" +"%s ima %u odstranjeni izbirni odvisnosti.\n" +"Izberite tiste, ki jih želite namestiti:" +msgstr[2] "" +"%s ima %u odstranjenih izbirnih odvisnosti.\n" +"Izberite tiste, ki jih želite namestiti:" +msgstr[3] "" +"%s ima %u odstranjenih izbirnih odvisnosti.\n" +"Izberite tiste, ki jih želite namestiti:" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/po/sr.po b/po/sr.po index c5c7f66..2651e48 100644 --- a/po/sr.po +++ b/po/sr.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # philm , 2015 # Драгољуб Шишовић, 2014 @@ -11,15 +11,17 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-13 22:51+0000\n" "Last-Translator: Драгољуб Шишовић\n" -"Language-Team: Serbian (http://www.transifex.com/projects/p/manjaro-pamac/language/sr/)\n" +"Language-Team: Serbian (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/sr/)\n" +"Language: sr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: sr\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: data/polkit/org.manjaro.pamac.policy msgid "Authentication is required" @@ -170,7 +172,9 @@ msgstr "Омогући Памаку да претражује и инстали msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "При уклањању пакета, такође уклони и све његове зависности које више нису потребне ни једном другом пакету" +msgstr "" +"При уклањању пакета, такође уклони и све његове зависности које више нису " +"потребне ни једном другом пакету" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -224,6 +228,14 @@ msgstr "Неуспешна иницијализација alpm \"библиот msgid "Failed to synchronize any databases" msgstr "Неуспех синхронизације било које базе података" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "Неуспех да се успостави трансакција" @@ -624,9 +636,15 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "%s има %u уклоњену опциону зависност.\nИзабери да ли би желео да је инсталираш:" -msgstr[1] "%s има %u уклоњених опционих зависности.\nИзабери оне које би желео да инсталираш:" -msgstr[2] "%s има %u уклоњених опционих зависности.\nИзабери оне које би желео да инсталираш:" +msgstr[0] "" +"%s има %u уклоњену опциону зависност.\n" +"Изабери да ли би желео да је инсталираш:" +msgstr[1] "" +"%s има %u уклоњених опционих зависности.\n" +"Изабери оне које би желео да инсталираш:" +msgstr[2] "" +"%s има %u уклоњених опционих зависности.\n" +"Изабери оне које би желео да инсталираш:" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/po/sr@latin.po b/po/sr@latin.po index fee98da..8fdb0f4 100644 --- a/po/sr@latin.po +++ b/po/sr@latin.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # kakonema , 2013-2014 # philm , 2015 @@ -13,15 +13,17 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 17:42+0000\n" "Last-Translator: philm \n" -"Language-Team: Serbian (Latin) (http://www.transifex.com/projects/p/manjaro-pamac/language/sr@latin/)\n" +"Language-Team: Serbian (Latin) (http://www.transifex.com/projects/p/manjaro-" +"pamac/language/sr@latin/)\n" +"Language: sr@latin\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: sr@latin\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: data/polkit/org.manjaro.pamac.policy msgid "Authentication is required" @@ -226,6 +228,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/sr_RS.po b/po/sr_RS.po index fc85dc7..3298b0b 100644 --- a/po/sr_RS.po +++ b/po/sr_RS.po @@ -2,21 +2,23 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-06 09:22+0000\n" "Last-Translator: philm \n" -"Language-Team: Serbian (Serbia) (http://www.transifex.com/projects/p/manjaro-pamac/language/sr_RS/)\n" +"Language-Team: Serbian (Serbia) (http://www.transifex.com/projects/p/manjaro-" +"pamac/language/sr_RS/)\n" +"Language: sr_RS\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: sr_RS\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: data/polkit/org.manjaro.pamac.policy msgid "Authentication is required" @@ -221,6 +223,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/sr_RS@latin.po b/po/sr_RS@latin.po index 2578c8f..3007486 100644 --- a/po/sr_RS@latin.po +++ b/po/sr_RS@latin.po @@ -2,21 +2,23 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-06 09:22+0000\n" "Last-Translator: philm \n" -"Language-Team: Serbian (Latin) (Serbia) (http://www.transifex.com/projects/p/manjaro-pamac/language/sr_RS@latin/)\n" +"Language-Team: Serbian (Latin) (Serbia) (http://www.transifex.com/projects/p/" +"manjaro-pamac/language/sr_RS@latin/)\n" +"Language: sr_RS@latin\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: sr_RS@latin\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: data/polkit/org.manjaro.pamac.policy msgid "Authentication is required" @@ -221,6 +223,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/sv.po b/po/sv.po index 09b2302..1c6ff0b 100644 --- a/po/sv.po +++ b/po/sv.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Alexander Lindberg , 2013-2014 # Mattias Johansson , 2014 @@ -15,14 +15,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 17:45+0000\n" "Last-Translator: philm \n" -"Language-Team: Swedish (http://www.transifex.com/projects/p/manjaro-pamac/language/sv/)\n" +"Language-Team: Swedish (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/sv/)\n" +"Language: sv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: sv\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -174,7 +175,9 @@ msgstr "Tillåt Pamac att söka och installera paket från AUR" msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "När ett paket tas bort, ta även bort de beroenden paketet har, men som inga andra paket kräver" +msgstr "" +"När ett paket tas bort, ta även bort de beroenden paketet har, men som inga " +"andra paket kräver" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -228,6 +231,14 @@ msgstr "Misslyckades med att läsa in alpm-bibliotek" msgid "Failed to synchronize any databases" msgstr "Misslyckades med att synkronisera databaser" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "Misslyckades med att påbörja överföring" @@ -627,8 +638,12 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "%s har %u oinstallerat valfritt beroende.\nVälj vilket du vill installera:" -msgstr[1] "%s har %u oinstallerade valfria beroenden.\nVälj vilka du vill installera:" +msgstr[0] "" +"%s har %u oinstallerat valfritt beroende.\n" +"Välj vilket du vill installera:" +msgstr[1] "" +"%s har %u oinstallerade valfria beroenden.\n" +"Välj vilka du vill installera:" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/po/tr.po b/po/tr.po index ee20721..55df623 100644 --- a/po/tr.po +++ b/po/tr.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Demiray Muhterem , 2013-2015 # Guillaume Benoit , 2013 @@ -13,14 +13,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-20 13:20+0000\n" "Last-Translator: Demiray Muhterem \n" -"Language-Team: Turkish (http://www.transifex.com/projects/p/manjaro-pamac/language/tr/)\n" +"Language-Team: Turkish (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/tr/)\n" +"Language: tr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: tr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -172,7 +173,9 @@ msgstr "AUR paketleri aramak ve kurmak için izin ver" msgid "" "When removing a package, also remove its dependencies that are not required " "by other packages" -msgstr "Bir paket kaldırılırken, başka bir uygulama aynı bağımlılıkları kullanmıyorsa paketi bağımlılıkları ile birlikte kaldır" +msgstr "" +"Bir paket kaldırılırken, başka bir uygulama aynı bağımlılıkları " +"kullanmıyorsa paketi bağımlılıkları ile birlikte kaldır" #: ../resources/preferences_dialog.ui msgid "Check available disk space" @@ -226,6 +229,14 @@ msgstr "Alpm kütüphanesi başlatılamadı" msgid "Failed to synchronize any databases" msgstr "Hiçbir veritabanı senkronize edilemedi" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "init işlemi başarısız" @@ -625,8 +636,12 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "%s %u tercihe bağlı bağımlılıkları kaldırdı.\nYüklemek istiyorsan tekrar seç:" -msgstr[1] "%s %u tercihe bağlı bağımlılıkları kaldırdı.\nYüklemek istediğini seç:" +msgstr[0] "" +"%s %u tercihe bağlı bağımlılıkları kaldırdı.\n" +"Yüklemek istiyorsan tekrar seç:" +msgstr[1] "" +"%s %u tercihe bağlı bağımlılıkları kaldırdı.\n" +"Yüklemek istediğini seç:" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/po/uk.po b/po/uk.po index 57c8a23..2b99ed9 100644 --- a/po/uk.po +++ b/po/uk.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Rax Garfield , 2012 # Roman , 2013 @@ -16,15 +16,17 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-06 09:22+0000\n" "Last-Translator: philm \n" -"Language-Team: Ukrainian (http://www.transifex.com/projects/p/manjaro-pamac/language/uk/)\n" +"Language-Team: Ukrainian (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/uk/)\n" +"Language: uk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: uk\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: data/polkit/org.manjaro.pamac.policy msgid "Authentication is required" @@ -229,6 +231,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/ur_PK.po b/po/ur_PK.po index 6ca8329..b63a7e0 100644 --- a/po/ur_PK.po +++ b/po/ur_PK.po @@ -2,20 +2,21 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-06 09:22+0000\n" "Last-Translator: philm \n" -"Language-Team: Urdu (Pakistan) (http://www.transifex.com/projects/p/manjaro-pamac/language/ur_PK/)\n" +"Language-Team: Urdu (Pakistan) (http://www.transifex.com/projects/p/manjaro-" +"pamac/language/ur_PK/)\n" +"Language: ur_PK\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: ur_PK\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/polkit/org.manjaro.pamac.policy @@ -221,6 +222,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/uz.po b/po/uz.po index ec7fa55..2b59129 100644 --- a/po/uz.po +++ b/po/uz.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # philm , 2015 # Umid Almasov , 2013-2014 @@ -11,14 +11,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 17:46+0000\n" "Last-Translator: philm \n" -"Language-Team: Uzbek (http://www.transifex.com/projects/p/manjaro-pamac/language/uz/)\n" +"Language-Team: Uzbek (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/uz/)\n" +"Language: uz\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: uz\n" "Plural-Forms: nplurals=1; plural=0;\n" #: data/polkit/org.manjaro.pamac.policy @@ -224,6 +225,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/vi.po b/po/vi.po index 06cff51..e5aea82 100644 --- a/po/vi.po +++ b/po/vi.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Duy Truong Nguyen , 2014 # philm , 2015 @@ -11,14 +11,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 17:46+0000\n" "Last-Translator: philm \n" -"Language-Team: Vietnamese (http://www.transifex.com/projects/p/manjaro-pamac/language/vi/)\n" +"Language-Team: Vietnamese (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/vi/)\n" +"Language: vi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: vi\n" "Plural-Forms: nplurals=1; plural=0;\n" #: data/polkit/org.manjaro.pamac.policy @@ -224,6 +225,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/zh.po b/po/zh.po index c3697f0..4254a0e 100644 --- a/po/zh.po +++ b/po/zh.po @@ -2,20 +2,21 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-06 09:22+0000\n" "Last-Translator: philm \n" -"Language-Team: Chinese (http://www.transifex.com/projects/p/manjaro-pamac/language/zh/)\n" +"Language-Team: Chinese (http://www.transifex.com/projects/p/manjaro-pamac/" +"language/zh/)\n" +"Language: zh\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: zh\n" "Plural-Forms: nplurals=1; plural=0;\n" #: data/polkit/org.manjaro.pamac.policy @@ -221,6 +222,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/zh_CN.po b/po/zh_CN.po index 864f275..9129617 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Daetalus , 2014 # Daetalus , 2014 @@ -11,14 +11,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-07 17:47+0000\n" "Last-Translator: philm \n" -"Language-Team: Chinese (China) (http://www.transifex.com/projects/p/manjaro-pamac/language/zh_CN/)\n" +"Language-Team: Chinese (China) (http://www.transifex.com/projects/p/manjaro-" +"pamac/language/zh_CN/)\n" +"Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: zh_CN\n" "Plural-Forms: nplurals=1; plural=0;\n" #: data/polkit/org.manjaro.pamac.policy @@ -224,6 +225,14 @@ msgstr "" msgid "Failed to synchronize any databases" msgstr "" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "" diff --git a/po/zh_TW.po b/po/zh_TW.po index c1d1a81..469aba3 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -2,7 +2,7 @@ # Copyright (C) 2007-2012 Free Software Foundation, Inc. # This file is distributed under the same license as the Pamac package. # Guillaume Benoit , 2013-2015. -# +# # Translators: # Jeff Huang , 2014-2015 # Jeff Huang , 2013-2014 @@ -10,14 +10,15 @@ msgid "" msgstr "" "Project-Id-Version: manjaro-pamac\n" "Report-Msgid-Bugs-To: guillaume@manjaro.org\n" -"POT-Creation-Date: 2015-01-04 09:41+0100\n" +"POT-Creation-Date: 2015-03-04 14:36+0100\n" "PO-Revision-Date: 2015-01-06 13:57+0000\n" "Last-Translator: Jeff Huang \n" -"Language-Team: Chinese (Taiwan) (http://www.transifex.com/projects/p/manjaro-pamac/language/zh_TW/)\n" +"Language-Team: Chinese (Taiwan) (http://www.transifex.com/projects/p/manjaro-" +"pamac/language/zh_TW/)\n" +"Language: zh_TW\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: zh_TW\n" "Plural-Forms: nplurals=1; plural=0;\n" #: data/polkit/org.manjaro.pamac.policy @@ -223,6 +224,14 @@ msgstr "初始化 alpm 函式庫失敗" msgid "Failed to synchronize any databases" msgstr "同步任何套件庫失敗" +#: ../src/daemon.vala +msgid "No" +msgstr "" + +#: ../src/daemon.vala +msgid "Yes" +msgstr "" + #: ../src/daemon.vala msgid "Failed to init transaction" msgstr "初始化事務處理失敗" @@ -621,7 +630,9 @@ msgid "" msgid_plural "" "%s has %u uninstalled optional dependencies.\n" "Choose those you would like to install:" -msgstr[0] "%s 有 %u 個未安裝的選擇性依賴關係。\n選擇您所想要安裝的:" +msgstr[0] "" +"%s 有 %u 個未安裝的選擇性依賴關係。\n" +"選擇您所想要安裝的:" #: ../src/manager_window.vala msgid "Uninstalled" diff --git a/resources/manager_window.ui b/resources/manager_window.ui index 4f13fd8..47bc5b9 100644 --- a/resources/manager_window.ui +++ b/resources/manager_window.ui @@ -559,9 +559,10 @@ - + True True + True diff --git a/src/Makefile b/src/Makefile index 7c389ca..6ac1d4b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -2,20 +2,23 @@ COMMON_VALA_FLAGS = --fatal-warnings \ --pkg=libalpm \ --pkg=gio-2.0 \ - --pkg=posix \ - --pkg=json-glib-1.0 \ - --pkg=libsoup-2.4 \ --vapidir=../vapi \ --Xcc=-I../util \ -X -D_FILE_OFFSET_BITS=64 \ -X -DGETTEXT_PACKAGE="pamac" \ --target-glib=2.38 +TRANSACTION_VALA_FLAGS = --pkg=json-glib-1.0 \ + --pkg=gtk+-3.0 \ + --pkg=gmodule-2.0 \ + --pkg=gdk-3.0 \ + --pkg=vte-2.91 + COMMON_SOURCES = ../util/alpm-util.c \ - alpm_config.vala \ + common.vala \ pamac_config.vala \ - aur.vala \ - common.vala + mirrors_config.vala \ + package.vala \ MANAGER_GRESOURCE_FILE = ../resources/pamac.manager.gresource.xml @@ -23,11 +26,12 @@ UPDATER_GRESOURCE_FILE = ../resources/pamac.updater.gresource.xml INSTALLER_GRESOURCE_FILE = ../resources/pamac.installer.gresource.xml -DIALOGS_FILES = choose_provider_dialog.vala \ - transaction_sum_dialog.vala \ - transaction_info_dialog.vala \ - preferences_dialog.vala \ - progress_dialog.vala +TRANSACTION_SOURCES = transaction.vala \ + choose_provider_dialog.vala \ + transaction_sum_dialog.vala \ + transaction_info_dialog.vala \ + preferences_dialog.vala \ + progress_dialog.vala binaries: pamac-refresh pamac-daemon pamac-tray pamac-updater pamac-manager pamac-install @@ -39,69 +43,62 @@ pamac-refresh: refresh.vala --pkg=gio-2.0 \ refresh.vala -pamac-daemon: ../vapi/libalpm.vapi ../vapi/polkit-gobject-1.vapi $(COMMON_SOURCES) mirrors_config.vala daemon.vala +pamac-tray: common.vala pamac_config.vala tray.vala + valac -o pamac-tray \ + --pkg=gio-2.0 \ + --pkg=gtk+-3.0 \ + --pkg=libnotify \ + -X -DGETTEXT_PACKAGE="pamac" \ + common.vala \ + pamac_config.vala \ + tray.vala + +pamac-daemon: ../vapi/libalpm.vapi ../vapi/polkit-gobject-1.vapi $(COMMON_SOURCES) alpm_config.vala alpm_utils.vala aur.vala daemon.vala valac -o pamac-daemon \ $(COMMON_VALA_FLAGS) \ + --pkg=posix \ + --pkg=json-glib-1.0 \ + --pkg=libsoup-2.4 \ --pkg=polkit-gobject-1 \ --thread \ $(COMMON_SOURCES) \ - mirrors_config.vala \ + alpm_config.vala \ + aur.vala \ + alpm_utils.vala \ daemon.vala -pamac-tray: ../vapi/libalpm.vapi $(COMMON_SOURCES) tray.vala - valac -o pamac-tray \ - $(COMMON_VALA_FLAGS) \ - --pkg=gtk+-3.0 \ - --pkg=libnotify \ - $(COMMON_SOURCES) \ - tray.vala - -pamac-manager: ../vapi/libalpm.vapi $(COMMON_SOURCES) $(DIALOGS_FILES) choose_dep_dialog.vala history_dialog.vala packages_chooser_dialog.vala ../resources/manager_resources.c package.vala mirrors_config.vala transaction.vala packages_model.vala manager_window.vala manager.vala +pamac-manager: ../vapi/libalpm.vapi $(COMMON_SOURCES) $(TRANSACTION_SOURCES) choose_dep_dialog.vala history_dialog.vala packages_chooser_dialog.vala ../resources/manager_resources.c packages_model.vala manager_window.vala manager.vala valac -o pamac-manager \ $(COMMON_VALA_FLAGS) \ - --pkg=gtk+-3.0 \ - --pkg=gmodule-2.0 \ - --pkg=gdk-3.0 \ - --pkg=vte-2.91 \ + $(TRANSACTION_VALA_FLAGS) \ --gresources=$(MANAGER_GRESOURCE_FILE) \ $(COMMON_SOURCES) \ - $(DIALOGS_FILES) \ + $(TRANSACTION_SOURCES) \ choose_dep_dialog.vala \ history_dialog.vala \ packages_chooser_dialog.vala \ ../resources/manager_resources.c \ - package.vala \ - mirrors_config.vala \ - transaction.vala \ packages_model.vala \ manager_window.vala \ manager.vala -pamac-updater: ../vapi/libalpm.vapi $(COMMON_SOURCES) $(DIALOGS_FILES) ../resources/updater_resources.c mirrors_config.vala transaction.vala updater_window.vala updater.vala +pamac-updater: ../vapi/libalpm.vapi $(COMMON_SOURCES) $(TRANSACTION_SOURCES) ../resources/updater_resources.c updater_window.vala updater.vala valac -o pamac-updater \ $(COMMON_VALA_FLAGS) \ - --pkg=gtk+-3.0 \ - --pkg=gmodule-2.0 \ - --pkg=vte-2.91 \ + $(TRANSACTION_VALA_FLAGS) \ --gresources=$(UPDATER_GRESOURCE_FILE) \ $(COMMON_SOURCES) \ - $(DIALOGS_FILES) \ + $(TRANSACTION_SOURCES) \ ../resources/updater_resources.c \ - mirrors_config.vala \ - transaction.vala \ updater_window.vala \ updater.vala -pamac-install: ../vapi/libalpm.vapi $(COMMON_SOURCES) $(DIALOGS_FILES) ../resources/installer_resources.c mirrors_config.vala transaction.vala installer.vala +pamac-install: ../vapi/libalpm.vapi $(COMMON_SOURCES) $(TRANSACTION_SOURCES) ../resources/installer_resources.c installer.vala valac -o pamac-install \ $(COMMON_VALA_FLAGS) \ - --pkg=gtk+-3.0 \ - --pkg=gmodule-2.0 \ - --pkg=vte-2.91 \ + $(TRANSACTION_VALA_FLAGS) \ --gresources=$(INSTALLER_GRESOURCE_FILE) \ $(COMMON_SOURCES) \ - $(DIALOGS_FILES) \ + $(TRANSACTION_SOURCES) \ ../resources/installer_resources.c \ - mirrors_config.vala \ - transaction.vala \ installer.vala diff --git a/src/alpm_config.vala b/src/alpm_config.vala index 51dd0ee..3e51b9a 100644 --- a/src/alpm_config.vala +++ b/src/alpm_config.vala @@ -1,7 +1,7 @@ /* * pamac-vala * - * Copyright (C) 2014, 2015 Guillaume Benoit + * Copyright (C) 2014-2015 Guillaume Benoit * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -100,8 +100,9 @@ namespace Alpm { public void get_handle () { Alpm.Errno error; - if (handle != null) + if (handle != null) { Handle.release (handle); + } handle = Handle.new (rootdir, dbpath, out error); if (handle == null) { stderr.printf ("Failed to initialize alpm library" + " (%s)\n".printf(Alpm.strerror (error))); @@ -127,12 +128,14 @@ namespace Alpm { // register dbs foreach (var repo in repo_order) { unowned DB db = handle.register_syncdb (repo.name, repo.siglevel); - foreach (var url in repo.urls) + foreach (var url in repo.urls) { db.add_server (url.replace ("$repo", repo.name).replace ("$arch", handle.arch)); - if (repo.usage == 0) + } + if (repo.usage == 0) { db.usage = DB.Usage.ALL; - else + } else { db.usage = repo.usage; + } } } @@ -149,11 +152,15 @@ namespace Alpm { string line; // Read lines until end of file (null) is reached while ((line = dis.read_line (null)) != null) { - if (line.length == 0) continue; + if (line.length == 0) { + continue; + } // ignore whole line and end of line comments string[] splitted = line.split ("#", 2); line = splitted[0].strip (); - if (line.length == 0) continue; + if (line.length == 0) { + continue; + } if (line[0] == '[' && line[line.length-1] == ']') { current_section = line[1:-1]; if (current_section != "options") { @@ -165,67 +172,79 @@ namespace Alpm { splitted = line.split ("=", 2); string _key = splitted[0].strip (); string? _value = null; - if (splitted[1] != null) + if (splitted[1] != null) { _value = splitted[1].strip (); - if (_key == "Include") + } + if (_key == "Include") { parse_file (_value, current_section); + } if (current_section == "options") { - if (_key == "GPGDir") + if (_key == "GPGDir") { gpgdir = _value; - else if (_key == "LogFile") + } else if (_key == "LogFile") { logfile = _value; - else if (_key == "Architecture") { - if (_value == "auto") + } else if (_key == "Architecture") { + if (_value == "auto") { arch = Posix.utsname ().machine; - else + } else { arch = _value; - } else if (_key == "UseDelta") + } + } else if (_key == "UseDelta") { deltaratio = double.parse (_value); - else if (_key == "UseSysLog") + } else if (_key == "UseSysLog") { usesyslog = 1; - else if (_key == "CheckSpace") + } else if (_key == "CheckSpace") { checkspace = 1; - else if (_key == "SigLevel") + } else if (_key == "SigLevel") { defaultsiglevel = define_siglevel (defaultsiglevel, _value); - else if (_key == "LocalFileSigLevel") + } else if (_key == "LocalFileSigLevel") { localfilesiglevel = define_siglevel (localfilesiglevel, _value); - else if (_key == "RemoteFileSigLevel") + } else if (_key == "RemoteFileSigLevel") { remotefilesiglevel = define_siglevel (remotefilesiglevel, _value); - else if (_key == "HoldPkg") { - foreach (string name in _value.split (" ")) + } else if (_key == "HoldPkg") { + foreach (string name in _value.split (" ")) { holdpkgs.append (name); + } } else if (_key == "SyncFirst") { syncfirst = _value; - foreach (string name in _value.split (" ")) + foreach (string name in _value.split (" ")) { syncfirsts.append (name); + } } else if (_key == "CacheDir") { - foreach (string dir in _value.split (" ")) + foreach (string dir in _value.split (" ")) { cachedirs->add_str (dir); + } } else if (_key == "IgnoreGroup") { - foreach (string name in _value.split (" ")) + foreach (string name in _value.split (" ")) { ignoregroups->add_str (name); + } } else if (_key == "IgnorePkg") { ignorepkg = _value; - foreach (string name in _value.split (" ")) + foreach (string name in _value.split (" ")) { ignorepkgs->add_str (name); + } } else if (_key == "Noextract") { - foreach (string name in _value.split (" ")) + foreach (string name in _value.split (" ")) { noextracts->add_str (name); + } } else if (_key == "NoUpgrade") { - foreach (string name in _value.split (" ")) + foreach (string name in _value.split (" ")) { noupgrades->add_str (name); + } } } else { foreach (var repo in repo_order) { if (repo.name == current_section) { - if (_key == "Server") + if (_key == "Server") { repo.urls += _value; - else if (_key == "SigLevel") { - if (repo.siglevel == Signature.Level.USE_DEFAULT) + } else if (_key == "SigLevel") { + if (repo.siglevel == Signature.Level.USE_DEFAULT) { repo.siglevel = defaultsiglevel; + } repo.siglevel = define_siglevel (repo.siglevel, _value); - } else if (_key == "Usage") + } else if (_key == "Usage") { repo.usage = define_usage (_value); + } } } } @@ -238,9 +257,9 @@ namespace Alpm { public void write (HashTable new_conf) { var file = GLib.File.new_for_path (conf_path); - if (file.query_exists () == false) + if (file.query_exists () == false) { GLib.stderr.printf ("File '%s' doesn't exist.\n", conf_path); - else { + } else { try { // Open file for reading and wrap returned FileInputStream into a // DataInputStream, so we can read line by line @@ -256,32 +275,39 @@ namespace Alpm { if (line.contains ("IgnorePkg")) { if (new_conf.contains ("IgnorePkg")) { string _value = new_conf.get ("IgnorePkg").get_string (); - if (_value == "") + if (_value == "") { data += "#IgnorePkg =\n"; - else + } else { data += "IgnorePkg = %s\n".printf (_value); - } else + } + } else { data += line + "\n"; + } } else if (line.contains ("SyncFirst")) { if (new_conf.contains ("SyncFirst")) { string _value = new_conf.get ("SyncFirst").get_string (); - if (_value == "") + if (_value == "") { data += "#SyncFirst =\n"; - else + } else { data += "SyncFirst = %s\n".printf (_value); - } else + } + } else { data += line + "\n"; + } } else if (line.contains ("CheckSpace")) { if (new_conf.contains ("CheckSpace")) { - int _value = new_conf.get ("CheckSpace").get_int32 (); - if (_value == 1) + bool _value = new_conf.get ("CheckSpace").get_boolean (); + if (_value == true) { data += "CheckSpace\n"; - else + } else { data += "#CheckSpace\n"; - } else + } + } else { data += line + "\n"; - } else + } + } else { data += line + "\n"; + } } // delete the file before rewrite it file.delete (); @@ -319,11 +345,11 @@ namespace Alpm { foreach (string directive in conf_string.split(" ")) { bool affect_package = false; bool affect_database = false; - if ("Package" in directive) + if ("Package" in directive) { affect_package = true; - else if ("Database" in directive) + } else if ("Database" in directive) { affect_database = true; - else { + } else { affect_package = true; affect_database = true; } @@ -332,8 +358,9 @@ namespace Alpm { default_level &= ~Signature.Level.PACKAGE; default_level |= Signature.Level.PACKAGE_SET; } - if (affect_database) + if (affect_database) { default_level &= ~Signature.Level.DATABASE; + } } else if ("Optional" in directive) { if (affect_package) { default_level |= Signature.Level.PACKAGE; @@ -374,9 +401,9 @@ namespace Alpm { default_level |= Signature.Level.DATABASE_MARGINAL_OK; default_level |= Signature.Level.DATABASE_UNKNOWN_OK; } - } - else + } else { GLib.stderr.printf("unrecognized siglevel: %s\n", conf_string); + } } default_level &= ~Signature.Level.USE_DEFAULT; return default_level; diff --git a/src/alpm_utils.vala b/src/alpm_utils.vala new file mode 100644 index 0000000..4f7ffbb --- /dev/null +++ b/src/alpm_utils.vala @@ -0,0 +1,75 @@ +/* + * pamac-vala + * + * Copyright (C) 2015 Guillaume Benoit + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a get of the GNU General Public License + * along with this program. If not, see . + */ + +public int pkgcmp (Alpm.Package pkg1, Alpm.Package pkg2) { + return strcmp (pkg1.name, pkg2.name); +} + +public Alpm.List search_all_dbs (Alpm.Handle handle, Alpm.List needles) { + var syncpkgs = new Alpm.List (); + var result = handle.localdb.search (needles); + + foreach (var db in handle.syncdbs) { + if (syncpkgs.length == 0) + syncpkgs = db.search (needles); + else { + syncpkgs.join (db.search (needles).diff (syncpkgs, (Alpm.List.CompareFunc) pkgcmp)); + } + } + + result.join (syncpkgs.diff (result, (Alpm.List.CompareFunc) pkgcmp)); + //result.sort ((Alpm.List.CompareFunc) pkgcmp); + + return result; +} + +public Alpm.List group_pkgs (Alpm.Handle handle, string grp_name) { + var result = new Alpm.List (); + + unowned Alpm.Group? grp = handle.localdb.get_group (grp_name); + if (grp != null) { + foreach (var pkg in grp.packages) + result.add (pkg); + } + + result.join (Alpm.find_group_pkgs (handle.syncdbs, grp_name).diff (result, (Alpm.List.CompareFunc) pkgcmp)); + + //result.sort ((Alpm.List.CompareFunc) pkgcmp); + + return result; +} + +public Alpm.List all_pkgs (Alpm.Handle handle) { + var syncpkgs = new Alpm.List (); + var result = new Alpm.List (); + result = handle.localdb.pkgcache.copy (); + + foreach (var db in handle.syncdbs) { + if (syncpkgs.length == 0) + syncpkgs = db.pkgcache.copy (); + else { + syncpkgs.join (db.pkgcache.diff (syncpkgs, (Alpm.List.CompareFunc) pkgcmp)); + } + } + + result.join (syncpkgs.diff (result, (Alpm.List.CompareFunc) pkgcmp)); + //result.sort ((Alpm.List.CompareFunc) pkgcmp); + + return result; +} diff --git a/src/aur.vala b/src/aur.vala index 285efe6..6f4d85c 100644 --- a/src/aur.vala +++ b/src/aur.vala @@ -1,7 +1,7 @@ /* * pamac-vala * - * Copyright (C) 2014 Guillaume Benoit + * Copyright (C) 2014-2015 Guillaume Benoit * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -41,11 +41,16 @@ namespace AUR { } unowned Json.Node? root = parser.get_root (); if (root != null) { - prev_inter = root.get_object ().get_array_member ("results"); + if (root.get_object ().get_string_member ("type") == "error") { + stderr.printf ("Failed to search %s from AUR\n", needles[0]); + } else { + prev_inter = root.get_object ().get_array_member ("results"); + } } int length = needles.length; - if (length == 1) + if (length == 1) { return prev_inter; + } int i = 1; var inter = new Json.Array (); var found = new Json.Array (); @@ -61,7 +66,11 @@ namespace AUR { } root = parser.get_root (); if (root != null) { - found = root.get_object ().get_array_member ("results"); + if (root.get_object ().get_string_member ("type") == "error") { + stderr.printf ("Failed to search %s from AUR\n", needles[i]); + } else { + found = root.get_object ().get_array_member ("results"); + } } foreach (var prev_inter_node in prev_inter.get_elements ()) { foreach (var found_node in found.get_elements ()) { @@ -94,7 +103,11 @@ namespace AUR { } unowned Json.Node? root = parser.get_root (); if (root != null) { - pkg_info = root.get_object ().get_object_member ("results"); + if (root.get_object ().get_string_member ("type") == "error") { + stderr.printf ("Failed to get infos about %s from AUR\n", pkgname); + } else { + pkg_info = root.get_object ().get_object_member ("results"); + } } return pkg_info; } @@ -119,7 +132,11 @@ namespace AUR { } unowned Json.Node? root = parser.get_root (); if (root != null) { - results = root.get_object ().get_array_member ("results"); + if (root.get_object ().get_string_member ("type") == "error") { + stderr.printf ("Failed to multiinfo %s from AUR\n", builder.str); + } else { + results = root.get_object ().get_array_member ("results"); + } } return results; } diff --git a/src/choose_dep_dialog.vala b/src/choose_dep_dialog.vala index e7437c2..84a0d8b 100644 --- a/src/choose_dep_dialog.vala +++ b/src/choose_dep_dialog.vala @@ -1,7 +1,7 @@ /* * pamac-vala * - * Copyright (C) 2014 Guillaume Benoit + * Copyright (C) 2014 Guillaume Benoit * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/choose_provider_dialog.vala b/src/choose_provider_dialog.vala index 6b43e32..a54ac56 100644 --- a/src/choose_provider_dialog.vala +++ b/src/choose_provider_dialog.vala @@ -1,7 +1,7 @@ /* * pamac-vala * - * Copyright (C) 2014 Guillaume Benoit + * Copyright (C) 2014 Guillaume Benoit * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/common.vala b/src/common.vala index aa22ea1..f974b74 100644 --- a/src/common.vala +++ b/src/common.vala @@ -1,7 +1,7 @@ /* * pamac-vala * - * Copyright (C) 2014 Guillaume Benoit + * Copyright (C) 2014-2015 Guillaume Benoit * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,7 +18,7 @@ */ namespace Pamac { - public struct UpdatesInfos { + public struct UpdateInfos { public string name; public string version; public string db_name; @@ -26,6 +26,12 @@ namespace Pamac { public uint64 download_size; } + public struct Updates { + public bool is_syncfirst; + public UpdateInfos[] repos_updates; + public UpdateInfos[] aur_updates; + } + public enum Mode { MANAGER, UPDATER @@ -51,161 +57,3 @@ public string format_size (uint64 size) { return size_string; } } - -public int pkgcmp (Alpm.Package pkg1, Alpm.Package pkg2) { - return strcmp (pkg1.name, pkg2.name); -} - -public Alpm.List search_all_dbs (Alpm.Handle handle, Alpm.List needles) { - var syncpkgs = new Alpm.List (); - var result = handle.localdb.search (needles); - - foreach (var db in handle.syncdbs) { - if (syncpkgs.length == 0) - syncpkgs = db.search (needles); - else { - syncpkgs.join (db.search (needles).diff (syncpkgs, (Alpm.List.CompareFunc) pkgcmp)); - } - } - - result.join (syncpkgs.diff (result, (Alpm.List.CompareFunc) pkgcmp)); - //result.sort ((Alpm.List.CompareFunc) pkgcmp); - - return result; -} - -public Alpm.List group_pkgs_all_dbs (Alpm.Handle handle, string grp_name) { - var result = new Alpm.List (); - - unowned Alpm.Group? grp = handle.localdb.get_group (grp_name); - if (grp != null) { - foreach (var pkg in grp.packages) - result.add (pkg); - } - - result.join (Alpm.find_group_pkgs (handle.syncdbs, grp_name).diff (result, (Alpm.List.CompareFunc) pkgcmp)); - - //result.sort ((Alpm.List.CompareFunc) pkgcmp); - - return result; -} - -public Alpm.List get_all_pkgs (Alpm.Handle handle) { - var syncpkgs = new Alpm.List (); - var result = new Alpm.List (); - result = handle.localdb.pkgcache.copy (); - - foreach (var db in handle.syncdbs) { - if (syncpkgs.length == 0) - syncpkgs = db.pkgcache.copy (); - else { - syncpkgs.join (db.pkgcache.diff (syncpkgs, (Alpm.List.CompareFunc) pkgcmp)); - } - } - - result.join (syncpkgs.diff (result, (Alpm.List.CompareFunc) pkgcmp)); - //result.sort ((Alpm.List.CompareFunc) pkgcmp); - - return result; -} - -public unowned Alpm.Package? get_syncpkg (Alpm.Handle handle, string name) { - unowned Alpm.Package? pkg = null; - foreach (var db in handle.syncdbs) { - pkg = db.get_pkg (name); - if (pkg != null) - break; - } - return pkg; -} - -public Pamac.UpdatesInfos[] get_syncfirst_updates (Alpm.Handle handle, GLib.List syncfirsts) { - Pamac.UpdatesInfos infos = Pamac.UpdatesInfos (); - Pamac.UpdatesInfos[] syncfirst_infos = {}; - unowned Alpm.Package? pkg = null; - unowned Alpm.Package? candidate = null; - foreach (var name in syncfirsts) { - pkg = Alpm.find_satisfier (handle.localdb.pkgcache, name); - if (pkg != null) { - candidate = pkg.sync_newversion (handle.syncdbs); - if (candidate != null) { - infos.name = candidate.name; - infos.version = candidate.version; - infos.db_name = candidate.db.name; - infos.tarpath = ""; - infos.download_size = candidate.download_size; - syncfirst_infos += infos; - } - } - } - return syncfirst_infos; -} - -public Pamac.UpdatesInfos[] get_repos_updates (Alpm.Handle handle) { - unowned Alpm.Package? candidate = null; - Pamac.UpdatesInfos infos = Pamac.UpdatesInfos (); - Pamac.UpdatesInfos[] updates = {}; - foreach (var local_pkg in handle.localdb.pkgcache) { - // continue only if the local pkg is not in IgnorePkg or IgnoreGroup - if (handle.should_ignore (local_pkg) == 0) { - candidate = local_pkg.sync_newversion (handle.syncdbs); - if (candidate != null) { - infos.name = candidate.name; - infos.version = candidate.version; - infos.db_name = candidate.db.name; - infos.tarpath = ""; - infos.download_size = candidate.download_size; - updates += infos; - } - } - } - return updates; -} - -public Pamac.UpdatesInfos[] get_aur_updates (Alpm.Handle handle) { - unowned Alpm.Package? sync_pkg = null; - unowned Alpm.Package? candidate = null; - string[] local_pkgs = {}; - Pamac.UpdatesInfos infos = Pamac.UpdatesInfos (); - Pamac.UpdatesInfos[] aur_updates = {}; - // get local pkgs - foreach (var local_pkg in handle.localdb.pkgcache) { - // continue only if the local pkg is not in IgnorePkg or IgnoreGroup - if (handle.should_ignore (local_pkg) == 0) { - // check updates from AUR only for local packages - foreach (var db in handle.syncdbs) { - sync_pkg = Alpm.find_satisfier (db.pkgcache, local_pkg.name); - if (sync_pkg != null) - break; - } - if (sync_pkg == null) { - // check update from AUR only if no package from dbs will replace it - candidate = local_pkg.sync_newversion (handle.syncdbs); - if (candidate == null) { - local_pkgs += local_pkg.name; - } - } - } - } - // get aur updates - var aur_pkgs = AUR.multiinfo (local_pkgs); - int cmp; - unowned Json.Object pkg_info; - string version; - string name; - foreach (var node in aur_pkgs.get_elements ()) { - pkg_info = node.get_object (); - version = pkg_info.get_string_member ("Version"); - name = pkg_info.get_string_member ("Name"); - cmp = Alpm.pkg_vercmp (version, handle.localdb.get_pkg (name).version); - if (cmp == 1) { - infos.name = name; - infos.version = version; - infos.db_name = "AUR"; - infos.tarpath = pkg_info.get_string_member ("URLPath"); - infos.download_size = 0; - aur_updates += infos; - } - } - return aur_updates; -} diff --git a/src/daemon.vala b/src/daemon.vala index 5945af4..c074342 100644 --- a/src/daemon.vala +++ b/src/daemon.vala @@ -1,7 +1,7 @@ /* * pamac-vala * - * Copyright (C) 2014 Guillaume Benoit + * Copyright (C) 2014-2015 Guillaume Benoit * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,6 +35,9 @@ namespace Pamac { public Mutex provider_mutex; public int? choosen_provider; private Mutex databases_lock_mutex; + private HashTable aur_results; + private UpdateInfos[] aur_updates; + private bool aur_updates_checked; public signal void emit_event (uint primary_event, uint secondary_event, string[] details); public signal void emit_providers (string depend, string[] providers); @@ -42,16 +45,24 @@ namespace Pamac { public signal void emit_download (string filename, uint64 xfered, uint64 total); public signal void emit_totaldownload (uint64 total); public signal void emit_log (uint level, string msg); - public signal void emit_refreshed (ErrorInfos error); - public signal void emit_trans_prepared (ErrorInfos error); - public signal void emit_trans_committed (ErrorInfos error); - public signal void emit_generate_mirrorlist_start (); - public signal void emit_generate_mirrorlist_data (string line); - public signal void emit_generate_mirrorlist_finished (); + public signal void set_pkgreason_finished (); + public signal void refresh_finished (ErrorInfos error); + public signal void trans_prepare_finished (ErrorInfos error); + public signal void trans_commit_finished (ErrorInfos error); + public signal void write_pamac_config_finished (int refresh_period, bool enable_aur, bool recurse); + public signal void write_alpm_config_finished (); + public signal void write_mirrors_config_finished (); + public signal void generate_mirrorlist_start (); + public signal void generate_mirrorlist_data (string line); + public signal void generate_mirrorlist_finished (); public Daemon () { alpm_config = new Alpm.Config ("/etc/pacman.conf"); databases_lock_mutex = Mutex (); + aur_results = new HashTable (str_hash, str_equal); + aur_updates = {}; + aur_updates_checked = false; + refresh_handle (); } private void refresh_handle () { @@ -59,7 +70,7 @@ namespace Pamac { if (alpm_config.handle == null) { ErrorInfos err = ErrorInfos (); err.str = _("Failed to initialize alpm library"); - emit_trans_committed (err); + trans_commit_finished (err); } else { alpm_config.handle.eventcb = (EventCallBack) cb_event; alpm_config.handle.progresscb = (ProgressCallBack) cb_progress; @@ -71,40 +82,58 @@ namespace Pamac { previous_percent = 0; } - public void write_pamac_config (HashTable new_pamac_conf, GLib.BusName sender) { + public void start_write_pamac_config (HashTable new_pamac_conf, GLib.BusName sender) { var pamac_config = new Pamac.Config ("/etc/pamac.conf"); try { Polkit.Authority authority = Polkit.Authority.get_sync (null); Polkit.Subject subject = Polkit.SystemBusName.new (sender); - Polkit.AuthorizationResult result = authority.check_authorization_sync ( + authority.check_authorization.begin ( subject, "org.manjaro.pamac.commit", null, Polkit.CheckAuthorizationFlags.ALLOW_USER_INTERACTION, - null + null, + (obj, res) => { + try { + var result = authority.check_authorization.end (res); + if (result.get_is_authorized ()) { + pamac_config.write (new_pamac_conf); + pamac_config.reload (); + write_pamac_config_finished (pamac_config.refresh_period, pamac_config.enable_aur, pamac_config.recurse); + } + } catch (GLib.Error e) { + stderr.printf ("%s\n", e.message); + } + } ); - if (result.get_is_authorized ()) { - pamac_config.write (new_pamac_conf); - } } catch (GLib.Error e) { stderr.printf ("%s\n", e.message); } } - public void write_alpm_config (HashTable new_alpm_conf, GLib.BusName sender) { + public void start_write_alpm_config (HashTable new_alpm_conf, GLib.BusName sender) { try { Polkit.Authority authority = Polkit.Authority.get_sync (null); Polkit.Subject subject = Polkit.SystemBusName.new (sender); - Polkit.AuthorizationResult result = authority.check_authorization_sync ( + authority.check_authorization.begin ( subject, "org.manjaro.pamac.commit", null, Polkit.CheckAuthorizationFlags.ALLOW_USER_INTERACTION, - null + null, + (obj, res) => { + try { + var result = authority.check_authorization.end (res); + if (result.get_is_authorized ()) { + alpm_config.write (new_alpm_conf); + alpm_config.reload (); + write_alpm_config_finished (); + } + } catch (GLib.Error e) { + stderr.printf ("%s\n", e.message); + } + } ); - if (result.get_is_authorized ()) { - alpm_config.write (new_alpm_conf); - } } catch (GLib.Error e) { stderr.printf ("%s\n", e.message); } @@ -112,30 +141,27 @@ namespace Pamac { private bool process_line (IOChannel channel, IOCondition condition, string stream_name) { if (condition == IOCondition.HUP) { - stdout.printf ("%s: The fd has been closed.\n", stream_name); return false; } try { string line; channel.read_line (out line, null, null); - emit_generate_mirrorlist_data (line); + generate_mirrorlist_data (line); } catch (IOChannelError e) { - stdout.printf ("%s: IOChannelError: %s\n", stream_name, e.message); + stderr.printf ("%s: IOChannelError: %s\n", stream_name, e.message); return false; } catch (ConvertError e) { - stdout.printf ("%s: ConvertError: %s\n", stream_name, e.message); + stderr.printf ("%s: ConvertError: %s\n", stream_name, e.message); return false; } return true; } private void generate_mirrorlist () { - emit_generate_mirrorlist_start (); - + generate_mirrorlist_start (); int standard_output; int standard_error; Pid child_pid; - try { Process.spawn_async_with_pipes (null, {"pacman-mirrors", "-g"}, @@ -149,81 +175,94 @@ namespace Pamac { } catch (SpawnError e) { stdout.printf ("SpawnError: %s\n", e.message); } - // stdout: IOChannel output = new IOChannel.unix_new (standard_output); output.add_watch (IOCondition.IN | IOCondition.HUP, (channel, condition) => { return process_line (channel, condition, "stdout"); }); - // stderr: IOChannel error = new IOChannel.unix_new (standard_error); error.add_watch (IOCondition.IN | IOCondition.HUP, (channel, condition) => { return process_line (channel, condition, "stderr"); }); - ChildWatch.add (child_pid, (pid, status) => { // Triggered when the child indicated by child_pid exits Process.close_pid (pid); alpm_config.reload (); refresh_handle (); - emit_generate_mirrorlist_finished (); + generate_mirrorlist_finished (); }); } - public void write_mirrors_config (HashTable new_mirrors_conf, GLib.BusName sender) { + public void start_write_mirrors_config (HashTable new_mirrors_conf, GLib.BusName sender) { var mirrors_config = new Alpm.MirrorsConfig ("/etc/pacman-mirrors.conf"); try { Polkit.Authority authority = Polkit.Authority.get_sync (null); Polkit.Subject subject = Polkit.SystemBusName.new (sender); - Polkit.AuthorizationResult result = authority.check_authorization_sync ( + authority.check_authorization.begin ( subject, "org.manjaro.pamac.commit", null, Polkit.CheckAuthorizationFlags.ALLOW_USER_INTERACTION, - null + null, + (obj, res) => { + try { + var result = authority.check_authorization.end (res); + if (result.get_is_authorized ()) { + mirrors_config.write (new_mirrors_conf); + write_mirrors_config_finished (); + generate_mirrorlist (); + } + } catch (GLib.Error e) { + stderr.printf ("%s\n", e.message); + } + } ); - if (result.get_is_authorized ()) { - mirrors_config.write (new_mirrors_conf); - generate_mirrorlist (); - } } catch (GLib.Error e) { stderr.printf ("%s\n", e.message); } } - public void set_pkgreason (string pkgname, uint reason, GLib.BusName sender) { + public void start_set_pkgreason (string pkgname, uint reason, GLib.BusName sender) { try { Polkit.Authority authority = Polkit.Authority.get_sync (null); Polkit.Subject subject = Polkit.SystemBusName.new (sender); - Polkit.AuthorizationResult result = authority.check_authorization_sync ( + authority.check_authorization.begin ( subject, "org.manjaro.pamac.commit", null, Polkit.CheckAuthorizationFlags.ALLOW_USER_INTERACTION, - null - ); - if (result.get_is_authorized ()) { - refresh_handle (); - unowned Package? pkg = alpm_config.handle.localdb.get_pkg (pkgname); - if (pkg != null) { - pkg.reason = (Package.Reason) reason; + null, + (obj, res) => { + try { + var result = authority.check_authorization.end (res); + if (result.get_is_authorized ()) { + unowned Alpm.Package? pkg = alpm_config.handle.localdb.get_pkg (pkgname); + if (pkg != null) { + pkg.reason = (Alpm.Package.Reason) reason; + refresh_handle (); + set_pkgreason_finished (); + } + } + } catch (GLib.Error e) { + stderr.printf ("%s\n", e.message); + } } - } + ); } catch (GLib.Error e) { stderr.printf ("%s\n", e.message); } } - public void refresh (int force, bool emit_signal) { + private async ErrorInfos refresh (int force) { + SourceFunc callback = refresh.callback; + ErrorInfos err = ErrorInfos (); try { new Thread.try ("refresh thread", () => { databases_lock_mutex.lock (); - ErrorInfos err = ErrorInfos (); string[] details = {}; int success = 0; int ret; - refresh_handle (); foreach (var db in alpm_config.handle.syncdbs) { ret = db.update (force); if (ret >= 0) { @@ -237,39 +276,405 @@ namespace Pamac { details += Alpm.strerror (alpm_config.handle.errno ()); err.details = details; } - if (emit_signal) { - emit_refreshed (err); - } - print("done\n"); databases_lock_mutex.unlock (); + Idle.add((owned) callback); return success; }); } catch (GLib.Error e) { stderr.printf ("%s\n", e.message); } + yield; + return err; } - public UpdatesInfos[] get_updates () { - refresh_handle (); + public void start_refresh (int force, bool emit_finish_signal) { + refresh.begin (force, (obj, res) => { + var err = refresh.end (res); + refresh_handle (); + if (emit_finish_signal) { + refresh_finished (err); + } + }); + } + + public bool get_checkspace () { + if (alpm_config.checkspace == 1) { + return true; + } + return false; + } + + public string get_syncfirst (){ + return alpm_config.syncfirst; + } + + public string get_ignorepkg () { + return alpm_config.ignorepkg; + } + + public bool should_hold (string pkgname) { + if (alpm_config.holdpkgs.find_custom (pkgname, strcmp) != null) { + return true; + } + return false; + } + + public async Pamac.Package[] get_all_pkgs () { + Pamac.Package[] pkgs = {}; + var alpm_pkgs = all_pkgs (alpm_config.handle); + foreach (var alpm_pkg in alpm_pkgs) { + pkgs += Pamac.Package (alpm_pkg, null); + } + return pkgs; + } + + public async Pamac.Package[] get_installed_pkgs () { + Pamac.Package[] pkgs = {}; + foreach (var alpm_pkg in alpm_config.handle.localdb.pkgcache) { + pkgs += Pamac.Package (alpm_pkg, null); + } + return pkgs; + } + + public async Pamac.Package[] get_local_pkgs () { + Pamac.Package[] pkgs = {}; + foreach (var alpm_pkg in alpm_config.handle.localdb.pkgcache) { + bool sync_found = false; + foreach (var db in alpm_config.handle.syncdbs) { + unowned Alpm.Package? sync_pkg = db.get_pkg (alpm_pkg.name); + if (sync_pkg != null) { + sync_found = true; + break; + } + } + if (sync_found == false) { + pkgs += Pamac.Package (alpm_pkg, null); + } + } + return pkgs; + } + + public async Pamac.Package[] get_orphans () { + Pamac.Package[] pkgs = {}; + foreach (var alpm_pkg in alpm_config.handle.localdb.pkgcache) { + if (alpm_pkg.reason == Alpm.Package.Reason.DEPEND) { + Alpm.List *list = alpm_pkg.compute_requiredby (); + if (list->length == 0) { + pkgs += Pamac.Package (alpm_pkg, null); + } + Alpm.List.free_all (list); + } + } + return pkgs; + } + + public Pamac.Package find_local_pkg (string pkgname) { + return Pamac.Package (alpm_config.handle.localdb.get_pkg (pkgname), null); + } + + private unowned Alpm.Package? get_syncpkg (string name) { + unowned Alpm.Package? pkg = null; + foreach (var db in alpm_config.handle.syncdbs) { + pkg = db.get_pkg (name); + if (pkg != null) { + break; + } + } + return pkg; + } + + public Pamac.Package find_sync_pkg (string pkgname) { + return Pamac.Package (get_syncpkg (pkgname), null); + } + + public async Pamac.Package[] search_pkgs (string search_string, bool search_aur) { + Pamac.Package[] result = {}; + var needles = new Alpm.List (); + string[] splitted = search_string.split (" "); + foreach (unowned string part in splitted) { + needles.add (part); + } + var alpm_pkgs = search_all_dbs (alpm_config.handle, needles); + foreach (var alpm_pkg in alpm_pkgs) { + result += Pamac.Package (alpm_pkg, null); + } + if (search_aur) { + Json.Array aur_pkgs; + if (aur_results.contains (search_string)) { + aur_pkgs = aur_results.get (search_string); + } else { + aur_pkgs = AUR.search (splitted); + aur_results.insert (search_string, aur_pkgs); + } + foreach (var node in aur_pkgs.get_elements ()) { + var aur_pkg = node.get_object (); + var pamac_pkg = Pamac.Package (null, aur_pkg); + bool found = false; + foreach (var pkg in result) { + if (pkg.name == pamac_pkg.name) { + found = true; + break; + } + } + if (found == false) { + result += pamac_pkg; + } + } + } + return result; + } + + public string[] get_repos_names () { + string[] repos_names = {}; + foreach (var db in alpm_config.handle.syncdbs) { + repos_names += db.name; + } + return repos_names; + } + + public async Pamac.Package[] get_repo_pkgs (string repo) { + Pamac.Package[] pkgs = {}; + unowned Alpm.Package? local_pkg = null; + foreach (var db in alpm_config.handle.syncdbs) { + if (db.name == repo) { + foreach (var sync_pkg in db.pkgcache) { + local_pkg = alpm_config.handle.localdb.get_pkg (sync_pkg.name); + if (local_pkg != null) { + pkgs += Pamac.Package (local_pkg, null); + } else { + pkgs += Pamac.Package (sync_pkg, null); + } + } + } + } + return pkgs; + } + + public string[] get_groups_names () { + string[] groups_names = {}; + foreach (var db in alpm_config.handle.syncdbs) { + foreach (var group in db.groupcache) { + if ((group.name in groups_names) == false) { + groups_names += group.name; + } + } + } + return groups_names; + } + + public async Pamac.Package[] get_group_pkgs (string group_name) { + Pamac.Package[] pkgs = {}; + var alpm_pkgs = group_pkgs (alpm_config.handle, group_name); + foreach (var alpm_pkg in alpm_pkgs) { + pkgs += Pamac.Package (alpm_pkg, null); + } + return pkgs; + } + + public string[] get_pkg_files (string pkgname) { + string[] files = {}; + unowned Alpm.Package? alpm_pkg = alpm_config.handle.localdb.get_pkg (pkgname); + if (alpm_pkg != null) { + foreach (var file in alpm_pkg.files) { + files += file.name; + } + } + return files; + } + + public string[] get_pkg_uninstalled_optdeps (string pkgname) { + string[] optdeps = {}; + unowned Alpm.Package? alpm_pkg = alpm_config.handle.localdb.get_pkg (pkgname); + if (alpm_pkg != null) { + foreach (unowned Depend optdep in alpm_pkg.optdepends) { + if (find_satisfier (alpm_config.handle.localdb.pkgcache, optdep.name) == null) { + optdeps += optdep.compute_string (); + } + } + } + return optdeps; + } + + public PackageDetails get_pkg_details (string pkgname) { + string repo = ""; + string has_signature = _("No"); + int reason = 0; + string packager = ""; + string install_date = ""; + string[] groups = {}; + string[] backups = {}; + var details = PackageDetails (); + unowned Alpm.Package? alpm_pkg = alpm_config.handle.localdb.get_pkg (pkgname); + if (alpm_pkg == null) { + alpm_pkg = get_syncpkg (pkgname); + } + if (alpm_pkg != null) { + repo = alpm_pkg.db.name; + packager = alpm_pkg.packager; + foreach (var group in alpm_pkg.groups) { + groups += group; + } + if (alpm_pkg.db.name == "local") { + reason = alpm_pkg.reason; + GLib.Time time = GLib.Time.local ((time_t) alpm_pkg.installdate); + install_date = time.format ("%a %d %b %Y %X %Z"); + foreach (var backup in alpm_pkg.backups) { + backups += backup.name; + } + } else { + has_signature = alpm_pkg.base64_sig != null ? _("Yes") : _("No"); + } + } + details.repo = repo; + details.has_signature = has_signature; + details.reason = reason; + details.packager = packager; + details.install_date = install_date; + details.groups = groups; + details.backups = backups; + return details; + } + + public PackageDeps get_pkg_deps (string pkgname) { + string repo = ""; + string[] depends = {}; + string[] optdepends = {}; + string[] requiredby = {}; + string[] provides = {}; + string[] replaces = {}; + string[] conflicts = {}; + var deps = PackageDeps (); + unowned Alpm.Package? alpm_pkg = alpm_config.handle.localdb.get_pkg (pkgname); + if (alpm_pkg == null) { + alpm_pkg = get_syncpkg (pkgname); + } + if (alpm_pkg != null) { + repo = alpm_pkg.db.name; + foreach (var depend in alpm_pkg.depends) { + depends += depend.compute_string (); + } + foreach (var optdepend in alpm_pkg.optdepends) { + optdepends += optdepend.compute_string (); + } + foreach (var provide in alpm_pkg.provides) { + provides += provide.compute_string (); + } + foreach (var replace in alpm_pkg.replaces) { + replaces += replace.compute_string (); + } + foreach (var conflict in alpm_pkg.conflicts) { + conflicts += conflict.compute_string (); + } + if (alpm_pkg.db.name == "local") { + Alpm.List *list = alpm_pkg.compute_requiredby (); + int i = 0; + while (i < list->length) { + requiredby += list->nth_data (i); + i++; + } + Alpm.List.free_all (list); + } + } + deps.repo = repo; + deps.depends = depends; + deps.optdepends = optdepends; + deps.requiredby = requiredby; + deps.provides = provides; + deps.replaces = replaces; + deps.conflicts = conflicts; + return deps; + } + + public async Updates get_updates () { var pamac_config = new Pamac.Config ("/etc/pamac.conf"); - UpdatesInfos[] updates = {}; - updates = get_syncfirst_updates (alpm_config.handle, alpm_config.syncfirsts); - if (updates.length != 0) { + var infos = UpdateInfos (); + UpdateInfos[] updates_infos = {}; + var updates = Updates (); + updates.aur_updates = {}; + unowned Alpm.Package? pkg = null; + unowned Alpm.Package? candidate = null; + foreach (var name in alpm_config.syncfirsts) { + pkg = Alpm.find_satisfier (alpm_config.handle.localdb.pkgcache, name); + if (pkg != null) { + candidate = pkg.sync_newversion (alpm_config.handle.syncdbs); + if (candidate != null) { + infos.name = candidate.name; + infos.version = candidate.version; + infos.db_name = candidate.db.name; + infos.tarpath = ""; + infos.download_size = candidate.download_size; + updates_infos += infos; + } + } + } + if (updates_infos.length != 0) { + updates.is_syncfirst = true; + updates.repos_updates = updates_infos; return updates; } else { - updates = get_repos_updates (alpm_config.handle); - if (pamac_config.enable_aur) { - UpdatesInfos[] aur_updates = get_aur_updates (alpm_config.handle); - foreach (var infos in aur_updates) { - updates += infos; + string[] local_pkgs = {}; + foreach (var local_pkg in alpm_config.handle.localdb.pkgcache) { + // continue only if the local pkg is not in IgnorePkg or IgnoreGroup + if (alpm_config.handle.should_ignore (local_pkg) == 0) { + candidate = local_pkg.sync_newversion (alpm_config.handle.syncdbs); + if (candidate != null) { + infos.name = candidate.name; + infos.version = candidate.version; + infos.db_name = candidate.db.name; + infos.tarpath = ""; + infos.download_size = candidate.download_size; + updates_infos += infos; + } else { + if (pamac_config.enable_aur) { + // check if it is a local pkg + foreach (var db in alpm_config.handle.syncdbs) { + pkg = Alpm.find_satisfier (db.pkgcache, local_pkg.name); + if (pkg != null) { + break; + } + } + if (pkg == null) { + local_pkgs += local_pkg.name; + } + } + } } } + updates.is_syncfirst = false; + updates.repos_updates = updates_infos; + if (pamac_config.enable_aur) { + if (aur_updates_checked == false) { + // get aur updates + updates_infos = {}; + var aur_pkgs = AUR.multiinfo (local_pkgs); + int cmp; + unowned Json.Object pkg_info; + string version; + string name; + foreach (var node in aur_pkgs.get_elements ()) { + pkg_info = node.get_object (); + version = pkg_info.get_string_member ("Version"); + name = pkg_info.get_string_member ("Name"); + cmp = Alpm.pkg_vercmp (version, alpm_config.handle.localdb.get_pkg (name).version); + if (cmp == 1) { + infos.name = name; + infos.version = version; + infos.db_name = "AUR"; + infos.tarpath = pkg_info.get_string_member ("URLPath"); + infos.download_size = 0; + updates_infos += infos; + } + } + aur_updates = updates_infos; + aur_updates_checked = true; + } + updates.aur_updates = aur_updates; + } return updates; } } public ErrorInfos trans_init (TransFlag transflags) { - refresh_handle (); ErrorInfos err = ErrorInfos (); string[] details = {}; int ret = alpm_config.handle.trans_init (transflags); @@ -293,7 +698,7 @@ namespace Pamac { return err; } - private ErrorInfos trans_add_pkg_real (Package pkg) { + private ErrorInfos trans_add_pkg_real (Alpm.Package pkg) { ErrorInfos err = ErrorInfos (); string[] details = {}; int ret = alpm_config.handle.trans_add_pkg (pkg); @@ -315,7 +720,7 @@ namespace Pamac { public ErrorInfos trans_add_pkg (string pkgname) { ErrorInfos err = ErrorInfos (); string[] details = {}; - unowned Package? pkg = alpm_config.handle.find_dbs_satisfier (alpm_config.handle.syncdbs, pkgname); + unowned Alpm.Package? pkg = get_syncpkg (pkgname); if (pkg == null) { err.str = _("Failed to prepare transaction"); details += _("target not found: %s").printf (pkgname); @@ -346,7 +751,7 @@ namespace Pamac { // add the same module for other installed kernels foreach (var installed_kernel in installed_kernels) { string module = installed_kernel + "-" + splitted[1]; - unowned Package? module_pkg = alpm_config.handle.find_dbs_satisfier (alpm_config.handle.syncdbs, module); + unowned Alpm.Package? module_pkg = get_syncpkg (module); if (module_pkg != null) { trans_add_pkg_real (module_pkg); } @@ -356,7 +761,7 @@ namespace Pamac { // add all installed module for other kernels foreach (var installed_module in installed_modules) { string module = splitted[0] + "-" + installed_module; - unowned Package? module_pkg = alpm_config.handle.find_dbs_satisfier (alpm_config.handle.syncdbs, module); + unowned Alpm.Package? module_pkg = get_syncpkg (module); if (module_pkg != null) { trans_add_pkg_real (module_pkg); } @@ -371,7 +776,7 @@ namespace Pamac { public ErrorInfos trans_load_pkg (string pkgpath) { ErrorInfos err = ErrorInfos (); string[] details = {}; - Package* pkg = alpm_config.handle.load_file (pkgpath, 1, alpm_config.handle.localfilesiglevel); + Alpm.Package* pkg = alpm_config.handle.load_file (pkgpath, 1, alpm_config.handle.localfilesiglevel); if (pkg == null) { err.str = _("Failed to prepare transaction"); details += "%s: %s".printf (pkgpath, Alpm.strerror (alpm_config.handle.errno ())); @@ -400,7 +805,7 @@ namespace Pamac { public ErrorInfos trans_remove_pkg (string pkgname) { ErrorInfos err = ErrorInfos (); string[] details = {}; - unowned Package? pkg = alpm_config.handle.localdb.get_pkg (pkgname); + unowned Alpm.Package? pkg = alpm_config.handle.localdb.get_pkg (pkgname); if (pkg == null) { err.str = _("Failed to prepare transaction"); details += _("target not found: %s").printf (pkgname); @@ -416,83 +821,91 @@ namespace Pamac { return err; } - private int trans_prepare_real () { - databases_lock_mutex.lock (); + private async ErrorInfos trans_prepare () { + SourceFunc callback = trans_prepare.callback; ErrorInfos err = ErrorInfos (); - string[] details = {}; - Alpm.List err_data = null; - int ret = alpm_config.handle.trans_prepare (out err_data); - if (ret == -1) { - Alpm.Errno errno = alpm_config.handle.errno (); - err.str = _("Failed to prepare transaction"); - string detail = Alpm.strerror (errno); - switch (errno) { - case Errno.PKG_INVALID_ARCH: - detail += ":"; - details += detail; - foreach (void *i in err_data) { - char *pkgname = i; - details += _("package %s does not have a valid architecture").printf (pkgname); - delete pkgname; - } - break; - case Errno.UNSATISFIED_DEPS: - detail += ":"; - details += detail; - foreach (void *i in err_data) { - DepMissing *miss = i; - string depstring = miss->depend.compute_string (); - details += _("%s: requires %s").printf (miss->target, depstring); - delete miss; - } - break; - case Errno.CONFLICTING_DEPS: - detail += ":"; - details += detail; - foreach (void *i in err_data) { - Conflict *conflict = i; - detail = _("%s and %s are in conflict").printf (conflict->package1, conflict->package2); - // only print reason if it contains new information - if (conflict->reason.mod != Depend.Mode.ANY) { - detail += " (%s)".printf (conflict->reason.compute_string ()); - } - details += detail; - delete conflict; - } - break; - default: - details += detail; - break; - } - err.details = details; - trans_release (); - } else { - // Search for holdpkg in target list - bool found_locked_pkg = false; - foreach (var pkg in alpm_config.handle.trans_to_remove ()) { - if (alpm_config.holdpkgs.find_custom (pkg.name, strcmp) != null) { - details += _("%s needs to be removed but it is a locked package").printf (pkg.name); - found_locked_pkg = true; - break; - } - } - if (found_locked_pkg) { - err.str = _("Failed to prepare transaction"); - err.details = details; - trans_release (); - } - } - emit_trans_prepared (err); - databases_lock_mutex.unlock (); - return ret; - } - - public void trans_prepare () { try { - new Thread.try ("prepare thread", (ThreadFunc) trans_prepare_real); + new Thread.try ("prepare thread", () => { + databases_lock_mutex.lock (); + string[] details = {}; + Alpm.List err_data = null; + int ret = alpm_config.handle.trans_prepare (out err_data); + if (ret == -1) { + Alpm.Errno errno = alpm_config.handle.errno (); + err.str = _("Failed to prepare transaction"); + string detail = Alpm.strerror (errno); + switch (errno) { + case Errno.PKG_INVALID_ARCH: + detail += ":"; + details += detail; + foreach (void *i in err_data) { + string *pkgname = i; + details += _("package %s does not have a valid architecture").printf (pkgname); + delete pkgname; + } + break; + case Errno.UNSATISFIED_DEPS: + detail += ":"; + details += detail; + foreach (void *i in err_data) { + DepMissing *miss = i; + string depstring = miss->depend.compute_string (); + details += _("%s: requires %s").printf (miss->target, depstring); + delete miss; + } + break; + case Errno.CONFLICTING_DEPS: + detail += ":"; + details += detail; + foreach (void *i in err_data) { + Conflict *conflict = i; + detail = _("%s and %s are in conflict").printf (conflict->package1, conflict->package2); + // only print reason if it contains new information + if (conflict->reason.mod != Depend.Mode.ANY) { + detail += " (%s)".printf (conflict->reason.compute_string ()); + } + details += detail; + delete conflict; + } + break; + default: + details += detail; + break; + } + err.details = details; + trans_release (); + } else { + // Search for holdpkg in target list + bool found_locked_pkg = false; + foreach (var pkg in alpm_config.handle.trans_to_remove ()) { + if (alpm_config.holdpkgs.find_custom (pkg.name, strcmp) != null) { + details += _("%s needs to be removed but it is a locked package").printf (pkg.name); + found_locked_pkg = true; + break; + } + } + if (found_locked_pkg) { + err.str = _("Failed to prepare transaction"); + err.details = details; + trans_release (); + } + } + databases_lock_mutex.unlock (); + Idle.add((owned) callback); + return ret; + }); } catch (GLib.Error e) { stderr.printf ("%s\n", e.message); } + yield; + return err; + } + + public void start_trans_prepare () { + trans_prepare.begin ((obj, res) => { + var err = trans_prepare.end (res); + trans_prepare_finished (err); + }); } public void choose_provider (int provider) { @@ -502,9 +915,9 @@ namespace Pamac { provider_mutex.unlock (); } - public UpdatesInfos[] trans_to_add () { - UpdatesInfos info = UpdatesInfos (); - UpdatesInfos[] infos = {}; + public UpdateInfos[] trans_to_add () { + UpdateInfos info = UpdateInfos (); + UpdateInfos[] infos = {}; foreach (var pkg in alpm_config.handle.trans_to_add ()) { info.name = pkg.name; info.version = pkg.version; @@ -521,9 +934,9 @@ namespace Pamac { return infos; } - public UpdatesInfos[] trans_to_remove () { - UpdatesInfos info = UpdatesInfos (); - UpdatesInfos[] infos = {}; + public UpdateInfos[] trans_to_remove () { + UpdateInfos info = UpdateInfos (); + UpdateInfos[] infos = {}; foreach (var pkg in alpm_config.handle.trans_to_remove ()) { info.name = pkg.name; info.version = pkg.version; @@ -535,66 +948,12 @@ namespace Pamac { return infos; } - private int trans_commit_real () { - databases_lock_mutex.lock (); + private async ErrorInfos trans_commit (GLib.BusName sender) { + SourceFunc callback = trans_commit.callback; ErrorInfos err = ErrorInfos (); - string[] details = {}; - Alpm.List err_data = null; - int ret = alpm_config.handle.trans_commit (out err_data); - if (ret == -1) { - Alpm.Errno errno = alpm_config.handle.errno (); - err.str = _("Failed to commit transaction"); - string detail = Alpm.strerror (errno); - switch (errno) { - case Alpm.Errno.FILE_CONFLICTS: - detail += ":"; - details += detail; - //TransFlag flags = alpm_config.handle.trans_get_flags (); - //if ((flags & TransFlag.FORCE) != 0) { - //details += _("unable to %s directory-file conflicts").printf ("--force"); - //} - foreach (void *i in err_data) { - FileConflict *conflict = i; - switch (conflict->type) { - case FileConflict.Type.TARGET: - details += _("%s exists in both %s and %s").printf (conflict->file, conflict->target, conflict->ctarget); - break; - case FileConflict.Type.FILESYSTEM: - details += _("%s: %s already exists in filesystem").printf (conflict->target, conflict->file); - break; - } - delete conflict; - } - break; - case Alpm.Errno.PKG_INVALID: - case Alpm.Errno.PKG_INVALID_CHECKSUM: - case Alpm.Errno.PKG_INVALID_SIG: - case Alpm.Errno.DLT_INVALID: - detail += ":"; - details += detail; - foreach (void *i in err_data) { - char *filename = i; - details += _("%s is invalid or corrupted").printf (filename); - delete filename; - } - break; - default: - details += detail; - break; - } - err.details = details; - } - trans_release (); - emit_trans_committed (err); - databases_lock_mutex.unlock (); - return ret; - } - - public void trans_commit (GLib.BusName sender) { try { Polkit.Authority authority = Polkit.Authority.get_sync (null); Polkit.Subject subject = Polkit.SystemBusName.new (sender); - var result = new Polkit.AuthorizationResult (false, false, null); authority.check_authorization.begin ( subject, "org.manjaro.pamac.commit", @@ -603,23 +962,83 @@ namespace Pamac { null, (obj, res) => { try { - result = authority.check_authorization.end (res); + var result = authority.check_authorization.end (res); if (result.get_is_authorized ()) { - new Thread.try ("commit thread", (ThreadFunc) trans_commit_real); + new Thread.try ("commit thread", () => { + databases_lock_mutex.lock (); + string[] details = {}; + Alpm.List err_data = null; + int ret = alpm_config.handle.trans_commit (out err_data); + if (ret == -1) { + Alpm.Errno errno = alpm_config.handle.errno (); + err.str = _("Failed to commit transaction"); + string detail = Alpm.strerror (errno); + switch (errno) { + case Alpm.Errno.FILE_CONFLICTS: + detail += ":"; + details += detail; + //TransFlag flags = alpm_config.handle.trans_get_flags (); + //if ((flags & TransFlag.FORCE) != 0) { + //details += _("unable to %s directory-file conflicts").printf ("--force"); + //} + foreach (void *i in err_data) { + FileConflict *conflict = i; + switch (conflict->type) { + case FileConflict.Type.TARGET: + details += _("%s exists in both %s and %s").printf (conflict->file, conflict->target, conflict->ctarget); + break; + case FileConflict.Type.FILESYSTEM: + details += _("%s: %s already exists in filesystem").printf (conflict->target, conflict->file); + break; + } + delete conflict; + } + break; + case Alpm.Errno.PKG_INVALID: + case Alpm.Errno.PKG_INVALID_CHECKSUM: + case Alpm.Errno.PKG_INVALID_SIG: + case Alpm.Errno.DLT_INVALID: + detail += ":"; + details += detail; + foreach (void *i in err_data) { + string *filename = i; + details += _("%s is invalid or corrupted").printf (filename); + delete filename; + } + break; + default: + details += detail; + break; + } + err.details = details; + } + trans_release (); + databases_lock_mutex.unlock (); + Idle.add((owned) callback); + return ret; + }); } else { - ErrorInfos err = ErrorInfos (); err.str = _("Authentication failed"); - emit_trans_committed (err); trans_release (); } } catch (GLib.Error e) { - stderr.printf ("Polkit Error: %s\n", e.message); + stderr.printf ("%s\n", e.message); } } ); } catch (GLib.Error e) { - stderr.printf ("Polkit Error: %s\n", e.message); + stderr.printf ("%s\n", e.message); } + yield; + return err; + } + + public void start_trans_commit (GLib.BusName sender) { + trans_commit.begin (sender, (obj, res) => { + var err = trans_commit.end (res); + refresh_handle (); + trans_commit_finished (err); + }); } public int trans_release () { @@ -665,54 +1084,54 @@ private void cb_event (Event.Data data) { switch (data.type) { case Event.Type.PACKAGE_OPERATION_START: switch (data.package_operation_operation) { - case Package.Operation.REMOVE: + case Alpm.Package.Operation.REMOVE: details += data.package_operation_oldpkg.name; details += data.package_operation_oldpkg.version; - secondary_type = (uint) Package.Operation.REMOVE; + secondary_type = (uint) Alpm.Package.Operation.REMOVE; break; - case Package.Operation.INSTALL: + case Alpm.Package.Operation.INSTALL: details += data.package_operation_newpkg.name; details += data.package_operation_newpkg.version; - secondary_type = (uint) Package.Operation.INSTALL; + secondary_type = (uint) Alpm.Package.Operation.INSTALL; break; - case Package.Operation.REINSTALL: + case Alpm.Package.Operation.REINSTALL: details += data.package_operation_newpkg.name; details += data.package_operation_newpkg.version; - secondary_type = (uint) Package.Operation.REINSTALL; + secondary_type = (uint) Alpm.Package.Operation.REINSTALL; break; - case Package.Operation.UPGRADE: + case Alpm.Package.Operation.UPGRADE: details += data.package_operation_oldpkg.name; details += data.package_operation_oldpkg.version; details += data.package_operation_newpkg.version; - secondary_type = (uint) Package.Operation.UPGRADE; + secondary_type = (uint) Alpm.Package.Operation.UPGRADE; break; - case Package.Operation.DOWNGRADE: + case Alpm.Package.Operation.DOWNGRADE: details += data.package_operation_oldpkg.name; details += data.package_operation_oldpkg.version; details += data.package_operation_newpkg.version; - secondary_type = (uint) Package.Operation.DOWNGRADE; + secondary_type = (uint) Alpm.Package.Operation.DOWNGRADE; break; } break; case Event.Type.PACKAGE_OPERATION_DONE: switch (data.package_operation_operation) { - case Package.Operation.INSTALL: + 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 Package.Operation.REMOVE: + 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 Package.Operation.REINSTALL: + 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 Package.Operation.UPGRADE: + 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 Package.Operation.DOWNGRADE: + 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; @@ -772,7 +1191,7 @@ private void cb_question (Question.Data data) { case Question.Type.SELECT_PROVIDER: string depend_str = data.select_provider_depend.compute_string (); string[] providers_str = {}; - foreach (unowned Package pkg in data.select_provider_providers) { + foreach (unowned Alpm.Package pkg in data.select_provider_providers) { providers_str += pkg.name; } pamac_daemon.provider_cond = Cond (); diff --git a/src/history_dialog.vala b/src/history_dialog.vala index e9a55d5..c1a8a8a 100644 --- a/src/history_dialog.vala +++ b/src/history_dialog.vala @@ -1,7 +1,7 @@ /* * pamac-vala * - * Copyright (C) 2014 Guillaume Benoit + * Copyright (C) 2014 Guillaume Benoit * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/installer.vala b/src/installer.vala index df27854..5a60baf 100644 --- a/src/installer.vala +++ b/src/installer.vala @@ -1,7 +1,7 @@ /* * pamac-vala * - * Copyright (C) 2014 Guillaume Benoit + * Copyright (C) 2014-2015 Guillaume Benoit * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -79,9 +79,9 @@ namespace Pamac { stderr.printf ("%s\n", e.message); } run = app.get_is_remote (); - if (run) + if (run) { return run; - else { + } else { app = new Application ("org.manjaro.pamac.updater", 0); try { app.register (); diff --git a/src/manager.vala b/src/manager.vala index 15953bd..6776e17 100644 --- a/src/manager.vala +++ b/src/manager.vala @@ -1,7 +1,7 @@ /* * pamac-vala * - * Copyright (C) 2014 Guillaume Benoit + * Copyright (C) 2014-2015 Guillaume Benoit * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -44,23 +44,26 @@ namespace Pamac { transaction_info_dialog.expander.set_visible (false); transaction_info_dialog.run (); transaction_info_dialog.hide (); - } else + } else { manager_window = new ManagerWindow (this); + } } public override void activate () { if (pamac_run == false) { manager_window.present (); - while (Gtk.events_pending ()) + while (Gtk.events_pending ()) { Gtk.main_iteration (); + } manager_window.show_all_pkgs (); } } public override void shutdown () { base.shutdown (); - if (pamac_run == false) + if (pamac_run == false) { manager_window.transaction.stop_daemon (); + } } bool check_pamac_running () { @@ -73,9 +76,9 @@ namespace Pamac { stderr.printf ("%s\n", e.message); } run = app.get_is_remote (); - if (run) + if (run) { return run; - else { + } else { app = new Application ("org.manjaro.pamac.install", 0); try { app.register (); diff --git a/src/manager_window.vala b/src/manager_window.vala index 476fc81..34f1c29 100644 --- a/src/manager_window.vala +++ b/src/manager_window.vala @@ -1,7 +1,7 @@ /* * pamac-vala * - * Copyright (C) 2014, 2015 Guillaume Benoit + * Copyright (C) 2014-2015 Guillaume Benoit * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,10 +17,7 @@ * along with this program. If not, see . */ -using Gtk; -using Alpm; - -const string VERSION = "2.1.1"; +const string VERSION = "2.2"; namespace Pamac { @@ -41,55 +38,57 @@ namespace Pamac { // manager objects [GtkChild] - public TreeView packages_treeview; + public Gtk.TreeView packages_treeview; [GtkChild] - public TreeViewColumn state_column; + public Gtk.TreeViewColumn state_column; [GtkChild] - public TreeViewColumn name_column; + public Gtk.TreeViewColumn name_column; [GtkChild] - public TreeViewColumn version_column; + public Gtk.TreeViewColumn version_column; [GtkChild] - public TreeViewColumn repo_column; + public Gtk.TreeViewColumn repo_column; [GtkChild] - public TreeViewColumn size_column; + public Gtk.TreeViewColumn size_column; [GtkChild] - public Notebook filters_notebook; + public Gtk.Notebook filters_notebook; [GtkChild] - public SearchEntry search_entry; + public Gtk.SearchEntry search_entry; [GtkChild] - public TreeView search_treeview; + public Gtk.TreeView search_treeview; [GtkChild] - public TreeView groups_treeview; + public Gtk.TreeView groups_treeview; [GtkChild] - public TreeView states_treeview; + public Gtk.TreeView states_treeview; [GtkChild] - public TreeView repos_treeview; + public Gtk.TreeView repos_treeview; [GtkChild] - public TreeView deps_treeview; + public Gtk.Notebook properties_notebook; [GtkChild] - public TreeView details_treeview; + public Gtk.TreeView deps_treeview; [GtkChild] - public ScrolledWindow deps_scrolledwindow; + public Gtk.TreeView details_treeview; [GtkChild] - public ScrolledWindow details_scrolledwindow; + public Gtk.ScrolledWindow deps_scrolledwindow; [GtkChild] - public ScrolledWindow files_scrolledwindow; + public Gtk.ScrolledWindow details_scrolledwindow; [GtkChild] - public Label name_label; + public Gtk.ScrolledWindow files_scrolledwindow; [GtkChild] - public Label desc_label; + public Gtk.Label name_label; [GtkChild] - public Label link_label; + public Gtk.Label desc_label; [GtkChild] - public Label licenses_label; + public Gtk.Label link_label; [GtkChild] - public TextView files_textview; + public Gtk.Label licenses_label; [GtkChild] - public Switch search_aur_button; + public Gtk.TextView files_textview; [GtkChild] - public Button valid_button; + public Gtk.Switch search_aur_button; [GtkChild] - public Button cancel_button; + public Gtk.Button valid_button; + [GtkChild] + public Gtk.Button cancel_button; // menu Gtk.Menu right_click_menu; @@ -100,20 +99,18 @@ namespace Pamac { Gtk.MenuItem reinstall_item; Gtk.MenuItem install_optional_deps_item; Gtk.MenuItem explicitly_installed_item; - GLib.List selected_pkgs; + Pamac.Package[] selected_pkgs; // liststore - ListStore search_list; - ListStore groups_list; - ListStore states_list; - ListStore repos_list; - ListStore deps_list; - ListStore details_list; + Gtk.ListStore search_list; + Gtk.ListStore groups_list; + Gtk.ListStore states_list; + Gtk.ListStore repos_list; + Gtk.ListStore deps_list; + Gtk.ListStore details_list; PackagesModel packages_list; - HashTable aur_results; - Pamac.Config pamac_config; public Transaction transaction; public SortInfo sortinfo; @@ -125,8 +122,6 @@ namespace Pamac { public ManagerWindow (Gtk.Application application) { Object (application: application); - aur_results = new HashTable (str_hash, str_equal); - right_click_menu = new Gtk.Menu (); deselect_item = new Gtk.MenuItem.with_label (dgettext (null, "Deselect")); deselect_item.activate.connect (on_deselect_item_activate); @@ -174,20 +169,25 @@ namespace Pamac { stderr.printf (e.message); } - pamac_config = new Pamac.Config ("/etc/pamac.conf"); + transaction = new Pamac.Transaction (this as Gtk.ApplicationWindow); + transaction.mode = Mode.MANAGER; + transaction.finished.connect (on_transaction_finished); + transaction.enable_aur.connect (enable_aur); + transaction.daemon.set_pkgreason_finished.connect (display_package_properties); - transaction = new Pamac.Transaction (this as ApplicationWindow); - transaction.check_aur = pamac_config.enable_aur; - transaction.finished.connect (on_emit_trans_finished); + var pamac_config = new Pamac.Config ("/etc/pamac.conf"); + if (pamac_config.recurse) { + transaction.flags |= Alpm.TransFlag.RECURSE; + } + enable_aur (pamac_config.enable_aur); history_dialog = new HistoryDialog (this); packages_chooser_dialog = new PackagesChooserDialog (this, transaction); set_buttons_sensitive (false); - search_aur_button.set_active (pamac_config.enable_aur); // sort by name by default - sortinfo = {0, SortType.ASCENDING}; + sortinfo = {0, Gtk.SortType.ASCENDING}; update_lists (); } @@ -202,23 +202,20 @@ namespace Pamac { public void show_all_pkgs () { this.get_window ().set_cursor (new Gdk.Cursor (Gdk.CursorType.WATCH)); - populate_packages_list (get_all_pkgs (transaction.alpm_config.handle)); - this.get_window ().set_cursor (null); + transaction.get_all_pkgs.begin ((obj, res) => { + var pkgs = transaction.get_all_pkgs.end (res); + populate_packages_list (pkgs); + this.get_window ().set_cursor (null); + }); } public void update_lists () { - string[] grps = {}; - TreeIter iter; - TreeSelection selection; + Gtk.TreeIter iter; + Gtk.TreeSelection selection; selection = repos_treeview.get_selection (); selection.changed.disconnect (on_repos_treeview_selection_changed); - foreach (var db in transaction.alpm_config.handle.syncdbs) { - repos_list.insert_with_values (out iter, -1, 0, db.name); - foreach (var grp in db.groupcache) { - if ((grp.name in grps) == false) { - grps += grp.name; - } - } + foreach (var repo in transaction.get_repos_names ()) { + repos_list.insert_with_values (out iter, -1, 0, repo); } repos_list.insert_with_values (out iter, -1, 0, dgettext (null, "local")); repos_list.get_iter_first (out iter); @@ -227,9 +224,10 @@ namespace Pamac { selection = groups_treeview.get_selection (); selection.changed.disconnect (on_groups_treeview_selection_changed); - foreach (string name in grps) - groups_list.insert_with_values (out iter, -1, 0, name); - groups_list.set_sort_column_id (0, SortType.ASCENDING); + foreach (var grpname in transaction.get_groups_names ()) { + groups_list.insert_with_values (out iter, -1, 0, grpname); + } + groups_list.set_sort_column_id (0, Gtk.SortType.ASCENDING); groups_list.get_iter_first (out iter); selection.select_iter (iter); selection.changed.connect_after (on_groups_treeview_selection_changed); @@ -248,246 +246,199 @@ namespace Pamac { public void set_infos_list (Pamac.Package pkg) { name_label.set_markup ("%s %s".printf (pkg.name, pkg.version)); - string desc; - if (pkg.alpm_pkg != null) - desc = Markup.escape_text (pkg.alpm_pkg.desc); - else - desc = Markup.escape_text (pkg.aur_json.get_string_member ("Description")); - desc_label.set_markup (desc); - string url; - if (pkg.alpm_pkg != null) - url = Markup.escape_text (pkg.alpm_pkg.url); - else - url = Markup.escape_text (pkg.aur_json.get_string_member ("URL")); + desc_label.set_markup (Markup.escape_text (pkg.desc)); + string url = Markup.escape_text (pkg.url); link_label.set_markup ("%s".printf (url, url)); StringBuilder licenses = new StringBuilder (); licenses.append (dgettext (null, "Licenses")); - licenses.append (":"); - if (pkg.alpm_pkg != null) { - foreach (var license in pkg.alpm_pkg.licenses) { - licenses.append (" "); - licenses.append (license); - } - } else { - licenses.append (" "); - licenses.append (pkg.aur_json.get_string_member ("License")); - } + licenses.append (": "); + licenses.append (pkg.licenses); licenses_label.set_markup (licenses.str); } - public void set_deps_list (Alpm.Package pkg) { + public void set_deps_list (string pkgname) { deps_list.clear (); - TreeIter iter; - unowned Alpm.List list = pkg.depends; - size_t len = list.length; - size_t i; - if (len != 0) { + Gtk.TreeIter iter; + PackageDeps deps = transaction.get_pkg_deps (pkgname); + int i; + if (deps.depends.length != 0) { deps_list.insert_with_values (out iter, -1, 0, dgettext (null, "Depends On") + ":", - 1, list.nth_data (0).compute_string ()); + 1, deps.depends[0]); i = 1; - while (i < len) { + while (i < deps.depends.length) { deps_list.insert_with_values (out iter, -1, - 1, list.nth_data (i).compute_string ()); + 1, deps.depends[i]); i++; } } - list = pkg.optdepends; - len = list.length; - if (len != 0) { - unowned Depend optdep = list.nth_data (0); - unowned Alpm.Package? satisfier = find_satisfier ( - transaction.alpm_config.handle.localdb.pkgcache, - optdep.name); - string optdep_str = optdep.compute_string (); - if (satisfier != null) - optdep_str = optdep_str + " [" + dgettext (null, "Installed") + "]"; + if (deps.optdepends.length != 0) { + string[] uninstalled_optdeps = transaction.get_pkg_uninstalled_optdeps (pkgname); + string optdep = deps.optdepends[0]; + if ((optdep in uninstalled_optdeps) == false) { + optdep = optdep + " [" + dgettext (null, "Installed") + "]"; + } deps_list.insert_with_values (out iter, -1, 0, dgettext (null, "Optional Dependencies") + ":", - 1, optdep_str); + 1, optdep); i = 1; - while (i < len) { - optdep = list.nth_data (i); - satisfier = find_satisfier ( - transaction.alpm_config.handle.localdb.pkgcache, - optdep.name); - optdep_str = optdep.compute_string (); - if (satisfier != null) - optdep_str = optdep_str + " [" + dgettext (null, "Installed") + "]"; - deps_list.insert_with_values (out iter, -1, 1, optdep_str); + while (i < deps.optdepends.length) { + optdep = deps.optdepends[i]; + if ((optdep in uninstalled_optdeps) == false) { + optdep = optdep + " [" + dgettext (null, "Installed") + "]"; + } + deps_list.insert_with_values (out iter, -1, 1, optdep); i++; } } - if (pkg.origin == Alpm.Package.From.LOCALDB) { - Alpm.List *str_list = pkg.compute_requiredby (); - len = str_list->length; - if (len != 0) { + if (deps.repo == "local") { + if (deps.requiredby.length != 0) { deps_list.insert_with_values (out iter, -1, 0, dgettext (null, "Required By") + ":", - 1, str_list->nth_data (0)); + 1, deps.requiredby[0]); i = 1; - while (i < len) { + while (i < deps.requiredby.length) { deps_list.insert_with_values (out iter, -1, - 1, str_list->nth_data (i)); + 1, deps.requiredby[i]); i++; } } - Alpm.List.free_all (str_list); } - list = pkg.provides; - len = list.length; - if (len != 0) { + if (deps.provides.length != 0) { deps_list.insert_with_values (out iter, -1, 0, dgettext (null, "Provides") + ":", - 1, list.nth_data (0).compute_string ()); + 1, deps.provides[0]); i = 1; - while (i < len) { + while (i < deps.provides.length) { deps_list.insert_with_values (out iter, -1, - 1, list.nth_data (i).compute_string ()); + 1, deps.provides[i]); i++; } } - list = pkg.replaces; - len = list.length; - if (len != 0) { + if (deps.replaces.length != 0) { deps_list.insert_with_values (out iter, -1, 0, dgettext (null, "Replaces") + ":", - 1, list.nth_data (0).compute_string ()); + 1, deps.replaces[0]); i = 1; - while (i < len) { + while (i < deps.replaces.length) { deps_list.insert_with_values (out iter, -1, - 1, list.nth_data (i).compute_string ()); + 1, deps.replaces[i]); i++; } } - list = pkg.conflicts; - len = list.length; - if (len != 0) { + if (deps.conflicts.length != 0) { deps_list.insert_with_values (out iter, -1, 0, dgettext (null, "Conflicts With") + ":", - 1, list.nth_data (0).compute_string ()); + 1, deps.conflicts[0]); i = 1; - while (i < len) { + while (i < deps.conflicts.length) { deps_list.insert_with_values (out iter, -1, - 1, list.nth_data (i).compute_string ()); + 1, deps.conflicts[i]); i++; } } } - public void set_details_list (Alpm.Package pkg) { + public void set_details_list (string pkgname) { details_list.clear (); - TreeIter iter; - if (pkg.origin == Alpm.Package.From.SYNCDB) { + Gtk.TreeIter iter; + PackageDetails details = transaction.get_pkg_details (pkgname); + int i; + if (details.repo != "local") { details_list.insert_with_values (out iter, -1, 0, dgettext (null, "Repository") + ":", - 1, pkg.db.name); + 1, details.repo); } - unowned Alpm.List list = pkg.groups; - size_t len = list.length; - size_t i; - if (len != 0) { + if (details.groups.length != 0) { details_list.insert_with_values (out iter, -1, 0, dgettext (null, "Groups") + ":", - 1, list.nth_data (0)); + 1, details.groups[0]); i = 1; - while (i < len) { + while (i < details.groups.length) { details_list.insert_with_values (out iter, -1, - 1, list.nth_data (i)); + 1, details.groups[i]); i++; } } details_list.insert_with_values (out iter, -1, 0, dgettext (null, "Packager") + ":", - 1, pkg.packager); - if (pkg.origin == Alpm.Package.From.LOCALDB) { - GLib.Time time = GLib.Time.local ((time_t) pkg.installdate); - string strtime = time.format ("%a %d %b %Y %X %Z"); + 1, details.packager); + if (details.repo == "local") { details_list.insert_with_values (out iter, -1, 0, dgettext (null, "Install Date") + ":", - 1, strtime); + 1, details.install_date); string reason; - if (pkg.reason == Alpm.Package.Reason.EXPLICIT) + if (details.reason == Alpm.Package.Reason.EXPLICIT) { reason = dgettext (null, "Explicitly installed"); - else if (pkg.reason == Alpm.Package.Reason.DEPEND) + } else if (details.reason == Alpm.Package.Reason.DEPEND) { reason = dgettext (null, "Installed as a dependency for another package"); - else + } else { reason = dgettext (null, "Unknown"); + } details_list.insert_with_values (out iter, -1, 0, dgettext (null, "Install Reason") + ":", 1, reason); } - if (pkg.origin == Alpm.Package.From.SYNCDB) { + if (details.repo != "local") { details_list.insert_with_values (out iter, -1, 0, dgettext (null, "Signatures") + ":", - 1, pkg.base64_sig != null ? "Yes" : "No"); + 1, details.has_signature); } - if (pkg.origin == Alpm.Package.From.LOCALDB) { - unowned Alpm.List backup_list = pkg.backup; - len = backup_list.length; - if (len != 0) { + if (details.repo == "local") { + if (details.backups.length != 0) { details_list.insert_with_values (out iter, -1, 0, dgettext (null, "Backup files") + ":", - 1, "/" + backup_list.nth_data (0).name); + 1, "/" + details.backups[0]); i = 1; - while (i < len) { + while (i < details.backups.length) { details_list.insert_with_values (out iter, -1, - 1, "/" + backup_list.nth_data (i).name); + 1, "/" + details.backups[i]); i++; } } } } - public void set_files_list (Alpm.Package pkg) { + public void set_files_list (string pkgname) { StringBuilder text = new StringBuilder (); - foreach (var file in pkg.files) { - if (text.len != 0) + foreach (var file in transaction.get_pkg_files (pkgname)) { + if (text.len != 0) { text.append ("\n"); + } text.append ("/"); - text.append (file.name); + text.append (file); } files_textview.buffer.set_text (text.str, (int) text.len); } - public async Alpm.List search_pkgs (string search_string, out Json.Array aur_pkgs) { - var needles = new Alpm.List (); - string[] splitted = search_string.split (" "); - foreach (unowned string part in splitted) - needles.add (part); - Alpm.List pkgs = search_all_dbs (transaction.alpm_config.handle, needles); - if (search_aur_button.get_active()) { - if (aur_results.contains (search_string)) { - aur_pkgs = aur_results.get (search_string); - } else { - aur_pkgs = AUR.search (splitted); - aur_results.insert (search_string, aur_pkgs); - } - } else { - aur_pkgs = new Json.Array (); - } - return pkgs; - } - - public void populate_packages_list (Alpm.List? pkgs, Json.Array? aur_pkgs = new Json.Array ()) { + public void populate_packages_list (Pamac.Package[] pkgs) { packages_treeview.freeze_child_notify (); packages_treeview.set_model (null); // populate liststore - packages_list = new PackagesModel (pkgs, aur_pkgs, this); + packages_list = new PackagesModel (pkgs, this); // sort liststore int column = sortinfo.column_number; - if (column == 0) - packages_list.sort_by_name (sortinfo.sort_type); - else if (column == 1) - packages_list.sort_by_state (sortinfo.sort_type); - else if (column == 2) - packages_list.sort_by_version (sortinfo.sort_type); - else if (column == 3) - packages_list.sort_by_repo (sortinfo.sort_type); - else if (column == 4) - packages_list.sort_by_size (sortinfo.sort_type); + switch (column) { + case 0: + packages_list.sort_by_name (sortinfo.sort_type); + break; + case 1: + packages_list.sort_by_state (sortinfo.sort_type); + break; + case 2: + packages_list.sort_by_version (sortinfo.sort_type); + break; + case 3: + packages_list.sort_by_repo (sortinfo.sort_type); + break; + case 4: + packages_list.sort_by_size (sortinfo.sort_type); + break; + default: + break; + } packages_treeview.set_model (packages_list); packages_treeview.thaw_child_notify (); @@ -498,10 +449,8 @@ namespace Pamac { public void refresh_packages_list () { int current_page = filters_notebook.get_current_page (); if (current_page == 0) { - TreeModel model; - TreeIter? iter; - TreeSelection selection = search_treeview.get_selection (); - if (selection.get_selected (out model, out iter)) { + Gtk.TreeSelection selection = search_treeview.get_selection (); + if (selection.get_selected (null, null)) { on_search_treeview_selection_changed (); } else { show_all_pkgs (); @@ -515,39 +464,78 @@ namespace Pamac { } } - [GtkCallback] - public void on_packages_treeview_selection_changed () { - TreeModel model; - TreeSelection selection = packages_treeview.get_selection (); - GLib.List selected = selection.get_selected_rows (out model); - if (selected.length () == 1) { - TreeIter iter; - model.get_iter (out iter, selected.nth_data (0)); - Pamac.Package pkg = (Pamac.Package) iter.user_data; - if (pkg.alpm_pkg != null) { - set_infos_list (pkg); - set_deps_list (pkg.alpm_pkg); - set_details_list (pkg.alpm_pkg); - deps_scrolledwindow.visible = true; - details_scrolledwindow.visible = true; - if (pkg.alpm_pkg.origin == Alpm.Package.From.LOCALDB) { - set_files_list (pkg.alpm_pkg); - files_scrolledwindow.visible = true; - } else { - files_scrolledwindow.visible = false; - } - } else if (pkg.aur_json != null) { - set_infos_list (pkg); - deps_scrolledwindow.visible = false; - details_scrolledwindow.visible = false; - files_scrolledwindow.visible = false; + public void display_package_properties () { + Gtk.TreeSelection selection = packages_treeview.get_selection (); + GLib.List selected = selection.get_selected_rows (null); + if (selected.length () > 0) { + // display info for the first package of the selection + Pamac.Package pkg = packages_list.get_pkg_at_path (selected.nth_data (0)); + int current_page = properties_notebook.get_current_page (); + switch (current_page) { + case 0: + set_infos_list (pkg); + if (pkg.repo == "AUR") { + deps_scrolledwindow.visible = false; + details_scrolledwindow.visible = false; + files_scrolledwindow.visible = false; + } else { + deps_scrolledwindow.visible = true; + details_scrolledwindow.visible = true; + if (pkg.repo == "local") { + files_scrolledwindow.visible = true; + } else { + files_scrolledwindow.visible = false; + } + } + break; + case 1: + if (pkg.repo == "AUR") { + deps_scrolledwindow.visible = false; + details_scrolledwindow.visible = false; + files_scrolledwindow.visible = false; + } else { + set_deps_list (pkg.name); + } + break; + case 2: + if (pkg.repo == "AUR") { + deps_scrolledwindow.visible = false; + details_scrolledwindow.visible = false; + files_scrolledwindow.visible = false; + } else { + set_details_list (pkg.name); + } + break; + case 3: + if (pkg.repo == "local") { + set_files_list (pkg.name); + } else { + files_scrolledwindow.visible = false; + if (pkg.repo == "AUR") { + deps_scrolledwindow.visible = false; + details_scrolledwindow.visible = false; + } + } + break; + default: + break; } } } [GtkCallback] - public void on_packages_treeview_row_activated (TreeView treeview, TreePath path, TreeViewColumn column) { - TreeIter iter; + public void on_packages_treeview_selection_changed () { + display_package_properties (); + } + + [GtkCallback] + public void on_properties_notebook_switch_page (Gtk.Widget page, uint page_num) { + display_package_properties (); + } + + [GtkCallback] + public void on_packages_treeview_row_activated (Gtk.TreeView treeview, Gtk.TreePath path, Gtk.TreeViewColumn column) { + Gtk.TreeIter iter; if (packages_list.get_iter (out iter, path)) { GLib.Value val; packages_list.get_value (iter, 0, out val); @@ -560,7 +548,7 @@ namespace Pamac { packages_list.get_value (iter, 3, out val); string db_name = val.get_string (); if (db_name == "local") { - if (transaction.alpm_config.holdpkgs.find_custom (name, strcmp) == null) { + if (transaction.should_hold (name) == false) { transaction.to_remove.insert (name, name); } } else if (db_name == "AUR") { @@ -581,14 +569,15 @@ namespace Pamac { } void on_install_item_activate () { - unowned Alpm.Package? find_pkg = null; + Pamac.Package find_pkg; foreach (Pamac.Package pkg in selected_pkgs) { - if (pkg.repo == "AUR") + if (pkg.repo == "AUR") { transaction.to_build.insert (pkg.name, pkg.name); - else { - find_pkg = transaction.alpm_config.handle.localdb.get_pkg (pkg.name); - if (find_pkg == null) + } else { + find_pkg = transaction.find_local_pkg (pkg.name); + if (find_pkg.name == "") { transaction.to_add.insert (pkg.name, pkg.name); + } } } if (transaction.to_add.size () != 0 || transaction.to_build.size () != 0) { @@ -599,8 +588,9 @@ namespace Pamac { void on_reinstall_item_activate () { foreach (Pamac.Package pkg in selected_pkgs) { transaction.to_remove.steal (pkg.name); - if (pkg.repo == "local") + if (pkg.repo == "local") { transaction.to_add.insert (pkg.name, pkg.name); + } } if (transaction.to_add.size () != 0) set_buttons_sensitive (true); @@ -609,13 +599,15 @@ namespace Pamac { void on_remove_item_activate () { foreach (Pamac.Package pkg in selected_pkgs) { transaction.to_add.steal (pkg.name); - if (transaction.alpm_config.holdpkgs.find_custom (pkg.name, strcmp) == null) { - if (pkg.repo == "local") + if (transaction.should_hold (pkg.name) == false) { + if (pkg.repo == "local") { transaction.to_remove.insert (pkg.name, pkg.name); + } } } - if (transaction.to_remove.size () != 0) + if (transaction.to_remove.size () != 0) { set_buttons_sensitive (true); + } } void on_deselect_item_activate () { @@ -631,30 +623,26 @@ namespace Pamac { } } - public void choose_opt_dep (GLib.List pkgs) { - uint nb; - TreeIter iter; - unowned Alpm.Package? found; + public void choose_opt_dep (Pamac.Package[] pkgs) { + Gtk.TreeIter iter; foreach (Pamac.Package pkg in pkgs) { var choose_dep_dialog = new ChooseDependenciesDialog (this); - nb = 0; - foreach (var opt_dep in pkg.alpm_pkg.optdepends) { - found = find_satisfier (transaction.alpm_config.handle.localdb.pkgcache, opt_dep.compute_string ()); - if (found == null) { - choose_dep_dialog.deps_list.insert_with_values (out iter, -1, - 0, false, - 1, opt_dep.name, - 2, opt_dep.desc); - nb += 1; - } + string[] optdeps = transaction.get_pkg_uninstalled_optdeps (pkg.name); + foreach (var optdep in optdeps) { + string[] split = optdep.split (":", 2); + choose_dep_dialog.deps_list.insert_with_values (out iter, -1, + 0, false, + 1, split[0], + 2, split[1]); } choose_dep_dialog.label.set_markup ("%s".printf ( dngettext (null, "%s has %u uninstalled optional dependency.\nChoose if you would like to install it:", - "%s has %u uninstalled optional dependencies.\nChoose those you would like to install:", nb).printf (pkg.name, nb))); + "%s has %u uninstalled optional dependencies.\nChoose those you would like to install:", optdeps.length).printf (pkg.name, optdeps.length))); choose_dep_dialog.run (); choose_dep_dialog.hide (); - while (Gtk.events_pending ()) + while (Gtk.events_pending ()) { Gtk.main_iteration (); + } choose_dep_dialog.deps_list.foreach ((model, path, iter) => { GLib.Value val; bool selected; @@ -673,13 +661,14 @@ namespace Pamac { void on_install_optional_deps_item_activate () { choose_opt_dep (selected_pkgs); - if (transaction.to_add.size () != 0) + if (transaction.to_add.size () != 0) { set_buttons_sensitive (true); + } } void on_explicitly_installed_item_activate () { foreach (Pamac.Package pkg in selected_pkgs) { - transaction.set_pkgreason (pkg.name, Alpm.Package.Reason.EXPLICIT); + transaction.start_set_pkgreason (pkg.name, Alpm.Package.Reason.EXPLICIT); } refresh_packages_list (); } @@ -689,31 +678,28 @@ namespace Pamac { packages_treeview.grab_focus (); // Check if right mouse button was clicked if (event.type == Gdk.EventType.BUTTON_PRESS && event.button == 3) { - TreeIter iter; - TreePath? treepath; + Gtk.TreePath? treepath; Pamac.Package clicked_pkg; - TreeSelection selection = packages_treeview.get_selection (); + Gtk.TreeSelection selection = packages_treeview.get_selection (); packages_treeview.get_path_at_pos ((int) event.x, (int) event.y, out treepath, null, null, null); - packages_list.get_iter (out iter, treepath); - clicked_pkg = (Pamac.Package) iter.user_data; - if (clicked_pkg.name == dgettext (null, "No package found")) + clicked_pkg = packages_list.get_pkg_at_path (treepath);; + if (clicked_pkg.name == dgettext (null, "No package found")) { return true; + } if (selection.path_is_selected (treepath) == false) { selection.unselect_all (); selection.select_path (treepath); } - GLib.List selected_paths = selection.get_selected_rows (null); + GLib.List selected_paths = selection.get_selected_rows (null); deselect_item.set_sensitive (false); install_item.set_sensitive (false); remove_item.set_sensitive (false); reinstall_item.set_sensitive (false); install_optional_deps_item.set_sensitive (false); explicitly_installed_item.set_sensitive (false); - selected_pkgs = new GLib.List (); - foreach (TreePath path in selected_paths) { - packages_list.get_iter (out iter, path); - clicked_pkg = (Pamac.Package) iter.user_data; - selected_pkgs.append (clicked_pkg); + selected_pkgs = {}; + foreach (Gtk.TreePath path in selected_paths) { + selected_pkgs += packages_list.get_pkg_at_path (path); } foreach (Pamac.Package pkg in selected_pkgs) { if (transaction.to_add.contains (pkg.name) @@ -735,47 +721,41 @@ namespace Pamac { break; } } - if (selected_pkgs.length () == 1) { - unowned Alpm.Package? find_pkg = null; - clicked_pkg = selected_pkgs.nth_data (0); + if (selected_pkgs.length == 1) { + clicked_pkg = selected_pkgs[0]; if (clicked_pkg.repo == "local") { - unowned Alpm.List optdepends = clicked_pkg.alpm_pkg.optdepends; - if (optdepends.length != 0) { - uint nb = 0; - unowned Alpm.Package? found; - foreach (var opt_dep in optdepends) { - found = find_satisfier (transaction.alpm_config.handle.localdb.pkgcache, opt_dep.compute_string ()); - if (found == null) - nb += 1; - } - if (nb != 0) - install_optional_deps_item.set_sensitive (true); + if (transaction.get_pkg_uninstalled_optdeps (clicked_pkg.name).length != 0) { + install_optional_deps_item.set_sensitive (true); } - if (clicked_pkg.alpm_pkg.reason == Alpm.Package.Reason.DEPEND) + if (clicked_pkg.reason == Alpm.Package.Reason.DEPEND) { explicitly_installed_item.set_sensitive (true); - find_pkg = get_syncpkg (transaction.alpm_config.handle, clicked_pkg.name); - if (find_pkg != null) { - if (pkg_vercmp (find_pkg.version, clicked_pkg.version) == 0) + } + Pamac.Package find_pkg = transaction.find_sync_pkg (clicked_pkg.name); + if (find_pkg.name != "") { + if (Alpm.pkg_vercmp (find_pkg.version, clicked_pkg.version) == 0) { reinstall_item.set_sensitive (true); + } } } } right_click_menu.popup (null, null, null, event.button, event.time); return true; - } else + } else { return false; + } } [GtkCallback] public void on_name_column_clicked () { - SortType new_order; - if (name_column.sort_indicator == false) - new_order = SortType.ASCENDING; - else { - if (sortinfo.sort_type == SortType.ASCENDING) - new_order = SortType.DESCENDING; - else - new_order = SortType.ASCENDING; + Gtk.SortType new_order; + if (name_column.sort_indicator == false) { + new_order = Gtk.SortType.ASCENDING; + } else { + if (sortinfo.sort_type == Gtk.SortType.ASCENDING) { + new_order = Gtk.SortType.DESCENDING; + } else { + new_order = Gtk.SortType.ASCENDING; + } } packages_list.sort_by_name (new_order); // force a display refresh @@ -784,14 +764,15 @@ namespace Pamac { [GtkCallback] public void on_state_column_clicked () { - SortType new_order; - if (state_column.sort_indicator == false) - new_order = SortType.ASCENDING; - else { - if (sortinfo.sort_type == SortType.ASCENDING) - new_order = SortType.DESCENDING; - else - new_order = SortType.ASCENDING; + Gtk.SortType new_order; + if (state_column.sort_indicator == false) { + new_order = Gtk.SortType.ASCENDING; + } else { + if (sortinfo.sort_type == Gtk.SortType.ASCENDING) { + new_order = Gtk.SortType.DESCENDING; + } else { + new_order = Gtk.SortType.ASCENDING; + } } packages_list.sort_by_state (new_order); // force a display refresh @@ -800,14 +781,15 @@ namespace Pamac { [GtkCallback] public void on_version_column_clicked () { - SortType new_order; - if (version_column.sort_indicator == false) - new_order = SortType.ASCENDING; - else { - if (sortinfo.sort_type == SortType.ASCENDING) - new_order = SortType.DESCENDING; - else - new_order = SortType.ASCENDING; + Gtk.SortType new_order; + if (version_column.sort_indicator == false) { + new_order = Gtk.SortType.ASCENDING; + } else { + if (sortinfo.sort_type == Gtk.SortType.ASCENDING) { + new_order = Gtk.SortType.DESCENDING; + } else { + new_order = Gtk.SortType.ASCENDING; + } } packages_list.sort_by_version (new_order); // force a display refresh @@ -816,14 +798,15 @@ namespace Pamac { [GtkCallback] public void on_repo_column_clicked () { - SortType new_order; - if (repo_column.sort_indicator == false) - new_order = SortType.ASCENDING; - else { - if (sortinfo.sort_type == SortType.ASCENDING) - new_order = SortType.DESCENDING; - else - new_order = SortType.ASCENDING; + Gtk.SortType new_order; + if (repo_column.sort_indicator == false) { + new_order = Gtk.SortType.ASCENDING; + } else { + if (sortinfo.sort_type == Gtk.SortType.ASCENDING) { + new_order = Gtk.SortType.DESCENDING; + } else { + new_order = Gtk.SortType.ASCENDING; + } } packages_list.sort_by_repo (new_order); // force a display refresh @@ -832,14 +815,15 @@ namespace Pamac { [GtkCallback] public void on_size_column_clicked () { - SortType new_order; - if (size_column.sort_indicator == false) - new_order = SortType.ASCENDING; - else { - if (sortinfo.sort_type == SortType.ASCENDING) - new_order = SortType.DESCENDING; - else - new_order = SortType.ASCENDING; + Gtk.SortType new_order; + if (size_column.sort_indicator == false) { + new_order = Gtk.SortType.ASCENDING; + } else { + if (sortinfo.sort_type == Gtk.SortType.ASCENDING) { + new_order = Gtk.SortType.DESCENDING; + } else { + new_order = Gtk.SortType.ASCENDING; + } } packages_list.sort_by_size (new_order); // force a display refresh @@ -851,17 +835,17 @@ namespace Pamac { string search_string = search_entry.get_text (); if (search_string != "") { this.get_window ().set_cursor (new Gdk.Cursor (Gdk.CursorType.WATCH)); - while (Gtk.events_pending ()) + while (Gtk.events_pending ()) { Gtk.main_iteration (); - search_pkgs.begin (search_string, (obj, res) => { - Json.Array aur_pkgs; - Alpm.List pkgs = search_pkgs.end (res, out aur_pkgs); - if (pkgs.length != 0 || aur_pkgs.get_length () != 0) { + } + transaction.search_pkgs.begin (search_string, search_aur_button.get_active (), (obj, res) => { + var pkgs = transaction.search_pkgs.end (res); + if (pkgs.length != 0) { // add search string in search_list if needed bool found = false; - TreeIter? iter; - TreeModel model; - TreeSelection selection = search_treeview.get_selection (); + Gtk.TreeIter? iter; + Gtk.TreeModel model; + Gtk.TreeSelection selection = search_treeview.get_selection (); // check if search string is already selected in search list if (selection.get_selected (out model, out iter)) { GLib.Value val; @@ -870,7 +854,7 @@ namespace Pamac { if (selected_string == search_string) { found = true; // we need to populate packages_list - populate_packages_list (pkgs, aur_pkgs); + populate_packages_list (pkgs); } else { search_list.foreach ((_model, _path, _iter) => { GLib.Value line; @@ -881,7 +865,7 @@ namespace Pamac { selection.changed.disconnect (on_search_treeview_selection_changed); selection.select_iter (_iter); selection.changed.connect_after (on_search_treeview_selection_changed); - populate_packages_list (pkgs, aur_pkgs); + populate_packages_list (pkgs); } return found; }); @@ -893,150 +877,145 @@ namespace Pamac { selection.changed.disconnect (on_search_treeview_selection_changed); selection.select_iter (iter); selection.changed.connect_after (on_search_treeview_selection_changed); - populate_packages_list (pkgs, aur_pkgs); + populate_packages_list (pkgs); } } else { // populate with empty lists - populate_packages_list (pkgs, aur_pkgs); + populate_packages_list (pkgs); } }); } } [GtkCallback] - public void on_search_entry_icon_press (EntryIconPosition p0, Gdk.Event? p1) { + public void on_search_entry_icon_press (Gtk.EntryIconPosition p0, Gdk.Event? p1) { on_search_entry_activate (); } [GtkCallback] public void on_search_treeview_selection_changed () { - TreeModel model; - TreeIter? iter; - TreeSelection selection = search_treeview.get_selection (); + Gtk.TreeModel model; + Gtk.TreeIter? iter; + Gtk.TreeSelection selection = search_treeview.get_selection (); if (selection.get_selected (out model, out iter)) { this.get_window ().set_cursor (new Gdk.Cursor (Gdk.CursorType.WATCH)); - while (Gtk.events_pending ()) + while (Gtk.events_pending ()) { Gtk.main_iteration (); + } GLib.Value val; model.get_value (iter, 0, out val); string search_string = val.get_string (); - search_pkgs.begin (search_string, (obj, res) => { - Json.Array aur_pkgs; - Alpm.List pkgs = search_pkgs.end (res, out aur_pkgs); - populate_packages_list (pkgs, aur_pkgs); + transaction.search_pkgs.begin (search_string, search_aur_button.get_active (), (obj, res) => { + var pkgs = transaction.search_pkgs.end (res); + populate_packages_list (pkgs); }); } } [GtkCallback] public void on_groups_treeview_selection_changed () { - TreeModel model; - TreeIter? iter; - TreeSelection selection = groups_treeview.get_selection (); + Gtk.TreeModel model; + Gtk.TreeIter? iter; + Gtk.TreeSelection selection = groups_treeview.get_selection (); if (selection.get_selected (out model, out iter)) { this.get_window ().set_cursor (new Gdk.Cursor (Gdk.CursorType.WATCH)); - while (Gtk.events_pending ()) + while (Gtk.events_pending ()) { Gtk.main_iteration (); + } GLib.Value val; model.get_value (iter, 0, out val); string grp_name = val.get_string (); - Alpm.List pkgs = group_pkgs_all_dbs (transaction.alpm_config.handle, grp_name); - populate_packages_list (pkgs); + transaction.get_group_pkgs.begin (grp_name, (obj, res) => { + var pkgs = transaction.get_group_pkgs.end (res); + populate_packages_list (pkgs); + }); } } [GtkCallback] public void on_states_treeview_selection_changed () { - TreeModel model; - TreeIter? iter; - TreeSelection selection = states_treeview.get_selection (); + Gtk.TreeModel model; + Gtk.TreeIter? iter; + Gtk.TreeSelection selection = states_treeview.get_selection (); if (selection.get_selected (out model, out iter)) { this.get_window ().set_cursor (new Gdk.Cursor (Gdk.CursorType.WATCH)); - while (Gtk.events_pending ()) + while (Gtk.events_pending ()) { Gtk.main_iteration (); + } GLib.Value val; model.get_value (iter, 0, out val); string state = val.get_string (); - var pkgs = new Alpm.List (); - unowned Alpm.Package? find_pkg = null; + Pamac.Package[] pkgs = {}; + Pamac.Package find_pkg; if (state == dgettext (null, "To install")) { foreach (string name in transaction.to_add.get_keys ()) { - find_pkg = transaction.alpm_config.handle.localdb.get_pkg (name); - if (find_pkg != null) - pkgs.add (find_pkg); - else { - find_pkg = get_syncpkg (transaction.alpm_config.handle, name); - if (find_pkg != null) - pkgs.add (find_pkg); + find_pkg = transaction.find_local_pkg (name); + if (find_pkg.name != "") { + pkgs += find_pkg; + } else { + find_pkg = transaction.find_sync_pkg (name); + if (find_pkg.name != "") { + pkgs += find_pkg; + } } } + populate_packages_list (pkgs); } else if (state == dgettext (null, "To remove")) { foreach (string name in transaction.to_remove.get_keys ()) { - find_pkg = transaction.alpm_config.handle.localdb.get_pkg (name); - if (find_pkg != null) - pkgs.add (find_pkg); + find_pkg = transaction.find_local_pkg (name); + if (find_pkg.name != "") { + pkgs += find_pkg; + } } + populate_packages_list (pkgs); } else if (state == dgettext (null, "Installed")) { - pkgs = transaction.alpm_config.handle.localdb.pkgcache.copy (); + transaction.get_installed_pkgs.begin ((obj, res) => { + pkgs = transaction.get_installed_pkgs.end (res); + populate_packages_list (pkgs); + }); } else if (state == dgettext (null, "Uninstalled")) { - foreach (var db in transaction.alpm_config.handle.syncdbs) { - if (pkgs.length == 0) - pkgs = db.pkgcache.copy (); - else { - pkgs.join (db.pkgcache.diff (pkgs, (Alpm.List.CompareFunc) pkgcmp)); - } - } + //transaction.get_sync_pkgs.begin ((obj, res) => { + //pkgs = transaction.get_sync_pkgs.end (res); + //populate_packages_list (pkgs); + //}); } else if (state == dgettext (null, "Orphans")) { - foreach (var pkg in transaction.alpm_config.handle.localdb.pkgcache) { - if (pkg.reason == Alpm.Package.Reason.DEPEND) { - if (pkg.compute_requiredby().length == 0) - pkgs.add (pkg); - } - } + transaction.get_orphans.begin ((obj, res) => { + pkgs = transaction.get_orphans.end (res); + populate_packages_list (pkgs); + }); } - populate_packages_list (pkgs); } } [GtkCallback] public void on_repos_treeview_selection_changed () { - TreeModel model; - TreeIter? iter; - TreeSelection selection = repos_treeview.get_selection (); + Gtk.TreeModel model; + Gtk.TreeIter? iter; + Gtk.TreeSelection selection = repos_treeview.get_selection (); if (selection.get_selected (out model, out iter)) { this.get_window ().set_cursor (new Gdk.Cursor (Gdk.CursorType.WATCH)); - while (Gtk.events_pending ()) + while (Gtk.events_pending ()) { Gtk.main_iteration (); + } GLib.Value val; model.get_value (iter, 0, out val); string repo = val.get_string (); - var pkgs = new Alpm.List (); - unowned Alpm.Package? find_pkg = null; if (repo == dgettext (null, "local")) { - foreach (var pkg in transaction.alpm_config.handle.localdb.pkgcache) { - find_pkg = get_syncpkg (transaction.alpm_config.handle, pkg.name); - if (find_pkg == null) - pkgs.add (pkg); - } + transaction.get_local_pkgs.begin ((obj, res) => { + var pkgs = transaction.get_local_pkgs.end (res); + populate_packages_list (pkgs); + }); } else { - foreach (var db in transaction.alpm_config.handle.syncdbs) { - if (db.name == repo) { - foreach (var pkg in db.pkgcache) { - find_pkg = transaction.alpm_config.handle.localdb.get_pkg (pkg.name); - if (find_pkg != null) - pkgs.add (find_pkg); - else - pkgs.add (pkg); - } - } - } + transaction.get_repo_pkgs.begin (repo, (obj, res) => { + var pkgs = transaction.get_repo_pkgs.end (res); + populate_packages_list (pkgs); + }); } - populate_packages_list (pkgs); } } [GtkCallback] - public void on_filters_notebook_switch_page (Widget page, uint page_num) { + public void on_filters_notebook_switch_page (Gtk.Widget page, uint page_num) { refresh_packages_list (); } @@ -1071,7 +1050,7 @@ namespace Pamac { [GtkCallback] public void on_local_item_activate () { int response = packages_chooser_dialog.run (); - if (response== ResponseType.ACCEPT) { + if (response== Gtk.ResponseType.ACCEPT) { SList packages_paths = packages_chooser_dialog.get_filenames (); if (packages_paths.length () != 0) { foreach (string path in packages_paths) { @@ -1083,17 +1062,17 @@ namespace Pamac { Gtk.main_iteration (); transaction.run (); } - } else + } else { packages_chooser_dialog.hide (); - while (Gtk.events_pending ()) + while (Gtk.events_pending ()) { Gtk.main_iteration (); + } + } } [GtkCallback] public void on_preferences_item_activate () { - bool changes = transaction.run_preferences_dialog (pamac_config); - if (changes) - search_aur_button.set_active (pamac_config.enable_aur); + transaction.run_preferences_dialog.begin (); } [GtkCallback] @@ -1105,17 +1084,16 @@ namespace Pamac { "comments", dgettext (null, "A Gtk3 frontend for libalpm"), "copyright", "Copyright © 2015 Guillaume Benoit", "version", VERSION, - "license_type", License.GPL_3_0, + "license_type", Gtk.License.GPL_3_0, "website", "http://manjaro.org"); } [GtkCallback] public void on_valid_button_clicked () { this.get_window ().set_cursor (new Gdk.Cursor (Gdk.CursorType.WATCH)); - while (Gtk.events_pending ()) + while (Gtk.events_pending ()) { Gtk.main_iteration (); - if (pamac_config.recurse) - transaction.flags |= Alpm.TransFlag.RECURSE; + } transaction.run (); } @@ -1129,11 +1107,14 @@ namespace Pamac { [GtkCallback] public void on_refresh_button_clicked () { - transaction.refresh (0); + this.get_window ().set_cursor (new Gdk.Cursor (Gdk.CursorType.WATCH)); + while (Gtk.events_pending ()) { + Gtk.main_iteration (); + } + transaction.start_refresh (0); } - public void on_emit_trans_finished (bool error) { - print ("transaction finished\n"); + public void on_transaction_finished (bool error) { if (error == false) { set_buttons_sensitive (false); refresh_packages_list (); diff --git a/src/mirrors_config.vala b/src/mirrors_config.vala index 97f53d3..c3fa78e 100644 --- a/src/mirrors_config.vala +++ b/src/mirrors_config.vala @@ -1,7 +1,7 @@ /* * pamac-vala * - * Copyright (C) 2014 Guillaume Benoit + * Copyright (C) 2014-2015 Guillaume Benoit * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -57,9 +57,9 @@ namespace Alpm { public void parse_file (string path) { var file = GLib.File.new_for_path (path); - if (file.query_exists () == false) + if (file.query_exists () == false) { GLib.stderr.printf ("File '%s' doesn't exist.\n", path); - else { + } else { try { // Open file for reading and wrap returned FileInputStream into a // DataInputStream, so we can read line by line @@ -68,19 +68,25 @@ namespace Alpm { // Read lines until end of file (null) is reached while ((line = dis.read_line (null)) != null) { line = line.strip (); - if (line.length == 0) continue; - if (line[0] == '#') continue; + if (line.length == 0) { + continue; + } + if (line[0] == '#') { + continue; + } string[] splitted = line.split ("="); string _key = splitted[0].strip (); string _value = null; - if (splitted[1] != null) + if (splitted[1] != null) { _value = splitted[1].strip (); - if (_key == "Method") + } + if (_key == "Method") { choosen_generation_method = _value; - else if (_key == "OnlyCountry") + } else if (_key == "OnlyCountry") { choosen_country = _value; - else if (_key == "MirrorlistsDir") + } else if (_key == "MirrorlistsDir") { mirrorlists_dir = _value.replace ("\"", ""); + } } } catch (Error e) { GLib.stderr.printf("%s\n", e.message); @@ -90,9 +96,9 @@ namespace Alpm { public void write (HashTable new_conf) { var file = GLib.File.new_for_path (conf_path); - if (file.query_exists () == false) + if (file.query_exists () == false) { GLib.stderr.printf ("File '%s' doesn't exist.\n", file.get_path ()); - else { + } else { try { // Open file for reading and wrap returned FileInputStream into a // DataInputStream, so we can read line by line @@ -105,19 +111,23 @@ namespace Alpm { if (new_conf.contains ("Method")) { string _value = new_conf.get ("Method").get_string (); data += "Method=%s\n".printf (_value); - } else + } else { data += line + "\n"; + } } else if (line.contains ("OnlyCountry")) { if (new_conf.contains ("OnlyCountry")) { string _value = new_conf.get ("OnlyCountry").get_string (); - if (_value == dgettext (null, "Worldwide")) + if (_value == dgettext (null, "Worldwide")) { data += "#%s\n".printf (line); - else + } else { data += "OnlyCountry=%s\n".printf (_value); - } else + } + } else { data += line + "\n"; - } else + } + } else { data += line + "\n"; + } } // delete the file before rewrite it file.delete (); diff --git a/src/package.vala b/src/package.vala index ac7a280..b58a22b 100644 --- a/src/package.vala +++ b/src/package.vala @@ -1,7 +1,7 @@ /* * pamac-vala * - * Copyright (C) 2014 Guillaume Benoit + * Copyright (C) 2014-2015 Guillaume Benoit * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,44 +18,77 @@ */ namespace Pamac { - public class Package: Object { - public unowned Alpm.Package? alpm_pkg; - public unowned Json.Object? aur_json; + public struct Package { public string name; public string version; + public string desc; public string repo; public uint64 size; public string size_string; + public string url; + public string licenses; + public int reason; public Package (Alpm.Package? alpm_pkg, Json.Object? aur_json) { if (alpm_pkg != null) { - this.alpm_pkg = alpm_pkg; - this.aur_json = null; name = alpm_pkg.name; version = alpm_pkg.version; - if (alpm_pkg.db != null) - repo = alpm_pkg.db.name; - else - repo = ""; + desc = alpm_pkg.desc; + repo = alpm_pkg.db != null ? alpm_pkg.db.name : ""; size = alpm_pkg.isize; size_string = format_size (alpm_pkg.isize); + // alpm pkg url can be null + url = alpm_pkg.url ?? ""; + StringBuilder licenses_build = new StringBuilder (); + foreach (var license in alpm_pkg.licenses) { + if (licenses_build.len != 0) { + licenses_build.append (" "); + } + licenses_build.append (license); + } + licenses = licenses_build.str; + reason = alpm_pkg.reason; } else if (aur_json != null ) { - this.alpm_pkg = null; - this.aur_json = aur_json; name = aur_json.get_string_member ("Name"); version = aur_json.get_string_member ("Version"); + desc = aur_json.get_string_member ("Description"); repo = "AUR"; size = 0; size_string = ""; + url = aur_json.get_string_member ("URL"); + licenses = aur_json.get_string_member ("License"); + reason = 0; } else { - this.alpm_pkg = null; - this.aur_json = null; - name = dgettext (null, "No package found"); + name = ""; version = ""; + desc = ""; repo = ""; size = 0; size_string = ""; + url = ""; + licenses= ""; + reason = 0; } } } + + public struct PackageDetails { + string repo; + string has_signature; + int reason; + string packager; + string install_date; + string[] groups; + string[] backups; + } + + public struct PackageDeps { + string repo; + string[] depends; + string[] optdepends; + string[] requiredby; + string[] provides; + string[] replaces; + string[] conflicts; + } } diff --git a/src/packages_chooser_dialog.vala b/src/packages_chooser_dialog.vala index e3edaf6..bd6f3ef 100644 --- a/src/packages_chooser_dialog.vala +++ b/src/packages_chooser_dialog.vala @@ -1,7 +1,7 @@ /* * pamac-vala * - * Copyright (C) 2014 Guillaume Benoit + * Copyright (C) 2014-2015 Guillaume Benoit * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -46,8 +46,9 @@ namespace Pamac { } window.get_window ().set_cursor (new Gdk.Cursor (Gdk.CursorType.WATCH)); this.hide (); - while (Gtk.events_pending ()) + while (Gtk.events_pending ()) { Gtk.main_iteration (); + } transaction.run (); } } diff --git a/src/packages_model.vala b/src/packages_model.vala index 0a79733..9f52450 100644 --- a/src/packages_model.vala +++ b/src/packages_model.vala @@ -1,7 +1,7 @@ /* * pamac-vala * - * Copyright (C) 2014 Guillaume Benoit + * Copyright (C) 2014-2015 Guillaume Benoit * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,32 +20,20 @@ namespace Pamac { public class PackagesModel : Object, Gtk.TreeModel { - private GLib.List all_pkgs; + private GLib.List all_pkgs; public ManagerWindow manager_window; - public PackagesModel (Alpm.List? alpm_pkgs, Json.Array? aur_pkgs, ManagerWindow manager_window) { + public PackagesModel (Pamac.Package[] pkgs, ManagerWindow manager_window) { this.manager_window = manager_window; - all_pkgs = new GLib.List (); - foreach (unowned Alpm.Package alpm_pkg in alpm_pkgs) { - all_pkgs.append (new Pamac.Package (alpm_pkg, null)); - } - bool found; - foreach (var node in aur_pkgs.get_elements ()) { - // add only the packages which are not already in the list - found = false; - foreach (Pamac.Package pkg in all_pkgs) { - if (pkg.name == node.get_object ().get_string_member ("Name")) { - found = true; - break; - } - } - if (found == false) { - all_pkgs.append (new Pamac.Package (null, node.get_object ())); - } + all_pkgs = new GLib.List (); + foreach (var pkg in pkgs) { + all_pkgs.append (pkg); } if (all_pkgs.length () == 0) { // create a fake "No package found" package - all_pkgs.append (new Pamac.Package (null, null)); + var fake_pkg = Pamac.Package (null, null); + fake_pkg.name = dgettext (null, "No package found"); + all_pkgs.append (fake_pkg); } } @@ -69,8 +57,7 @@ namespace Pamac { } public void get_value (Gtk.TreeIter iter, int column, out Value val) { - Pamac.Package pkg = (Pamac.Package) iter.user_data; - return_if_fail (pkg != null); + Pamac.Package pkg = all_pkgs.nth_data (iter.stamp); switch (column) { case 0: val = Value (typeof (string)); @@ -78,29 +65,30 @@ namespace Pamac { break; case 1: val = Value (typeof (Object)); - if (pkg.alpm_pkg != null) { - if (manager_window.transaction.alpm_config.holdpkgs.find_custom (pkg.name, strcmp) != null) - val.set_object (manager_window.locked_icon); - else if (pkg.repo == "local") { - if (manager_window.transaction.to_add.contains (pkg.name)) + if (pkg.repo == "local") { + if (manager_window.transaction.should_hold (pkg.name)) { + val.set_object (manager_window.locked_icon); + } else if (manager_window.transaction.to_add.contains (pkg.name)) { val.set_object (manager_window.to_reinstall_icon); - else if (manager_window.transaction.to_remove.contains (pkg.name)) + } else if (manager_window.transaction.to_remove.contains (pkg.name)) { val.set_object (manager_window.to_remove_icon); - else + } else { val.set_object (manager_window.installed_icon); - } else if (manager_window.transaction.to_add.contains (pkg.name)) + } + } else if (pkg.repo == "AUR") { + if (manager_window.transaction.to_build.contains (pkg.name)) { + val.set_object (manager_window.to_install_icon); + } else { + val.set_object (manager_window.uninstalled_icon); + } + } else if (pkg.name == dgettext (null, "No package found")) { + Object? object = null; + val.set_object (object); + } else if (manager_window.transaction.to_add.contains (pkg.name)) { val.set_object (manager_window.to_install_icon); - else + } else { val.set_object (manager_window.uninstalled_icon); - } else if (pkg.aur_json != null) { - if (manager_window.transaction.to_build.contains (pkg.name)) - val.set_object (manager_window.to_install_icon); - else - val.set_object (manager_window.uninstalled_icon); - } else { - Object? object = null; - val.set_object (object); - } + } break; case 2: val = Value (typeof (string)); @@ -127,8 +115,6 @@ namespace Pamac { iter = Gtk.TreeIter (); int pos = path.get_indices ()[0]; iter.stamp = pos; - Pamac.Package pkg = all_pkgs.nth_data((uint) pos); - iter.user_data = pkg; return true; } @@ -151,8 +137,6 @@ namespace Pamac { return false; } iter.stamp = pos; - Pamac.Package pkg = all_pkgs.nth_data((uint) pos); - iter.user_data = pkg; return true; } @@ -162,8 +146,6 @@ namespace Pamac { return false; } iter.stamp = (--pos); - Pamac.Package pkg = all_pkgs.nth_data((uint) pos); - iter.user_data = pkg; return true; } @@ -189,14 +171,20 @@ namespace Pamac { return false; } + // custom get pkg function + public Pamac.Package get_pkg_at_path (Gtk.TreePath path) { + return all_pkgs.nth_data (path.get_indices ()[0]); + } + // custom sort functions public void sort_by_name (Gtk.SortType order) { - CompareFunc namecmp = (pkg_a, pkg_b) => { + CompareFunc namecmp = (pkg_a, pkg_b) => { return strcmp (pkg_a.name, pkg_b.name); }; all_pkgs.sort (namecmp); - if (order == Gtk.SortType.DESCENDING) + if (order == Gtk.SortType.DESCENDING) { all_pkgs.reverse (); + } manager_window.name_column.sort_order = order; manager_window.state_column.sort_indicator = false; manager_window.name_column.sort_indicator = true; @@ -208,28 +196,25 @@ namespace Pamac { } public void sort_by_state (Gtk.SortType order) { - CompareFunc statecmp = (pkg_a, pkg_b) => { + CompareFunc statecmp = (pkg_a, pkg_b) => { int state_a; int state_b; - if (pkg_a.alpm_pkg != null) { - if (pkg_a.repo == "local") + if (pkg_a.repo == "local") { state_a = 0; - else + } else { state_a = 1; - } else - state_a = 1; - if (pkg_b.alpm_pkg != null) { - if (pkg_b.repo == "local") + } + if (pkg_b.repo == "local") { state_b = 0; - else + } else { state_b = 1; - } else - state_b = 1; + } return (int) (state_a > state_b) - (int) (state_a < state_b); }; all_pkgs.sort (statecmp); - if (order == Gtk.SortType.DESCENDING) + if (order == Gtk.SortType.DESCENDING) { all_pkgs.reverse (); + } manager_window.state_column.sort_order = order; manager_window.state_column.sort_indicator = true; manager_window.name_column.sort_indicator = false; @@ -241,12 +226,13 @@ namespace Pamac { } public void sort_by_version (Gtk.SortType order) { - CompareFunc versioncmp = (pkg_a, pkg_b) => { + CompareFunc versioncmp = (pkg_a, pkg_b) => { return Alpm.pkg_vercmp (pkg_a.version, pkg_b.version); }; all_pkgs.sort (versioncmp); - if (order == Gtk.SortType.DESCENDING) + if (order == Gtk.SortType.DESCENDING) { all_pkgs.reverse (); + } manager_window.version_column.sort_order = order; manager_window.state_column.sort_indicator = false; manager_window.name_column.sort_indicator = false; @@ -258,12 +244,13 @@ namespace Pamac { } public void sort_by_repo (Gtk.SortType order) { - CompareFunc repocmp = (pkg_a, pkg_b) => { + CompareFunc repocmp = (pkg_a, pkg_b) => { return strcmp (pkg_a.repo, pkg_b.repo); }; all_pkgs.sort (repocmp); - if (order == Gtk.SortType.DESCENDING) + if (order == Gtk.SortType.DESCENDING) { all_pkgs.reverse (); + } manager_window.repo_column.sort_order = order; manager_window.state_column.sort_indicator = false; manager_window.name_column.sort_indicator = false; @@ -275,22 +262,13 @@ namespace Pamac { } public void sort_by_size (Gtk.SortType order) { - CompareFunc sizecmp = (pkg_a, pkg_b) => { - uint64 size_a; - uint64 size_b; - if (pkg_a.alpm_pkg != null) - size_a = pkg_a.size; - else - size_a = 0; - if (pkg_b.alpm_pkg != null) - size_b = pkg_b.size; - else - size_b = 0; - return (int) (size_a > size_b) - (int) (size_a < size_b); + CompareFunc sizecmp = (pkg_a, pkg_b) => { + return (int) (pkg_a.size > pkg_b.size) - (int) (pkg_a.size < pkg_b.size); }; all_pkgs.sort (sizecmp); - if (order == Gtk.SortType.DESCENDING) + if (order == Gtk.SortType.DESCENDING) { all_pkgs.reverse (); + } manager_window.size_column.sort_order = order; manager_window.state_column.sort_indicator = false; manager_window.name_column.sort_indicator = false; diff --git a/src/pamac_config.vala b/src/pamac_config.vala index 896e23d..3db0d5c 100644 --- a/src/pamac_config.vala +++ b/src/pamac_config.vala @@ -1,7 +1,7 @@ /* * pamac-vala * - * Copyright (C) 2014 Guillaume Benoit + * Copyright (C) 2014-2015 Guillaume Benoit * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -40,9 +40,9 @@ namespace Pamac { public void parse_file (string path) { var file = GLib.File.new_for_path (path); - if (file.query_exists () == false) + if (file.query_exists () == false) { GLib.stderr.printf ("File '%s' doesn't exist.\n", path); - else { + } else { try { // Open file for reading and wrap returned FileInputStream into a // DataInputStream, so we can read line by line @@ -51,19 +51,25 @@ namespace Pamac { // Read lines until end of file (null) is reached while ((line = dis.read_line (null)) != null) { line = line.strip (); - if (line.length == 0) continue; - if (line[0] == '#') continue; + if (line.length == 0) { + continue; + } + if (line[0] == '#') { + continue; + } string[] splitted = line.split ("="); string _key = splitted[0].strip (); string _value = null; - if (splitted[1] != null) + if (splitted[1] != null) { _value = splitted[1].strip (); - if (_key == "RefreshPeriod") + } + if (_key == "RefreshPeriod") { refresh_period = int.parse (_value); - else if (_key == "EnableAUR") + } else if (_key == "EnableAUR") { enable_aur = true; - else if (_key == "RemoveUnrequiredDeps") + } else if (_key == "RemoveUnrequiredDeps") { recurse = true; + } } } catch (GLib.Error e) { GLib.stderr.printf("%s\n", e.message); @@ -73,9 +79,9 @@ namespace Pamac { public void write (HashTable new_conf) { var file = GLib.File.new_for_path (conf_path); - if (file.query_exists () == false) + if (file.query_exists () == false) { GLib.stderr.printf ("File '%s' doesn't exist.\n", conf_path); - else { + } else { try { // Open file for reading and wrap returned FileInputStream into a // DataInputStream, so we can read line by line @@ -84,33 +90,41 @@ namespace Pamac { string[] data = {}; // Read lines until end of file (null) is reached while ((line = dis.read_line (null)) != null) { - if (line.length == 0) continue; + if (line.length == 0) { + continue; + } if (line.contains ("RefreshPeriod")) { if (new_conf.contains ("RefreshPeriod")) { int _value = new_conf.get ("RefreshPeriod").get_int32 (); data += "RefreshPeriod = %u\n".printf (_value); - } else + } else { data += line + "\n"; + } } else if (line.contains ("EnableAUR")) { if (new_conf.contains ("EnableAUR")) { bool _value = new_conf.get ("EnableAUR").get_boolean (); - if (_value == true) + if (_value == true) { data += "EnableAUR\n"; - else + } else { data += "#EnableAUR\n"; - } else + } + } else { data += line + "\n"; + } } else if (line.contains ("RemoveUnrequiredDeps")) { if (new_conf.contains ("RemoveUnrequiredDeps")) { bool _value = new_conf.get ("RemoveUnrequiredDeps").get_boolean (); - if (_value == true) + if (_value == true) { data += "RemoveUnrequiredDeps\n"; - else + } else { data += "#RemoveUnrequiredDeps\n"; - } else + } + } else { data += line + "\n"; - } else + } + } else { data += line + "\n"; + } } // delete the file before rewrite it file.delete (); diff --git a/src/preferences_dialog.vala b/src/preferences_dialog.vala index 6935ea4..1140d33 100644 --- a/src/preferences_dialog.vala +++ b/src/preferences_dialog.vala @@ -1,7 +1,7 @@ /* * pamac-vala * - * Copyright (C) 2014 Guillaume Benoit + * Copyright (C) 2014 Guillaume Benoit * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/progress_dialog.vala b/src/progress_dialog.vala index 9353da0..9f912e4 100644 --- a/src/progress_dialog.vala +++ b/src/progress_dialog.vala @@ -1,7 +1,7 @@ /* * pamac-vala * - * Copyright (C) 2014 Guillaume Benoit + * Copyright (C) 2014-2015 Guillaume Benoit * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -44,8 +44,9 @@ namespace Pamac { [GtkCallback] public void on_close_button_clicked () { this.hide (); - while (Gtk.events_pending ()) + while (Gtk.events_pending ()) { Gtk.main_iteration (); + } } [GtkCallback] @@ -55,8 +56,9 @@ namespace Pamac { transaction.spawn_in_term ({"/usr/bin/echo", dgettext (null, "Transaction cancelled") + ".\n"}); this.hide (); transaction.finished (false); - while (Gtk.events_pending ()) + while (Gtk.events_pending ()) { Gtk.main_iteration (); + } } } } diff --git a/src/refresh.vala b/src/refresh.vala index 8f764cc..85f11b6 100644 --- a/src/refresh.vala +++ b/src/refresh.vala @@ -1,7 +1,7 @@ /* * pamac-vala * - * Copyright (C) 2014 Guillaume Benoit + * Copyright (C) 2014 Guillaume Benoit * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/transaction.vala b/src/transaction.vala index 192e6ea..1785aa0 100644 --- a/src/transaction.vala +++ b/src/transaction.vala @@ -1,7 +1,7 @@ /* * pamac-vala * - * Copyright (C) 2014, 2015 Guillaume Benoit + * Copyright (C) 2014-2015 Guillaume Benoit * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,30 +17,45 @@ * along with this program. If not, see . */ -using Gtk; -using Vte; -using Alpm; - namespace Pamac { [DBus (name = "org.manjaro.pamac")] public interface Daemon : Object { - public abstract void write_pamac_config (HashTable new_pamac_conf) throws IOError; - public abstract void write_alpm_config (HashTable new_alpm_conf) throws IOError; - public abstract void write_mirrors_config (HashTable new_mirrors_conf) throws IOError; - public abstract void set_pkgreason (string pkgname, uint reason) throws IOError; - public abstract void refresh (int force, bool emit_signal) throws IOError; - public abstract UpdatesInfos[] get_updates () throws IOError; - public abstract ErrorInfos trans_init (TransFlag transflags) throws IOError; + public abstract void start_write_pamac_config (HashTable new_pamac_conf) throws IOError; + public abstract void start_write_alpm_config (HashTable new_alpm_conf) throws IOError; + public abstract void start_write_mirrors_config (HashTable new_mirrors_conf) throws IOError; + public abstract void start_set_pkgreason (string pkgname, uint reason) throws IOError; + public abstract void start_refresh (int force, bool emit_finish_signal) throws IOError; + public abstract bool get_checkspace () throws IOError; + public abstract string get_syncfirst () throws IOError; + public abstract string get_ignorepkg () throws IOError; + public abstract bool should_hold (string pkgname) throws IOError; + public abstract async Pamac.Package[] get_all_pkgs () throws IOError; + public abstract async Pamac.Package[] get_installed_pkgs () throws IOError; + public abstract async Pamac.Package[] get_local_pkgs () throws IOError; + public abstract async Pamac.Package[] get_orphans () throws IOError; + public abstract Pamac.Package find_local_pkg (string pkgname) throws IOError; + public abstract Pamac.Package find_sync_pkg (string pkgname) throws IOError; + public abstract async Pamac.Package[] search_pkgs (string search_string, bool search_aur) throws IOError; + public abstract string[] get_repos_names () throws IOError; + public abstract async Pamac.Package[] get_repo_pkgs (string repo) throws IOError; + public abstract string[] get_groups_names () throws IOError; + public abstract async Pamac.Package[] get_group_pkgs (string group_name) throws IOError; + public abstract string[] get_pkg_files (string pkgname) throws IOError; + public abstract string[] get_pkg_uninstalled_optdeps (string pkgname) throws IOError; + public abstract PackageDeps get_pkg_deps (string pkgname) throws IOError; + public abstract PackageDetails get_pkg_details (string pkgname) throws IOError; + public abstract async Updates get_updates () throws IOError; + public abstract ErrorInfos trans_init (Alpm.TransFlag transflags) throws IOError; public abstract ErrorInfos trans_sysupgrade (int enable_downgrade) throws IOError; public abstract ErrorInfos trans_add_pkg (string pkgname) throws IOError; public abstract ErrorInfos trans_remove_pkg (string pkgname) throws IOError; public abstract ErrorInfos trans_load_pkg (string pkgpath) throws IOError; - public abstract void trans_prepare () throws IOError; + public abstract void start_trans_prepare () throws IOError; public abstract void choose_provider (int provider) throws IOError; - public abstract UpdatesInfos[] trans_to_add () throws IOError; - public abstract UpdatesInfos[] trans_to_remove () throws IOError; - public abstract void trans_commit () throws IOError; - public abstract void trans_release () throws IOError; + public abstract UpdateInfos[] trans_to_add () throws IOError; + public abstract UpdateInfos[] trans_to_remove () throws IOError; + public abstract void start_trans_commit () throws IOError; + public abstract int trans_release () throws IOError; public abstract void trans_cancel () throws IOError; [DBus (no_reply = true)] public abstract void quit () throws IOError; @@ -50,12 +65,16 @@ namespace Pamac { public signal void emit_download (string filename, uint64 xfered, uint64 total); public signal void emit_totaldownload (uint64 total); public signal void emit_log (uint level, string msg); - public signal void emit_refreshed (ErrorInfos error); - public signal void emit_trans_prepared (ErrorInfos error); - public signal void emit_trans_committed (ErrorInfos error); - public signal void emit_generate_mirrorlist_start (); - public signal void emit_generate_mirrorlist_data (string line); - public signal void emit_generate_mirrorlist_finished (); + public signal void set_pkgreason_finished (); + public signal void refresh_finished (ErrorInfos error); + public signal void trans_prepare_finished (ErrorInfos error); + public signal void trans_commit_finished (ErrorInfos error); + public signal void write_pamac_config_finished (int refresh_period, bool enable_aur, bool recurse); + public signal void write_alpm_config_finished (); + public signal void write_mirrors_config_finished (); + public signal void generate_mirrorlist_start (); + public signal void generate_mirrorlist_data (string line); + public signal void generate_mirrorlist_finished (); } public enum TransactionType { @@ -67,9 +86,6 @@ namespace Pamac { public class Transaction: Object { public Daemon daemon; - public Alpm.Config alpm_config; - public Alpm.MirrorsConfig mirrors_config; - public Alpm.TransFlag flags; // those hashtables will be used as set public HashTable to_add; @@ -92,12 +108,9 @@ namespace Pamac { //bool sysupgrade_after_build; int build_status; int enable_downgrade; - public bool check_aur; - UpdatesInfos[] aur_updates; - bool aur_checked; - Terminal term; - Pty pty; + Vte.Terminal term; + Vte.Pty pty; //dialogs TransactionSumDialog transaction_sum_dialog; @@ -105,14 +118,12 @@ namespace Pamac { ProgressDialog progress_dialog; PreferencesDialog preferences_dialog; //parent window - ApplicationWindow? window; + Gtk.ApplicationWindow? window; - public signal void finished (bool error); + public signal void finished (bool with_error); + public signal void enable_aur (bool enable); - public Transaction (ApplicationWindow? window) { - alpm_config = new Alpm.Config ("/etc/pacman.conf"); - mirrors_config = new Alpm.MirrorsConfig ("/etc/pacman-mirrors.conf"); - mode = Mode.MANAGER; + public Transaction (Gtk.ApplicationWindow? window) { flags = Alpm.TransFlag.CASCADE; to_add = new HashTable (str_hash, str_equal); to_remove = new HashTable (str_hash, str_equal); @@ -126,24 +137,24 @@ namespace Pamac { progress_dialog = new ProgressDialog (this, window); preferences_dialog = new PreferencesDialog (window); //creating terminal - term = new Terminal (); + term = new Vte.Terminal (); term.scroll_on_output = false; term.expand = true; term.height_request = 200; term.set_visible (true); // creating pty for term try { - pty = term.pty_new_sync (PtyFlags.NO_HELPER); + pty = term.pty_new_sync (Vte.PtyFlags.NO_HELPER); } catch (Error e) { stderr.printf ("Error: %s\n", e.message); } // connect to child_exited signal which will only be emit after a call to watch_child term.child_exited.connect (on_term_child_exited); // add term in a grid with a scrollbar - var grid = new Grid (); + var grid = new Gtk.Grid (); grid.expand = true; grid.set_visible (true); - var sb = new Scrollbar (Orientation.VERTICAL, term.vadjustment); + var sb = new Gtk.Scrollbar (Gtk.Orientation.VERTICAL, term.vadjustment); sb.set_visible (true); grid.attach (term, 0, 0, 1, 1); grid.attach (sb, 1, 0, 1, 1); @@ -158,49 +169,41 @@ namespace Pamac { sysupgrade_after_trans = false; //sysupgrade_after_build = false; build_status = 0; - check_aur = false; - aur_updates = {}; - aur_checked = false; } - public void write_pamac_config (HashTable new_pamac_conf) { + public void start_write_pamac_config (HashTable new_pamac_conf) { try { - daemon.write_pamac_config (new_pamac_conf); + daemon.start_write_pamac_config (new_pamac_conf); } catch (IOError e) { stderr.printf ("IOError: %s\n", e.message); } } - public void write_alpm_config (HashTable new_alpm_conf) { + public void start_write_alpm_config (HashTable new_alpm_conf) { try { - daemon.write_alpm_config (new_alpm_conf); + daemon.start_write_alpm_config (new_alpm_conf); } catch (IOError e) { stderr.printf ("IOError: %s\n", e.message); } } - public void write_mirrors_config (HashTable new_mirrors_conf) { + public void start_write_mirrors_config (HashTable new_mirrors_conf) { try { - daemon.write_mirrors_config (new_mirrors_conf); + daemon.start_write_mirrors_config (new_mirrors_conf); } catch (IOError e) { stderr.printf ("IOError: %s\n", e.message); } } - public void set_pkgreason (string pkgname, Alpm.Package.Reason reason) { + public void start_set_pkgreason (string pkgname, Alpm.Package.Reason reason) { try { - daemon.set_pkgreason (pkgname, (uint) reason); - refresh_handle (); + daemon.start_set_pkgreason (pkgname, (uint) reason); } catch (IOError e) { stderr.printf ("IOError: %s\n", e.message); } } - public void refresh_handle () { - alpm_config.get_handle (); - } - - public void refresh (int force) { + public void start_refresh (int force) { string action = dgettext (null, "Synchronizing package databases") + "..."; spawn_in_term ({"echo", action}); progress_dialog.action_label.set_text (action); @@ -209,15 +212,216 @@ namespace Pamac { progress_dialog.cancel_button.set_visible (true); progress_dialog.close_button.set_visible (false); progress_dialog.show (); - while (Gtk.events_pending ()) + while (Gtk.events_pending ()) { Gtk.main_iteration (); + } try { - daemon.refresh (force, true); + daemon.start_refresh (force, true); } catch (IOError e) { stderr.printf ("IOError: %s\n", e.message); } } + public bool get_checkspace () { + bool checkspace = false; + try { + checkspace = daemon.get_checkspace (); + } catch (IOError e) { + stderr.printf ("IOError: %s\n", e.message); + } + return checkspace; + } + + public string get_syncfirst () { + string syncfirst = ""; + try { + syncfirst = daemon.get_syncfirst (); + } catch (IOError e) { + stderr.printf ("IOError: %s\n", e.message); + } + return syncfirst; + } + + public string get_ignorepkg () { + string ignorepkg = ""; + try { + ignorepkg = daemon.get_ignorepkg (); + } catch (IOError e) { + stderr.printf ("IOError: %s\n", e.message); + } + return ignorepkg; + } + + public bool should_hold (string pkgname) { + bool should_hold = false; + try { + should_hold = daemon.should_hold (pkgname); + } catch (IOError e) { + stderr.printf ("IOError: %s\n", e.message); + } + return should_hold; + } + + public async Pamac.Package[] get_all_pkgs () { + Pamac.Package[] pkgs = {}; + try { + pkgs = yield daemon.get_all_pkgs (); + } catch (IOError e) { + stderr.printf ("IOError: %s\n", e.message); + } + return pkgs; + } + + public async Pamac.Package[] get_installed_pkgs () { + Pamac.Package[] pkgs = {}; + try { + pkgs = yield daemon.get_installed_pkgs (); + } catch (IOError e) { + stderr.printf ("IOError: %s\n", e.message); + } + return pkgs; + } + + public async Pamac.Package[] get_local_pkgs () { + Pamac.Package[] pkgs = {}; + try { + pkgs = yield daemon.get_local_pkgs (); + } catch (IOError e) { + stderr.printf ("IOError: %s\n", e.message); + } + return pkgs; + } + + public async Pamac.Package[] get_orphans () { + Pamac.Package[] pkgs = {}; + try { + pkgs = yield daemon.get_orphans (); + } catch (IOError e) { + stderr.printf ("IOError: %s\n", e.message); + } + return pkgs; + } + + public Pamac.Package find_local_pkg (string pkgname) { + var pkg = Pamac.Package (null, null); + try { + pkg = daemon.find_local_pkg (pkgname); + } catch (IOError e) { + stderr.printf ("IOError: %s\n", e.message); + } + return pkg; + } + + public Pamac.Package find_sync_pkg (string pkgname) { + var pkg = Pamac.Package (null, null); + try { + pkg = daemon.find_sync_pkg (pkgname); + } catch (IOError e) { + stderr.printf ("IOError: %s\n", e.message); + } + return pkg; + } + + public async Pamac.Package[] search_pkgs (string search_string, bool search_aur) { + Pamac.Package[] pkgs = {}; + try { + pkgs = yield daemon.search_pkgs (search_string, search_aur); + } catch (IOError e) { + stderr.printf ("IOError: %s\n", e.message); + } + return pkgs; + } + + public string[] get_repos_names () { + string[] repos_names = {}; + try { + repos_names = daemon.get_repos_names (); + } catch (IOError e) { + stderr.printf ("IOError: %s\n", e.message); + } + return repos_names; + } + + public async Pamac.Package[] get_repo_pkgs (string repo) { + Pamac.Package[] pkgs = {}; + try { + pkgs = yield daemon.get_repo_pkgs (repo); + } catch (IOError e) { + stderr.printf ("IOError: %s\n", e.message); + } + return pkgs; + } + + public string[] get_groups_names () { + string[] groups_names = {}; + try { + groups_names = daemon.get_groups_names (); + } catch (IOError e) { + stderr.printf ("IOError: %s\n", e.message); + } + return groups_names; + } + + public async Pamac.Package[] get_group_pkgs (string group_name) { + Pamac.Package[] pkgs = {}; + try { + pkgs = yield daemon.get_group_pkgs (group_name); + } catch (IOError e) { + stderr.printf ("IOError: %s\n", e.message); + } + return pkgs; + } + + public string[] get_pkg_files (string pkgname) { + string[] files = {}; + try { + files = daemon.get_pkg_files (pkgname); + } catch (IOError e) { + stderr.printf ("IOError: %s\n", e.message); + } + return files; + } + + public string[] get_pkg_uninstalled_optdeps (string pkgname) { + string[] optdeps = {}; + try { + optdeps = daemon.get_pkg_uninstalled_optdeps (pkgname); + } catch (IOError e) { + stderr.printf ("IOError: %s\n", e.message); + } + return optdeps; + } + + public PackageDeps get_pkg_deps (string pkgname) { + var deps = PackageDeps (); + try { + deps = daemon.get_pkg_deps (pkgname); + } catch (IOError e) { + stderr.printf ("IOError: %s\n", e.message); + } + return deps; + } + + public PackageDetails get_pkg_details (string pkgname) { + var details = PackageDetails (); + try { + details = daemon.get_pkg_details (pkgname); + } catch (IOError e) { + stderr.printf ("IOError: %s\n", e.message); + } + return details; + } + + public async Updates get_updates () { + var updates = Updates (); + try { + updates = yield daemon.get_updates (); + } catch (IOError e) { + stderr.printf ("IOError: %s\n", e.message); + } + return updates; + } + public void sysupgrade_simple (int enable_downgrade) { progress_dialog.progressbar.set_fraction (0); progress_dialog.cancel_button.set_visible (true); @@ -241,7 +445,7 @@ namespace Pamac { while (Gtk.events_pending ()) Gtk.main_iteration (); try { - daemon.trans_prepare (); + daemon.start_trans_prepare (); } catch (IOError e) { stderr.printf ("IOError: %s\n", e.message); } @@ -262,45 +466,45 @@ namespace Pamac { progress_dialog.progressbar.set_text (""); progress_dialog.cancel_button.set_visible (true); progress_dialog.close_button.set_visible (false); - while (Gtk.events_pending ()) + while (Gtk.events_pending ()) { Gtk.main_iteration (); - // sysupgrade - // get syncfirst updates - UpdatesInfos[] syncfirst_updates = get_syncfirst_updates (alpm_config.handle, alpm_config.syncfirsts); - if (syncfirst_updates.length != 0) { - clear_lists (); - if (mode == Mode.MANAGER) - sysupgrade_after_trans = true; - foreach (UpdatesInfos infos in syncfirst_updates) - to_add.insert (infos.name, infos.name); - // run as a standard transaction - run (); - } else { - UpdatesInfos[] repos_updates = get_repos_updates (alpm_config.handle); - int repos_updates_len = repos_updates.length; - if (check_aur) { - if (aur_checked == false) { - aur_updates = get_aur_updates (alpm_config.handle); - aur_checked = true; - } - if (aur_updates.length != 0) { - clear_lists (); - //if (repos_updates_len != 0) - //sysupgrade_after_build = true; - foreach (UpdatesInfos infos in aur_updates) - to_build.insert (infos.name, infos.name); - } - } - if (repos_updates_len != 0) - sysupgrade_simple (enable_downgrade); - else { - progress_dialog.show (); - while (Gtk.events_pending ()) - Gtk.main_iteration (); - ErrorInfos err = ErrorInfos (); - on_emit_trans_prepared (err); - } } + // sysupgrade + get_updates.begin ((obj, res) => { + Updates updates = get_updates.end (res); + // get syncfirst updates + if (updates.is_syncfirst) { + clear_lists (); + if (mode == Mode.MANAGER) { + sysupgrade_after_trans = true; + } + foreach (UpdateInfos infos in updates.repos_updates) { + to_add.insert (infos.name, infos.name); + } + // run as a standard transaction + run (); + } else { + if (updates.aur_updates.length != 0) { + clear_lists (); + //if (repos_updates_len != 0) { + //sysupgrade_after_build = true; + //} + foreach (UpdateInfos infos in updates.aur_updates) { + to_build.insert (infos.name, infos.name); + } + } + if (updates.repos_updates.length != 0) { + sysupgrade_simple (enable_downgrade); + } else { + progress_dialog.show (); + while (Gtk.events_pending ()) { + Gtk.main_iteration (); + } + ErrorInfos err = ErrorInfos (); + on_trans_prepare_finished (err); + } + } + }); } public void clear_lists () { @@ -327,7 +531,7 @@ namespace Pamac { && to_load.size () == 0 && to_build.size () != 0) { // there only AUR packages to build so no need to prepare transaction - on_emit_trans_prepared (err); + on_trans_prepare_finished (err); } else { try { err = daemon.trans_init (flags); @@ -367,7 +571,7 @@ namespace Pamac { } if (err.str == "") { try { - daemon.trans_prepare (); + daemon.start_trans_prepare (); } catch (IOError e) { stderr.printf ("IOError: %s\n", e.message); } @@ -403,14 +607,14 @@ namespace Pamac { // return 0 if transaction_sum is empty, 2, if there are only aur updates, 1 otherwise TransactionType type = 0; uint64 dsize = 0; - UpdatesInfos[] prepared_to_add = {}; - UpdatesInfos[] prepared_to_remove = {}; + UpdateInfos[] prepared_to_add = {}; + UpdateInfos[] prepared_to_remove = {}; string[] to_downgrade = {}; string[] to_install = {}; string[] to_reinstall = {}; string[] to_update = {}; string[] _to_build = {}; - TreeIter iter; + Gtk.TreeIter iter; transaction_sum_dialog.top_label.set_markup ("%s".printf (dgettext (null, "Transaction Summary"))); transaction_sum_dialog.sum_list.clear (); try { @@ -419,23 +623,25 @@ namespace Pamac { } catch (IOError e) { stderr.printf ("IOError: %s\n", e.message); } - foreach (UpdatesInfos pkg_info in prepared_to_add) { + foreach (UpdateInfos pkg_info in prepared_to_add) { dsize += pkg_info.download_size; - unowned Alpm.Package? local_pkg = alpm_config.handle.localdb.get_pkg (pkg_info.name); - if (local_pkg == null) { + Pamac.Package local_pkg = find_local_pkg (pkg_info.name); + if (local_pkg.name == "") { to_install += "%s %s".printf (pkg_info.name, pkg_info.version); } else { - int cmp = pkg_vercmp (pkg_info.version, local_pkg.version); - if (cmp == 1) + int cmp = Alpm.pkg_vercmp (pkg_info.version, local_pkg.version); + if (cmp == 1) { to_update += "%s %s".printf (pkg_info.name, pkg_info.version); - else if (cmp == 0) + } else if (cmp == 0) { to_reinstall += "%s %s".printf (pkg_info.name, pkg_info.version); - else + } else { to_downgrade += "%s %s".printf (pkg_info.name, pkg_info.version); + } } } - foreach (string name in to_build.get_keys ()) + foreach (string name in to_build.get_keys ()) { _to_build += name; + } int len = prepared_to_remove.length; int i; if (len != 0) { @@ -517,26 +723,25 @@ namespace Pamac { } } } - if (dsize == 0) + if (dsize == 0) { transaction_sum_dialog.bottom_label.set_visible (false); - else { + } else { transaction_sum_dialog.bottom_label.set_markup ("%s: %s".printf (dgettext (null, "Total download size"), format_size (dsize))); transaction_sum_dialog.bottom_label.set_visible (true); } return type; } - public void commit () { + public void start_commit () { progress_dialog.cancel_button.set_visible (false); try { - daemon.trans_commit (); + daemon.start_trans_commit (); } catch (IOError e) { stderr.printf ("IOError: %s\n", e.message); } } public void build_aur_packages () { - print ("building packages\n"); string action = dgettext (null,"Building packages") + "..."; spawn_in_term ({"echo", action}); progress_dialog.action_label.set_text (action); @@ -592,22 +797,21 @@ namespace Pamac { term.set_pty (pty); } - public bool run_preferences_dialog (Pamac.Config pamac_config) { + public async void run_preferences_dialog () { + var pamac_config = new Pamac.Config ("/etc/pamac.conf"); + var mirrors_config = new Alpm.MirrorsConfig ("/etc/pacman-mirrors.conf"); bool enable_aur = pamac_config.enable_aur; bool recurse = pamac_config.recurse; int refresh_period = pamac_config.refresh_period; - int checkspace = alpm_config.checkspace; - string syncfirst = alpm_config.syncfirst; - string ignorepkg = alpm_config.ignorepkg; + bool checkspace = get_checkspace (); + string syncfirst = get_syncfirst (); + string ignorepkg = get_ignorepkg (); string choosen_generation_method = mirrors_config.choosen_generation_method; string choosen_country = mirrors_config.choosen_country; preferences_dialog.enable_aur_button.set_active (enable_aur); preferences_dialog.remove_unrequired_deps_button.set_active (recurse); preferences_dialog.refresh_period_spin_button.set_value (refresh_period); - if (checkspace == 1) - preferences_dialog.check_space_button.set_active (true); - else - preferences_dialog.check_space_button.set_active (false); + preferences_dialog.check_space_button.set_active (checkspace); preferences_dialog.syncfirst_entry.set_text (syncfirst); preferences_dialog.ignore_upgrade_entry.set_text (ignorepkg); preferences_dialog.mirrors_country_comboboxtext.remove_all (); @@ -617,105 +821,126 @@ namespace Pamac { mirrors_config.get_countrys (); foreach (string country in mirrors_config.countrys) { preferences_dialog.mirrors_country_comboboxtext.append_text (country); - if (country == choosen_country) + if (country == choosen_country) { preferences_dialog.mirrors_country_comboboxtext.active = index; + } index += 1; } preferences_dialog.mirrorlist_generation_method_comboboxtext.remove_all (); preferences_dialog.mirrorlist_generation_method_comboboxtext.append_text (dgettext (null, "speed")); preferences_dialog.mirrorlist_generation_method_comboboxtext.append_text (dgettext (null, "random")); - if (choosen_generation_method == "rank") + if (choosen_generation_method == "rank") { preferences_dialog.mirrorlist_generation_method_comboboxtext.active = 0; - else + } else { preferences_dialog.mirrorlist_generation_method_comboboxtext.active = 1; + } int response = preferences_dialog.run (); - while (Gtk.events_pending ()) + while (Gtk.events_pending ()) { Gtk.main_iteration (); + } var new_pamac_conf = new HashTable (str_hash, str_equal); var new_alpm_conf = new HashTable (str_hash, str_equal); var new_mirrors_conf = new HashTable (str_hash, str_equal); - if (response == ResponseType.OK) { + if (response == Gtk.ResponseType.OK) { enable_aur = preferences_dialog.enable_aur_button.get_active (); recurse = preferences_dialog.remove_unrequired_deps_button.get_active (); refresh_period = preferences_dialog.refresh_period_spin_button.get_value_as_int (); - if (preferences_dialog.check_space_button.get_active () == true) - checkspace = 1; - else - checkspace = 0; + checkspace = preferences_dialog.check_space_button.get_active (); syncfirst = preferences_dialog.syncfirst_entry.get_text (); ignorepkg = preferences_dialog.ignore_upgrade_entry.get_text (); choosen_country = preferences_dialog.mirrors_country_comboboxtext.get_active_text (); - if (preferences_dialog.mirrorlist_generation_method_comboboxtext.get_active_text () == dgettext (null, "speed")) + if (preferences_dialog.mirrorlist_generation_method_comboboxtext.get_active_text () == dgettext (null, "speed")) { choosen_generation_method = "rank"; - else + } else { choosen_generation_method = "random"; - if (enable_aur != pamac_config.enable_aur) + } + if (enable_aur != pamac_config.enable_aur) { new_pamac_conf.insert ("EnableAUR", new Variant.boolean (enable_aur)); - if (recurse != pamac_config.recurse) + } + if (recurse != pamac_config.recurse) { new_pamac_conf.insert ("RemoveUnrequiredDeps", new Variant.boolean (recurse)); - if (refresh_period != pamac_config.refresh_period) + } + if (refresh_period != pamac_config.refresh_period) { new_pamac_conf.insert ("RefreshPeriod", new Variant.int32 (refresh_period)); - if (checkspace != alpm_config.checkspace) - new_alpm_conf.insert ("CheckSpace", new Variant.int32 (checkspace)); - if (syncfirst != alpm_config.syncfirst) + } + if (checkspace != get_checkspace ()) { + new_alpm_conf.insert ("CheckSpace", new Variant.boolean (checkspace)); + } + if (syncfirst != get_syncfirst ()) { new_alpm_conf.insert ("SyncFirst", new Variant.string (syncfirst)); - if (ignorepkg != alpm_config.ignorepkg) + } + if (ignorepkg != get_ignorepkg ()) { new_alpm_conf.insert ("IgnorePkg", new Variant.string (ignorepkg)); - if (choosen_country != mirrors_config.choosen_country) + } + if (choosen_country != mirrors_config.choosen_country) { new_mirrors_conf.insert ("OnlyCountry", new Variant.string (choosen_country)); + } if (choosen_generation_method == "rank" - && preferences_dialog.mirrorlist_generation_method_comboboxtext.get_active_text () == dgettext (null, "random")) + && preferences_dialog.mirrorlist_generation_method_comboboxtext.get_active_text () == dgettext (null, "random")) { new_mirrors_conf.insert ("Method", new Variant.string (dgettext (null, "random"))); + } if (choosen_generation_method == "random" - && preferences_dialog.mirrorlist_generation_method_comboboxtext.get_active_text () == dgettext (null, "speed")) + && preferences_dialog.mirrorlist_generation_method_comboboxtext.get_active_text () == dgettext (null, "speed")) { new_mirrors_conf.insert ("Method", new Variant.string (dgettext (null, "speed"))); + } } - bool pamac_changes = (new_pamac_conf.size () != 0); - if (pamac_changes) { - write_pamac_config (new_pamac_conf); - pamac_config.reload (); - check_aur = pamac_config.enable_aur; + if (new_pamac_conf.size () != 0) { + start_write_pamac_config (new_pamac_conf); + SourceFunc callback = run_preferences_dialog.callback; + ulong handler_id = daemon.write_pamac_config_finished.connect (() => { + Idle.add((owned) callback); + }); + yield; + daemon.disconnect (handler_id); } - bool alpm_changes = (new_alpm_conf.size () != 0); - if (alpm_changes) { - write_alpm_config (new_alpm_conf); - alpm_config.reload (); + if (new_alpm_conf.size () != 0) { + start_write_alpm_config (new_alpm_conf); + SourceFunc callback = run_preferences_dialog.callback; + ulong handler_id = daemon.write_alpm_config_finished.connect (() => { + Idle.add((owned) callback); + }); + yield; + daemon.disconnect (handler_id); } - bool mirrors_changes = (new_mirrors_conf.size () != 0); - if (mirrors_changes) { - write_mirrors_config (new_mirrors_conf); - mirrors_config.reload (); + if (new_mirrors_conf.size () != 0) { + start_write_mirrors_config (new_mirrors_conf); + SourceFunc callback = run_preferences_dialog.callback; + ulong handler_id = daemon.write_mirrors_config_finished.connect (() => { + Idle.add((owned) callback); + }); + yield; + daemon.disconnect (handler_id); } preferences_dialog.hide (); - while (Gtk.events_pending ()) + while (Gtk.events_pending ()) { Gtk.main_iteration (); - return (pamac_changes || alpm_changes || mirrors_changes); + } } void on_emit_event (uint primary_event, uint secondary_event, string[] details) { string msg; switch (primary_event) { - case Event.Type.CHECKDEPS_START: + case Alpm.Event.Type.CHECKDEPS_START: msg = dgettext (null, "Checking dependencies") + "..."; progress_dialog.action_label.set_text (msg); spawn_in_term ({"echo", msg}); break; - case Event.Type.FILECONFLICTS_START: + case Alpm.Event.Type.FILECONFLICTS_START: msg = dgettext (null, "Checking file conflicts") + "..."; progress_dialog.action_label.set_text (msg); spawn_in_term ({"echo", msg}); break; - case Event.Type.RESOLVEDEPS_START: + case Alpm.Event.Type.RESOLVEDEPS_START: msg = dgettext (null, "Resolving dependencies") + "..."; progress_dialog.action_label.set_text (msg); spawn_in_term ({"echo", msg}); break; - case Event.Type.INTERCONFLICTS_START: + case Alpm.Event.Type.INTERCONFLICTS_START: msg = dgettext (null, "Checking inter-conflicts") + "..."; progress_dialog.action_label.set_text (msg); spawn_in_term ({"echo", msg}); break; - case Event.Type.PACKAGE_OPERATION_START: + case Alpm.Event.Type.PACKAGE_OPERATION_START: switch (secondary_event) { case Alpm.Package.Operation.INSTALL: progress_dialog.cancel_button.set_visible (false); @@ -759,81 +984,81 @@ namespace Pamac { break; } break; - case Event.Type.INTEGRITY_START: + case Alpm.Event.Type.INTEGRITY_START: msg = dgettext (null, "Checking integrity") + "..."; progress_dialog.action_label.set_text (msg); spawn_in_term ({"echo", msg}); break; - case Event.Type.KEYRING_START: + case Alpm.Event.Type.KEYRING_START: progress_dialog.cancel_button.set_visible (true); msg = dgettext (null, "Checking keyring") + "..."; progress_dialog.action_label.set_text (msg); spawn_in_term ({"echo", msg}); break; - case Event.Type.KEY_DOWNLOAD_START: + case Alpm.Event.Type.KEY_DOWNLOAD_START: msg = dgettext (null, "Downloading required keys") + "..."; progress_dialog.action_label.set_text (msg); spawn_in_term ({"echo", msg}); break; - case Event.Type.LOAD_START: + case Alpm.Event.Type.LOAD_START: msg = dgettext (null, "Loading packages files") + "..."; progress_dialog.action_label.set_text (msg); spawn_in_term ({"echo", msg}); break; - case Event.Type.DELTA_INTEGRITY_START: + case Alpm.Event.Type.DELTA_INTEGRITY_START: msg = dgettext (null, "Checking delta integrity") + "..."; progress_dialog.action_label.set_text (msg); spawn_in_term ({"echo", msg}); break; - case Event.Type.DELTA_PATCHES_START: + case Alpm.Event.Type.DELTA_PATCHES_START: msg = dgettext (null, "Applying deltas") + "..."; progress_dialog.action_label.set_text (msg); spawn_in_term ({"echo", msg}); break; - case Event.Type.DELTA_PATCH_START: + case Alpm.Event.Type.DELTA_PATCH_START: msg = dgettext (null, "Generating %s with %s").printf (details[0], details[1]) + "..."; progress_dialog.action_label.set_text (msg); spawn_in_term ({"echo", msg}); break; - case Event.Type.DELTA_PATCH_DONE: + case Alpm.Event.Type.DELTA_PATCH_DONE: msg = dgettext (null, "Generation succeeded") + "..."; progress_dialog.action_label.set_text (msg); spawn_in_term ({"echo", msg}); break; - case Event.Type.DELTA_PATCH_FAILED: + case Alpm.Event.Type.DELTA_PATCH_FAILED: msg = dgettext (null, "Generation failed") + "..."; progress_dialog.action_label.set_text (msg); spawn_in_term ({"echo", msg}); break; - case Event.Type.SCRIPTLET_INFO: + case Alpm.Event.Type.SCRIPTLET_INFO: progress_dialog.action_label.set_text (dgettext (null, "Configuring %s").printf (previous_filename) + "..."); progress_dialog.expander.set_expanded (true); spawn_in_term ({"echo", "-n", details[0]}); break; - case Event.Type.RETRIEVE_START: + case Alpm.Event.Type.RETRIEVE_START: progress_dialog.cancel_button.set_visible (true); msg = dgettext (null, "Downloading") + "..."; progress_dialog.action_label.set_text (msg); spawn_in_term ({"echo", msg}); break; - case Event.Type.DISKSPACE_START: + case Alpm.Event.Type.DISKSPACE_START: msg = dgettext (null, "Checking available disk space") + "..."; progress_dialog.action_label.set_text (msg); spawn_in_term ({"echo", msg}); break; - case Event.Type.OPTDEP_REMOVAL: + case Alpm.Event.Type.OPTDEP_REMOVAL: spawn_in_term ({"echo", dgettext (null, "%s optionally requires %s").printf (details[0], details[1])}); break; - case Event.Type.DATABASE_MISSING: + case Alpm.Event.Type.DATABASE_MISSING: spawn_in_term ({"echo", dgettext (null, "Database file for %s does not exist").printf (details[0])}); break; - case Event.Type.PACNEW_CREATED: + case Alpm.Event.Type.PACNEW_CREATED: spawn_in_term ({"echo", dgettext (null, "%s installed as %s.pacnew").printf (details[0])}); break; - case Event.Type.PACSAVE_CREATED: + case Alpm.Event.Type.PACSAVE_CREATED: spawn_in_term ({"echo", dgettext (null, "%s installed as %s.pacsave").printf (details[0])}); break; - case Event.Type.PACORIG_CREATED: + case Alpm.Event.Type.PACORIG_CREATED: spawn_in_term ({"echo", dgettext (null, "%s installed as %s.pacorig").printf (details[0])}); break; default: @@ -850,18 +1075,18 @@ namespace Pamac { void on_emit_progress (uint progress, string pkgname, int percent, uint n_targets, uint current_target) { double fraction; switch (progress) { - case Progress.ADD_START: - case Progress.UPGRADE_START: - case Progress.DOWNGRADE_START: - case Progress.REINSTALL_START: - case Progress.REMOVE_START: + case Alpm.Progress.ADD_START: + case Alpm.Progress.UPGRADE_START: + case Alpm.Progress.DOWNGRADE_START: + case Alpm.Progress.REINSTALL_START: + case Alpm.Progress.REMOVE_START: fraction = ((float) (current_target-1)/n_targets)+((float) percent/(100*n_targets)); break; - case Progress.CONFLICTS_START: - case Progress.DISKSPACE_START: - case Progress.INTEGRITY_START: - case Progress.KEYRING_START: - case Progress.LOAD_START: + case Alpm.Progress.CONFLICTS_START: + case Alpm.Progress.DISKSPACE_START: + case Alpm.Progress.INTEGRITY_START: + case Alpm.Progress.KEYRING_START: + case Alpm.Progress.LOAD_START: default: fraction = (float) percent/100; break; @@ -933,7 +1158,7 @@ namespace Pamac { void on_emit_log (uint level, string msg) { // msg ends with \n string? line = null; - TextIter end_iter; + Gtk.TextIter end_iter; if ((Alpm.LogLevel) level == Alpm.LogLevel.WARNING) { if (previous_filename != "") line = dgettext (null, "Warning") + ": " + previous_filename + ": " + msg; @@ -963,8 +1188,8 @@ namespace Pamac { transaction_info_dialog.hide (); while (Gtk.events_pending ()) Gtk.main_iteration (); - TextIter start_iter; - TextIter end_iter; + Gtk.TextIter start_iter; + Gtk.TextIter end_iter; transaction_info_dialog.textbuffer.get_start_iter (out start_iter); transaction_info_dialog.textbuffer.get_end_iter (out end_iter); transaction_info_dialog.textbuffer.delete (ref start_iter, ref end_iter); @@ -974,8 +1199,8 @@ namespace Pamac { public void handle_error (ErrorInfos error) { progress_dialog.expander.set_expanded (true); spawn_in_term ({"echo", "-n", error.str}); - TextIter start_iter; - TextIter end_iter; + Gtk.TextIter start_iter; + Gtk.TextIter end_iter; transaction_info_dialog.set_title (dgettext (null, "Error")); transaction_info_dialog.label.set_visible (true); transaction_info_dialog.label.set_markup (error.str); @@ -1005,18 +1230,16 @@ namespace Pamac { Gtk.main_iteration (); } - public void on_emit_refreshed (ErrorInfos error) { - print ("transaction refreshed\n"); - refresh_handle (); + public void on_refresh_finished (ErrorInfos error) { if (error.str == "") { if (mode == Mode.UPDATER) { progress_dialog.hide (); - while (Gtk.events_pending ()) + while (Gtk.events_pending ()) { Gtk.main_iteration (); + } finished (false); } else { clear_lists (); - finished (false); sysupgrade (0); } } else { @@ -1026,26 +1249,25 @@ namespace Pamac { previous_filename = ""; } - public void on_emit_trans_prepared (ErrorInfos error) { - print ("transaction prepared\n"); + public void on_trans_prepare_finished (ErrorInfos error) { if (error.str == "") { show_warnings (); TransactionType type = set_transaction_sum (); if (type == TransactionType.UPDATE && mode == Mode.UPDATER) { // there only updates //sysupgrade_after_build = false; - commit (); + start_commit (); } else if (type != 0) { - if (transaction_sum_dialog.run () == ResponseType.OK) { + if (transaction_sum_dialog.run () == Gtk.ResponseType.OK) { transaction_sum_dialog.hide (); while (Gtk.events_pending ()) Gtk.main_iteration (); if (type == TransactionType.BUILD) { // there only AUR packages to build ErrorInfos err = ErrorInfos (); - on_emit_trans_committed (err); + on_trans_commit_finished (err); } else - commit (); + start_commit (); } else { spawn_in_term ({"echo", dgettext (null, "Transaction cancelled") + ".\n"}); progress_dialog.hide (); @@ -1053,8 +1275,7 @@ namespace Pamac { while (Gtk.events_pending ()) Gtk.main_iteration (); release (); - if (aur_updates.length != 0) - to_build.steal_all (); + to_build.steal_all (); sysupgrade_after_trans = false; //sysupgrade_after_build = false; finished (true); @@ -1077,8 +1298,7 @@ namespace Pamac { } } - public void on_emit_trans_committed (ErrorInfos error) { - print ("transaction committed\n"); + public void on_trans_commit_finished (ErrorInfos error) { if (error.str == "") { if (to_build.size () != 0) { if (to_add.size () != 0 @@ -1092,7 +1312,6 @@ namespace Pamac { //progress_dialog.close_button.set_visible (true); clear_lists (); show_warnings (); - refresh_handle (); if (sysupgrade_after_trans) { sysupgrade_after_trans = false; sysupgrade (0); @@ -1110,7 +1329,6 @@ namespace Pamac { } } } else { - refresh_handle (); finished (true); handle_error (error); } @@ -1118,19 +1336,25 @@ namespace Pamac { already_downloaded = 0; build_status = 0; previous_filename = ""; - aur_checked = false; } void on_term_child_exited (int status) { - print ("build finished\n"); Source.remove (pulse_timeout_id); to_build.steal_all (); build_status = status; ErrorInfos err = ErrorInfos (); - on_emit_trans_committed (err); + on_trans_commit_finished (err); } - void on_emit_generate_mirrorlist_start () { + void on_write_pamac_config_finished (int refresh_period, bool aur_enabled, bool recurse) { + flags = Alpm.TransFlag.CASCADE; + if (recurse) { + flags |= Alpm.TransFlag.RECURSE; + } + enable_aur (aur_enabled); + } + + void on_generate_mirrorlist_start () { string action = dgettext (null, "Generating mirrorlist") + "..."; spawn_in_term ({"echo", action}); progress_dialog.action_label.set_text (action); @@ -1144,14 +1368,14 @@ namespace Pamac { progress_dialog.show (); } - void on_emit_generate_mirrorlist_data (string line) { + void on_generate_mirrorlist_data (string line) { spawn_in_term ({"echo", "-n", line}); } - void on_emit_generate_mirrorlist_finished () { + void on_generate_mirrorlist_finished () { Source.remove (pulse_timeout_id); spawn_in_term ({"echo"}); - refresh (0); + start_refresh (0); } void connecting_dbus_signals () { @@ -1165,12 +1389,13 @@ namespace Pamac { daemon.emit_download.connect (on_emit_download); daemon.emit_totaldownload.connect (on_emit_totaldownload); daemon.emit_log.connect (on_emit_log); - daemon.emit_refreshed.connect (on_emit_refreshed); - daemon.emit_trans_prepared.connect (on_emit_trans_prepared); - daemon.emit_trans_committed.connect (on_emit_trans_committed); - daemon.emit_generate_mirrorlist_start.connect (on_emit_generate_mirrorlist_start); - daemon.emit_generate_mirrorlist_data.connect (on_emit_generate_mirrorlist_data); - daemon.emit_generate_mirrorlist_finished.connect (on_emit_generate_mirrorlist_finished); + daemon.refresh_finished.connect (on_refresh_finished); + daemon.trans_prepare_finished.connect (on_trans_prepare_finished); + daemon.trans_commit_finished.connect (on_trans_commit_finished); + daemon.write_pamac_config_finished.connect (on_write_pamac_config_finished); + daemon.generate_mirrorlist_start.connect (on_generate_mirrorlist_start); + daemon.generate_mirrorlist_data.connect (on_generate_mirrorlist_data); + daemon.generate_mirrorlist_finished.connect (on_generate_mirrorlist_finished); } catch (IOError e) { stderr.printf ("IOError: %s\n", e.message); } diff --git a/src/transaction_info_dialog.vala b/src/transaction_info_dialog.vala index 74f3c14..b4317ae 100644 --- a/src/transaction_info_dialog.vala +++ b/src/transaction_info_dialog.vala @@ -1,7 +1,7 @@ /* * pamac-vala * - * Copyright (C) 2014 Guillaume Benoit + * Copyright (C) 2014 Guillaume Benoit * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/transaction_sum_dialog.vala b/src/transaction_sum_dialog.vala index 7dd5c69..dd97cb8 100644 --- a/src/transaction_sum_dialog.vala +++ b/src/transaction_sum_dialog.vala @@ -1,7 +1,7 @@ /* * pamac-vala * - * Copyright (C) 2014 Guillaume Benoit + * Copyright (C) 2014 Guillaume Benoit * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/tray.vala b/src/tray.vala index 9af6d23..e8c1692 100644 --- a/src/tray.vala +++ b/src/tray.vala @@ -1,7 +1,7 @@ /* * pamac-vala * - * Copyright (C) 2014 Guillaume Benoit + * Copyright (C) 2014-2015 Guillaume Benoit * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,16 +27,14 @@ const string noupdate_info = _("Your system is up-to-date"); namespace Pamac { [DBus (name = "org.manjaro.pamac")] public interface Daemon : Object { - public abstract void refresh (int force, bool emit_signal) throws IOError; - public abstract UpdatesInfos[] get_updates () throws IOError; + public abstract void start_refresh (int force, bool emit_signal) throws IOError; + public abstract async Updates get_updates () throws IOError; [DBus (no_reply = true)] public abstract void quit () throws IOError; } public class TrayIcon: Gtk.Application { - Notify.Notification notification; Daemon daemon; - Pamac.Config pamac_config; bool locked; uint refresh_timeout_id; Gtk.StatusIcon status_icon; @@ -88,8 +86,9 @@ namespace Pamac { } void left_clicked () { - if (status_icon.icon_name == "pamac-tray-update") + if (status_icon.icon_name == "pamac-tray-update") { execute_updater (); + } } void execute_updater () { @@ -117,7 +116,7 @@ namespace Pamac { if (check_pamac_running () == false) { start_daemon (); try { - daemon.refresh (0, false); + daemon.start_refresh (0, false); } catch (IOError e) { stderr.printf ("IOError: %s\n", e.message); } @@ -126,27 +125,29 @@ namespace Pamac { } void check_updates () { - UpdatesInfos[] updates = {}; - try { - updates = daemon.get_updates (); - } catch (IOError e) { - stderr.printf ("IOError: %s\n", e.message); - } - uint updates_nb = updates.length; - if (updates_nb == 0) { - this.update_icon (noupdate_icon_name, noupdate_info); - } else { - string info = ngettext ("%u available update", "%u available updates", updates_nb).printf (updates_nb); - this.update_icon (update_icon_name, info); - if (check_pamac_running () == false) { - show_notification (info); + daemon.get_updates.begin ((obj, res) => { + var updates = Updates (); + try { + updates = daemon.get_updates.end (res); + } catch (IOError e) { + stderr.printf ("IOError: %s\n", e.message); } - } - stop_daemon (); + uint updates_nb = updates.repos_updates.length + updates.aur_updates.length; + if (updates_nb == 0) { + this.update_icon (noupdate_icon_name, noupdate_info); + } else { + string info = ngettext ("%u available update", "%u available updates", updates_nb).printf (updates_nb); + this.update_icon (update_icon_name, info); + if (check_pamac_running () == false) { + show_notification (info); + } + } + stop_daemon (); + }); } void show_notification (string info) { -//~ notification = new Notification (_("Update Manager")); +//~ var notification = new Notification (_("Update Manager")); //~ notification.set_body (info); //~ Gtk.IconTheme icon_theme = Gtk.IconTheme.get_default (); //~ Gdk.Pixbuf icon = icon_theme.load_icon ("system-software-update", 32, 0); @@ -157,7 +158,7 @@ namespace Pamac { //~ notification.add_button (_("Show available updates"), "app.update"); //~ this.send_notification (_("Update Manager"), notification); try { - notification = new Notify.Notification (_("Update Manager"), info, "system-software-update"); + var notification = new Notify.Notification (_("Update Manager"), info, "system-software-update"); notification.add_action ("update", _("Show available updates"), execute_updater); notification.show (); } catch (Error e) { @@ -204,12 +205,11 @@ namespace Pamac { return true; } - void launch_refresh_timeout () { + void launch_refresh_timeout (uint refresh_period_in_hours) { if (refresh_timeout_id != 0) { - pamac_config.reload (); Source.remove (refresh_timeout_id); } - refresh_timeout_id = Timeout.add_seconds ((uint) pamac_config.refresh_period*3600, refresh); + refresh_timeout_id = Timeout.add_seconds (refresh_period_in_hours*3600, refresh); } public override void startup () { @@ -219,7 +219,6 @@ namespace Pamac { base.startup (); - pamac_config = new Pamac.Config ("/etc/pamac.conf"); locked = false; refresh_timeout_id = 0; @@ -233,7 +232,8 @@ namespace Pamac { Notify.init (_("Update Manager")); refresh (); - launch_refresh_timeout (); + var pamac_config = new Pamac.Config ("/etc/pamac.conf"); + launch_refresh_timeout ((uint) pamac_config.refresh_period); Timeout.add (500, check_pacman_running); this.hold (); diff --git a/src/updater.vala b/src/updater.vala index 9389289..cebdaa7 100644 --- a/src/updater.vala +++ b/src/updater.vala @@ -1,7 +1,7 @@ /* * pamac-vala * - * Copyright (C) 2014 Guillaume Benoit + * Copyright (C) 2014-2015 Guillaume Benoit * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -44,19 +44,22 @@ namespace Pamac { transaction_info_dialog.expander.set_visible (false); transaction_info_dialog.run (); transaction_info_dialog.hide (); - } else + } else { updater_window = new UpdaterWindow (this); + } } public override void activate () { - if (pamac_run == false) + if (pamac_run == false) { updater_window.present (); + } } public override void shutdown () { base.shutdown (); - if (pamac_run == false) + if (pamac_run == false) { updater_window.transaction.stop_daemon (); + } } bool check_pamac_running () { @@ -69,9 +72,9 @@ namespace Pamac { stderr.printf ("%s\n", e.message); } run = app.get_is_remote (); - if (run) + if (run) { return run; - else { + } else { app = new Application ("org.manjaro.pamac.install", 0); try { app.register (); diff --git a/src/updater_window.vala b/src/updater_window.vala index ca4534b..f9e034f 100644 --- a/src/updater_window.vala +++ b/src/updater_window.vala @@ -1,7 +1,7 @@ /* * pamac-vala * - * Copyright (C) 2014 Guillaume Benoit + * Copyright (C) 2014-2015 Guillaume Benoit * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,38 +17,33 @@ * along with this program. If not, see . */ -using Gtk; - namespace Pamac { [GtkTemplate (ui = "/org/manjaro/pamac/updater/updater_window.ui")] public class UpdaterWindow : Gtk.ApplicationWindow { [GtkChild] - public Label top_label; + public Gtk.Label top_label; [GtkChild] - public TreeView updates_treeview; + public Gtk.TreeView updates_treeview; [GtkChild] - public Label bottom_label; + public Gtk.Label bottom_label; [GtkChild] - public Button apply_button; + public Gtk.Button apply_button; + + public Gtk.ListStore updates_list; - public ListStore updates_list; - public Pamac.Config pamac_config; public Pamac.Transaction transaction; public UpdaterWindow (Gtk.Application application) { Object (application: application); - pamac_config = new Pamac.Config ("/etc/pamac.conf"); - updates_list = new Gtk.ListStore (2, typeof (string), typeof (string)); updates_treeview.set_model (updates_list); - transaction = new Transaction (this as ApplicationWindow); + transaction = new Transaction (this as Gtk.ApplicationWindow); transaction.mode = Mode.UPDATER; - transaction.check_aur = pamac_config.enable_aur; - transaction.finished.connect (on_emit_trans_finished); + transaction.finished.connect (on_transaction_finished); bottom_label.set_visible (false); apply_button.set_sensitive (false); @@ -58,10 +53,9 @@ namespace Pamac { [GtkCallback] public void on_preferences_button_clicked () { - bool changes = transaction.run_preferences_dialog (pamac_config); - if (changes) { + transaction.run_preferences_dialog.begin (() => { set_updates_list.begin (); - } + }); } [GtkCallback] @@ -79,7 +73,7 @@ namespace Pamac { while (Gtk.events_pending ()) { Gtk.main_iteration (); } - transaction.refresh (0); + transaction.start_refresh (0); } [GtkCallback] @@ -87,7 +81,7 @@ namespace Pamac { this.application.quit (); } - public void on_emit_trans_finished (bool error) { + public void on_transaction_finished (bool error) { set_updates_list.begin (); } @@ -96,21 +90,16 @@ namespace Pamac { while (Gtk.events_pending ()) { Gtk.main_iteration (); } - top_label.set_markup (""); updates_list.clear (); - UpdatesInfos[] updates = {}; - try { - updates = transaction.daemon.get_updates (); - } catch (IOError e) { - stderr.printf ("IOError: %s\n", e.message); - } - TreeIter iter; + bottom_label.set_visible (false); + Gtk.TreeIter iter; string name; string size; uint64 dsize = 0; uint updates_nb = 0; - foreach (UpdatesInfos infos in updates) { + Updates updates = yield transaction.get_updates (); + foreach (UpdateInfos infos in updates.repos_updates) { name = infos.name + " " + infos.version; if (infos.download_size != 0) { size = format_size (infos.download_size); @@ -118,9 +107,15 @@ namespace Pamac { size = ""; } dsize += infos.download_size; + updates_nb++; + updates_list.insert_with_values (out iter, -1, 0, name, 1, size); + } + foreach (UpdateInfos infos in updates.aur_updates) { + name = infos.name + " " + infos.version; + size = ""; + updates_nb++; updates_list.insert_with_values (out iter, -1, 0, name, 1, size); } - updates_nb = updates.length; if (updates_nb == 0) { top_label.set_markup("%s".printf (dgettext (null, "Your system is up-to-date"))); apply_button.set_sensitive (false); @@ -134,7 +129,6 @@ namespace Pamac { } else { bottom_label.set_visible (false); } - this.get_window ().set_cursor (null); while (Gtk.events_pending ()) { Gtk.main_iteration (); diff --git a/vapi/libalpm.vapi b/vapi/libalpm.vapi index dd8ca41..3591de4 100644 --- a/vapi/libalpm.vapi +++ b/vapi/libalpm.vapi @@ -448,7 +448,7 @@ namespace Alpm { public unowned Alpm.List unused_deltas { [CCode (cname = "alpm_pkg_unused_deltas")] get; } - public unowned Alpm.List backup { + public unowned Alpm.List backups { [CCode (cname = "alpm_pkg_get_backup")] get; } public unowned DB? db {