gnome-packagekit r302 - in trunk: . data src



Author: rhughes
Date: Thu Sep 25 12:17:16 2008
New Revision: 302
URL: http://svn.gnome.org/viewvc/gnome-packagekit?rev=302&view=rev

Log:
from git

Modified:
   trunk/configure.ac
   trunk/data/gnome-packagekit.schemas.in
   trunk/src/gpk-animated-icon.c
   trunk/src/gpk-cell-renderer-uri.c
   trunk/src/gpk-client.c
   trunk/src/gpk-common.h
   trunk/src/gpk-firmware.c
   trunk/src/gpk-interface.h
   trunk/src/gpk-repo.c
   trunk/src/gpk-self-test.c
   trunk/src/gpk-update-icon.c

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Thu Sep 25 12:17:16 2008
@@ -23,8 +23,11 @@
 dnl - Extra verbose warning switches
 dnl ---------------------------------------------------------------------------
 if test "$GCC" = "yes"; then
-    CPPFLAGS="$CPPFLAGS -Werror -Wcast-align -Wno-uninitialized"
-    CPPFLAGS="$CPPFLAGS -Wall -Wformat-security"
+	CPPFLAGS="$CPPFLAGS -Werror -Wcast-align -Wno-uninitialized"
+	CPPFLAGS="$CPPFLAGS -Wall -Wformat-security"
+	CPPFLAGS="$CPPFLAGS -DG_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
+	CPPFLAGS="$CPPFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED"
+	CPPFLAGS="$CPPFLAGS -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE"
 fi
 
 dnl ---------------------------------------------------------------------------

Modified: trunk/data/gnome-packagekit.schemas.in
==============================================================================
--- trunk/data/gnome-packagekit.schemas.in	(original)
+++ trunk/data/gnome-packagekit.schemas.in	Thu Sep 25 12:17:16 2008
@@ -14,6 +14,18 @@
     </schema>
 
     <schema>
+      <key>/schemas/apps/gnome-packagekit/banned_firmware</key>
+      <applyto>/apps/gnome-packagekit/banned_firmware</applyto>
+      <owner>gnome-packagekit</owner>
+      <type>string</type>
+      <default></default>
+      <locale name="C">
+        <short>Firmware files that should not be searched for</short>
+        <long>Firmware files that should not be searched for, seporated by comma</long>
+      </locale>
+    </schema>
+
+    <schema>
       <key>/schemas/apps/gnome-packagekit/prompt_hardware</key>
       <applyto>/apps/gnome-packagekit/prompt_hardware</applyto>
       <owner>gnome-packagekit</owner>

Modified: trunk/src/gpk-animated-icon.c
==============================================================================
--- trunk/src/gpk-animated-icon.c	(original)
+++ trunk/src/gpk-animated-icon.c	Thu Sep 25 12:17:16 2008
@@ -69,6 +69,8 @@
 	gint rows, cols;
 	gint r, c, i;
 	GdkPixbuf *pixbuf;
+	GdkScreen *screen;
+	GtkSettings *settings;
 
 	g_return_val_if_fail (GPK_IS_ANIMATED_ICON (icon), FALSE);
 	g_return_val_if_fail (name != NULL, FALSE);
@@ -92,7 +94,9 @@
 	}
 
 	egg_debug ("loading from %s", name);
-	gtk_icon_size_lookup (size, &w, &h);
+	screen = gdk_screen_get_default ();
+	settings = gtk_settings_get_for_screen (screen);
+	gtk_icon_size_lookup_for_settings (settings, size, &w, &h);
 
 	pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), name, w, 0, NULL);
 	/* can't load from gnome-icon-theme */

