rpms/control-center/devel control-center-2.19.3-gecos.patch, NONE, 1.1 control-center-2.19.3-no-gnome-common.patch, NONE, 1.1 .cvsignore, 1.55, 1.56 control-center.spec, 1.261, 1.262 sources, 1.58, 1.59 control-center-2.17.91-no-gnome-common.patch, 1.1, NONE control-center-2.19.1-gecos.patch, 1.1, NONE

Matthias Clasen (mclasen) fedora-extras-commits at redhat.com
Tue Jun 5 04:53:13 UTC 2007


Author: mclasen

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

Modified Files:
	.cvsignore control-center.spec sources 
Added Files:
	control-center-2.19.3-gecos.patch 
	control-center-2.19.3-no-gnome-common.patch 
Removed Files:
	control-center-2.17.91-no-gnome-common.patch 
	control-center-2.19.1-gecos.patch 
Log Message:
Fix patches


control-center-2.19.3-gecos.patch:

--- NEW FILE control-center-2.19.3-gecos.patch ---
--- gnome-control-center-2.19.3/capplets/about-me/gnome-about-me.glade.gecos	2007-06-05 00:41:16.000000000 -0400
+++ gnome-control-center-2.19.3/capplets/about-me/gnome-about-me.glade	2007-06-05 00:41:16.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.3/capplets/about-me/Makefile.am.gecos	2007-04-26 05:31:03.000000000 -0400
+++ gnome-control-center-2.19.3/capplets/about-me/Makefile.am	2007-06-05 00:42:53.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)
+gnome_about_me_LDADD = $(GNOMECC_CAPPLETS_LIBS) $(LIBEBOOK_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.3/capplets/about-me/gnome-about-me.c.gecos	2007-06-05 00:41:16.000000000 -0400
+++ gnome-control-center-2.19.3/capplets/about-me/gnome-about-me.c	2007-06-05 00:41:16.000000000 -0400
@@ -37,6 +37,7 @@
 #include <libebook/e-book.h>
 
 #include "e-image-chooser.h"
+#include <eel/eel-editable-label.h>
 
 #include "capplet-util.h"
 
@@ -59,6 +60,7 @@ typedef struct {
 	gboolean      	 have_image;
 	gboolean      	 image_changed;
 	gboolean      	 create_self;
+        gboolean         editing_username;
 
 	gchar        	*person;
 	gchar 		*login;
@@ -133,7 +135,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
@@ -216,6 +218,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)
 {
@@ -282,22 +328,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
  */
@@ -738,6 +768,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 ();
@@ -748,13 +780,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)
 {
@@ -764,6 +932,8 @@ about_me_setup_dialog (void)
 	GladeXML     *dialog;
 	GError 	     *error = NULL;
         gchar        *str;
+        GtkWidget    *entry;
+        GtkWidget    *button;
 
 	me = g_new0 (GnomeAboutMe, 1);
 
@@ -842,6 +1012,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.3/configure.in.gecos	2007-06-05 00:41:16.000000000 -0400
+++ gnome-control-center-2.19.3/configure.in	2007-06-05 00:41:16.000000000 -0400
@@ -254,6 +254,7 @@ if test x$enable_vfs_methods = xyes; the
     FONT_THUMBNAILER_LIBS=`echo $FONT_THUMBNAILER_LIBS | sed -e "s/$export_dynamic//"`
     FONT_METHOD_LIBS=`echo $FONT_METHOD_LIBS | sed -e "s/$export_dynamic//"`
   fi
+  PKG_CHECK_MODULES(EEL, eel-2.0)
 fi
 
 dnl ==============================================

control-center-2.19.3-no-gnome-common.patch:

--- NEW FILE control-center-2.19.3-no-gnome-common.patch ---
--- gnome-control-center-2.19.3/configure.in.no-gnome-common	2007-06-04 07:04:04.000000000 -0400
+++ gnome-control-center-2.19.3/configure.in	2007-06-05 00:34:32.000000000 -0400
@@ -44,11 +44,6 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GE
 
 AM_GLIB_GNU_GETTEXT
 
-GNOME_COMMON_INIT
-GNOME_DEBUG_CHECK
-GNOME_COMPILE_WARNINGS([maximum])
-GNOME_MAINTAINER_MODE_DEFINES
-
 AC_PATH_XTRA
 x_libs="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
 


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/control-center/devel/.cvsignore,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- .cvsignore	21 May 2007 05:24:53 -0000	1.55
+++ .cvsignore	5 Jun 2007 04:52:09 -0000	1.56
@@ -1 +1 @@
-gnome-control-center-2.19.1.tar.bz2
+gnome-control-center-2.19.3.tar.bz2


Index: control-center.spec
===================================================================
RCS file: /cvs/extras/rpms/control-center/devel/control-center.spec,v
retrieving revision 1.261
retrieving revision 1.262
diff -u -r1.261 -r1.262
--- control-center.spec	22 May 2007 16:51:03 -0000	1.261
+++ control-center.spec	5 Jun 2007 04:52:09 -0000	1.262
@@ -20,17 +20,16 @@
 
 Summary: GNOME Control Center
 Name: control-center
-Version: 2.19.1
-Release: 8%{?dist}
+Version: 2.19.3
+Release: 1%{?dist}
 Epoch: 1
 License: GPL/LGPL
 Group: User Interface/Desktops
 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
-# it upstreamed or drop it I guess.
-Patch1: control-center-2.15.4-finish.patch
+# FIXME: figure out how this applies to the new appearance capplet
+#Patch1: control-center-2.15.4-finish.patch
 
 # Optionally bring up beagle or tracker if available
 # FIXME: need to get this filed upstream
@@ -48,24 +47,23 @@
 # control-center
 #Patch12: control-center-2.16.0-start-at-helper.patch
 
-Patch13: control-center-2.17.91-no-gnome-common.patch
+Patch13: control-center-2.19.3-no-gnome-common.patch
 
-Patch14: control-center-2.19.1-gnome-bg.patch
+# FIXME: figure out how this applies to the new appearance capplet
+#Patch14: control-center-2.19.1-gnome-bg.patch
 
 # http://bugzilla.gnome.org/show_bug.cgi?id=430889
 # 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.19.1-gecos.patch
+Patch96: control-center-2.19.3-gecos.patch
 
 # change default wallpaper directory to where we ship our
 # backgrounds
-Patch98: control-center-2.9.4-filesel.patch
+# FIXME: figure out how this applies to the new appearance capplet
+#Patch98: control-center-2.9.4-filesel.patch
 
 # change default preferred apps to programs we ship
 Patch99: control-center-2.19.1-default-apps.patch
@@ -167,22 +165,19 @@
 %prep
 %setup -q -n gnome-control-center-%{version}
 
-%patch1 -p1 -b .finish
+#%patch1 -p1 -b .finish
 %patch2 -p1 -b .search
 %patch3 -p1 -b .about-me-help
 
 #%patch12 -p1 -b .start-at-helper
 %patch13 -p1 -b .no-gnome-common
-%patch14 -p1 -b .gnome-bg
+#%patch14 -p1 -b .gnome-bg
 #%patch16 -p1 -b .be-more-async
-pushd capplets/about-me/
-%patch17 -p0 -b .face-perms
-popd
 
 # vendor configuration patches
 %patch95 -p1 -b .passwd
 %patch96 -p1 -b .gecos
-%patch98 -p1 -b .filesel
+#%patch98 -p1 -b .filesel
 %patch99 -p1 -b .default-apps
 %build
 
@@ -333,6 +328,9 @@
 %{_libdir}/pkgconfig/*
 
 %changelog
+* Tue Jun  5 2007 Matthias Clasen <mclasen at redhat.com> - 2.19.3-1
+- Update to 2.19.3
+
 * Tue May 22 2007 - Bastien Nocera <bnocera at redhat.com> - 2.19.1-8
 - And go to the right directory to apply patch17
 


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/control-center/devel/sources,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- sources	21 May 2007 05:24:53 -0000	1.58
+++ sources	5 Jun 2007 04:52:09 -0000	1.59
@@ -1 +1 @@
-69760fa4cc17cb1f5e561440005fb0f3  gnome-control-center-2.19.1.tar.bz2
+66c9102248415175430b56c5de1e8417  gnome-control-center-2.19.3.tar.bz2


--- control-center-2.17.91-no-gnome-common.patch DELETED ---


--- control-center-2.19.1-gecos.patch DELETED ---




More information about the fedora-extras-commits mailing list