[PackageKit-commit] packagekit: Branch 'master' - 15 commits

Richard Hughes hughsient at kemper.freedesktop.org
Tue Dec 2 06:04:00 PST 2008


 backends/yum/yumBackend.py         |   17 -
 contrib/PackageKit.spec.in         |    6 
 contrib/gtk-module/Makefile.am     |   12 
 contrib/gtk-module/README          |   16 
 contrib/gtk-module/pk-gtk-module.c |  340 +++++++++++----------
 lib/packagekit-glib/egg-string.c   |    4 
 lib/packagekit-glib/egg-test.c     |   30 +
 lib/packagekit-glib/pk-catalog.c   |    8 
 po/sv.po                           |  597 ++++++++++++++++---------------------
 src/Makefile.am                    |    1 
 src/pk-spawn.c                     |    6 
 11 files changed, 513 insertions(+), 524 deletions(-)

New commits:
commit b401dff9d090d377c8bcf8b4abc4292e42f05ca4
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Dec 2 13:50:47 2008 +0000

    trivial: correct the test file loading now the packagekit glib lib is up one directory

diff --git a/lib/packagekit-glib/egg-test.c b/lib/packagekit-glib/egg-test.c
index 656937c..09e69d6 100644
--- a/lib/packagekit-glib/egg-test.c
+++ b/lib/packagekit-glib/egg-test.c
@@ -320,17 +320,16 @@ egg_test_get_data_file (const gchar *filename)
 	/* check to see if we are being run in the build root */
 	full = g_build_filename ("..", "data", "tests", filename, NULL);
 	ret = g_file_test (full, G_FILE_TEST_EXISTS);
-	if (ret) {
+	if (ret)
 		return full;
-	}
 	g_free (full);
 
 	/* check to see if we are being run in make check */
-	full = g_build_filename ("..", "..", "data", "tests", filename, NULL);
+	full = g_build_filename ("..", "..", "..", "data", "tests", filename, NULL);
 	ret = g_file_test (full, G_FILE_TEST_EXISTS);
-	if (ret) {
+	if (ret)
 		return full;
-	}
+	g_print ("[WARN] failed to find '%s'\n", full);
 	g_free (full);
 	return NULL;
 }
commit 5c397e0e9613cd773dd88f3c3f0895cdc1e0c53c
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Dec 2 13:49:46 2008 +0000

    trivial: don't critically warn when we fail to load a file in the test suite

diff --git a/lib/packagekit-glib/pk-catalog.c b/lib/packagekit-glib/pk-catalog.c
index 2cac9e1..ac754fd 100644
--- a/lib/packagekit-glib/pk-catalog.c
+++ b/lib/packagekit-glib/pk-catalog.c
@@ -406,16 +406,20 @@ pk_catalog_test (EggTest *test)
 	egg_test_assert (test, catalog != NULL);
 
 	/************************************************************/
-	egg_test_title (test, "process the files getting non-null");
+	egg_test_title (test, "get test file");
 	path = egg_test_get_data_file ("test.catalog");
+	egg_test_assert (test, path != NULL);
+
+	/************************************************************/
+	egg_test_title (test, "process the files getting non-null");
 	filenames = g_strsplit (path, " ", 0);
 	list = pk_catalog_process_files (catalog, filenames);
-	g_free (path);
 	g_strfreev (filenames);
 	if (list != NULL)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, NULL);
+	g_free (path);
 
 	/************************************************************/
 	egg_test_title (test, "have we got packages?");
commit 2fd097554b7ced9b6b75469f524960991c2341d0
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Dec 2 13:48:31 2008 +0000

    trivial: cleanup a file created in the self text code

diff --git a/src/Makefile.am b/src/Makefile.am
index 0124055..604ed79 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -226,6 +226,7 @@ EXTRA_DIST =						\
 
 clean-local:
 	rm -f *~
+	rm -f transactions.db
 	rm -f pk-marshal.c pk-marshal.h
 
 CLEANFILES = *~ $(BUILT_SOURCES)
commit 02087f487162f0b69a69914b214a5f644e03f4db
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Dec 2 13:21:02 2008 +0000

    yum: don't error out with an internal error if the non-installed dep check fails. fixes rh#474138

diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 788c9f3..04424b7 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -1008,7 +1008,8 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
         # remove any of the packages we passed in
         for package_id in package_ids:
             pkg, inst = self._findPackage(package_id)
-            deps_list.remove(pkg)
+            if pkg in deps_list:
+                deps_list.remove(pkg)
 
         # remove any that are already installed
         for pkg in deps_list:
commit 7f394e25069abc3c69ed3e3e2b013cbd6041d324
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Dec 2 13:11:38 2008 +0000

    trivial: set LANG and NETWORK in the test suite for PkSpawn

diff --git a/src/pk-spawn.c b/src/pk-spawn.c
index 0988fc2..601ed7d 100644
--- a/src/pk-spawn.c
+++ b/src/pk-spawn.c
@@ -850,7 +850,8 @@ pk_spawn_test (EggTest *test)
 	file = egg_test_get_data_file ("pk-spawn-dispatcher.py");
 	path = g_strdup_printf ("%s\tsearch-name\tnone\tpower manager", file);
 	argv = g_strsplit (path, "\t", 0);
-	ret = pk_spawn_argv (spawn, argv, NULL);
+	envp = g_strsplit ("NETWORK=TRUE LANG=C", " ", 0);
+	ret = pk_spawn_argv (spawn, argv, envp);
 	g_free (file);
 	g_free (path);
 	if (ret)
@@ -884,7 +885,7 @@ pk_spawn_test (EggTest *test)
 
 	/************************************************************/
 	egg_test_title (test, "run the dispatcher with new input");
-	ret = pk_spawn_argv (spawn, argv, NULL);
+	ret = pk_spawn_argv (spawn, argv, envp);
 	if (ret)
 		egg_test_success (test, NULL);
 	else
@@ -945,6 +946,7 @@ pk_spawn_test (EggTest *test)
 		egg_test_failed (test, "dispatcher closed twice");
 
 	g_strfreev (argv);
+	g_strfreev (envp);
 	g_object_unref (spawn);
 
 	egg_test_end (test);
commit af38c093efd33e7ac0893fb8da7cb5bcab9715be
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Dec 2 12:35:24 2008 +0000

    trivial: egg updates

diff --git a/lib/packagekit-glib/egg-string.c b/lib/packagekit-glib/egg-string.c
index 33df11e..2e860df 100644
--- a/lib/packagekit-glib/egg-string.c
+++ b/lib/packagekit-glib/egg-string.c
@@ -189,10 +189,8 @@ egg_strlen (const gchar *text, guint len)
 gboolean
 egg_strequal (const gchar *id1, const gchar *id2)
 {
-	if (id1 == NULL || id2 == NULL) {
-		egg_debug ("string compare invalid '%s' and '%s'", id1, id2);
+	if (id1 == NULL || id2 == NULL)
 		return FALSE;
-	}
 	return (strcmp (id1, id2) == 0);
 }
 
diff --git a/lib/packagekit-glib/egg-test.c b/lib/packagekit-glib/egg-test.c
index 0826299..656937c 100644
--- a/lib/packagekit-glib/egg-test.c
+++ b/lib/packagekit-glib/egg-test.c
@@ -32,6 +32,7 @@ struct EggTest {
 	guint		 total;
 	guint		 succeeded;
 	gboolean	 started;
+	gboolean	 titled;
 	gchar		*type;
 	GTimer		*timer;
 	GMainLoop	*loop;
@@ -51,6 +52,7 @@ egg_test_init ()
 	test->succeeded = 0;
 	test->type = NULL;
 	test->started = FALSE;
+	test->titled = FALSE;
 	test->timer = g_timer_new ();
 	test->loop = g_main_loop_new (NULL, FALSE);
 	test->hang_loop_id = 0;
@@ -207,6 +209,12 @@ egg_test_title (EggTest *test, const gchar *format, ...)
 	va_list args;
 	gchar *va_args_buffer = NULL;
 
+	/* already titled? */
+	if (test->titled) {
+		g_print ("Already titled!\n");
+		exit (1);
+	}
+
 	/* reset the value egg_test_elapsed replies with */
 	g_timer_reset (test->timer);
 
@@ -216,6 +224,7 @@ egg_test_title (EggTest *test, const gchar *format, ...)
 	g_print ("> check #%u\t%s: \t%s...", test->total+1, test->type, va_args_buffer);
 	g_free (va_args_buffer);
 
+	test->titled = TRUE;
 	test->total++;
 }
 
@@ -228,6 +237,11 @@ egg_test_success (EggTest *test, const gchar *format, ...)
 	va_list args;
 	gchar *va_args_buffer = NULL;
 
+	/* not titled? */
+	if (!test->titled) {
+		g_print ("Not titled!\n");
+		exit (1);
+	}
 	if (format == NULL) {
 		g_print ("...OK\n");
 		goto finish;
@@ -238,6 +252,7 @@ egg_test_success (EggTest *test, const gchar *format, ...)
 	g_print ("...OK [%s]\n", va_args_buffer);
 	g_free (va_args_buffer);
 finish:
+	test->titled = FALSE;
 	test->succeeded++;
 }
 
