gnome-packagekit r376 - in trunk: . data data/icons/16x16/status data/icons/22x22/status data/icons/24x24/status data/icons/48x48/status data/icons/scalable/status src



Author: rhughes
Date: Mon Oct 20 11:59:51 2008
New Revision: 376
URL: http://svn.gnome.org/viewvc/gnome-packagekit?rev=376&view=rev

Log:
from git

Modified:
   trunk/configure.ac
   trunk/data/gpk-application.glade
   trunk/data/gpk-log.desktop.in
   trunk/data/gpk-prefs.desktop.in
   trunk/data/gpk-repo.desktop.in
   trunk/data/gpk-service-pack.desktop.in
   trunk/data/icons/16x16/status/Makefile.am
   trunk/data/icons/22x22/status/Makefile.am
   trunk/data/icons/24x24/status/Makefile.am
   trunk/data/icons/48x48/status/Makefile.am
   trunk/data/icons/scalable/status/Makefile.am
   trunk/src/gpk-application.c
   trunk/src/gpk-client-chooser.c
   trunk/src/gpk-client-run.c
   trunk/src/gpk-common.c
   trunk/src/gpk-common.h
   trunk/src/gpk-enum.c
   trunk/src/gpk-log.c
   trunk/src/gpk-repo.c
   trunk/src/gpk-service-pack.c

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Mon Oct 20 11:59:51 2008
@@ -77,7 +77,7 @@
 dnl ---------------------------------------------------------------------------
 dnl - Check library dependencies
 dnl ---------------------------------------------------------------------------
-PKG_CHECK_MODULES(PACKAGEKIT, packagekit >= $PACKAGEKIT_REQUIRED)
+PKG_CHECK_MODULES(PACKAGEKIT, packagekit-glib >= $PACKAGEKIT_REQUIRED)
 AC_SUBST(PACKAGEKIT_CFLAGS)
 AC_SUBST(PACKAGEKIT_LIBS)
 

Modified: trunk/data/gpk-application.glade
==============================================================================
--- trunk/data/gpk-application.glade	(original)
+++ trunk/data/gpk-application.glade	Mon Oct 20 11:59:51 2008
@@ -693,7 +693,7 @@
                               </widget>
                             </child>
                             <child>
-                              <widget class="GtkHBox" id="hbox2">
+                              <widget class="GtkHBox" id="hbox_packages">
                                 <property name="visible">True</property>
                                 <property name="spacing">6</property>
                                 <property name="homogeneous">True</property>
@@ -702,7 +702,7 @@
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                                    <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                                    <property name="vscrollbar_policy">GTK_POLICY_NEVER</property>
                                     <property name="shadow_type">GTK_SHADOW_IN</property>
                                     <child>
                                       <widget class="GtkTextView" id="textview_description">
@@ -720,7 +720,7 @@
                                   <widget class="GtkScrolledWindow" id="scrolledwindow_detail">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
-                                    <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+                                    <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
                                     <property name="vscrollbar_policy">GTK_POLICY_NEVER</property>
                                     <property name="shadow_type">GTK_SHADOW_IN</property>
                                     <child>
@@ -732,7 +732,6 @@
                                     </child>
                                   </widget>
                                   <packing>
-                                    <property name="expand">False</property>
                                     <property name="position">1</property>
                                   </packing>
                                 </child>

Modified: trunk/data/gpk-log.desktop.in
==============================================================================
--- trunk/data/gpk-log.desktop.in	(original)
+++ trunk/data/gpk-log.desktop.in	Mon Oct 20 11:59:51 2008
@@ -3,7 +3,7 @@
 _Name=Software Log Viewer
 _GenericName=Software Log Viewer
 _Comment=View past package management tasks
-Icon=x-system-software-log
+Icon=gpk-log
 Exec=gpk-log
 Terminal=false
 Type=Application

Modified: trunk/data/gpk-prefs.desktop.in
==============================================================================
--- trunk/data/gpk-prefs.desktop.in	(original)
+++ trunk/data/gpk-prefs.desktop.in	Mon Oct 20 11:59:51 2008
@@ -3,7 +3,7 @@
 _Name=Software Updates
 _GenericName=Software Updates
 _Comment=Change software update preferences
-Icon=x-system-software-update-preferences
+Icon=gpk-prefs
 Exec=gpk-prefs
 Terminal=false
 Type=Application

