Author: megabajt Date: Thu May 7 13:16:56 2009 GMT Module: packages Tag: HEAD ---- Log message: - fixes gpk-update-viewer2 crash
---- Files affected: packages/gnome-packagekit: gnome-packagekit-update-viewer-crash.patch (NONE -> 1.1) (NEW) ---- Diffs: ================================================================ Index: packages/gnome-packagekit/gnome-packagekit-update-viewer-crash.patch diff -u /dev/null packages/gnome-packagekit/gnome-packagekit-update-viewer-crash.patch:1.1 --- /dev/null Thu May 7 15:16:56 2009 +++ packages/gnome-packagekit/gnome-packagekit-update-viewer-crash.patch Thu May 7 15:16:51 2009 @@ -0,0 +1,32 @@ +commit 4fffe8867dd0db611ffe6860d4414f2b13c4fa89 +Author: Richard Hughes <[email protected]> +Date: Wed Apr 1 10:00:36 2009 +0100 + + bugfix: only get the distro upgrades in the update viewer if we support it + +diff --git a/src/gpk-update-viewer2.c b/src/gpk-update-viewer2.c +index 771d84c..8130c30 100644 +--- a/src/gpk-update-viewer2.c ++++ b/src/gpk-update-viewer2.c +@@ -1464,6 +1464,7 @@ gpk_update_viewer_finished_cb (PkClient *client, PkExitEnum exit, guint runtime, + GtkTreePath *path; + GtkTreeModel *model; + GtkTreeSelection *selection; ++ PkBitfield roles; + PkRoleEnum role; + PkPackageList *list; + PkRestartEnum restart; +@@ -1530,8 +1531,11 @@ gpk_update_viewer_finished_cb (PkClient *client, PkExitEnum exit, guint runtime, + } + + if (role == PK_ROLE_ENUM_GET_DETAILS) { +- /* get the distro-upgrades */ +- g_idle_add ((GSourceFunc) gpk_update_viewer_finished_get_distro_upgrades_cb, NULL); ++ ++ /* get the distro-upgrades if we support it */ ++ roles = pk_control_get_actions (control, NULL); ++ if (pk_bitfield_contain (roles, PK_ROLE_ENUM_GET_DISTRO_UPGRADES)) ++ g_idle_add ((GSourceFunc) gpk_update_viewer_finished_get_distro_upgrades_cb, NULL); + + /* select the first entry in the updates list now we've got data */ + widget = glade_xml_get_widget (glade_xml, "treeview_updates"); ================================================================ _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
