try again

This commit is contained in:
Matthias Clasen 2008-08-23 14:39:00 +00:00
parent d22f642155
commit 818d1a8667

View File

@ -1,54 +1,84 @@
diff -up nautilus-2.23.90/libnautilus-private/nautilus-icon-container.c.rtl-fix nautilus-2.23.90/libnautilus-private/nautilus-icon-container.c diff -up nautilus-2.23.90/libnautilus-private/nautilus-icon-container.c.rtl-fix nautilus-2.23.90/libnautilus-private/nautilus-icon-container.c
--- nautilus-2.23.90/libnautilus-private/nautilus-icon-container.c.rtl-fix 2008-08-18 19:04:40.000000000 -0400 --- nautilus-2.23.90/libnautilus-private/nautilus-icon-container.c.rtl-fix 2008-08-18 19:04:40.000000000 -0400
+++ nautilus-2.23.90/libnautilus-private/nautilus-icon-container.c 2008-08-23 01:38:37.000000000 -0400 +++ nautilus-2.23.90/libnautilus-private/nautilus-icon-container.c 2008-08-23 10:33:53.000000000 -0400
@@ -8923,6 +8923,25 @@ nautilus_icon_container_accessible_get_t @@ -8923,40 +8923,6 @@ nautilus_icon_container_accessible_get_t
return type; return type;
} }
+gboolean -#if ! defined (NAUTILUS_OMIT_SELF_CHECK)
+nautilus_icon_container_is_layout_rtl (NautilusIconContainer *container) -
+{ -static char *
+ g_return_val_if_fail (NAUTILUS_IS_ICON_CONTAINER (container), 0); -check_compute_stretch (int icon_x, int icon_y, int icon_size,
+ - int start_pointer_x, int start_pointer_y,
+ return container->details->layout_mode == NAUTILUS_ICON_LAYOUT_T_B_R_L || - int end_pointer_x, int end_pointer_y)
+ container->details->layout_mode == NAUTILUS_ICON_LAYOUT_R_L_T_B; -{
+} - StretchState start, current;
+ -
+gboolean - start.icon_x = icon_x;
+nautilus_icon_container_is_layout_vertical (NautilusIconContainer *container) - start.icon_y = icon_y;
+{ - start.icon_size = icon_size;
+ g_return_val_if_fail (NAUTILUS_IS_ICON_CONTAINER (container), FALSE); - start.pointer_x = start_pointer_x;
+ - start.pointer_y = start_pointer_y;
+ return (container->details->layout_mode == NAUTILUS_ICON_LAYOUT_T_B_L_R || - current.pointer_x = end_pointer_x;
+ container->details->layout_mode == NAUTILUS_ICON_LAYOUT_T_B_R_L); - current.pointer_y = end_pointer_y;
+} -
+ - compute_stretch (&start, &current);
+ -
#if ! defined (NAUTILUS_OMIT_SELF_CHECK) - return g_strdup_printf ("%d,%d:%d",
- current.icon_x,
static char * - current.icon_y,
@@ -8957,24 +8976,6 @@ nautilus_self_check_icon_container (void - current.icon_size);
EEL_CHECK_STRING_RESULT (check_compute_stretch (100, 100, 64, 105, 105, 40, 40), "35,35:129"); -}
-
-void
-nautilus_self_check_icon_container (void)
-{
- EEL_CHECK_STRING_RESULT (check_compute_stretch (0, 0, 16, 0, 0, 0, 0), "0,0:16");
- EEL_CHECK_STRING_RESULT (check_compute_stretch (0, 0, 16, 16, 16, 17, 17), "0,0:17");
- EEL_CHECK_STRING_RESULT (check_compute_stretch (0, 0, 16, 16, 16, 17, 16), "0,0:16");
- EEL_CHECK_STRING_RESULT (check_compute_stretch (100, 100, 64, 105, 105, 40, 40), "35,35:129");
-}
-
gboolean
nautilus_icon_container_is_layout_rtl (NautilusIconContainer *container)
{
@@ -8994,4 +8960,39 @@ nautilus_icon_container_get_layout_heigh
} }
-gboolean
-nautilus_icon_container_is_layout_rtl (NautilusIconContainer *container) +#if ! defined (NAUTILUS_OMIT_SELF_CHECK)
-{ +
- g_return_val_if_fail (NAUTILUS_IS_ICON_CONTAINER (container), 0); +static char *
- +check_compute_stretch (int icon_x, int icon_y, int icon_size,
- return container->details->layout_mode == NAUTILUS_ICON_LAYOUT_T_B_R_L || + int start_pointer_x, int start_pointer_y,
- container->details->layout_mode == NAUTILUS_ICON_LAYOUT_R_L_T_B; + int end_pointer_x, int end_pointer_y)
-} +{
- + StretchState start, current;
-gboolean +
-nautilus_icon_container_is_layout_vertical (NautilusIconContainer *container) + start.icon_x = icon_x;
-{ + start.icon_y = icon_y;
- g_return_val_if_fail (NAUTILUS_IS_ICON_CONTAINER (container), FALSE); + start.icon_size = icon_size;
- + start.pointer_x = start_pointer_x;
- return (container->details->layout_mode == NAUTILUS_ICON_LAYOUT_T_B_L_R || + start.pointer_y = start_pointer_y;
- container->details->layout_mode == NAUTILUS_ICON_LAYOUT_T_B_R_L); + current.pointer_x = end_pointer_x;
-} + current.pointer_y = end_pointer_y;
- +
int + compute_stretch (&start, &current);
nautilus_icon_container_get_layout_height (NautilusIconContainer *container) +
{ + return g_strdup_printf ("%d,%d:%d",
+ current.icon_x,
+ current.icon_y,
+ current.icon_size);
+}
+
+void
+nautilus_self_check_icon_container (void)
+{
+ EEL_CHECK_STRING_RESULT (check_compute_stretch (0, 0, 16, 0, 0, 0, 0), "0,0:16");
+ EEL_CHECK_STRING_RESULT (check_compute_stretch (0, 0, 16, 16, 16, 17, 17), "0,0:17");
+ EEL_CHECK_STRING_RESULT (check_compute_stretch (0, 0, 16, 16, 16, 17, 16), "0,0:16");
+ EEL_CHECK_STRING_RESULT (check_compute_stretch (100, 100, 64, 105, 105, 40, 40), "35,35:129");
+}
+
+
#endif /* ! NAUTILUS_OMIT_SELF_CHECK */