Modified: trunk/data/gpk-repo.desktop.in
==============================================================================
--- trunk/data/gpk-repo.desktop.in	(original)
+++ trunk/data/gpk-repo.desktop.in	Mon Oct 20 11:59:51 2008
@@ -3,7 +3,7 @@
 _Name=Software Sources
 _GenericName=Software Sources
 _Comment=Enable or disable software sources
-Icon=x-system-software-sources
+Icon=gpk-repo
 Exec=gpk-repo
 Terminal=false
 Type=Application

Modified: trunk/data/gpk-service-pack.desktop.in
==============================================================================
--- trunk/data/gpk-service-pack.desktop.in	(original)
+++ trunk/data/gpk-service-pack.desktop.in	Mon Oct 20 11:59:51 2008
@@ -3,7 +3,7 @@
 _Name=Service Pack Creator
 _GenericName=Service Pack Creator
 _Comment=Create service packs for sharing with other computers
-Icon=x-system-software-sources
+Icon=gpk-service-pack
 Exec=gpk-service-pack
 Terminal=false
 Type=Application

Modified: trunk/data/icons/16x16/status/Makefile.am
==============================================================================
--- trunk/data/icons/16x16/status/Makefile.am	(original)
+++ trunk/data/icons/16x16/status/Makefile.am	Mon Oct 20 11:59:51 2008
@@ -26,14 +26,20 @@
 	pk-update-security.png		\
 	pk-refresh-cache.png		\
 	pk-rollback.png			\
+	pk-service-pack.png		\
 	pk-setup.png			\
 	pk-wait.png
 
 install-data-hook:
 	mkdir -p $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps;
-	ln -fs $(iconsdir)/pk-package-sources.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/x-system-software-sources.png;
-	ln -fs $(iconsdir)/pk-package-info.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/x-system-software-log.png;
-	ln -fs $(iconsdir)/pk-update-high.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/x-system-software-update-preferences.png;
+	mkdir -p $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/mimetypes;
+	ln -fs $(iconsdir)/pk-package-sources.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/gpk-repo.png;
+	ln -fs $(iconsdir)/pk-package-info.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/gpk-log.png;
+	ln -fs $(iconsdir)/pk-update-high.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/gpk-prefs.png;
+	ln -fs $(iconsdir)/pk-service-pack.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/gpk-service-pack.png;
+	ln -fs $(iconsdir)/pk-service-pack.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/mimetypes/application-x-servicepack.png;
+	ln -fs $(iconsdir)/pk-package-info.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/mimetypes/application-x-package-list.png;
+	ln -fs $(iconsdir)/pk-collection-installed.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/mimetypes/application-x-catalog.png;
 
 EXTRA_DIST =				\
 	$(icons_DATA)

Modified: trunk/data/icons/22x22/status/Makefile.am
==============================================================================
--- trunk/data/icons/22x22/status/Makefile.am	(original)
+++ trunk/data/icons/22x22/status/Makefile.am	Mon Oct 20 11:59:51 2008
@@ -26,14 +26,20 @@
 	pk-update-security.png		\
 	pk-refresh-cache.png		\
 	pk-rollback.png			\
+	pk-service-pack.png		\
 	pk-setup.png			\
 	pk-wait.png
 
 install-data-hook:
 	mkdir -p $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps;
-	ln -fs $(iconsdir)/pk-package-sources.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/x-system-software-sources.png;
-	ln -fs $(iconsdir)/pk-package-info.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/x-system-software-log.png;
-	ln -fs $(iconsdir)/pk-update-high.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/x-system-software-update-preferences.png;
+	mkdir -p $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/mimetypes;
+	ln -fs $(iconsdir)/pk-package-sources.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/gpk-repo.png;
+	ln -fs $(iconsdir)/pk-package-info.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/gpk-log.png;
+	ln -fs $(iconsdir)/pk-update-high.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/gpk-prefs.png;
+	ln -fs $(iconsdir)/pk-service-pack.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/gpk-service-pack.png;
+	ln -fs $(iconsdir)/pk-service-pack.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/mimetypes/application-x-servicepack.png;
+	ln -fs $(iconsdir)/pk-package-info.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/mimetypes/application-x-package-list.png;
+	ln -fs $(iconsdir)/pk-collection-installed.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/mimetypes/application-x-catalog.png;
 
 EXTRA_DIST =				\
 	$(icons_DATA)

