Hello community, here is the log from the commit of package gnome-packagekit for openSUSE:Factory checked in at Thu Jan 8 18:05:53 CET 2009. -------- --- GNOME/gnome-packagekit/gnome-packagekit.changes 2008-12-09 15:23:07.000000000 +0100 +++ /mounts/work_src_done/STABLE/gnome-packagekit/gnome-packagekit.changes 2008-12-24 21:14:08.000000000 +0100 @@ -1,0 +2,10 @@ +Tue Dec 09 17:42:15 CET 2008 - sreeves@suse.de + +- Move to 0.3.12 - Bugfix only release + Fix to show the force install button on unsigned dialog + Fix for BNC#450185 - abort on small form factor mode + Fix for BNC#457803 - respect the force_get_updates_login flag + Set an interaction mode in gpk-application to avoid an empty window + Add YaST option on dependency failures to fix BNC#383261 + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- gnome-packagekit-0.3.11.tar.bz2 gnome-packagekit-remove-new-untested-python-widgets.patch New: ---- gnome-packagekit-0.3.12.tar.bz2 gnome-packagekit-BNC383261.patch gnome-packagekit-UI-polish.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gnome-packagekit.spec ++++++ --- /var/tmp/diff_new_pack.OG8223/_old 2009-01-08 18:05:33.000000000 +0100 +++ /var/tmp/diff_new_pack.OG8223/_new 2009-01-08 18:05:33.000000000 +0100 @@ -1,7 +1,7 @@ # -# spec file for package gnome-packagekit (Version 0.3.11) +# spec file for package gnome-packagekit (Version 0.3.12) # -# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,19 +19,20 @@ Name: gnome-packagekit Url: http://packagekit.org/ -Version: 0.3.11 -Release: 3 +Version: 0.3.12 +Release: 1 License: GPL v2 or later Source: %{name}-%{version}.tar.bz2 #the .po files from https://forgesvn1.novell.com/viewsvn/suse-i18n/trunk/lcn/ Source1: %{name}-po.tar.gz Patch1: gnome-packagekit_release.patch Patch2: gnome-packagekit-XGetWindowProperty.patch -Patch5: gnome-packagekit-remove-new-untested-python-widgets.patch #PATCH-FEATURE-OPENSUSE gnome-packagekit-fate302445.patch fate 302445 Patch3: gnome-packagekit-fate302445.patch #PATCH-FEATURE-OPENSUSE gnome-packagekit-fate303359.patch fate 303359 Patch4: gnome-packagekit-fate303359.patch +Patch5: gnome-packagekit-BNC383261.patch +Patch6: gnome-packagekit-UI-polish.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: PackageKit-devel PolicyKit-gnome-devel cairo-devel dbus-1-devel desktop-file-utils gconf2-devel gettext-devel gnome-doc-utils-devel gtk-doc gtk2-devel intltool libglade2-devel libnotify-devel libsexy-devel libtool sqlite-devel update-desktop-files Requires: gnome-icon-theme @@ -58,10 +59,11 @@ %setup -q -n %{name}-%{version} %patch1 -p1 %patch2 -%patch5 -p1 %patch3 -p1 # do not do this patch anymore BNC #440498 # %patch4 -p1 +%patch5 -p1 +%patch6 -p1 #replace the old po files with lcn ones rm po/*.po rm po/LINGUAS @@ -104,6 +106,7 @@ %files %defattr(-,root,root) %doc AUTHORS ChangeLog COPYING NEWS README +%dir %py_sitedir/packagekit %{_bindir}/gpk-* %{_datadir}/gnome-packagekit %{_datadir}/omf/gnome-packagekit @@ -111,10 +114,18 @@ %{_datadir}/applications/gpk-*.desktop %{_datadir}/icons/hicolor/* %{_sysconfdir}/gconf/schemas/gnome-packagekit.schemas +%{py_sitedir}/packagekit/g* %files lang -f %{name}.lang %changelog +* Tue Dec 09 2008 sreeves@suse.de +- Move to 0.3.12 - Bugfix only release + Fix to show the force install button on unsigned dialog + Fix for BNC#450185 - abort on small form factor mode + Fix for BNC#457803 - respect the force_get_updates_login flag + Set an interaction mode in gpk-application to avoid an empty window + Add YaST option on dependency failures to fix BNC#383261 * Tue Dec 09 2008 schwab@suse.de - Fix use of XGetWindowProperty. * Mon Dec 01 2008 sreeves@suse.de ++++++ gnome-packagekit-0.3.11.tar.bz2 -> gnome-packagekit-0.3.12.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/gnome-packagekit-0.3.11/configure new/gnome-packagekit-0.3.12/configure --- old/gnome-packagekit-0.3.11/configure 2008-11-24 17:05:59.000000000 +0100 +++ new/gnome-packagekit-0.3.12/configure 2008-12-08 23:13:20.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for gnome-packagekit 0.3.11. +# Generated by GNU Autoconf 2.63 for gnome-packagekit 0.3.12. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. @@ -748,8 +748,8 @@ # Identity of this package. PACKAGE_NAME='gnome-packagekit' PACKAGE_TARNAME='gnome-packagekit' -PACKAGE_VERSION='0.3.11' -PACKAGE_STRING='gnome-packagekit 0.3.11' +PACKAGE_VERSION='0.3.12' +PACKAGE_STRING='gnome-packagekit 0.3.12' PACKAGE_BUGREPORT='' ac_unique_file="src" @@ -1643,7 +1643,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures gnome-packagekit 0.3.11 to adapt to many kinds of systems. +\`configure' configures gnome-packagekit 0.3.12 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1718,7 +1718,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gnome-packagekit 0.3.11:";; + short | recursive ) echo "Configuration of gnome-packagekit 0.3.12:";; esac cat <<\_ACEOF @@ -1880,7 +1880,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gnome-packagekit configure 0.3.11 +gnome-packagekit configure 0.3.12 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1894,7 +1894,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by gnome-packagekit $as_me 0.3.11, which was +It was created by gnome-packagekit $as_me 0.3.12, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -2611,7 +2611,7 @@ # Define the identity of the package. PACKAGE=gnome-packagekit - VERSION=0.3.11 + VERSION=0.3.12 cat >>confdefs.h <<_ACEOF @@ -26848,7 +26848,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by gnome-packagekit $as_me 0.3.11, which was +This file was extended by gnome-packagekit $as_me 0.3.12, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -26911,7 +26911,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -gnome-packagekit config.status 0.3.11 +gnome-packagekit config.status 0.3.12 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/gnome-packagekit-0.3.11/configure.ac new/gnome-packagekit-0.3.12/configure.ac --- old/gnome-packagekit-0.3.11/configure.ac 2008-11-24 16:54:28.000000000 +0100 +++ new/gnome-packagekit-0.3.12/configure.ac 2008-12-08 23:10:06.000000000 +0100 @@ -1,6 +1,6 @@ AC_PREREQ(2.52) -AC_INIT(gnome-packagekit, 0.3.11) +AC_INIT(gnome-packagekit, 0.3.12) AC_CONFIG_SRCDIR(src) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) AM_CONFIG_HEADER(config.h) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/gnome-packagekit-0.3.11/NEWS new/gnome-packagekit-0.3.12/NEWS --- old/gnome-packagekit-0.3.11/NEWS 2008-11-24 16:54:28.000000000 +0100 +++ new/gnome-packagekit-0.3.12/NEWS 2008-12-08 23:13:00.000000000 +0100 @@ -1,3 +1,14 @@ +Version 0.3.12 +~~~~~~~~~~~~~~ +Released: 2008-12-08 + +* Bugfix: + - Show the 'Force Install' button on the unsigned dialog UI (Richard Hughes) + - Don't abort with an error if we are using small form factor mode (Richard Hughes) + - Set the run window modal over the parent window to fix rh#475046 (Richard Hughes) + - Set an interaction mode in gpk-application when we refresh the package lists (Richard Hughes) + - Don't send signal during object init - upper layers need to hook up first (Scott Reeves) + Version 0.3.11 ~~~~~~~~~~~~~~ Released: 2008-11-24 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/gnome-packagekit-0.3.11/po/POTFILES.in new/gnome-packagekit-0.3.12/po/POTFILES.in --- old/gnome-packagekit-0.3.11/po/POTFILES.in 2008-11-21 12:08:40.000000000 +0100 +++ new/gnome-packagekit-0.3.12/po/POTFILES.in 2008-11-28 19:12:00.000000000 +0100 @@ -54,5 +54,6 @@ src/gpk-update-icon.c src/gpk-update-viewer.c src/gpk-watch.c +src/gpk-desktop.c python/packagekit/gtkwidgets.py diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/gnome-packagekit-0.3.11/src/gpk-application.c new/gnome-packagekit-0.3.12/src/gpk-application.c --- old/gnome-packagekit-0.3.11/src/gpk-application.c 2008-11-20 13:11:47.000000000 +0100 +++ new/gnome-packagekit-0.3.12/src/gpk-application.c 2008-12-08 23:10:06.000000000 +0100 @@ -641,7 +641,8 @@ if (pk_bitfield_contain (state, GPK_STATE_INSTALLED)) { /* run this single package id */ package_ids = pk_package_ids_from_id (package_id); - exec = gpk_client_run_show (package_ids); + widget = glade_xml_get_widget (application->priv->glade_xml, "window_manager"); + exec = gpk_client_run_show (GTK_WINDOW (widget), package_ids); if (exec != NULL) { ret = g_spawn_command_line_async (exec, &error); if (!ret) { @@ -1690,7 +1691,8 @@ ret = gpk_client_install_package_ids (application->priv->gclient, package_ids, NULL); /* can we show the user the new application? */ if (ret) { - exec = gpk_client_run_show (package_ids); + widget = glade_xml_get_widget (application->priv->glade_xml, "window_manager"); + exec = gpk_client_run_show (GTK_WINDOW (widget), package_ids); if (exec != NULL) { ret = g_spawn_command_line_async (exec, &error); if (!ret) { @@ -2281,6 +2283,7 @@ static void gpk_application_menu_refresh_cb (GtkAction *action, GpkApplication *application) { + gpk_client_set_interaction (application->priv->gclient, GPK_CLIENT_INTERACT_WARNING_CONFIRM_PROGRESS); gpk_client_refresh_cache (application->priv->gclient, NULL); } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/gnome-packagekit-0.3.11/src/gpk-auto-refresh.c new/gnome-packagekit-0.3.12/src/gpk-auto-refresh.c --- old/gnome-packagekit-0.3.11/src/gpk-auto-refresh.c 2008-11-19 17:25:54.000000000 +0100 +++ new/gnome-packagekit-0.3.12/src/gpk-auto-refresh.c 2008-12-07 18:45:13.000000000 +0100 @@ -51,6 +51,7 @@ #define GPK_AUTO_REFRESH_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GPK_TYPE_AUTO_REFRESH, GpkAutoRefreshPrivate)) #define GPK_AUTO_REFRESH_PERIODIC_CHECK 60*60 /* force check for updates every this much time */ +#define GPK_UPDATES_LOGIN_TIMEOUT 3 /* seconds */ #define GS_DBUS_SERVICE "org.gnome.ScreenSaver" #define GS_DBUS_PATH "/org/gnome/ScreenSaver" @@ -75,6 +76,7 @@ gboolean on_battery; gboolean network_active; gboolean force_get_updates_login; + guint force_get_updates_login_timeout_id; guint timeout_id; EggDbusMonitor *monitor_gs; EggDbusMonitor *monitor_gpm; @@ -279,6 +281,15 @@ g_return_val_if_fail (GPK_IS_AUTO_REFRESH (arefresh), FALSE); + if (!arefresh->priv->force_get_updates_login) { + arefresh->priv->force_get_updates_login = TRUE; + if (gconf_client_get_bool (arefresh->priv->gconf_client, GPK_CONF_FORCE_GET_UPDATES_LOGIN, NULL)) { + egg_debug ("forcing get update due to GConf"); + gpk_auto_refresh_signal_get_updates (arefresh); + return TRUE; + } + } + /* get this each time, as it may have changed behind out back */ thresh = gpk_auto_refresh_convert_frequency_text (arefresh, GPK_CONF_FREQUENCY_GET_UPDATES); if (thresh == 0) { @@ -374,12 +385,13 @@ /* only force a check if the user REALLY, REALLY wants to break * set policy and have an update at startup */ if (!arefresh->priv->force_get_updates_login) { - arefresh->priv->force_get_updates_login = TRUE; force = gconf_client_get_bool (arefresh->priv->gconf_client, GPK_CONF_FORCE_GET_UPDATES_LOGIN, NULL); if (force) { - egg_debug ("forcing get update due to GConf"); - gpk_auto_refresh_signal_get_updates (arefresh); - return TRUE; + /* don't immediately send the signal, if we are called during object initialization + * we need to wait until upper layers finish hooking up to the signal first. */ + if (arefresh->priv->force_get_updates_login_timeout_id == 0) + arefresh->priv->force_get_updates_login_timeout_id = + g_timeout_add_seconds (GPK_UPDATES_LOGIN_TIMEOUT, (GSourceFunc) gpk_auto_refresh_maybe_get_updates, arefresh); } } @@ -591,6 +603,7 @@ arefresh->priv->network_active = FALSE; arefresh->priv->force_get_updates_login = FALSE; arefresh->priv->timeout_id = 0; + arefresh->priv->force_get_updates_login_timeout_id = 0; arefresh->priv->proxy_gs = NULL; arefresh->priv->proxy_gpm = NULL; @@ -656,6 +669,8 @@ if (arefresh->priv->timeout_id != 0) g_source_remove (arefresh->priv->timeout_id); + if (arefresh->priv->force_get_updates_login_timeout_id != 0) + g_source_remove (arefresh->priv->force_get_updates_login_timeout_id); g_object_unref (arefresh->priv->control); g_object_unref (arefresh->priv->monitor_gs); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/gnome-packagekit-0.3.11/src/gpk-client-run.c new/gnome-packagekit-0.3.12/src/gpk-client-run.c --- old/gnome-packagekit-0.3.11/src/gpk-client-run.c 2008-11-24 10:12:40.000000000 +0100 +++ new/gnome-packagekit-0.3.12/src/gpk-client-run.c 2008-12-08 23:10:06.000000000 +0100 @@ -298,7 +298,7 @@ * Return value: the package_id of the selected package, or NULL **/ gchar * -gpk_client_run_show (gchar **package_ids) +gpk_client_run_show (GtkWindow *window, gchar **package_ids) { GladeXML *glade_xml; GtkWidget *widget; @@ -364,8 +364,14 @@ goto out; } - /* show window */ + /* make modal if window set */ widget = glade_xml_get_widget (glade_xml, "dialog_simple"); + if (window != NULL) { + gtk_window_set_modal (GTK_WINDOW (widget), TRUE); + gtk_window_set_transient_for (GTK_WINDOW (widget), window); + } + + /* show window */ gtk_widget_show (widget); /* wait for button press */ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/gnome-packagekit-0.3.11/src/gpk-client-run.h new/gnome-packagekit-0.3.12/src/gpk-client-run.h --- old/gnome-packagekit-0.3.11/src/gpk-client-run.h 2008-11-19 17:25:54.000000000 +0100 +++ new/gnome-packagekit-0.3.12/src/gpk-client-run.h 2008-12-07 19:29:46.000000000 +0100 @@ -28,7 +28,8 @@ G_BEGIN_DECLS void gpk_client_run_self_test (gpointer data); -gchar *gpk_client_run_show (gchar **package_ids); +gchar *gpk_client_run_show (GtkWindow *window, + gchar **package_ids); G_END_DECLS diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/gnome-packagekit-0.3.11/src/gpk-client-untrusted.c new/gnome-packagekit-0.3.12/src/gpk-client-untrusted.c --- old/gnome-packagekit-0.3.11/src/gpk-client-untrusted.c 2008-11-19 17:26:22.000000000 +0100 +++ new/gnome-packagekit-0.3.12/src/gpk-client-untrusted.c 2008-11-27 18:04:40.000000000 +0100 @@ -70,9 +70,6 @@ /* connect up actions */ widget = glade_xml_get_widget (glade_xml, "dialog_error"); g_signal_connect_swapped (widget, "delete_event", G_CALLBACK (gtk_main_quit), NULL); - - /* set icon name */ - widget = glade_xml_get_widget (glade_xml, "dialog_error"); gtk_window_set_icon_name (GTK_WINDOW (widget), GPK_ICON_SOFTWARE_INSTALLER); /* close button */ @@ -122,7 +119,11 @@ g_signal_connect (update_system_action, "activate", G_CALLBACK (gpk_client_untrusted_button_cb), NULL); button = polkit_gnome_action_create_button (update_system_action); - widget = glade_xml_get_widget (glade_xml, "hbuttonbox2"); + gtk_widget_show (button); + + /* add to box */ + widget = glade_xml_get_widget (glade_xml, "dialog_error"); + widget = gtk_dialog_get_action_area (GTK_DIALOG(widget)); gtk_box_pack_start (GTK_BOX (widget), button, FALSE, FALSE, 0); /* show window */ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/gnome-packagekit-0.3.11/src/gpk-common.c new/gnome-packagekit-0.3.12/src/gpk-common.c --- old/gnome-packagekit-0.3.11/src/gpk-common.c 2008-11-20 13:07:52.000000000 +0100 +++ new/gnome-packagekit-0.3.12/src/gpk-common.c 2008-12-08 23:10:06.000000000 +0100 @@ -56,7 +56,7 @@ screen_w = gdk_screen_get_width (screen); screen_h = gdk_screen_get_height (screen); if (screen_w < width || screen_h < height) { - egg_error ("using small form factor mode as %ix%i and requested %ix%i", + egg_debug ("using small form factor mode as %ix%i and requested %ix%i", screen_w, screen_h, width, height); gtk_window_maximize (window); return FALSE; ++++++ gnome-packagekit-BNC383261.patch ++++++ diff --git a/src/gpk-client.c b/src/gpk-client.c index 3bc12b4..6792594 100644 --- a/src/gpk-client.c +++ b/src/gpk-client.c @@ -98,6 +98,7 @@ struct _GpkClientPrivate gchar *parent_title; gchar *parent_icon_name; gchar *error_details; + const gchar *error_details_prompt_for_yast; GMainLoop *loop; }; @@ -198,8 +199,12 @@ gpk_client_libnotify_cb (NotifyNotification *notification, gchar *action, gpoint egg_debug ("set %s to FALSE", GPK_CONF_NOTIFY_UPDATE_STARTED); gconf_client_set_bool (gclient->priv->gconf_client, GPK_CONF_NOTIFY_UPDATE_STARTED, FALSE, NULL); } else if (egg_strequal (action, "show-error-details")) { - /* TRANSLATORS: detailed text about the error */ - gpk_error_dialog (_("Error details"), _("Package Manager error details"), gclient->priv->error_details); + if (gclient->priv->error_details_prompt_for_yast) + /* TRANSLATORS: detailed text about the error */ + gpk_error_dialog_modal_prompt_yast (NULL, _("Error details"), _("Package Manager error details"), gclient->priv->error_details, gclient->priv->error_details_prompt_for_yast); + else + gpk_error_dialog (_("Error details"), _("Package Manager error details"), gclient->priv->error_details); + } else if (egg_strequal (action, "cancel")) { /* try to cancel */ ret = pk_client_cancel (gclient->priv->client_action, &error); @@ -481,6 +486,14 @@ gpk_client_error_code_cb (PkClient *client, PkErrorCodeEnum code, const gchar *d return; } + if (code == PK_ERROR_ENUM_DEP_RESOLUTION_FAILED) { + egg_debug ("DEP_RES failed - will ask if they want to try yast"); + gclient->priv->error_details_prompt_for_yast = _("To try and manually resolve problems use the YaST \"Online Update\" module"); + } + else + gclient->priv->error_details_prompt_for_yast = NULL; + + egg_debug ("code was %s", pk_error_enum_to_text (code)); /* use a modal dialog if showing progress, else use libnotify */ @@ -488,7 +501,10 @@ gpk_client_error_code_cb (PkClient *client, PkErrorCodeEnum code, const gchar *d message = gpk_error_enum_to_localised_message (code); if (gclient->priv->show_progress) { widget = GTK_WIDGET (gpk_client_dialog_get_window (gclient->priv->dialog)); - gpk_error_dialog_modal (GTK_WINDOW (widget), title, message, details); + if (gclient->priv->error_details_prompt_for_yast) + gpk_error_dialog_modal_prompt_yast (GTK_WINDOW (widget), title, message, details, gclient->priv->error_details_prompt_for_yast); + else + gpk_error_dialog_modal (GTK_WINDOW (widget), title, message, details); return; } @@ -654,7 +670,7 @@ gpk_client_error_msg (GpkClient *gclient, const gchar *title, GError *error) /* hide the main window */ window = gpk_client_dialog_get_window (gclient->priv->dialog); - gpk_error_dialog_modal_with_time (window, title, message, details, gclient->priv->timestamp); + gpk_error_dialog_modal_with_time (window, title, message, details, gclient->priv->timestamp, NULL); } /** diff --git a/src/gpk-error.c b/src/gpk-error.c index 38aab70..18756e3 100644 --- a/src/gpk-error.c +++ b/src/gpk-error.c @@ -34,6 +34,32 @@ #include "gpk-common.h" +static gboolean +gpk_error_dialog_run_yast (gpointer unused) +{ + gboolean retval; + GError *error = NULL; + + PkControl *control = pk_control_new (); + if (!pk_control_suggest_daemon_quit(control, &error)) + egg_debug ("Failure calling pk_control_suggest_daemon_quit:%s", error->message); + g_object_unref (control); + + retval = g_spawn_command_line_async ("gnomesu -- /sbin/yast2 online_update", NULL); + if (!retval) + egg_debug ("Failure launching yast2 online_update"); + return FALSE; +} + +static void +gpk_error_dialog_yast_cb (GtkButton *button, gpointer data) +{ + egg_debug ("user wants to try YaST..."); + /* we want to make sure and finish up outstanding stuff before we launch yast so we can release the libzypp lock */ + g_timeout_add_seconds (2, gpk_error_dialog_run_yast, NULL); + gtk_main_quit (); +} + /** * gpk_error_dialog_modal_with_time: * @window: the parent dialog @@ -44,12 +70,14 @@ * Shows a modal error, and blocks until the user clicks close **/ gboolean -gpk_error_dialog_modal_with_time (GtkWindow *window, const gchar *title, const gchar *message, const gchar *details, guint timestamp) +gpk_error_dialog_modal_with_time (GtkWindow *window, const gchar *title, const gchar *message, const gchar *details, guint timestamp, const gchar *prompt_yast) { GtkWidget *widget; + GtkWidget *button; GladeXML *glade_xml; GtkTextBuffer *buffer = NULL; gchar *text; + gchar *full_message; g_return_val_if_fail (title != NULL, FALSE); g_return_val_if_fail (message != NULL, FALSE); @@ -78,8 +106,21 @@ gpk_error_dialog_modal_with_time (GtkWindow *window, const gchar *title, const g g_free (text); /* message */ + if (prompt_yast) { + full_message = g_strconcat (message, "\n\n", prompt_yast, NULL); + button = gtk_button_new_with_label(_("Start YaST and install updates manually")); + g_signal_connect (button, "clicked", G_CALLBACK (gpk_error_dialog_yast_cb), NULL); + /* add to box */ + widget = glade_xml_get_widget (glade_xml, "dialog_error"); + widget = gtk_dialog_get_action_area (GTK_DIALOG(widget)); + gtk_box_pack_start (GTK_BOX (widget), button, TRUE, TRUE, 0); + gtk_widget_show (button); + } + else + full_message = g_strdup (message); widget = glade_xml_get_widget (glade_xml, "label_message"); - gtk_label_set_label (GTK_LABEL (widget), message); + gtk_label_set_label (GTK_LABEL (widget), full_message); + g_free (full_message); /* show text in the expander */ if (egg_strzero (details)) { @@ -111,6 +152,13 @@ gpk_error_dialog_modal_with_time (GtkWindow *window, const gchar *title, const g return TRUE; } +gboolean +gpk_error_dialog_modal_prompt_yast (GtkWindow *window, const gchar *title, const gchar *message, const gchar *details, const gchar *yast) +{ + return gpk_error_dialog_modal_with_time (window, title, message, details, 0, yast); +} + + /** * gpk_error_dialog_modal: * @window: the parent dialog @@ -123,7 +171,7 @@ gpk_error_dialog_modal_with_time (GtkWindow *window, const gchar *title, const g gboolean gpk_error_dialog_modal (GtkWindow *window, const gchar *title, const gchar *message, const gchar *details) { - return gpk_error_dialog_modal_with_time (window, title, message, details, 0); + return gpk_error_dialog_modal_with_time (window, title, message, details, 0, NULL); } /** diff --git a/src/gpk-error.h b/src/gpk-error.h index 49240e8..8f0f4fd 100644 --- a/src/gpk-error.h +++ b/src/gpk-error.h @@ -33,11 +33,17 @@ gboolean gpk_error_dialog_modal (GtkWindow *window, const gchar *title, const gchar *message, const gchar *details); +gboolean gpk_error_dialog_modal_prompt_yast (GtkWindow *window, + const gchar *title, + const gchar *message, + const gchar *details, + const gchar *prompt_yast); gboolean gpk_error_dialog_modal_with_time (GtkWindow *window, const gchar *title, const gchar *message, const gchar *details, - guint timestamp); + guint timestamp, + const gchar *prompt_yast); G_END_DECLS ++++++ gnome-packagekit-UI-polish.patch ++++++ diff --git a/src/gpk-client-run.c b/src/gpk-client-run.c index 9d901e6..0e971ba 100644 --- a/src/gpk-client-run.c +++ b/src/gpk-client-run.c @@ -70,6 +70,19 @@ gpk_client_run_button_close_cb (GtkWidget *widget, gpointer data) } /** + * gpk_client_run_delete_event_cb: + **/ +static gboolean +gpk_client_run_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer user_data) +{ + /* clear full_path */ + g_free (full_path); + full_path = NULL; + gtk_main_quit (); + return FALSE; +} + +/** * gpk_client_run_button_action_cb: **/ static void @@ -314,7 +327,7 @@ gpk_client_run_show (GtkWindow *window, gchar **package_ids) /* connect up default actions */ widget = glade_xml_get_widget (glade_xml, "dialog_simple"); - g_signal_connect_swapped (widget, "delete_event", G_CALLBACK (gtk_main_quit), NULL); + g_signal_connect (widget, "delete_event", G_CALLBACK (gpk_client_run_delete_event_cb), NULL); /* set a size, if the screen allows */ gpk_window_set_size_request (GTK_WINDOW (widget), 600, 300); @@ -332,6 +345,10 @@ gpk_client_run_show (GtkWindow *window, gchar **package_ids) widget = glade_xml_get_widget (glade_xml, "hbox_filter"); gtk_widget_hide (widget); + /* hide the refresh button */ + widget = glade_xml_get_widget (glade_xml, "button_refresh"); + gtk_widget_hide (widget); + /* set icon name */ widget = glade_xml_get_widget (glade_xml, "dialog_simple"); gtk_window_set_icon_name (GTK_WINDOW (widget), GPK_ICON_SOFTWARE_INSTALLER); @@ -356,6 +373,7 @@ gpk_client_run_show (GtkWindow *window, gchar **package_ids) /* add columns to the tree view */ pk_treeview_add_general_columns (GTK_TREE_VIEW (widget)); gtk_tree_view_columns_autosize (GTK_TREE_VIEW (widget)); + gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (widget), FALSE); /* add all the apps */ len = gpk_client_run_add_package_ids (package_ids); @@ -383,7 +401,7 @@ out: if (GTK_IS_WIDGET (widget)) gtk_widget_hide (widget); - g_object_unref (glade_xml); + //g_object_unref (glade_xml); return full_path; } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org