rpms/control-center/devel control-center-2.19.1-default-apps.patch, NONE, 1.1 control-center-2.19.1-gecos.patch, NONE, 1.1 control-center-2.19.1-gnome-bg.patch, NONE, 1.1 control-center-2.19.1-search.patch, NONE, 1.1 .cvsignore, 1.54, 1.55 control-center.spec, 1.250, 1.251 sources, 1.57, 1.58 control-center-2.17.90-search.patch, 1.1, NONE

Matthias Clasen (mclasen) fedora-extras-commits at redhat.com
Mon May 21 05:25:27 UTC 2007


Author: mclasen

Update of /cvs/extras/rpms/control-center/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9076

Modified Files:
	.cvsignore control-center.spec sources 
Added Files:
	control-center-2.19.1-default-apps.patch 
	control-center-2.19.1-gecos.patch 
	control-center-2.19.1-gnome-bg.patch 
	control-center-2.19.1-search.patch 
Removed Files:
	control-center-2.17.90-search.patch 
Log Message:
update patches


control-center-2.19.1-default-apps.patch:

--- NEW FILE control-center-2.19.1-default-apps.patch ---
--- gnome-control-center-2.19.1/capplets/default-applications/gnome-default-applications.xml.in.default-apps	2007-04-23 10:58:28.000000000 -0400
+++ gnome-control-center-2.19.1/capplets/default-applications/gnome-default-applications.xml.in	2007-05-21 01:19:05.000000000 -0400
@@ -44,52 +44,12 @@
       <win-command>galeon -w %s</win-command>
     </web-browser>
     <web-browser>
-      <_name>Encompass</_name>
-      <executable>encompass</executable>
-      <command>encompass %s</command>
-      <icon-name>encompass</icon-name>
-      <run-in-terminal>false</run-in-terminal>
-      <netscape-remote>false</netscape-remote>
-    </web-browser>
-    <web-browser>
-      <_name>Firebird</_name>
-      <executable>mozilla-firebird</executable>
-      <command>mozilla-firebird %s</command>
-      <icon-name></icon-name>
-      <run-in-terminal>false</run-in-terminal>
-      <netscape-remote>true</netscape-remote>
-      <tab-command>mozilla-firebird -remote "openurl(%s,new-tab)"</tab-command>
-      <win-command>mozilla-firebird -remote "openurl(%s,new-window)"</win-command>
-    </web-browser>
-    <web-browser>
       <_name>Firefox</_name>
       <executable>firefox</executable>
       <command>firefox %s</command>
       <icon-name>firefox</icon-name>
       <run-in-terminal>false</run-in-terminal>
-      <netscape-remote>true</netscape-remote>
-      <tab-command>firefox -remote "openurl(%s,new-tab)"</tab-command>
-      <win-command>firefox -remote "openurl(%s,new-window)"</win-command>
-    </web-browser>
-    <web-browser>
-      <_name>Iceweasel</_name>
-      <executable>iceweasel</executable>
-      <command>iceweasel %s</command>
-      <icon-name>iceweasel</icon-name>
-      <run-in-terminal>false</run-in-terminal>
-      <netscape-remote>true</netscape-remote>
-      <tab-command>iceweasel -remote "openurl(%s,new-tab)"</tab-command>
-      <win-command>iceweasel -remote "openurl(%s,new-window)"</win-command>
-    </web-browser>
-    <web-browser>
-      <_name>Mozilla 1.6</_name>
-      <executable>mozilla-1.6</executable>
-      <command>mozilla-1.6 %s</command>
-      <icon-name>mozilla-icon</icon-name>
-      <run-in-terminal>false</run-in-terminal>
-      <netscape-remote>true</netscape-remote>
-      <tab-command>mozilla-1.6 -remote "openurl(%s,new-tab)"</tab-command>
-      <win-command>mozilla-1.6 -remote "openurl(%s,new-window)"</win-command>
+      <netscape-remote>false</netscape-remote>
     </web-browser>
     <web-browser>
       <_name>Mozilla</_name>
@@ -97,9 +57,7 @@
       <command>mozilla %s</command>
       <icon-name>mozilla-icon</icon-name>
       <run-in-terminal>false</run-in-terminal>
-      <netscape-remote>true</netscape-remote>
-      <tab-command>mozilla -remote "openurl(%s,new-tab)"</tab-command>
-      <win-command>mozilla -remote "openurl(%s,new-window)"</win-command>
+      <netscape-remote>false</netscape-remote>
     </web-browser>
     <web-browser>
       <_name>SeaMonkey</_name>
@@ -112,14 +70,12 @@
       <win-command>seamonkey -remote "openurl(%s,new-window)"</win-command>
     </web-browser>
     <web-browser>
-      <_name>Netscape Communicator</_name>
+      <_name>Netscape</_name>
       <executable>netscape</executable>
       <command>netscape %s</command>
       <icon-name>netscape</icon-name>
       <run-in-terminal>false</run-in-terminal>
-      <netscape-remote>true</netscape-remote>
-      <tab-command>netscape -remote "openurl(%s,new-tab)"</tab-command>
-      <win-command>netscape -remote "openurl(%s,new-window)"</win-command>
+      <netscape-remote>false</netscape-remote>
     </web-browser>
     <web-browser>
       <_name>Konqueror</_name>
@@ -157,51 +113,9 @@
 
   <mail-readers>
     <mail-reader>
-      <_name>Evolution Mail Reader 2.4</_name>
-      <executable>evolution-2.4</executable>
-      <command>evolution-2.4 %s</command>
-      <icon-name>evolution</icon-name>
-      <run-in-terminal>false</run-in-terminal>
-    </mail-reader>
-    <mail-reader>
-      <_name>Evolution Mail Reader 2.2</_name>
-      <executable>evolution-2.2</executable>
-      <command>evolution-2.2 %s</command>
-      <icon-name>evolution</icon-name>
-      <run-in-terminal>false</run-in-terminal>
-    </mail-reader>
-    <mail-reader>
-      <_name>Evolution Mail Reader 2.0</_name>
-      <executable>evolution-2.0</executable>
-      <command>evolution-2.0 %s</command>
-      <icon-name>evolution</icon-name>
-      <run-in-terminal>false</run-in-terminal>
-    </mail-reader>
-    <mail-reader>
-      <_name>Evolution Mail Reader 1.6</_name>
-      <executable>evolution-1.6</executable>
-      <command>evolution-1.6 %s</command>
-      <icon-name>evolution</icon-name>
-      <run-in-terminal>false</run-in-terminal>
-    </mail-reader>
-    <mail-reader>
-      <_name>Evolution Mail Reader 1.5</_name>
-      <executable>evolution-1.5</executable>
-      <command>evolution-1.5 %s</command>
-      <icon-name>evolution</icon-name>
-      <run-in-terminal>false</run-in-terminal>
-    </mail-reader>
-    <mail-reader>
-      <_name>Evolution Mail Reader 1.4</_name>
-      <executable>evolution-1.4</executable>
-      <command>evolution-1.4 %s</command>
-      <icon-name>evolution</icon-name>
-      <run-in-terminal>false</run-in-terminal>
-    </mail-reader>
-    <mail-reader>
       <_name>Evolution Mail Reader</_name>
       <executable>evolution</executable>