Modified: trunk/data/icons/24x24/status/Makefile.am
==============================================================================
--- trunk/data/icons/24x24/status/Makefile.am	(original)
+++ trunk/data/icons/24x24/status/Makefile.am	Mon Oct 20 11:59:51 2008
@@ -26,14 +26,20 @@
 	pk-update-security.png		\
 	pk-refresh-cache.png		\
 	pk-rollback.png			\
+	pk-service-pack.png		\
 	pk-setup.png			\
 	pk-wait.png
 
 install-data-hook:
 	mkdir -p $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps;
-	ln -fs $(iconsdir)/pk-package-sources.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/x-system-software-sources.png;
-	ln -fs $(iconsdir)/pk-package-info.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/x-system-software-log.png;
-	ln -fs $(iconsdir)/pk-update-high.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/x-system-software-update-preferences.png;
+	mkdir -p $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/mimetypes;
+	ln -fs $(iconsdir)/pk-package-sources.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/gpk-repo.png;
+	ln -fs $(iconsdir)/pk-package-info.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/gpk-log.png;
+	ln -fs $(iconsdir)/pk-update-high.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/gpk-prefs.png;
+	ln -fs $(iconsdir)/pk-service-pack.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/gpk-service-pack.png;
+	ln -fs $(iconsdir)/pk-service-pack.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/mimetypes/application-x-servicepack.png;
+	ln -fs $(iconsdir)/pk-package-info.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/mimetypes/application-x-package-list.png;
+	ln -fs $(iconsdir)/pk-collection-installed.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/mimetypes/application-x-catalog.png;
 
 EXTRA_DIST =				\
 	$(icons_DATA)

Modified: trunk/data/icons/48x48/status/Makefile.am
==============================================================================
--- trunk/data/icons/48x48/status/Makefile.am	(original)
+++ trunk/data/icons/48x48/status/Makefile.am	Mon Oct 20 11:59:51 2008
@@ -26,14 +26,20 @@
 	pk-update-security.png		\
 	pk-refresh-cache.png		\
 	pk-rollback.png			\
+	pk-service-pack.png		\
 	pk-setup.png			\
 	pk-wait.png
 
 install-data-hook:
 	mkdir -p $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps;
-	ln -fs $(iconsdir)/pk-package-sources.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/x-system-software-sources.png;
-	ln -fs $(iconsdir)/pk-package-info.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/x-system-software-log.png;
-	ln -fs $(iconsdir)/pk-update-high.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/x-system-software-update-preferences.png;
+	mkdir -p $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/mimetypes;
+	ln -fs $(iconsdir)/pk-package-sources.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/gpk-repo.png;
+	ln -fs $(iconsdir)/pk-package-info.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/gpk-log.png;
+	ln -fs $(iconsdir)/pk-update-high.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/gpk-prefs.png;
+	ln -fs $(iconsdir)/pk-service-pack.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/gpk-service-pack.png;
+	ln -fs $(iconsdir)/pk-service-pack.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/mimetypes/application-x-servicepack.png;
+	ln -fs $(iconsdir)/pk-package-info.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/mimetypes/application-x-package-list.png;
+	ln -fs $(iconsdir)/pk-collection-installed.png $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/mimetypes/application-x-catalog.png;
 
 EXTRA_DIST =				\
 	$(icons_DATA)

Modified: trunk/data/icons/scalable/status/Makefile.am
==============================================================================
--- trunk/data/icons/scalable/status/Makefile.am	(original)
+++ trunk/data/icons/scalable/status/Makefile.am	Mon Oct 20 11:59:51 2008
@@ -31,9 +31,12 @@
 
 install-data-hook:
 	mkdir -p $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps;
-	ln -fs $(iconsdir)/pk-package-sources.svg $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/x-system-software-sources.svg;
-	ln -fs $(iconsdir)/pk-package-info.svg $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/x-system-software-log.svg
-	ln -fs $(iconsdir)/pk-update-high.svg $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/x-system-software-update-preferences.svg;
+	mkdir -p $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/mimetypes;
+	ln -fs $(iconsdir)/pk-package-sources.svg $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/gpk-repo.svg;
+	ln -fs $(iconsdir)/pk-package-info.svg $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/gpk-log.svg
+	ln -fs $(iconsdir)/pk-update-high.svg $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/apps/gpk-prefs.svg;
+	ln -fs $(iconsdir)/pk-package-info.svg $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/mimetypes/application-x-package-list.svg;
+	ln -fs $(iconsdir)/pk-collection-installed.svg $(DESTDIR)$(DATADIR)/icons/hicolor/$(size)/mimetypes/application-x-catalog.svg;
 
 EXTRA_DIST =				\
 	$(icons_DATA)

