gnome-packagekit r242 - in trunk: data po src



Author: rhughes
Date: Tue Jul  8 15:05:34 2008
New Revision: 242
URL: http://svn.gnome.org/viewvc/gnome-packagekit?rev=242&view=rev

Log:
from git

Modified:
   trunk/data/gpk-error.glade
   trunk/po/ChangeLog
   trunk/po/he.po
   trunk/src/gpk-application.c
   trunk/src/gpk-client-depends.c
   trunk/src/gpk-client-requires.c
   trunk/src/gpk-client-untrusted.c
   trunk/src/gpk-dialog.c
   trunk/src/gpk-install-catalog.c
   trunk/src/gpk-install-local-file.c
   trunk/src/gpk-install-mime-type.c
   trunk/src/gpk-install-package-name.c
   trunk/src/gpk-install-provide-file.c

Modified: trunk/data/gpk-error.glade
==============================================================================
--- trunk/data/gpk-error.glade	(original)
+++ trunk/data/gpk-error.glade	Tue Jul  8 15:05:34 2008
@@ -3,7 +3,6 @@
 <!--*- mode: xml -*-->
 <glade-interface>
   <widget class="GtkWindow" id="window_error">
-    <property name="title" translatable="yes">PackageKit Error</property>
     <property name="resizable">False</property>
     <property name="modal">True</property>
     <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>

Modified: trunk/src/gpk-application.c
==============================================================================
--- trunk/src/gpk-application.c	(original)
+++ trunk/src/gpk-application.c	Tue Jul  8 15:05:34 2008
@@ -208,53 +208,6 @@
 }
 
 /**
- * gpk_application_treeview_sort_none:
- **/
-static gint
-gpk_application_treeview_sort_none (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data)
-{
-	return 0;
-}
-
-/**
- * gpk_application_treeview_sort_text:
- **/
-static gint
-gpk_application_treeview_sort_text (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data)
-{
-	gchar *a_txt;
-	gchar *b_txt;
-	gint ret;
-	gtk_tree_model_get (model, a, PACKAGES_COLUMN_ID, &a_txt, -1);
-	gtk_tree_model_get (model, b, PACKAGES_COLUMN_ID, &b_txt, -1);
-	ret = strcmp (a_txt, b_txt);
-	g_free (a_txt);
-	g_free (b_txt);
-	return ret;
-}
-
-/**
- * gpk_application_treeview_set_sorted:
- **/
-static void
-gpk_application_treeview_set_sorted (GpkApplication *application, gboolean sorted)
-{
-	if (sorted) {
-		pk_debug ("sorted");
-		gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (application->priv->packages_store),
-						 PACKAGES_COLUMN_ID, gpk_application_treeview_sort_text, NULL, NULL);
-		gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (application->priv->packages_store),
-						      PACKAGES_COLUMN_ID, GTK_SORT_ASCENDING);
-	} else {
-		pk_debug ("unsorted");
-		gtk_tree_sortable_set_default_sort_func (GTK_TREE_SORTABLE (application->priv->packages_store),
-							 gpk_application_treeview_sort_none, NULL, NULL);
-		gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (application->priv->packages_store),
-						      GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, GTK_SORT_ASCENDING);
-	}
-}
-
-/**
  * gpk_application_set_text_buffer:
  **/
 static void
@@ -703,8 +656,8 @@
 
 		length = pk_package_list_get_size (list);
 		name = gpk_dialog_package_id_name_join_locale (package_ids);
