gtk_about_dialog.c, less code for gtktreeviewcolumn.c
- From: Benoit Carpentier <gtkool_2kx yahoo fr>
- To: gtk-devel-list gnome org
- Subject: gtk_about_dialog.c, less code for gtktreeviewcolumn.c
- Date: Fri, 13 Jan 2006 23:08:46 +0100 (CET)
Hi everybody,
First question is : is it possible to use less code,
such as this case :
gtktreeviewcolumn.c, (GTK+ 2.8.9)
lines 1132 to 1149 :
if (gtk_tree_sortable_get_sort_column_id (sortable,
&sort_column_id,
&order))
{
if (sort_column_id == column->sort_column_id)
{
gtk_tree_view_column_set_sort_indicator (column,
TRUE);
gtk_tree_view_column_set_sort_order (column,
order);
}
else
{
gtk_tree_view_column_set_sort_indicator (column,
FALSE);
}
}
else
{
gtk_tree_view_column_set_sort_indicator (column,
FALSE);
}
It is correct, afterall is there a chance to simplify
it like this ?
if (gtk_tree_sortable_get_sort_column_id (sortable,
sort_column_id,
&order)
&& sort_column_id == column->sort_column_id)
{
gtk_tree_view_column_set_sort_indicator (column,
TRUE);
gtk_tree_view_column_set_sort_order (column,
order);
}
else
{
gtk_tree_view_column_set_sort_indicator (column,
FALSE);
}
Assuming, if right, that less code is often easier to
read.
Second question, is :
About, GtkAboutDialog.c (GTK+ 2.8.9) :
strcmp (priv->translator_credits,
"translator_credits") &&
strcmp (priv->translator_credits,
"translator-credits"))
lines 2066 and 2067
how can it be "translator_credits" ?
Regards,
Benoît Carpentier, "GTKool"
http://gtk.alkia.org
___________________________________________________________________________
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]