@@ -249,6 +264,12 @@ egg_test_failed (EggTest *test, const gchar *format, ...)
 {
 	va_list args;
 	gchar *va_args_buffer = NULL;
+
+	/* not titled? */
+	if (!test->titled) {
+		g_print ("Not titled!\n");
+		exit (1);
+	}
 	if (format == NULL) {
 		g_print ("FAILED\n");
 		goto failed;
commit 3018a83e2963b09133b462ea0f1d0d067b02a463
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Dec 2 08:36:35 2008 +0000

    yum: catch all exceptions from self.yumbase.doConfigSetup() as yum doesn't seem capable of catching it's own exceptions internally. Fixes fd#18834

diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 414f468..788c9f3 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -2000,10 +2000,16 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
         self.yumbase.repos.setCache(old_cache_setting)
 
     def _setup_yum(self):
-        self.yumbase.doConfigSetup(errorlevel=-1, debuglevel=-1)     # Setup Yum Config
-        self.yumbase.conf.throttle = "90%"                        # Set bandwidth throttle to 40%
-        self.dnlCallback = DownloadCallback(self, showNames=True)  # Download callback
-        self.yumbase.repos.setProgressBar(self.dnlCallback)       # Setup the download callback class
+        try:
+            # setup Yum Config
+            self.yumbase.doConfigSetup(errorlevel=-1, debuglevel=-1)
+        except Exception, e:
+            self.error(ERROR_INTERNAL_ERROR, _to_unicode(e))
+
+        # set bandwidth throttle to 90%
+        self.yumbase.conf.throttle = "90%"
+        self.dnlCallback = DownloadCallback(self, showNames=True)
+        self.yumbase.repos.setProgressBar(self.dnlCallback)
 
 class DownloadCallback(BaseMeter):
     """ Customized version of urlgrabber.progress.BaseMeter class """
commit 4e040f8676f8bc1f6d865a7dbda52346d5d28c30
Author: Daniel Nylander <po at danielnylander.se>
Date:   Mon Dec 1 22:40:15 2008 +0000

    Updated Swedish translation
    
    Transmitted-via: Transifex (translate.fedoraproject.org)

diff --git a/po/sv.po b/po/sv.po
index e9f79df..75d107e 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -7,8 +7,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: packagekit\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-11-19 16:26+0000\n"
-"PO-Revision-Date: 2008-10-25 10:52+0100\n"
+"POT-Creation-Date: 2008-11-24 01:31+0000\n"
+"PO-Revision-Date: 2008-12-01 23:32+0100\n"
 "Last-Translator: Daniel Nylander <po at danielnylander.se>\n"
 "Language-Team: Swedish <tp-sv at listor.tp-sv.se>\n"
 "MIME-Version: 1.0\n"
@@ -16,515 +16,515 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 
 #. TRANSLATORS: this is a header for the package that can be updated
-#: ../client/pk-console.c:286
+#: ../client/pk-console.c:287
 msgid "Details about the update:"
 msgstr "Detaljer om uppdateringen:"
 
-#: ../client/pk-console.c:479
+#: ../client/pk-console.c:480
 msgid "Please restart the computer to complete the update."
 msgstr "Starta om datorn för att färdigställa uppdateringen."
 
-#: ../client/pk-console.c:481
+#: ../client/pk-console.c:482
 msgid "Please logout and login to complete the update."
 msgstr "Logga ut och logga in igen för att färdigställa uppdateringen."
 
-#: ../client/pk-console.c:483
+#: ../client/pk-console.c:484
 msgid "Please restart the application as it is being used."
 msgstr "Starta om programmet eftersom det används för tillfället."
 
 #. TRANSLATORS: The package is already installed on the system
-#: ../client/pk-console.c:595
+#: ../client/pk-console.c:596
 #, c-format
-msgid "The package '%s' is already installed"
-msgstr "Paketet \"%s\" är redan installerat"
+msgid "The package %s is already installed"
+msgstr "Paketet %s är redan installerat"
 
 #. TRANSLATORS: The package name was not found in any software sources. The detailed error follows
-#: ../client/pk-console.c:603
+#: ../client/pk-console.c:604
 #, c-format
-msgid "The package '%s' could not be installed: %s"
-msgstr "Paketet \"%s\" kunde inte installeras: %s"
+msgid "The package %s could not be installed: %s"
+msgstr "Paketet %s kunde inte installeras: %s"
 
 #. TRANSLATORS: There was a programming error that shouldn't happen. The detailed error follows
-#: ../client/pk-console.c:628 ../client/pk-console.c:655
-#: ../client/pk-console.c:751 ../client/pk-console.c:868
-#: ../client/pk-tools-common.c:61 ../client/pk-tools-common.c:79
+#: ../client/pk-console.c:629
+#: ../client/pk-console.c:656
+#: ../client/pk-console.c:752
+#: ../client/pk-console.c:869
+#: ../client/pk-tools-common.c:61
+#: ../client/pk-tools-common.c:79
 #: ../client/pk-tools-common.c:86
 #, c-format
 msgid "Internal error: %s"
 msgstr "Internt fel: %s"
 
 #. TRANSLATORS: There was an error installing the packages. The detailed error follows
-#: ../client/pk-console.c:636 ../client/pk-console.c:1263
+#: ../client/pk-console.c:637
+#: ../client/pk-console.c:1264
 #, c-format
 msgid "This tool could not install the packages: %s"
 msgstr "Detta verktyg kunde inte installera paketen: %s"
 
 #. TRANSLATORS: There was an error installing the files. The detailed error follows
-#: ../client/pk-console.c:663
+#: ../client/pk-console.c:664
 #, c-format
 msgid "This tool could not install the files: %s"
 msgstr "Detta verktyg kunde inte installera filerna: %s"
 
 #. TRANSLATORS: The package name was not found in the installed list. The detailed error follows
-#: ../client/pk-console.c:719
+#: ../client/pk-console.c:720
 #, c-format
-msgid "This tool could not remove '%s': %s"
-msgstr "Detta verktyg kunde inte ta bort \"%s\": %s"
+msgid "This tool could not remove %s: %s"
+msgstr "Detta verktyg kunde inte ta bort %s: %s"
 
 #. TRANSLATORS: There was an error removing the packages. The detailed error follows
-#: ../client/pk-console.c:742 ../client/pk-console.c:813
+#: ../client/pk-console.c:743
+#: ../client/pk-console.c:781
+#: ../client/pk-console.c:814
 #, c-format
 msgid "This tool could not remove the packages: %s"
 msgstr "Detta verktyg kunde inte ta bort paketen: %s"
 
-#. TRANSLATORS: There was an error removing the packages. The detailed error follows
-#: ../client/pk-console.c:780
-#, c-format
-msgid "This tool could not remove the packages: '%s'"
-msgstr "Detta verktyg kunde inte ta bort paketen: \"%s\""
-
 #. TRANSLATORS: When removing, we might have to remove other dependencies
-#: ../client/pk-console.c:792
+#: ../client/pk-console.c:793
 msgid "The following packages have to be removed:"
 msgstr "Följande paket måste tas bort:"
 
 #. TRANSLATORS: We are checking if it's okay to remove a list of packages
-#: ../client/pk-console.c:799
+#: ../client/pk-console.c:800
 msgid "Proceed removing additional packages?"
 msgstr "Fortsätt med att ta bort ytterligare paket?"
 
 #. TRANSLATORS: We did not remove any packages
-#: ../client/pk-console.c:804
+#: ../client/pk-console.c:805
 msgid "The package removal was canceled!"
 msgstr "Paketborttagningen avbröts!"
 
 #. TRANSLATORS: The package name was not found in any software sources
-#: ../client/pk-console.c:845
+#: ../client/pk-console.c:846
 #, c-format
-msgid "This tool could not download the package '%s' as it could not be found"
-msgstr ""
-"Detta verktyg kunde inte hämta ner paketet \"%s\" eftersom det inte hittades"
+msgid "This tool could not download the package %s as it could not be found"
+msgstr "Detta verktyg kunde inte hämta paketet \"%s\" eftersom det inte hittades"
 
 #. TRANSLATORS: Could not download the packages for some reason. The detailed error follows
-#: ../client/pk-console.c:876
+#: ../client/pk-console.c:877
 #, c-format
 msgid "This tool could not download the packages: %s"
-msgstr "Detta verktyg kunde inte hämta ner paketen: %s"
+msgstr "Detta verktyg kunde inte hämta paketen: %s"
 
 #. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:903 ../client/pk-console.c:912
+#: ../client/pk-console.c:904
+#: ../client/pk-console.c:913
 #, c-format
-msgid "This tool could not update '%s': %s"
-msgstr "Detta verktyg kunde inte uppdatera \"%s\": %s"
+msgid "This tool could not update %s: %s"
+msgstr "Detta verktyg kunde inte uppdatera %s: %s"
 
 #. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:934 ../client/pk-console.c:942
+#: ../client/pk-console.c:935
+#: ../client/pk-console.c:943
 #, c-format
-msgid "This tool could not get the requirements for '%s': %s"
-msgstr "Detta verktyg kunde inte få tag på kraven för \"%s\": %s"
+msgid "This tool could not get the requirements for %s: %s"
+msgstr "Detta verktyg kunde inte få tag på kraven för %s: %s"
 
 #. TRANSLATORS: There was an error getting the dependencies for the package. The detailed error follows
-#: ../client/pk-console.c:964 ../client/pk-console.c:972
+#: ../client/pk-console.c:965
+#: ../client/pk-console.c:973
 #, c-format
-msgid "This tool could not get the dependencies for '%s': %s"
-msgstr "Detta verktyg kunde inte få tag på beroenden för detta \"%s\": %s"
+msgid "This tool could not get the dependencies for %s: %s"
+msgstr "Detta verktyg kunde inte få tag på beroenden för %s: %s"
 
 #. TRANSLATORS: There was an error getting the details about the package. The detailed error follows
-#: ../client/pk-console.c:994 ../client/pk-console.c:1002
+#: ../client/pk-console.c:995
+#: ../client/pk-console.c:1003
 #, c-format
-msgid "This tool could not get package details for '%s': %s"
-msgstr "Detta verktyg kunde inte få tag på paketdetaljerna för \"%s\": %s"
+msgid "This tool could not get package details for %s: %s"
+msgstr "Detta verktyg kunde inte få tag på paketdetaljerna för %s: %s"
 
 #. TRANSLATORS: The package name was not found in any software sources. The detailed error follows
-#: ../client/pk-console.c:1024
+#: ../client/pk-console.c:1025
 #, c-format
-msgid "This tool could not find the files for '%s': %s"
-msgstr "Detta verktyg kunde inte hitta filerna för \"%s\": %s"
+msgid "This tool could not find the files for %s: %s"
+msgstr "Detta verktyg kunde inte hitta filerna för %s: %s"
 
 #. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:1032
+#: ../client/pk-console.c:1033
 #, c-format
-msgid "This tool could not get the file list for '%s': %s"
-msgstr "Detta verktyg kunde inte få tag på fillistan för \"%s\": %s"
+msgid "This tool could not get the file list for %s: %s"
+msgstr "Detta verktyg kunde inte få tag på fillistan för %s: %s"
 
 #. TRANSLATORS: There was an error getting the list of packages. The filename follows
-#: ../client/pk-console.c:1054
+#: ../client/pk-console.c:1055
 #, c-format
 msgid "File already exists: %s"
-msgstr ""
+msgstr "Filen finns redan: %s"
 
 #. TRANSLATORS: follows a list of packages to install
-#: ../client/pk-console.c:1059 ../client/pk-console.c:1115
-#: ../client/pk-console.c:1190
-#, fuzzy
+#: ../client/pk-console.c:1060
+#: ../client/pk-console.c:1116
+#: ../client/pk-console.c:1191
 msgid "Getting package list"
-msgstr "Hämtar paketinformation..."
+msgstr "Hämtar paketlista"
 
 #. TRANSLATORS: There was an error getting the list of packages. The detailed error follows
-#: ../client/pk-console.c:1065 ../client/pk-console.c:1121
-#: ../client/pk-console.c:1196
-#, fuzzy, c-format
+#: ../client/pk-console.c:1066
+#: ../client/pk-console.c:1122
+#: ../client/pk-console.c:1197
+#, c-format
 msgid "This tool could not get package list: %s"
-msgstr "Detta verktyg kunde inte ta bort paketen: %s"
+msgstr "Detta verktyg kunde inte få tag på paketlista: %s"
 
 #. TRANSLATORS: There was an error saving the list
-#: ../client/pk-console.c:1076
-#, fuzzy, c-format
+#: ../client/pk-console.c:1077
 msgid "Failed to save to disk"
-msgstr "Misslyckades med att få tag på senaste tid"
+msgstr "Misslyckades med att spara till disk"
 
 #. TRANSLATORS: There was an error getting the list. The filename follows
-#: ../client/pk-console.c:1110 ../client/pk-console.c:1185
+#: ../client/pk-console.c:1111
+#: ../client/pk-console.c:1186
 #, c-format
 msgid "File does not exist: %s"
-msgstr ""
+msgstr "Filen finns inte: %s"
 
 #. TRANSLATORS: header to a list of packages newly added
-#: ../client/pk-console.c:1142
-#, fuzzy
+#: ../client/pk-console.c:1143
 msgid "Packages to add"
-msgstr "Övervakare för PackageKit"
+msgstr "Paket att lägga till"
 
 #. TRANSLATORS: header to a list of packages removed
-#: ../client/pk-console.c:1150
-#, fuzzy
+#: ../client/pk-console.c:1151
 msgid "Packages to remove"
-msgstr "PackageKit-tjänst"
+msgstr "Paket att ta bort"
 
 #. TRANSLATORS: We didn't find any differences
-#: ../client/pk-console.c:1218
-#, fuzzy, c-format
+#: ../client/pk-console.c:1219
 msgid "No new packages need to be installed"
-msgstr "Paketet \"%s\" kunde inte installeras: %s"
+msgstr "Inga nya paket behöver installeras"
 
 #. TRANSLATORS: follows a list of packages to install
-#: ../client/pk-console.c:1224
+#: ../client/pk-console.c:1225
 msgid "To install"
-msgstr ""
+msgstr "Att installera"
 
 #. TRANSLATORS: searching takes some time....
-#: ../client/pk-console.c:1235
+#: ../client/pk-console.c:1236
 msgid "Searching for package: "
-msgstr ""
+msgstr "Söker efter paket: "
 
 #. TRANSLATORS: package was not found -- this is the end of a string ended in ...
-#: ../client/pk-console.c:1239
-#, fuzzy
+#: ../client/pk-console.c:1240
 msgid "not found."
-msgstr "Katalogen hittades inte"
+msgstr "hittades inte."
 
 #. TRANSLATORS: We didn't find any packages to install
-#: ../client/pk-console.c:1250
-#, fuzzy, c-format
+#: ../client/pk-console.c:1251
 msgid "No packages can be found to install"
-msgstr "Inga paket hittades för ditt system"
+msgstr "Inga paket för installation hittades"
 
 #. TRANSLATORS: installing new packages from package list
-#: ../client/pk-console.c:1256
-#, fuzzy
+#: ../client/pk-console.c:1257
 msgid "Installing packages"
-msgstr "Installera paket"
+msgstr "Installerar paket"
 
 #. TRANSLATORS: The package name was not found in any software sources. The detailed error follows
-#: ../client/pk-console.c:1292
+#: ../client/pk-console.c:1293
 #, c-format
-msgid "This tool could not find the update details for '%s': %s"
-msgstr "Detta verktyg kunde inte hitta uppdateringsdetaljer för \"%s\": %s"
+msgid "This tool could not find the update details for %s: %s"
+msgstr "Detta verktyg kunde inte hitta uppdateringsdetaljer för %s: %s"
 
 #. TRANSLATORS: There was an error getting the details about the update for the package. The detailed error follows
-#: ../client/pk-console.c:1300
+#: ../client/pk-console.c:1301
 #, c-format
-msgid "This tool could not get the update details for '%s': %s"
-msgstr "Detta verktyg kunde inte få tag på uppdateringsdetaljer för \"%s\": %s"
+msgid "This tool could not get the update details for %s: %s"
+msgstr "Detta verktyg kunde inte få tag på uppdateringsdetaljer för %s: %s"
 
 #. TRANSLATORS: This was an unhandled error, and we don't have _any_ context
-#: ../client/pk-console.c:1346
+#: ../client/pk-console.c:1347
 msgid "Error:"
 msgstr "Fel:"
 
 #. TRANSLATORS: This a list of details about the package
-#: ../client/pk-console.c:1360
+#: ../client/pk-console.c:1361
 msgid "Package description"
 msgstr "Paketbeskrivning"
 
 #. TRANSLATORS: This a list files contained in the package
-#: ../client/pk-console.c:1393
+#: ../client/pk-console.c:1394
 msgid "Package files"
 msgstr "Paketfiler"
 
 #. TRANSLATORS: This where the package has no files
-#: ../client/pk-console.c:1402
+#: ../client/pk-console.c:1403
 msgid "No files"
 msgstr "Inga filer"
 
 #. TRANSLATORS: This a request for a GPG key signature from the backend, which the client will prompt for later
-#: ../client/pk-console.c:1425
+#: ../client/pk-console.c:1426
 msgid "Repository signature required"
 msgstr "Förrådssignatur krävs"
 
 #. TRANSLATORS: This a prompt asking the user to import the security key
-#: ../client/pk-console.c:1435
+#: ../client/pk-console.c:1436
 msgid "Do you accept this signature?"
 msgstr "Godkänner du denna signatur?"
 
 #. TRANSLATORS: This is where the user declined the security key
-#: ../client/pk-console.c:1439
+#: ../client/pk-console.c:1440
 msgid "The signature was not accepted."
 msgstr "Signaturen godkändes inte."
 
 #. TRANSLATORS: This a request for a EULA
-#: ../client/pk-console.c:1473
+#: ../client/pk-console.c:1474
 msgid "End user license agreement required"
 msgstr "Godkännande av slutanvändaravtal krävs"
 
 #. TRANSLATORS: This a prompt asking the user to agree to the license
-#: ../client/pk-console.c:1480
+#: ../client/pk-console.c:1481
 msgid "Do you agree to this license?"
 msgstr "Godkänner du denna licens?"
 
 #. TRANSLATORS: This is where the user declined the license
-#: ../client/pk-console.c:1484
+#: ../client/pk-console.c:1485
 msgid "The license was refused."
 msgstr "Licensen nekades."
 
 #. TRANSLATORS: This is when the daemon crashed, and we are up shit creek without a paddle
-#: ../client/pk-console.c:1513
+#: ../client/pk-console.c:1514
 msgid "The daemon crashed mid-transaction!"
 msgstr "Demonen kraschade mitt under transaktionen!"
 
 #. TRANSLATORS: This is the header to the --help menu
-#: ../client/pk-console.c:1566
+#: ../client/pk-console.c:1567
 msgid "PackageKit Console Interface"
 msgstr "Konsollgränssnitt för PackageKit"
 
-#: ../client/pk-console.c:1566
+#: ../client/pk-console.c:1567
 msgid "Subcommands:"
 msgstr "Underkommandon:"
 
-#: ../client/pk-console.c:1657 ../client/pk-generate-pack.c:183
-#: ../client/pk-monitor.c:114 ../src/pk-main.c:196
+#: ../client/pk-console.c:1658
+#: ../client/pk-generate-pack.c:184
+#: ../client/pk-monitor.c:115
+#: ../src/pk-main.c:191
 msgid "Show extra debugging information"
 msgstr "Visa extra felsökningsinformation"
 
-#: ../client/pk-console.c:1659 ../client/pk-monitor.c:116
+#: ../client/pk-console.c:1660
+#: ../client/pk-monitor.c:117
 msgid "Show the program version and exit"
 msgstr "Visa programversion och avsluta"
 
-#: ../client/pk-console.c:1661
+#: ../client/pk-console.c:1662
 msgid "Set the filter, e.g. installed"
 msgstr "Ange filtret, t.ex. installed"
 
-#: ../client/pk-console.c:1663
+#: ../client/pk-console.c:1664
 msgid "Exit without waiting for actions to complete"
 msgstr "Avsluta utan att vänta på att åtgärder ska färdigställas"
 
 #. TRANSLATORS: This is when we could not connect to the system bus, and is fatal
-#: ../client/pk-console.c:1685
+#: ../client/pk-console.c:1691
 msgid "This tool could not connect to system DBUS."
 msgstr "Detta verktyg kunde inte ansluta till systemets DBUS."
 
 #. TRANSLATORS: The user specified an incorrect filter
-#: ../client/pk-console.c:1770
+#: ../client/pk-console.c:1776
 msgid "The filter specified was invalid"
-msgstr ""
+msgstr "Filtret som angavs var ogiltigt"
 
-#: ../client/pk-console.c:1787
+#: ../client/pk-console.c:1793
 msgid "You need to specify a search type, e.g. name"
-msgstr "Du behöver ange en söktyp, t.ex. name"
-
-#: ../client/pk-console.c:1792 ../client/pk-console.c:1799
-#: ../client/pk-console.c:1806 ../client/pk-console.c:1813
-#: ../client/pk-console.c:1924 ../client/pk-console.c:1934
-#: ../client/pk-console.c:1941 ../client/pk-console.c:1948
+msgstr "Du måste ange en söktyp, t.ex. name"
+
+#: ../client/pk-console.c:1798
+#: ../client/pk-console.c:1805
+#: ../client/pk-console.c:1812
+#: ../client/pk-console.c:1819
+#: ../client/pk-console.c:1930
+#: ../client/pk-console.c:1940
+#: ../client/pk-console.c:1947
+#: ../client/pk-console.c:1954
 msgid "You need to specify a search term"
 msgstr "Du måste ange en sökterm"
 
-#: ../client/pk-console.c:1818
+#: ../client/pk-console.c:1824
 msgid "Invalid search type"
 msgstr "Ogiltig söktyp"
 
-#: ../client/pk-console.c:1823
+#: ../client/pk-console.c:1829
 msgid "You need to specify a package or file to install"
-msgstr "Du behöver ange ett paket eller fil att installera"
+msgstr "Du måste ange ett paket eller fil att installera"
 
-#: ../client/pk-console.c:1830
+#: ../client/pk-console.c:1836
 msgid "You need to specify a type, key_id and package_id"
-msgstr "Du behöver ange en type, key_id och package_id"
+msgstr "Du måste ange en type, key_id och package_id"
 
-#: ../client/pk-console.c:1837
+#: ../client/pk-console.c:1843
 msgid "You need to specify a package to remove"
-msgstr "Du behöver ange ett paket att ta bort"
+msgstr "Du måste ange ett paket att ta bort"
 
-#: ../client/pk-console.c:1843
-msgid ""
-"You need to specify the destination directory and then the packages to "
-"download"
-msgstr "Du behöver ange målkatalogen och sedan paketen som ska hämtas"
+#: ../client/pk-console.c:1849
+msgid "You need to specify the destination directory and then the packages to download"
+msgstr "Du måste ange målkatalogen och sedan paketen som ska hämtas"
 
-#: ../client/pk-console.c:1848
+#: ../client/pk-console.c:1854
 msgid "Directory not found"
 msgstr "Katalogen hittades inte"
 
-#: ../client/pk-console.c:1854
+#: ../client/pk-console.c:1860
 msgid "You need to specify a licence identifier (eula-id)"
-msgstr "Du behöver ange en licensidentifierare (eula-id)"
+msgstr "Du måste ange en licensidentifierare (eula-id)"
 
-#: ../client/pk-console.c:1870
+#: ../client/pk-console.c:1876
 msgid "You need to specify a package name to resolve"
-msgstr "Du behöver ange ett paketnamn att lösa"
+msgstr "Du måste ange ett paketnamn att lösa"
 
-#: ../client/pk-console.c:1879 ../client/pk-console.c:1886
+#: ../client/pk-console.c:1885
+#: ../client/pk-console.c:1892
 msgid "You need to specify a repository name"
-msgstr "Du behöver ange ett förrådsnamn"
+msgstr "Du måste ange ett förrådsnamn"
 
-#: ../client/pk-console.c:1893
+#: ../client/pk-console.c:1899
 msgid "You need to specify a repo name/parameter and value"
-msgstr "Du behöver ange ett förrådsnamn/parameter och värde"
+msgstr "Du måste ange ett förrådsnamn/-parameter och värde"
 
-#: ../client/pk-console.c:1906
+#: ../client/pk-console.c:1912
 msgid "You need to specify an action, e.g. 'update-system'"
-msgstr "Du behöver ange en åtgärd, t.ex. \"update-system\""
+msgstr "Du måste ange en åtgärd, t.ex. \"update-system\""
 
-#: ../client/pk-console.c:1911
+#: ../client/pk-console.c:1917
 msgid "You need to specify a correct role"
-msgstr "Du behöver ange en korrekt roll"
+msgstr "Du måste ange en korrekt roll"
 
-#: ../client/pk-console.c:1916
+#: ../client/pk-console.c:1922
 msgid "Failed to get last time"
 msgstr "Misslyckades med att få tag på senaste tid"
 
-#: ../client/pk-console.c:1955
+#: ../client/pk-console.c:1961
 msgid "You need to specify a package to find the details for"
-msgstr "Du behöver ange ett paket att söka information om"
+msgstr "Du måste ange ett paket att söka information om"
 
-#: ../client/pk-console.c:1962
+#: ../client/pk-console.c:1968
 msgid "You need to specify a package to find the files for"
-msgstr "Du behöver ange ett paket att söka efter filerna för"
+msgstr "Du måste ange ett paket att söka efter filerna för"
 
-#: ../client/pk-console.c:1969
-#, fuzzy
+#: ../client/pk-console.c:1975
 msgid "You need to specify a list file to create"
-msgstr "Du behöver ange ett paket att ta bort"
+msgstr "Du måste ange en listfil att skapa"
 
-#: ../client/pk-console.c:1977 ../client/pk-console.c:1985
-#, fuzzy
+#: ../client/pk-console.c:1983
+#: ../client/pk-console.c:1991
 msgid "You need to specify a list file to open"
-msgstr "Du måste ange en sökterm"
+msgstr "Du måste ange en listfil att öppna"
 
 #. TRANSLATORS: The user tried to use an unsupported option on the command line
-#: ../client/pk-console.c:2038
+#: ../client/pk-console.c:2044
 #, c-format
 msgid "Option '%s' is not supported"
 msgstr "Flaggan \"%s\" stöds inte"
 
 #. TRANSLATORS: User does not have permission to do this
-#: ../client/pk-console.c:2051
+#: ../client/pk-console.c:2057
 msgid "You don't have the necessary privileges for this operation"
 msgstr "Du har inte den nödvändiga behörigheten för denna åtgärd"
 
 #. TRANSLATORS: Generic failure of what they asked to do
-#: ../client/pk-console.c:2054
+#: ../client/pk-console.c:2060
 msgid "Command failed"
 msgstr "Kommandot misslyckades"
 
 #. TRANSLATORS: This is the state of the transaction
-#: ../client/pk-generate-pack.c:99
+#: ../client/pk-generate-pack.c:100
 msgid "Downloading"
 msgstr "Hämtar"
 
 #. TRANSLATORS: This is when the main packages are being downloaded
-#: ../client/pk-generate-pack.c:119
-#, fuzzy
+#: ../client/pk-generate-pack.c:120
 msgid "Downloading packages"
-msgstr "Hämtar"
+msgstr "Hämtar paket"
 
 #. TRANSLATORS: This is when the dependency packages are being downloaded
-#: ../client/pk-generate-pack.c:124
-#, fuzzy
+#: ../client/pk-generate-pack.c:125
 msgid "Downloading dependencies"
-msgstr "Hämtar"
+msgstr "Hämtar beroenden"
 
-#: ../client/pk-generate-pack.c:185
+#: ../client/pk-generate-pack.c:186
 msgid "Set the file name of dependencies to be excluded"
 msgstr "Ange filnamnet för beroenden att undanta"
 
-#: ../client/pk-generate-pack.c:187
+#: ../client/pk-generate-pack.c:188
 msgid "The output directory (the current directory is used if ommitted)"
 msgstr "Utdatakatalogen (den aktuella katalogen om den inte anges)"
 
-#: ../client/pk-generate-pack.c:189
+#: ../client/pk-generate-pack.c:190
 msgid "The package to be put into the service pack"
 msgstr "Paket att läggas i servicepaketet"
 
-#: ../client/pk-generate-pack.c:191
+#: ../client/pk-generate-pack.c:192
 msgid "Put all updates available in the service pack"
 msgstr "Lägg alla tillgängliga uppdateringar i servicepaketet"
 
 #. TRANSLATORS: This is when the user fails to supply the correct arguments
-#: ../client/pk-generate-pack.c:214
+#: ../client/pk-generate-pack.c:220
 msgid "Neither --package or --updates option selected."
 msgstr "Varken flaggan --package eller --updates angavs."
 
 #. TRANSLATORS: This is when the user fails to supply just one argument
-#: ../client/pk-generate-pack.c:222
+#: ../client/pk-generate-pack.c:228
 msgid "Both options selected."
 msgstr "BÃ¥da flaggorna angavs."
 
 #. TRANSLATORS: This is when file already exists
-#: ../client/pk-generate-pack.c:255
+#: ../client/pk-generate-pack.c:261
 msgid "A pack with the same name already exists, do you want to overwrite it?"
 msgstr "Ett paket med samma namn finns redan. Vill du skriva över det?"
 
 #. TRANSLATORS: This is when the pack was not overwritten
-#: ../client/pk-generate-pack.c:258
+#: ../client/pk-generate-pack.c:264
 msgid "The pack was not overwritten."
 msgstr "Paketet skrevs inte över."
 
 #. TRANSLATORS: This is when the temporary directory cannot be created, the directory name follows
-#: ../client/pk-generate-pack.c:270
+#: ../client/pk-generate-pack.c:276
 msgid "Failed to create directory:"
 msgstr "Misslyckades med att skapa katalog:"
 
 #. TRANSLATORS: This is when the list of packages from the remote computer cannot be opened
-#: ../client/pk-generate-pack.c:279
+#: ../client/pk-generate-pack.c:285
 msgid "Failed to open package list."
 msgstr "Misslyckades med öppna paketlistan."
 
 #. TRANSLATORS: The package name is being matched up to available packages
-#: ../client/pk-generate-pack.c:289
+#: ../client/pk-generate-pack.c:295
 msgid "Finding package name."
 msgstr "Söker efter paketnamn."
 
 #. TRANSLATORS: This is when the package cannot be found in any software source. The detailed error follows
-#: ../client/pk-generate-pack.c:293
+#: ../client/pk-generate-pack.c:299
 #, c-format
 msgid "Failed to find package '%s': %s"
 msgstr "Misslyckades med att hitta paketet \"%s\": %s"
 
 #. TRANSLATORS: This is telling the user we are in the process of making the pack
-#: ../client/pk-generate-pack.c:309
+#: ../client/pk-generate-pack.c:315
 msgid "Creating service pack..."
 msgstr "Skapar servicepaket..."
 
 #. TRANSLATORS: we succeeded in making the file
-#: ../client/pk-generate-pack.c:316
+#: ../client/pk-generate-pack.c:322
 #, c-format
 msgid "Service pack created '%s'"
 msgstr "Servicepaket skapades \"%s\""
 
 #. TRANSLATORS: we failed to make te file
-#: ../client/pk-generate-pack.c:320
+#: ../client/pk-generate-pack.c:326
 #, c-format
 msgid "Failed to create '%s': %s"
 msgstr "Misslyckades med att skapa \"%s\": %s"
 
-#: ../client/pk-monitor.c:126
+#: ../client/pk-monitor.c:132
 msgid "PackageKit Monitor"
 msgstr "Övervakare för PackageKit"
 
 #. TRANSLATORS: The package was not found in any software sources
 #: ../client/pk-tools-common.c:114
-#, c-format
 msgid "The package could not be found"
 msgstr "Paketet kunde inte hittas"
 
@@ -544,55 +544,55 @@ msgid "Please enter a number from 1 to %i: "
 msgstr "Ange ett tal från 1 till %i: "
 
 #. TRANSLATORS: when we are getting data from the daemon
-#: ../contrib/packagekit-plugin/src/contents.cpp:291
+#: ../contrib/packagekit-plugin/src/contents.cpp:294
 msgid "Getting package information..."
 msgstr "Hämtar paketinformation..."
 
 #. TRANSLATORS: run an applicaiton
-#: ../contrib/packagekit-plugin/src/contents.cpp:297
+#: ../contrib/packagekit-plugin/src/contents.cpp:300
 #, c-format
 msgid "Run %s"
 msgstr "Kör %s"
 
 #. TRANSLATORS: show the installed version of a package
-#: ../contrib/packagekit-plugin/src/contents.cpp:303
+#: ../contrib/packagekit-plugin/src/contents.cpp:306
 msgid "Installed version"
 msgstr "Installerad version"
 
 #. TRANSLATORS: run the application now
-#: ../contrib/packagekit-plugin/src/contents.cpp:311
+#: ../contrib/packagekit-plugin/src/contents.cpp:314
 #, c-format
 msgid "Run version %s now"
 msgstr "Kör version %s nu"
 
-#: ../contrib/packagekit-plugin/src/contents.cpp:317
+#: ../contrib/packagekit-plugin/src/contents.cpp:320
 msgid "Run now"
 msgstr "Kör nu"
 
 #. TRANSLATORS: update to a new version of the package
-#: ../contrib/packagekit-plugin/src/contents.cpp:323
+#: ../contrib/packagekit-plugin/src/contents.cpp:326
 #, c-format
 msgid "Update to version %s"
 msgstr "Uppdatera till version %s"
 
 #. TRANSLATORS: To install a package
-#: ../contrib/packagekit-plugin/src/contents.cpp:329
+#: ../contrib/packagekit-plugin/src/contents.cpp:332
 #, c-format
 msgid "Install %s now"
 msgstr "Installera %s nu"
 
 #. TRANSLATORS: the version of the package
-#: ../contrib/packagekit-plugin/src/contents.cpp:332
+#: ../contrib/packagekit-plugin/src/contents.cpp:335
 msgid "Version"
 msgstr "Version"
 
 #. TRANSLATORS: noting found, so can't install
-#: ../contrib/packagekit-plugin/src/contents.cpp:337
+#: ../contrib/packagekit-plugin/src/contents.cpp:340
 msgid "No packages found for your system"
 msgstr "Inga paket hittades för ditt system"
 
 #. TRANSLATORS: package is being installed
-#: ../contrib/packagekit-plugin/src/contents.cpp:342
+#: ../contrib/packagekit-plugin/src/contents.cpp:345
 msgid "Installing..."
 msgstr "Installerar..."
 
@@ -608,218 +608,157 @@ msgstr "Servicepaket för PackageKit"
 msgid "PackageKit Package List"
 msgstr "Paketlista för PackageKit"
 
-#: ../policy/org.freedesktop.packagekit.policy.in.h:1
-msgid "Accept EULA"
-msgstr "Acceptera slutanvändaravtal"
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:2
-msgid "Authentication is required to accept a EULA"
-msgstr "Autentisering krävs för att acceptera ett slutanvändaravtal"
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:3
-msgid "Authentication is required to change software source parameters"
-msgstr "Autentisering krävs för att ändra parametrar för programvarukällor"
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:4
-#, fuzzy
-msgid ""
-"Authentication is required to consider a key used for signing packages as "
-"trusted"
-msgstr "Autentisering krävs för att uppdatera paketlistorna"
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:5
-#, fuzzy
-msgid "Authentication is required to install a signed package"
-msgstr "Autentisering krävs för att installera ett paket"
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:6
-#, fuzzy
-msgid "Authentication is required to install an untrusted package"
-msgstr "Autentisering krävs för att installera ett paket"
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:7
-#, fuzzy
-msgid "Authentication is required to refresh the system sources"
-msgstr "Autentisering krävs för att uppdatera paketlistorna"
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:8
-msgid "Authentication is required to remove packages"
-msgstr "Autentisering krävs för att ta bort paket"
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:9
-msgid "Authentication is required to rollback a transaction"
-msgstr "Autentisering krävs för att rulla tillbaka en transaktion"
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:10
-#, fuzzy
-msgid ""
-"Authentication is required to set the network proxy used for downloading "
-"packages"
-msgstr "Autentisering krävs för att ta bort paket"
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:11
-msgid "Authentication is required to update packages"
-msgstr "Autentisering krävs för att uppdatera paket"
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:12
-msgid "Change software source parameters"
-msgstr "Ändra parametrar för programvarukällor"
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:13
-msgid "Install local file"
-msgstr "Installera lokal fil"
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:14
-msgid "Install untrusted local file"
-msgstr "Installera opålitlig lokal fil"
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:15
-msgid "Refresh system sources"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:16
-msgid "Remove package"
-msgstr "Ta bort paket"
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:17
-msgid "Rollback to a previous transaction"
-msgstr "Rulla tillbaka till en tidigare transaktion"
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:18
-msgid "Set network proxy"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:19
-msgid "Trust a key used for signing packages"
-msgstr ""
-
-#: ../policy/org.freedesktop.packagekit.policy.in.h:20
-#, fuzzy
-msgid "Update packages"
-msgstr "Uppdatera paket"
-
-#: ../src/pk-main.c:85
+#: ../src/pk-main.c:86
 msgid "Startup failed due to security policies on this machine."
 msgstr "Uppstart misslyckades på grund av en säkerhetspolicy på denna dator."
 
-#: ../src/pk-main.c:86
+#: ../src/pk-main.c:87
 msgid "This can happen for two reasons:"
 msgstr "Detta kan inträffa av två anledningar:"
 
-#: ../src/pk-main.c:87
+#: ../src/pk-main.c:88
 msgid "The correct user is not launching the executable (usually root)"
-msgstr ""
-"Den korrekta användaren startar inte den körbara filen (vanligtvis root)"
+msgstr "Det är inte korrekt användare (vanligtvis root) som startar programmet"
 
-#: ../src/pk-main.c:88
-msgid ""
-"The org.freedesktop.PackageKit.conf file is not installed in the system "
-"directory:"
-msgstr ""
-"Filen org.freedesktop.PackageKit.conf är inte installerad i systemkatalogen:"
+#: ../src/pk-main.c:89
+msgid "The org.freedesktop.PackageKit.conf file is not installed in the system directory:"
+msgstr "Filen org.freedesktop.PackageKit.conf är inte installerad i systemkatalogen:"
 
-#: ../src/pk-main.c:192
+#: ../src/pk-main.c:187
 msgid "Packaging backend to use, e.g. dummy"
 msgstr "Paketingsbakände att använda, t.ex. dummy"
 
-#: ../src/pk-main.c:194
+#: ../src/pk-main.c:189
 msgid "Daemonize and detach from the terminal"
-msgstr "Demonisera och koppla loss från terminalen"
+msgstr "Bli demon och koppla loss från terminalen"
 
-#: ../src/pk-main.c:198
+#: ../src/pk-main.c:193
 msgid "Disable the idle timer"
 msgstr "Inaktivera tidsgräns för inaktivitet"
 
-#: ../src/pk-main.c:200
+#: ../src/pk-main.c:195
 msgid "Show version and exit"
 msgstr "Visa version och avsluta"
 
-#: ../src/pk-main.c:202
+#: ../src/pk-main.c:197
 msgid "Exit after a small delay"
 msgstr "Avsluta efter en mindre fördröjning"
 
-#: ../src/pk-main.c:204
+#: ../src/pk-main.c:199
 msgid "Exit after the engine has loaded"
 msgstr "Avsluta efter att motorn har lästs in"
 
-#: ../src/pk-main.c:214
+#: ../src/pk-main.c:213
 msgid "PackageKit service"
 msgstr "PackageKit-tjänst"
 
-#: ../src/pk-main.c:250
+#: ../src/pk-main.c:249
 msgid "Cannot connect to the system bus"
 msgstr "Kan inte ansluta till systembussen"
 
-#: ../src/pk-main.c:296
+#: ../src/pk-main.c:298
 #, c-format
 msgid "Error trying to start: %s\n"
 msgstr "Fel vid försök att starta: %s\n"
 
+#~ msgid "This tool could not remove the packages: '%s'"
+#~ msgstr "Detta verktyg kunde inte ta bort paketen: \"%s\""
+#~ msgid "Accept EULA"
+#~ msgstr "Acceptera slutanvändaravtal"
+#~ msgid "Authentication is required to accept a EULA"
+#~ msgstr "Autentisering krävs för att acceptera ett slutanvändaravtal"
+#~ msgid "Authentication is required to change software source parameters"
+#~ msgstr "Autentisering krävs för att ändra parametrar för programvarukällor"
+
+#, fuzzy
+#~ msgid ""
+#~ "Authentication is required to consider a key used for signing packages as "
+#~ "trusted"
+#~ msgstr "Autentisering krävs för att uppdatera paketlistorna"
+
+#, fuzzy
+#~ msgid "Authentication is required to install a signed package"
+#~ msgstr "Autentisering krävs för att installera ett paket"
+
+#, fuzzy
+#~ msgid "Authentication is required to install an untrusted package"
+#~ msgstr "Autentisering krävs för att installera ett paket"
+
+#, fuzzy
+#~ msgid "Authentication is required to refresh the system sources"
+#~ msgstr "Autentisering krävs för att uppdatera paketlistorna"
+#~ msgid "Authentication is required to remove packages"
+#~ msgstr "Autentisering krävs för att ta bort paket"
+#~ msgid "Authentication is required to rollback a transaction"
+#~ msgstr "Autentisering krävs för att rulla tillbaka en transaktion"
+
+#, fuzzy
+#~ msgid ""
+#~ "Authentication is required to set the network proxy used for downloading "
+#~ "packages"
+#~ msgstr "Autentisering krävs för att ta bort paket"
+#~ msgid "Authentication is required to update packages"
+#~ msgstr "Autentisering krävs för att uppdatera paket"
+#~ msgid "Change software source parameters"
+#~ msgstr "Ändra parametrar för programvarukällor"
+#~ msgid "Install local file"
+#~ msgstr "Installera lokal fil"
+#~ msgid "Install untrusted local file"
+#~ msgstr "Installera opålitlig lokal fil"
+#~ msgid "Remove package"
+#~ msgstr "Ta bort paket"
+#~ msgid "Rollback to a previous transaction"
+#~ msgstr "Rulla tillbaka till en tidigare transaktion"
+
+#, fuzzy
+#~ msgid "Update packages"
+#~ msgstr "Uppdatera paket"
 #~ msgid "Authentication is required to install a local file"
 #~ msgstr "Autentisering krävs för att installera en lokal fil"
-
 #~ msgid "Authentication is required to install a security signature"
 #~ msgstr "Autentisering krävs för att installera en säkerhetssignatur"
-
 #~ msgid "Authentication is required to update all packages"
 #~ msgstr "Autentisering krävs för att uppdatera alla paket"
-
 #~ msgid ""
 #~ "Further authentication is required to install an untrusted local file"
 #~ msgstr ""
 #~ "Ytterligare autentisering krävs för att installera en opålitlig lokal fil"
-
 #~ msgid "Refresh package lists"
 #~ msgstr "Uppdatera paketlistor"
-
 #~ msgid "Update all packages"
 #~ msgstr "Uppdatera alla paket"
-
 #~ msgid "Update detail"
 #~ msgstr "Uppdateringsinformation"
-
 #~ msgid "A system restart is required"
 #~ msgstr "En omstart av systemet krävs"
-
 #~ msgid "A logout and login is required"
 #~ msgstr "En utloggning och inloggning krävs"
-
 #~ msgid "An application restart is required"
 #~ msgstr "En omstart av programmet krävs"
-
 #~ msgid "Could not find a package match"
 #~ msgstr "Kunde inte hitta ett matchande paket"
-
 #~ msgid ""
 #~ "Could not find a package with that name to install, or package already "
 #~ "installed"
 #~ msgstr ""
 #~ "Kunde inte hitta ett paket med det namnet att installera, eller så är "
 #~ "paketet redan installerat"
-
 #~ msgid "Could not find a package with that name to remove"
 #~ msgstr "Kunde inte hitta ett paket att ta bort med det namnet"
-
 #~ msgid "Cancelled!"
 #~ msgstr "Avbruten!"
-
 #~ msgid "Could not find a package with that name to update"
 #~ msgstr "Kunde inte hitta ett paket att uppdatera med det namnet"
-
 #~ msgid "Could not find what packages require this package"
 #~ msgstr "Kunde inte hitta vilka paket som kräver detta paket"
-
 #~ msgid "Okay to import key?"
 #~ msgstr "Ok att importera nyckeln?"
-
 #~ msgid "Did not import key"
 #~ msgstr "Importerade inte nyckeln"
-
 #~ msgid "Did not agree to licence, task will fail"
 #~ msgstr "Godkände inte licensen, åtgärden kommer att misslyckas"
-
 #~ msgid "Could not open database: %s"
 #~ msgstr "Kunde inte öppna databasen: %s"
-
 #~ msgid "You probably need to run this program as the root user"
 #~ msgstr "Du behöver antagligen köra detta program som root-användaren"
+
commit b66f7349c44314cb358c4a9d93638872f9f543bc
Author: Richard Hughes <richard at hughsie.com>
Date:   Fri Nov 28 18:30:11 2008 +0000

    trivial: remove some debugging in the gtk-module

diff --git a/contrib/gtk-module/pk-gtk-module.c b/contrib/gtk-module/pk-gtk-module.c
index 078acf7..955e2cf 100644
--- a/contrib/gtk-module/pk-gtk-module.c
+++ b/contrib/gtk-module/pk-gtk-module.c
@@ -90,7 +90,6 @@ static GPtrArray *tags;
 static gboolean
 pk_install_fonts_idle_cb (gpointer data G_GNUC_UNUSED)
 {
-	guint i;
 	DBusGConnection *connection;
 	DBusGProxy *proxy = NULL;
 	guint xid;
@@ -100,10 +99,6 @@ pk_install_fonts_idle_cb (gpointer data G_GNUC_UNUSED)
 
 	g_return_val_if_fail (tags->len > 0, FALSE);
 
-	/* just print */
-	for (i = 0; i< tags->len; i++)
-		g_debug ("tags[%i]: %s", i, (const gchar *) g_ptr_array_index (tags, i));
-
 	/* get a strv out of the array that we will then own */
 	g_ptr_array_add (tags, NULL);
 	font_tags = (gchar **) g_ptr_array_free (tags, FALSE);
@@ -177,7 +172,6 @@ pk_font_not_found (PangoLanguage *language)
 
 	/* convert to language */
 	lang = pango_language_to_string (language);
-	g_debug ("requested font language '%s'", lang);
 
 	/* create the font tag used in as a package provides */
 	pat = FcPatternCreate ();
@@ -186,8 +180,6 @@ pk_font_not_found (PangoLanguage *language)
 	if (tag == NULL)
 		goto out;
 
-	g_debug ("requested font tag '%s'", tag);
-
 	/* add to array for processing in idle callback */
 	queue_install_fonts_tag (tag);
 
commit e481e17c55b66f83fc9d305bd000b9f7d29ff509
Author: Richard Hughes <richard at hughsie.com>
Date:   Fri Nov 28 18:08:18 2008 +0000

    trivial: fix up the Fedora spec file

diff --git a/contrib/PackageKit.spec.in b/contrib/PackageKit.spec.in
index 3d5be3f..2d84277 100644
--- a/contrib/PackageKit.spec.in
+++ b/contrib/PackageKit.spec.in
@@ -219,8 +219,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/packagekit-backend/*.la
 rm -f $RPM_BUILD_ROOT%{_libdir}/packagekit-backend/*.a
 rm -f $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/packagekit-plugin.a
 rm -f $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/packagekit-plugin.la
-rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/modules/pk-gtk-module.a
-rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/modules/pk-gtk-module.la
+rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/modules/*.a
+rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/modules/*.la
 
 chmod 755 $RPM_BUILD_ROOT%{_libexecdir}/PackageKitDbusTest.py
 touch $RPM_BUILD_ROOT%{_localstatedir}/cache/PackageKit/groups.sqlite
@@ -362,7 +362,7 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
 %files gtk-module
 %defattr(-,root,root,-)
 %doc README AUTHORS NEWS COPYING
-%{_libdir}/gtk-2.0/modules/pk-gtk-module.so
+%{_libdir}/gtk-2.0/modules/*.so
 
 %files glib-devel
 %defattr(-,root,root,-)
commit 6d98752fc911d56aa9a9f6286ad752ea8a002636
Author: Richard Hughes <richard at hughsie.com>
Date:   Fri Nov 28 18:05:23 2008 +0000

    trivial: one more point to the gtk-module README

diff --git a/contrib/gtk-module/README b/contrib/gtk-module/README
index 0ede3ea..4cfb5fc 100644
--- a/contrib/gtk-module/README
+++ b/contrib/gtk-module/README
@@ -16,3 +16,5 @@ Notes:
 
  * At the moment the window XID is not detected correctly, which means focus
    stealing prevention may not work properly.  We're working on this.
+ * gnome-packagekit 0.4.x is needed for the InstallFonts method.
+
commit 750f1d077a958ad758fd692f889f407b3a58bc2c
Merge: 44208ef... 0835f7a...
Author: Richard Hughes <richard at hughsie.com>
Date:   Fri Nov 28 18:03:58 2008 +0000

    Merge branch 'master' of git+ssh://hughsie@git.packagekit.org/srv/git/PackageKit

commit 0835f7a8425245cab3d61d973a956a31caf6805c
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Fri Nov 28 12:48:07 2008 -0500

    gtk-module: Fix typos and improve README

diff --git a/contrib/gtk-module/README b/contrib/gtk-module/README
index 063b7ef..0ede3ea 100644
--- a/contrib/gtk-module/README
+++ b/contrib/gtk-module/README
@@ -1,18 +1,18 @@
-The GTK+ module is designed to be loaded using gnoms-settings-daemon by the
+The GTK+ module is designed to be loaded using gnome-settings-daemon by the
 gnome-packagekit package.
 
-It can however be lauched for testing using:
+It can however be launched for testing using:
 
 GTK_MODULES="$GTK_MODULES:/usr/lib/gtk-2.0/modules/pk-gtk-module.so" application
 
-Pango will callback with any languages which need installing, and these
-are queued up. In an idle callback these are emitted as a asyncronous DBUS
-method to the session InstallFonts() method.
+The module installs a custom default pangocairo font map during gtk_init().
+Pango will then call back with any languages which need installing, and these
+are queued up. In an idle callback these are emitted as an asyncronous D-BUS
+method to the session PackageKit InstallFonts() method.
 
 If configured to do so, this will prompt the user to install new fonts.
 
 Notes:
 
- * At the moment the window XID is not sent, which means focus stealing
-   prevention may not work properly. We're working on this.
-
+ * At the moment the window XID is not detected correctly, which means focus
+   stealing prevention may not work properly.  We're working on this.
commit 66710a9c110e25b803d33c55f7ee92d0d1af09a4
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Nov 27 13:52:48 2008 -0500

    gtk-module: Clean up

diff --git a/contrib/gtk-module/pk-gtk-module.c b/contrib/gtk-module/pk-gtk-module.c
index b87617b..078acf7 100644
--- a/contrib/gtk-module/pk-gtk-module.c
+++ b/contrib/gtk-module/pk-gtk-module.c
@@ -31,52 +31,141 @@
 #include <gtk/gtk.h>
 #include <gdk/gdkx.h>
 
-static GPtrArray *array = NULL;
-
-void gtk_module_init (gint *argc, gchar ***argv);
-static PangoFontset *(*pk_font_load_fontset_default) (PangoFontMap *font_map,
-						      PangoContext *context,
-						      const PangoFontDescription *desc,
-						      PangoLanguage *language);
-
-typedef struct {
-	PangoLanguage *language;
-	gboolean found;
-} FonsetForeachClosure;
-
 /**
- * pk_font_find_window:
+ * Try guessing the XID of the toplevel window that triggered us
  **/
+
 static void
-pk_font_find_window (GtkWindow *window, GtkWindow **active)
+toplevels_foreach_cb (GtkWindow *window,
+		      GtkWindow **active)
 {
 	if (gtk_window_has_toplevel_focus (window))
 		*active = window;
 }
 
+static guint
+guess_xid (void)
+{
+	guint xid = 0;
+	GtkWindow *active = NULL;
+
+	g_list_foreach (gtk_window_list_toplevels (),
+			(GFunc) toplevels_foreach_cb, &active);
+
+	if (active != NULL)
+		xid = GDK_WINDOW_XID (gtk_widget_get_window (GTK_WIDGET(active)));
+
+	return xid;
+}
+
+
 /**
- * pk_font_ptr_array_to_strv:
+ * Invoke the PackageKit InstallFonts method over D-BUS
  **/
-gchar **
-pk_font_ptr_array_to_strv (GPtrArray *array)
+
+static void
+pk_install_fonts_dbus_notify_cb (DBusGProxy *proxy,
+				 DBusGProxyCall *call,
+				 gpointer user_data)
+{
+	gboolean ret;
+	GError *error = NULL;
+
+	ret = dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
+
+	if (!ret) {
+		g_debug ("Did not install fonts: %s", error->message);
+		return;
+	} else {
+		/* XXX Actually get the return value of the method? */
+
+		g_debug ("Fonts installed");
+	}
+
+	/* XXX Make gtk/pango reload fonts? */
+}
+
+static GPtrArray *tags;
+
+static gboolean
+pk_install_fonts_idle_cb (gpointer data G_GNUC_UNUSED)
 {
-	gchar **strv_array;
-	const gchar *value_temp;
 	guint i;
+	DBusGConnection *connection;
+	DBusGProxy *proxy = NULL;
+	guint xid;
+	gchar **font_tags;
+	GError *error = NULL;
+	DBusGProxyCall *call;
+
+	g_return_val_if_fail (tags->len > 0, FALSE);
+
+	/* just print */
+	for (i = 0; i< tags->len; i++)
+		g_debug ("tags[%i]: %s", i, (const gchar *) g_ptr_array_index (tags, i));
+
+	/* get a strv out of the array that we will then own */
+	g_ptr_array_add (tags, NULL);
+	font_tags = (gchar **) g_ptr_array_free (tags, FALSE);
+	tags = NULL;
+
+	/* try to get the window XID */
+	xid = guess_xid ();
+
+	/* get bus */
+	connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
+	if (connection == NULL) {
+		g_warning ("Could not connect to session bus: %s\n", error->message);
+		g_error_free (error);
+		goto out;
+	}
 
-	strv_array = g_new0 (gchar *, array->len + 2);
-	for (i=0; i<array->len; i++) {
-		value_temp = (const gchar *) g_ptr_array_index (array, i);
-		strv_array[i] = g_strdup (value_temp);
+	/* get proxy */
+	proxy = dbus_g_proxy_new_for_name (connection,
+					   "org.freedesktop.PackageKit",
+					   "/org/freedesktop/PackageKit",
+					   "org.freedesktop.PackageKit");
+	if (proxy == NULL) {
+		g_warning ("Could not connect to PackageKit session service\n");
+		goto out;
 	}
-	strv_array[i] = NULL;
 
-	return strv_array;
+	/* don't timeout, as dbus-glib sets the timeout ~25 seconds */
+	dbus_g_proxy_set_default_timeout (proxy, INT_MAX);
+
+	/* invoke the method */
+	call = dbus_g_proxy_begin_call (proxy, "InstallFonts",
+					pk_install_fonts_dbus_notify_cb, NULL, NULL,
+				        G_TYPE_UINT, xid,
+				        G_TYPE_UINT, 0,
+				        G_TYPE_STRV, font_tags,
+				        G_TYPE_INVALID);
+	if (call == NULL) {
+		g_warning ("Could not send method");
+		goto out;
+	}
+
+	g_debug ("InstallFonts method invoked");
+
+out:
+	g_strfreev (font_tags);
+	if (proxy != NULL)
+		g_object_unref (proxy);
+
+	return FALSE;
+}
+
+static void
+queue_install_fonts_tag (const char *tag)
+{
+	if (tags == NULL) {
+		tags = g_ptr_array_new ();
+		g_idle_add (pk_install_fonts_idle_cb, NULL);
+	}
+
+	g_ptr_array_add (tags, (gpointer) g_strdup (tag));
 }
 
-/**
- * pk_font_not_found:
- **/
 static void
 pk_font_not_found (PangoLanguage *language)
 {
@@ -84,23 +173,23 @@ pk_font_not_found (PangoLanguage *language)
 	gchar *tag = NULL;
 	const gchar *lang;
 
+	g_return_if_fail (language != NULL);
+
 	/* convert to language */
 	lang = pango_language_to_string (language);
-	g_message ("lang required '%s'", lang);
-	if (lang == NULL || strcmp (lang, "C") == 0)
-		goto out;
+	g_debug ("requested font language '%s'", lang);
 
-	/* create the font tag used in as a package buildrequire */
+	/* create the font tag used in as a package provides */
 	pat = FcPatternCreate ();
 	FcPatternAddString (pat, FC_LANG, (FcChar8 *) lang);
 	tag = (gchar *) FcNameUnparse (pat);
 	if (tag == NULL)
 		goto out;
 
-	g_message ("tag required '%s'", tag);
+	g_debug ("requested font tag '%s'", tag);
 
 	/* add to array for processing in idle callback */
-	g_ptr_array_add (array, (gpointer) g_strdup (tag));
+	queue_install_fonts_tag (tag);
 
 out:
 	if (pat != NULL)
@@ -108,11 +197,21 @@ out:
 	g_free (tag);
 }
 
+
 /**
- * pk_font_foreach_callback:
+ * A PangoFcFontMap implementation that detects font-not-found events
  **/
+
+
+typedef struct {
+	PangoLanguage *language;
+	gboolean found;
+} FonsetForeachClosure;
+
 static gboolean
-pk_font_foreach_callback (PangoFontset *fontset G_GNUC_UNUSED, PangoFont *font, gpointer data)
+fontset_foreach_cb (PangoFontset *fontset G_GNUC_UNUSED,
+		    PangoFont *font,
+		    gpointer data)
 {
 	FonsetForeachClosure *closure = data;
 	PangoFcFont *fcfont = PANGO_FC_FONT (font);
@@ -123,34 +222,44 @@ pk_font_foreach_callback (PangoFontset *fontset G_GNUC_UNUSED, PangoFont *font,
 
 	/* old Pango version with non-readable pattern */
 	if (pattern == NULL) {
-		g_warning ("Old Pango version with non-readable pattern. Skipping auto missing font installation.");
+		g_warning ("Old Pango version with non-readable pattern. "
+			   "Skipping automatic missing-font installation.");
 		return closure->found = TRUE;
 	}
 
 	if (FcPatternGetLangSet (pattern, FC_LANG, 0, &langset) == FcResultMatch &&
-				 FcLangSetHasLang (langset, (FcChar8 *) closure->language) != FcLangDifferentLang)
+	    FcLangSetHasLang (langset, (FcChar8 *) closure->language) != FcLangDifferentLang)
 		closure->found = TRUE;
 
 	return closure->found;
 }
 
-/**
- * pk_font_load_fontset:
- **/
+
+static PangoFontset *(*pk_pango_fc_font_map_load_fontset_default) (PangoFontMap *font_map,
+								   PangoContext *context,
+								   const PangoFontDescription *desc,
+								   PangoLanguage *language);
+
 static PangoFontset *
-pk_font_load_fontset (PangoFontMap *font_map, PangoContext *context, const PangoFontDescription *desc, PangoLanguage *language)
+pk_pango_fc_font_map_load_fontset (PangoFontMap *font_map,
+				   PangoContext *context,
+				   const PangoFontDescription *desc,
+				   PangoLanguage *language)
 {
 	static PangoLanguage *last_language = NULL;
 	static GHashTable *seen_languages = NULL;
 	PangoFontset *fontset;
 	
-	fontset = pk_font_load_fontset_default (font_map, context, desc, language);
+	fontset = pk_pango_fc_font_map_load_fontset_default (font_map, context, desc, language);
 
 	/* "xx" is Pango's "unknown language" language code.
 	 * we can fall back to scripts maybe, but the facilities for that
 	 * is not in place yet.	Maybe Pango can use a four-letter script
 	 * code instead of "xx"... */
-	if (G_LIKELY (language == last_language) || language == NULL || language == pango_language_from_string ("xx"))
+	if (G_LIKELY (language == last_language) ||
+	    language == NULL ||
+	    language == pango_language_from_string ("C") ||
+	    language == pango_language_from_string ("xx"))
 		return fontset;
 
 	if (G_UNLIKELY (!seen_languages))
@@ -163,7 +272,7 @@ pk_font_load_fontset (PangoFontMap *font_map, PangoContext *context, const Pango
 
 		closure.language = language;
 		closure.found = FALSE;
-		pango_fontset_foreach (fontset, pk_font_foreach_callback, &closure);
+		pango_fontset_foreach (fontset, fontset_foreach_cb, &closure);
 		if (!closure.found)
 			pk_font_not_found (language);
 	}
@@ -172,143 +281,58 @@ pk_font_load_fontset (PangoFontMap *font_map, PangoContext *context, const Pango
 	return fontset;
 }
 
-/**
- * pk_font_map_class_init:
- **/
 static void
-pk_font_map_class_init (PangoFontMapClass *klass)
+pk_pango_fc_font_map_class_init (PangoFontMapClass *klass)
 {
-	g_assert (pk_font_load_fontset_default == NULL);
-	pk_font_load_fontset_default = klass->load_fontset;
-	klass->load_fontset = pk_font_load_fontset;
+	g_return_if_fail (pk_pango_fc_font_map_load_fontset_default == NULL);
+
+	pk_pango_fc_font_map_load_fontset_default = klass->load_fontset;
+	klass->load_fontset = pk_pango_fc_font_map_load_fontset;
 }
 
-/**
- * pk_font_overload_type:
- **/
 static GType
-pk_font_overload_type (GType font_map_type)
+pk_pango_fc_font_map_overload_type (GType default_pango_fc_font_map_type)
 {
 	GTypeQuery query;
-	g_type_query (font_map_type, &query);
+	g_type_query (default_pango_fc_font_map_type, &query);
 
-	return g_type_register_static_simple (font_map_type,
-					      g_intern_static_string ("MissingFontFontMap"),
+	return g_type_register_static_simple (default_pango_fc_font_map_type,
+					      g_intern_static_string ("PkPangoFcFontMap"),
 					      query.class_size,
-					      (GClassInitFunc) pk_font_map_class_init,
+					      (GClassInitFunc) pk_pango_fc_font_map_class_init,
 					      query.instance_size,
 					      NULL, 0);
 }
 
-/**
- * pk_font_dbus_notify_cb:
- **/
 static void
-pk_font_dbus_notify_cb (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data)
+install_pango_font_map (void)
 {
+	PangoFontMap *font_map;
+	GType font_map_type;
 
-	gboolean ret;
-	GError *error = NULL;
-	ret = dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
-	if (!ret)
-		g_message ("PackageKit: Did not install font: %s", error->message);
-}
-
-/**
- * pk_font_idle_cb:
- **/
-static gboolean
-pk_font_idle_cb (GPtrArray *array)
-{
-	guint i;
-	DBusGConnection *connection;
-	DBusGProxy *proxy = NULL;
-	guint xid = 0;
-	gchar **fonts = NULL;
-	GError *error = NULL;
-	GtkWindow *active = NULL;
-	GdkWindow *window;
-	GList *list;
-
-	/* nothing to do */
-	if (array->len == 0)
-		goto out;
-
-	/* just print */
-	for (i=0; i< array->len; i++)
-		g_message ("array[%i]: %s", i, (const gchar *) g_ptr_array_index (array, i));
-
-	/* try to get the window XID */
-	list = gtk_window_list_toplevels ();
-	g_list_foreach (list, (GFunc) pk_font_find_window, &active);
-	if (active != NULL) {
-		window = gtk_widget_get_window (GTK_WIDGET(active));
-		xid = (guint) GDK_WINDOW_XID(window);
-	}
-
-	/* get bus */
-	connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
-	if (connection == NULL) {
-		g_print ("Could not connect to session DBUS: %s\n", error->message);
-		g_error_free (error);
-		goto out;
-	}
-
-	/* get proxy */
-	proxy = dbus_g_proxy_new_for_name (connection,
-					   "org.freedesktop.PackageKit",
-					   "/org/freedesktop/PackageKit",
-					   "org.freedesktop.PackageKit");
-	if (proxy == NULL) {
-		g_print ("Cannot connect to PackageKit session service\n");
-		goto out;
-	}
-
-	/* don't timeout, as dbus-glib sets the timeout ~25 seconds */
-	dbus_g_proxy_set_default_timeout (proxy, INT_MAX);
-
-	/* invoke the method */
-	fonts = pk_font_ptr_array_to_strv (array);
-	DBusGProxyCall *call;
-	call = dbus_g_proxy_begin_call (proxy, "InstallFonts", pk_font_dbus_notify_cb, NULL, NULL, 
-				        G_TYPE_UINT, xid,
-				        G_TYPE_UINT, 0,
-				        G_TYPE_STRV, fonts,
-				        G_TYPE_INVALID);
-	if (call == NULL) {
-		g_message ("PackageKit: could not send method");
-		goto out;
+	font_map = pango_cairo_font_map_get_default ();
+	if (!PANGO_IS_FC_FONT_MAP (font_map)) {
+		g_warning ("Default pangocairo font map is not a pangofc fontmap. "
+			   "Skipping automatic missing-font installation.");
+		return;
 	}
-out:
-	g_strfreev (fonts);
-	g_ptr_array_foreach (array, (GFunc) g_free, NULL);
-	g_ptr_array_free (array, TRUE);
-	if (proxy != NULL)
-		g_object_unref (proxy);
 
-	return FALSE;
+	font_map_type = pk_pango_fc_font_map_overload_type (G_TYPE_FROM_INSTANCE (font_map));
+	font_map = g_object_new (font_map_type, NULL);
+	pango_cairo_font_map_set_default (PANGO_CAIRO_FONT_MAP (font_map));
+	g_object_unref (font_map);
 }
 
+
 /**
- * gtk_module_init:
+ * GTK module declaraction
  **/
+
+void gtk_module_init (gint *argc, gchar ***argv);
+
 void
 gtk_module_init (gint *argc G_GNUC_UNUSED,
 		 gchar ***argv G_GNUC_UNUSED)
 {
-	PangoFontMap *font_map;
-	GType font_map_type;
-
-	array = g_ptr_array_new ();
-	g_idle_add ((GSourceFunc) pk_font_idle_cb, array);
-
-	font_map = pango_cairo_font_map_get_default ();
-	if (!PANGO_IS_FC_FONT_MAP (font_map))
-		return;
-
-	font_map_type = pk_font_overload_type (G_TYPE_FROM_INSTANCE (font_map));
-	font_map = g_object_new (font_map_type, NULL);
-	pango_cairo_font_map_set_default (PANGO_CAIRO_FONT_MAP (font_map));
-	g_object_unref (font_map);
+	install_pango_font_map ();
 }
-
commit 44208ef73c94f5ef6f5017a79ae6312c1a6d7db3
Author: Richard Hughes <richard at hughsie.com>
Date:   Fri Nov 28 15:13:29 2008 +0000

    trivial: pk-gtk-module has to be libpk-gtk-module for gnome-settings-daemon

diff --git a/contrib/gtk-module/Makefile.am b/contrib/gtk-module/Makefile.am
index f2fb679..7b98e1b 100644
--- a/contrib/gtk-module/Makefile.am
+++ b/contrib/gtk-module/Makefile.am
@@ -2,17 +2,17 @@ NULL =
 APP = gedit --new-window GLASS.txt
 
 moduledir = $(LIBDIR)/gtk-2.0/modules
-module_LTLIBRARIES = pk-gtk-module.la
-pk_gtk_module_la_SOURCES = pk-gtk-module.c
-pk_gtk_module_la_LIBADD = $(PK_GTK_MODULE_LIBS)
-pk_gtk_module_la_LDFLAGS = -module -avoid-version
-pk_gtk_module_la_CFLAGS = $(PK_GTK_MODULE_CFLAGS)
+module_LTLIBRARIES = libpk-gtk-module.la
+libpk_gtk_module_la_SOURCES = pk-gtk-module.c
+libpk_gtk_module_la_LIBADD = $(PK_GTK_MODULE_LIBS)
+libpk_gtk_module_la_LDFLAGS = -module -avoid-version
+libpk_gtk_module_la_CFLAGS = $(PK_GTK_MODULE_CFLAGS)
 
 clean-local:
 	rm -f *~
 
 local: all
-	GTK_MODULES="$$GTK_MODULES:$$PWD/.libs/pk-gtk-module.so" $(APP)
+	GTK_MODULES="$$GTK_MODULES:$$PWD/.libs/libpk-gtk-module.so" $(APP)
 
 EXTRA_DIST =						\
 	README						\


More information about the PackageKit-commit mailing list