forked from AuroraMiddleware/gtk
Support inverting arrows via XSetting. (#377979, Yevgen Muntyan).
2006-12-27 Kristian Rietveld <kris@gtk.org> Support inverting arrows via XSetting. (#377979, Yevgen Muntyan). * gtk/gtksettings.c (gtk_settings_class_init): add new setting gtk-alternative-sort-arrows. * gdk/win32/gdkproperty-win32.c (gdk_screen_get_setting): add new setting. * modules/engines/ms-windows/Theme/gtk-2.0/gtkrc: set new gtk-alternative-sort-arrows setting to true. * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_update_button): invert direction if gtk-alternative-sort-arrows is TRUE.
This commit is contained in:
parent
cc89cf541f
commit
0677ad8e59
16
ChangeLog
16
ChangeLog
@ -1,3 +1,19 @@
|
||||
2006-12-27 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Support inverting arrows via XSetting. (#377979, Yevgen Muntyan).
|
||||
|
||||
* gtk/gtksettings.c (gtk_settings_class_init): add new setting
|
||||
gtk-alternative-sort-arrows.
|
||||
|
||||
* gdk/win32/gdkproperty-win32.c (gdk_screen_get_setting): add
|
||||
new setting.
|
||||
|
||||
* modules/engines/ms-windows/Theme/gtk-2.0/gtkrc: set new
|
||||
gtk-alternative-sort-arrows setting to true.
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_update_button):
|
||||
invert direction if gtk-alternative-sort-arrows is TRUE.
|
||||
|
||||
2006-12-27 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gtk/gtk.symbols: Add gtk_status_icon_get_screen and
|
||||
|
@ -421,6 +421,12 @@ gdk_screen_get_setting (GdkScreen *screen,
|
||||
g_value_set_boolean (value, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
else if (strcmp ("gtk-alternative-sort-arrows", name) == 0)
|
||||
{
|
||||
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(\"%s\") : TRUE\n", name));
|
||||
g_value_set_boolean (value, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
#if 0
|
||||
/*
|
||||
* With 'MS Sans Serif' as windows menu font (default on win98se) you'll get a
|
||||
|
@ -85,6 +85,7 @@ enum {
|
||||
PROP_CURSOR_THEME_SIZE,
|
||||
#endif
|
||||
PROP_ALTERNATIVE_BUTTON_ORDER,
|
||||
PROP_ALTERNATIVE_SORT_ARROWS,
|
||||
PROP_SHOW_INPUT_METHOD_MENU,
|
||||
PROP_SHOW_UNICODE_MENU,
|
||||
PROP_TIMEOUT_INITIAL,
|
||||
@ -419,6 +420,24 @@ gtk_settings_class_init (GtkSettingsClass *class)
|
||||
NULL);
|
||||
g_assert (result == PROP_ALTERNATIVE_BUTTON_ORDER);
|
||||
|
||||
/**
|
||||
* GtkSettings:gtk-alternative-sort-arrows:
|
||||
*
|
||||
* Controls the direction of the sort indicators in sorted list and tree
|
||||
* views. By default an arrow pointing down means the column is sorted
|
||||
* in ascending order. When set to %TRUE, this order will be inverted.
|
||||
*
|
||||
* Since: 2.12
|
||||
*/
|
||||
result = settings_install_property_parser (class,
|
||||
g_param_spec_boolean ("gtk-alternative-sort-arrows",
|
||||
P_("Alternative sort indicator direction"),
|
||||
P_("Whether the direction of the sort indicators in list and tree views is inverted compared to the default (where down means ascending)"),
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE),
|
||||
NULL);
|
||||
g_assert (result == PROP_ALTERNATIVE_SORT_ARROWS);
|
||||
|
||||
result = settings_install_property_parser (class,
|
||||
g_param_spec_boolean ("gtk-show-input-method-menu",
|
||||
P_("Show the 'Input Methods' menu"),
|
||||
|
@ -913,14 +913,20 @@ gtk_tree_view_column_update_button (GtkTreeViewColumn *tree_column)
|
||||
if (tree_column->show_sort_indicator
|
||||
|| (sort_column_id >= 0 && sort_column_id == tree_column->sort_column_id))
|
||||
{
|
||||
gboolean alternative;
|
||||
|
||||
g_object_get (gtk_widget_get_settings (tree_column->tree_view),
|
||||
"gtk-alternative-sort-arrows", &alternative,
|
||||
NULL);
|
||||
|
||||
switch (tree_column->sort_order)
|
||||
{
|
||||
case GTK_SORT_ASCENDING:
|
||||
arrow_type = GTK_ARROW_DOWN;
|
||||
arrow_type = alternative ? GTK_ARROW_UP : GTK_ARROW_DOWN;
|
||||
break;
|
||||
|
||||
case GTK_SORT_DESCENDING:
|
||||
arrow_type = GTK_ARROW_UP;
|
||||
arrow_type = alternative ? GTK_ARROW_DOWN : GTK_ARROW_UP;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -11,6 +11,9 @@ gtk-menu-images = 1
|
||||
# use the win32 button ordering instead of the GNOME HIG one, where applicable
|
||||
gtk-alternative-button-order = 1
|
||||
|
||||
# use the win32 sort indicators direction, as in Explorer
|
||||
gtk-alternative-sort-arrows = 1
|
||||
|
||||
style "msw-default"
|
||||
{
|
||||
GtkWidget::interior-focus = 1
|
||||
|
Loading…
Reference in New Issue
Block a user