summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--configure.in7
-rw-r--r--gslapt.glade188
-rw-r--r--po/bg.po23
-rw-r--r--po/de.po29
-rw-r--r--po/en.po23
-rw-r--r--po/es.po23
-rw-r--r--po/fr.po23
-rw-r--r--po/gl_ES.po23
-rw-r--r--po/gslapt.pot23
-rw-r--r--po/id.po23
-rw-r--r--po/it.po23
-rw-r--r--po/ja.po23
-rw-r--r--po/nl.po23
-rw-r--r--po/pl.po23
-rw-r--r--po/pt.po23
-rw-r--r--po/pt_BR.po23
-rw-r--r--po/ru.po23
-rw-r--r--po/sk.po23
-rw-r--r--po/sv.po23
-rw-r--r--po/tr.po23
-rw-r--r--po/uk.po23
-rw-r--r--po/vi.po23
-rw-r--r--po/zh_CN.po23
-rw-r--r--src/callbacks.c202
-rw-r--r--src/callbacks.h4
-rw-r--r--src/interface.c98
27 files changed, 966 insertions, 29 deletions
diff --git a/ChangeLog b/ChangeLog
index eb8c040..1f41734 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
-0.3.18 Jun 16, 2007
+0.3.18 Jun 17, 2007
+ * download checksum signatures and attempt to verify
+ * german updates by Manfred
+ * updated translations
+ * configure tries to detect if libslapt has built in gpgme support
+ * Added "Verification" tab to preferences to add GPG-KEYs for each source
* requires slapt-get 0.9.12
* unreference generated pixbufs where previously left referenced
* Updated thread locking of download cancel variable
diff --git a/configure.in b/configure.in
index a44ac12..7b64225 100644
--- a/configure.in
+++ b/configure.in
@@ -33,7 +33,12 @@ AC_CHECK_HEADER(curl/curl.h, [], [AC_MSG_ERROR(libcurl headers are missing)])
AC_CHECK_HEADER(slapt.h, [], [AC_MSG_ERROR(libslapt headers are missing)])
AC_CHECK_LIB(z,gzopen, [LIBS="$LIBS -lz"], [AC_MSG_ERROR(libz is missing)])
AC_CHECK_LIB(curl,curl_global_init, [LIBS="$LIBS `curl-config --libs`"], [AC_MSG_ERROR(curl libs are missing)])
-AC_CHECK_LIB(gpgme,gpgme_new, [LIBS="$LIBS `gpgme-config --libs`"], [AC_MSG_WARN(gpg support disabled)])
+AC_CHECK_LIB(gpgme,gpgme_new, [
+ LIBS="$LIBS `gpgme-config --libs`"
+ AC_CHECK_LIB(slapt,slapt_add_pkg_source_gpg_key,
+ [AC_DEFINE(SLAPT_HAS_GPGME, 1, [libslapt has builtin gpgme support])],
+ [AC_MSG_WARN(libslapt does not have gpgme support)])
+], [AC_MSG_WARN(gpg support disabled)])
AC_CHECK_LIB(slapt,slapt_strerror, [], [AC_MSG_ERROR(libslapt 0.9.12 or greater is required)])
LIBS="$LIBS -lglib-2.0 -lgthread-2.0"
diff --git a/gslapt.glade b/gslapt.glade
index 0d90584..7f442c3 100644
--- a/gslapt.glade
+++ b/gslapt.glade
@@ -749,6 +749,194 @@
<property name="type">tab</property>
</packing>
</child>
+
+ <child>
+ <widget class="GtkVBox" id="preferences_verification_vbox">
+ <property name="border_width">12</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">18</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox76">
+ <property name="border_width">12</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="label294">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;GPG Keys&lt;/b&gt;</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox116">
+ <property name="height_request">174</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label295">
+ <property name="visible">True</property>
+ <property name="label"> </property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox117">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow24">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTreeView" id="preferences_verification_sources_treeview">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">True</property>
+ <property name="rules_hint">True</property>
+ <property name="reorderable">True</property>
+ <property name="enable_search">True</property>
+ <property name="fixed_height_mode">False</property>
+ <property name="hover_selection">False</property>
+ <property name="hover_expand">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox77">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkButton" id="button9">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-add</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="preferences_sources_add_key" object="window_preferences" last_modification_time="Sun, 17 Jun 2007 15:55:57 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label293">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Verification</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
diff --git a/po/bg.po b/po/bg.po
index 492582a..119cabd 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: 0.3.18\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-26 22:25-0500\n"
-"PO-Revision-Date: 2007-06-09 11:40+0500\n"
+"PO-Revision-Date: 2007-06-17 21:05+0500\n"
"Last-Translator: Victor Keranov <victor_keranov@mail.bg>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -478,3 +478,24 @@ msgstr "Download rate: %.0f%s/s"
msgid "Failed to download %s: %s"
msgstr "Failed to download %s: %s"
+msgid "Import"
+msgstr "Import"
+
+msgid "No key found"
+msgstr "No key found"
+
+msgid "<b>GPG Keys</b>"
+msgstr "<b>GPG Keys</b>"
+
+msgid "Verification"
+msgstr "Verification"
+
+msgid "Retrieving checksum signature..."
+msgstr "Retrieving checksum signature..."
+
+msgid "Verifying checksum signature..."
+msgstr "Verifying checksum signature..."
+
+msgid "GPG Key verification failed"
+msgstr "GPG Key verification failed"
+
diff --git a/po/de.po b/po/de.po
index 9a7fbc8..9b7afc4 100644
--- a/po/de.po
+++ b/po/de.po
@@ -9,8 +9,8 @@ msgstr ""
"Project-Id-Version: 0.3.18\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-26 22:25-0500\n"
-"PO-Revision-Date: 2007-06-09 11:40+0500\n"
-"Last-Translator: Manfred Mueller <mmueller@nekserve.de>\n"
+"PO-Revision-Date: 2007-06-17 21:05+0500\n"
+"Last-Translator: Manfred Mueller <mmueller@live-modules.org>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -472,8 +472,29 @@ msgid "Mark all obsolete packages"
msgstr "Markiere ALLE veralteten Pakete"
msgid "Download rate: %.0f%s/s"
-msgstr "Download rate: %.0f%s/s"
+msgstr "Download-Rate: %.0f%s/s"
msgid "Failed to download %s: %s"
-msgstr "Failed to download %s: %s"
+msgstr "Download von %s: %s gescheitert"
+
+msgid "Import"
+msgstr "Import"
+
+msgid "No key found"
+msgstr "No key found"
+
+msgid "<b>GPG Keys</b>"
+msgstr "<b>GPG Keys</b>"
+
+msgid "Verification"
+msgstr "Verification"
+
+msgid "Retrieving checksum signature..."
+msgstr "Retrieving checksum signature..."
+
+msgid "Verifying checksum signature..."
+msgstr "Verifying checksum signature..."
+
+msgid "GPG Key verification failed"
+msgstr "GPG Key verification failed"
diff --git a/po/en.po b/po/en.po
index d398502..42b817b 100644
--- a/po/en.po
+++ b/po/en.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: 0.3.18\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-20 16:24-0500\n"
-"PO-Revision-Date: 2007-06-09 11:40+0500\n"
+"PO-Revision-Date: 2007-06-17 21:05+0500\n"
"Last-Translator: Jason Woodward <woodwardj@jaos.org>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -473,3 +473,24 @@ msgstr "Download rate: %.0f%s/s"
msgid "Failed to download %s: %s"
msgstr "Failed to download %s: %s"
+msgid "Import"
+msgstr "Import"
+
+msgid "No key found"
+msgstr "No key found"
+
+msgid "<b>GPG Keys</b>"
+msgstr "<b>GPG Keys</b>"
+
+msgid "Verification"
+msgstr "Verification"
+
+msgid "Retrieving checksum signature..."
+msgstr "Retrieving checksum signature..."
+
+msgid "Verifying checksum signature..."
+msgstr "Verifying checksum signature..."
+
+msgid "GPG Key verification failed"
+msgstr "GPG Key verification failed"
+
diff --git a/po/es.po b/po/es.po
index 8cd09c9..7c225e5 100644
--- a/po/es.po
+++ b/po/es.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: 0.3.18\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-26 22:25-0500\n"
-"PO-Revision-Date: 2007-06-09 11:40+0500\n"
+"PO-Revision-Date: 2007-06-17 21:05+0500\n"
"Last-Translator: Manuel Barallobre Seoane <bara666@gmail.com>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -469,3 +469,24 @@ msgstr "Velocidad de descarga: %.0f%s/s"
msgid "Failed to download %s: %s"
msgstr "Failed to download %s: %s"
+msgid "Import"
+msgstr "Import"
+
+msgid "No key found"
+msgstr "No key found"
+
+msgid "<b>GPG Keys</b>"
+msgstr "<b>GPG Keys</b>"
+
+msgid "Verification"
+msgstr "Verification"
+
+msgid "Retrieving checksum signature..."
+msgstr "Retrieving checksum signature..."
+
+msgid "Verifying checksum signature..."
+msgstr "Verifying checksum signature..."
+
+msgid "GPG Key verification failed"
+msgstr "GPG Key verification failed"
+
diff --git a/po/fr.po b/po/fr.po
index 7cd7599..e0e3afa 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: 0.3.18\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-26 22:25-0500\n"
-"PO-Revision-Date: 2007-06-09 11:40+0500\n"
+"PO-Revision-Date: 2007-06-17 21:05+0500\n"
"Last-Translator: Natim <natim@trunat.fr>\n"
"Language-Team: <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -481,3 +481,24 @@ msgstr "Download rate: %.0f%s/s"
msgid "Failed to download %s: %s"
msgstr "Failed to download %s: %s"
+msgid "Import"
+msgstr "Import"
+
+msgid "No key found"
+msgstr "No key found"
+
+msgid "<b>GPG Keys</b>"
+msgstr "<b>GPG Keys</b>"
+
+msgid "Verification"
+msgstr "Verification"
+
+msgid "Retrieving checksum signature..."
+msgstr "Retrieving checksum signature..."
+
+msgid "Verifying checksum signature..."
+msgstr "Verifying checksum signature..."
+
+msgid "GPG Key verification failed"
+msgstr "GPG Key verification failed"
+
diff --git a/po/gl_ES.po b/po/gl_ES.po
index 3e9ad30..b0e1b3d 100644
--- a/po/gl_ES.po
+++ b/po/gl_ES.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: 0.3.18\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-26 22:25-0500\n"
-"PO-Revision-Date: 2007-06-09 11:40+0500\n"
+"PO-Revision-Date: 2007-06-17 21:05+0500\n"
"Last-Translator: Manuel Barallobre Seoane <bara666@gmail.com>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -478,3 +478,24 @@ msgstr "Velocidade de descarga: %.0f%s/s"
msgid "Failed to download %s: %s"
msgstr "Failed to download %s: %s"
+msgid "Import"
+msgstr "Import"
+
+msgid "No key found"
+msgstr "No key found"
+
+msgid "<b>GPG Keys</b>"
+msgstr "<b>GPG Keys</b>"
+
+msgid "Verification"
+msgstr "Verification"
+
+msgid "Retrieving checksum signature..."
+msgstr "Retrieving checksum signature..."
+
+msgid "Verifying checksum signature..."
+msgstr "Verifying checksum signature..."
+
+msgid "GPG Key verification failed"
+msgstr "GPG Key verification failed"
+
diff --git a/po/gslapt.pot b/po/gslapt.pot
index bfa46c2..e82c737 100644
--- a/po/gslapt.pot
+++ b/po/gslapt.pot
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: 0.3.18\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-26 22:25-0500\n"
-"PO-Revision-Date: 2007-06-09 11:40+0500\n"
+"PO-Revision-Date: 2007-06-17 21:05+0500\n"
"Last-Translator: Jason Woodward <woodwardj@jaos.org>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -480,3 +480,24 @@ msgstr ""
msgid "Failed to download %s: %s"
msgstr ""
+msgid "Import"
+msgstr ""
+
+msgid "No key found."
+msgstr ""
+
+msgid "<b>GPG Keys</b>"
+msgstr ""
+
+msgid "Verification"
+msgstr ""
+
+msgid "Retrieving checksum signature..."
+msgstr ""
+
+msgid "Verifying checksum signature..."
+msgstr ""
+
+msgid "GPG Key verification failed"
+msgstr ""
+
diff --git a/po/id.po b/po/id.po
index c653e80..2829aef 100644
--- a/po/id.po
+++ b/po/id.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: 0.3.18\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-26 22:25-0500\n"
-"PO-Revision-Date: 2007-06-09 11:40+0500\n"
+"PO-Revision-Date: 2007-06-17 21:05+0500\n"
"Last-Translator: Kemas Antonius <kyantonius@kyantonius.com>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -478,3 +478,24 @@ msgstr "Download rate: %.0f%s/s"
msgid "Failed to download %s: %s"
msgstr "Failed to download %s: %s"
+msgid "Import"
+msgstr "Import"
+
+msgid "No key found"
+msgstr "No key found"
+
+msgid "<b>GPG Keys</b>"
+msgstr "<b>GPG Keys</b>"
+
+msgid "Verification"
+msgstr "Verification"
+
+msgid "Retrieving checksum signature..."
+msgstr "Retrieving checksum signature..."
+
+msgid "Verifying checksum signature..."
+msgstr "Verifying checksum signature..."
+
+msgid "GPG Key verification failed"
+msgstr "GPG Key verification failed"
+
diff --git a/po/it.po b/po/it.po
index b704f4a..37ddfa0 100644
--- a/po/it.po
+++ b/po/it.po
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: 0.3.18\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-07-28 18:01+0000\n"
-"PO-Revision-Date: 2007-06-09 11:40+0500\n"
+"PO-Revision-Date: 2007-06-17 21:05+0500\n"
"Last-Translator: Fabio Varesano <fvaresano@yahoo.it>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -482,3 +482,24 @@ msgstr "Download rate: %.0f%s/s"
msgid "Failed to download %s: %s"
msgstr "Failed to download %s: %s"
+msgid "Import"
+msgstr "Import"
+
+msgid "No key found"
+msgstr "No key found"
+
+msgid "<b>GPG Keys</b>"
+msgstr "<b>GPG Keys</b>"
+
+msgid "Verification"
+msgstr "Verification"
+
+msgid "Retrieving checksum signature..."
+msgstr "Retrieving checksum signature..."
+
+msgid "Verifying checksum signature..."
+msgstr "Verifying checksum signature..."
+
+msgid "GPG Key verification failed"
+msgstr "GPG Key verification failed"
+
diff --git a/po/ja.po b/po/ja.po
index 8f3f10f..261bdd5 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: 0.3.18\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2006-03-07 20:26+0900\n"
-"PO-Revision-Date: 2007-06-09 11:40+0500\n"
+"PO-Revision-Date: 2007-06-17 21:05+0500\n"
"Last-Translator: JW <J_W@somewhere.c0.jp>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -481,3 +481,24 @@ msgstr "Download rate: %.0f%s/s"
msgid "Failed to download %s: %s"
msgstr "Failed to download %s: %s"
+msgid "Import"
+msgstr "Import"
+
+msgid "No key found"
+msgstr "No key found"
+
+msgid "<b>GPG Keys</b>"
+msgstr "<b>GPG Keys</b>"
+
+msgid "Verification"
+msgstr "Verification"
+
+msgid "Retrieving checksum signature..."
+msgstr "Retrieving checksum signature..."
+
+msgid "Verifying checksum signature..."
+msgstr "Verifying checksum signature..."
+
+msgid "GPG Key verification failed"
+msgstr "GPG Key verification failed"
+
diff --git a/po/nl.po b/po/nl.po
index 0efb1bd..ef6bd49 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: 0.3.18\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-08-18 23:06+0200\n"
-"PO-Revision-Date: 2007-06-09 11:40+0500\n"
+"PO-Revision-Date: 2007-06-17 21:05+0500\n"
"Last-Translator: Martijn Dekker <martijn@inlv.demon.nl>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -480,3 +480,24 @@ msgstr "Download rate: %.0f%s/s"
msgid "Failed to download %s: %s"
msgstr "Failed to download %s: %s"
+msgid "Import"
+msgstr "Import"
+
+msgid "No key found"
+msgstr "No key found"
+
+msgid "<b>GPG Keys</b>"
+msgstr "<b>GPG Keys</b>"
+
+msgid "Verification"
+msgstr "Verification"
+
+msgid "Retrieving checksum signature..."
+msgstr "Retrieving checksum signature..."
+
+msgid "Verifying checksum signature..."
+msgstr "Verifying checksum signature..."
+
+msgid "GPG Key verification failed"
+msgstr "GPG Key verification failed"
+
diff --git a/po/pl.po b/po/pl.po
index 978af6f..fd97b6a 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: 0.3.18\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-17 14:52-0500\n"
-"PO-Revision-Date: 2007-06-09 11:40+0500\n"
+"PO-Revision-Date: 2007-06-17 21:05+0500\n"
"Last-Translator: Piotr Simon <sajmon@tenboard.com>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -449,3 +449,24 @@ msgstr "Download rate: %.0f%s/s"
msgid "Failed to download %s: %s"
msgstr "Failed to download %s: %s"
+msgid "Import"
+msgstr "Import"
+
+msgid "No key found"
+msgstr "No key found"
+
+msgid "<b>GPG Keys</b>"
+msgstr "<b>GPG Keys</b>"
+
+msgid "Verification"
+msgstr "Verification"
+
+msgid "Retrieving checksum signature..."
+msgstr "Retrieving checksum signature..."
+
+msgid "Verifying checksum signature..."
+msgstr "Verifying checksum signature..."
+
+msgid "GPG Key verification failed"
+msgstr "GPG Key verification failed"
+
diff --git a/po/pt.po b/po/pt.po
index 6d8759b..b105b87 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: 0.3.18\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-05-06 11:10-0500\n"
-"PO-Revision-Date: 2007-06-09 11:40+0500\n"
+"PO-Revision-Date: 2007-06-17 21:05+0500\n"
"Last-Translator: Pedro Pinto aka _PN_boy <pedro_nuno_pn@zmail.pt>\n"
"Language-Team: slapt-get devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -469,3 +469,24 @@ msgstr "Download rate: %.0f%s/s"
msgid "Failed to download %s: %s"
msgstr "Failed to download %s: %s"
+msgid "Import"
+msgstr "Import"
+
+msgid "No key found"
+msgstr "No key found"
+
+msgid "<b>GPG Keys</b>"
+msgstr "<b>GPG Keys</b>"
+
+msgid "Verification"
+msgstr "Verification"
+
+msgid "Retrieving checksum signature..."
+msgstr "Retrieving checksum signature..."
+
+msgid "Verifying checksum signature..."
+msgstr "Verifying checksum signature..."
+
+msgid "GPG Key verification failed"
+msgstr "GPG Key verification failed"
+
diff --git a/po/pt_BR.po b/po/pt_BR.po
index da348e2..3e44517 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: 0.3.18\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-26 22:25-0500\n"
-"PO-Revision-Date: 2007-06-09 11:40+0500\n"
+"PO-Revision-Date: 2007-06-17 21:05+0500\n"
"Last-Translator: Frederico Henrique Gonalves Lima <fredhgl@yahoo.com.br>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -479,3 +479,24 @@ msgstr "Download rate: %.0f%s/s"
msgid "Failed to download %s: %s"
msgstr "Failed to download %s: %s"
+msgid "Import"
+msgstr "Import"
+
+msgid "No key found"
+msgstr "No key found"
+
+msgid "<b>GPG Keys</b>"
+msgstr "<b>GPG Keys</b>"
+
+msgid "Verification"
+msgstr "Verification"
+
+msgid "Retrieving checksum signature..."
+msgstr "Retrieving checksum signature..."
+
+msgid "Verifying checksum signature..."
+msgstr "Verifying checksum signature..."
+
+msgid "GPG Key verification failed"
+msgstr "GPG Key verification failed"
+
diff --git a/po/ru.po b/po/ru.po
index 35f5b10..7a3ce72 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: 0.3.18\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-09-08 00:54\n"
-"PO-Revision-Date: 2007-06-09 11:40+0500\n"
+"PO-Revision-Date: 2007-06-17 21:05+0500\n"
"Last-Translator: sin <digitalhunger@gmail.com>\n"
"Language-Team: DeepStyle team <deep@deepstyle.org.ua>\n"
"MIME-Version: 1.0\n"
@@ -444,3 +444,24 @@ msgstr "Download rate: %.0f%s/s"
msgid "Failed to download %s: %s"
msgstr "Failed to download %s: %s"
+msgid "Import"
+msgstr "Import"
+
+msgid "No key found"
+msgstr "No key found"
+
+msgid "<b>GPG Keys</b>"
+msgstr "<b>GPG Keys</b>"
+
+msgid "Verification"
+msgstr "Verification"
+
+msgid "Retrieving checksum signature..."
+msgstr "Retrieving checksum signature..."
+
+msgid "Verifying checksum signature..."
+msgstr "Verifying checksum signature..."
+
+msgid "GPG Key verification failed"
+msgstr "GPG Key verification failed"
+
diff --git a/po/sk.po b/po/sk.po
index 72c5b06..1b99f3e 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: 0.3.18\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-06-23 21:28-0500\n"
-"PO-Revision-Date: 2007-06-09 11:40+0500\n"
+"PO-Revision-Date: 2007-06-17 21:05+0500\n"
"Last-Translator: Erik Gyepes <depi@depi.sk>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -473,3 +473,24 @@ msgstr "Download rate: %.0f%s/s"
msgid "Failed to download %s: %s"
msgstr "Failed to download %s: %s"
+msgid "Import"
+msgstr "Import"
+
+msgid "No key found"
+msgstr "No key found"
+
+msgid "<b>GPG Keys</b>"
+msgstr "<b>GPG Keys</b>"
+
+msgid "Verification"
+msgstr "Verification"
+
+msgid "Retrieving checksum signature..."
+msgstr "Retrieving checksum signature..."
+
+msgid "Verifying checksum signature..."
+msgstr "Verifying checksum signature..."
+
+msgid "GPG Key verification failed"
+msgstr "GPG Key verification failed"
+
diff --git a/po/sv.po b/po/sv.po
index 92da08a..2155a90 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: 0.3.18\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-26 22:25-0500\n"
-"PO-Revision-Date: 2007-06-09 11:40+0500\n"
+"PO-Revision-Date: 2007-06-17 21:05+0500\n"
"Last-Translator: Hakan Lindqvist <tfy00hlt@cs.umu.se>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -473,3 +473,24 @@ msgstr "Download rate: %.0f%s/s"
msgid "Failed to download %s: %s"
msgstr "Failed to download %s: %s"
+msgid "Import"
+msgstr "Import"
+
+msgid "No key found"
+msgstr "No key found"
+
+msgid "<b>GPG Keys</b>"
+msgstr "<b>GPG Keys</b>"
+
+msgid "Verification"
+msgstr "Verification"
+
+msgid "Retrieving checksum signature..."
+msgstr "Retrieving checksum signature..."
+
+msgid "Verifying checksum signature..."
+msgstr "Verifying checksum signature..."
+
+msgid "GPG Key verification failed"
+msgstr "GPG Key verification failed"
+
diff --git a/po/tr.po b/po/tr.po
index 1879074..d53b4fe 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: 0.3.18\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-26 22:25-0500\n"
-"PO-Revision-Date: 2007-06-09 11:40+0500\n"
+"PO-Revision-Date: 2007-06-17 21:05+0500\n"
"Last-Translator: Bekir SONAT <bekirsonat@kde.org.tr>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -489,3 +489,24 @@ msgstr "İndirme hızı: %.0f%s/s"
msgid "Failed to download %s: %s"
msgstr "Failed to download %s: %s"
+msgid "Import"
+msgstr "Import"
+
+msgid "No key found"
+msgstr "No key found"
+
+msgid "<b>GPG Keys</b>"
+msgstr "<b>GPG Keys</b>"
+
+msgid "Verification"
+msgstr "Verification"
+
+msgid "Retrieving checksum signature..."
+msgstr "Retrieving checksum signature..."
+
+msgid "Verifying checksum signature..."
+msgstr "Verifying checksum signature..."
+
+msgid "GPG Key verification failed"
+msgstr "GPG Key verification failed"
+
diff --git a/po/uk.po b/po/uk.po
index 9cb4716..7148d0e 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: 0.3.18\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-09-08 00:54\n"
-"PO-Revision-Date: 2007-06-09 11:40+0500\n"
+"PO-Revision-Date: 2007-06-17 21:05+0500\n"
"Last-Translator: sin <digitalhunger@gmail.com>\n"
"Language-Team: DeepStyle team <deep@deepstyle.org.ua>\n"
"MIME-Version: 1.0\n"
@@ -444,3 +444,24 @@ msgstr "Download rate: %.0f%s/s"
msgid "Failed to download %s: %s"
msgstr "Failed to download %s: %s"
+msgid "Import"
+msgstr "Import"
+
+msgid "No key found"
+msgstr "No key found"
+
+msgid "<b>GPG Keys</b>"
+msgstr "<b>GPG Keys</b>"
+
+msgid "Verification"
+msgstr "Verification"
+
+msgid "Retrieving checksum signature..."
+msgstr "Retrieving checksum signature..."
+
+msgid "Verifying checksum signature..."
+msgstr "Verifying checksum signature..."
+
+msgid "GPG Key verification failed"
+msgstr "GPG Key verification failed"
+
diff --git a/po/vi.po b/po/vi.po
index 9579752..00999a7 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: 0.3.18\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-26 22:25-0500\n"
-"PO-Revision-Date: 2007-06-09 11:40+0500\n"
+"PO-Revision-Date: 2007-06-17 21:05+0500\n"
"Last-Translator: Nguyễn Văn Vũ <vncasper@yahoo.com>\n"
"Language-Team: gnome-vi <gnomevi-list@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
@@ -473,3 +473,24 @@ msgstr "Download rate: %.0f%s/s"
msgid "Failed to download %s: %s"
msgstr "Failed to download %s: %s"
+msgid "Import"
+msgstr "Import"
+
+msgid "No key found"
+msgstr "No key found"
+
+msgid "<b>GPG Keys</b>"
+msgstr "<b>GPG Keys</b>"
+
+msgid "Verification"
+msgstr "Verification"
+
+msgid "Retrieving checksum signature..."
+msgstr "Retrieving checksum signature..."
+
+msgid "Verifying checksum signature..."
+msgstr "Verifying checksum signature..."
+
+msgid "GPG Key verification failed"
+msgstr "GPG Key verification failed"
+
diff --git a/po/zh_CN.po b/po/zh_CN.po
index f14681a..9801ccb 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: 0.3.18\n"
"Report-Msgid-Bugs-To: slapt-get-devel@software.jaos.org\n"
"POT-Creation-Date: 2005-02-26 22:25-0500\n"
-"PO-Revision-Date: 2007-06-09 11:40+0500\n"
+"PO-Revision-Date: 2007-06-17 21:05+0500\n"
"Last-Translator: Yang Jinsong <shannleon@gmail.com>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -480,3 +480,24 @@ msgstr "Download rate: %.0f%s/s"
msgid "Failed to download %s: %s"
msgstr "Failed to download %s: %s"
+msgid "Import"
+msgstr "Import"
+
+msgid "No key found"
+msgstr "No key found"
+
+msgid "<b>GPG Keys</b>"
+msgstr "<b>GPG Keys</b>"
+
+msgid "Verification"
+msgstr "Verification"
+
+msgid "Retrieving checksum signature..."
+msgstr "Retrieving checksum signature..."
+
+msgid "Verifying checksum signature..."
+msgstr "Verifying checksum signature..."
+
+msgid "GPG Key verification failed"
+msgstr "GPG Key verification failed"
+
diff --git a/src/callbacks.c b/src/callbacks.c
index 7ca37d6..a622dfc 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -60,6 +60,9 @@ static void gslapt_clear_status (guint context_id);
static void lock_toolbar_buttons (void);
static void unlock_toolbar_buttons (void);
static void build_sources_treeviewlist (GtkWidget *treeview);
+#ifdef SLAPT_HAS_GPGME
+static void build_verification_sources_treeviewlist (GtkWidget *treeview);
+#endif
static void build_exclude_treeviewlist (GtkWidget *treeview);
static int populate_transaction_window (GtkWidget *trans_window);
char *download_packages (void);
@@ -148,6 +151,9 @@ void open_preferences (GtkMenuItem *menuitem, gpointer user_data)
GtkWidget *preferences;
GtkEntry *working_dir;
GtkTreeView *source_tree,*exclude_tree;
+ #ifdef SLAPT_HAS_GPGME
+ GtkTreeView *verification_source_tree;
+ #endif
preferences = (GtkWidget *)create_window_preferences();
@@ -156,6 +162,12 @@ void open_preferences (GtkMenuItem *menuitem, gpointer user_data)
source_tree = GTK_TREE_VIEW(lookup_widget(preferences,"preferences_sources_treeview"));
build_sources_treeviewlist((GtkWidget *)source_tree);
+
+ #ifdef SLAPT_HAS_GPGME
+ verification_source_tree = GTK_TREE_VIEW(lookup_widget(preferences,"preferences_verification_sources_treeview"));
+ build_verification_sources_treeviewlist((GtkWidget *)verification_source_tree);
+ #endif
+
exclude_tree = GTK_TREE_VIEW(lookup_widget(preferences,"preferences_exclude_treeview"));
build_exclude_treeviewlist((GtkWidget *)exclude_tree);
@@ -954,7 +966,11 @@ static void get_package_data (void)
gtk_widget_show(progress_window);
gdk_threads_leave();
- dl_files = (global_config->sources->count * 4.0 );
+ #ifdef SLAPT_HAS_GPGME
+ dl_files = (global_config->sources->count * 5.0 );
+ #else
+ dl_files = (global_config->sources->count * 4.0 );
+ #endif
if (_cancelled == 1) {
G_LOCK(_cancelled);
@@ -973,6 +989,9 @@ static void get_package_data (void)
struct slapt_pkg_list *available_pkgs = NULL;
struct slapt_pkg_list *patch_pkgs = NULL;
FILE *tmp_checksum_f = NULL;
+ #ifdef SLAPT_HAS_GPGME
+ FILE *tmp_signature_f = NULL;
+ #endif
unsigned int compressed = 0;
if (_cancelled == 1) {
@@ -1104,11 +1123,11 @@ static void get_package_data (void)
gdk_threads_enter();
gslapt_clear_status(context_id);
gtk_widget_destroy(progress_window);
+ unlock_toolbar_buttons();
if (_cancelled == 1) {
G_LOCK(_cancelled);
_cancelled = 0;
G_UNLOCK(_cancelled);
- unlock_toolbar_buttons();
} else {
notify((gchar *)_("Source download failed"),global_config->sources->url[i]);
}
@@ -1118,6 +1137,73 @@ static void get_package_data (void)
++dl_count;
+ #ifdef SLAPT_HAS_GPGME
+ gdk_threads_enter();
+ gtk_progress_bar_set_fraction(p_bar,((dl_count * 100)/dl_files)/100);
+ gtk_progress_bar_set_fraction(dl_bar,0.0);
+ gtk_label_set_text(progress_action_label,(gchar *)_("Retrieving checksum signature..."));
+ gdk_threads_leave();
+
+ tmp_signature_f = slapt_get_pkg_source_checksums_signature (global_config,
+ global_config->sources->url[i],
+ &compressed);
+
+ if (tmp_signature_f == NULL) {
+ if (_cancelled == 1) {
+ gdk_threads_enter();
+ gslapt_clear_status(context_id);
+ gtk_widget_destroy(progress_window);
+ G_LOCK(_cancelled);
+ _cancelled = 0;
+ G_UNLOCK(_cancelled);
+ unlock_toolbar_buttons();
+ gdk_threads_leave();
+ return;
+ }
+ } else {
+ FILE *tmp_checksum_to_verify_f = NULL;
+
+ /* if we downloaded the compressed checksums, open it raw (w/o gunzippign) */
+ if (compressed == 1) {
+ char *filename = slapt_gen_filename_from_url(global_config->sources->url[i],
+ SLAPT_CHECKSUM_FILE_GZ);
+ tmp_checksum_to_verify_f = slapt_open_file(filename,"r");
+ free(filename);
+ } else {
+ tmp_checksum_to_verify_f = tmp_checksum_f;
+ }
+
+ if (tmp_checksum_to_verify_f != NULL) {
+ slapt_code_t verified = SLAPT_CHECKSUMS_NOT_VERIFIED;
+ gdk_threads_enter();
+ gtk_label_set_text(progress_action_label,(gchar *)_("Verifying checksum signature..."));
+ gdk_threads_leave();
+ verified = slapt_gpg_verify_checksums(tmp_checksum_to_verify_f, tmp_signature_f);
+ if (verified == SLAPT_CHECKSUMS_NOT_VERIFIED) {
+ fclose(tmp_checksum_f);
+ fclose(tmp_signature_f);
+ if (compressed == 1)
+ fclose(tmp_checksum_to_verify_f);
+ gdk_threads_enter();
+ gslapt_clear_status(context_id);
+ gtk_widget_destroy(progress_window);
+ unlock_toolbar_buttons();
+ notify((gchar *)_("GPG Key verification failed"),global_config->sources->url[i]);
+ gdk_threads_leave();
+ return;
+ }
+ }
+
+ fclose(tmp_signature_f);
+
+ /* if we opened the raw gzipped checksums, close it here */
+ if (compressed == 1)
+ fclose(tmp_checksum_to_verify_f);
+ }
+
+ ++dl_count;
+ #endif
+
/* download changelog file */
gdk_threads_enter();
gtk_progress_bar_set_fraction(p_bar,((dl_count * 100)/dl_files)/100);
@@ -1475,7 +1561,7 @@ static void build_sources_treeviewlist(GtkWidget *treeview)
/* show disabled sources here */
for (i = 0; i < disabled_sources->count; ++i) {
- GdkPixbuf *status_icon = create_pixbuf("pkg_action_installed.png");
+ GdkPixbuf *status_icon = create_pixbuf("pkg_action_available.png");
gtk_list_store_append(store, &iter);
gtk_list_store_set(store,&iter,
@@ -3499,3 +3585,113 @@ static void unset_busy_cursor (void)
gdk_flush();
}
+
+static void build_verification_sources_treeviewlist (GtkWidget *treeview)
+{
+ GtkListStore *store;
+ GtkTreeIter iter;
+ GtkCellRenderer *renderer;
+ GtkTreeViewColumn *column;
+ GtkTreeSelection *select;
+ guint i = 0;
+
+ store = gtk_list_store_new (
+ 1,
+ G_TYPE_STRING
+ );
+
+ for (i = 0; i < global_config->sources->count; ++i) {
+ if ( global_config->sources->url[i] == NULL )
+ continue;
+
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store,&iter, 0,global_config->sources->url[i], -1);
+ }
+
+ /* column for url */
+ renderer = gtk_cell_renderer_text_new();
+ column = gtk_tree_view_column_new_with_attributes ((gchar *)_("Source"), renderer,
+ "text", 0, NULL);
+ gtk_tree_view_column_set_sort_column_id (column, 0);
+ gtk_tree_view_append_column (GTK_TREE_VIEW(treeview), column);
+
+ gtk_tree_view_set_model (GTK_TREE_VIEW(treeview),GTK_TREE_MODEL(store));
+ select = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
+ gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
+}
+
+#ifdef SLAPT_HAS_GPGME
+static void get_gpg_key(GtkWidget *w)
+{
+ GtkTreeIter iter;
+ GtkTreeModel *model;
+ GtkTreeView *source_tree = GTK_TREE_VIEW(lookup_widget(w,"preferences_verification_sources_treeview"));
+ GtkTreeSelection *select = gtk_tree_view_get_selection (GTK_TREE_VIEW (source_tree));
+ GtkListStore *store = GTK_LIST_STORE(gtk_tree_view_get_model(source_tree));
+
+ if ( gtk_tree_selection_get_selected(select,&model,&iter)) {
+ GtkLabel *progress_action_label, *progress_message_label;
+ GtkProgressBar *p_bar, *dl_bar;
+ unsigned int compressed = 0;
+ FILE *gpg_key= NULL;
+ slapt_code_t result;
+ gchar *url;
+ gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 0, &url, -1);
+
+ progress_window = create_dl_progress_window();
+ gtk_window_set_title(GTK_WINDOW(progress_window),(gchar *)_("Progress"));
+ p_bar = GTK_PROGRESS_BAR(lookup_widget(progress_window,"progress_progressbar"));
+ dl_bar = GTK_PROGRESS_BAR(lookup_widget(progress_window,"dl_progress"));
+ progress_action_label = GTK_LABEL(lookup_widget(progress_window,"progress_action"));
+ progress_message_label = GTK_LABEL(lookup_widget(progress_window,"progress_message"));
+ gtk_progress_bar_set_fraction(dl_bar,0.0);
+ gtk_label_set_text(progress_message_label,url);
+ gtk_label_set_text(progress_action_label,(gchar *)SLAPT_GPG_KEY);
+
+ gdk_threads_enter();
+ gtk_widget_show(progress_window);
+ gdk_threads_leave();
+
+ gpg_key = slapt_get_pkg_source_gpg_key(global_config, url, &compressed);
+
+ if (_cancelled == 1)
+ {
+ G_LOCK(_cancelled);
+ _cancelled = 0;
+ G_UNLOCK(_cancelled);
+ if (gpg_key) {
+ fclose(gpg_key);
+ gpg_key = NULL;
+ }
+ }
+
+ if (gpg_key)
+ {
+ result = slapt_add_pkg_source_gpg_key (gpg_key);
+ gdk_threads_enter();
+ notify(_("Import"),slapt_strerror(result));
+ gdk_threads_leave();
+ } else {
+ gdk_threads_enter();
+ notify(_("Import"),_("No key found"));
+ gdk_threads_leave();
+ }
+
+ g_free(url);
+
+ gdk_threads_enter();
+ gtk_widget_destroy(progress_window);
+ gdk_threads_leave();
+
+ }
+
+}
+
+void preferences_sources_add_key (GtkWidget *w, gpointer user_data)
+{
+ GThread *gdp;
+ gdp = g_thread_create((GThreadFunc)get_gpg_key,w,FALSE,NULL);
+
+ return;
+}
+#endif
diff --git a/src/callbacks.h b/src/callbacks.h
index a86a63a..6cc343d 100644
--- a/src/callbacks.h
+++ b/src/callbacks.h
@@ -100,3 +100,7 @@ void view_marked_packages (GtkMenuItem *menuitem, gpointer user_data);
void mark_obsolete_packages (GtkMenuItem *menuitem, gpointer user_data);
+#ifdef SLAPT_HAS_GPGME
+void preferences_sources_add_key (GtkWidget *w, gpointer user_data);
+#endif
+
diff --git a/src/interface.c b/src/interface.c
index b99fb9c..1cccede 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -73,6 +73,19 @@ create_window_preferences (void)
GtkWidget *new_source_entry;
GtkWidget *preferences_add_source_button;
GtkWidget *label160;
+ #ifdef SLAPT_HAS_GPGME
+ GtkWidget *preferences_verification_vbox;
+ GtkWidget *vbox76;
+ GtkWidget *label294;
+ GtkWidget *hbox116;
+ GtkWidget *label295;
+ GtkWidget *hbox117;
+ GtkWidget *scrolledwindow24;
+ GtkWidget *preferences_verification_sources_treeview;
+ GtkWidget *vbox77;
+ GtkWidget *button9;
+ GtkWidget *label293;
+ #endif
GtkWidget *preferences_hbuttonbox;
GtkWidget *preferences_close_button;
GtkWidget *preferences_ok_button;
@@ -335,6 +348,73 @@ create_window_preferences (void)
gtk_widget_show (label160);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (preferences_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (preferences_notebook), 2), label160);
+ #ifdef SLAPT_HAS_GPGME
+ preferences_verification_vbox = gtk_vbox_new (FALSE, 18);
+ gtk_widget_set_name (preferences_verification_vbox, "preferences_verification_vbox");
+ gtk_widget_show (preferences_verification_vbox);
+ gtk_container_add (GTK_CONTAINER (preferences_notebook), preferences_verification_vbox);
+ gtk_container_set_border_width (GTK_CONTAINER (preferences_verification_vbox), 12);
+
+ vbox76 = gtk_vbox_new (FALSE, 6);
+ gtk_widget_set_name (vbox76, "vbox76");
+ gtk_widget_show (vbox76);
+ gtk_box_pack_start (GTK_BOX (preferences_verification_vbox), vbox76, TRUE, TRUE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox76), 12);
+
+ label294 = gtk_label_new (_("<b>GPG Keys</b>"));
+ gtk_widget_set_name (label294, "label294");
+ gtk_widget_show (label294);
+ gtk_box_pack_start (GTK_BOX (vbox76), label294, FALSE, FALSE, 0);
+ gtk_label_set_use_markup (GTK_LABEL (label294), TRUE);
+ gtk_misc_set_alignment (GTK_MISC (label294), 0, 0.5);
+
+ hbox116 = gtk_hbox_new (FALSE, 0);
+ gtk_widget_set_name (hbox116, "hbox116");
+ gtk_widget_show (hbox116);
+ gtk_box_pack_start (GTK_BOX (vbox76), hbox116, TRUE, TRUE, 0);
+ gtk_widget_set_size_request (hbox116, -1, 174);
+
+ label295 = gtk_label_new (" ");
+ gtk_widget_set_name (label295, "label295");
+ gtk_widget_show (label295);
+ gtk_box_pack_start (GTK_BOX (hbox116), label295, FALSE, FALSE, 0);
+
+ hbox117 = gtk_hbox_new (FALSE, 12);
+ gtk_widget_set_name (hbox117, "hbox117");
+ gtk_widget_show (hbox117);
+ gtk_box_pack_start (GTK_BOX (hbox116), hbox117, TRUE, TRUE, 0);
+
+ scrolledwindow24 = gtk_scrolled_window_new (NULL, NULL);
+ gtk_widget_set_name (scrolledwindow24, "scrolledwindow24");
+ gtk_widget_show (scrolledwindow24);
+ gtk_box_pack_start (GTK_BOX (hbox117), scrolledwindow24, TRUE, TRUE, 0);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow24), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow24), GTK_SHADOW_IN);
+
+ preferences_verification_sources_treeview = gtk_tree_view_new ();
+ gtk_widget_set_name (preferences_verification_sources_treeview, "preferences_verification_sources_treeview");
+ gtk_widget_show (preferences_verification_sources_treeview);
+ gtk_container_add (GTK_CONTAINER (scrolledwindow24), preferences_verification_sources_treeview);
+ gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (preferences_verification_sources_treeview), TRUE);
+ gtk_tree_view_set_reorderable (GTK_TREE_VIEW (preferences_verification_sources_treeview), TRUE);
+
+ vbox77 = gtk_vbox_new (FALSE, 6);
+ gtk_widget_set_name (vbox77, "vbox77");
+ gtk_widget_show (vbox77);
+ gtk_box_pack_start (GTK_BOX (hbox117), vbox77, FALSE, FALSE, 0);
+
+ button9 = gtk_button_new_from_stock ("gtk-add");
+ gtk_widget_set_name (button9, "button9");
+ gtk_widget_show (button9);
+ gtk_box_pack_start (GTK_BOX (vbox77), button9, FALSE, FALSE, 0);
+ GTK_WIDGET_SET_FLAGS (button9, GTK_CAN_DEFAULT);
+
+ label293 = gtk_label_new (_("Verification"));
+ gtk_widget_set_name (label293, "label293");
+ gtk_widget_show (label293);
+ gtk_notebook_set_tab_label (GTK_NOTEBOOK (preferences_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (preferences_notebook), 3), label293);
+ #endif
+
preferences_hbuttonbox = gtk_hbutton_box_new ();
gtk_widget_set_name (preferences_hbuttonbox, "preferences_hbuttonbox");
gtk_widget_show (preferences_hbuttonbox);
@@ -388,6 +468,11 @@ create_window_preferences (void)
g_signal_connect_swapped ((gpointer) preferences_add_source_button, "clicked",
G_CALLBACK (preferences_sources_add),
GTK_OBJECT (window_preferences));
+ #ifdef SLAPT_HAS_GPGME
+ g_signal_connect_swapped ((gpointer) button9, "clicked",
+ G_CALLBACK (preferences_sources_add_key),
+ GTK_OBJECT (window_preferences));
+ #endif
g_signal_connect_swapped ((gpointer) preferences_close_button, "clicked",
G_CALLBACK (cancel_preferences),
GTK_OBJECT (window_preferences));
@@ -439,6 +524,19 @@ create_window_preferences (void)
GLADE_HOOKUP_OBJECT (window_preferences, new_source_entry, "new_source_entry");
GLADE_HOOKUP_OBJECT (window_preferences, preferences_add_source_button, "preferences_add_source_button");
GLADE_HOOKUP_OBJECT (window_preferences, label160, "label160");
+ #ifdef SLAPT_HAS_GPGME
+ GLADE_HOOKUP_OBJECT (window_preferences, preferences_verification_vbox, "preferences_verification_vbox");
+ GLADE_HOOKUP_OBJECT (window_preferences, vbox76, "vbox76");
+ GLADE_HOOKUP_OBJECT (window_preferences, label294, "label294");
+ GLADE_HOOKUP_OBJECT (window_preferences, hbox116, "hbox116");
+ GLADE_HOOKUP_OBJECT (window_preferences, label295, "label295");
+ GLADE_HOOKUP_OBJECT (window_preferences, hbox117, "hbox117");
+ GLADE_HOOKUP_OBJECT (window_preferences, scrolledwindow24, "scrolledwindow24");
+ GLADE_HOOKUP_OBJECT (window_preferences, preferences_verification_sources_treeview, "preferences_verification_sources_treeview");
+ GLADE_HOOKUP_OBJECT (window_preferences, vbox77, "vbox77");
+ GLADE_HOOKUP_OBJECT (window_preferences, button9, "button9");
+ GLADE_HOOKUP_OBJECT (window_preferences, label293, "label293");
+ #endif
GLADE_HOOKUP_OBJECT (window_preferences, preferences_hbuttonbox, "preferences_hbuttonbox");
GLADE_HOOKUP_OBJECT (window_preferences, preferences_close_button, "preferences_close_button");
GLADE_HOOKUP_OBJECT (window_preferences, preferences_ok_button, "preferences_ok_button");