[PackageKit-commit] packagekit: Branch 'master' - 16 commits
Richard Hughes
hughsient at kemper.freedesktop.org
Thu Nov 27 01:51:39 PST 2008
RELEASE | 4
backends/yum/yumComps.py | 6
configure.ac | 17
contrib/Makefile.am | 4
contrib/PackageKit.spec.in | 2
contrib/gtk-module/.gitignore | 6
contrib/gtk-module/GLASS.txt | 170 ++++++++
contrib/gtk-module/Makefile.am | 20
contrib/gtk-module/PackageKitGtkModule.schemas.in | 17
contrib/gtk-module/README | 2
contrib/gtk-module/pk-gtk-module.c | 316 +++++++++++++++
lib/packagekit-qt/src/CMakeLists.txt | 1
lib/packagekit-qt/src/Makefile.am | 3
lib/packagekit-qt/src/polkitclient.cpp | 21 -
lib/packagekit-qt/src/polkitclient.h | 4
lib/packagekit-qt/src/polkitthread.cpp | 58 ++
lib/packagekit-qt/src/polkitthread.h | 24 +
po/pl.po | 363 ++++++++---------
src/pk-backend.c | 33 -
src/pk-engine.c | 8
src/pk-post-trans.c | 12
src/pk-transaction.c | 457 ++++++++++------------
22 files changed, 1097 insertions(+), 451 deletions(-)
New commits:
commit 5fffe3ec758748cd5bcc79236d9dfe91021972aa
Author: Richard Hughes <richard at hughsie.com>
Date: Thu Nov 27 09:41:42 2008 +0000
yum: catch yum.Errors.RepoError when we get the yum comps groups. Fixes fd#18722
diff --git a/backends/yum/yumComps.py b/backends/yum/yumComps.py
index 044bc86..bbc1054 100755
--- a/backends/yum/yumComps.py
+++ b/backends/yum/yumComps.py
@@ -245,8 +245,10 @@ class yumComps:
def refresh(self, force=False):
''' get the data from yum (slow, REALLY SLOW) '''
-
- cats = self.yumbase.comps.categories
+ try:
+ cats = self.yumbase.comps.categories
+ except yum.Errors.RepoError, e:
+ return False
if self.yumbase.comps.compscount == 0:
return False
commit cab2fe0d20756cadbdd60f7e283bb18fb59b8e37
Author: Richard Hughes <richard at hughsie.com>
Date: Thu Nov 27 08:06:42 2008 +0000
trivial: rename pango-module to gtk-module on request of behdad
diff --git a/configure.ac b/configure.ac
index 11cf854..f1ae477 100644
--- a/configure.ac
+++ b/configure.ac
@@ -316,19 +316,19 @@ fi
AM_CONDITIONAL(PK_BUILD_GSTREAMER_PLUGIN, test $build_gstreamer_plugin = "yes")
dnl ---------------------------------------------------------------------------
-dnl - Able to build pango module
-dnl ---------------------------------------------------------------------------
-AC_ARG_ENABLE(pango_module, AS_HELP_STRING([--enable-pango-module],[Build pango module functionality]),
- enable_pango_module=$enableval,enable_pango_module=yes)
-if test x$enable_pango_module = xyes; then
- PKG_CHECK_MODULES(PK_PANGO_MODULE, gtk+-2.0 pangoft2 fontconfig dbus-glib-1,
- build_pango_module=yes, build_pango_module=no)
- AC_SUBST(PK_PANGO_MODULE_CFLAGS)
- AC_SUBST(PK_PANGO_MODULE_LIBS)
+dnl - Able to build GTK module
+dnl ---------------------------------------------------------------------------
+AC_ARG_ENABLE(gtk_module, AS_HELP_STRING([--enable-gtk-module],[Build GTK module functionality]),
+ enable_gtk_module=$enableval,enable_gtk_module=yes)
+if test x$enable_gtk_module = xyes; then
+ PKG_CHECK_MODULES(PK_GTK_MODULE, gtk+-2.0 pangoft2 fontconfig dbus-glib-1,
+ build_gtk_module=yes, build_gtk_module=no)
+ AC_SUBST(PK_GTK_MODULE_CFLAGS)
+ AC_SUBST(PK_GTK_MODULE_LIBS)
else
- build_pango_module=no
+ build_gtk_module=no
fi
-AM_CONDITIONAL(PK_BUILD_PANGO_MODULE, test $build_pango_module = "yes")
+AM_CONDITIONAL(PK_BUILD_GTK_MODULE, test $build_gtk_module = "yes")
dnl ---------------------------------------------------------------------------
dnl - Other tests
@@ -594,7 +594,7 @@ docs/api/version.xml
contrib/Makefile
contrib/packagekit-plugin/Makefile
contrib/gstreamer-plugin/Makefile
-contrib/pango-module/Makefile
+contrib/gtk-module/Makefile
contrib/udev/Makefile
contrib/yum-packagekit/Makefile
backends/Makefile
@@ -657,7 +657,7 @@ echo "
GIO support: ${with_gio}
Browser plugin: ${build_browser_plugin}
GStreamer plugin: ${build_gstreamer_plugin}
- Pango module: ${build_pango_module}
+ Pango module: ${build_gtk_module}
QT library: ${build_qt}
Backends:
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index d5e7b12..3f21c4d 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -12,8 +12,8 @@ if PK_BUILD_GSTREAMER_PLUGIN
SUBDIRS += gstreamer-plugin
endif
-if PK_BUILD_PANGO_MODULE
-SUBDIRS += pango-module
+if PK_BUILD_GTK_MODULE
+SUBDIRS += gtk-module
endif
bashcompletiondir = ${SYSCONFDIR}/bash_completion.d
diff --git a/contrib/gtk-module/.gitignore b/contrib/gtk-module/.gitignore
new file mode 100644
index 0000000..60a9816
--- /dev/null
+++ b/contrib/gtk-module/.gitignore
@@ -0,0 +1,6 @@
+.deps
+.libs
+*.o
+*.la
+*.lo
+
diff --git a/contrib/gtk-module/GLASS.txt b/contrib/gtk-module/GLASS.txt
new file mode 100644
index 0000000..610b595
--- /dev/null
+++ b/contrib/gtk-module/GLASS.txt
@@ -0,0 +1,170 @@
+I Can Eat Glass
+In various languages
+
+Adopted from http://www.columbia.edu/kermit/utf8.html#glass
+Do not edit. Submit additions to the URL above and resynch.
+
+Permission is granted by the Kermit project (http://www.columbia.edu/kermit/)
+to redistribute this file, with absolutely no warranty.
+
+
+
+Sanskrit: à¤à¤¾à¤à¤ शà¤à¥à¤¨à¥à¤®à¥à¤¯à¤¤à¥à¤¤à¥à¤®à¥ । नà¥à¤ªà¤¹à¤¿à¤¨à¤¸à¥à¤¤à¤¿ मामॠ॥
+Sanskrit (standard transcription): kÄcaá¹ Åaknomyattum; nopahinasti mÄm.
+Classical Greek: á½Î±Î»Î¿Î½ Ïαγεá¿Î½ δύναμαιΠÏοῦÏο οὠμε βλάÏÏει.
+Greek: ÎÏοÏÏ Î½Î± ÏÎ¬Ï ÏÏαÏμÎνα γÏ
αλιά ÏÏÏÎ¯Ï Î½Î± ÏÎ¬Î¸Ï ÏίÏοÏα.
+Etruscan: (NEEDED)
+Latin: Vitrum edere possum; mihi non nocet.
+Old French: Je puis mangier del voirre. Ne me nuit.
+French: Je peux manger du verre, ça ne me fait pas de mal.
+Provençal / Occitan: Pòdi manjar de veire, me nafrariá pas.
+Québécois: J'peux manger d'la vitre, ça m'fa pas mal.
+Walloon: Dji pou magnî do vêre, çoula m' freut nén må.
+Champenois: (NEEDED)
+Lorrain: (NEEDED)
+Picard: Ch'peux mingi du verre, cha m'foé mie n'ma.
+Corsican: (NEEDED)
+Kreyòl Ayisyen: Mwen kap manje vè, li pa blese'm.
+Basque: Kristala jan dezaket, ez dit minik ematen.
+Catalan: Puc menjar vidre que no em fa mal.
+Spanish: Puedo comer vidrio, no me hace daño.
+Aragones: Puedo minchar beire, no me'n fa mal .
+Galician: Eu podo xantar cristais e non cortarme.
+Portuguese: Posso comer vidro, não me faz mal.
+Brazilian Portuguese (7): Posso comer vidro, não me machuca.
+Caboverdiano: M' podê cumê vidru, ca ta maguâ-m'.
+Papiamentu: Ami por kome glas anto e no ta hasimi daño.
+Italian: Posso mangiare il vetro e non mi fa male.
+Milanese: Sôn bôn de magnà el véder, el me fa minga mal.
+Roman: Me posso magna' er vetro, e nun me fa male.
+Napoletano: M' pozz magna' o'vetr, e nun m' fa mal.
+Sicilian: Puotsu mangiari u vitru, nun mi fa mali.
+Venetian: Mi posso magnare el vetro, no'l me fa mae.
+Zeneise (Genovese): Pòsso mangiâ o veddro e o no me fà mâ.
+Rheto-Romance / Romansch: (NEEDED)
+Romany / Tsigane: (NEEDED)
+Romanian: Pot sÄ mÄnânc sticlÄ Èi ea nu mÄ rÄneÈte.
+Esperanto: Mi povas manÄi vitron, Äi ne damaÄas min.
+Pictish: (NEEDED)
+Breton: (NEEDED)
+Cornish: Mý a yl dybry gwéder hag éf ny wra ow ankenya.
+Welsh: Dw i'n gallu bwyta gwydr, 'dyw e ddim yn gwneud dolur i mi.
+Manx Gaelic: Foddym gee glonney agh cha jean eh gortaghey mee.
+Old Irish (Ogham): ááááá
áááááááááááááá
ááá
ááááá
áá
+Old Irish (Latin): Con·iccim ithi nglano. NÃm·géna.
+Irish: Is féidir liom gloinne a ithe. Nà dhéanann sà dochar ar bith dom.
+Scottish Gaelic: S urrainn dhomh gloinne ithe; cha ghoirtich i mi.
+Anglo-Saxon (Runes): áá³á«áá¨á·á«á·áá¨áá«áá©ááªá¾á«á©á¾áá«á»ááá«á¾áá«á»ááªá±áááªá§á«ááá¬
+Anglo-Saxon (Latin): Ic mæg glæs eotan ond hit ne hearmiað me.
+Middle English: Ich canne glas eten and hit hirtiþ me nouÈt.
+English: I can eat glass and it doesn't hurt me.
+English (IPA): [aɪ kæn iËt glÉËs ænd ɪt dÉz nÉt hÉËt miË] (Received Pronunciation)
+English (Braille): â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â ¥â â â â â
+Lalland Scots / Doric: Ah can eat gless, it disnae hurt us.
+Glaswegian: (NEEDED)
+Gothic (4): ð¼ð°ð² ð²ð»ð´ð ð¹Ìðð°ð½, ð½ð¹ ð¼ð¹ð ð
ð¿ ð½ð³ð°ð½ ð±ðð¹ð²ð²ð¹ð¸.
+Old Norse (Runes): áá´ á·áá ááá ᧠á·ááá± áá¾ á¦ááá á¨á§ á¡á á±á§á¨ áá¨á±
+Old Norse (Latin): Ek get etið gler án þess að verða sár.
+Norsk / Norwegian (Nynorsk): Eg kan eta glas utan å skada meg.
+Norsk / Norwegian (Bokmål): Jeg kan spise glass uten å skade meg.
+Føroyskt / Faroese: (NEEDED)
+Ãslenska / Icelandic: Ãg get etið gler án þess að meiða mig.
+Svenska / Swedish: Jag kan äta glas utan att skada mig.
+Dansk / Danish: Jeg kan spise glas, det gør ikke ondt på mig.
+Soenderjysk: à ka æe glass uhen at det go mæ naue.
+Frysk / Frisian: Ik kin glês ite, it docht me net sear.
+Nederlands / Dutch: Ik kan glas eten, het doet mij geen kwaad.
+Kirchröadsj/Bôchesserplat: Iech ken glaas èèse, mer 't deet miech jing pieng.
+Afrikaans: Ek kan glas eet, maar dit doen my nie skade nie.
+Lëtzebuergescht / Luxemburgish: Ech kan Glas iessen, daat deet mir nët wei.
+Deutsch / German: Ich kann Glas essen, ohne mir weh zu tun.
+Ruhrdeutsch: Ich kann Glas verkasematuckeln, ohne dattet mich wat jucken tut.
+Lausitzer Mundart ("Lusatian"): Ich koann Gloos assn und doas dudd merr ni wii.
+Odenwälderisch: Iech konn glaasch voschbachteln ohne dass es mir ebbs daun doun dud.
+Sächsisch / Saxon: 'sch kann Glos essn, ohne dass'sch mer wehtue.
+Pfälzisch: Isch konn Glass fresse ohne dasses mer ebbes ausmache dud.
+Schwäbisch / Swabian: I kå Glas frässa, ond des macht mr nix!
+Bayrisch / Bavarian: I koh Glos esa, und es duard ma ned wei.
+Allemannisch: I kaun Gloos essen, es tuat ma ned weh.
+Schwyzerdütsch: Ich chan Glaas ässe, das tuet mir nöd weeh.
+Hungarian: Meg tudom enni az üveget, nem lesz tÅle bajom.
+Suomi / Finnish: Voin syödä lasia, se ei vahingoita minua.
+Sami (Northern): Sáhtán borrat lása, dat ii leat bávÄÄas.
+Erzian: Ðон ÑÑÑан ÑÑликадо, Ð´Ñ Ð·ÑÑн ÑйÑÑÑÐ½Ð·Ñ Ð° Ñли.
+Karelian: (NEEDED)
+Vepsian: (NEEDED)
+Votian: (NEEDED)
+Livonian: (NEEDED)
+Estonian: Ma võin klaasi süüa, see ei tee mulle midagi.
+Latvian: Es varu Äst stiklu, tas man nekaitÄ.
+Lithuanian: AÅ¡ galiu valgyti stiklÄ
ir jis manÄs nežeidžia
+Old Prussian: (NEEDED)
+Sorbian (Wendish): (NEEDED)
+Czech: Mohu jÃst sklo, neublÞà mi.
+Slovak: Môžem jesť sklo. Nezranà ma.
+Polska / Polish: MogÄ jeÅÄ szkÅo i mi nie szkodzi.
+Slovenian: Lahko jem steklo, ne da bi mi Å¡kodovalo.
+Croatian: Ja mogu jesti staklo i ne boli me.
+Serbian (Latin): Mogu jesti staklo a da mi ne Å¡kodi.
+Serbian (Cyrillic): ÐÐ¾Ð³Ñ ÑеÑÑи ÑÑакло а да ми не Ñкоди.
+Macedonian: Ðожам да Ñадам ÑÑакло, а не ме ÑÑеÑа.
+Russian: Я Ð¼Ð¾Ð³Ñ ÐµÑÑÑ ÑÑекло, оно мне не вÑедиÑ.
+Belarusian (Cyrillic): Я Ð¼Ð°Ð³Ñ ÐµÑÑÑ Ñкло, Ñно мне не ÑкодзÑÑÑ.
+Belarusian (Lacinka): Ja mahu jeÅci Å¡kÅo, jano mne ne Å¡kodziÄ.
+Ukrainian: Я Ð¼Ð¾Ð¶Ñ ÑÑÑи Ñкло, й воно Ð¼ÐµÐ½Ñ Ð½Ðµ поÑкодиÑÑ.
+Bulgarian: Ðога да Ñм ÑÑÑкло, Ñо не ми вÑеди.
+Georgian: ááááá¡ áááá áá áá á áá¢áááá.
+Armenian: Ô¿ÖÕ¶Õ¡Õ´ Õ¡ÕºÕ¡Õ¯Õ« Õ¸ÖÕ¿Õ¥Õ¬ Ö Õ«Õ¶Õ®Õ« Õ¡Õ¶Õ°Õ¡Õ¶Õ£Õ«Õ½Õ¿ Õ¹Õ¨Õ¶Õ¥ÖÖ
+Albanian: Unë mund të ha qelq dhe nuk më gjen gjë.
+Turkish: Cam yiyebilirim, bana zararı dokunmaz.
+Turkish (Ottoman): جاÙ
ÙÙ٠بÙÙرÙ
بÚا ضرر٠طÙÙÙÙÙ
ز
+Bangla / Bengali: à¦à¦®à¦¿ à¦à¦¾à¦à¦ à¦à§à¦¤à§ পারি, তাতৠà¦à¦®à¦¾à¦° à¦à§à¦¨à§ à¦à§à¦·à¦¤à¦¿ হৠনা।
+Marathi: मॠà¤à¤¾à¤ à¤à¤¾à¤ शà¤à¤¤à¥, मला तॠदà¥à¤à¤¤ नाहà¥.
+Hindi: मà¥à¤ à¤à¤¾à¤à¤ à¤à¤¾ सà¤à¤¤à¤¾ हà¥à¤, मà¥à¤à¥ à¤à¤¸ सॠà¤à¥à¤ पà¥à¤¡à¤¾ नहà¥à¤ हà¥à¤¤à¥.
+Tamil: நான௠à®à®£à¯à®£à®¾à®à®¿ à®à®¾à®ªà¯à®ªà®¿à®à¯à®µà¯à®©à¯, à®
தனால௠à®à®©à®à¯à®à¯ à®à®°à¯ à®à¯à®à¯à®®à¯ வராதà¯.
+Urdu(2): Ù
ÛÚº کاÙÚ Ú©Ú¾Ø§ سکتا ÛÙÚº اÙر Ù
Ø¬Ú¾Û ØªÚ©ÙÛÙ ÙÛÛÚº ÛÙØªÛ Û
+Pashto(2): ز٠شÙØ´Ù Ø®ÙÚÙÛ Ø´Ù
Ø Ùغ٠Ù
ا ÙÙ Ø®ÙÚÙÙ
+Farsi / Persian: .Ù
Ù Ù
Û ØªÙاÙÙ
بدÙÙ٠اØساس درد Ø´Ùش٠بخÙرÙ
+Arabic(2): Ø£Ùا Ùادر عÙ٠أÙ٠اÙزجاج Ù Ùذا Ùا ÙؤÙÙ
ÙÙ.
+Aramaic: (NEEDED)
+Hebrew(2): ×× × ×××× ××××× ×××××ת ××× ×× ×××ק ××.
+Yiddish(2): ××× ×§×¢× ×¢×¡× ×××Ö¸× ××× ×¢×¡ ××× ××ר × ××©× ×°×².
+Judeo-Arabic: (NEEDED)
+Ladino: (NEEDED)
+GÇʼÇz: (NEEDED)
+Amharic: (NEEDED)
+Twi: Metumi awe tumpan, ÉnyÉ me hwee.
+Hausa (Latin): InaÌ iya taunar gilaÌshi kuma in gamaÌ laÌfiyaÌ.
+Hausa (Ajami) (2): Ø¥ÙÙا Ø¥ÙÙ٠تÙÙÙÙر غÙÙÙاش٠ÙÙÙ
٠إÙ٠غÙÙ
Ùا ÙÙاÙÙÙÙا
+Yoruba(3): Mo lè jeÌ© dÃgÃ, kò nà pa mà lára.
+(Ki)Swahili: Naweza kula bilauri na sikunyui.
+Malay: Saya boleh makan kaca dan ia tidak mencederakan saya.
+Tagalog: Kaya kong kumain nang bubog at hindi ako masaktan.
+Chamorro: Siña yo' chumocho krestat, ti ha na'lalamen yo'.
+Javanese: Aku isa mangan beling tanpa lara.
+Burmese: (NEEDED)
+Vietnamese (quá»c ngữ): Tôi có thá» Än thủy tinh mà không hại gì.
+Vietnamese (nôm) (4): äº ð£ ä¸ å¹ æ°´ æ¶ ð¦¡ ç©º ð£ 害 å¦
+Khmer: (NEEDED)
+Lao: (NEEDED)
+Thai: à¸à¸±à¸à¸à¸´à¸à¸à¸£à¸°à¸à¸à¹à¸à¹ à¹à¸à¹à¸¡à¸±à¸à¹à¸¡à¹à¸à¸³à¹à¸«à¹à¸à¸±à¸à¹à¸à¹à¸
+Mongolian (Cyrillic): Ðи Ñил идÑй Ñадна, надад Ñ
оÑÑой биÑ
+Mongolian (Classic) (5): á ªá ¢ á °á ¢á ¯á ¢ á ¢á ³á ¡á ¶á ¦ á ´á ¢á ³á á ¨á á á ¨á á ³á ¤á · á ¬á £á ¤á ·á á ³á á ¢ á ªá ¢á °á ¢
+Dzongkha: (NEEDED)
+Nepali: (NEEDED)
+Tibetan: ཤེལà¼à½¦à¾à½¼à¼à½à¼à½à½¦à¼à½à¼à½à¼à½à½²à¼à½à¼à½¢à½ºà½à¼
+Chinese: æè½åä¸ç»çèä¸ä¼¤èº«ä½ã
+Chinese (Traditional): æè½åä¸ç»çèä¸å·èº«é«ã
+Taiwanese(6): Góa Ä-tà ng chiaÌh po-lê, mÄ bÄ tioÌh-siong.
+Japanese: ç§ã¯ã¬ã©ã¹ãé£ã¹ããã¾ããããã¯ç§ãå·ã¤ãã¾ããã
+Korean: ëë ì 리를 먹ì ì ìì´ì. ê·¸ëë ìíì§ ììì
+Bislama: Mi save kakae glas, hemi no save katem mi.
+Hawaiian: Hiki iaÊ»u ke Ê»ai i ke aniani; Ê»aÊ»ole nÅ lÄ au e Ê»eha.
+Marquesan: E koÊ»ana e kai i te karahi, mea Ê»Ä, Ê»aÊ»e hauhau.
+Chinook Jargon: Naika mÉkmÉk kakshÉt labutay, pi weyk ukuk munk-sik nay.
+Navajo: Tsésǫʼ yishÄ
ÌÄ
go bÃÃnÃshghah dóó doo shiÅ neezgai da.
+Cherokee (and Cree, Ojibwa, Inuktitut, and other Native American languages): (NEEDED)
+Garifuna: (NEEDED)
+Gullah: (NEEDED)
+Lojban: mi kakne le nu citka le blaci .iku'i le se go'i na xrani mi
+Nórdicg: LjÅr ye caudran créneþ ý jor cáºran.
diff --git a/contrib/gtk-module/Makefile.am b/contrib/gtk-module/Makefile.am
new file mode 100644
index 0000000..28138a3
--- /dev/null
+++ b/contrib/gtk-module/Makefile.am
@@ -0,0 +1,20 @@
+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)
+
+clean-local:
+ rm -f *~
+
+local: all
+ GTK_MODULES="$$GTK_MODULES:$$PWD/.libs/pk-gtk-module.so" $(APP)
+
+MAINTAINERCLEANFILES = \
+ *~ \
+ Makefile.in \
+ $(NULL)
+
diff --git a/contrib/gtk-module/PackageKitGtkModule.schemas.in b/contrib/gtk-module/PackageKitGtkModule.schemas.in
new file mode 100644
index 0000000..8900bd5
--- /dev/null
+++ b/contrib/gtk-module/PackageKitGtkModule.schemas.in
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<gconfschemafile>
+ <schemalist>
+ <schema>
+ <key>/schemas/apps/gnome_settings_daemon/gtk-modules/PackageKit-gtk-module</key>
+ <applyto>/apps/gnome_settings_daemon/gtk-modules/PackageKit-gtk-module</applyto>
+ <owner>PackageKit</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short>GTK+ module for font installation</short>
+ <long>This key determines if PackageKit should prompt for font installs.</long>
+ </locale>
+ </schema>
+ </schemalist>
+</gconfschemafile>
+
diff --git a/contrib/gtk-module/README b/contrib/gtk-module/README
new file mode 100644
index 0000000..cf4ac2a
--- /dev/null
+++ b/contrib/gtk-module/README
@@ -0,0 +1,2 @@
+/usr/lib/gtk-2.0/modules/
+
diff --git a/contrib/gtk-module/pk-gtk-module.c b/contrib/gtk-module/pk-gtk-module.c
new file mode 100644
index 0000000..f077cae
--- /dev/null
+++ b/contrib/gtk-module/pk-gtk-module.c
@@ -0,0 +1,316 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2008 Behdad Esfahbod <behdad at behdad.org>
+ * Copyright (C) 2008 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#define G_LOG_DOMAIN "PkGtkModule"
+
+#define PANGO_ENABLE_BACKEND
+#include <fontconfig/fontconfig.h>
+#include <pango/pango.h>
+#include <pango/pangofc-fontmap.h>
+#include <pango/pangocairo.h>
+#include <dbus/dbus-glib.h>
+#include <gtk/gtk.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;
+
+#if 0
+/**
+ * pk_font_find_window:
+ **/
+static void
+pk_font_find_window (GtkWindow *window, GtkWindow **active)
+{
+ g_message ("%p=%i", window, gtk_window_has_toplevel_focus (window));
+}
+#endif
+
+/**
+ * pk_font_ptr_array_to_strv:
+ **/
+gchar **
+pk_font_ptr_array_to_strv (GPtrArray *array)
+{
+ gchar **strv_array;
+ const gchar *value_temp;
+ guint i;
+
+ 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);
+ }
+ strv_array[i] = NULL;
+
+ return strv_array;
+}
+
+/**
+ * pk_font_not_found:
+ **/
+static void
+pk_font_not_found (PangoLanguage *language)
+{
+ FcPattern *pat = NULL;
+ gchar *tag = NULL;
+ const gchar *lang;
+
+ /* convert to language */
+ lang = pango_language_to_string (language);
+ g_message ("lang required '%s'", lang);
+ if (lang == NULL || strcmp (lang, "C") == 0)
+ goto out;
+
+ /* create the font tag used in as a package buildrequire */
+ pat = FcPatternCreate ();
+ FcPatternAddString (pat, FC_LANG, (FcChar8 *) lang);
+ tag = (gchar *) FcNameUnparse (pat);
+ if (tag == NULL)
+ goto out;
+
+ g_message ("tag required '%s'", tag);
+
+ /* add to array for processing in idle callback */
+ g_ptr_array_add (array, (gpointer) g_strdup (tag));
+
+out:
+ if (pat != NULL)
+ FcPatternDestroy (pat);
+ g_free (tag);
+}
+
+/**
+ * pk_font_foreach_callback:
+ **/
+static gboolean
+pk_font_foreach_callback (PangoFontset *fontset G_GNUC_UNUSED, PangoFont *font, gpointer data)
+{
+ FonsetForeachClosure *closure = data;
+ PangoFcFont *fcfont = PANGO_FC_FONT (font);
+ const FcPattern *pattern = NULL;
+ FcLangSet *langset = NULL;
+
+ g_object_get (fcfont, "pattern", &pattern, NULL);
+
+ /* old Pango version with non-readable pattern */
+ if (pattern == NULL) {
+ g_warning ("Old Pango version with non-readable pattern. Skipping auto missing font installation.");
+ return closure->found = TRUE;
+ }
+
+ if (FcPatternGetLangSet (pattern, FC_LANG, 0, &langset) == FcResultMatch &&
+ FcLangSetHasLang (langset, (FcChar8 *) closure->language) != FcLangDifferentLang)
+ closure->found = TRUE;
+
+ return closure->found;
+}
+
+/**
+ * pk_font_load_fontset:
+ **/
+static PangoFontset *
+pk_font_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);
+
+ /* "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"))
+ return fontset;
+
+ if (G_UNLIKELY (!seen_languages))
+ seen_languages = g_hash_table_new (NULL, NULL);
+
+ if (G_UNLIKELY (!g_hash_table_lookup (seen_languages, language))) {
+ FonsetForeachClosure closure;
+
+ g_hash_table_insert (seen_languages, language, language);
+
+ closure.language = language;
+ closure.found = FALSE;
+ pango_fontset_foreach (fontset, pk_font_foreach_callback, &closure);
+ if (!closure.found)
+ pk_font_not_found (language);
+ }
+
+ last_language = language;
+ return fontset;
+}
+
+/**
+ * pk_font_map_class_init:
+ **/
+static void
+pk_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;
+}
+
+/**
+ * pk_font_overload_type:
+ **/
+static GType
+pk_font_overload_type (GType font_map_type)
+{
+ GTypeQuery query;
+ g_type_query (font_map_type, &query);
+
+ return g_type_register_static_simple (font_map_type,
+ g_intern_static_string ("MissingFontFontMap"),
+ query.class_size,
+ (GClassInitFunc) pk_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)
+{
+
+ 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;
+ gchar **fonts = NULL;
+ GError *error = NULL;
+
+ /* 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));
+
+#if 0
+ GtkWindow *active;
+ GList *list;
+
+ /* FIXME: try to get the window XID */
+ list = gtk_window_list_toplevels ();
+ g_warning ("number of windows = %i", g_list_length (list));
+ g_list_foreach (list, (GFunc) pk_font_find_window, &active);
+#endif
+
+ /* 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);
+
+ /* FIXME: get the xid from the calling application */
+ xid = 0;
+
+ /* 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;
+ }
+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;
+}
+
+/**
+ * gtk_module_init:
+ **/
+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);
+}
+
diff --git a/contrib/pango-module/.gitignore b/contrib/pango-module/.gitignore
deleted file mode 100644
index 60a9816..0000000
--- a/contrib/pango-module/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-*.o
-*.la
-*.lo
-
diff --git a/contrib/pango-module/GLASS.txt b/contrib/pango-module/GLASS.txt
deleted file mode 100644
index 610b595..0000000
--- a/contrib/pango-module/GLASS.txt
+++ /dev/null
@@ -1,170 +0,0 @@
-I Can Eat Glass
-In various languages
-
-Adopted from http://www.columbia.edu/kermit/utf8.html#glass
-Do not edit. Submit additions to the URL above and resynch.
-
-Permission is granted by the Kermit project (http://www.columbia.edu/kermit/)
-to redistribute this file, with absolutely no warranty.
-
-
-
-Sanskrit: à¤à¤¾à¤à¤ शà¤à¥à¤¨à¥à¤®à¥à¤¯à¤¤à¥à¤¤à¥à¤®à¥ । नà¥à¤ªà¤¹à¤¿à¤¨à¤¸à¥à¤¤à¤¿ मामॠ॥
-Sanskrit (standard transcription): kÄcaá¹ Åaknomyattum; nopahinasti mÄm.
-Classical Greek: á½Î±Î»Î¿Î½ Ïαγεá¿Î½ δύναμαιΠÏοῦÏο οὠμε βλάÏÏει.
-Greek: ÎÏοÏÏ Î½Î± ÏÎ¬Ï ÏÏαÏμÎνα γÏ
αλιά ÏÏÏÎ¯Ï Î½Î± ÏÎ¬Î¸Ï ÏίÏοÏα.
-Etruscan: (NEEDED)
-Latin: Vitrum edere possum; mihi non nocet.
-Old French: Je puis mangier del voirre. Ne me nuit.
-French: Je peux manger du verre, ça ne me fait pas de mal.
-Provençal / Occitan: Pòdi manjar de veire, me nafrariá pas.
-Québécois: J'peux manger d'la vitre, ça m'fa pas mal.
-Walloon: Dji pou magnî do vêre, çoula m' freut nén må.
-Champenois: (NEEDED)
-Lorrain: (NEEDED)
-Picard: Ch'peux mingi du verre, cha m'foé mie n'ma.
-Corsican: (NEEDED)
-Kreyòl Ayisyen: Mwen kap manje vè, li pa blese'm.
-Basque: Kristala jan dezaket, ez dit minik ematen.
-Catalan: Puc menjar vidre que no em fa mal.
-Spanish: Puedo comer vidrio, no me hace daño.
-Aragones: Puedo minchar beire, no me'n fa mal .
-Galician: Eu podo xantar cristais e non cortarme.
-Portuguese: Posso comer vidro, não me faz mal.
-Brazilian Portuguese (7): Posso comer vidro, não me machuca.
-Caboverdiano: M' podê cumê vidru, ca ta maguâ-m'.
-Papiamentu: Ami por kome glas anto e no ta hasimi daño.
-Italian: Posso mangiare il vetro e non mi fa male.
-Milanese: Sôn bôn de magnà el véder, el me fa minga mal.
-Roman: Me posso magna' er vetro, e nun me fa male.
-Napoletano: M' pozz magna' o'vetr, e nun m' fa mal.
-Sicilian: Puotsu mangiari u vitru, nun mi fa mali.
-Venetian: Mi posso magnare el vetro, no'l me fa mae.
-Zeneise (Genovese): Pòsso mangiâ o veddro e o no me fà mâ.
-Rheto-Romance / Romansch: (NEEDED)
-Romany / Tsigane: (NEEDED)
-Romanian: Pot sÄ mÄnânc sticlÄ Èi ea nu mÄ rÄneÈte.
-Esperanto: Mi povas manÄi vitron, Äi ne damaÄas min.
-Pictish: (NEEDED)
-Breton: (NEEDED)
-Cornish: Mý a yl dybry gwéder hag éf ny wra ow ankenya.
-Welsh: Dw i'n gallu bwyta gwydr, 'dyw e ddim yn gwneud dolur i mi.
-Manx Gaelic: Foddym gee glonney agh cha jean eh gortaghey mee.
-Old Irish (Ogham): ááááá
áááááááááááááá
ááá
ááááá
áá
-Old Irish (Latin): Con·iccim ithi nglano. NÃm·géna.
-Irish: Is féidir liom gloinne a ithe. Nà dhéanann sà dochar ar bith dom.
-Scottish Gaelic: S urrainn dhomh gloinne ithe; cha ghoirtich i mi.
-Anglo-Saxon (Runes): áá³á«áá¨á·á«á·áá¨áá«áá©ááªá¾á«á©á¾áá«á»ááá«á¾áá«á»ááªá±áááªá§á«ááá¬
-Anglo-Saxon (Latin): Ic mæg glæs eotan ond hit ne hearmiað me.
-Middle English: Ich canne glas eten and hit hirtiþ me nouÈt.
-English: I can eat glass and it doesn't hurt me.
-English (IPA): [aɪ kæn iËt glÉËs ænd ɪt dÉz nÉt hÉËt miË] (Received Pronunciation)
-English (Braille): â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â ¥â â â â â
-Lalland Scots / Doric: Ah can eat gless, it disnae hurt us.
-Glaswegian: (NEEDED)
-Gothic (4): ð¼ð°ð² ð²ð»ð´ð ð¹Ìðð°ð½, ð½ð¹ ð¼ð¹ð ð
ð¿ ð½ð³ð°ð½ ð±ðð¹ð²ð²ð¹ð¸.
-Old Norse (Runes): áá´ á·áá ááá ᧠á·ááá± áá¾ á¦ááá á¨á§ á¡á á±á§á¨ áá¨á±
-Old Norse (Latin): Ek get etið gler án þess að verða sár.
-Norsk / Norwegian (Nynorsk): Eg kan eta glas utan å skada meg.
-Norsk / Norwegian (Bokmål): Jeg kan spise glass uten å skade meg.
-Føroyskt / Faroese: (NEEDED)
-Ãslenska / Icelandic: Ãg get etið gler án þess að meiða mig.
-Svenska / Swedish: Jag kan äta glas utan att skada mig.
-Dansk / Danish: Jeg kan spise glas, det gør ikke ondt på mig.
-Soenderjysk: à ka æe glass uhen at det go mæ naue.
-Frysk / Frisian: Ik kin glês ite, it docht me net sear.
-Nederlands / Dutch: Ik kan glas eten, het doet mij geen kwaad.
-Kirchröadsj/Bôchesserplat: Iech ken glaas èèse, mer 't deet miech jing pieng.
-Afrikaans: Ek kan glas eet, maar dit doen my nie skade nie.
-Lëtzebuergescht / Luxemburgish: Ech kan Glas iessen, daat deet mir nët wei.
-Deutsch / German: Ich kann Glas essen, ohne mir weh zu tun.
-Ruhrdeutsch: Ich kann Glas verkasematuckeln, ohne dattet mich wat jucken tut.
-Lausitzer Mundart ("Lusatian"): Ich koann Gloos assn und doas dudd merr ni wii.
-Odenwälderisch: Iech konn glaasch voschbachteln ohne dass es mir ebbs daun doun dud.
-Sächsisch / Saxon: 'sch kann Glos essn, ohne dass'sch mer wehtue.
-Pfälzisch: Isch konn Glass fresse ohne dasses mer ebbes ausmache dud.
-Schwäbisch / Swabian: I kå Glas frässa, ond des macht mr nix!
-Bayrisch / Bavarian: I koh Glos esa, und es duard ma ned wei.
-Allemannisch: I kaun Gloos essen, es tuat ma ned weh.
-Schwyzerdütsch: Ich chan Glaas ässe, das tuet mir nöd weeh.
-Hungarian: Meg tudom enni az üveget, nem lesz tÅle bajom.
-Suomi / Finnish: Voin syödä lasia, se ei vahingoita minua.
-Sami (Northern): Sáhtán borrat lása, dat ii leat bávÄÄas.
-Erzian: Ðон ÑÑÑан ÑÑликадо, Ð´Ñ Ð·ÑÑн ÑйÑÑÑÐ½Ð·Ñ Ð° Ñли.
-Karelian: (NEEDED)
-Vepsian: (NEEDED)
-Votian: (NEEDED)
-Livonian: (NEEDED)
-Estonian: Ma võin klaasi süüa, see ei tee mulle midagi.
-Latvian: Es varu Äst stiklu, tas man nekaitÄ.
-Lithuanian: AÅ¡ galiu valgyti stiklÄ
ir jis manÄs nežeidžia
-Old Prussian: (NEEDED)
-Sorbian (Wendish): (NEEDED)
-Czech: Mohu jÃst sklo, neublÞà mi.
-Slovak: Môžem jesť sklo. Nezranà ma.
-Polska / Polish: MogÄ jeÅÄ szkÅo i mi nie szkodzi.
-Slovenian: Lahko jem steklo, ne da bi mi Å¡kodovalo.
-Croatian: Ja mogu jesti staklo i ne boli me.
-Serbian (Latin): Mogu jesti staklo a da mi ne Å¡kodi.
-Serbian (Cyrillic): ÐÐ¾Ð³Ñ ÑеÑÑи ÑÑакло а да ми не Ñкоди.
-Macedonian: Ðожам да Ñадам ÑÑакло, а не ме ÑÑеÑа.
-Russian: Я Ð¼Ð¾Ð³Ñ ÐµÑÑÑ ÑÑекло, оно мне не вÑедиÑ.
-Belarusian (Cyrillic): Я Ð¼Ð°Ð³Ñ ÐµÑÑÑ Ñкло, Ñно мне не ÑкодзÑÑÑ.
-Belarusian (Lacinka): Ja mahu jeÅci Å¡kÅo, jano mne ne Å¡kodziÄ.
-Ukrainian: Я Ð¼Ð¾Ð¶Ñ ÑÑÑи Ñкло, й воно Ð¼ÐµÐ½Ñ Ð½Ðµ поÑкодиÑÑ.
-Bulgarian: Ðога да Ñм ÑÑÑкло, Ñо не ми вÑеди.
-Georgian: ááááá¡ áááá áá áá á áá¢áááá.
-Armenian: Ô¿ÖÕ¶Õ¡Õ´ Õ¡ÕºÕ¡Õ¯Õ« Õ¸ÖÕ¿Õ¥Õ¬ Ö Õ«Õ¶Õ®Õ« Õ¡Õ¶Õ°Õ¡Õ¶Õ£Õ«Õ½Õ¿ Õ¹Õ¨Õ¶Õ¥ÖÖ
-Albanian: Unë mund të ha qelq dhe nuk më gjen gjë.
-Turkish: Cam yiyebilirim, bana zararı dokunmaz.
-Turkish (Ottoman): جاÙ
ÙÙ٠بÙÙرÙ
بÚا ضرر٠طÙÙÙÙÙ
ز
-Bangla / Bengali: à¦à¦®à¦¿ à¦à¦¾à¦à¦ à¦à§à¦¤à§ পারি, তাতৠà¦à¦®à¦¾à¦° à¦à§à¦¨à§ à¦à§à¦·à¦¤à¦¿ হৠনা।
-Marathi: मॠà¤à¤¾à¤ à¤à¤¾à¤ शà¤à¤¤à¥, मला तॠदà¥à¤à¤¤ नाहà¥.
-Hindi: मà¥à¤ à¤à¤¾à¤à¤ à¤à¤¾ सà¤à¤¤à¤¾ हà¥à¤, मà¥à¤à¥ à¤à¤¸ सॠà¤à¥à¤ पà¥à¤¡à¤¾ नहà¥à¤ हà¥à¤¤à¥.
-Tamil: நான௠à®à®£à¯à®£à®¾à®à®¿ à®à®¾à®ªà¯à®ªà®¿à®à¯à®µà¯à®©à¯, à®
தனால௠à®à®©à®à¯à®à¯ à®à®°à¯ à®à¯à®à¯à®®à¯ வராதà¯.
-Urdu(2): Ù
ÛÚº کاÙÚ Ú©Ú¾Ø§ سکتا ÛÙÚº اÙر Ù
Ø¬Ú¾Û ØªÚ©ÙÛÙ ÙÛÛÚº ÛÙØªÛ Û
-Pashto(2): ز٠شÙØ´Ù Ø®ÙÚÙÛ Ø´Ù
Ø Ùغ٠Ù
ا ÙÙ Ø®ÙÚÙÙ
-Farsi / Persian: .Ù
Ù Ù
Û ØªÙاÙÙ
بدÙÙ٠اØساس درد Ø´Ùش٠بخÙرÙ
-Arabic(2): Ø£Ùا Ùادر عÙ٠أÙ٠اÙزجاج Ù Ùذا Ùا ÙؤÙÙ
ÙÙ.
-Aramaic: (NEEDED)
-Hebrew(2): ×× × ×××× ××××× ×××××ת ××× ×× ×××ק ××.
-Yiddish(2): ××× ×§×¢× ×¢×¡× ×××Ö¸× ××× ×¢×¡ ××× ××ר × ××©× ×°×².
-Judeo-Arabic: (NEEDED)
-Ladino: (NEEDED)
-GÇʼÇz: (NEEDED)
-Amharic: (NEEDED)
-Twi: Metumi awe tumpan, ÉnyÉ me hwee.
-Hausa (Latin): InaÌ iya taunar gilaÌshi kuma in gamaÌ laÌfiyaÌ.
-Hausa (Ajami) (2): Ø¥ÙÙا Ø¥ÙÙ٠تÙÙÙÙر غÙÙÙاش٠ÙÙÙ
٠إÙ٠غÙÙ
Ùا ÙÙاÙÙÙÙا
-Yoruba(3): Mo lè jeÌ© dÃgÃ, kò nà pa mà lára.
-(Ki)Swahili: Naweza kula bilauri na sikunyui.
-Malay: Saya boleh makan kaca dan ia tidak mencederakan saya.
-Tagalog: Kaya kong kumain nang bubog at hindi ako masaktan.
-Chamorro: Siña yo' chumocho krestat, ti ha na'lalamen yo'.
-Javanese: Aku isa mangan beling tanpa lara.
-Burmese: (NEEDED)
-Vietnamese (quá»c ngữ): Tôi có thá» Än thủy tinh mà không hại gì.
-Vietnamese (nôm) (4): äº ð£ ä¸ å¹ æ°´ æ¶ ð¦¡ ç©º ð£ 害 å¦
-Khmer: (NEEDED)
-Lao: (NEEDED)
-Thai: à¸à¸±à¸à¸à¸´à¸à¸à¸£à¸°à¸à¸à¹à¸à¹ à¹à¸à¹à¸¡à¸±à¸à¹à¸¡à¹à¸à¸³à¹à¸«à¹à¸à¸±à¸à¹à¸à¹à¸
-Mongolian (Cyrillic): Ðи Ñил идÑй Ñадна, надад Ñ
оÑÑой биÑ
-Mongolian (Classic) (5): á ªá ¢ á °á ¢á ¯á ¢ á ¢á ³á ¡á ¶á ¦ á ´á ¢á ³á á ¨á á á ¨á á ³á ¤á · á ¬á £á ¤á ·á á ³á á ¢ á ªá ¢á °á ¢
-Dzongkha: (NEEDED)
-Nepali: (NEEDED)
-Tibetan: ཤེལà¼à½¦à¾à½¼à¼à½à¼à½à½¦à¼à½à¼à½à¼à½à½²à¼à½à¼à½¢à½ºà½à¼
-Chinese: æè½åä¸ç»çèä¸ä¼¤èº«ä½ã
-Chinese (Traditional): æè½åä¸ç»çèä¸å·èº«é«ã
-Taiwanese(6): Góa Ä-tà ng chiaÌh po-lê, mÄ bÄ tioÌh-siong.
-Japanese: ç§ã¯ã¬ã©ã¹ãé£ã¹ããã¾ããããã¯ç§ãå·ã¤ãã¾ããã
-Korean: ëë ì 리를 먹ì ì ìì´ì. ê·¸ëë ìíì§ ììì
-Bislama: Mi save kakae glas, hemi no save katem mi.
-Hawaiian: Hiki iaÊ»u ke Ê»ai i ke aniani; Ê»aÊ»ole nÅ lÄ au e Ê»eha.
-Marquesan: E koÊ»ana e kai i te karahi, mea Ê»Ä, Ê»aÊ»e hauhau.
-Chinook Jargon: Naika mÉkmÉk kakshÉt labutay, pi weyk ukuk munk-sik nay.
-Navajo: Tsésǫʼ yishÄ
ÌÄ
go bÃÃnÃshghah dóó doo shiÅ neezgai da.
-Cherokee (and Cree, Ojibwa, Inuktitut, and other Native American languages): (NEEDED)
-Garifuna: (NEEDED)
-Gullah: (NEEDED)
-Lojban: mi kakne le nu citka le blaci .iku'i le se go'i na xrani mi
-Nórdicg: LjÅr ye caudran créneþ ý jor cáºran.
diff --git a/contrib/pango-module/Makefile.am b/contrib/pango-module/Makefile.am
deleted file mode 100644
index 9b7df44..0000000
--- a/contrib/pango-module/Makefile.am
+++ /dev/null
@@ -1,20 +0,0 @@
-APP = gedit --new-window GLASS.txt
-
-moduledir = $(LIBDIR)/gtk-2.0/modules
-module_LTLIBRARIES = pk-pango-module.la
-pk_pango_module_la_SOURCES = pk-pango-module.c
-pk_pango_module_la_LIBADD = $(PK_PANGO_MODULE_LIBS)
-pk_pango_module_la_LDFLAGS = -module -avoid-version
-pk_pango_module_la_CFLAGS = $(PK_PANGO_MODULE_CFLAGS)
-
-clean-local:
- rm -f *~
-
-local: all
- GTK_MODULES="$$GTK_MODULES:$$PWD/.libs/pk-pango-module.so" $(APP)
-
-MAINTAINERCLEANFILES = \
- *~ \
- Makefile.in \
- $(NULL)
-
diff --git a/contrib/pango-module/PackageKitPangoModule.schemas.in b/contrib/pango-module/PackageKitPangoModule.schemas.in
deleted file mode 100644
index 431e648..0000000
--- a/contrib/pango-module/PackageKitPangoModule.schemas.in
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0"?>
-<gconfschemafile>
- <schemalist>
- <schema>
- <key>/schemas/apps/gnome_settings_daemon/gtk-modules/PackageKit-pango-module</key>
- <applyto>/apps/gnome_settings_daemon/gtk-modules/PackageKit-pango-module</applyto>
- <owner>PackageKit</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>GTK+ module for font installation</short>
- <long>This key determines if PackageKit should prompt for font installs.</long>
- </locale>
- </schema>
- </schemalist>
-</gconfschemafile>
-
diff --git a/contrib/pango-module/README b/contrib/pango-module/README
deleted file mode 100644
index cf4ac2a..0000000
--- a/contrib/pango-module/README
+++ /dev/null
@@ -1,2 +0,0 @@
-/usr/lib/gtk-2.0/modules/
-
diff --git a/contrib/pango-module/pk-pango-module.c b/contrib/pango-module/pk-pango-module.c
deleted file mode 100644
index 86ee738..0000000
--- a/contrib/pango-module/pk-pango-module.c
+++ /dev/null
@@ -1,316 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2008 Behdad Esfahbod <behdad at behdad.org>
- * Copyright (C) 2008 Richard Hughes <richard at hughsie.com>
- *
- * Licensed under the GNU General Public License Version 2
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#define G_LOG_DOMAIN "MissingFontModule"
-
-#define PANGO_ENABLE_BACKEND
-#include <fontconfig/fontconfig.h>
-#include <pango/pango.h>
-#include <pango/pangofc-fontmap.h>
-#include <pango/pangocairo.h>
-#include <dbus/dbus-glib.h>
-#include <gtk/gtk.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;
-
-#if 0
-/**
- * pk_font_find_window:
- **/
-static void
-pk_font_find_window (GtkWindow *window, GtkWindow **active)
-{
- g_message ("%p=%i", window, gtk_window_has_toplevel_focus (window));
-}
-#endif
-
-/**
- * pk_font_ptr_array_to_strv:
- **/
-gchar **
-pk_font_ptr_array_to_strv (GPtrArray *array)
-{
- gchar **strv_array;
- const gchar *value_temp;
- guint i;
-
- 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);
- }
- strv_array[i] = NULL;
-
- return strv_array;
-}
-
-/**
- * pk_font_not_found:
- **/
-static void
-pk_font_not_found (PangoLanguage *language)
-{
- FcPattern *pat = NULL;
- gchar *tag = NULL;
- const gchar *lang;
-
- /* convert to language */
- lang = pango_language_to_string (language);
- g_message ("lang required '%s'", lang);
- if (lang == NULL || strcmp (lang, "C") == 0)
- goto out;
-
- /* create the font tag used in as a package buildrequire */
- pat = FcPatternCreate ();
- FcPatternAddString (pat, FC_LANG, (FcChar8 *) lang);
- tag = (gchar *) FcNameUnparse (pat);
- if (tag == NULL)
- goto out;
-
- g_message ("tag required '%s'", tag);
-
- /* add to array for processing in idle callback */
- g_ptr_array_add (array, (gpointer) g_strdup (tag));
-
-out:
- if (pat != NULL)
- FcPatternDestroy (pat);
- g_free (tag);
-}
-
-/**
- * pk_font_foreach_callback:
- **/
-static gboolean
-pk_font_foreach_callback (PangoFontset *fontset G_GNUC_UNUSED, PangoFont *font, gpointer data)
-{
- FonsetForeachClosure *closure = data;
- PangoFcFont *fcfont = PANGO_FC_FONT (font);
- const FcPattern *pattern = NULL;
- FcLangSet *langset = NULL;
-
- g_object_get (fcfont, "pattern", &pattern, NULL);
-
- /* old Pango version with non-readable pattern */
- if (pattern == NULL) {
- g_warning ("Old Pango version with non-readable pattern. Skipping auto missing font installation.");
- return closure->found = TRUE;
- }
-
- if (FcPatternGetLangSet (pattern, FC_LANG, 0, &langset) == FcResultMatch &&
- FcLangSetHasLang (langset, (FcChar8 *) closure->language) != FcLangDifferentLang)
- closure->found = TRUE;
-
- return closure->found;
-}
-
-/**
- * pk_font_load_fontset:
- **/
-static PangoFontset *
-pk_font_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);
-
- /* "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"))
- return fontset;
-
- if (G_UNLIKELY (!seen_languages))
- seen_languages = g_hash_table_new (NULL, NULL);
-
- if (G_UNLIKELY (!g_hash_table_lookup (seen_languages, language))) {
- FonsetForeachClosure closure;
-
- g_hash_table_insert (seen_languages, language, language);
-
- closure.language = language;
- closure.found = FALSE;
- pango_fontset_foreach (fontset, pk_font_foreach_callback, &closure);
- if (!closure.found)
- pk_font_not_found (language);
- }
-
- last_language = language;
- return fontset;
-}
-
-/**
- * pk_font_map_class_init:
- **/
-static void
-pk_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;
-}
-
-/**
- * pk_font_overload_type:
- **/
-static GType
-pk_font_overload_type (GType font_map_type)
-{
- GTypeQuery query;
- g_type_query (font_map_type, &query);
-
- return g_type_register_static_simple (font_map_type,
- g_intern_static_string ("MissingFontFontMap"),
- query.class_size,
- (GClassInitFunc) pk_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)
-{
-
- 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;
- gchar **fonts = NULL;
- GError *error = NULL;
-
- /* 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));
-
-#if 0
- GtkWindow *active;
- GList *list;
-
- /* FIXME: try to get the window XID */
- list = gtk_window_list_toplevels ();
- g_warning ("number of windows = %i", g_list_length (list));
- g_list_foreach (list, (GFunc) pk_font_find_window, &active);
-#endif
-
- /* 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);
-
- /* FIXME: get the xid from the calling application */
- xid = 0;
-
- /* 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;
- }
-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;
-}
-
-/**
- * gtk_module_init:
- **/
-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);
-}
-
commit e3c348903044514671a63016be2cc4e2182ab4b7
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Nov 26 17:44:00 2008 +0000
feature: add a Pango module that can be used to automatically install missing fonts
diff --git a/configure.ac b/configure.ac
index ec81ca2..11cf854 100644
--- a/configure.ac
+++ b/configure.ac
@@ -316,6 +316,21 @@ fi
AM_CONDITIONAL(PK_BUILD_GSTREAMER_PLUGIN, test $build_gstreamer_plugin = "yes")
dnl ---------------------------------------------------------------------------
+dnl - Able to build pango module
+dnl ---------------------------------------------------------------------------
+AC_ARG_ENABLE(pango_module, AS_HELP_STRING([--enable-pango-module],[Build pango module functionality]),
+ enable_pango_module=$enableval,enable_pango_module=yes)
+if test x$enable_pango_module = xyes; then
+ PKG_CHECK_MODULES(PK_PANGO_MODULE, gtk+-2.0 pangoft2 fontconfig dbus-glib-1,
+ build_pango_module=yes, build_pango_module=no)
+ AC_SUBST(PK_PANGO_MODULE_CFLAGS)
+ AC_SUBST(PK_PANGO_MODULE_LIBS)
+else
+ build_pango_module=no
+fi
+AM_CONDITIONAL(PK_BUILD_PANGO_MODULE, test $build_pango_module = "yes")
+
+dnl ---------------------------------------------------------------------------
dnl - Other tests
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(gcov, AS_HELP_STRING([--enable-gcov],[compile with coverage profiling instrumentation (gcc only)]),
@@ -579,6 +594,7 @@ docs/api/version.xml
contrib/Makefile
contrib/packagekit-plugin/Makefile
contrib/gstreamer-plugin/Makefile
+contrib/pango-module/Makefile
contrib/udev/Makefile
contrib/yum-packagekit/Makefile
backends/Makefile
@@ -641,6 +657,7 @@ echo "
GIO support: ${with_gio}
Browser plugin: ${build_browser_plugin}
GStreamer plugin: ${build_gstreamer_plugin}
+ Pango module: ${build_pango_module}
QT library: ${build_qt}
Backends:
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index 756855a..d5e7b12 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -12,6 +12,10 @@ if PK_BUILD_GSTREAMER_PLUGIN
SUBDIRS += gstreamer-plugin
endif
+if PK_BUILD_PANGO_MODULE
+SUBDIRS += pango-module
+endif
+
bashcompletiondir = ${SYSCONFDIR}/bash_completion.d
dist_bashcompletion_DATA = pk-completion.bash
diff --git a/contrib/pango-module/.gitignore b/contrib/pango-module/.gitignore
new file mode 100644
index 0000000..60a9816
--- /dev/null
+++ b/contrib/pango-module/.gitignore
@@ -0,0 +1,6 @@
+.deps
+.libs
+*.o
+*.la
+*.lo
+
diff --git a/contrib/pango-module/GLASS.txt b/contrib/pango-module/GLASS.txt
new file mode 100644
index 0000000..610b595
--- /dev/null
+++ b/contrib/pango-module/GLASS.txt
@@ -0,0 +1,170 @@
+I Can Eat Glass
+In various languages
+
+Adopted from http://www.columbia.edu/kermit/utf8.html#glass
+Do not edit. Submit additions to the URL above and resynch.
+
+Permission is granted by the Kermit project (http://www.columbia.edu/kermit/)
+to redistribute this file, with absolutely no warranty.
+
+
+
+Sanskrit: à¤à¤¾à¤à¤ शà¤à¥à¤¨à¥à¤®à¥à¤¯à¤¤à¥à¤¤à¥à¤®à¥ । नà¥à¤ªà¤¹à¤¿à¤¨à¤¸à¥à¤¤à¤¿ मामॠ॥
+Sanskrit (standard transcription): kÄcaá¹ Åaknomyattum; nopahinasti mÄm.
+Classical Greek: á½Î±Î»Î¿Î½ Ïαγεá¿Î½ δύναμαιΠÏοῦÏο οὠμε βλάÏÏει.
+Greek: ÎÏοÏÏ Î½Î± ÏÎ¬Ï ÏÏαÏμÎνα γÏ
αλιά ÏÏÏÎ¯Ï Î½Î± ÏÎ¬Î¸Ï ÏίÏοÏα.
+Etruscan: (NEEDED)
+Latin: Vitrum edere possum; mihi non nocet.
+Old French: Je puis mangier del voirre. Ne me nuit.
+French: Je peux manger du verre, ça ne me fait pas de mal.
+Provençal / Occitan: Pòdi manjar de veire, me nafrariá pas.
+Québécois: J'peux manger d'la vitre, ça m'fa pas mal.
+Walloon: Dji pou magnî do vêre, çoula m' freut nén må.
+Champenois: (NEEDED)
+Lorrain: (NEEDED)
+Picard: Ch'peux mingi du verre, cha m'foé mie n'ma.
+Corsican: (NEEDED)
+Kreyòl Ayisyen: Mwen kap manje vè, li pa blese'm.
+Basque: Kristala jan dezaket, ez dit minik ematen.
+Catalan: Puc menjar vidre que no em fa mal.
+Spanish: Puedo comer vidrio, no me hace daño.
+Aragones: Puedo minchar beire, no me'n fa mal .
+Galician: Eu podo xantar cristais e non cortarme.
+Portuguese: Posso comer vidro, não me faz mal.
+Brazilian Portuguese (7): Posso comer vidro, não me machuca.
+Caboverdiano: M' podê cumê vidru, ca ta maguâ-m'.
+Papiamentu: Ami por kome glas anto e no ta hasimi daño.
+Italian: Posso mangiare il vetro e non mi fa male.
+Milanese: Sôn bôn de magnà el véder, el me fa minga mal.
+Roman: Me posso magna' er vetro, e nun me fa male.
+Napoletano: M' pozz magna' o'vetr, e nun m' fa mal.
+Sicilian: Puotsu mangiari u vitru, nun mi fa mali.
+Venetian: Mi posso magnare el vetro, no'l me fa mae.
+Zeneise (Genovese): Pòsso mangiâ o veddro e o no me fà mâ.
+Rheto-Romance / Romansch: (NEEDED)
+Romany / Tsigane: (NEEDED)
+Romanian: Pot sÄ mÄnânc sticlÄ Èi ea nu mÄ rÄneÈte.
+Esperanto: Mi povas manÄi vitron, Äi ne damaÄas min.
+Pictish: (NEEDED)
+Breton: (NEEDED)
+Cornish: Mý a yl dybry gwéder hag éf ny wra ow ankenya.
+Welsh: Dw i'n gallu bwyta gwydr, 'dyw e ddim yn gwneud dolur i mi.
+Manx Gaelic: Foddym gee glonney agh cha jean eh gortaghey mee.
+Old Irish (Ogham): ááááá
áááááááááááááá
ááá
ááááá
áá
+Old Irish (Latin): Con·iccim ithi nglano. NÃm·géna.
+Irish: Is féidir liom gloinne a ithe. Nà dhéanann sà dochar ar bith dom.
+Scottish Gaelic: S urrainn dhomh gloinne ithe; cha ghoirtich i mi.
+Anglo-Saxon (Runes): áá³á«áá¨á·á«á·áá¨áá«áá©ááªá¾á«á©á¾áá«á»ááá«á¾áá«á»ááªá±áááªá§á«ááá¬
+Anglo-Saxon (Latin): Ic mæg glæs eotan ond hit ne hearmiað me.
+Middle English: Ich canne glas eten and hit hirtiþ me nouÈt.
+English: I can eat glass and it doesn't hurt me.
+English (IPA): [aɪ kæn iËt glÉËs ænd ɪt dÉz nÉt hÉËt miË] (Received Pronunciation)
+English (Braille): â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â ¥â â â â â
+Lalland Scots / Doric: Ah can eat gless, it disnae hurt us.
+Glaswegian: (NEEDED)
+Gothic (4): ð¼ð°ð² ð²ð»ð´ð ð¹Ìðð°ð½, ð½ð¹ ð¼ð¹ð ð
ð¿ ð½ð³ð°ð½ ð±ðð¹ð²ð²ð¹ð¸.
+Old Norse (Runes): áá´ á·áá ááá ᧠á·ááá± áá¾ á¦ááá á¨á§ á¡á á±á§á¨ áá¨á±
+Old Norse (Latin): Ek get etið gler án þess að verða sár.
+Norsk / Norwegian (Nynorsk): Eg kan eta glas utan å skada meg.
+Norsk / Norwegian (Bokmål): Jeg kan spise glass uten å skade meg.
+Føroyskt / Faroese: (NEEDED)
+Ãslenska / Icelandic: Ãg get etið gler án þess að meiða mig.
+Svenska / Swedish: Jag kan äta glas utan att skada mig.
+Dansk / Danish: Jeg kan spise glas, det gør ikke ondt på mig.
+Soenderjysk: à ka æe glass uhen at det go mæ naue.
+Frysk / Frisian: Ik kin glês ite, it docht me net sear.
+Nederlands / Dutch: Ik kan glas eten, het doet mij geen kwaad.
+Kirchröadsj/Bôchesserplat: Iech ken glaas èèse, mer 't deet miech jing pieng.
+Afrikaans: Ek kan glas eet, maar dit doen my nie skade nie.
+Lëtzebuergescht / Luxemburgish: Ech kan Glas iessen, daat deet mir nët wei.
+Deutsch / German: Ich kann Glas essen, ohne mir weh zu tun.
+Ruhrdeutsch: Ich kann Glas verkasematuckeln, ohne dattet mich wat jucken tut.
+Lausitzer Mundart ("Lusatian"): Ich koann Gloos assn und doas dudd merr ni wii.
+Odenwälderisch: Iech konn glaasch voschbachteln ohne dass es mir ebbs daun doun dud.
+Sächsisch / Saxon: 'sch kann Glos essn, ohne dass'sch mer wehtue.
+Pfälzisch: Isch konn Glass fresse ohne dasses mer ebbes ausmache dud.
+Schwäbisch / Swabian: I kå Glas frässa, ond des macht mr nix!
+Bayrisch / Bavarian: I koh Glos esa, und es duard ma ned wei.
+Allemannisch: I kaun Gloos essen, es tuat ma ned weh.
+Schwyzerdütsch: Ich chan Glaas ässe, das tuet mir nöd weeh.
+Hungarian: Meg tudom enni az üveget, nem lesz tÅle bajom.
+Suomi / Finnish: Voin syödä lasia, se ei vahingoita minua.
+Sami (Northern): Sáhtán borrat lása, dat ii leat bávÄÄas.
+Erzian: Ðон ÑÑÑан ÑÑликадо, Ð´Ñ Ð·ÑÑн ÑйÑÑÑÐ½Ð·Ñ Ð° Ñли.
+Karelian: (NEEDED)
+Vepsian: (NEEDED)
+Votian: (NEEDED)
+Livonian: (NEEDED)
+Estonian: Ma võin klaasi süüa, see ei tee mulle midagi.
+Latvian: Es varu Äst stiklu, tas man nekaitÄ.
+Lithuanian: AÅ¡ galiu valgyti stiklÄ
ir jis manÄs nežeidžia
+Old Prussian: (NEEDED)
+Sorbian (Wendish): (NEEDED)
+Czech: Mohu jÃst sklo, neublÞà mi.
+Slovak: Môžem jesť sklo. Nezranà ma.
+Polska / Polish: MogÄ jeÅÄ szkÅo i mi nie szkodzi.
+Slovenian: Lahko jem steklo, ne da bi mi Å¡kodovalo.
+Croatian: Ja mogu jesti staklo i ne boli me.
+Serbian (Latin): Mogu jesti staklo a da mi ne Å¡kodi.
+Serbian (Cyrillic): ÐÐ¾Ð³Ñ ÑеÑÑи ÑÑакло а да ми не Ñкоди.
+Macedonian: Ðожам да Ñадам ÑÑакло, а не ме ÑÑеÑа.
+Russian: Я Ð¼Ð¾Ð³Ñ ÐµÑÑÑ ÑÑекло, оно мне не вÑедиÑ.
+Belarusian (Cyrillic): Я Ð¼Ð°Ð³Ñ ÐµÑÑÑ Ñкло, Ñно мне не ÑкодзÑÑÑ.
+Belarusian (Lacinka): Ja mahu jeÅci Å¡kÅo, jano mne ne Å¡kodziÄ.
+Ukrainian: Я Ð¼Ð¾Ð¶Ñ ÑÑÑи Ñкло, й воно Ð¼ÐµÐ½Ñ Ð½Ðµ поÑкодиÑÑ.
+Bulgarian: Ðога да Ñм ÑÑÑкло, Ñо не ми вÑеди.
+Georgian: ááááá¡ áááá áá áá á áá¢áááá.
+Armenian: Ô¿ÖÕ¶Õ¡Õ´ Õ¡ÕºÕ¡Õ¯Õ« Õ¸ÖÕ¿Õ¥Õ¬ Ö Õ«Õ¶Õ®Õ« Õ¡Õ¶Õ°Õ¡Õ¶Õ£Õ«Õ½Õ¿ Õ¹Õ¨Õ¶Õ¥ÖÖ
+Albanian: Unë mund të ha qelq dhe nuk më gjen gjë.
+Turkish: Cam yiyebilirim, bana zararı dokunmaz.
+Turkish (Ottoman): جاÙ
ÙÙ٠بÙÙرÙ
بÚا ضرر٠طÙÙÙÙÙ
ز
+Bangla / Bengali: à¦à¦®à¦¿ à¦à¦¾à¦à¦ à¦à§à¦¤à§ পারি, তাতৠà¦à¦®à¦¾à¦° à¦à§à¦¨à§ à¦à§à¦·à¦¤à¦¿ হৠনা।
+Marathi: मॠà¤à¤¾à¤ à¤à¤¾à¤ शà¤à¤¤à¥, मला तॠदà¥à¤à¤¤ नाहà¥.
+Hindi: मà¥à¤ à¤à¤¾à¤à¤ à¤à¤¾ सà¤à¤¤à¤¾ हà¥à¤, मà¥à¤à¥ à¤à¤¸ सॠà¤à¥à¤ पà¥à¤¡à¤¾ नहà¥à¤ हà¥à¤¤à¥.
+Tamil: நான௠à®à®£à¯à®£à®¾à®à®¿ à®à®¾à®ªà¯à®ªà®¿à®à¯à®µà¯à®©à¯, à®
தனால௠à®à®©à®à¯à®à¯ à®à®°à¯ à®à¯à®à¯à®®à¯ வராதà¯.
+Urdu(2): Ù
ÛÚº کاÙÚ Ú©Ú¾Ø§ سکتا ÛÙÚº اÙر Ù
Ø¬Ú¾Û ØªÚ©ÙÛÙ ÙÛÛÚº ÛÙØªÛ Û
+Pashto(2): ز٠شÙØ´Ù Ø®ÙÚÙÛ Ø´Ù
Ø Ùغ٠Ù
ا ÙÙ Ø®ÙÚÙÙ
+Farsi / Persian: .Ù
Ù Ù
Û ØªÙاÙÙ
بدÙÙ٠اØساس درد Ø´Ùش٠بخÙرÙ
+Arabic(2): Ø£Ùا Ùادر عÙ٠أÙ٠اÙزجاج Ù Ùذا Ùا ÙؤÙÙ
ÙÙ.
+Aramaic: (NEEDED)
+Hebrew(2): ×× × ×××× ××××× ×××××ת ××× ×× ×××ק ××.
+Yiddish(2): ××× ×§×¢× ×¢×¡× ×××Ö¸× ××× ×¢×¡ ××× ××ר × ××©× ×°×².
+Judeo-Arabic: (NEEDED)
+Ladino: (NEEDED)
+GÇʼÇz: (NEEDED)
+Amharic: (NEEDED)
+Twi: Metumi awe tumpan, ÉnyÉ me hwee.
+Hausa (Latin): InaÌ iya taunar gilaÌshi kuma in gamaÌ laÌfiyaÌ.
+Hausa (Ajami) (2): Ø¥ÙÙا Ø¥ÙÙ٠تÙÙÙÙر غÙÙÙاش٠ÙÙÙ
٠إÙ٠غÙÙ
Ùا ÙÙاÙÙÙÙا
+Yoruba(3): Mo lè jeÌ© dÃgÃ, kò nà pa mà lára.
+(Ki)Swahili: Naweza kula bilauri na sikunyui.
+Malay: Saya boleh makan kaca dan ia tidak mencederakan saya.
+Tagalog: Kaya kong kumain nang bubog at hindi ako masaktan.
+Chamorro: Siña yo' chumocho krestat, ti ha na'lalamen yo'.
+Javanese: Aku isa mangan beling tanpa lara.
+Burmese: (NEEDED)
+Vietnamese (quá»c ngữ): Tôi có thá» Än thủy tinh mà không hại gì.
+Vietnamese (nôm) (4): äº ð£ ä¸ å¹ æ°´ æ¶ ð¦¡ ç©º ð£ 害 å¦
+Khmer: (NEEDED)
+Lao: (NEEDED)
+Thai: à¸à¸±à¸à¸à¸´à¸à¸à¸£à¸°à¸à¸à¹à¸à¹ à¹à¸à¹à¸¡à¸±à¸à¹à¸¡à¹à¸à¸³à¹à¸«à¹à¸à¸±à¸à¹à¸à¹à¸
+Mongolian (Cyrillic): Ðи Ñил идÑй Ñадна, надад Ñ
оÑÑой биÑ
+Mongolian (Classic) (5): á ªá ¢ á °á ¢á ¯á ¢ á ¢á ³á ¡á ¶á ¦ á ´á ¢á ³á á ¨á á á ¨á á ³á ¤á · á ¬á £á ¤á ·á á ³á á ¢ á ªá ¢á °á ¢
+Dzongkha: (NEEDED)
+Nepali: (NEEDED)
+Tibetan: ཤེལà¼à½¦à¾à½¼à¼à½à¼à½à½¦à¼à½à¼à½à¼à½à½²à¼à½à¼à½¢à½ºà½à¼
+Chinese: æè½åä¸ç»çèä¸ä¼¤èº«ä½ã
+Chinese (Traditional): æè½åä¸ç»çèä¸å·èº«é«ã
+Taiwanese(6): Góa Ä-tà ng chiaÌh po-lê, mÄ bÄ tioÌh-siong.
+Japanese: ç§ã¯ã¬ã©ã¹ãé£ã¹ããã¾ããããã¯ç§ãå·ã¤ãã¾ããã
+Korean: ëë ì 리를 먹ì ì ìì´ì. ê·¸ëë ìíì§ ììì
+Bislama: Mi save kakae glas, hemi no save katem mi.
+Hawaiian: Hiki iaÊ»u ke Ê»ai i ke aniani; Ê»aÊ»ole nÅ lÄ au e Ê»eha.
+Marquesan: E koÊ»ana e kai i te karahi, mea Ê»Ä, Ê»aÊ»e hauhau.
+Chinook Jargon: Naika mÉkmÉk kakshÉt labutay, pi weyk ukuk munk-sik nay.
+Navajo: Tsésǫʼ yishÄ
ÌÄ
go bÃÃnÃshghah dóó doo shiÅ neezgai da.
+Cherokee (and Cree, Ojibwa, Inuktitut, and other Native American languages): (NEEDED)
+Garifuna: (NEEDED)
+Gullah: (NEEDED)
+Lojban: mi kakne le nu citka le blaci .iku'i le se go'i na xrani mi
+Nórdicg: LjÅr ye caudran créneþ ý jor cáºran.
diff --git a/contrib/pango-module/Makefile.am b/contrib/pango-module/Makefile.am
new file mode 100644
index 0000000..9b7df44
--- /dev/null
+++ b/contrib/pango-module/Makefile.am
@@ -0,0 +1,20 @@
+APP = gedit --new-window GLASS.txt
+
+moduledir = $(LIBDIR)/gtk-2.0/modules
+module_LTLIBRARIES = pk-pango-module.la
+pk_pango_module_la_SOURCES = pk-pango-module.c
+pk_pango_module_la_LIBADD = $(PK_PANGO_MODULE_LIBS)
+pk_pango_module_la_LDFLAGS = -module -avoid-version
+pk_pango_module_la_CFLAGS = $(PK_PANGO_MODULE_CFLAGS)
+
+clean-local:
+ rm -f *~
+
+local: all
+ GTK_MODULES="$$GTK_MODULES:$$PWD/.libs/pk-pango-module.so" $(APP)
+
+MAINTAINERCLEANFILES = \
+ *~ \
+ Makefile.in \
+ $(NULL)
+
diff --git a/contrib/pango-module/PackageKitPangoModule.schemas.in b/contrib/pango-module/PackageKitPangoModule.schemas.in
new file mode 100644
index 0000000..431e648
--- /dev/null
+++ b/contrib/pango-module/PackageKitPangoModule.schemas.in
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<gconfschemafile>
+ <schemalist>
+ <schema>
+ <key>/schemas/apps/gnome_settings_daemon/gtk-modules/PackageKit-pango-module</key>
+ <applyto>/apps/gnome_settings_daemon/gtk-modules/PackageKit-pango-module</applyto>
+ <owner>PackageKit</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short>GTK+ module for font installation</short>
+ <long>This key determines if PackageKit should prompt for font installs.</long>
+ </locale>
+ </schema>
+ </schemalist>
+</gconfschemafile>
+
diff --git a/contrib/pango-module/README b/contrib/pango-module/README
new file mode 100644
index 0000000..cf4ac2a
--- /dev/null
+++ b/contrib/pango-module/README
@@ -0,0 +1,2 @@
+/usr/lib/gtk-2.0/modules/
+
diff --git a/contrib/pango-module/pk-pango-module.c b/contrib/pango-module/pk-pango-module.c
new file mode 100644
index 0000000..86ee738
--- /dev/null
+++ b/contrib/pango-module/pk-pango-module.c
@@ -0,0 +1,316 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2008 Behdad Esfahbod <behdad at behdad.org>
+ * Copyright (C) 2008 Richard Hughes <richard at hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#define G_LOG_DOMAIN "MissingFontModule"
+
+#define PANGO_ENABLE_BACKEND
+#include <fontconfig/fontconfig.h>
+#include <pango/pango.h>
+#include <pango/pangofc-fontmap.h>
+#include <pango/pangocairo.h>
+#include <dbus/dbus-glib.h>
+#include <gtk/gtk.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;
+
+#if 0
+/**
+ * pk_font_find_window:
+ **/
+static void
+pk_font_find_window (GtkWindow *window, GtkWindow **active)
+{
+ g_message ("%p=%i", window, gtk_window_has_toplevel_focus (window));
+}
+#endif
+
+/**
+ * pk_font_ptr_array_to_strv:
+ **/
+gchar **
+pk_font_ptr_array_to_strv (GPtrArray *array)
+{
+ gchar **strv_array;
+ const gchar *value_temp;
+ guint i;
+
+ 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);
+ }
+ strv_array[i] = NULL;
+
+ return strv_array;
+}
+
+/**
+ * pk_font_not_found:
+ **/
+static void
+pk_font_not_found (PangoLanguage *language)
+{
+ FcPattern *pat = NULL;
+ gchar *tag = NULL;
+ const gchar *lang;
+
+ /* convert to language */
+ lang = pango_language_to_string (language);
+ g_message ("lang required '%s'", lang);
+ if (lang == NULL || strcmp (lang, "C") == 0)
+ goto out;
+
+ /* create the font tag used in as a package buildrequire */
+ pat = FcPatternCreate ();
+ FcPatternAddString (pat, FC_LANG, (FcChar8 *) lang);
+ tag = (gchar *) FcNameUnparse (pat);
+ if (tag == NULL)
+ goto out;
+
+ g_message ("tag required '%s'", tag);
+
+ /* add to array for processing in idle callback */
+ g_ptr_array_add (array, (gpointer) g_strdup (tag));
+
+out:
+ if (pat != NULL)
+ FcPatternDestroy (pat);
+ g_free (tag);
+}
+
+/**
+ * pk_font_foreach_callback:
+ **/
+static gboolean
+pk_font_foreach_callback (PangoFontset *fontset G_GNUC_UNUSED, PangoFont *font, gpointer data)
+{
+ FonsetForeachClosure *closure = data;
+ PangoFcFont *fcfont = PANGO_FC_FONT (font);
+ const FcPattern *pattern = NULL;
+ FcLangSet *langset = NULL;
+
+ g_object_get (fcfont, "pattern", &pattern, NULL);
+
+ /* old Pango version with non-readable pattern */
+ if (pattern == NULL) {
+ g_warning ("Old Pango version with non-readable pattern. Skipping auto missing font installation.");
+ return closure->found = TRUE;
+ }
+
+ if (FcPatternGetLangSet (pattern, FC_LANG, 0, &langset) == FcResultMatch &&
+ FcLangSetHasLang (langset, (FcChar8 *) closure->language) != FcLangDifferentLang)
+ closure->found = TRUE;
+
+ return closure->found;
+}
+
+/**
+ * pk_font_load_fontset:
+ **/
+static PangoFontset *
+pk_font_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);
+
+ /* "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"))
+ return fontset;
+
+ if (G_UNLIKELY (!seen_languages))
+ seen_languages = g_hash_table_new (NULL, NULL);
+
+ if (G_UNLIKELY (!g_hash_table_lookup (seen_languages, language))) {
+ FonsetForeachClosure closure;
+
+ g_hash_table_insert (seen_languages, language, language);
+
+ closure.language = language;
+ closure.found = FALSE;
+ pango_fontset_foreach (fontset, pk_font_foreach_callback, &closure);
+ if (!closure.found)
+ pk_font_not_found (language);
+ }
+
+ last_language = language;
+ return fontset;
+}
+
+/**
+ * pk_font_map_class_init:
+ **/
+static void
+pk_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;
+}
+
+/**
+ * pk_font_overload_type:
+ **/
+static GType
+pk_font_overload_type (GType font_map_type)
+{
+ GTypeQuery query;
+ g_type_query (font_map_type, &query);
+
+ return g_type_register_static_simple (font_map_type,
+ g_intern_static_string ("MissingFontFontMap"),
+ query.class_size,
+ (GClassInitFunc) pk_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)
+{
+
+ 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;
+ gchar **fonts = NULL;
+ GError *error = NULL;
+
+ /* 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));
+
+#if 0
+ GtkWindow *active;
+ GList *list;
+
+ /* FIXME: try to get the window XID */
+ list = gtk_window_list_toplevels ();
+ g_warning ("number of windows = %i", g_list_length (list));
+ g_list_foreach (list, (GFunc) pk_font_find_window, &active);
+#endif
+
+ /* 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);
+
+ /* FIXME: get the xid from the calling application */
+ xid = 0;
+
+ /* 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;
+ }
+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;
+}
+
+/**
+ * gtk_module_init:
+ **/
+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);
+}
+
commit 0bc5b22217cad99199d015eb286f8791fd839bba
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Nov 26 12:10:07 2008 +0000
bugfix: don't emit a critical warning if g_desktop_app_info_new_from_filename() returns an error
diff --git a/src/pk-post-trans.c b/src/pk-post-trans.c
index 9958b06..68d2752 100644
--- a/src/pk-post-trans.c
+++ b/src/pk-post-trans.c
@@ -224,14 +224,18 @@ pk_post_trans_sqlite_add_filename_details (PkPostTrans *post, const gchar *filen
gchar *statement;
gchar *error_msg = NULL;
sqlite3_stmt *sql_statement = NULL;
- gint rc;
+ gint rc = -1;
gint show = TRUE;
#ifdef PK_BUILD_GIO
- GAppInfo *info;
+ GDesktopAppInfo *info;
/* find out if we should show desktop file in menus */
- info = G_APP_INFO(g_desktop_app_info_new_from_filename (filename));
- show = g_app_info_should_show (info);
+ info = g_desktop_app_info_new_from_filename (filename);
+ if (info == NULL) {
+ egg_warning ("could not load desktop file %s", filename);
+ goto out;
+ }
+ show = g_app_info_should_show (G_APP_INFO(info));
g_object_unref (info);
#endif
commit 15f831542005113d5daed328c41eab2d47615cfa
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Nov 26 11:30:10 2008 +0000
trivial: update RELEASE files with new cgi URLs
diff --git a/RELEASE b/RELEASE
index 8e7e198..7a8f7f9 100644
--- a/RELEASE
+++ b/RELEASE
@@ -48,9 +48,9 @@ Subject: PackageKit and gnome-packagekit 0.4.0 released!
Today I released PackageKit and gnome-packagekit 0.4.0.
-PackageKit release notes: http://gitweb.freedesktop.org/?p=packagekit.git;a=blob;f=NEWS
+PackageKit release notes: http://cgit.freedesktop.org/packagekit/tree/NEWS
-gnome-packagekit release notes: http://gitweb.freedesktop.org/?p=users/hughsient/gnome-packagekit.git;a=blob;f=NEWS
+gnome-packagekit release notes: http://cgit.freedesktop.org/~hughsient/gnome-packagekit/tree/NEWS
Tarballs available here: http://www.packagekit.org/releases/
commit 4020a1928beccb299d2fa685100746c7a0312b8c
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Nov 25 10:04:45 2008 +0000
bugfix: fix a small memory leak in pk_backend_package()
diff --git a/src/pk-backend.c b/src/pk-backend.c
index 88e5ec7..5913ed4 100644
--- a/src/pk-backend.c
+++ b/src/pk-backend.c
@@ -780,9 +780,9 @@ pk_backend_get_status (PkBackend *backend)
gboolean
pk_backend_package (PkBackend *backend, PkInfoEnum info, const gchar *package_id, const gchar *summary)
{
- gchar *summary_safe;
- PkPackageObj *obj;
- PkPackageId *id;
+ gchar *summary_safe = NULL;
+ PkPackageObj *obj = NULL;
+ PkPackageId *id = NULL;
gboolean ret;
g_return_val_if_fail (PK_IS_BACKEND (backend), FALSE);
@@ -793,7 +793,7 @@ pk_backend_package (PkBackend *backend, PkInfoEnum info, const gchar *package_id
ret = pk_package_id_check (package_id);
if (!ret) {
egg_warning ("package_id invalid and cannot be processed: %s", package_id);
- return FALSE;
+ goto out;
}
/* replace unsafe chars */
@@ -806,8 +806,10 @@ pk_backend_package (PkBackend *backend, PkInfoEnum info, const gchar *package_id
if (ret) {
pk_package_obj_free (obj);
egg_debug ("skipping duplicate %s", package_id);
- return FALSE;
+ ret = FALSE;
+ goto out;
}
+
/* update the 'last' package */
pk_package_obj_free (backend->priv->last_package);
backend->priv->last_package = pk_package_obj_copy (obj);
@@ -815,23 +817,23 @@ pk_backend_package (PkBackend *backend, PkInfoEnum info, const gchar *package_id
/* have we already set an error? */
if (backend->priv->set_error) {
egg_warning ("already set error, cannot process: package %s", package_id);
- return FALSE;
+ ret = FALSE;
+ goto out;
}
/* we automatically set the transaction status for some infos */
- if (info == PK_INFO_ENUM_DOWNLOADING) {
+ if (info == PK_INFO_ENUM_DOWNLOADING)
pk_backend_set_status (backend, PK_STATUS_ENUM_DOWNLOAD);
- } else if (info == PK_INFO_ENUM_UPDATING) {
+ else if (info == PK_INFO_ENUM_UPDATING)
pk_backend_set_status (backend, PK_STATUS_ENUM_UPDATE);
- } else if (info == PK_INFO_ENUM_INSTALLING) {
+ else if (info == PK_INFO_ENUM_INSTALLING)
pk_backend_set_status (backend, PK_STATUS_ENUM_INSTALL);
- } else if (info == PK_INFO_ENUM_REMOVING) {
+ else if (info == PK_INFO_ENUM_REMOVING)
pk_backend_set_status (backend, PK_STATUS_ENUM_REMOVE);
- } else if (info == PK_INFO_ENUM_CLEANUP) {
+ else if (info == PK_INFO_ENUM_CLEANUP)
pk_backend_set_status (backend, PK_STATUS_ENUM_CLEANUP);
- } else if (info == PK_INFO_ENUM_OBSOLETING) {
+ else if (info == PK_INFO_ENUM_OBSOLETING)
pk_backend_set_status (backend, PK_STATUS_ENUM_OBSOLETE);
- }
/* we've sent a package for this transaction */
backend->priv->has_sent_package = TRUE;
@@ -839,10 +841,13 @@ pk_backend_package (PkBackend *backend, PkInfoEnum info, const gchar *package_id
egg_debug ("emit package %s, %s, %s", pk_info_enum_to_text (info), package_id, summary_safe);
g_signal_emit (backend, signals [PK_BACKEND_PACKAGE], 0, obj);
+ /* success */
+ ret = TRUE;
+out:
pk_package_id_free (id);
pk_package_obj_free (obj);
g_free (summary_safe);
- return TRUE;
+ return ret;
}
/**
commit 2f8ac47697b45269ddd3fdfe0b2eb638c8b856c8
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Nov 25 10:03:22 2008 +0000
bugfix: fix a small memory leak in pk_transaction_action_is_allowed()
diff --git a/src/pk-transaction.c b/src/pk-transaction.c
index 585de05..8b4e065 100644
--- a/src/pk-transaction.c
+++ b/src/pk-transaction.c
@@ -1402,8 +1402,10 @@ pk_transaction_action_is_allowed (PkTransaction *transaction, gboolean trusted,
/* use security model to get auth */
ret = pk_security_action_is_allowed (transaction->priv->security, transaction->priv->caller, trusted, role, &error_detail);
- if (!ret)
+ if (!ret) {
*error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_REFUSED_BY_POLICY, "%s", error_detail);
+ g_free (error_detail);
+ }
return ret;
}
commit eb2cd7993f7c2f810f91d068050376c1294a9f6b
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Nov 25 09:55:58 2008 +0000
trivial: free a tiny memory leak in the transaction code
diff --git a/src/pk-transaction.c b/src/pk-transaction.c
index 60608ee..585de05 100644
--- a/src/pk-transaction.c
+++ b/src/pk-transaction.c
@@ -3947,6 +3947,7 @@ pk_transaction_finalize (GObject *object)
g_free (transaction->priv->cached_parameter);
g_free (transaction->priv->cached_value);
g_free (transaction->priv->tid);
+ g_free (transaction->priv->sender);
/* remove any inhibit, it's okay to call this function when it's not needed */
pk_inhibit_remove (transaction->priv->inhibit, transaction);
commit 39c3022f1abb2d34b8bda95f082bf0266f470655
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Nov 25 09:55:19 2008 +0000
trivial: do the check for the context NULL in one place only
diff --git a/src/pk-transaction.c b/src/pk-transaction.c
index ddcccfd..60608ee 100644
--- a/src/pk-transaction.c
+++ b/src/pk-transaction.c
@@ -1425,17 +1425,14 @@ pk_transaction_priv_get_role (PkTransaction *transaction)
static gboolean
pk_transaction_verify_sender (PkTransaction *transaction, DBusGMethodInvocation *context, GError **error)
{
- gboolean ret = FALSE;
+ gboolean ret = TRUE;
gchar *sender = NULL;
g_return_val_if_fail (transaction->priv->sender != NULL, FALSE);
/* not set inside the test suite */
- if (context == NULL) {
- *error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_REFUSED_BY_POLICY,
- "context not available for sender %s", transaction->priv->sender);
+ if (context == NULL)
goto out;
- }
/* check is the same as the sender that did GetTid */
sender = dbus_g_method_get_sender (context);
@@ -1451,6 +1448,33 @@ out:
}
/**
+ * pk_transaction_dbus_return_error:
+ **/
+void
+pk_transaction_dbus_return_error (DBusGMethodInvocation *context, GError *error)
+{
+ /* not set inside the test suite */
+ if (context == NULL) {
+ egg_warning ("context null, and error: %s", error->message);
+ g_error_free (error);
+ return;
+ }
+ dbus_g_method_return_error (context, error);
+}
+
+/**
+ * pk_transaction_dbus_return:
+ **/
+void
+pk_transaction_dbus_return (DBusGMethodInvocation *context)
+{
+ /* not set inside the test suite */
+ if (context == NULL)
+ return;
+ dbus_g_method_return (context);
+}
+
+/**
* pk_transaction_accept_eula:
*
* This should be called when a eula_id needs to be added into an internal db.
@@ -1468,7 +1492,7 @@ pk_transaction_accept_eula (PkTransaction *transaction, const gchar *eula_id, DB
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1478,7 +1502,7 @@ pk_transaction_accept_eula (PkTransaction *transaction, const gchar *eula_id, DB
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_INPUT_INVALID,
"Invalid input passed to daemon");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1486,7 +1510,7 @@ pk_transaction_accept_eula (PkTransaction *transaction, const gchar *eula_id, DB
ret = pk_transaction_action_is_allowed (transaction, FALSE, PK_ROLE_ENUM_ACCEPT_EULA, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1496,16 +1520,15 @@ pk_transaction_accept_eula (PkTransaction *transaction, const gchar *eula_id, DB
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_INPUT_INVALID,
"EULA failed to be added");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
/* we are done */
g_idle_add ((GSourceFunc) pk_transaction_finished_idle_cb, transaction);
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -1529,7 +1552,7 @@ pk_transaction_cancel (PkTransaction *transaction, DBusGMethodInvocation *contex
if (transaction->priv->backend->desc->cancel == NULL) {
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"Cancel not yet supported by backend");
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1542,7 +1565,7 @@ pk_transaction_cancel (PkTransaction *transaction, DBusGMethodInvocation *contex
/* check to see if we have an action */
if (transaction->priv->role == PK_ROLE_ENUM_UNKNOWN) {
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NO_ROLE, "No role");
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1550,7 +1573,7 @@ pk_transaction_cancel (PkTransaction *transaction, DBusGMethodInvocation *contex
if (!transaction->priv->allow_cancel) {
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_CANNOT_CANCEL,
"Tried to cancel a transaction that is not safe to kill");
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1558,7 +1581,7 @@ pk_transaction_cancel (PkTransaction *transaction, DBusGMethodInvocation *contex
if (transaction->priv->uid == PK_SECURITY_UID_INVALID) {
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_CANNOT_CANCEL,
"No context from caller to get UID from");
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1572,7 +1595,7 @@ pk_transaction_cancel (PkTransaction *transaction, DBusGMethodInvocation *contex
/* check we got a valid value */
if (uid == PK_SECURITY_UID_INVALID) {
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_INVALID_STATE, "unable to get uid of caller");
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1581,7 +1604,7 @@ pk_transaction_cancel (PkTransaction *transaction, DBusGMethodInvocation *contex
egg_debug ("uid does not match (%i vs. %i)", transaction->priv->uid, uid);
ret = pk_transaction_action_is_allowed (transaction, FALSE, PK_ROLE_ENUM_CANCEL, &error);
if (!ret) {
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
}
@@ -1609,9 +1632,8 @@ pk_transaction_cancel (PkTransaction *transaction, DBusGMethodInvocation *contex
transaction->priv->backend->desc->cancel (transaction->priv->backend);
out:
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -1636,7 +1658,7 @@ pk_transaction_download_packages (PkTransaction *transaction, gchar **package_id
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"DownloadPackages not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1644,7 +1666,7 @@ pk_transaction_download_packages (PkTransaction *transaction, gchar **package_id
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1655,7 +1677,7 @@ pk_transaction_download_packages (PkTransaction *transaction, gchar **package_id
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_PACKAGE_ID_INVALID,
"The package id's '%s' are not valid", package_ids_temp);
g_free (package_ids_temp);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1667,7 +1689,7 @@ pk_transaction_download_packages (PkTransaction *transaction, gchar **package_id
if (retval != 0) {
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_DENIED,
"cannot create %s", directory);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1686,9 +1708,8 @@ pk_transaction_download_packages (PkTransaction *transaction, gchar **package_id
}
g_free (directory);
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -1725,7 +1746,7 @@ pk_transaction_get_categories (PkTransaction *transaction, DBusGMethodInvocation
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"GetCategories not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1733,7 +1754,7 @@ pk_transaction_get_categories (PkTransaction *transaction, DBusGMethodInvocation
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1742,7 +1763,7 @@ pk_transaction_get_categories (PkTransaction *transaction, DBusGMethodInvocation
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_TRANSACTION_EXISTS_WITH_ROLE,
"Already performing get categories");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1754,7 +1775,7 @@ pk_transaction_get_categories (PkTransaction *transaction, DBusGMethodInvocation
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1784,7 +1805,7 @@ pk_transaction_get_depends (PkTransaction *transaction, const gchar *filter, gch
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"GetDepends not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1792,7 +1813,7 @@ pk_transaction_get_depends (PkTransaction *transaction, const gchar *filter, gch
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1800,7 +1821,7 @@ pk_transaction_get_depends (PkTransaction *transaction, const gchar *filter, gch
ret = pk_transaction_filter_check (filter, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1812,7 +1833,7 @@ pk_transaction_get_depends (PkTransaction *transaction, const gchar *filter, gch
"The package id's '%s' are not valid", package_ids_temp);
g_free (package_ids_temp);
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1828,13 +1849,12 @@ pk_transaction_get_depends (PkTransaction *transaction, const gchar *filter, gch
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -1859,7 +1879,7 @@ pk_transaction_get_details (PkTransaction *transaction, gchar **package_ids, DBu
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"GetDetails not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1867,7 +1887,7 @@ pk_transaction_get_details (PkTransaction *transaction, gchar **package_ids, DBu
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1879,7 +1899,7 @@ pk_transaction_get_details (PkTransaction *transaction, gchar **package_ids, DBu
"The package id's '%s' are not valid", package_ids_temp);
g_free (package_ids_temp);
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1893,13 +1913,12 @@ pk_transaction_get_details (PkTransaction *transaction, gchar **package_ids, DBu
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -1921,7 +1940,7 @@ pk_transaction_get_distro_upgrades (PkTransaction *transaction, DBusGMethodInvoc
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"GetDistroUpgrades not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1929,7 +1948,7 @@ pk_transaction_get_distro_upgrades (PkTransaction *transaction, DBusGMethodInvoc
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1942,7 +1961,7 @@ pk_transaction_get_distro_upgrades (PkTransaction *transaction, DBusGMethodInvoc
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1974,7 +1993,7 @@ pk_transaction_get_files (PkTransaction *transaction, gchar **package_ids, DBusG
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"GetFiles not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1982,7 +2001,7 @@ pk_transaction_get_files (PkTransaction *transaction, gchar **package_ids, DBusG
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -1994,7 +2013,7 @@ pk_transaction_get_files (PkTransaction *transaction, gchar **package_ids, DBusG
"The package id's '%s' are not valid", package_ids_temp);
g_free (package_ids_temp);
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2008,13 +2027,12 @@ pk_transaction_get_files (PkTransaction *transaction, gchar **package_ids, DBusG
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -2036,7 +2054,7 @@ pk_transaction_get_packages (PkTransaction *transaction, const gchar *filter, DB
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"GetPackages not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2044,7 +2062,7 @@ pk_transaction_get_packages (PkTransaction *transaction, const gchar *filter, DB
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2052,7 +2070,7 @@ pk_transaction_get_packages (PkTransaction *transaction, const gchar *filter, DB
ret = pk_transaction_filter_check (filter, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2066,13 +2084,12 @@ pk_transaction_get_packages (PkTransaction *transaction, const gchar *filter, DB
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -2152,7 +2169,7 @@ pk_transaction_get_repo_list (PkTransaction *transaction, const gchar *filter, D
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"GetRepoList not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2160,7 +2177,7 @@ pk_transaction_get_repo_list (PkTransaction *transaction, const gchar *filter, D
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2168,7 +2185,7 @@ pk_transaction_get_repo_list (PkTransaction *transaction, const gchar *filter, D
ret = pk_transaction_filter_check (filter, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2182,13 +2199,12 @@ pk_transaction_get_repo_list (PkTransaction *transaction, const gchar *filter, D
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -2214,7 +2230,7 @@ pk_transaction_get_requires (PkTransaction *transaction, const gchar *filter, gc
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"GetRequires not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2222,7 +2238,7 @@ pk_transaction_get_requires (PkTransaction *transaction, const gchar *filter, gc
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2230,7 +2246,7 @@ pk_transaction_get_requires (PkTransaction *transaction, const gchar *filter, gc
ret = pk_transaction_filter_check (filter, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2242,7 +2258,7 @@ pk_transaction_get_requires (PkTransaction *transaction, const gchar *filter, gc
"The package id's '%s' are not valid", package_ids_temp);
g_free (package_ids_temp);
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2258,13 +2274,12 @@ pk_transaction_get_requires (PkTransaction *transaction, const gchar *filter, gc
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -2341,7 +2356,7 @@ pk_transaction_get_update_detail (PkTransaction *transaction, gchar **package_id
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"GetUpdateDetail not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2349,7 +2364,7 @@ pk_transaction_get_update_detail (PkTransaction *transaction, gchar **package_id
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2361,7 +2376,7 @@ pk_transaction_get_update_detail (PkTransaction *transaction, gchar **package_id
"The package id's '%s' are not valid", package_ids_temp);
g_free (package_ids_temp);
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2420,16 +2435,15 @@ pk_transaction_get_update_detail (PkTransaction *transaction, gchar **package_id
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
out:
g_ptr_array_foreach (array, (GFunc) g_free, NULL);
g_ptr_array_free (array, TRUE);
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -2453,7 +2467,7 @@ pk_transaction_get_updates (PkTransaction *transaction, const gchar *filter, DBu
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"GetUpdates not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2461,7 +2475,7 @@ pk_transaction_get_updates (PkTransaction *transaction, const gchar *filter, DBu
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2469,7 +2483,7 @@ pk_transaction_get_updates (PkTransaction *transaction, const gchar *filter, DBu
ret = pk_transaction_filter_check (filter, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2513,13 +2527,12 @@ pk_transaction_get_updates (PkTransaction *transaction, const gchar *filter, DBu
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -2549,7 +2562,7 @@ pk_transaction_install_files (PkTransaction *transaction, gboolean trusted,
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"InstallFiles not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2557,7 +2570,7 @@ pk_transaction_install_files (PkTransaction *transaction, gboolean trusted,
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2571,7 +2584,7 @@ pk_transaction_install_files (PkTransaction *transaction, gboolean trusted,
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NO_SUCH_FILE,
"No such file %s", full_paths[i]);
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
/* valid */
@@ -2583,7 +2596,7 @@ pk_transaction_install_files (PkTransaction *transaction, gboolean trusted,
if (!ret) {
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_PACK_INVALID, "%s", error_local->message);
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
g_error_free (error_local);
return;
}
@@ -2594,7 +2607,7 @@ pk_transaction_install_files (PkTransaction *transaction, gboolean trusted,
ret = pk_transaction_action_is_allowed (transaction, trusted, PK_ROLE_ENUM_INSTALL_FILES, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2609,13 +2622,12 @@ pk_transaction_install_files (PkTransaction *transaction, gboolean trusted,
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
return;
}
@@ -2642,7 +2654,7 @@ pk_transaction_install_packages (PkTransaction *transaction, gchar **package_ids
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"InstallPackages not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2650,7 +2662,7 @@ pk_transaction_install_packages (PkTransaction *transaction, gchar **package_ids
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2662,7 +2674,7 @@ pk_transaction_install_packages (PkTransaction *transaction, gchar **package_ids
"The package id's '%s' are not valid", package_ids_temp);
g_free (package_ids_temp);
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2670,7 +2682,7 @@ pk_transaction_install_packages (PkTransaction *transaction, gchar **package_ids
ret = pk_transaction_action_is_allowed (transaction, FALSE, PK_ROLE_ENUM_INSTALL_PACKAGES, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2684,13 +2696,12 @@ pk_transaction_install_packages (PkTransaction *transaction, gchar **package_ids
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -2714,7 +2725,7 @@ pk_transaction_install_signature (PkTransaction *transaction, const gchar *sig_t
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"InstallSignature not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2722,7 +2733,7 @@ pk_transaction_install_signature (PkTransaction *transaction, const gchar *sig_t
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2732,7 +2743,7 @@ pk_transaction_install_signature (PkTransaction *transaction, const gchar *sig_t
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_INPUT_INVALID,
"Invalid input passed to daemon");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2742,7 +2753,7 @@ pk_transaction_install_signature (PkTransaction *transaction, const gchar *sig_t
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_PACKAGE_ID_INVALID,
"The package id '%s' is not valid", package_id);
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2750,7 +2761,7 @@ pk_transaction_install_signature (PkTransaction *transaction, const gchar *sig_t
ret = pk_transaction_action_is_allowed (transaction, FALSE, PK_ROLE_ENUM_INSTALL_SIGNATURE, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2765,13 +2776,12 @@ pk_transaction_install_signature (PkTransaction *transaction, const gchar *sig_t
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -2808,7 +2818,7 @@ pk_transaction_refresh_cache (PkTransaction *transaction, gboolean force, DBusGM
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"RefreshCache not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2816,7 +2826,7 @@ pk_transaction_refresh_cache (PkTransaction *transaction, gboolean force, DBusGM
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2824,7 +2834,7 @@ pk_transaction_refresh_cache (PkTransaction *transaction, gboolean force, DBusGM
ret = pk_transaction_action_is_allowed (transaction, FALSE, PK_ROLE_ENUM_REFRESH_CACHE, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2841,13 +2851,12 @@ pk_transaction_refresh_cache (PkTransaction *transaction, gboolean force, DBusGM
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -2874,7 +2883,7 @@ pk_transaction_remove_packages (PkTransaction *transaction, gchar **package_ids,
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"RemovePackages not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2882,7 +2891,7 @@ pk_transaction_remove_packages (PkTransaction *transaction, gchar **package_ids,
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2894,7 +2903,7 @@ pk_transaction_remove_packages (PkTransaction *transaction, gchar **package_ids,
"The package id's '%s' are not valid", package_ids_temp);
g_free (package_ids_temp);
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2902,7 +2911,7 @@ pk_transaction_remove_packages (PkTransaction *transaction, gchar **package_ids,
ret = pk_transaction_action_is_allowed (transaction, FALSE, PK_ROLE_ENUM_REMOVE_PACKAGES, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2917,13 +2926,12 @@ pk_transaction_remove_packages (PkTransaction *transaction, gchar **package_ids,
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -2946,7 +2954,7 @@ pk_transaction_repo_enable (PkTransaction *transaction, const gchar *repo_id, gb
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"RepoEnable not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2954,7 +2962,7 @@ pk_transaction_repo_enable (PkTransaction *transaction, const gchar *repo_id, gb
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2964,7 +2972,7 @@ pk_transaction_repo_enable (PkTransaction *transaction, const gchar *repo_id, gb
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_INPUT_INVALID,
"Invalid input passed to daemon");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2972,7 +2980,7 @@ pk_transaction_repo_enable (PkTransaction *transaction, const gchar *repo_id, gb
ret = pk_transaction_action_is_allowed (transaction, FALSE, PK_ROLE_ENUM_REPO_ENABLE, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -2987,13 +2995,12 @@ pk_transaction_repo_enable (PkTransaction *transaction, const gchar *repo_id, gb
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -3017,7 +3024,7 @@ pk_transaction_repo_set_data (PkTransaction *transaction, const gchar *repo_id,
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"RepoSetData not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3025,7 +3032,7 @@ pk_transaction_repo_set_data (PkTransaction *transaction, const gchar *repo_id,
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3035,7 +3042,7 @@ pk_transaction_repo_set_data (PkTransaction *transaction, const gchar *repo_id,
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_INPUT_INVALID,
"Invalid input passed to daemon");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3043,7 +3050,7 @@ pk_transaction_repo_set_data (PkTransaction *transaction, const gchar *repo_id,
ret = pk_transaction_action_is_allowed (transaction, FALSE, PK_ROLE_ENUM_REPO_SET_DATA, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3059,13 +3066,12 @@ pk_transaction_repo_set_data (PkTransaction *transaction, const gchar *repo_id,
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -3093,7 +3099,7 @@ pk_transaction_resolve (PkTransaction *transaction, const gchar *filter,
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"Resolve not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3101,7 +3107,7 @@ pk_transaction_resolve (PkTransaction *transaction, const gchar *filter,
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3109,7 +3115,7 @@ pk_transaction_resolve (PkTransaction *transaction, const gchar *filter,
ret = pk_transaction_filter_check (filter, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3121,7 +3127,7 @@ pk_transaction_resolve (PkTransaction *transaction, const gchar *filter,
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_INPUT_INVALID,
"Invalid input passed to daemon");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
}
@@ -3137,13 +3143,12 @@ pk_transaction_resolve (PkTransaction *transaction, const gchar *filter,
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -3166,7 +3171,7 @@ pk_transaction_rollback (PkTransaction *transaction, const gchar *transaction_id
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"Rollback not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3174,7 +3179,7 @@ pk_transaction_rollback (PkTransaction *transaction, const gchar *transaction_id
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3184,7 +3189,7 @@ pk_transaction_rollback (PkTransaction *transaction, const gchar *transaction_id
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_INPUT_INVALID,
"Invalid input passed to daemon");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3192,7 +3197,7 @@ pk_transaction_rollback (PkTransaction *transaction, const gchar *transaction_id
ret = pk_transaction_action_is_allowed (transaction, FALSE, PK_ROLE_ENUM_ROLLBACK, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3206,13 +3211,12 @@ pk_transaction_rollback (PkTransaction *transaction, const gchar *transaction_id
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -3235,7 +3239,7 @@ pk_transaction_search_details (PkTransaction *transaction, const gchar *filter,
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"SearchDetails not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3243,7 +3247,7 @@ pk_transaction_search_details (PkTransaction *transaction, const gchar *filter,
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3251,7 +3255,7 @@ pk_transaction_search_details (PkTransaction *transaction, const gchar *filter,
ret = pk_transaction_search_check (search, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3259,7 +3263,7 @@ pk_transaction_search_details (PkTransaction *transaction, const gchar *filter,
ret = pk_transaction_filter_check (filter, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3274,13 +3278,12 @@ pk_transaction_search_details (PkTransaction *transaction, const gchar *filter,
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -3303,7 +3306,7 @@ pk_transaction_search_file (PkTransaction *transaction, const gchar *filter,
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"SearchFile not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3311,7 +3314,7 @@ pk_transaction_search_file (PkTransaction *transaction, const gchar *filter,
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3319,7 +3322,7 @@ pk_transaction_search_file (PkTransaction *transaction, const gchar *filter,
ret = pk_transaction_search_check (search, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3327,7 +3330,7 @@ pk_transaction_search_file (PkTransaction *transaction, const gchar *filter,
ret = pk_transaction_filter_check (filter, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3342,13 +3345,12 @@ pk_transaction_search_file (PkTransaction *transaction, const gchar *filter,
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -3371,7 +3373,7 @@ pk_transaction_search_group (PkTransaction *transaction, const gchar *filter,
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"SearchGroup not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3379,7 +3381,7 @@ pk_transaction_search_group (PkTransaction *transaction, const gchar *filter,
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3387,7 +3389,7 @@ pk_transaction_search_group (PkTransaction *transaction, const gchar *filter,
ret = pk_transaction_search_check (search, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3395,7 +3397,7 @@ pk_transaction_search_group (PkTransaction *transaction, const gchar *filter,
ret = pk_transaction_filter_check (filter, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3410,13 +3412,12 @@ pk_transaction_search_group (PkTransaction *transaction, const gchar *filter,
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -3439,7 +3440,7 @@ pk_transaction_search_name (PkTransaction *transaction, const gchar *filter,
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"SearchName not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3447,7 +3448,7 @@ pk_transaction_search_name (PkTransaction *transaction, const gchar *filter,
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3455,7 +3456,7 @@ pk_transaction_search_name (PkTransaction *transaction, const gchar *filter,
ret = pk_transaction_search_check (search, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3463,7 +3464,7 @@ pk_transaction_search_name (PkTransaction *transaction, const gchar *filter,
ret = pk_transaction_filter_check (filter, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3478,13 +3479,12 @@ pk_transaction_search_name (PkTransaction *transaction, const gchar *filter,
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -3503,7 +3503,7 @@ pk_transaction_set_locale (PkTransaction *transaction, const gchar *code, DBusGM
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3512,16 +3512,15 @@ pk_transaction_set_locale (PkTransaction *transaction, const gchar *code, DBusGM
egg_warning ("Already set locale");
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"Already set locale to %s", transaction->priv->locale);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
/* save so we can pass to the backend */
transaction->priv->locale = g_strdup (code);
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -3546,7 +3545,7 @@ pk_transaction_update_packages (PkTransaction *transaction, gchar **package_ids,
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"UpdatePackages not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3554,7 +3553,7 @@ pk_transaction_update_packages (PkTransaction *transaction, gchar **package_ids,
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3566,7 +3565,7 @@ pk_transaction_update_packages (PkTransaction *transaction, gchar **package_ids,
"The package id's '%s' are not valid", package_ids_temp);
g_free (package_ids_temp);
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3574,7 +3573,7 @@ pk_transaction_update_packages (PkTransaction *transaction, gchar **package_ids,
ret = pk_transaction_action_is_allowed (transaction, FALSE, PK_ROLE_ENUM_UPDATE_PACKAGES, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3588,13 +3587,12 @@ pk_transaction_update_packages (PkTransaction *transaction, gchar **package_ids,
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -3616,7 +3614,7 @@ pk_transaction_update_system (PkTransaction *transaction, DBusGMethodInvocation
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"UpdateSystem not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3624,7 +3622,7 @@ pk_transaction_update_system (PkTransaction *transaction, DBusGMethodInvocation
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3632,7 +3630,7 @@ pk_transaction_update_system (PkTransaction *transaction, DBusGMethodInvocation
ret = pk_transaction_action_is_allowed (transaction, FALSE, PK_ROLE_ENUM_UPDATE_SYSTEM, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3641,7 +3639,7 @@ pk_transaction_update_system (PkTransaction *transaction, DBusGMethodInvocation
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_TRANSACTION_EXISTS_WITH_ROLE,
"Already performing system update");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3653,13 +3651,12 @@ pk_transaction_update_system (PkTransaction *transaction, DBusGMethodInvocation
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
@@ -3683,7 +3680,7 @@ pk_transaction_what_provides (PkTransaction *transaction, const gchar *filter, c
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
"WhatProvides not yet supported by backend");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3691,7 +3688,7 @@ pk_transaction_what_provides (PkTransaction *transaction, const gchar *filter, c
ret = pk_transaction_verify_sender (transaction, context, &error);
if (!ret) {
/* don't release tid */
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3699,7 +3696,7 @@ pk_transaction_what_provides (PkTransaction *transaction, const gchar *filter, c
ret = pk_transaction_search_check (search, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3707,7 +3704,7 @@ pk_transaction_what_provides (PkTransaction *transaction, const gchar *filter, c
ret = pk_transaction_filter_check (filter, &error);
if (!ret) {
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3717,7 +3714,7 @@ pk_transaction_what_provides (PkTransaction *transaction, const gchar *filter, c
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_INVALID_PROVIDE,
"provide type '%s' not found", type);
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
@@ -3733,13 +3730,12 @@ pk_transaction_what_provides (PkTransaction *transaction, const gchar *filter, c
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_COMMIT_FAILED,
"Could not commit to a transaction object");
pk_transaction_release_tid (transaction);
- dbus_g_method_return_error (context, error);
+ pk_transaction_dbus_return_error (context, error);
return;
}
- /* not set inside the test suite */
- if (context != NULL)
- dbus_g_method_return (context);
+ /* return from async with success */
+ pk_transaction_dbus_return (context);
}
/**
commit c99a4f63c9e6e124631f96a0166016e2a3266ed0
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Nov 25 09:37:56 2008 +0000
trivial: remove a self check that's no longer valid
diff --git a/src/pk-engine.c b/src/pk-engine.c
index 189f331..ac05a99 100644
--- a/src/pk-engine.c
+++ b/src/pk-engine.c
@@ -865,7 +865,6 @@ pk_engine_test (EggTest *test)
PkEngine *engine;
PkBackend *backend;
guint idle;
- gchar *tid;
gchar *actions;
if (!egg_test_start (test, "PkEngine"))
@@ -922,13 +921,6 @@ pk_engine_test (EggTest *test)
else
egg_test_failed (test, "idle = %i", idle);
- /************************************************************/
- egg_test_title (test, "create a tid we never use");
- ret = pk_engine_get_tid (engine, &tid, NULL);
- egg_test_assert (test, ret);
- egg_test_title_assert (test, "tid is non-null", tid != NULL);
- g_free (tid);
-
g_object_unref (backend);
g_object_unref (engine);
commit 1a60e235c98b7e66058a5ad6c30d3b0854ab2924
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Nov 25 09:37:01 2008 +0000
trivial: update spec file to match new fedora standards
diff --git a/contrib/PackageKit.spec.in b/contrib/PackageKit.spec.in
index 32bee64..842d6dc 100644
--- a/contrib/PackageKit.spec.in
+++ b/contrib/PackageKit.spec.in
@@ -6,7 +6,7 @@
%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-Summary: System daemon that is a DBUS abstraction layer for package management
+Summary: Package management service
Name: PackageKit
Version: #VERSION#
Release: 0.#BUILD#%{?alphatag}%{?dist}
commit dbd6116a63a40f914ca2f67a075802b6773132de
Author: Piotr DrÄ
g <piotrdrag at gmail.com>
Date: Mon Nov 24 21:28:05 2008 +0000
Updated Polish translation
Transmitted-via: Transifex (translate.fedoraproject.org)
diff --git a/po/pl.po b/po/pl.po
index 66b5d9f..4320dc8 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -5,8 +5,8 @@ msgid ""
msgstr ""
"Project-Id-Version: pl\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-11-19 16:26+0000\n"
-"PO-Revision-Date: 2008-11-18 23:42+0100\n"
+"POT-Creation-Date: 2008-11-24 22:20+0100\n"
+"PO-Revision-Date: 2008-11-24 22:26+0100\n"
"Last-Translator: Piotr DrÄ
g <piotrdrag at gmail.com>\n"
"Language-Team: Polish <pl at li.org>\n"
"MIME-Version: 1.0\n"
@@ -14,37 +14,37 @@ 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 "SzczegóÅy aktualizacji:"
-#: ../client/pk-console.c:479
+#: ../client/pk-console.c:480
msgid "Please restart the computer to complete the update."
msgstr "ProszÄ uruchomiÄ ponownie komputer, aby zakoÅczyÄ aktualizacjÄ."
-#: ../client/pk-console.c:481
+#: ../client/pk-console.c:482
msgid "Please logout and login to complete the update."
msgstr "ProszÄ wylogowaÄ siÄ i zalogowaÄ, aby zakoÅczyÄ aktualizacjÄ."
-#: ../client/pk-console.c:483
+#: ../client/pk-console.c:484
msgid "Please restart the application as it is being used."
msgstr "ProszÄ uruchomiÄ program ponownie, ponieważ jest używany."
#. 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 "Pakiet \"%s\" jest już zainstalowany"
+msgid "The package %s is already installed"
+msgstr "Pakiet %s jest już zainstalowany"
#. 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 "Nie można zainstalowaÄ pakietu \"%s\": %s"
+msgid "The package %s could not be installed: %s"
+msgstr "Nie można zainstalowaÄ pakietu %s: %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-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
@@ -52,463 +52,457 @@ msgid "Internal error: %s"
msgstr "WewnÄtrzny bÅÄ
d: %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 "To narzÄdzie nie może zainstalowaÄ pakietów: %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 "To narzÄdzie nie może zainstalowaÄ plików: %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 "To narzÄdzie nie może usunÄ
Ä \"%s\": %s"
+msgid "This tool could not remove %s: %s"
+msgstr "To narzÄdzie nie może usunÄ
Ä %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 "To narzÄdzie nie może usunÄ
Ä pakietów: %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 "To narzÄdzie nie może usunÄ
Ä pakietów: \"%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 "NastÄpujÄ
ce pakiety muszÄ
zostaÄ usuniÄte:"
#. 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 "KontynuowaÄ usuwanie dodatkowych pakietów?"
#. TRANSLATORS: We did not remove any packages
-#: ../client/pk-console.c:804
+#: ../client/pk-console.c:805
msgid "The package removal was canceled!"
msgstr "Anulowano usuniÄcie pakietu!"
#. 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 ""
-"To narzÄdzie nie może pobraÄ pakietu \"%s\", ponieważ nie można go znaleźÄ"
+msgid "This tool could not download the package %s as it could not be found"
+msgstr "To narzÄdzie nie może pobraÄ pakietu %s, ponieważ nie można go znaleźÄ"
#. 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 "To narzÄdzie nie może pobraÄ pakietów: %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 "To narzÄdzie nie może zaktualizowaÄ \"%s\": %s"
+msgid "This tool could not update %s: %s"
+msgstr "To narzÄdzie nie może zaktualizowaÄ %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 "To narzÄdzie nie może uzyskaÄ wymagaÅ dla \"%s\": %s"
+msgid "This tool could not get the requirements for %s: %s"
+msgstr "To narzÄdzie nie może uzyskaÄ wymagaÅ dla %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 "To narzÄdzie nie może uzyskaÄ zależnoÅci dla \"%s\": %s"
+msgid "This tool could not get the dependencies for %s: %s"
+msgstr "To narzÄdzie nie może uzyskaÄ zależnoÅci dla %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 "To narzÄdzie nie może uzyskaÄ szczegóÅów pakietu \"%s\": %s"
+msgid "This tool could not get package details for %s: %s"
+msgstr "To narzÄdzie nie może uzyskaÄ szczegóÅów pakietu %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 "To narzÄdzie nie może znaleÅºÄ plików dla \"%s\": %s"
+msgid "This tool could not find the files for %s: %s"
+msgstr "To narzÄdzie nie może znaleÅºÄ plików dla %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 "To narzÄdzie nie może uzyskaÄ listy plików dla \"%s\": %s"
+msgid "This tool could not get the file list for %s: %s"
+msgstr "To narzÄdzie nie może uzyskaÄ listy plików dla %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 "Plik już istnieje: %s"
#. TRANSLATORS: follows a list of packages to install
-#: ../client/pk-console.c:1059 ../client/pk-console.c:1115
-#: ../client/pk-console.c:1190
+#: ../client/pk-console.c:1060 ../client/pk-console.c:1116
+#: ../client/pk-console.c:1191
msgid "Getting package list"
msgstr "Pobieranie listy pakietów"
#. 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
+#: ../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 "To narzÄdzie nie może pobraÄ listy pakietów: %s"
#. TRANSLATORS: There was an error saving the list
-#: ../client/pk-console.c:1076
+#: ../client/pk-console.c:1077
#, c-format
msgid "Failed to save to disk"
msgstr "Zapisanie na dysku nie powiodÅo siÄ"
#. 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 "Plik nie istnieje: %s"
#. TRANSLATORS: header to a list of packages newly added
-#: ../client/pk-console.c:1142
+#: ../client/pk-console.c:1143
msgid "Packages to add"
msgstr "Pakiety do dodania"
#. TRANSLATORS: header to a list of packages removed
-#: ../client/pk-console.c:1150
+#: ../client/pk-console.c:1151
msgid "Packages to remove"
msgstr "Pakiety do usuniÄcia"
#. TRANSLATORS: We didn't find any differences
-#: ../client/pk-console.c:1218
+#: ../client/pk-console.c:1219
#, c-format
msgid "No new packages need to be installed"
msgstr "Nie trzeba instalowaÄ nowych pakietów"
#. TRANSLATORS: follows a list of packages to install
-#: ../client/pk-console.c:1224
+#: ../client/pk-console.c:1225
msgid "To install"
msgstr "Do zainstalowania"
#. TRANSLATORS: searching takes some time....
-#: ../client/pk-console.c:1235
+#: ../client/pk-console.c:1236
msgid "Searching for package: "
msgstr "Wyszukiwanie pakietu: "
#. TRANSLATORS: package was not found -- this is the end of a string ended in ...
-#: ../client/pk-console.c:1239
+#: ../client/pk-console.c:1240
msgid "not found."
msgstr "nie znaleziono."
#. TRANSLATORS: We didn't find any packages to install
-#: ../client/pk-console.c:1250
+#: ../client/pk-console.c:1251
#, c-format
msgid "No packages can be found to install"
msgstr "Nie można znaleÅºÄ pakietów do zainstalowania"
#. TRANSLATORS: installing new packages from package list
-#: ../client/pk-console.c:1256
+#: ../client/pk-console.c:1257
msgid "Installing packages"
msgstr "Instalowanie pakietów"
#. 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 "To narzÄdzie nie może znaleÅºÄ szczegóÅów aktualizacji dla \"%s\": %s"
+msgid "This tool could not find the update details for %s: %s"
+msgstr "To narzÄdzie nie może znaleÅºÄ szczegóÅów aktualizacji dla %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 "To narzÄdzie nie może uzyskaÄ szczegóÅów aktualizacji dla \"%s\": %s"
+msgid "This tool could not get the update details for %s: %s"
+msgstr "To narzÄdzie nie może uzyskaÄ szczegóÅów aktualizacji dla %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 "BÅÄ
d:"
#. TRANSLATORS: This a list of details about the package
-#: ../client/pk-console.c:1360
+#: ../client/pk-console.c:1361
msgid "Package description"
msgstr "Opis pakietu"
#. TRANSLATORS: This a list files contained in the package
-#: ../client/pk-console.c:1393
+#: ../client/pk-console.c:1394
msgid "Package files"
msgstr "Pliki pakietu"
#. TRANSLATORS: This where the package has no files
-#: ../client/pk-console.c:1402
+#: ../client/pk-console.c:1403
msgid "No files"
msgstr "Brak plików"
#. 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 "Wymagany jest podpis repozytorium"
#. 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 "ZaakceptowaÄ ten podpis?"
#. 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 "Podpis nie zostaÅ zaakceptowany."
#. TRANSLATORS: This a request for a EULA
-#: ../client/pk-console.c:1473
+#: ../client/pk-console.c:1474
msgid "End user license agreement required"
msgstr "Licencja jest wymagana"
#. 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 "ZaakceptowaÄ tÄ licencjÄ?"
#. 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 "Odrzucono licencjÄ."
#. 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 "Demon zawiesiÅ siÄ w poÅowie transakcji!"
#. TRANSLATORS: This is the header to the --help menu
-#: ../client/pk-console.c:1566
+#: ../client/pk-console.c:1567
msgid "PackageKit Console Interface"
msgstr "Interfejs konsoli PackageKit"
-#: ../client/pk-console.c:1566
+#: ../client/pk-console.c:1567
msgid "Subcommands:"
msgstr "Podpolecenia:"
-#: ../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 "WyÅwietla dodatkowe informacje o debugowaniu"
-#: ../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 "WyÅwietla wersjÄ programu i wyÅÄ
cza"
-#: ../client/pk-console.c:1661
+#: ../client/pk-console.c:1662
msgid "Set the filter, e.g. installed"
msgstr "Ustawia filtr, np. zainstalowane"
-#: ../client/pk-console.c:1663
+#: ../client/pk-console.c:1664
msgid "Exit without waiting for actions to complete"
msgstr "WyÅÄ
cza bez oczekiwania na zakoÅczenie dziaÅaÅ"
#. 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 "To narzÄdzie nie może poÅÄ
czyÄ siÄ z systemowym D-Bus."
#. TRANSLATORS: The user specified an incorrect filter
-#: ../client/pk-console.c:1770
+#: ../client/pk-console.c:1776
msgid "The filter specified was invalid"
msgstr "Podany filtr jest nieprawidÅowy"
-#: ../client/pk-console.c:1787
+#: ../client/pk-console.c:1793
msgid "You need to specify a search type, e.g. name"
msgstr "Należy podaÄ typ wyszukiwania, np. po nazwie"
-#: ../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
+#: ../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 "Należy podaÄ termin wyszukiwania"
-#: ../client/pk-console.c:1818
+#: ../client/pk-console.c:1824
msgid "Invalid search type"
msgstr "NieprawidÅowy typ wyszukiwania"
-#: ../client/pk-console.c:1823
+#: ../client/pk-console.c:1829
msgid "You need to specify a package or file to install"
msgstr "Należy podaÄ pakiet lub plik do zainstalowania"
-#: ../client/pk-console.c:1830
+#: ../client/pk-console.c:1836
msgid "You need to specify a type, key_id and package_id"
msgstr "Należy podaÄ typ, key_id i package_id"
-#: ../client/pk-console.c:1837
+#: ../client/pk-console.c:1843
msgid "You need to specify a package to remove"
msgstr "Należy podaÄ pakiet do usuniÄcia"
-#: ../client/pk-console.c:1843
+#: ../client/pk-console.c:1849
msgid ""
"You need to specify the destination directory and then the packages to "
"download"
msgstr "Należy podaÄ katalog docelowy, a nastÄpnie pakiety do pobrania"
-#: ../client/pk-console.c:1848
+#: ../client/pk-console.c:1854
msgid "Directory not found"
msgstr "Nie znaleziono katalogu"
-#: ../client/pk-console.c:1854
+#: ../client/pk-console.c:1860
msgid "You need to specify a licence identifier (eula-id)"
msgstr "Należy podaÄ identyfikator licencji (eula-id)"
-#: ../client/pk-console.c:1870
+#: ../client/pk-console.c:1876
msgid "You need to specify a package name to resolve"
msgstr "Należy podaÄ nazwÄ pakietu do rozwiÄ
zania"
-#: ../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 "Należy podaÄ nazwÄ repozytorium"
-#: ../client/pk-console.c:1893
+#: ../client/pk-console.c:1899
msgid "You need to specify a repo name/parameter and value"
msgstr "Należy podaÄ nazwÄ/parametr repozytorium i wartoÅÄ"
-#: ../client/pk-console.c:1906
+#: ../client/pk-console.c:1912
msgid "You need to specify an action, e.g. 'update-system'"
msgstr "Należy podaÄ dziaÅanie, np. \"update-system\""
-#: ../client/pk-console.c:1911
+#: ../client/pk-console.c:1917
msgid "You need to specify a correct role"
msgstr "Należy podaÄ poprawnÄ
rolÄ"
-#: ../client/pk-console.c:1916
+#: ../client/pk-console.c:1922
msgid "Failed to get last time"
msgstr "Uzyskanie ostatniego czasu nie powiodÅo siÄ"
-#: ../client/pk-console.c:1955
+#: ../client/pk-console.c:1961
msgid "You need to specify a package to find the details for"
msgstr "Należy podaÄ pakiet do znalezienia szczegóÅów dla"
-#: ../client/pk-console.c:1962
+#: ../client/pk-console.c:1968
msgid "You need to specify a package to find the files for"
msgstr "Należy podaÄ pakiet do znalezienia plików dla"
-#: ../client/pk-console.c:1969
+#: ../client/pk-console.c:1975
msgid "You need to specify a list file to create"
msgstr "Należy podaÄ plik listy do utworzenia"
-#: ../client/pk-console.c:1977 ../client/pk-console.c:1985
+#: ../client/pk-console.c:1983 ../client/pk-console.c:1991
msgid "You need to specify a list file to open"
msgstr "Należy podaÄ plik listy do otwarcia"
#. 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 "Opcja \"%s\" nie jest obsÅugiwana"
#. 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 "Nie posiadasz niezbÄdnych uprawnieÅ dla tej operacji"
#. TRANSLATORS: Generic failure of what they asked to do
-#: ../client/pk-console.c:2054
+#: ../client/pk-console.c:2060
msgid "Command failed"
msgstr "Polecenie nie powiodÅo siÄ"
#. TRANSLATORS: This is the state of the transaction
-#: ../client/pk-generate-pack.c:99
+#: ../client/pk-generate-pack.c:100
msgid "Downloading"
msgstr "Pobieranie"
#. TRANSLATORS: This is when the main packages are being downloaded
-#: ../client/pk-generate-pack.c:119
+#: ../client/pk-generate-pack.c:120
msgid "Downloading packages"
msgstr "Pobieranie pakietów"
#. TRANSLATORS: This is when the dependency packages are being downloaded
-#: ../client/pk-generate-pack.c:124
+#: ../client/pk-generate-pack.c:125
msgid "Downloading dependencies"
msgstr "Pobieranie zależnoÅci"
-#: ../client/pk-generate-pack.c:185
+#: ../client/pk-generate-pack.c:186
msgid "Set the file name of dependencies to be excluded"
msgstr "ProszÄ ustawiÄ nazwy plików zależnoÅci do wykluczenia"
-#: ../client/pk-generate-pack.c:187
+#: ../client/pk-generate-pack.c:188
msgid "The output directory (the current directory is used if ommitted)"
msgstr ""
"Katalog wyjÅcia (użyty zostanie bieżÄ
cy katalog, jeÅli zostanie pominiÄty)"
-#: ../client/pk-generate-pack.c:189
+#: ../client/pk-generate-pack.c:190
msgid "The package to be put into the service pack"
msgstr "Pakiet do umieszczenia w pakiecie serwisowym"
-#: ../client/pk-generate-pack.c:191
+#: ../client/pk-generate-pack.c:192
msgid "Put all updates available in the service pack"
msgstr "Wszystkie dostÄpne aktualizacje w pakiecie serwisowym"
#. 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 "Nie wybrano żadnej z opcji --package lub --updates."
#. 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 "Wybrano obie opcje."
#. 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 "Pakiet serwisowy o tej samej nazwie już istnieje, zastÄ
piÄ go?"
#. 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 "Pakiet nie zostaÅ zastÄ
piony."
#. 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 "Utworzenie katalogu nie powiodÅo siÄ:"
#. 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 "Otwarcie listy pakietów nie powiodÅo siÄ."
#. 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 "Wyszukiwanie nazwy pakietu."
#. 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 "Nie można znaleÅºÄ pakietu \"%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 "Tworzenie pakietu serwisowego..."
#. 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 "Utworzono pakiet serwisowy \"%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 "Utworzenie \"%s\" nie powiodÅo siÄ: %s"
-#: ../client/pk-monitor.c:126
+#: ../client/pk-monitor.c:132
msgid "PackageKit Monitor"
msgstr "Monitor PackageKit"
@@ -534,55 +528,55 @@ msgid "Please enter a number from 1 to %i: "
msgstr "ProszÄ podaÄ numer od 1 do %i: "
#. TRANSLATORS: when we are getting data from the daemon
-#: ../contrib/packagekit-plugin/src/contents.cpp:291
+#: ../contrib/packagekit-plugin/src/contents.cpp:298
msgid "Getting package information..."
msgstr "Pobieranie informacji o pakiecie..."
#. TRANSLATORS: run an applicaiton
-#: ../contrib/packagekit-plugin/src/contents.cpp:297
+#: ../contrib/packagekit-plugin/src/contents.cpp:304
#, c-format
msgid "Run %s"
msgstr "Uruchom %s"
#. TRANSLATORS: show the installed version of a package
-#: ../contrib/packagekit-plugin/src/contents.cpp:303
+#: ../contrib/packagekit-plugin/src/contents.cpp:310
msgid "Installed version"
msgstr "Zainstalowana wersja"
#. TRANSLATORS: run the application now
-#: ../contrib/packagekit-plugin/src/contents.cpp:311
+#: ../contrib/packagekit-plugin/src/contents.cpp:318
#, c-format
msgid "Run version %s now"
msgstr "Uruchom wersjÄ %s"
-#: ../contrib/packagekit-plugin/src/contents.cpp:317
+#: ../contrib/packagekit-plugin/src/contents.cpp:324
msgid "Run now"
msgstr "Uruchom teraz"
#. TRANSLATORS: update to a new version of the package
-#: ../contrib/packagekit-plugin/src/contents.cpp:323
+#: ../contrib/packagekit-plugin/src/contents.cpp:330
#, c-format
msgid "Update to version %s"
msgstr "Zaktualizuj do wersji %s"
#. TRANSLATORS: To install a package
-#: ../contrib/packagekit-plugin/src/contents.cpp:329
+#: ../contrib/packagekit-plugin/src/contents.cpp:336
#, c-format
msgid "Install %s now"
msgstr "Zainstaluj %s"
#. TRANSLATORS: the version of the package
-#: ../contrib/packagekit-plugin/src/contents.cpp:332
+#: ../contrib/packagekit-plugin/src/contents.cpp:339
msgid "Version"
msgstr "Wersja"
#. TRANSLATORS: noting found, so can't install
-#: ../contrib/packagekit-plugin/src/contents.cpp:337
+#: ../contrib/packagekit-plugin/src/contents.cpp:344
msgid "No packages found for your system"
msgstr "Nie znaleziono pakietów dla systemu"
#. TRANSLATORS: package is being installed
-#: ../contrib/packagekit-plugin/src/contents.cpp:342
+#: ../contrib/packagekit-plugin/src/contents.cpp:349
msgid "Installing..."
msgstr "Instalowanie..."
@@ -607,11 +601,18 @@ msgid "Authentication is required to accept a EULA"
msgstr "Wymagane jest uwierzytelnienie, aby zaakceptowaÄ licencjÄ"
#: ../policy/org.freedesktop.packagekit.policy.in.h:3
+msgid ""
+"Authentication is required to cancel a task that was not started by yourself"
+msgstr ""
+"Wymagane jest uwierzytelnienie, aby anulowaÄ zadanie nie rozpoczÄte przez "
+"bieżÄ
cego użytkownika"
+
+#: ../policy/org.freedesktop.packagekit.policy.in.h:4
msgid "Authentication is required to change software source parameters"
msgstr ""
"Wymagane jest uwierzytelnienie, aby zmieniÄ parametry źródeÅ oprogramowania"
-#: ../policy/org.freedesktop.packagekit.policy.in.h:4
+#: ../policy/org.freedesktop.packagekit.policy.in.h:5
msgid ""
"Authentication is required to consider a key used for signing packages as "
"trusted"
@@ -619,27 +620,27 @@ msgstr ""
"Wymagane jest uwierzytelnienie, aby oznaczyÄ klucz używany do podpisywania "
"pakietów jako zaufany"
-#: ../policy/org.freedesktop.packagekit.policy.in.h:5
+#: ../policy/org.freedesktop.packagekit.policy.in.h:6
msgid "Authentication is required to install a signed package"
msgstr "Wymagane jest uwierzytelnienie, aby zainstalowaÄ podpisany pakiet"
-#: ../policy/org.freedesktop.packagekit.policy.in.h:6
+#: ../policy/org.freedesktop.packagekit.policy.in.h:7
msgid "Authentication is required to install an untrusted package"
msgstr "Wymagane jest uwierzytelnienie, aby zainstalowaÄ niezaufany pakiet"
-#: ../policy/org.freedesktop.packagekit.policy.in.h:7
+#: ../policy/org.freedesktop.packagekit.policy.in.h:8
msgid "Authentication is required to refresh the system sources"
msgstr "Wymagane jest uwierzytelnienie, aby odÅwieżyÄ ÅºródÅa systemu"
-#: ../policy/org.freedesktop.packagekit.policy.in.h:8
+#: ../policy/org.freedesktop.packagekit.policy.in.h:9
msgid "Authentication is required to remove packages"
msgstr "Wymagane jest uwierzytelnienie, aby usunÄ
Ä pakiety"
-#: ../policy/org.freedesktop.packagekit.policy.in.h:9
+#: ../policy/org.freedesktop.packagekit.policy.in.h:10
msgid "Authentication is required to rollback a transaction"
msgstr "Wymagane jest uwierzytelnienie, aby przywróciÄ transakcjÄ"
-#: ../policy/org.freedesktop.packagekit.policy.in.h:10
+#: ../policy/org.freedesktop.packagekit.policy.in.h:11
msgid ""
"Authentication is required to set the network proxy used for downloading "
"packages"
@@ -647,61 +648,65 @@ msgstr ""
"Wymagane jest uwierzytelnienie, aby ustawiÄ poÅrednika sieciowego używanego "
"do pobierania pakietów"
-#: ../policy/org.freedesktop.packagekit.policy.in.h:11
+#: ../policy/org.freedesktop.packagekit.policy.in.h:12
msgid "Authentication is required to update packages"
msgstr "Wymagane jest uwierzytelnienie, aby zaktualizowaÄ pakiety"
-#: ../policy/org.freedesktop.packagekit.policy.in.h:12
+#: ../policy/org.freedesktop.packagekit.policy.in.h:13
+msgid "Cancel foreign task"
+msgstr "Anulowanie obcego zadania"
+
+#: ../policy/org.freedesktop.packagekit.policy.in.h:14
msgid "Change software source parameters"
msgstr "Zmiana parametrów źródÅa oprogramowania"
-#: ../policy/org.freedesktop.packagekit.policy.in.h:13
-msgid "Install local file"
-msgstr "Instalacja lokalnego pliku"
+#: ../policy/org.freedesktop.packagekit.policy.in.h:15
+msgid "Install signed package"
+msgstr "Instalacja podpisanego pakietu"
-#: ../policy/org.freedesktop.packagekit.policy.in.h:14
+#: ../policy/org.freedesktop.packagekit.policy.in.h:16
msgid "Install untrusted local file"
msgstr "Instalacja niezaufanego lokalnego pliku"
-#: ../policy/org.freedesktop.packagekit.policy.in.h:15
+#: ../policy/org.freedesktop.packagekit.policy.in.h:17
msgid "Refresh system sources"
msgstr "OdÅwieżenie źródeÅ systemu"
-#: ../policy/org.freedesktop.packagekit.policy.in.h:16
+#: ../policy/org.freedesktop.packagekit.policy.in.h:18
msgid "Remove package"
msgstr "UsuniÄcie pakietu"
-#: ../policy/org.freedesktop.packagekit.policy.in.h:17
+#: ../policy/org.freedesktop.packagekit.policy.in.h:19
msgid "Rollback to a previous transaction"
msgstr "Przywrócenie poprzedniej transakcji"
-#: ../policy/org.freedesktop.packagekit.policy.in.h:18
+#: ../policy/org.freedesktop.packagekit.policy.in.h:20
msgid "Set network proxy"
msgstr "Ustawienie poÅrednika sieciowego"
-#: ../policy/org.freedesktop.packagekit.policy.in.h:19
+#: ../policy/org.freedesktop.packagekit.policy.in.h:21
msgid "Trust a key used for signing packages"
msgstr "Oznaczenie klucza używanego do podpisywania pakietów jako zaufanego"
-#: ../policy/org.freedesktop.packagekit.policy.in.h:20
+#: ../policy/org.freedesktop.packagekit.policy.in.h:22
msgid "Update packages"
msgstr "Aktualizacja pakietów"
-#: ../src/pk-main.c:85
+#: ../src/pk-main.c:86
msgid "Startup failed due to security policies on this machine."
msgstr ""
"Uruchomienie nie powiodÅo siÄ z powodu polityk bezpieczeÅstwa tego komputera."
-#: ../src/pk-main.c:86
+#: ../src/pk-main.c:87
msgid "This can happen for two reasons:"
msgstr "MogÅo siÄ to wydarzyÄ z dwóch powodów:"
-#: ../src/pk-main.c:87
+#: ../src/pk-main.c:88
msgid "The correct user is not launching the executable (usually root)"
msgstr ""
"PrawidÅowy użytkownik nie uruchamiania pliku wykonywalnego (zwykle root)"
-#: ../src/pk-main.c:88
+#: ../src/pk-main.c:89
msgid ""
"The org.freedesktop.PackageKit.conf file is not installed in the system "
"directory:"
@@ -709,39 +714,39 @@ msgstr ""
"Plik org.freedesktop.PackageKit.conf nie jest zainstalowany w katalogu "
"systemowym:"
-#: ../src/pk-main.c:192
+#: ../src/pk-main.c:187
msgid "Packaging backend to use, e.g. dummy"
msgstr "Używany moduÅ przetwarzajÄ
cy, np. dummy"
-#: ../src/pk-main.c:194
+#: ../src/pk-main.c:189
msgid "Daemonize and detach from the terminal"
msgstr "Tworzy demona i odÅÄ
cza z terminala"
-#: ../src/pk-main.c:198
+#: ../src/pk-main.c:193
msgid "Disable the idle timer"
msgstr "WyÅÄ
cza licznik czasu bezczynnoÅci"
-#: ../src/pk-main.c:200
+#: ../src/pk-main.c:195
msgid "Show version and exit"
msgstr "WyÅwietla wersjÄ i wyÅÄ
cza"
-#: ../src/pk-main.c:202
+#: ../src/pk-main.c:197
msgid "Exit after a small delay"
msgstr "WyÅÄ
cza po maÅej przerwie"
-#: ../src/pk-main.c:204
+#: ../src/pk-main.c:199
msgid "Exit after the engine has loaded"
msgstr "WyÅÄ
cza po wczytaniu mechanizmu"
-#: ../src/pk-main.c:214
+#: ../src/pk-main.c:213
msgid "PackageKit service"
msgstr "UsÅuga PackageKit"
-#: ../src/pk-main.c:250
+#: ../src/pk-main.c:249
msgid "Cannot connect to the system bus"
msgstr "Nie można poÅÄ
czyÄ siÄ z magistralÄ
systemowÄ
"
-#: ../src/pk-main.c:296
+#: ../src/pk-main.c:298
#, c-format
msgid "Error trying to start: %s\n"
msgstr "BÅÄ
d podczas próbowania uruchomienia: %s\n"
commit 5c2b1ecfc4d06b6358ad888d60bdc13d5d57fe70
Author: Adrien BUSTANY <madcat at mymadcat.com>
Date: Mon Nov 24 19:09:32 2008 +0100
ifdef the Polkit relevant parts for make distcheck
diff --git a/lib/packagekit-qt/src/polkitthread.cpp b/lib/packagekit-qt/src/polkitthread.cpp
index 95842af..5d1052c 100644
--- a/lib/packagekit-qt/src/polkitthread.cpp
+++ b/lib/packagekit-qt/src/polkitthread.cpp
@@ -1,4 +1,6 @@
+#ifdef USE_SECURITY_POLKIT
#include <polkit-dbus/polkit-dbus.h>
+#endif
#include "polkitthread.h"
@@ -23,7 +25,7 @@ bool PolkitThread::finished()
}
-
+#ifdef USE_SECURITY_POLKIT
void PolkitThread::run()
{
DBusError e;
@@ -44,5 +46,13 @@ void PolkitThread::run()
_finished = true;
exit();
}
+#else
+void PolkitThread::run()
+{
+ _allowed = true;
+ _finished = true;
+ exit();
+}
+#endif
#include "polkitthread.moc"
commit dc67c467f55dc72e982068893215f554c794af78
Author: Richard Hughes <hughsie at localhost.localdomain>
Date: Mon Nov 24 11:23:42 2008 +0000
trivial: fix qt make check
diff --git a/lib/packagekit-qt/src/Makefile.am b/lib/packagekit-qt/src/Makefile.am
index d6c386b..00a0767 100644
--- a/lib/packagekit-qt/src/Makefile.am
+++ b/lib/packagekit-qt/src/Makefile.am
@@ -29,6 +29,7 @@ $(libpackagekit_qt_la_OBJECTS) : \
daemonproxy.moc \
package.moc \
polkitclient.moc \
+ polkitthread.moc \
transaction.moc \
transactionprivate.moc \
transactionproxy.moc \
@@ -53,6 +54,8 @@ libpackagekit_qt_la_SOURCES = \
package.cpp \
polkitclient.h \
polkitclient.cpp \
+ polkitthread.h \
+ polkitthread.cpp \
util.h \
util.cpp \
$(NULL)
commit 7476c5d66ee25a5e93392e07e9757102a50c081a
Author: Adrien BUSTANY <madcat at mymadcat.com>
Date: Mon Nov 24 17:12:44 2008 +0100
Fix make check for QPackageKit with the threaded Polkit client
diff --git a/lib/packagekit-qt/src/polkitthread.cpp b/lib/packagekit-qt/src/polkitthread.cpp
index 245866f..95842af 100644
--- a/lib/packagekit-qt/src/polkitthread.cpp
+++ b/lib/packagekit-qt/src/polkitthread.cpp
@@ -37,7 +37,7 @@ void PolkitThread::run()
return;
}
- bool _allowed = polkit_auth_obtain(_action.toAscii().data(), 0, QCoreApplication::applicationPid(), &e);
+ _allowed = polkit_auth_obtain(_action.toAscii().data(), 0, QCoreApplication::applicationPid(), &e);
if(!_allowed) {
qDebug() << "Authentification error :" << e.name << ":" << e.message;
}
commit 58e55370597e271c4b49208ffe74467536a8e47a
Author: Thomas Goettlicher <tgoettlicher at suse.de>
Date: Mon Nov 24 11:15:29 2008 +0100
fixed freezed ui while waiting for blocking polkit_auth_obtain() call
diff --git a/lib/packagekit-qt/src/CMakeLists.txt b/lib/packagekit-qt/src/CMakeLists.txt
index dea923c..c834e67 100644
--- a/lib/packagekit-qt/src/CMakeLists.txt
+++ b/lib/packagekit-qt/src/CMakeLists.txt
@@ -27,6 +27,7 @@ set( lib_SRCS
transactionproxy.cpp
package.cpp
polkitclient.cpp
+ polkitthread.cpp
util.cpp
)
diff --git a/lib/packagekit-qt/src/polkitclient.cpp b/lib/packagekit-qt/src/polkitclient.cpp
index 7998752..6858393 100644
--- a/lib/packagekit-qt/src/polkitclient.cpp
+++ b/lib/packagekit-qt/src/polkitclient.cpp
@@ -24,6 +24,7 @@
#endif
#include "polkitclient.h"
+#include "polkitthread.h"
using namespace PackageKit;
@@ -40,18 +41,14 @@ PolkitClient::PolkitClient(QObject *parent) : QObject(parent) {
#ifdef USE_SECURITY_POLKIT
bool PolkitClient::getAuth(const QString &action) {
- DBusError e;
- dbus_error_init(&e);
-
- if(polkit_check_auth(QCoreApplication::applicationPid(), action.toAscii().data(), NULL))
- return true;
-
- bool auth = polkit_auth_obtain(action.toAscii().data(), 0, QCoreApplication::applicationPid(), &e);
- if(!auth) {
- qDebug() << "Authentification error :" << e.name << ":" << e.message;
- }
-
- return auth;
+ PolkitThread polThread(action);
+ polThread.start();
+ while (!polThread.finished())
+ {
+ polThread.wait(POLICYTHREADINTERVAL);
+ qApp->processEvents();
+ }
+ return polThread.allowed();
}
#else
bool PolkitClient::getAuth(const QString &action) {
diff --git a/lib/packagekit-qt/src/polkitclient.h b/lib/packagekit-qt/src/polkitclient.h
index 2b8bd91..940a0d1 100644
--- a/lib/packagekit-qt/src/polkitclient.h
+++ b/lib/packagekit-qt/src/polkitclient.h
@@ -23,6 +23,10 @@
#include <QtCore>
+// interval for processing events to prevent
+// freezed ui while waiting for blocking polkit_auth_obtain()
+#define POLICYTHREADINTERVAL 500 // in ms
+
namespace PackageKit {
class PolkitClient : QObject{
diff --git a/lib/packagekit-qt/src/polkitthread.cpp b/lib/packagekit-qt/src/polkitthread.cpp
new file mode 100644
index 0000000..245866f
--- /dev/null
+++ b/lib/packagekit-qt/src/polkitthread.cpp
@@ -0,0 +1,48 @@
+#include <polkit-dbus/polkit-dbus.h>
+
+#include "polkitthread.h"
+
+using namespace PackageKit;
+
+PolkitThread::PolkitThread(const QString &action)
+: _allowed( false )
+, _finished( false )
+{
+ _action = action;
+}
+
+
+bool PolkitThread::allowed()
+{
+ return _allowed;
+}
+
+bool PolkitThread::finished()
+{
+ return _finished;
+}
+
+
+
+void PolkitThread::run()
+{
+ DBusError e;
+ dbus_error_init(&e);
+
+ if(polkit_check_auth(QCoreApplication::applicationPid(), _action.toAscii().data(), NULL))
+ {
+ _allowed = true;
+ _finished = true;
+ exit();
+ return;
+ }
+
+ bool _allowed = polkit_auth_obtain(_action.toAscii().data(), 0, QCoreApplication::applicationPid(), &e);
+ if(!_allowed) {
+ qDebug() << "Authentification error :" << e.name << ":" << e.message;
+ }
+ _finished = true;
+ exit();
+}
+
+#include "polkitthread.moc"
diff --git a/lib/packagekit-qt/src/polkitthread.h b/lib/packagekit-qt/src/polkitthread.h
new file mode 100644
index 0000000..ffcc746
--- /dev/null
+++ b/lib/packagekit-qt/src/polkitthread.h
@@ -0,0 +1,24 @@
+#ifndef POLKITHREAD_H
+#define POLKITHREAD_H
+
+#include <QtCore>
+
+namespace PackageKit {
+
+class PolkitThread : public QThread
+{
+ Q_OBJECT
+public:
+ void run();
+ bool allowed();
+ bool finished();
+ PolkitThread(const QString &action );
+private:
+ bool _allowed;
+ bool _finished;
+ QString _action;
+};
+
+} // End namespace PackageKit
+
+#endif
More information about the PackageKit-commit
mailing list