gnome-packagekit r490 - in trunk: . src
- From: rhughes svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-packagekit r490 - in trunk: . src
- Date: Tue, 17 Feb 2009 17:59:25 +0000 (UTC)
Author: rhughes
Date: Tue Feb 17 17:59:25 2009
New Revision: 490
URL: http://svn.gnome.org/viewvc/gnome-packagekit?rev=490&view=rev
Log:
from git
Modified:
trunk/NEWS
trunk/configure.ac
trunk/src/egg-console-kit.h
trunk/src/egg-dbus-monitor.h
trunk/src/gpk-animated-icon.c
trunk/src/gpk-animated-icon.h
trunk/src/gpk-application.c
trunk/src/gpk-application.h
trunk/src/gpk-auto-refresh.h
trunk/src/gpk-cell-renderer-uri.h
trunk/src/gpk-check-update.c
trunk/src/gpk-check-update.h
trunk/src/gpk-client-chooser.c
trunk/src/gpk-client-dialog.c
trunk/src/gpk-client-dialog.h
trunk/src/gpk-client.c
trunk/src/gpk-client.h
trunk/src/gpk-dbus.h
trunk/src/gpk-enum.c
trunk/src/gpk-firmware.h
trunk/src/gpk-hardware.h
trunk/src/gpk-inhibit.h
trunk/src/gpk-language.h
trunk/src/gpk-log.c
trunk/src/gpk-smart-icon.h
trunk/src/gpk-update-viewer.c
trunk/src/gpk-vendor.h
trunk/src/gpk-watch.c
trunk/src/gpk-watch.h
trunk/src/gpk-x11.h
trunk/src/org.freedesktop.PackageKit.xml
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Tue Feb 17 17:59:25 2009
@@ -1,3 +1,35 @@
+Version 0.4.3
+~~~~~~~~~~~~~
+Released: 2000-02-02
+
+* Translations
+ - Updated Spanish translation (Daniel Mustieles)
+ - Updated Finnish translation (Ville-Pekka Vainio)
+ - Updated Swedish translation (Daniel Nylander)
+ - Updated Brazilian Portuguese translation (Og Maciel)
+
+* New Features:
+ - Don't spam the user with PackageManager messages, queue them and show another
+ menu item on the info status icon (Richard Hughes)
+
+* Bugfix:
+ - Fix typo in Russian translation. Fixes rh#481479 (Leonid Kanter)
+ - Don't infer precision we don't have when printing an estimated time (Richard Hughes)
+ - Make sure we set the icon and text of the client dialog after setup is called,
+ not before. Fixes rh#480908 (Richard Hughes)
+ - Stop abusing a PkPackageList as a list to store package_id's, as the PkInfoEnum
+ changes when we do a filter change. Fixes rh#481123 (Richard Hughes)
+ - Reset the client when we monitor a tid, else we ignore the second request when
+ the fist is running (Richard Hughes)
+ - When the user switches the task to monitor, re-use the existing monitor rather
+ than using a new window. Fixes half of rh#481293 (Richard Hughes)
+ - Disable the 'Apply updates' button when none are selected. Fixes fd#19779 (Richard Hughes)
+ - Ensure we select the first entry in the details treeview after we've got
+ the update list. Fixes fd#19780 (Richard Hughes)
+ - We don't use a PkControl action in gpk-update-viewer anymore, use the GpkClient
+ cancel method (Richard Hughes)
+ - Hook up the distro upgrade notification actions (Scott Reeves)
+
Version 0.4.2
~~~~~~~~~~~~~
Released: 2000-01-19
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Tue Feb 17 17:59:25 2009
@@ -1,6 +1,6 @@
AC_PREREQ(2.52)
-AC_INIT(gnome-packagekit, 0.4.3)
+AC_INIT(gnome-packagekit, 0.4.4)
AC_CONFIG_SRCDIR(src)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_CONFIG_HEADER(config.h)
@@ -50,6 +50,7 @@
CPPFLAGS="$CPPFLAGS -Wswitch-default"
CPPFLAGS="$CPPFLAGS -Winit-self"
CPPFLAGS="$CPPFLAGS -Wmissing-include-dirs"
+ CPPFLAGS="$CPPFLAGS -Wno-strict-aliasing"
CPPFLAGS="$CPPFLAGS -Wundef"
CPPFLAGS="$CPPFLAGS -Waggregate-return"
CPPFLAGS="$CPPFLAGS -Wmissing-format-attribute"
@@ -78,7 +79,7 @@
dnl ---------------------------------------------------------------------------
dnl - Library dependencies
dnl ---------------------------------------------------------------------------
-PACKAGEKIT_REQUIRED=0.3.11
+PACKAGEKIT_REQUIRED=0.4.4
GLIB_REQUIRED=2.14.0
GTK_REQUIRED=2.12.0
DBUS_REQUIRED=1.1.2
@@ -137,11 +138,6 @@
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
-PKG_CHECK_MODULES(LIBSEXY, \
- libsexy >= $LIBSEXY_REQUIRED)
-AC_SUBST(LIBSEXY_CFLAGS)
-AC_SUBST(LIBSEXY_LIBS)
-
PKG_CHECK_MODULES(LIBGLADE, \
libglade-2.0 >= $LIBGLADE_REQUIRED)
AC_SUBST(LIBGLADE_CFLAGS)
@@ -163,6 +159,17 @@
AC_SUBST(GNOME_MENUS_LIBS)
dnl ---------------------------------------------------------------------------
+dnl - Is a new enough GTK available for the SexyIconEntry replacement?
+dnl ---------------------------------------------------------------------------
+if $PKG_CONFIG --atleast-version 2.15.0 gtk+-2.0; then
+ echo "using built in replacement"
+else
+ PKG_CHECK_MODULES(LIBSEXY, libsexy >= $LIBSEXY_REQUIRED)
+ AC_SUBST(LIBSEXY_CFLAGS)
+ AC_SUBST(LIBSEXY_LIBS)
+fi
+
+dnl ---------------------------------------------------------------------------
dnl - Check for g_file_make_directory_with_parents
dnl ---------------------------------------------------------------------------
OLDCPPFLAGS=$CPPFLAGS
Modified: trunk/src/egg-console-kit.h
==============================================================================
--- trunk/src/egg-console-kit.h (original)
+++ trunk/src/egg-console-kit.h Tue Feb 17 17:59:25 2009
@@ -50,7 +50,7 @@
gboolean active);
} EggConsoleKitClass;
-GType egg_console_kit_get_type (void) G_GNUC_CONST;
+GType egg_console_kit_get_type (void);
EggConsoleKit *egg_console_kit_new (void);
gboolean egg_console_kit_is_local (EggConsoleKit *console);
gboolean egg_console_kit_is_active (EggConsoleKit *console);
Modified: trunk/src/egg-dbus-monitor.h
==============================================================================
--- trunk/src/egg-dbus-monitor.h (original)
+++ trunk/src/egg-dbus-monitor.h Tue Feb 17 17:59:25 2009
@@ -59,7 +59,7 @@
EGG_DBUS_MONITOR_SYSTEM
} EggDbusMonitorType;
-GType egg_dbus_monitor_get_type (void) G_GNUC_CONST;
+GType egg_dbus_monitor_get_type (void);
EggDbusMonitor *egg_dbus_monitor_new (void);
gboolean egg_dbus_monitor_assign (EggDbusMonitor *monitor,
EggDbusMonitorType bus_type,
Modified: trunk/src/gpk-animated-icon.c
==============================================================================
--- trunk/src/gpk-animated-icon.c (original)
+++ trunk/src/gpk-animated-icon.c Tue Feb 17 17:59:25 2009
@@ -128,8 +128,11 @@
static gboolean
gpk_animated_icon_update (GpkAnimatedIcon *icon)
{
+ static guint rate_limit = 0;
+
/* debug so we can catch polling */
- egg_debug ("polling check");
+ if (rate_limit++ % 20 == 0)
+ egg_debug ("polling check");
/* have we loaded a file */
if (icon->frames == NULL) {
Modified: trunk/src/gpk-animated-icon.h
==============================================================================
--- trunk/src/gpk-animated-icon.h (original)
+++ trunk/src/gpk-animated-icon.h Tue Feb 17 17:59:25 2009
@@ -53,7 +53,7 @@
GtkImageClass parent_class;
};
-GType gpk_animated_icon_get_type (void) G_GNUC_CONST;
+GType gpk_animated_icon_get_type (void);
GtkWidget *gpk_animated_icon_new (void);
gboolean gpk_animated_icon_set_filename_tile (GpkAnimatedIcon *icon,
GtkIconSize size,
Modified: trunk/src/gpk-application.c
==============================================================================
--- trunk/src/gpk-application.c (original)
+++ trunk/src/gpk-application.c Tue Feb 17 17:59:25 2009
@@ -27,12 +27,15 @@
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include <gconf/gconf-client.h>
-#include <libsexy/sexy-icon-entry.h>
#include <math.h>
#include <string.h>
#include <polkit-gnome/polkit-gnome.h>
#include <packagekit-glib/packagekit.h>
+#if !GTK_CHECK_VERSION(2,15,0)
+ #include <libsexy/sexy-icon-entry.h>
+#endif
+
#include "egg-debug.h"
#include "egg-string.h"
#include "egg-markdown.h"
@@ -1977,12 +1980,14 @@
gchar *string1, gchar *string2,
gint int1, gint int2, gpointer user_data)
{
- if (egg_strequal (name, "entry_text")) {
+ if (egg_strequal (name, "entry_text"))
+#if GTK_CHECK_VERSION(2,15,0)
+ return gtk_entry_new ();
+#else
return sexy_icon_entry_new ();
- }
- if (egg_strequal (name, "image_status")) {
+#endif
+ if (egg_strequal (name, "image_status"))
return gpk_animated_icon_new ();
- }
egg_warning ("name unknown='%s'", name);
return NULL;
}
@@ -2032,7 +2037,11 @@
/* TRANSLATORS: entry tooltip: basic search */
gtk_widget_set_tooltip_text (widget, _("Searching by name"));
icon = gtk_image_new_from_stock (GTK_STOCK_FIND, GTK_ICON_SIZE_MENU);
+#if GTK_CHECK_VERSION(2,15,0)
+ gtk_entry_set_icon_from_stock (GTK_ENTRY (widget), GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_FIND);
+#else
sexy_icon_entry_set_icon (SEXY_ICON_ENTRY (widget), SEXY_ICON_ENTRY_PRIMARY, GTK_IMAGE (icon));
+#endif
}
/**
@@ -2057,7 +2066,11 @@
/* TRANSLATORS: entry tooltip: detailed search */
gtk_widget_set_tooltip_text (widget, _("Searching by description"));
icon = gtk_image_new_from_stock (GTK_STOCK_EDIT, GTK_ICON_SIZE_MENU);
+#if GTK_CHECK_VERSION(2,15,0)
+ gtk_entry_set_icon_from_stock (GTK_ENTRY (widget), GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_EDIT);
+#else
sexy_icon_entry_set_icon (SEXY_ICON_ENTRY (widget), SEXY_ICON_ENTRY_PRIMARY, GTK_IMAGE (icon));
+#endif
}
/**
@@ -2082,14 +2095,26 @@
/* TRANSLATORS: entry tooltip: file search */
gtk_widget_set_tooltip_text (widget, _("Searching by file"));
icon = gtk_image_new_from_stock (GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU);
+#if GTK_CHECK_VERSION(2,15,0)
+ gtk_entry_set_icon_from_stock (GTK_ENTRY (widget), GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_OPEN);
+#else
sexy_icon_entry_set_icon (SEXY_ICON_ENTRY (widget), SEXY_ICON_ENTRY_PRIMARY, GTK_IMAGE (icon));
+#endif
}
+#if GTK_CHECK_VERSION(2,15,0)
+/**
+ * gpk_application_entry_text_icon_press_cb:
+ **/
+static void
+gpk_application_entry_text_icon_press_cb (GtkEntry *entry, GtkEntryIconPosition icon_pos, GdkEventButton *event, gpointer data)
+#else
/**
* gpk_application_entry_text_icon_pressed_cb:
**/
static void
gpk_application_entry_text_icon_pressed_cb (SexyIconEntry *entry, gint icon_pos, gint button, gpointer data)
+#endif
{
GtkMenu *menu = (GtkMenu*) gtk_menu_new ();
GtkWidget *item;
@@ -2099,8 +2124,13 @@
g_return_if_fail (PK_IS_APPLICATION (application));
/* only respond to left button */
+#if GTK_CHECK_VERSION(2,15,0)
+ if (event->button != 1)
+ return;
+#else
if (button != 1)
return;
+#endif
egg_debug ("icon_pos=%i", icon_pos);
@@ -2135,9 +2165,15 @@
}
gtk_widget_show_all (GTK_WIDGET (menu));
+#if GTK_CHECK_VERSION(2,15,0)
gtk_menu_popup (GTK_MENU (menu), NULL, NULL,
gpk_application_popup_position_menu, entry,
- 1, gtk_get_current_event_time());
+ event->button, event->time);
+#else
+ gtk_menu_popup (GTK_MENU (menu), NULL, NULL,
+ gpk_application_popup_position_menu, entry,
+ button, gtk_get_current_event_time());
+#endif
}
/**
@@ -2258,7 +2294,7 @@
gtk_window_set_default_icon_name (GPK_ICON_SOFTWARE_INSTALLER);
gtk_show_about_dialog (GTK_WINDOW (main_window),
"version", PACKAGE_VERSION,
- "copyright", "Copyright \xc2\xa9 2007-2008 Richard Hughes",
+ "copyright", "Copyright \xc2\xa9 2007-2009 Richard Hughes",
"license", license_trans,
"website-label", _("PackageKit Website"),
"website", "http://www.packagekit.org",
@@ -3338,11 +3374,21 @@
/* set focus on entry text */
gtk_widget_grab_focus (widget);
gtk_widget_show (widget);
+#if GTK_CHECK_VERSION(2,15,0)
+ gtk_entry_set_icon_sensitive (GTK_ENTRY (widget), GTK_ENTRY_ICON_PRIMARY, TRUE);
+#else
sexy_icon_entry_set_icon_highlight (SEXY_ICON_ENTRY (widget), SEXY_ICON_ENTRY_PRIMARY, TRUE);
+#endif
+
g_signal_connect (widget, "activate",
G_CALLBACK (gpk_application_find_cb), application);
+#if GTK_CHECK_VERSION(2,15,0)
+ g_signal_connect (widget, "icon-press",
+ G_CALLBACK (gpk_application_entry_text_icon_press_cb), application);
+#else
g_signal_connect (widget, "icon-pressed",
G_CALLBACK (gpk_application_entry_text_icon_pressed_cb), application);
+#endif
/* hide the filters we can't support */
if (pk_bitfield_contain (application->priv->filters, PK_FILTER_ENUM_INSTALLED) == FALSE) {
Modified: trunk/src/gpk-application.h
==============================================================================
--- trunk/src/gpk-application.h (original)
+++ trunk/src/gpk-application.h Tue Feb 17 17:59:25 2009
@@ -48,7 +48,7 @@
void (* action_close) (GpkApplication *application);
} GpkApplicationClass;
-GType gpk_application_get_type (void) G_GNUC_CONST;
+GType gpk_application_get_type (void);
GpkApplication *gpk_application_new (void);
void gpk_application_show (GpkApplication *application);
Modified: trunk/src/gpk-auto-refresh.h
==============================================================================
--- trunk/src/gpk-auto-refresh.h (original)
+++ trunk/src/gpk-auto-refresh.h Tue Feb 17 17:59:25 2009
@@ -48,7 +48,7 @@
GObjectClass parent_class;
} GpkAutoRefreshClass;
-GType gpk_auto_refresh_get_type (void) G_GNUC_CONST;
+GType gpk_auto_refresh_get_type (void);
GpkAutoRefresh *gpk_auto_refresh_new (void);
gboolean gpk_auto_refresh_get_on_battery (GpkAutoRefresh *arefresh);
Modified: trunk/src/gpk-cell-renderer-uri.h
==============================================================================
--- trunk/src/gpk-cell-renderer-uri.h (original)
+++ trunk/src/gpk-cell-renderer-uri.h Tue Feb 17 17:59:25 2009
@@ -51,7 +51,7 @@
const gchar *uri);
};
-GType gpk_cell_renderer_uri_get_type (void) G_GNUC_CONST;
+GType gpk_cell_renderer_uri_get_type (void);
GtkCellRenderer *gpk_cell_renderer_uri_new (void);
G_END_DECLS
Modified: trunk/src/gpk-check-update.c
==============================================================================
--- trunk/src/gpk-check-update.c (original)
+++ trunk/src/gpk-check-update.c Tue Feb 17 17:59:25 2009
@@ -212,7 +212,7 @@
gtk_window_set_default_icon_name (GPK_ICON_SOFTWARE_UPDATE);
gtk_show_about_dialog (NULL,
"version", VERSION,
- "copyright", "Copyright \xc2\xa9 2007-2008 Richard Hughes",
+ "copyright", "Copyright \xc2\xa9 2007-2009 Richard Hughes",
"license", license_trans,
/* TRANSLATORS: website label */
"website-label", _("PackageKit Website"),
Modified: trunk/src/gpk-check-update.h
==============================================================================
--- trunk/src/gpk-check-update.h (original)
+++ trunk/src/gpk-check-update.h Tue Feb 17 17:59:25 2009
@@ -48,7 +48,7 @@
GObjectClass parent_class;
} GpkCheckUpdateClass;
-GType gpk_check_update_get_type (void) G_GNUC_CONST;
+GType gpk_check_update_get_type (void);
GpkCheckUpdate *gpk_check_update_new (void);
G_END_DECLS
Modified: trunk/src/gpk-client-chooser.c
==============================================================================
--- trunk/src/gpk-client-chooser.c (original)
+++ trunk/src/gpk-client-chooser.c Tue Feb 17 17:59:25 2009
@@ -237,6 +237,7 @@
/* 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);
/* use PkDesktop to get better icon */
desktop = pk_desktop_new ();
@@ -268,6 +269,14 @@
g_object_unref (desktop);
+ /* hide the filter box */
+ 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);
+
/* show window */
widget = glade_xml_get_widget (glade_xml, "dialog_simple");
gtk_widget_show (widget);
Modified: trunk/src/gpk-client-dialog.c
==============================================================================
--- trunk/src/gpk-client-dialog.c (original)
+++ trunk/src/gpk-client-dialog.c Tue Feb 17 17:59:25 2009
@@ -358,11 +358,13 @@
gpk_client_dialog_pulse_progress (GpkClientDialog *dialog)
{
GtkWidget *widget;
-
+ static guint rate_limit = 0;
+
g_return_val_if_fail (GPK_IS_CLIENT_DIALOG (dialog), FALSE);
/* debug so we can catch polling */
- egg_debug ("polling check");
+ if (rate_limit++ % 20 == 0)
+ egg_debug ("polling check");
widget = glade_xml_get_widget (dialog->priv->glade_xml, "progressbar_percent");
gtk_progress_bar_pulse (GTK_PROGRESS_BAR (widget));
Modified: trunk/src/gpk-client-dialog.h
==============================================================================
--- trunk/src/gpk-client-dialog.h (original)
+++ trunk/src/gpk-client-dialog.h Tue Feb 17 17:59:25 2009
@@ -87,7 +87,7 @@
};
GQuark gpk_client_dialog_error_quark (void);
-GType gpk_client_dialog_get_type (void) G_GNUC_CONST;
+GType gpk_client_dialog_get_type (void);
GpkClientDialog *gpk_client_dialog_new (void);
gboolean gpk_client_dialog_present (GpkClientDialog *dialog);
Modified: trunk/src/gpk-client.c
==============================================================================
--- trunk/src/gpk-client.c (original)
+++ trunk/src/gpk-client.c Tue Feb 17 17:59:25 2009
@@ -594,10 +594,10 @@
}
/**
- * pk_client_button_close_cb:
+ * gpk_client_button_close_cb:
**/
static void
-pk_client_button_close_cb (GtkWidget *widget, GpkClient *gclient)
+gpk_client_button_close_cb (GtkWidget *widget, GpkClient *gclient)
{
/* stop the timers if running */
if (gclient->priv->finished_timer_id != 0)
@@ -608,20 +608,50 @@
}
/**
- * pk_client_button_cancel_cb:
+ * pk_client_cancel:
**/
-static void
-pk_client_button_cancel_cb (GtkWidget *widget, GpkClient *gclient)
+gboolean
+gpk_client_cancel (GpkClient *gclient, GError **error)
{
gboolean ret;
- GError *error = NULL;
+ GError *error_local = NULL;
/* we might have a transaction running */
- ret = pk_client_cancel (gclient->priv->client_action, &error);
+ ret = pk_client_cancel (gclient->priv->client_action, &error_local);
if (!ret) {
- egg_warning ("failed to cancel client: %s", error->message);
- g_error_free (error);
+ egg_warning ("failed to cancel client: %s", error_local->message);
+ if (error != NULL)
+ *error = g_error_new (GPK_CLIENT_ERROR, GPK_CLIENT_ERROR_FAILED, "failed to cancel: %s", error_local->message);
+ g_error_free (error_local);
+ goto out;
+ }
+ ret = pk_client_cancel (gclient->priv->client_resolve, &error_local);
+ if (!ret) {
+ egg_warning ("failed to cancel client: %s", error_local->message);
+ if (error != NULL)
+ *error = g_error_new (GPK_CLIENT_ERROR, GPK_CLIENT_ERROR_FAILED, "failed to cancel: %s", error_local->message);
+ g_error_free (error_local);
+ goto out;
}
+ ret = pk_client_cancel (gclient->priv->client_secondary, &error_local);
+ if (!ret) {
+ egg_warning ("failed to cancel client: %s", error_local->message);
+ if (error != NULL)
+ *error = g_error_new (GPK_CLIENT_ERROR, GPK_CLIENT_ERROR_FAILED, "failed to cancel: %s", error_local->message);
+ g_error_free (error_local);
+ goto out;
+ }
+out:
+ return ret;
+}
+
+/**
+ * gpk_client_button_cancel_cb:
+ **/
+static void
+gpk_client_button_cancel_cb (GtkWidget *widget, GpkClient *gclient)
+{
+ gpk_client_cancel (gclient, NULL);
}
/**
@@ -3798,9 +3828,9 @@
gclient->priv->dialog = gpk_client_dialog_new ();
gpk_client_dialog_set_window_icon (gclient->priv->dialog, "pk-package-installed");
g_signal_connect (gclient->priv->dialog, "cancel",
- G_CALLBACK (pk_client_button_cancel_cb), gclient);
+ G_CALLBACK (gpk_client_button_cancel_cb), gclient);
g_signal_connect (gclient->priv->dialog, "close",
- G_CALLBACK (pk_client_button_close_cb), gclient);
+ G_CALLBACK (gpk_client_button_close_cb), gclient);
/* map ISO639 to language names */
gclient->priv->language = gpk_language_new ();
Modified: trunk/src/gpk-client.h
==============================================================================
--- trunk/src/gpk-client.h (original)
+++ trunk/src/gpk-client.h Tue Feb 17 17:59:25 2009
@@ -99,7 +99,7 @@
};
GQuark gpk_client_error_quark (void);
-GType gpk_client_get_type (void) G_GNUC_CONST;
+GType gpk_client_get_type (void);
GType gpk_client_error_get_type (void);
GpkClient *gpk_client_new (void);
@@ -148,6 +148,8 @@
gchar **gpk_client_get_file_list (GpkClient *gclient,
const gchar *package_id,
GError **error);
+gboolean gpk_client_cancel (GpkClient *gclient,
+ GError **error);
gboolean gpk_client_monitor_tid (GpkClient *gclient,
const gchar *tid);
gboolean gpk_client_set_parent (GpkClient *gclient,
Modified: trunk/src/gpk-dbus.h
==============================================================================
--- trunk/src/gpk-dbus.h (original)
+++ trunk/src/gpk-dbus.h Tue Feb 17 17:59:25 2009
@@ -60,8 +60,8 @@
} GpkDbusError;
GQuark gpk_dbus_error_quark (void);
-GType gpk_dbus_error_get_type (void) G_GNUC_CONST;
-GType gpk_dbus_get_type (void) G_GNUC_CONST;
+GType gpk_dbus_error_get_type (void);
+GType gpk_dbus_get_type (void);
GpkDbus *gpk_dbus_new (void);
void gpk_dbus_install_local_file (GpkDbus *dbus,
Modified: trunk/src/gpk-enum.c
==============================================================================
--- trunk/src/gpk-enum.c (original)
+++ trunk/src/gpk-enum.c Tue Feb 17 17:59:25 2009
@@ -1250,7 +1250,7 @@
break;
case PK_ROLE_ENUM_SEARCH_DETAILS:
/* TRANSLATORS: The role of the transaction, in past tense */
- text = _("Got details");
+ text = _("Searched for package details");
break;
case PK_ROLE_ENUM_SEARCH_FILE:
/* TRANSLATORS: The role of the transaction, in past tense */
Modified: trunk/src/gpk-firmware.h
==============================================================================
--- trunk/src/gpk-firmware.h (original)
+++ trunk/src/gpk-firmware.h Tue Feb 17 17:59:25 2009
@@ -48,7 +48,7 @@
GObjectClass parent_class;
} GpkFirmwareClass;
-GType gpk_firmware_get_type (void) G_GNUC_CONST;
+GType gpk_firmware_get_type (void);
GpkFirmware *gpk_firmware_new (void);
G_END_DECLS
Modified: trunk/src/gpk-hardware.h
==============================================================================
--- trunk/src/gpk-hardware.h (original)
+++ trunk/src/gpk-hardware.h Tue Feb 17 17:59:25 2009
@@ -48,7 +48,7 @@
GObjectClass parent_class;
} GpkHardwareClass;
-GType gpk_hardware_get_type (void) G_GNUC_CONST;
+GType gpk_hardware_get_type (void);
GpkHardware *gpk_hardware_new (void);
G_END_DECLS
Modified: trunk/src/gpk-inhibit.h
==============================================================================
--- trunk/src/gpk-inhibit.h (original)
+++ trunk/src/gpk-inhibit.h Tue Feb 17 17:59:25 2009
@@ -48,7 +48,7 @@
GObjectClass parent_class;
} GpkInhibitClass;
-GType gpk_inhibit_get_type (void) G_GNUC_CONST;
+GType gpk_inhibit_get_type (void);
GpkInhibit *gpk_inhibit_new (void);
gboolean gpk_inhibit_create (GpkInhibit *inhibit);
gboolean gpk_inhibit_remove (GpkInhibit *inhibit);
Modified: trunk/src/gpk-language.h
==============================================================================
--- trunk/src/gpk-language.h (original)
+++ trunk/src/gpk-language.h Tue Feb 17 17:59:25 2009
@@ -48,7 +48,7 @@
GObjectClass parent_class;
} GpkLanguageClass;
-GType gpk_language_get_type (void) G_GNUC_CONST;
+GType gpk_language_get_type (void);
GpkLanguage *gpk_language_new (void);
gboolean gpk_language_populate (GpkLanguage *language,
GError **error);
Modified: trunk/src/gpk-log.c
==============================================================================
--- trunk/src/gpk-log.c (original)
+++ trunk/src/gpk-log.c Tue Feb 17 17:59:25 2009
@@ -344,8 +344,8 @@
/* --- column for details --- */
renderer = gtk_cell_renderer_text_new ();
g_object_set (renderer, "yalign", 0.0, NULL);
- g_object_set(renderer, "wrap-mode", PANGO_WRAP_WORD, NULL);
- g_object_set(renderer, "wrap-width", 400, NULL);
+ g_object_set (renderer, "wrap-mode", PANGO_WRAP_WORD, NULL);
+ g_object_set (renderer, "wrap-width", 400, NULL);
g_signal_connect (treeview, "size-allocate", G_CALLBACK (gpk_log_treeview_size_allocate_cb), renderer);
/* TRANSLATORS: column for what packages were upgraded */
column = gtk_tree_view_column_new_with_attributes (_("Details"), renderer,
Modified: trunk/src/gpk-smart-icon.h
==============================================================================
--- trunk/src/gpk-smart-icon.h (original)
+++ trunk/src/gpk-smart-icon.h Tue Feb 17 17:59:25 2009
@@ -49,7 +49,7 @@
GtkStatusIconClass parent_class;
} GpkSmartIconClass;
-GType gpk_smart_icon_get_type (void) G_GNUC_CONST;
+GType gpk_smart_icon_get_type (void);
GpkSmartIcon *gpk_smart_icon_new (void);
gboolean gpk_smart_icon_pulse (GpkSmartIcon *sicon);
gboolean gpk_smart_icon_set_icon_name (GpkSmartIcon *sicon,
Modified: trunk/src/gpk-update-viewer.c
==============================================================================
--- trunk/src/gpk-update-viewer.c (original)
+++ trunk/src/gpk-update-viewer.c Tue Feb 17 17:59:25 2009
@@ -51,11 +51,11 @@
#include "gpk-client.h"
#include "gpk-enum.h"
+static GMainLoop *loop = NULL;
static GladeXML *glade_xml = NULL;
static GtkListStore *list_store_preview = NULL;
static GtkListStore *list_store_details = NULL;
static GtkListStore *list_store_description = NULL;
-static PkClient *client_action = NULL;
static PkClient *client_query = NULL;
static PkControl *control = NULL;
static PkTaskList *tlist = NULL;
@@ -429,13 +429,21 @@
GError *error = NULL;
/* we might have a transaction running */
- ret = pk_client_cancel (client_action, &error);
+ ret = gpk_client_cancel (gclient, &error);
if (!ret) {
egg_warning ("failed to cancel client: %s", error->message);
g_error_free (error);
}
+ g_main_loop_quit (loop);
+}
- gtk_main_quit ();
+/**
+ * gpk_update_viewer_button_close:
+ **/
+static void
+gpk_update_viewer_button_close (GtkWidget *widget, gpointer data)
+{
+ g_main_loop_quit (loop);
}
/**
@@ -962,6 +970,27 @@
}
/**
+ * gpk_update_viewer_reconsider_update_packages_button:
+ **/
+static void
+gpk_update_viewer_reconsider_update_packages_button (GtkTreeModel *model)
+{
+ GtkTreeIter iter;
+ gboolean valid;
+ gboolean selected;
+
+ /* if there are no entries selected, deselect the button */
+ valid = gtk_tree_model_get_iter_first (model, &iter);
+ while (valid) {
+ gtk_tree_model_get (model, &iter, PACKAGES_COLUMN_SELECT, &selected, -1);
+ if (selected)
+ break;
+ valid = gtk_tree_model_iter_next (model, &iter);
+ }
+ polkit_gnome_action_set_sensitive (update_packages_action, valid);
+}
+
+/**
* gpk_update_viewer_treeview_update_toggled:
**/
static void
@@ -989,6 +1018,9 @@
/* clean up */
gtk_tree_path_free (path);
+
+ /* if there are no entries selected, deselect the button */
+ gpk_update_viewer_reconsider_update_packages_button (model);
}
/**
@@ -1328,6 +1360,8 @@
gpk_update_viewer_finished_cb (PkClient *client, PkExitEnum exit, guint runtime, gpointer data)
{
GtkWidget *widget;
+ GtkTreePath *path;
+ GtkTreeSelection *selection;
PkRoleEnum role;
PkRestartEnum restart;
PkPackageList *list;
@@ -1340,6 +1374,16 @@
gpk_update_viewer_description_animation_stop ();
}
+ /* select the first entry in the updates list */
+ if (role == PK_ROLE_ENUM_GET_UPDATES) {
+ widget = glade_xml_get_widget (glade_xml, "treeview_updates");
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (widget));
+ gtk_tree_selection_unselect_all (selection);
+ path = gtk_tree_path_new_first ();
+ gtk_tree_selection_select_path (selection, path);
+ gtk_tree_path_free (path);
+ }
+
/* stop the throbber */
gpk_update_viewer_preview_animation_stop ();
@@ -1506,6 +1550,9 @@
PACKAGES_COLUMN_SELECT, TRUE, -1);
valid = gtk_tree_model_iter_next (model, &iter);
}
+
+ /* if there are no entries selected, deselect the button */
+ gpk_update_viewer_reconsider_update_packages_button (model);
}
/**
@@ -1528,6 +1575,9 @@
PACKAGES_COLUMN_SELECT, FALSE, -1);
valid = gtk_tree_model_iter_next (model, &iter);
}
+
+ /* if there are no entries selected, deselect the button */
+ gpk_update_viewer_reconsider_update_packages_button (model);
}
/**
@@ -1885,19 +1935,6 @@
g_signal_connect (client_query, "error-code",
G_CALLBACK (gpk_update_viewer_error_code_cb), NULL);
- client_action = pk_client_new ();
- pk_client_set_use_buffer (client_action, TRUE, NULL);
- g_signal_connect (client_action, "package",
- G_CALLBACK (gpk_update_viewer_package_cb), NULL);
- g_signal_connect (client_action, "finished",
- G_CALLBACK (gpk_update_viewer_finished_cb), NULL);
- g_signal_connect (client_action, "progress-changed",
- G_CALLBACK (gpk_update_viewer_progress_changed_cb), NULL);
- g_signal_connect (client_action, "status-changed",
- G_CALLBACK (gpk_update_viewer_status_changed_cb), NULL);
- g_signal_connect (client_action, "error-code",
- G_CALLBACK (gpk_update_viewer_error_code_cb), NULL);
-
/* get actions */
roles = pk_control_get_actions (control, NULL);
@@ -1922,21 +1959,19 @@
gtk_widget_hide (widget);
/* Get the main window quit */
- g_signal_connect_swapped (main_window, "delete_event", G_CALLBACK (gtk_main_quit), NULL);
+ g_signal_connect (main_window, "delete_event", G_CALLBACK (gpk_update_viewer_button_close), NULL);
/* button_close2 and button_close3 are on the overview/review
* screens, where we want to cancel transactions when closing
*/
widget = glade_xml_get_widget (glade_xml, "button_close2");
- g_signal_connect (widget, "clicked",
- G_CALLBACK (gpk_update_viewer_button_close_and_cancel_cb), NULL);
+ g_signal_connect (widget, "clicked", G_CALLBACK (gpk_update_viewer_button_close_and_cancel_cb), NULL);
widget = glade_xml_get_widget (glade_xml, "button_close3");
- g_signal_connect (widget, "clicked",
- G_CALLBACK (gpk_update_viewer_button_close_and_cancel_cb), NULL);
+ g_signal_connect (widget, "clicked", G_CALLBACK (gpk_update_viewer_button_close_and_cancel_cb), NULL);
/* normal close buttons */
widget = glade_xml_get_widget (glade_xml, "button_close4");
- g_signal_connect_swapped (widget, "clicked", G_CALLBACK (gtk_main_quit), NULL);
+ g_signal_connect (widget, "clicked", G_CALLBACK (gpk_update_viewer_button_close), NULL);
/* connect up PolicyKit actions */
g_signal_connect (refresh_action, "activate",
@@ -2041,7 +2076,8 @@
gpk_update_viewer_get_new_update_list ();
/* wait */
- gtk_main ();
+ loop = g_main_loop_new (NULL, FALSE);
+ g_main_loop_run (loop);
/* we might have visual stuff running, close it down */
ret = pk_client_cancel (client_query, &error);
@@ -2050,6 +2086,7 @@
g_error_free (error);
}
+ g_main_loop_unref (loop);
g_object_unref (glade_xml);
g_object_unref (list_store_preview);
g_object_unref (list_store_description);
@@ -2058,7 +2095,6 @@
g_object_unref (control);
g_object_unref (markdown);
g_object_unref (client_query);
- g_object_unref (client_action);
g_free (cached_package_id);
unique_out:
g_object_unref (egg_unique);
Modified: trunk/src/gpk-vendor.h
==============================================================================
--- trunk/src/gpk-vendor.h (original)
+++ trunk/src/gpk-vendor.h Tue Feb 17 17:59:25 2009
@@ -60,7 +60,7 @@
GPK_VENDOR_URL_TYPE_DEFAULT
} GpkVendorUrlType;
-GType gpk_vendor_get_type (void) G_GNUC_CONST;
+GType gpk_vendor_get_type (void);
GpkVendor *gpk_vendor_new (void);
gchar *gpk_vendor_get_not_found_url (GpkVendor *vendor,
GpkVendorUrlType type);
Modified: trunk/src/gpk-watch.c
==============================================================================
--- trunk/src/gpk-watch.c (original)
+++ trunk/src/gpk-watch.c Tue Feb 17 17:59:25 2009
@@ -689,7 +689,7 @@
gtk_window_set_default_icon_name (GPK_ICON_SOFTWARE_LOG);
gtk_show_about_dialog (NULL,
"version", VERSION,
- "copyright", "Copyright \xc2\xa9 2007-2008 Richard Hughes",
+ "copyright", "Copyright \xc2\xa9 2007-2009 Richard Hughes",
"license", license_trans,
"website-label", _("PackageKit Website"),
"website", "www.packagekit.org",
@@ -810,6 +810,10 @@
/* column for text */
renderer = gtk_cell_renderer_text_new ();
+ g_object_set (renderer, "yalign", 0.0, NULL);
+ g_object_set (renderer, "wrap-mode", PANGO_WRAP_WORD, NULL);
+ g_object_set (renderer, "wrap-width", 400, NULL);
+
/* TRANSLATORS: column for the message type */
column = gtk_tree_view_column_new_with_attributes (_("Message"), renderer,
"markup", GPK_WATCH_COLUMN_TEXT, NULL);
@@ -818,6 +822,10 @@
/* column for details */
renderer = gtk_cell_renderer_text_new ();
+ g_object_set (renderer, "yalign", 0.0, NULL);
+ g_object_set (renderer, "wrap-mode", PANGO_WRAP_WORD, NULL);
+ g_object_set (renderer, "wrap-width", 400, NULL);
+
/* TRANSLATORS: column for the message description */
column = gtk_tree_view_column_new_with_attributes (_("Details"), renderer,
"markup", GPK_WATCH_COLUMN_DETAILS, NULL);
Modified: trunk/src/gpk-watch.h
==============================================================================
--- trunk/src/gpk-watch.h (original)
+++ trunk/src/gpk-watch.h Tue Feb 17 17:59:25 2009
@@ -48,7 +48,7 @@
GObjectClass parent_class;
} GpkWatchClass;
-GType gpk_watch_get_type (void) G_GNUC_CONST;
+GType gpk_watch_get_type (void);
GpkWatch *gpk_watch_new (void);
G_END_DECLS
Modified: trunk/src/gpk-x11.h
==============================================================================
--- trunk/src/gpk-x11.h (original)
+++ trunk/src/gpk-x11.h Tue Feb 17 17:59:25 2009
@@ -49,7 +49,7 @@
GObjectClass parent_class;
} GpkX11Class;
-GType gpk_x11_get_type (void) G_GNUC_CONST;
+GType gpk_x11_get_type (void);
GpkX11 *gpk_x11_new (void);
gboolean gpk_x11_set_xid (GpkX11 *x11,
guint32 xid);
Modified: trunk/src/org.freedesktop.PackageKit.xml
==============================================================================
--- trunk/src/org.freedesktop.PackageKit.xml (original)
+++ trunk/src/org.freedesktop.PackageKit.xml Tue Feb 17 17:59:25 2009
@@ -345,7 +345,7 @@
<doc:summary>
<doc:para>
An array of codecs descriptors from <doc:tt>pk-gstreamer-install</doc:tt>, e.g.
- <doc:tt>Advanced Streaming Format (ASF) demuxer|gstreamer0.10(decoder-video/x-ms-asf)</doc:tt>
+ <doc:tt>Advanced Streaming Format (ASF) demuxer|decoder-video/x-ms-asf</doc:tt>
</doc:para>
</doc:summary>
</doc:doc>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]