-      <command>evolution %s</command>
+      <command>evolution --component=mail %s</command>
       <icon-name>evolution</icon-name>
       <run-in-terminal>false</run-in-terminal>
     </mail-reader>
@@ -227,27 +141,13 @@
       <run-in-terminal>false</run-in-terminal>
     </mail-reader>
     <mail-reader>
-      <_name>Thunderbird</_name>
+      <_name>Thunderbird Mail</_name>
       <executable>thunderbird</executable>
       <command>thunderbird %s</command>
       <icon-name>thunderbird</icon-name>
       <run-in-terminal>false</run-in-terminal>
     </mail-reader>
     <mail-reader>
-      <_name>Mozilla Thunderbird</_name>
-      <executable>mozilla-thunderbird</executable>
-      <command>mozilla-thunderbird %s</command>
-      <icon-name>thunderbird</icon-name>
-      <run-in-terminal>false</run-in-terminal>
-    </mail-reader>
-    <mail-reader>
-      <_name>Mozilla Mail</_name>
-      <executable>mozilla</executable>
-      <command>mozilla -mail %s</command>
-      <icon-name>mozilla-mail-icon</icon-name>
-      <run-in-terminal>false</run-in-terminal>
-    </mail-reader>
-    <mail-reader>
       <_name>SeaMonkey Mail</_name>
       <executable>seamonkey</executable>
       <command>seamonkey -mail %s</command>
@@ -269,6 +169,13 @@
       <run-in-terminal>false</run-in-terminal>
     </mail-reader>
     <mail-reader>
+      <_name>Sylpheed</_name>
+      <executable>sylpheed</executable>
+      <command>sylpheed --compose %s</command>
+      <icon-name>sylpheed</icon-name>
+      <run-in-terminal>false</run-in-terminal>
+    </mail-reader>
+    <mail-reader>
       <_name>Sylpheed-Claws</_name>
       <executable>sylpheed-claws</executable>
       <command>sylpheed-claws --compose %s</command>
@@ -293,6 +200,20 @@
       <exec-flag>-e</exec-flag>
     </terminal>
     <terminal>
+      <_name>KDE Konsole</_name>
+      <executable>konsole</executable>
+      <command>konsole</command>
+      <icon-name>konsole</icon-name>
+      <exec-flag>-e</exec-flag>
+    </terminal>
+    <terminal>
+      <_name>KTerm</_name>
+      <executable>kterm</executable>
+      <command>kterm</command>
+      <icon-name>kterm</icon-name>
+      <exec-flag>-e</exec-flag>
+    </terminal>
+    <terminal>
       <_name>GNOME Terminal</_name>
       <executable>gnome-terminal</executable>
       <command>gnome-terminal</command>

control-center-2.19.1-gecos.patch:

--- NEW FILE control-center-2.19.1-gecos.patch ---
--- gnome-control-center-2.19.1/capplets/about-me/gnome-about-me.glade.gecos	2007-05-21 01:09:52.000000000 -0400
+++ gnome-control-center-2.19.1/capplets/about-me/gnome-about-me.glade	2007-05-21 01:09:52.000000000 -0400
@@ -100,23 +100,30 @@
 		  </child>
 
 		  <child>
-		    <widget class="GtkLabel" id="fullname">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Full Name</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
+                    <widget class="GtkButton" id="fullnamebox">
+                      <property name="relief">GTK_RELIEF_NONE</property>
+                      <property name="focus_on_click">True</property>
+ 
+                      <child>
+                        <widget class="GtkLabel" id="fullname">
+                          <property name="visible">True</property>
+                          <property name="label" translatable="yes">Full Name</property>
+                          <property name="use_underline">False</property>
+                          <property name="use_markup">False</property>
+                          <property name="justify">GTK_JUSTIFY_LEFT</property>
+                          <property name="wrap">False</property>
+                          <property name="selectable">False</property>
+                          <property name="xalign">0</property>
+                          <property name="yalign">0.5</property>
+                          <property name="xpad">0</property>
+                          <property name="ypad">0</property>
+                          <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                          <property name="width_chars">-1</property>
+                          <property name="single_line_mode">False</property>
+                          <property name="angle">0</property>
+                        </widget>
+                      </child>
+                    </widget>
 		    <packing>
 		      <property name="padding">0</property>
 		      <property name="expand">False</property>
--- gnome-control-center-2.19.1/capplets/about-me/Makefile.am.gecos	2007-03-21 07:35:48.000000000 -0400
+++ gnome-control-center-2.19.1/capplets/about-me/Makefile.am	2007-05-21 01:12:38.000000000 -0400
@@ -9,9 +9,6 @@ pixmap_files = 				\
 	gnome-about-me-lock-open.png
 
 gnome_about_me_SOURCES =	 	\
-	eel-alert-dialog.c		\
-	eel-alert-dialog.h		\
-	eel-gtk-macros.h		\
 	gnome-about-me-password.c	\
 	gnome-about-me-password.h	\
 	e-image-chooser.c		\
@@ -24,7 +21,7 @@ bin_PROGRAMS = gnome-about-me
 pixmapdir = $(pkgdatadir)/pixmaps
 pixmap_DATA = $(pixmap_files)
 
-gnome_about_me_LDADD = $(GNOMECC_CAPPLETS_LIBS) $(LIBEBOOK_LIBS) $(ABOUTME_LIBS)
+gnome_about_me_LDADD = $(GNOMECC_CAPPLETS_LIBS) $(LIBEBOOK_LIBS) $(ABOUTME_LIBS) $(EEL_LIBS)
 gnome_about_me_LDFLAGS = -export-dynamic
 
 @INTLTOOL_DESKTOP_RULE@
@@ -38,6 +35,7 @@ glade_DATA = $(glade_files)
 INCLUDES = \
 	$(GNOMECC_CAPPLETS_CFLAGS) \
 	$(LIBEBOOK_CFLAGS) \
+	$(EEL_CFLAGS) \
 	-DDATADIR="\"$(datadir)\"" \
 	-DGNOMECC_DATA_DIR="\"$(pkgdatadir)\"" \
 	-DGNOMECC_GLADE_DIR="\"$(gladedir)\"" \
--- gnome-control-center-2.19.1/capplets/about-me/gnome-about-me.c.gecos	2007-05-21 01:09:52.000000000 -0400
+++ gnome-control-center-2.19.1/capplets/about-me/gnome-about-me.c	2007-05-21 01:09:52.000000000 -0400
@@ -36,6 +36,7 @@
 #include <libebook/e-book.h>
 
 #include "e-image-chooser.h"
+#include <eel/eel-editable-label.h>
 
 #include "capplet-util.h"
 