Modified: trunk/src/gpk-application.c
==============================================================================
--- trunk/src/gpk-application.c	(original)
+++ trunk/src/gpk-application.c	Mon Oct 20 11:59:51 2008
@@ -3376,8 +3376,15 @@
 	widget = glade_xml_get_widget (application->priv->glade_xml, "button_find");
 	gtk_widget_set_sensitive (widget, FALSE);
 
-	gtk_widget_set_size_request (main_window, 1000, 500);
-	gtk_widget_show (main_window);
+	/* set a size, if the screen allows */
+	ret = gpk_window_set_size_request (GTK_WINDOW (main_window), 100000, 500);
+
+	/* we are small form factor */
+	if (!ret) {
+		widget = glade_xml_get_widget (application->priv->glade_xml, "hbox_packages");
+		gtk_box_set_homogeneous (GTK_BOX (widget), FALSE);
+	}
+	gtk_widget_show (GTK_WIDGET(main_window));
 
 	widget = glade_xml_get_widget (application->priv->glade_xml, "treeview_packages");
 	gtk_tree_view_columns_autosize (GTK_TREE_VIEW (widget));

Modified: trunk/src/gpk-client-chooser.c
==============================================================================
--- trunk/src/gpk-client-chooser.c	(original)
+++ trunk/src/gpk-client-chooser.c	Mon Oct 20 11:59:51 2008
@@ -193,7 +193,9 @@
 	/* connect up default actions */
 	widget = glade_xml_get_widget (glade_xml, "window_simple");
 	g_signal_connect_swapped (widget, "delete_event", G_CALLBACK (gtk_main_quit), NULL);
-	gtk_widget_set_size_request (widget, 600, 300);
+
+	/* set a size, if the screen allows */
+	gpk_window_set_size_request (GTK_WINDOW (widget), 600, 300);
 
 	/* connect up buttons */
 	widget = glade_xml_get_widget (glade_xml, "button_help");

Modified: trunk/src/gpk-client-run.c
==============================================================================
--- trunk/src/gpk-client-run.c	(original)
+++ trunk/src/gpk-client-run.c	Mon Oct 20 11:59:51 2008
@@ -307,7 +307,9 @@
 	/* connect up default actions */
 	widget = glade_xml_get_widget (glade_xml, "window_simple");
 	g_signal_connect_swapped (widget, "delete_event", G_CALLBACK (gtk_main_quit), NULL);
-	gtk_widget_set_size_request (widget, 600, 300);
+
+	/* set a size, if the screen allows */
+	gpk_window_set_size_request (GTK_WINDOW (widget), 600, 300);
 
 	/* connect up buttons */
 	widget = glade_xml_get_widget (glade_xml, "button_help");