-		title = g_strdup_printf (ngettext ("%i other package requires %s",
-						   "%i other packages require %s",
+		title = g_strdup_printf (ngettext ("%i additional package require %s",
+						   "%i additional packages require %s",
 						   length), length, name);
 
 		message = g_strdup_printf (ngettext ("Packages listed below require %s to function correctly.",
@@ -775,8 +728,8 @@
 
 		length = pk_package_list_get_size (list);
 		name = gpk_dialog_package_id_name_join_locale (package_ids);
-		title = g_strdup_printf (ngettext ("%i other package depends on %s",
-						   "%i other packages depends on %s",
+		title = g_strdup_printf (ngettext ("%i additional package is required for %s",
+						   "%i additional packages are required for %s",
 						   length), length, name);
 
 		message = g_strdup_printf (ngettext ("Packages listed below are required for %s to function correctly.",
@@ -882,9 +835,6 @@
 static void
 gpk_application_clear_packages (GpkApplication *application)
 {
-	/* unsorted */
-	gpk_application_treeview_set_sorted (application, FALSE);
-
 	/* clear existing list */
 	gtk_list_store_clear (application->priv->packages_store);
 	application->priv->has_package = FALSE;
@@ -1006,6 +956,7 @@
 	gboolean checkbox;
 	gboolean enabled;
 	GpkPackageState state = 0;
+	static guint package_cnt = 0;
 
 	g_return_if_fail (PK_IS_APPLICATION (application));
 
@@ -1062,8 +1013,11 @@
 	g_free (package_id);
 	g_free (text);
 
-	while (gtk_events_pending ()) {
-		gtk_main_iteration ();
+	/* only process every n events else we re-order too many times */
+	if (package_cnt++ % 200 == 0) {
+		while (gtk_events_pending ()) {
+			gtk_main_iteration ();
+		}
 	}
 }
 
@@ -1185,8 +1139,6 @@
 		/* focus back to the text extry */
 		widget = glade_xml_get_widget (application->priv->glade_xml, "entry_text");
 		gtk_widget_grab_focus (widget);
-
-		gpk_application_treeview_set_sorted (application, TRUE);
 	}
 
 	/* do we need to update the search? */
@@ -3035,8 +2987,9 @@
 	/* add columns to the tree view */
 	gpk_application_treeview_add_columns_description (application);
 
-	/* unsorted */
-//	gpk_application_treeview_set_sorted (application, FALSE);
+	/* sorted */
+	gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (application->priv->packages_store),
+					      PACKAGES_COLUMN_ID, GTK_SORT_ASCENDING);
 
 	/* create package tree view */
 	widget = glade_xml_get_widget (application->priv->glade_xml, "treeview_packages");

Modified: trunk/src/gpk-client-depends.c
==============================================================================
--- trunk/src/gpk-client-depends.c	(original)
+++ trunk/src/gpk-client-depends.c	Tue Jul  8 15:05:34 2008
@@ -115,10 +115,14 @@
 	/* these are the new packages */
 	list = pk_client_get_package_list (client);
 	length = pk_package_list_get_size (list);
+	if (length == 0) {
+		ret = TRUE;
+		goto out;
+	}
 
 	/* title */
-	title = g_strdup_printf (ngettext ("%i other package also have to be installed",
-					   "%i other packages also have to be installed",
+	title = g_strdup_printf (ngettext ("%i additional package also has to be installed",
+					   "%i additional packages also have to be installed",
 					   length), length);
 
 	/* button */

Modified: trunk/src/gpk-client-requires.c
==============================================================================
--- trunk/src/gpk-client-requires.c	(original)
+++ trunk/src/gpk-client-requires.c	Tue Jul  8 15:05:34 2008
@@ -98,8 +98,8 @@
 	pk_package_list_sort (list);
 
 	/* title */
-	title = g_strdup_printf (ngettext ("%i other package also has to be removed",
-					   "%i other packages also have to be removed",
+	title = g_strdup_printf (ngettext ("%i additional package also has to be removed",
+					   "%i additional packages also have to be removed",
 					   length), length);
 
 	/* button */

Modified: trunk/src/gpk-client-untrusted.c
==============================================================================
--- trunk/src/gpk-client-untrusted.c	(original)
+++ trunk/src/gpk-client-untrusted.c	Tue Jul  8 15:05:34 2008
@@ -115,7 +115,6 @@
 	button = polkit_gnome_action_create_button (update_system_action);
 	widget = glade_xml_get_widget (glade_xml, "hbuttonbox2");
 	gtk_box_pack_start (GTK_BOX (widget), button, FALSE, FALSE, 0);
-	gtk_box_reorder_child (GTK_BOX (widget), button, 0);
 
 	/* show window */
 	widget = glade_xml_get_widget (glade_xml, "window_error");

Modified: trunk/src/gpk-dialog.c
==============================================================================
--- trunk/src/gpk-dialog.c	(original)
+++ trunk/src/gpk-dialog.c	Tue Jul  8 15:05:34 2008
@@ -192,6 +192,9 @@
 	gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scroll), widget);
 	gtk_widget_show (scroll);
 
+	/* add some spacing to conform to the GNOME HIG */
+	gtk_container_set_border_width (GTK_CONTAINER (scroll), 6);
+
 	length = pk_package_list_get_size (list);
 	if (length > 5) {
 		gtk_widget_set_size_request (GTK_WIDGET (scroll), -1, 300);

Modified: trunk/src/gpk-install-catalog.c
==============================================================================
--- trunk/src/gpk-install-catalog.c	(original)
+++ trunk/src/gpk-install-catalog.c	Tue Jul  8 15:05:34 2008
@@ -86,7 +86,7 @@
 	/* find the file list */
 	files = gpk_convert_argv_to_strv (argv);
 	gclient = gpk_client_new ();
-
+	gpk_client_set_interaction (gclient, GPK_CLIENT_INTERACT_ALWAYS);
 	/* install all the catalogs */
 	ret = gpk_client_install_catalogs (gclient, files, NULL);
 

Modified: trunk/src/gpk-install-local-file.c
==============================================================================
--- trunk/src/gpk-install-local-file.c	(original)
+++ trunk/src/gpk-install-local-file.c	Tue Jul  8 15:05:34 2008
@@ -85,6 +85,7 @@
 
 	error = NULL;
 	gclient = gpk_client_new ();
+	gpk_client_set_interaction (gclient, GPK_CLIENT_INTERACT_ALWAYS);
 	files = gpk_convert_argv_to_strv (argv);
 	ret = gpk_client_install_local_files (gclient, files, NULL);
 	g_strfreev (files);

Modified: trunk/src/gpk-install-mime-type.c
==============================================================================
--- trunk/src/gpk-install-mime-type.c	(original)
+++ trunk/src/gpk-install-mime-type.c	Tue Jul  8 15:05:34 2008
@@ -89,6 +89,7 @@
 
 	error = NULL;
 	gclient = gpk_client_new ();
+	gpk_client_set_interaction (gclient, GPK_CLIENT_INTERACT_ALWAYS);
 	ret = gpk_client_install_mime_type (gclient, argv[1], NULL);
 	g_object_unref (gclient);
 

Modified: trunk/src/gpk-install-package-name.c
==============================================================================
--- trunk/src/gpk-install-package-name.c	(original)
+++ trunk/src/gpk-install-package-name.c	Tue Jul  8 15:05:34 2008
@@ -85,6 +85,7 @@
 
 	error = NULL;
 	gclient = gpk_client_new ();
+	gpk_client_set_interaction (gclient, GPK_CLIENT_INTERACT_ALWAYS);
 	packages = gpk_convert_argv_to_strv (argv);
 	ret = gpk_client_install_package_names (gclient, packages, NULL);
 	g_strfreev (packages);

Modified: trunk/src/gpk-install-provide-file.c
==============================================================================
--- trunk/src/gpk-install-provide-file.c	(original)
+++ trunk/src/gpk-install-provide-file.c	Tue Jul  8 15:05:34 2008
@@ -89,6 +89,7 @@
 
 	error = NULL;
 	gclient = gpk_client_new ();
+	gpk_client_set_interaction (gclient, GPK_CLIENT_INTERACT_ALWAYS);
 	ret = gpk_client_install_provide_file (gclient, argv[1], NULL);
 	g_object_unref (gclient);
 



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