diff --git a/.cvsignore b/.cvsignore index d7c9269..6b4ce49 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -gnome-packagekit-0.1.12-20080412git.tar.gz +gnome-packagekit-0.1.12-20080415git.tar.gz diff --git a/ck-multi.patch b/ck-multi.patch deleted file mode 100644 index 53c2394..0000000 --- a/ck-multi.patch +++ /dev/null @@ -1,81 +0,0 @@ -diff --git a/src/gpk-common.c b/src/gpk-common.c -index fd63bf4..a3ee237 100644 ---- a/src/gpk-common.c -+++ b/src/gpk-common.c -@@ -169,19 +169,39 @@ static PolKitAction * - get_action_from_error (GError *error) - { - PolKitAction *action; -- const gchar *paction; -+ gchar *paction, *p; - - action = polkit_action_new (); - - paction = NULL; - if (g_str_has_prefix (error->message, "Not privileged for action: ")) { -- paction = error->message + strlen ("Not privileged for action: "); -+ paction = g_strdup (error->message + strlen ("Not privileged for action: ")); -+ p = strchr (paction, ' '); -+ if (p) -+ *p = '\0'; - } - polkit_action_set_action_id (action, paction); - -+ g_free (paction); -+ - return action; - } - -+static PolKitResult -+get_result_from_error (GError *error) -+{ -+ PolKitResult result = POLKIT_RESULT_UNKNOWN; -+ const char *p; -+ -+ p = strrchr (error->message, ' '); -+ if (p) { -+ p++; -+ polkit_result_from_string_representation (p, &result); -+ } -+ -+ return result; -+} -+ - static void - system_restart_auth_cb (PolKitAction *action, gboolean gained_privilege, - GError *error, DBusGProxy *proxy) -@@ -229,6 +249,8 @@ gpk_restart_system (void) - GError *error = NULL; - gboolean ret; - PolKitAction *action; -+ PolKitAction *action2; -+ PolKitResult result; - - /* check dbus connections, exit if not valid */ - connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error); -@@ -253,6 +275,25 @@ gpk_restart_system (void) - if (!ret) { - if (dbus_g_error_has_name (error, "org.freedesktop.ConsoleKit.Manager.NotPrivileged")) { - action = get_action_from_error (error); -+ result = get_result_from_error (error); -+ -+ if (result == POLKIT_RESULT_NO) { -+ action2 = polkit_action_new (); -+ polkit_action_set_action_id (action2, -+ "org.freedesktop.consolekit.system.restart-multiple-users"); -+ if (polkit_action_equal (action, action2)) { -+ gpk_error_modal_dialog (_("Failed to restart"), -+ _("You are not allowed to restart the computer " -+ "because multiple users are logged in")); -+ } -+ -+ g_error_free (error); -+ -+ polkit_action_unref (action); -+ polkit_action_unref (action2); -+ -+ return FALSE; -+ } - g_clear_error (&error); - ret = request_restart_priv (proxy, action, &error); - polkit_action_unref (action); diff --git a/gnome-packagekit.spec b/gnome-packagekit.spec index f3d5b38..0b52d02 100644 --- a/gnome-packagekit.spec +++ b/gnome-packagekit.spec @@ -1,11 +1,11 @@ %define dbus_version 0.61 %define packagekit_version 0.1.11 -%define alphatag 20080412git +%define alphatag 20080415git Summary: GNOME PackageKit Client Name: gnome-packagekit Version: 0.1.12 -Release: 1.%{?alphatag}%{?dist} +Release: 2.%{?alphatag}%{?dist} License: GPLv2+ Group: Applications/System URL: http://www.packagekit.org @@ -127,6 +127,10 @@ fi %{_datadir}/applications/gpk-*.desktop %changelog +* Sat Apr 12 2008 Richard Hughes - 0.1.12-2.20080415git +- Pull in the new snapshot from the stable GNOME_PACKAGEKIT_0_1_X branch. +- Fixes include rh#442150, rh#442543, rh#442230, rh#441062 and more from upstream. + * Sat Apr 12 2008 Richard Hughes - 0.1.12-1.20080412git - Pull in the new snapshot from the stable GNOME_PACKAGEKIT_0_1_X branch. - Fixes that were cherry picked into this branch since 0.1.11 was released can be viewed at: diff --git a/gpk-dont-show-initial-package.patch b/gpk-dont-show-initial-package.patch deleted file mode 100644 index 61a9a9f..0000000 --- a/gpk-dont-show-initial-package.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit 2e5c2f0cb7aaa4cffe72900af4ab49afbd98404a -Author: Richard Hughes -Date: Wed Apr 9 01:30:56 2008 +0100 - - don't show the initial package when we are updating multiple packages - -diff --git a/src/gpk-common.c b/src/gpk-common.c -index afef117..2861f87 100644 ---- a/src/gpk-common.c -+++ b/src/gpk-common.c -@@ -1060,7 +1060,7 @@ gpk_role_enum_to_localised_present (PkRoleEnum role) - text = _("Refreshing package cache"); - break; - case PK_ROLE_ENUM_UPDATE_PACKAGES: -- text = _("Updating package"); -+ text = _("Updating packages"); - break; - case PK_ROLE_ENUM_UPDATE_SYSTEM: - text = _("Updating system"); -diff --git a/src/gpk-watch.c b/src/gpk-watch.c -index ee7b152..37a5818 100644 ---- a/src/gpk-watch.c -+++ b/src/gpk-watch.c -@@ -699,7 +699,8 @@ gpk_watch_populate_menu_with_jobs (GpkWatch *watch, GtkMenu *menu) - localised_status = gpk_status_enum_to_localised_text (item->status); - - icon_name = gpk_status_enum_to_icon_name (item->status); -- if (pk_strzero (item->package_id) == FALSE) { -+ if (!pk_strzero (item->package_id) && -+ item->role != PK_ROLE_ENUM_UPDATE_PACKAGES) { - package = gpk_package_get_name (item->package_id); - text = g_strdup_printf ("%s %s (%s)", localised_role, package, localised_status); - g_free (package); diff --git a/gpk-dont-show-refresh-when-update-packages.patch b/gpk-dont-show-refresh-when-update-packages.patch deleted file mode 100644 index 88b1976..0000000 --- a/gpk-dont-show-refresh-when-update-packages.patch +++ /dev/null @@ -1,18 +0,0 @@ -commit 66f991ad90b6cbb93a2c5ef9f5f83d745b06a962 -Author: Richard Hughes -Date: Wed Apr 9 01:28:38 2008 +0100 - - don't show the refresh menuitem if we are doing an update-packages call either - -diff --git a/src/gpk-watch.c b/src/gpk-watch.c -index e4adc1c..ee7b152 100644 ---- a/src/gpk-watch.c -+++ b/src/gpk-watch.c -@@ -244,6 +244,7 @@ gpk_watch_task_list_changed_cb (PkTaskList *tlist, GpkWatch *watch) - g_return_if_fail (GPK_IS_WATCH (watch)); - - if (pk_task_list_contains_role (tlist, PK_ROLE_ENUM_REFRESH_CACHE) || -+ pk_task_list_contains_role (tlist, PK_ROLE_ENUM_UPDATE_PACKAGES) || - pk_task_list_contains_role (tlist, PK_ROLE_ENUM_UPDATE_SYSTEM)) { - watch->priv->show_refresh_in_menu = FALSE; - } else { diff --git a/gpk-hide-icon-when--update-packages.patch b/gpk-hide-icon-when--update-packages.patch deleted file mode 100644 index 7152275..0000000 --- a/gpk-hide-icon-when--update-packages.patch +++ /dev/null @@ -1,20 +0,0 @@ -commit cadda07e052373f8fb6894984ce332105393ec9a -Author: Richard Hughes -Date: Wed Apr 9 02:11:02 2008 +0100 - - hide the icon when we are updating multiple packages also - -diff --git a/src/gpk-notify.c b/src/gpk-notify.c -index 1d184cd..e619f34 100644 ---- a/src/gpk-notify.c -+++ b/src/gpk-notify.c -@@ -993,7 +993,8 @@ gpk_notify_task_list_changed_cb (PkTaskList *tlist, GpkNotify *notify) - { - g_return_if_fail (GPK_IS_NOTIFY (notify)); - /* hide icon if we are updating */ -- if (pk_task_list_contains_role (tlist, PK_ROLE_ENUM_UPDATE_SYSTEM)) { -+ if (pk_task_list_contains_role (tlist, PK_ROLE_ENUM_UPDATE_SYSTEM) || -+ pk_task_list_contains_role (tlist, PK_ROLE_ENUM_UPDATE_PACKAGES)) { - gpk_smart_icon_set_icon_name (notify->priv->sicon, NULL); - } - } diff --git a/gpk-select-all-hide-more.patch b/gpk-select-all-hide-more.patch deleted file mode 100644 index d013945..0000000 --- a/gpk-select-all-hide-more.patch +++ /dev/null @@ -1,83 +0,0 @@ -commit a8abc084f33359d18db243e20f17a214c39c9d3e -Author: Richard Hughes -Date: Tue Apr 8 18:53:06 2008 +0100 - - we don't want to show 'Select all' if they are all checked - -diff --git a/src/gpk-update-viewer.c b/src/gpk-update-viewer.c -index e726527..1915b53 100644 ---- a/src/gpk-update-viewer.c -+++ b/src/gpk-update-viewer.c -@@ -1593,24 +1593,63 @@ pk_updates_detail_popup_menu_select_none (GtkWidget *menuitem, gpointer userdata - } - - /** -+ * pk_updates_get_checked_status: -+ **/ -+void -+pk_updates_get_checked_status (gboolean *all_checked, gboolean *none_checked) -+{ -+ GtkTreeView *treeview; -+ gboolean valid; -+ gboolean update; -+ GtkTreeIter iter; -+ GtkTreeModel *model; -+ -+ /* get the first iter in the list */ -+ treeview = GTK_TREE_VIEW (glade_xml_get_widget (glade_xml, "treeview_updates")); -+ model = gtk_tree_view_get_model (treeview); -+ valid = gtk_tree_model_get_iter_first (model, &iter); -+ *all_checked = TRUE; -+ *none_checked = TRUE; -+ while (valid) { -+ gtk_tree_model_get (model, &iter, PACKAGES_COLUMN_SELECT, &update, -1); -+ if (update) { -+ *none_checked = FALSE; -+ } else { -+ *all_checked = FALSE; -+ } -+ valid = gtk_tree_model_iter_next (model, &iter); -+ } -+} -+ -+/** - * pk_updates_detail_popup_menu_create: - **/ - void - pk_updates_detail_popup_menu_create (GtkWidget *treeview, GdkEventButton *event, gpointer userdata) - { -- GtkWidget *menu, *menuitem; -+ GtkWidget *menu; -+ GtkWidget *menuitem; -+ gboolean all_checked; -+ gboolean none_checked; - - menu = gtk_menu_new(); - -- menuitem = gtk_menu_item_new_with_label ("Select all"); -- g_signal_connect (menuitem, "activate", -- G_CALLBACK (pk_updates_detail_popup_menu_select_all), treeview); -- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); -+ /* we don't want to show 'Select all' if they are all checked */ -+ pk_updates_get_checked_status (&all_checked, &none_checked); - -- menuitem = gtk_menu_item_new_with_label ("Unselect all"); -- g_signal_connect (menuitem, "activate", -- G_CALLBACK (pk_updates_detail_popup_menu_select_none), treeview); -- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); -+ if (!all_checked) { -+ menuitem = gtk_menu_item_new_with_label ("Select all"); -+ g_signal_connect (menuitem, "activate", -+ G_CALLBACK (pk_updates_detail_popup_menu_select_all), treeview); -+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); -+ } -+ -+ if (!none_checked) { -+ menuitem = gtk_menu_item_new_with_label ("Unselect all"); -+ g_signal_connect (menuitem, "activate", -+ G_CALLBACK (pk_updates_detail_popup_menu_select_none), treeview); -+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); -+ } - - menuitem = gtk_menu_item_new_with_label ("Ignore this package"); - gtk_widget_set_sensitive (GTK_WIDGET (menuitem), FALSE); diff --git a/gpk-select-all.patch b/gpk-select-all.patch deleted file mode 100644 index f0c69a0..0000000 --- a/gpk-select-all.patch +++ /dev/null @@ -1,156 +0,0 @@ -commit ec9c197442980e843480ac500a0c80dbb92744f5 -Author: Richard Hughes -Date: Tue Apr 8 18:44:46 2008 +0100 - - add a context menu in gpk-update-viewer to select or unselect all the updates. fixes rh#441010 - -diff --git a/src/gpk-update-viewer.c b/src/gpk-update-viewer.c -index 81682fd..e726527 100644 ---- a/src/gpk-update-viewer.c -+++ b/src/gpk-update-viewer.c -@@ -1174,7 +1174,7 @@ pk_update_update_last_updated_time (void) - return TRUE; - } - --static void -+static void - pk_updates_restart_cb (GtkWidget *widget, gpointer data) - { - gpk_restart_system (); -@@ -1549,6 +1549,125 @@ pk_updates_changed_cb (PkClient *client, gpointer data) - } - - /** -+ * pk_updates_detail_popup_menu_select_all: -+ **/ -+void -+pk_updates_detail_popup_menu_select_all (GtkWidget *menuitem, gpointer userdata) -+{ -+ GtkTreeView *treeview = GTK_TREE_VIEW (userdata); -+ gboolean valid; -+ GtkTreeIter iter; -+ GtkTreeModel *model; -+ -+ /* get the first iter in the list */ -+ model = gtk_tree_view_get_model (treeview); -+ valid = gtk_tree_model_get_iter_first (model, &iter); -+ while (valid) { -+ gtk_tree_model_get (model, &iter, -1); -+ gtk_list_store_set (GTK_LIST_STORE (model), &iter, -+ PACKAGES_COLUMN_SELECT, TRUE, -1); -+ valid = gtk_tree_model_iter_next (model, &iter); -+ } -+} -+ -+/** -+ * pk_updates_detail_popup_menu_select_none: -+ **/ -+void -+pk_updates_detail_popup_menu_select_none (GtkWidget *menuitem, gpointer userdata) -+{ -+ GtkTreeView *treeview = GTK_TREE_VIEW (userdata); -+ gboolean valid; -+ GtkTreeIter iter; -+ GtkTreeModel *model; -+ -+ /* get the first iter in the list */ -+ model = gtk_tree_view_get_model (treeview); -+ valid = gtk_tree_model_get_iter_first (model, &iter); -+ while (valid) { -+ gtk_tree_model_get (model, &iter, -1); -+ gtk_list_store_set (GTK_LIST_STORE (model), &iter, -+ PACKAGES_COLUMN_SELECT, FALSE, -1); -+ valid = gtk_tree_model_iter_next (model, &iter); -+ } -+} -+ -+/** -+ * pk_updates_detail_popup_menu_create: -+ **/ -+void -+pk_updates_detail_popup_menu_create (GtkWidget *treeview, GdkEventButton *event, gpointer userdata) -+{ -+ GtkWidget *menu, *menuitem; -+ -+ menu = gtk_menu_new(); -+ -+ menuitem = gtk_menu_item_new_with_label ("Select all"); -+ g_signal_connect (menuitem, "activate", -+ G_CALLBACK (pk_updates_detail_popup_menu_select_all), treeview); -+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); -+ -+ menuitem = gtk_menu_item_new_with_label ("Unselect all"); -+ g_signal_connect (menuitem, "activate", -+ G_CALLBACK (pk_updates_detail_popup_menu_select_none), treeview); -+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); -+ -+ menuitem = gtk_menu_item_new_with_label ("Ignore this package"); -+ gtk_widget_set_sensitive (GTK_WIDGET (menuitem), FALSE); -+ g_signal_connect (menuitem, "activate", -+ G_CALLBACK (pk_updates_detail_popup_menu_select_all), treeview); -+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); -+ -+ gtk_widget_show_all (menu); -+ gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, -+ (event != NULL) ? event->button : 0, -+ gdk_event_get_time((GdkEvent*)event)); -+} -+ -+/** -+ * pk_updates_detail_button_pressed: -+ **/ -+gboolean -+pk_updates_detail_button_pressed (GtkWidget *treeview, GdkEventButton *event, gpointer userdata) -+{ -+ GtkTreeSelection *selection; -+ -+ /* single click with the right mouse button? */ -+ if (event->type != GDK_BUTTON_PRESS || event->button != 3) { -+ /* we did not handle this */ -+ return FALSE; -+ } -+ -+ pk_debug ("Single right click on the tree view"); -+ -+ /* select the row */ -+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); -+ if (gtk_tree_selection_count_selected_rows (selection) <= 1) { -+ GtkTreePath *path; -+ /* Get tree path for row that was clicked */ -+ if (gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (treeview), (gint) event->x, (gint) event->y, &path, NULL, NULL, NULL)) { -+ gtk_tree_selection_unselect_all (selection); -+ gtk_tree_selection_select_path (selection, path); -+ gtk_tree_path_free (path); -+ } -+ } -+ -+ /* create */ -+ pk_updates_detail_popup_menu_create (treeview, event, userdata); -+ return TRUE; -+} -+ -+/** -+ * pk_updates_detail_popup_menu: -+ **/ -+gboolean -+pk_updates_detail_popup_menu (GtkWidget *treeview, gpointer userdata) -+{ -+ pk_updates_detail_popup_menu_create (treeview, NULL, userdata); -+ return TRUE; -+} -+ -+/** - * main: - **/ - int -@@ -1840,6 +1959,10 @@ main (int argc, char *argv[]) - widget = glade_xml_get_widget (glade_xml, "treeview_updates"); - gtk_tree_view_set_model (GTK_TREE_VIEW (widget), - GTK_TREE_MODEL (list_store_details)); -+ g_signal_connect (widget, "popup-menu", -+ G_CALLBACK (pk_updates_detail_popup_menu), NULL); -+ g_signal_connect (widget, "button-press-event", -+ G_CALLBACK (pk_updates_detail_button_pressed), NULL); - - selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (widget)); - gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE); diff --git a/gpk-show-icon-no-severity.patch b/gpk-show-icon-no-severity.patch deleted file mode 100644 index 803a27d..0000000 --- a/gpk-show-icon-no-severity.patch +++ /dev/null @@ -1,68 +0,0 @@ -commit 5cf99815c8b8a7ec0ec11d00a22801bb750fee73 -Author: Richard Hughes -Date: Wed Apr 9 02:17:26 2008 +0100 - - show the icon when we have updates without severity - -diff --git a/src/gpk-notify.c b/src/gpk-notify.c -index e619f34..79ba168 100644 ---- a/src/gpk-notify.c -+++ b/src/gpk-notify.c -@@ -691,6 +691,7 @@ gpk_notify_query_updates_finished_cb (PkClient *client, PkExitEnum exit, guint r - PkUpdateEnum update; - PkPackageId *ident; - GPtrArray *security_array; -+ const gchar *icon; - - g_return_if_fail (GPK_IS_NOTIFY (notify)); - -@@ -734,26 +735,22 @@ gpk_notify_query_updates_finished_cb (PkClient *client, PkExitEnum exit, guint r - goto out; - } - -+ /* work out icon */ -+ icon = gpk_notify_get_best_update_icon (notify, client); -+ gpk_smart_icon_set_icon_name (notify->priv->sicon, icon); -+ -+ /* make tooltip */ -+ if (status_security->len != 0) { -+ g_string_set_size (status_security, status_security->len-1); -+ } -+ g_string_append_printf (status_tooltip, ngettext ("There is %d update pending", -+ "There are %d updates pending", length), length); -+ gpk_smart_icon_set_tooltip (notify->priv->sicon, status_tooltip->str); -+ - /* is policy none? */ - if (update == PK_UPDATE_ENUM_NONE) { -- const gchar *icon; - pk_debug ("not updating as policy NONE"); - -- /* work out icon */ -- icon = gpk_notify_get_best_update_icon (notify, client); -- -- /* trim off extra newlines */ -- if (status_security->len != 0) { -- g_string_set_size (status_security, status_security->len-1); -- } -- -- /* make tooltip */ -- g_string_append_printf (status_tooltip, ngettext ("There is %d update pending", -- "There are %d updates pending", length), length); -- -- gpk_smart_icon_set_icon_name (notify->priv->sicon, icon); -- gpk_smart_icon_set_tooltip (notify->priv->sicon, status_tooltip->str); -- - /* do we warn the user? */ - if (security_array->len > 0) { - gpk_notify_critical_updates_warning (notify, status_security->str, length); -@@ -765,6 +762,10 @@ gpk_notify_query_updates_finished_cb (PkClient *client, PkExitEnum exit, guint r - ret = gpk_notify_check_on_battery (notify); - if (!ret) { - pk_debug ("on battery so not doing update"); -+ /* do we warn the user? */ -+ if (security_array->len > 0) { -+ gpk_notify_critical_updates_warning (notify, status_security->str, length); -+ } - goto out; - } - diff --git a/new-pk-package-available.svg b/new-pk-package-available.svg deleted file mode 100644 index cb88f1e..0000000 --- a/new-pk-package-available.svg +++ /dev/null @@ -1,521 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/new-pk-package-available16.png b/new-pk-package-available16.png deleted file mode 100644 index 971c875..0000000 Binary files a/new-pk-package-available16.png and /dev/null differ diff --git a/new-pk-package-available22.png b/new-pk-package-available22.png deleted file mode 100644 index 0e2e4cd..0000000 Binary files a/new-pk-package-available22.png and /dev/null differ diff --git a/new-pk-package-available24.png b/new-pk-package-available24.png deleted file mode 100644 index b31dc9c..0000000 Binary files a/new-pk-package-available24.png and /dev/null differ diff --git a/new-pk-package-available48.png b/new-pk-package-available48.png deleted file mode 100644 index 7eb00b4..0000000 Binary files a/new-pk-package-available48.png and /dev/null differ diff --git a/sources b/sources index 3fe9d86..3974d66 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -489c03ed884db1018138376c68678aab gnome-packagekit-0.1.12-20080412git.tar.gz +6700ef53f528493a17b5377c1a380a53 gnome-packagekit-0.1.12-20080415git.tar.gz