Modified: trunk/src/gpk-cell-renderer-uri.c
==============================================================================
--- trunk/src/gpk-cell-renderer-uri.c	(original)
+++ trunk/src/gpk-cell-renderer-uri.c	Thu Sep 25 12:17:16 2008
@@ -173,6 +173,7 @@
 			     GtkCellRendererState flags)
 {
 	gboolean ret;
+	GdkDisplay *display;
 	GdkCursor *cursor;
 	GtkStyle *style;
 	GdkColor *color;
@@ -180,13 +181,13 @@
 	GpkCellRendererUri *cru = GPK_CELL_RENDERER_URI (cell);
 
 	/* set cursor */
-	if (cru->uri == NULL) {
-		cursor = gdk_cursor_new (GDK_XTERM);
-	} else {
-		cursor = gdk_cursor_new (GDK_HAND2);
-	}
+	display = gdk_display_get_default ();
+	if (cru->uri == NULL)
+		cursor = gdk_cursor_new_for_display (display, GDK_XTERM);
+	else
+		cursor = gdk_cursor_new_for_display (display, GDK_HAND2);
 	gdk_window_set_cursor (widget->window, cursor);
-	gdk_cursor_destroy (cursor);
+	gdk_cursor_unref (cursor);
 	ret = gpk_cell_renderer_uri_is_clicked (cru);
 
 	/* get a copy of the widget color */

Modified: trunk/src/gpk-client.c
==============================================================================
--- trunk/src/gpk-client.c	(original)
+++ trunk/src/gpk-client.c	Thu Sep 25 12:17:16 2008
@@ -2958,8 +2958,11 @@
 gboolean
 gpk_client_set_parent_xid (GpkClient *gclient, guint32 xid)
 {
+	GdkDisplay *display;
 	g_return_val_if_fail (GPK_IS_CLIENT (gclient), FALSE);
-	gclient->priv->parent_window = gdk_window_foreign_new (xid);
+
+	display = gdk_display_get_default ();
+	gclient->priv->parent_window = gdk_window_foreign_new_for_display (display, xid);
 	return TRUE;
 }
 

Modified: trunk/src/gpk-common.h
==============================================================================
--- trunk/src/gpk-common.h	(original)
+++ trunk/src/gpk-common.h	Thu Sep 25 12:17:16 2008
@@ -50,6 +50,7 @@
 #define GPK_CONF_SHOW_DEPENDS			"/apps/gnome-packagekit/show_depends"
 #define GPK_CONF_PROMPT_FIRMWARE		"/apps/gnome-packagekit/prompt_firmware"
 #define GPK_CONF_PROMPT_HARDWARE		"/apps/gnome-packagekit/prompt_hardware"
+#define GPK_CONF_BANNED_FIRMWARE		"/apps/gnome-packagekit/banned_firmware"
 
 #define GPK_CONF_REPO_SHOW_DETAILS		"/apps/gnome-packagekit/repo/show_details"
 #define GPK_CONF_APPLICATION_FILTER_BASENAME	"/apps/gnome-packagekit/application/filter_basename"

Modified: trunk/src/gpk-firmware.c
==============================================================================
--- trunk/src/gpk-firmware.c	(original)
+++ trunk/src/gpk-firmware.c	Thu Sep 25 12:17:16 2008
@@ -218,6 +218,46 @@
 }
 
 /**
+ * gpk_firmware_remove_banned:
+ * @data: This class instance
+ **/
+static void
+gpk_firmware_remove_banned (GpkFirmware *firmware, GPtrArray *array)
+{
+	gchar *banned_str;
+	gchar **banned = NULL;
+	EggStrList *banned_list = NULL;
+
+	/* get from gconf */
+	banned_str = gconf_client_get_string (firmware->priv->gconf_client, GPK_CONF_BANNED_FIRMWARE, NULL);
+	if (banned_str == NULL) {
+		egg_warning ("could not read banned list");
+		goto out;
+	}
+
+	/* nothing in list, common case */
+	if (egg_strzero (banned_str)) {
+		egg_debug ("nothing in banned list");
+		goto out;
+	}
+
+	/* split using "," */
+	banned = g_strsplit (banned_str, ",", 0);
+
+	/* add to string list */
+	banned_list = egg_str_list_new ();
+	egg_str_list_add_strv (banned_list, banned);
+
+	/* remove all entries in banned list from main list */
+	egg_str_list_remove_list (array, banned_list);
+out:
+	g_free (banned_str);
+	g_strfreev (banned);
+	if (banned_list != NULL)
+		g_object_unref (banned_list);
+}
+
+/**
  * gpk_firmware_class_init:
  * @klass: The GpkFirmwareClass
  **/
@@ -312,6 +352,15 @@
 		egg_debug ("requested: %s", filename);
 	}
 
+	/* remove banned files */
+	gpk_firmware_remove_banned (firmware, array);
+
+	/* debugging */
+	for (i=0; i<array->len; i++) {
+		filename = egg_str_list_index (array, i);
+		egg_debug ("searching for: %s", filename);
+	}
+
 	/* don't spam the user at startup, so wait a little delay */
 	if (array->len > 0)
 		g_timeout_add_seconds (GPK_FIRMWARE_LOGIN_DELAY, gpk_firmware_timeout_cb, firmware);