@@ -58,6 +59,7 @@ typedef struct {
 	gboolean      	 have_image;
 	gboolean      	 image_changed;
 	gboolean      	 create_self;
+        gboolean         editing_username;
 
 	gchar        	*person;
 	gchar 		*login;
@@ -132,7 +134,7 @@ struct WidToCid ids[] = {
 
 
 static void about_me_set_address_field (EContactAddress *, guint, gchar *);
-
+static gchar *about_me_get_address_field (EContactAddress *, guint);
 
 /*** Utility functions ***/
 static void
@@ -215,6 +217,50 @@ about_me_commit (GnomeAboutMe *me)
 	me->create_self = FALSE;
 }
 
+static void
+update_gecos (GnomeAboutMe *me)
+{
+       const gchar *argv[12];
+       gint i = 0;
+       const gchar *fullname;
+       const gchar *office;
+       const gchar *office_phone;
+       const gchar *home_phone;
+
+       argv[i++] = "/usr/bin/userinfo";
+
+       fullname = e_contact_get_const (me->contact, E_CONTACT_FULL_NAME);
+       office = about_me_get_address_field (me->addr2, ADDRESS_LOCALITY);
+       office_phone = e_contact_get_const (me->contact, E_CONTACT_PHONE_BUSINESS);
+       home_phone = e_contact_get_const (me->contact, E_CONTACT_PHONE_HOME);
+
+       if (fullname) {
+               argv[i++] = "-f";
+               argv[i++] = fullname;
+       }
+
+       if (office) {
+               argv[i++] = "-o";
+               argv[i++] = office;
+       }
+
+       if (office_phone) {
+               argv[i++] = "-p";
+               argv[i++] = office_phone;
+       }
+
+       if (home_phone) {
+               argv[i++] = "-h";
+               argv[i++] = home_phone;
+       }
+
+       argv[i++] = "-x";
+       argv[i++] = NULL;
+
+       g_spawn_sync (NULL, (gchar **)argv, NULL, 0,
+                     NULL, NULL, NULL, NULL, NULL, NULL);
+}
+
 static gboolean 
 about_me_commit_from_timeout (GnomeAboutMe *me)
 {
@@ -281,22 +327,6 @@ about_me_focus_out (GtkWidget *widget, G
 	return FALSE;
 }
 
-static char *
-get_user_login (void)
-{
-	char buf[LINE_MAX * 4];
-	struct passwd pwd, *err;
-
-	int i;
-#if __sun
-	i = getpwuid_r (getuid (), &pwd, buf, sizeof (buf));
-	return (i != 0) ? g_strdup (pwd.pw_name) : NULL;
-#else
-	i = getpwuid_r (getuid (), &pwd, buf, sizeof (buf), &err);
-	return ((i == 0) && (err == &pwd)) ? g_strdup (pwd.pw_name) : NULL;
-#endif
-}
-
 /*
  * Helpers
  */
@@ -730,6 +760,8 @@ about_me_button_clicked_cb (GtkDialog *d
 			g_source_remove (me->commit_timeout_id);
 			about_me_commit (me);
 		}
+                 
+                update_gecos (me);
 
 		about_me_destroy (me);
 		gtk_main_quit ();
@@ -740,13 +772,149 @@ static void
 about_me_passwd_clicked_cb (GtkWidget *button, GnomeAboutMe *me)
 {
         gchar *argv[2]; 
-	GladeXML *dialog;
 	
         argv[0] = "/usr/bin/userpasswd";
         argv[1] = NULL;
 	g_spawn_async (NULL, argv, NULL, 0, NULL, NULL, NULL, NULL);
 }
 
+static GtkWidget *
+find_fullname_editable_label (GnomeAboutMe *me)
+{
+       GtkWidget    *widget;
+       GList        *list;
+       GtkWidget    *c;
+       GladeXML     *dialog;
+
+       dialog = me->dialog;
+
+       widget = WID ("fullnamebox");
+
+       list = gtk_container_get_children (GTK_CONTAINER (widget->parent));
+
+       while (list) {
+               c = list->data;
+
+               if (EEL_IS_EDITABLE_LABEL (c))
+                      break;
+
+               c = NULL;
+
+               list = list->next;
+       }
+
+       g_list_free (list);
+
+       return c;
+}
+
+static void
+about_me_button_clicked (GtkWidget      *button,
+                        GnomeAboutMe   *me)
+{
+       GtkWidget    *label;
+       GtkWidget    *entry;
+       PangoFontDescription *font;
+       gint size;
+       const gchar *text;
+
+       label = gtk_bin_get_child (GTK_BIN (button));
+       entry = find_fullname_editable_label (me);
+
+       font = pango_font_description_copy (label->style->font_desc);
+        size = pango_font_description_get_size (font);
+        if (size == 0)
+               size = 10;
+       pango_font_description_set_size (font, size * PANGO_SCALE_XX_LARGE);
+       pango_font_description_set_weight (font, PANGO_WEIGHT_BOLD);
+
+       eel_editable_label_set_font_description (EEL_EDITABLE_LABEL (entry), font);
+       pango_font_description_free (font);
+
+       gtk_misc_set_alignment (GTK_MISC (entry), 0.0, 0.5);
+
+        me->editing_username = TRUE;
+
+        text = gtk_label_get_text (GTK_LABEL (label));
+        eel_editable_label_set_text (EEL_EDITABLE_LABEL (entry), text);
+
+       gtk_widget_hide (button);
+       gtk_widget_show (entry);
+       gtk_widget_grab_focus (entry);
+}
+
+static void stop_editing (GnomeAboutMe *me, gboolean commit)
+{
+       GtkWidget   *button;
+       GtkWidget   *label;
+       GtkWidget   *entry;
+       GtkWidget   *main_dialog;
+       const gchar *text;
+       gchar *str;
+       GladeXML     *dialog;
+
+       if (!me->editing_username)
+               return;
+
+       me->editing_username = FALSE;
+
+       dialog = me->dialog;
+
+       button = WID ("fullnamebox");
+       label = gtk_bin_get_child (GTK_BIN (button));
+       entry = find_fullname_editable_label (me);
+
+       if (commit) {
+               text = eel_editable_label_get_text (EEL_EDITABLE_LABEL (entry));
+               str = g_strdup_printf ("<b><span size=\"xx-large\">%s</span></b>", text);
+               gtk_label_set_markup (GTK_LABEL (label), str);
+               g_free (str);
+
+               g_free (me->username);
+               me->username = g_strdup (text);
+               e_contact_set (me->contact, E_CONTACT_FULL_NAME, me->username);
+
+               main_dialog = WID ("about-me-dialog");
+               str = g_strdup_printf (_("About %s"), me->username);
+               gtk_window_set_title (GTK_WINDOW (main_dialog), str);
+               g_free (str);
+       }
+
+       gtk_widget_hide (entry);
+       gtk_widget_show (button);
+}
+
+static gboolean
+about_me_entry_focus_out (GtkWidget     *entry,
+                         GdkEventFocus *event,
+                         GnomeAboutMe  *me)
+{
+       stop_editing (me, TRUE);
+
+       return FALSE;
+}
+
+static gboolean
+about_me_entry_key_press (GtkWidget    *entry,
+                         GdkEventKey  *event,
+                         GnomeAboutMe *me)
+{
+        switch (event->keyval)
+        {
+        case GDK_Return:
+        case GDK_KP_Enter:
+                stop_editing (me, TRUE);
+                return TRUE;
+        case GDK_Escape:
+                stop_editing (me, FALSE);
+                return TRUE;
+        default:
+                break;
+        }
+
+        return FALSE;
+}
+
 static gint
 about_me_setup_dialog (void)
 {
@@ -756,6 +924,8 @@ about_me_setup_dialog (void)
 	GladeXML     *dialog;
 	GError 	     *error = NULL;
         gchar        *str;
+        GtkWidget    *entry;
+        GtkWidget    *button;
 
 	me = g_new0 (GnomeAboutMe, 1);
 
@@ -834,6 +1004,25 @@ about_me_setup_dialog (void)
 	gtk_label_set_markup (GTK_LABEL (widget), str);
 	g_free (str);
 
+       button = WID ("fullnamebox");
+       g_signal_connect (button, "clicked",
+                         G_CALLBACK (about_me_button_clicked), me);
+
+       entry = eel_editable_label_new (me->username);
+       eel_editable_label_set_line_wrap (EEL_EDITABLE_LABEL (entry), TRUE);
+        gtk_container_add (GTK_CONTAINER (button->parent), entry);
+       gtk_box_reorder_child (GTK_BOX (button->parent), entry, 3);
+       g_signal_connect (entry, "focus-out-event",
+                         G_CALLBACK (about_me_entry_focus_out), me);
+       g_signal_connect (entry, "key-press-event",
+                         G_CALLBACK (about_me_entry_key_press), me);
+
+       gtk_widget_set_no_show_all (button, TRUE);
+       gtk_widget_set_no_show_all (entry, TRUE);
+       gtk_widget_show (widget);
+       gtk_widget_show (button);
+       gtk_widget_hide (entry);
+
 	widget = WID ("login");
 	gtk_label_set_text (GTK_LABEL (widget), me->login);
 
--- gnome-control-center-2.19.1/configure.in.gecos	2007-05-21 01:09:52.000000000 -0400
+++ gnome-control-center-2.19.1/configure.in	2007-05-21 01:09:52.000000000 -0400
@@ -337,6 +337,7 @@ if test "x$enable_aboutme" = "xyes"; the
        
      PKG_CHECK_MODULES(LIBEBOOK, libebook-1.2)
   fi
+  PKG_CHECK_MODULES(EEL, eel-2.0)
 fi
 
 if test -n "$LIBEBOOK_REQUIREMENT"; then

control-center-2.19.1-gnome-bg.patch:

--- NEW FILE control-center-2.19.1-gnome-bg.patch ---
--- gnome-control-center-2.19.1/capplets/background/gnome-wp-info.h.gnome-bg	2007-01-02 07:47:00.000000000 -0500
+++ gnome-control-center-2.19.1/capplets/background/gnome-wp-info.h	2007-05-21 00:45:50.000000000 -0400
@@ -40,7 +40,6 @@ struct _GnomeWPInfo {
 
 GnomeWPInfo * gnome_wp_info_new (const gchar * uri,
 				 GnomeThumbnailFactory * thumbs);
-GnomeWPInfo * gnome_wp_info_dup (const GnomeWPInfo * info);
 void gnome_wp_info_free (GnomeWPInfo * info);
 
 #endif
--- gnome-control-center-2.19.1/capplets/background/gnome-wp-xml.c.gnome-bg	2007-03-06 04:40:46.000000000 -0500
+++ gnome-control-center-2.19.1/capplets/background/gnome-wp-xml.c	2007-05-21 00:45:50.000000000 -0400
@@ -223,16 +223,19 @@ static void gnome_wp_xml_load_xml (Gnome
 	   g_file_test (wp->filename, G_FILE_TEST_EXISTS)) ||
 	  !strcmp (wp->filename, "(none)")) {
 	wp->fileinfo = gnome_wp_info_new (wp->filename, capplet->thumbs);
-
 	if (wp->name == NULL || !strcmp (wp->filename, "(none)")) {
 	  wp->name = g_strdup (wp->fileinfo->name);
 	}
-
+	
 	gnome_wp_item_update_description (wp);
 	g_hash_table_insert (capplet->wphash, wp->filename, wp);
       } else {
 	gnome_wp_item_free (wp);
+	wp = NULL;
       }
+
+      if (wp)
+	gnome_wp_item_ensure_gnome_bg (wp);
     }
   }
   xmlFreeDoc (wplist);
--- gnome-control-center-2.19.1/capplets/background/gnome-wp-capplet.c.gnome-bg	2007-04-18 05:35:29.000000000 -0400
+++ gnome-control-center-2.19.1/capplets/background/gnome-wp-capplet.c	2007-05-21 00:45:50.000000000 -0400
@@ -17,7 +17,7 @@
  *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
  *
  */
-
+#include <libgnomeui/gnome-bg.h>
 #include "gnome-wp-capplet.h"
 
 enum {
@@ -193,6 +193,43 @@ static void bg_properties_dragged_image 
   }
 }
 