Modified: trunk/src/gpk-common.c
==============================================================================
--- trunk/src/gpk-common.c	(original)
+++ trunk/src/gpk-common.c	Mon Oct 20 11:59:51 2008
@@ -41,6 +41,30 @@
 #include "gpk-error.h"
 
 /**
+ * gpk_window_set_size_request:
+ **/
+gboolean
+gpk_window_set_size_request (GtkWindow *window, guint width, guint height)
+{
+	GdkScreen *screen;
+
+	/* check for tiny screen, like for instance a OLPC or EEE */
+	screen = gdk_screen_get_default ();
+	if (gdk_screen_get_width (screen) < width ||
+	    gdk_screen_get_height (screen) < height) {
+		egg_debug ("using small form factor mode");
+		gtk_window_set_resizable (window, FALSE);
+		gtk_window_maximize (window);
+		return FALSE;
+	}
+
+	/* normal size laptop panel */
+	egg_debug ("using native mode: %ix%i", width, height);
+	gtk_widget_set_size_request (GTK_WIDGET(window), width, height);
+	return TRUE;
+}
+
+/**
  * gpk_package_id_format_twoline:
  *
  * Return value: "<b>GTK Toolkit</b>\ngtk2-2.12.2 (i386)"

Modified: trunk/src/gpk-common.h
==============================================================================
--- trunk/src/gpk-common.h	(original)
+++ trunk/src/gpk-common.h	Mon Oct 20 11:59:51 2008
@@ -69,11 +69,12 @@
 #define GPK_BUGZILLA_URL			"https://bugs.freedesktop.org/";
 
 #define GPK_ICON_SOFTWARE_UPDATE		"system-software-update"
-#define GPK_ICON_SOFTWARE_SOURCES		"x-system-software-sources"
+#define GPK_ICON_SOFTWARE_SOURCES		"gpk-repo"
 #define GPK_ICON_SOFTWARE_INSTALLER		"system-software-install"
-#define GPK_ICON_SOFTWARE_LOG			"x-system-software-log"
-#define GPK_ICON_SOFTWARE_UPDATE_PREFS		"x-system-software-update-preferences"
+#define GPK_ICON_SOFTWARE_LOG			"gpk-log"
+#define GPK_ICON_SOFTWARE_UPDATE_PREFS		"gpk-prefs"
 #define GPK_ICON_SOFTWARE_UPDATE_AVAILABLE	"software-update-available"
+#define GPK_ICON_SERVICE_PACK			"gpk-service-pack"
 
 void		 gpk_common_test			(gpointer	 data);
 gchar		*gpk_package_get_name			(const gchar	*package_id);
@@ -91,6 +92,9 @@
 							 GtkIconSize	 size);
 gchar		*gpk_strv_join_locale			(gchar		**array);
 GtkEntryCompletion	*gpk_package_entry_completion_new	(void);
+gboolean	 gpk_window_set_size_request		(GtkWindow	*window,
+							 guint		 width,
+							 guint		 height);
 
 G_END_DECLS
 

Modified: trunk/src/gpk-enum.c
==============================================================================
--- trunk/src/gpk-enum.c	(original)
+++ trunk/src/gpk-enum.c	Mon Oct 20 11:59:51 2008
@@ -129,6 +129,7 @@
 	{PK_ROLE_ENUM_ACCEPT_EULA,		"pk-package-info"},
 	{PK_ROLE_ENUM_CANCEL,			"process-stop"},
 	{PK_ROLE_ENUM_DOWNLOAD_PACKAGES,	"pk-package-download"},
+	{PK_ROLE_ENUM_GET_CATEGORIES,		"pk-package-info"},
 	{PK_ROLE_ENUM_GET_DEPENDS,		"pk-package-info"},
 	{PK_ROLE_ENUM_GET_DETAILS,		"pk-package-info"},
 	{PK_ROLE_ENUM_GET_DISTRO_UPGRADES,	"pk-package-info"},
@@ -1081,6 +1082,9 @@
 	case PK_ROLE_ENUM_GET_DISTRO_UPGRADES:
 		text = _("Getting distribution upgrade information");
 		break;
+	case PK_ROLE_ENUM_GET_CATEGORIES:
+		text = _("Getting categories");
+		break;
 	default:
 		egg_warning ("role unrecognised: %s", pk_role_enum_to_text (role));
 	}
@@ -1184,6 +1188,9 @@
 	case PK_ROLE_ENUM_GET_DISTRO_UPGRADES:
 		text = _("Got distribution upgrades");
 		break;
+	case PK_ROLE_ENUM_GET_CATEGORIES:
+		text = _("Got categories");
+		break;
 	default:
 		egg_warning ("role unrecognised: %s", pk_role_enum_to_text (role));
 	}
@@ -1298,7 +1305,7 @@
 		text = _("Vendor");
 		break;
 	case PK_GROUP_ENUM_NEWEST:
-		text = _("Newest");
+		text = _("Newest packages");
 		break;
 	case PK_GROUP_ENUM_UNKNOWN:
 		text = _("Unknown group");

Modified: trunk/src/gpk-log.c
==============================================================================
--- trunk/src/gpk-log.c	(original)
+++ trunk/src/gpk-log.c	Mon Oct 20 11:59:51 2008
@@ -560,7 +560,9 @@
 	glade_xml = glade_xml_new (GPK_DATA "/gpk-log.glade", NULL, NULL);
 	widget = glade_xml_get_widget (glade_xml, "window_simple");
 	gtk_window_set_icon_name (GTK_WINDOW (widget), GPK_ICON_SOFTWARE_LOG);
-	gtk_widget_set_size_request (widget, 750, 300);
+
+	/* set a size, if the screen allows */
+	gpk_window_set_size_request (GTK_WINDOW (widget), 750, 300);
 
 	/* if command line arguments are set, then setup UI */
 	if (filter != NULL) {

Modified: trunk/src/gpk-repo.c
==============================================================================
--- trunk/src/gpk-repo.c	(original)
+++ trunk/src/gpk-repo.c	Mon Oct 20 11:59:51 2008
@@ -410,7 +410,8 @@
 	g_signal_connect (widget, "clicked",
 			  G_CALLBACK (gpk_repo_checkbutton_details), NULL);
 
-	gtk_widget_set_size_request (main_window, 500, 300);
+	/* set a size, if the screen allows */
+	gpk_window_set_size_request (GTK_WINDOW (main_window), 500, 300);
 
 	/* create list stores */
 	list_store = gtk_list_store_new (REPO_COLUMN_LAST, G_TYPE_BOOLEAN,

Modified: trunk/src/gpk-service-pack.c
==============================================================================
--- trunk/src/gpk-service-pack.c	(original)
+++ trunk/src/gpk-service-pack.c	Mon Oct 20 11:59:51 2008
@@ -306,51 +306,35 @@
 gpk_pack_copy_package_lists (const gchar *filename, GError **error)
 {
 	gboolean ret = FALSE;
-	PkPackageList *system = NULL;
-	PkPackageList *installed = NULL;
-	guint i;
-	guint length;
-	const PkPackageObj *obj;
-
-	/* no feedback */
-	gpk_pack_set_percentage (101);
+	PkPackageList *list = NULL;
+	GError *error_local = NULL;
+	PkClient *client;
 
-	if (!g_file_test (PK_SYSTEM_PACKAGE_LIST_FILENAME, G_FILE_TEST_EXISTS)) {
-		*error = g_error_new (0, 0, _("The file does not exists"));
-		goto out;
-	}
+	client = pk_client_new ();
+	pk_client_set_use_buffer (client, TRUE, NULL);
+	pk_client_set_synchronous (client, TRUE, NULL);
+	g_signal_connect (client, "progress-changed", G_CALLBACK (gpk_pack_progress_changed_cb), NULL);
 
-	/* open the list */
-	system = pk_package_list_new ();
-	ret = pk_obj_list_from_file (PK_OBJ_LIST(system), PK_SYSTEM_PACKAGE_LIST_FILENAME);
+	ret = pk_client_get_packages (client, pk_bitfield_value (PK_FILTER_ENUM_INSTALLED), &error_local);
 	if (!ret) {
-		*error = g_error_new (0, 0, _("Could not read package list"));
+		*error = g_error_new (0, 0, _("Could not get package list: %s"), error_local->message);
+		g_error_free (error_local);
 		goto out;
 	}
 
-	/* get all the installed entries */
-	installed = pk_package_list_new ();
-	length = pk_package_list_get_size (system);
-	for (i=0; i<length; i++) {
-		obj = pk_package_list_get_obj (system, i);
-		if (obj->info == PK_INFO_ENUM_INSTALLED)
-			pk_obj_list_add (PK_OBJ_LIST(installed), obj);
-		/* don't hang the GUI */
-		while (gtk_events_pending ())
-			gtk_main_iteration ();
-	}
+	/* get the deps */
+	list = pk_client_get_package_list (client);
 
 	/* write new file */
-	ret = pk_obj_list_to_file (PK_OBJ_LIST(installed), filename);
+	ret = pk_obj_list_to_file (PK_OBJ_LIST(list), filename);
 	if (!ret) {
 		*error = g_error_new (0, 0, _("Could not write package list"));
 		goto out;
 	}
 out:
-	if (system != NULL)
-		g_object_unref (system);
-	if (installed != NULL)
-		g_object_unref (installed);
+	g_object_unref (client);
+	if (list != NULL)
+		g_object_unref (list);
 	return ret;
 }
 
@@ -592,7 +576,7 @@
 
 	/* Hide window first so that the dialogue resizes itself without redrawing */
 	gtk_widget_hide (main_window);
-	gtk_window_set_icon_name (GTK_WINDOW (main_window), GPK_ICON_SOFTWARE_SOURCES);
+	gtk_window_set_icon_name (GTK_WINDOW (main_window), GPK_ICON_SERVICE_PACK);
 
 	/* Get the main window quit */
 	g_signal_connect_swapped (main_window, "delete_event", G_CALLBACK (gtk_main_quit), NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]