rpms/xchat-gnome/devel xchat-gnome-0.17-setup-dialog.patch, NONE, 1.1 xchat-gnome.spec, 1.36, 1.37

Brian Pepple (bpepple) fedora-extras-commits at redhat.com
Tue Apr 17 00:08:04 UTC 2007


Author: bpepple

Update of /cvs/extras/rpms/xchat-gnome/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29395

Modified Files:
	xchat-gnome.spec 
Added Files:
	xchat-gnome-0.17-setup-dialog.patch 
Log Message:
* Mon Apr 16 2007 Brian Pepple <bpepple at fedoraproject.org> - 0.17-4
- Add patch to fix setup-dialog. (#236636)


xchat-gnome-0.17-setup-dialog.patch:

--- NEW FILE xchat-gnome-0.17-setup-dialog.patch ---
--- trunk/src/fe-gnome/setup-dialog.c	2007/03/19 00:05:08	2491
+++ trunk/src/fe-gnome/setup-dialog.c	2007/04/15 00:56:09	2513
@@ -29,7 +29,9 @@
 #include "util.h"
 #include "preferences.h"
 
-static GladeXML *xml = NULL;
+static GtkWidget *real_entry = NULL;
+static GtkWidget *nick_entry = NULL;
+static GtkWidget *ok_button = NULL;
 static gboolean done;
 
 static void ok_clicked (GtkButton *button, gpointer data);
@@ -37,12 +39,6 @@
 
 void run_setup_dialog (void)
 {
-	GtkSizeGroup *group;
-	GtkWidget *window;
-	GtkWidget *nick_entry;
-	GtkWidget *real_entry;
-	GtkWidget *button;
-
 	gchar *path = locate_data_file ("setup-dialog.glade");
 	g_assert (path != NULL);
 
@@ -51,9 +47,9 @@
 
 	g_free (path);
 
-	window = glade_xml_get_widget (xml, "setup window");
+	GtkWidget *window = glade_xml_get_widget (xml, "setup window");
 
-	group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
+	GtkSizeGroup *group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
 	nick_entry = glade_xml_get_widget (xml, "nick name entry");
 	real_entry = glade_xml_get_widget (xml, "real name entry");
 	gtk_size_group_add_widget (group, nick_entry);
@@ -66,8 +62,8 @@
 	gtk_entry_set_text (GTK_ENTRY (real_entry), g_get_real_name ());
 	gtk_widget_grab_focus (nick_entry);
 
-	button = glade_xml_get_widget (xml, "ok button");
-	g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (ok_clicked), NULL);
+	ok_button = glade_xml_get_widget (xml, "ok button");
+	g_signal_connect (G_OBJECT (ok_button), "clicked", G_CALLBACK (ok_clicked), NULL);
 
 	gtk_widget_show_all (window);
 	done = FALSE;
@@ -82,8 +78,6 @@
 static void
 ok_clicked (GtkButton *button, gpointer data)
 {
-	GtkWidget *nick_entry = glade_xml_get_widget (xml, "nick name entry");
-	GtkWidget *real_entry = glade_xml_get_widget (xml, "real name entry");
 	const gchar *nick = gtk_entry_get_text (GTK_ENTRY (nick_entry));
 	const gchar *real = gtk_entry_get_text (GTK_ENTRY (real_entry));
 
@@ -108,16 +102,11 @@
 static void
 entry_changed (GtkEditable *entry, gpointer user_data)
 {
-	GtkWidget *ok_button, *nick_entry, *real_entry;
-	const gchar *nick, *real;
-
-	ok_button = glade_xml_get_widget (xml, "ok button");
-	nick_entry = glade_xml_get_widget (xml, "nick name entry");
-	real_entry = glade_xml_get_widget (xml, "real name entry");
-	nick = gtk_entry_get_text (GTK_ENTRY (nick_entry));
-	real = gtk_entry_get_text (GTK_ENTRY (real_entry));
+	const gchar *nick = gtk_entry_get_text (GTK_ENTRY (nick_entry));
+	const gchar *real = gtk_entry_get_text (GTK_ENTRY (real_entry));
 
-	if (strlen(nick) == 0 || strlen(real) == 0) {
+	if ((nick == NULL || strlen(nick) == 0) ||
+	    (real == NULL || strlen(real) == 0)) {
 		gtk_widget_set_sensitive (ok_button, FALSE);
 	} else {
 		gtk_widget_set_sensitive (ok_button, TRUE);


Index: xchat-gnome.spec
===================================================================
RCS file: /cvs/extras/rpms/xchat-gnome/devel/xchat-gnome.spec,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- xchat-gnome.spec	4 Apr 2007 01:03:03 -0000	1.36
+++ xchat-gnome.spec	17 Apr 2007 00:07:30 -0000	1.37
@@ -1,6 +1,6 @@
 Name:           xchat-gnome
 Version:        0.17
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        GNOME front-end to xchat
 
 Group:          Applications/Internet
@@ -9,6 +9,7 @@
 Source0:        http://flapjack.navi.cx/releases/%{name}/%{name}-%{version}.tar.bz2
 Patch0:		%{name}-%{version}-config.patch
 Patch1:		%{name}-%{version}-static.patch
+Patch2:		%{name}-%{version}-setup-dialog.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:	openssl-devel
@@ -44,6 +45,7 @@
 %setup -q -n %{name}-%{version}
 %patch0 -p1 -b .config
 %patch1 -p1 -b .static
+%patch2 -p1 -b .dialog
 
 
 %build
@@ -129,6 +131,9 @@
 
 
 %changelog
+* Mon Apr 16 2007 Brian Pepple <bpepple at fedoraproject.org> - 0.17-4
+- Add patch to fix setup-dialog. (#236636)
+
 * Tue Apr  3 2007 Brian Pepple <bpepple at fedoraproject.org> - 0.17-3
 - Add patch to fix crasher. (#235144).
 




More information about the scm-commits mailing list