Re: [PATCH] chown/chgrp delayed



On Fri, 2006-08-18 at 22:12 +0200, Christian Neumair wrote:
> The attached patch delays chown/chgrp, which allows the window system to
> process some events after the user/group was changed, which in turn
> allows to select the group/owner of a file using the keyboard or scroll
> wheel. It should fix bug 162764 [1]. It also fixes a crasher.
> 
> [1] http://bugzilla.gnome.org/show_bug.cgi?id=162764

-		gtk_combo_box_prepend_text (combo_box, owner_name);
+		name_array = g_strsplit (owner_name, "\n", 2);
+		if (name_array[1] != NULL) {
+			combo_text = g_strdup_printf ("%s - %s", name_array[0],
name_array[1]);
+		} else {
+			combo_text = g_strdup (name_array[0]);
+		}
 		owner_index = 0;

Wrong. owner_name is already of "%s - %s" form. This is causing us to
always add an extra item to the combo.

+		unschedule_or_cancel_group_change (window);
+		schedule_group_change (window, file, cur_group);

Should be group, not cur_group. This is causing group changes to not
work at all.

I'm commiting this with fixes for the above problem. 

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a suave alcoholic barbarian haunted by memories of 'Nam. She's a scantily 
clad gold-digging bounty hunter with a flame-thrower. They fight crime! 




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