Modified: trunk/src/gpk-interface.h
==============================================================================
--- trunk/src/gpk-interface.h	(original)
+++ trunk/src/gpk-interface.h	Thu Sep 25 12:17:16 2008
@@ -53,7 +53,7 @@
 #endif /* !G_ENABLE_DEBUG */
 
 
-/* NONE:UINT,UINT,STRING,POINTER (/tmp/dbus-binding-tool-c-marshallers.52MTHU:1) */
+/* NONE:UINT,UINT,STRING,POINTER (/tmp/dbus-binding-tool-c-marshallers.TAKUHU:1) */
 extern void dbus_glib_marshal_gpk_dbus_VOID__UINT_UINT_STRING_POINTER (GClosure     *closure,
                                                                        GValue       *return_value,
                                                                        guint         n_param_values,
@@ -101,7 +101,7 @@
 }
 #define dbus_glib_marshal_gpk_dbus_NONE__UINT_UINT_STRING_POINTER	dbus_glib_marshal_gpk_dbus_VOID__UINT_UINT_STRING_POINTER
 
-/* NONE:UINT,UINT,BOXED,POINTER (/tmp/dbus-binding-tool-c-marshallers.52MTHU:2) */
+/* NONE:UINT,UINT,BOXED,POINTER (/tmp/dbus-binding-tool-c-marshallers.TAKUHU:2) */
 extern void dbus_glib_marshal_gpk_dbus_VOID__UINT_UINT_BOXED_POINTER (GClosure     *closure,
                                                                       GValue       *return_value,
                                                                       guint         n_param_values,

Modified: trunk/src/gpk-repo.c
==============================================================================
--- trunk/src/gpk-repo.c	(original)
+++ trunk/src/gpk-repo.c	Thu Sep 25 12:17:16 2008
@@ -352,7 +352,7 @@
 	g_type_init ();
 
 	context = g_option_context_new (NULL);
-	g_option_context_set_summary (context, _("Software Update Viewer"));
+	g_option_context_set_summary (context, _("Software Source Viewer"));
 	g_option_context_add_main_entries (context, options, NULL);
 	g_option_context_parse (context, &argc, &argv, NULL);
 	g_option_context_free (context);

Modified: trunk/src/gpk-self-test.c
==============================================================================
--- trunk/src/gpk-self-test.c	(original)
+++ trunk/src/gpk-self-test.c	Thu Sep 25 12:17:16 2008
@@ -27,6 +27,7 @@
 #include "gpk-enum.h"
 
 void egg_string_test (EggTest *test);
+void egg_string_list_test (EggTest *test);
 void gpk_dbus_test (EggTest *test);
 void gpk_client_dialog_test (EggTest *test);
 
@@ -44,6 +45,7 @@
 
 	/* tests go here */
 	egg_string_test (test);
+	egg_string_list_test (test);
 	gpk_enum_test (test);
 	gpk_common_test (test);
 //	gpk_dbus_test (test);

Modified: trunk/src/gpk-update-icon.c
==============================================================================
--- trunk/src/gpk-update-icon.c	(original)
+++ trunk/src/gpk-update-icon.c	Thu Sep 25 12:17:16 2008
@@ -117,9 +117,7 @@
 	GpkWatch *watch = NULL;
 	GpkDbus *dbus = NULL;
 	GpkFirmware *firmware = NULL;
-	/*
 	GpkHardware *hardware = NULL;
-	*/
 	GOptionContext *context;
 	GError *error = NULL;
 	gboolean ret;
@@ -177,9 +175,7 @@
 	cupdate = gpk_check_update_new ();
 	watch = gpk_watch_new ();
 	firmware = gpk_firmware_new ();
-	/*
 	hardware = gpk_hardware_new ();
-	*/
 
 	/* find out when we are replaced */
 	monitor = egg_dbus_monitor_new ();
@@ -214,9 +210,7 @@
 	g_object_unref (cupdate);
 	g_object_unref (watch);
 	g_object_unref (firmware);
-	/*
 	g_object_unref (hardware);
-	*/
 	g_object_unref (monitor);
 
 	return 0;



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