+static gboolean predicate (gpointer key, gpointer value, gpointer data)
+{
+  GnomeBG *bg = data;
+  GnomeWPItem *item = value;
+
+  return item->bg == bg;
+}
+
+static void on_item_changed (GnomeBG *bg, GnomeWPCapplet *capplet) {
+  GtkTreeModel *model;
+  GtkTreeIter iter;
+  GtkTreePath *path;
+  GnomeWPItem *item;
+
+  item = g_hash_table_find (capplet->wphash, predicate, bg);
+
+  if (!item)
+    return;
+  
+  model = gtk_tree_row_reference_get_model (item->rowref);
+  path = gtk_tree_row_reference_get_path (item->rowref);
+
+  if (gtk_tree_model_get_iter (model, &iter, path)) {
+    g_signal_handlers_block_by_func (bg, G_CALLBACK (on_item_changed), capplet);
+      
+    GdkPixbuf *pixbuf = gnome_wp_item_get_thumbnail (item, capplet->thumbs);
+    if (pixbuf) {
+      gtk_list_store_set (GTK_LIST_STORE (capplet->model), &iter,
+			  0, pixbuf,
+			  -1);
+      g_object_unref (pixbuf);
+    }
+
+    g_signal_handlers_unblock_by_func (bg, G_CALLBACK (on_item_changed), capplet);
+  }
+}
+
 static void wp_props_load_wallpaper (gchar * key,
 				     GnomeWPItem * item,
 				     GnomeWPCapplet * capplet) {
@@ -224,6 +261,7 @@ static void wp_props_load_wallpaper (gch
   }
   path = gtk_tree_model_get_path (capplet->model, &iter);
   item->rowref = gtk_tree_row_reference_new (capplet->model, path);
+  g_signal_connect (item->bg, "changed", G_CALLBACK (on_item_changed), capplet);
   gtk_tree_path_free (path);
 }
 
@@ -1011,7 +1049,6 @@ static void wallpaper_properties_init (v
 							       NULL);
   gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (capplet->filesel),
 					TRUE);
-
   gtk_file_chooser_set_use_preview_label (GTK_FILE_CHOOSER (capplet->filesel),
 					  FALSE);
 
--- gnome-control-center-2.19.1/capplets/background/gnome-wp-info.c.gnome-bg	2007-01-08 13:15:11.000000000 -0500
+++ gnome-control-center-2.19.1/capplets/background/gnome-wp-info.c	2007-05-21 00:45:50.000000000 -0400
@@ -67,27 +67,6 @@ GnomeWPInfo * gnome_wp_info_new (const g
   return new;
 }
 
-GnomeWPInfo * gnome_wp_info_dup (const GnomeWPInfo * info) {
-  GnomeWPInfo * new;
-
-  if (info == NULL) {
-    return NULL;
-  }
-
-  new = g_new0 (GnomeWPInfo, 1);
-
-  new->uri = g_strdup (info->uri);
-  new->thumburi = g_strdup (info->uri);
-
-  new->name = g_strdup (info->name);
-  new->mime_type = g_strdup (info->mime_type);
-
-  new->size = info->size;
-  new->mtime = info->mtime;
-
-  return new;
-}
-
 void gnome_wp_info_free (GnomeWPInfo * info) {
   if (info == NULL) {
     return;
--- gnome-control-center-2.19.1/capplets/background/gnome-wp-item.h.gnome-bg	2007-01-02 07:47:00.000000000 -0500
+++ gnome-control-center-2.19.1/capplets/background/gnome-wp-item.h	2007-05-21 00:45:50.000000000 -0400
@@ -24,6 +24,7 @@
 #include <libgnomeui/gnome-thumbnail.h>
 #include <gnome-wp-info.h>
 #include <libgnomevfs/gnome-vfs.h>
+#include <libgnomeui/gnome-bg.h>
 
 #ifndef _GNOME_WP_ITEM_H_
 #define _GNOME_WP_ITEM_H_
@@ -31,6 +32,8 @@
 typedef struct _GnomeWPItem GnomeWPItem;
 
 struct _GnomeWPItem {
+  GnomeBG *bg;
+    
   gchar * name;
   gchar * filename;
   gchar * description;
@@ -48,7 +51,6 @@ struct _GnomeWPItem {
   GdkColor * scolor;
 
   GnomeWPInfo * fileinfo;
-  GnomeWPInfo * uriinfo;
 
   /* Did the user remove us? */
   gboolean deleted;
@@ -62,10 +64,10 @@ GnomeWPItem * gnome_wp_item_new (const g
 				 GHashTable * wallpapers,
 				 GnomeThumbnailFactory * thumbnails);
 void gnome_wp_item_free (GnomeWPItem * item);
-GnomeWPItem * gnome_wp_item_dup (GnomeWPItem * item);
 GdkPixbuf * gnome_wp_item_get_thumbnail (GnomeWPItem * item,
 					 GnomeThumbnailFactory * thumbs);
 void gnome_wp_item_update_description (GnomeWPItem * item);
+void gnome_wp_item_ensure_gnome_bg (GnomeWPItem *item);
 
 #endif
 
--- gnome-control-center-2.19.1/capplets/background/gnome-wp-item.c.gnome-bg	2007-03-06 04:40:46.000000000 -0500
+++ gnome-control-center-2.19.1/capplets/background/gnome-wp-item.c	2007-05-21 00:45:50.000000000 -0400
@@ -25,10 +25,56 @@
 #include <gnome.h>
 #include <string.h>
 #include <libgnomevfs/gnome-vfs-mime-handlers.h>
+#include <libgnomeui/gnome-bg.h>
 
 #include "gnome-wp-item.h"
 #include "gnome-wp-utils.h"
 
+static void set_bg_properties (GnomeWPItem *item)
+{
+  GnomeBGColorType color;
+  GnomeBGPlacement placement;
+
+  color = GNOME_BG_COLOR_SOLID;
+  
+  if (item->shade_type) {
+    if (!strcmp (item->shade_type, "horizontal-gradient")) {
+      color = GNOME_BG_COLOR_H_GRADIENT;
+    } else if (!strcmp (item->shade_type, "vertical-gradient")) {
+      color = GNOME_BG_COLOR_V_GRADIENT;
+    }
+  }
+
+  placement = GNOME_BG_PLACEMENT_TILED;
+  
+  if (item->options) {
+    if (!strcmp (item->options, "centered")) {
+      placement = GNOME_BG_PLACEMENT_CENTERED;
+    } else if (!strcmp (item->options, "stretched")) {
+      placement = GNOME_BG_PLACEMENT_FILL_SCREEN;
+    } else if (!strcmp (item->options, "scaled")) {
+      placement = GNOME_BG_PLACEMENT_SCALED;
+    } else if (!strcmp (item->options, "zoom")) {
+      placement = GNOME_BG_PLACEMENT_ZOOMED;
+    }
+  }
+
+  if (item->filename)
+    gnome_bg_set_uri (item->bg, item->filename);
+
+  gnome_bg_set_color (item->bg, color, item->pcolor, item->scolor);
+  gnome_bg_set_placement (item->bg, placement);
+}
+
+void gnome_wp_item_ensure_gnome_bg (GnomeWPItem *item)
+{
+  if (!item->bg) {
+    item->bg = gnome_bg_new ();
+
+    set_bg_properties (item);
+  }
+}
+
 GnomeWPItem * gnome_wp_item_new (const gchar * filename,
 				 GHashTable * wallpapers,
 				 GnomeThumbnailFactory * thumbnails) {
@@ -54,8 +100,11 @@ GnomeWPItem * gnome_wp_item_new (const g
   item->pcolor = gdk_color_copy (&color1);
   item->scolor = gdk_color_copy (&color2);
 
-  if (item->fileinfo != NULL &&
+  if (item->fileinfo != NULL) {
+#if 0
+      &&
       !strncmp (item->fileinfo->mime_type, "image/", strlen ("image/"))) {
+#endif
     if (item->name == NULL) {
       if (g_utf8_validate (item->fileinfo->name, -1, NULL))
 	item->name = g_strdup (item->fileinfo->name);
@@ -76,6 +125,10 @@ GnomeWPItem * gnome_wp_item_new (const g
     item = NULL;
   }
 
+  if (item) {
+    gnome_wp_item_ensure_gnome_bg (item);
+  }
+  
   g_object_unref (client);
 
   return item;
@@ -103,51 +156,15 @@ void gnome_wp_item_free (GnomeWPItem * i
     gdk_color_free (item->scolor);
 
   gnome_wp_info_free (item->fileinfo);
-  gnome_wp_info_free (item->uriinfo);
 
   gtk_tree_row_reference_free (item->rowref);
 
+  if (item->bg)
+      g_object_unref (item->bg);
+  
   item = NULL;
 }
 
-GnomeWPItem * gnome_wp_item_dup (GnomeWPItem * item) {
-  GnomeWPItem * new_item;
-  GdkColor color1, color2;
-
-  if (item == NULL) {
-    return NULL;
-  }
-
-  new_item = g_new0 (GnomeWPItem, 1);
-
-  new_item->name = g_strdup (item->name);
-  new_item->filename = g_strdup (item->filename);
-  new_item->description = g_strdup (item->description);
-  new_item->imguri = g_strdup (item->imguri);
-  new_item->options = g_strdup (item->options);
-  new_item->shade_type = g_strdup (item->shade_type);
-
-  new_item->pri_color = g_strdup (item->pri_color);
-  new_item->sec_color = g_strdup (item->sec_color);
-
-  gdk_color_parse (item->pri_color, &color1);
-  gdk_color_parse (item->sec_color, &color2);
-
-  item->pcolor = gdk_color_copy (&color1);
-  item->scolor = gdk_color_copy (&color2);
-
-  new_item->fileinfo = gnome_wp_info_dup (item->fileinfo);
-  new_item->uriinfo = gnome_wp_info_dup (item->uriinfo);
-
-  new_item->rowref = gtk_tree_row_reference_copy (item->rowref);
-
-  new_item->deleted = item->deleted;
-  new_item->width = item->width;
-  new_item->height = item->height;
-
-  return new_item;
-}
-
 static void collect_save_options (GdkPixbuf * pixbuf,
 				  gchar *** keys,
 				  gchar *** vals,
@@ -201,153 +218,19 @@ static void collect_save_options (GdkPix
 
 GdkPixbuf * gnome_wp_item_get_thumbnail (GnomeWPItem * item,
 					 GnomeThumbnailFactory * thumbs) {
-  GdkPixbuf * pixbuf, * bgpixbuf;
-  GdkPixbuf * scaled = NULL;
-  gint sw, sh, bw, bh, pw, ph, tw, th;
-  gdouble ratio;
-
-  sw = sh = bw = bh = pw = ph = tw = th = 0;
-
-  /*
-     Get the size of the screen and calculate our aspect ratio divisor
-     We do this, so that images are thumbnailed as they would look on
-     the screen in reality
-  */
-  sw = gdk_screen_get_width (gdk_screen_get_default ());
-  sh = gdk_screen_get_height (gdk_screen_get_default ());
-  ratio = (gdouble) sw / (gdouble) LIST_IMAGE_WIDTH;
-  bw = sw / ratio;
-  bh = sh / ratio;
-
-  /*
-     Create the pixbuf for the background colors, which will show up for
-     oddly sized images, smaller images that are centered, or alpha images
-  */
-  if (!strcmp (item->shade_type, "solid")) {
-    bgpixbuf = gnome_wp_pixbuf_new_solid (item->pcolor, bw, bh);
-  } else if (!strcmp (item->shade_type, "vertical-gradient")) {
-    bgpixbuf = gnome_wp_pixbuf_new_gradient (GTK_ORIENTATION_VERTICAL,
-					     item->pcolor, item->scolor,
-					     bw, bh);
-  } else {
-    bgpixbuf = gnome_wp_pixbuf_new_gradient (GTK_ORIENTATION_HORIZONTAL,
-					     item->pcolor, item->scolor,
-					     bw, bh);
-  }
 
-  /*
-     Load up the thumbnail image using the thumbnail spec
-     If the image doesn't exist, we create it
-     If we are creating the thumbnail for "No Wallpaper", then we just copy
-     the background colors pixbuf we created above, here
-  */
-  pixbuf = NULL;
-  if (!strcmp (item->filename, "(none)")) {
-    return bgpixbuf;
-  } else {
-    gchar * escaped_path, * thumbnail_filename;
-
-    escaped_path = gnome_vfs_escape_path_string (item->filename);
-    thumbnail_filename = gnome_thumbnail_factory_lookup (thumbs,
-                                                         escaped_path,
-                                                         item->fileinfo->mtime);
-
-    if (thumbnail_filename == NULL) {
-    pixbuf = gnome_thumbnail_factory_generate_thumbnail (thumbs,
-							 escaped_path,
-							 item->fileinfo->mime_type);
-    gnome_thumbnail_factory_save_thumbnail (thumbs, pixbuf,
-					    escaped_path,
-					    item->fileinfo->mtime);
-       g_object_unref (pixbuf);
-       pixbuf = NULL;
-
-       thumbnail_filename = gnome_thumbnail_factory_lookup (thumbs,
-                                                            escaped_path,
-                                                            item->fileinfo->mtime);
-    }
+  GdkPixbuf *pixbuf;
+  double aspect =
+    (double)gdk_screen_get_height (gdk_screen_get_default()) / 
+    gdk_screen_get_width (gdk_screen_get_default());
 
-    if (thumbnail_filename != NULL) {
- 
-      pixbuf = gdk_pixbuf_new_from_file (thumbnail_filename, NULL);
-
-      if (pixbuf != NULL) {
-      	g_free (item->fileinfo->thumburi);
-        item->fileinfo->thumburi = thumbnail_filename;
-        thumbnail_filename = NULL;
-      }
-
-      g_free (thumbnail_filename);
-    }
-
-    g_free (escaped_path);
-  }
-
-  if (pixbuf != NULL) {
-    const gchar * w_val, * h_val;
-
-    w_val = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::Image::Width");
-    h_val = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::Image::Height");
-    if (item->width <= 0 || item->height <= 0) {
-      if (w_val && h_val) {
-	item->width = atoi (w_val);
-	item->height = atoi (h_val);
-      } else {
-	gchar ** keys = NULL;
-	gchar ** vals = NULL;
-
-        gdk_pixbuf_get_file_info (item->filename, 
-                                  &item->width, &item->height); 
-	collect_save_options (pixbuf, &keys, &vals, item->width, item->height);
-	gdk_pixbuf_savev (pixbuf, item->fileinfo->thumburi, "png",
-			  keys, vals, NULL);
-
-	g_strfreev (keys);
-	g_strfreev (vals);
-      }
-    }
-
-    pw = gdk_pixbuf_get_width (pixbuf);
-    ph = gdk_pixbuf_get_height (pixbuf);
-
-    if (item->width <= bw && item->height <= bh)
-      ratio = 1.0;
-
-    tw = item->width / ratio;
-    th = item->height / ratio;
-
-    if (!strcmp (item->options, "wallpaper")) {
-      scaled = gnome_wp_pixbuf_tile (pixbuf, bgpixbuf, tw, th);
-    } else if (!strcmp (item->options, "centered")) {
-      scaled = gnome_wp_pixbuf_center (pixbuf, bgpixbuf, tw, th);
-    } else if (!strcmp (item->options, "stretched")) {
-      scaled = gnome_wp_pixbuf_center (pixbuf, bgpixbuf, bw, bh);
-    } else if (!strcmp (item->options, "scaled")) {
-      if ((gdouble) ph * (gdouble) bw > (gdouble) pw * (gdouble) bh) {
-	tw = 0.5 + (gdouble) pw * (gdouble) bh / (gdouble) ph;
-	th = bh;
-      } else {
-	th = 0.5 + (gdouble) ph * (gdouble) bw / (gdouble) pw;
-	tw = bw;
-      }
-      scaled = gnome_wp_pixbuf_center (pixbuf, bgpixbuf, tw, th);
-    } else if (!strcmp (item->options, "zoom")) {
-      if ((gdouble) ph * (gdouble) bw < (gdouble) pw * (gdouble) bh) {
-	tw = 0.5 + (gdouble) pw * (gdouble) bh / (gdouble) ph; 
-	th = bh;
-      } else {
-	th = 0.5 + (gdouble) ph * (gdouble) bw / (gdouble) pw;
-	tw = bw;
-      }
-      scaled = gnome_wp_pixbuf_center (pixbuf, bgpixbuf, tw, th);
-    }
-
-    g_object_unref (pixbuf);
-  }
-
-  g_object_unref (bgpixbuf);
+  set_bg_properties (item);
+  
+  pixbuf = gnome_bg_create_thumbnail (item->bg, thumbs, gdk_screen_get_default(), LIST_IMAGE_WIDTH, LIST_IMAGE_WIDTH * aspect);
 
-  return scaled;
+  gnome_bg_get_image_size (item->bg, thumbs, &item->width, &item->height);
+  
+  return pixbuf;
 }
 
 void gnome_wp_item_update_description (GnomeWPItem * item) {
--- gnome-control-center-2.19.1/gnome-settings-daemon/gnome-settings-background.c.gnome-bg	2007-04-02 11:37:18.000000000 -0400
+++ gnome-control-center-2.19.1/gnome-settings-daemon/gnome-settings-background.c	2007-05-21 01:01:39.000000000 -0400
@@ -30,66 +30,143 @@
 #include <gdk/gdk.h>
 #include <gdk/gdkx.h>
 #include <gconf/gconf.h>
+#include <libgnomeui/gnome-bg.h>
+#include <X11/Xatom.h>
+#include <string.h>
 
 #include "gnome-settings-background.h"
 #include "gnome-settings-keyboard.h"
 #include "gnome-settings-daemon.h"
 
 #include "preferences.h"
-#include "applier.h"
 
-static BGApplier **bg_appliers;
 static BGPreferences *prefs;
+static GnomeBG *bg;
 
-static guint applier_idle_id = 0;
+static guint timeout_id = 0;
+
+static gboolean nautilus_is_running (void);
 
 static gboolean
-applier_idle (gpointer data)
+apply_prefs (gpointer data)
 {
-	int i;
-	for (i = 0; bg_appliers [i]; i++)
-		bg_applier_apply_prefs (bg_appliers [i], prefs);
-	applier_idle_id = 0;
+	if (!nautilus_is_running()) {
+		GdkDisplay *display;
+		int n_screens, i;
+		GnomeBGPlacement placement;
+		GnomeBGColorType color;
+		const char *uri;
+
+		display = gdk_display_get_default ();
+		n_screens = gdk_display_get_n_screens (display);
+
+		uri = prefs->wallpaper_filename;
+
+		placement = GNOME_BG_PLACEMENT_TILED;
+
+		switch (prefs->wallpaper_type) {
+		case WPTYPE_TILED:
+			placement = GNOME_BG_PLACEMENT_TILED;
+			break;
+		case WPTYPE_CENTERED:
+			placement = GNOME_BG_PLACEMENT_CENTERED;
+			break;
+		case WPTYPE_SCALED:
+			placement = GNOME_BG_PLACEMENT_SCALED;
+			break;
+		case WPTYPE_STRETCHED:
+			placement = GNOME_BG_PLACEMENT_FILL_SCREEN;
+			break;
+		case WPTYPE_ZOOM:
+			placement = GNOME_BG_PLACEMENT_ZOOMED;
+			break;
+		case WPTYPE_NONE:
+		case WPTYPE_UNSET:
+			uri = NULL;
+			break;
+		}
+
+		switch (prefs->orientation) {
+		case ORIENTATION_SOLID:
+			color = GNOME_BG_COLOR_SOLID;
+			break;
+		case ORIENTATION_HORIZ:
+			color = GNOME_BG_COLOR_H_GRADIENT;
+			break;
+		case ORIENTATION_VERT:
+			color = GNOME_BG_COLOR_V_GRADIENT;
+			break;
+		default:
+			color = GNOME_BG_COLOR_SOLID;
+			break;
+		}
+
+		gnome_bg_set_uri (bg, uri);
+		gnome_bg_set_placement (bg, placement);
+		gnome_bg_set_color (bg, color, prefs->color1, prefs->color2);
+
+		for (i = 0; i < n_screens; ++i) {
+			GdkScreen *screen;
+			GdkWindow *root_window;
+			GdkPixmap *pixmap;
+
+			screen = gdk_display_get_screen (display, i);
+
+			root_window = gdk_screen_get_root_window (screen);
+
+			pixmap = gnome_bg_create_pixmap (bg, root_window,
+							 gdk_screen_get_width (screen),
+							 gdk_screen_get_height (screen),
+							 TRUE);
+
+			gnome_bg_set_pixmap_as_root (screen, pixmap);
+
+			g_object_unref (pixmap);
+		}
+	}
+
 	return FALSE;
 }
 
 static void
+queue_apply (void)
+{
+	if (timeout_id) {
+		g_source_remove (timeout_id);
+	}
+
+	timeout_id = g_timeout_add (100, apply_prefs, NULL);
+}  
+
+static void
 background_callback (GConfEntry *entry) 
 {
 	bg_preferences_merge_entry (prefs, entry);
 
-	if (applier_idle_id != 0) {
-		g_source_remove (applier_idle_id);
-	}
+	queue_apply ();	
+}
 
-	applier_idle_id = g_timeout_add (100, applier_idle, NULL);
+static void
+on_bg_changed (GnomeBG *bg)
+{
+	queue_apply ();
 }
 
 void
 gnome_settings_background_init (GConfClient *client)
 {
-	GdkDisplay *display;
-	int         n_screens;
-	int         i;
-
-	display = gdk_display_get_default ();
-	n_screens = gdk_display_get_n_screens (display);
-
-	bg_appliers = g_new (BGApplier *, n_screens + 1);
+	prefs = BG_PREFERENCES (bg_preferences_new ());
 
-	for (i = 0; i < n_screens; i++) {
-		GdkScreen *screen;
+	bg = gnome_bg_new ();
 
-		screen = gdk_display_get_screen (display, i);
+	g_signal_connect (bg, "changed", G_CALLBACK (on_bg_changed), NULL);
 
-		bg_appliers [i] = BG_APPLIER (bg_applier_new_for_screen (BG_APPLIER_ROOT, screen));
-	}
-	bg_appliers [i] = NULL;
-
-	prefs = BG_PREFERENCES (bg_preferences_new ());
 	bg_preferences_load (prefs);
 
-	gnome_settings_register_config_callback ("/desktop/gnome/background", background_callback);
+	apply_prefs (NULL);
+
+	gnome_settings_daemon_register_callback ("/desktop/gnome/background", 
+						 background_callback);
 }
 
 void
@@ -108,6 +185,70 @@ gnome_settings_background_load (GConfCli
 	if (gconf_client_get_bool (client, "/apps/nautilus/preferences/show_desktop", NULL))
 		return;
 
-	for (i = 0; bg_appliers [i]; i++)
-		bg_applier_apply_prefs (bg_appliers [i], prefs);
+	apply_prefs (NULL);
+}
+
+static gboolean
+nautilus_is_running (void)
+{
+	Atom window_id_atom;
+	Window nautilus_xid;
+	Atom actual_type;
+	int actual_format;
+	unsigned long nitems, bytes_after;
+	unsigned char *data;
+	int retval;
+	Atom wmclass_atom;
+	gboolean running;
+	gint error;
+
+	window_id_atom = XInternAtom (GDK_DISPLAY (), 
+				      "NAUTILUS_DESKTOP_WINDOW_ID", True);
+
+	if (window_id_atom == None) return FALSE;
+
+	retval = XGetWindowProperty (GDK_DISPLAY (), GDK_ROOT_WINDOW (),
+				     window_id_atom, 0, 1, False, XA_WINDOW,
+				     &actual_type, &actual_format, &nitems,
+				     &bytes_after, &data);
+
+	if (data != NULL) {
+		nautilus_xid = *(Window *) data;
+		XFree (data);
+	} else {
+		return FALSE;
+	}
+
+	if (actual_type != XA_WINDOW) return FALSE;
+	if (actual_format != 32) return FALSE;
+
+	wmclass_atom = XInternAtom (GDK_DISPLAY (), "WM_CLASS", False);
+
+	gdk_error_trap_push ();
+
+	retval = XGetWindowProperty (GDK_DISPLAY (), nautilus_xid,
+				     wmclass_atom, 0, 24, False, XA_STRING,
+				     &actual_type, &actual_format, &nitems,
+				     &bytes_after, &data);
+
+	error = gdk_error_trap_pop ();
+
+	if (error == BadWindow) return FALSE;
+
+	if (actual_type == XA_STRING &&
+	    nitems == 24 &&
+	    bytes_after == 0 &&
+	    actual_format == 8 &&
+	    data != NULL &&
+	    !strcmp ((char *)data, "desktop_window") &&
+	    !strcmp ((char *)data + strlen ((char *)data) + 1, "Nautilus"))
+		running = TRUE;
+	else
+		running = FALSE;
+
+	if (data != NULL)
+		XFree (data);
+
+	return running;
 }
+

control-center-2.19.1-search.patch:

--- NEW FILE control-center-2.19.1-search.patch ---
--- gnome-control-center-2.19.1/gnome-settings-daemon/gnome-settings-multimedia-keys.c.search	2007-04-02 06:35:01.000000000 -0400
+++ gnome-control-center-2.19.1/gnome-settings-daemon/gnome-settings-multimedia-keys.c	2007-05-19 23:33:22.000000000 -0400
@@ -648,7 +648,14 @@ do_action (Acme *acme, int type)
 		execute (acme, "nautilus", FALSE, FALSE);
 		break;
 	case SEARCH_KEY:
-		execute (acme, "gnome-search-tool", FALSE, FALSE);
+		cmd = NULL;
+		if ((cmd = g_find_program_in_path ("beagle-search")))
+			execute (acme, "beagle-search", FALSE, FALSE);
+		else if ((cmd = g_find_program_in_path ("tracker-search-tool")))
+			execute (acme, "tracker-search-tool", FALSE, FALSE);
+		else
+			execute (acme, "gnome-search-tool", FALSE, FALSE);
+		g_free (cmd);
 		break;
 	case EMAIL_KEY:
 		do_mail_action (acme);


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/control-center/devel/.cvsignore,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- .cvsignore	13 Mar 2007 18:18:40 -0000	1.54
+++ .cvsignore	21 May 2007 05:24:53 -0000	1.55
@@ -1 +1 @@
-control-center-2.18.0.tar.bz2
+gnome-control-center-2.19.1.tar.bz2


Index: control-center.spec
===================================================================
RCS file: /cvs/extras/rpms/control-center/devel/control-center.spec,v
retrieving revision 1.250
retrieving revision 1.251
diff -u -r1.250 -r1.251
--- control-center.spec	1 May 2007 10:20:53 -0000	1.250
+++ control-center.spec	21 May 2007 05:24:53 -0000	1.251
@@ -20,12 +20,12 @@
 
 Summary: GNOME Control Center
 Name: control-center
-Version: 2.18.0
-Release: 16%{?dist}
+Version: 2.19.1
+Release: 1%{?dist}
 Epoch: 1
 License: GPL/LGPL
 Group: User Interface/Desktops
-Source: http://ftp.gnome.org/pub/GNOME/sources/control-center/2.18/control-center-%{version}.tar.bz2
+Source: http://download.gnome.org/sources/gnome-control-center/2.19/gnome-control-center-%{version}.tar.bz2
 
 # Remove "Apply" button and just have "Close" instead
 # FIXME: We should figure out what to do about this...either get
@@ -34,15 +34,14 @@
 
 # Optionally bring up beagle or tracker if available
 # FIXME: need to get this filed upstream
-Patch2: control-center-2.17.90-search.patch
+Patch2: control-center-2.19.1-search.patch
 
 # drop help button from a dialog that doesn't have
 # help
 # FIXME: need to get this filed upstream
 Patch3: control-center-2.16.0-about-me-help.patch
 
-# http://bugzilla.gnome.org/show_bug.cgi?id=376045
-Patch5: control-center-2.17.91-compiz-support.patch
+Patch5: control-center-2.19.1-compiz-support.patch
 
 # ubuntu has a better patch for this in the works
 # apparently http://blog.omma.net/?p=16
@@ -53,27 +52,25 @@
 
 Patch13: control-center-2.17.91-no-gnome-common.patch
 
-Patch14: control-center-2.18.0-gnome-bg.patch
-
-# http://bugzilla.gnome.org/show_bug.cgi?id=425650
-Patch15: control-center-2.18.0-ellipsize-sound-devices.patch
+Patch14: control-center-2.19.1-gnome-bg.patch
 
 # http://bugzilla.gnome.org/show_bug.cgi?id=430889
-Patch16: control-center-2.18.0-be-more-async.patch
+# disable for now, upstream plans conflicting changes
+#Patch16: control-center-2.18.0-be-more-async.patch
 
 # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=236393
 Patch17: control-center-trunk-set-face-perms-4.patch
 
 # call the Fedora/RHEL graphical passwd changing apps
 Patch95: control-center-2.17.91-passwd.patch
-Patch96: control-center-2.18.0-gecos.patch
+Patch96: control-center-2.19.1-gecos.patch
 
 # change default wallpaper directory to where we ship our
 # backgrounds
 Patch98: control-center-2.9.4-filesel.patch
 
 # change default preferred apps to programs we ship
-Patch99: control-center-2.17.5-default-apps.patch
+Patch99: control-center-2.19.1-default-apps.patch
 
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 
@@ -169,7 +166,7 @@
 This packages development files for GNOME Control Center.
 
 %prep
-%setup -q
+%setup -q -n gnome-control-center-%{version}
 
 %patch1 -p1 -b .finish
 %patch2 -p1 -b .search
@@ -179,8 +176,7 @@
 #%patch12 -p1 -b .start-at-helper
 %patch13 -p1 -b .no-gnome-common
 %patch14 -p1 -b .gnome-bg
-%patch15 -p1 -b .ellipsize-sound-devices
-%patch16 -p1 -b .be-more-async
+#%patch16 -p1 -b .be-more-async
 
 # vendor configuration patches
 %patch95 -p1 -b .passwd
@@ -331,6 +327,9 @@
 %{_libdir}/pkgconfig/*
 
 %changelog
+* Sat May 10 2007 Matthias Clasen <mclasen at redhat.com> - 2.19.1-1
+- Update to 2.19.1
+
 * Tue May 01 2007 - Bastien Nocera <bnocera at redhat.com> - 2.18.0-16
 - Add missing dbus-x11 dependency, otherwise gnome-settings-daemon
   cannot be started (#204706)


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/control-center/devel/sources,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- sources	13 Mar 2007 18:18:40 -0000	1.57
+++ sources	21 May 2007 05:24:53 -0000	1.58
@@ -1 +1 @@
-e5251c30c45577b78770beb2df59df5d  control-center-2.18.0.tar.bz2
+69760fa4cc17cb1f5e561440005fb0f3  gnome-control-center-2.19.1.tar.bz2


--- control-center-2.17.90-search.patch DELETED ---




More information about the fedora-extras-commits mailing list