Compare commits

...

30 Commits

Author SHA1 Message Date
Matthias Clasen
fed589d418 3.14.9 2015-02-25 16:23:10 -05:00
Matthias Clasen
f9be976836 Fix distcheck 2015-02-25 16:23:10 -05:00
Matthias Clasen
bf096d99dd Silence a compiler warning 2015-02-25 16:23:10 -05:00
Matthias Clasen
db44c357c3 Fix a misleading condition
gcc5 rightfully complains about this condition being unclear.
2015-02-25 16:23:10 -05:00
Matej Urbančič
8380062c6a Updated Slovenian translation 2015-02-25 20:39:29 +01:00
Marek Kasik
1f04ff7f4a printing: Always get details of Avahi printers over IPP
Request details of Avahi browsed printers even when
we've got their PPDs already. Some options are not
present in PPD.

https://bugzilla.gnome.org/show_bug.cgi?id=743323
2015-02-25 18:11:57 +01:00
Marek Kasik
d5c7da5c83 printing: Get covers for each printer individually
Since we combine Avahi browsed printers and
printers of local CUPS in one backend we need to
get covers for each printer separately.

https://bugzilla.gnome.org/show_bug.cgi?id=743323
2015-02-25 18:11:53 +01:00
Benjamin Otte
4592bd3e6e gdkcairo: Bail if surface is in error
Don't try to paint onto an error surface. This happens for example when
gdk_cairo_set_source_pixbuf() is called with a pixbuf that is too big
for Cairo to handle.

Spotted by Christian Boxdörfer
2015-02-25 16:31:16 +01:00
Benjamin Otte
6b086d965c css: Fix _gtk_bitmask_subtract()
We were doing the wrong thing *and* writing uninitialized memory while
doing so. BAD.

Also added tests exposing these.

https://bugzilla.redhat.com/show_bug.cgi?id=1185585
2015-02-25 16:31:05 +01:00
Matthias Clasen
4fbbb87be6 range: Make zoom scrolling less sensitive
Use the new long press delay factor to make the zoom
scrolling less easy to trigger accidentally.
2015-02-24 21:09:37 -05:00
Matthias Clasen
371d3fc5a6 long press: Add a delay-factor property
Add a way to set a delay factor that can be used
to make the long press more or less sensitive.
Making this a factor instead of exposing the delay
itself preserves the value of the setting as an
overall 'slow down long press' setting.
2015-02-24 21:09:30 -05:00
Matthias Clasen
1c395c900e zoom scrolling: avoid 'jumping back'
We record the starting position on button press, but only
start the zoom mode when the long press timeout kicks in.
Depending on circumstances, this can cause a noticable jump.

Avoid this by resetting the recorded starting position after
the long press timeout. Suggested by Sebastian Keller.
2015-02-24 21:09:04 -05:00
Ignacio Casal Quinteiro
ff1ec03d96 Do not return on void functions 2015-02-24 21:05:55 -05:00
Matthias Clasen
a44baab9de color scale: simplify code a bit
It is not necessary to call gtk_widget_get_accessible repeatedly.
2015-02-24 21:05:28 -05:00
Matthias Clasen
8ba4d8f21d Explicitly set the a11y role of tooltip windows
This seems better than trying to identify the 'tooltipness'
of the window on the other side.

https://bugzilla.gnome.org/show_bug.cgi?id=744683
2015-02-24 21:05:14 -05:00
Matthias Clasen
ffeda6ffec Drop nonworking code to set a11y roles of tooltips
This code relied on widget names, and we don't set those anymore.
2015-02-24 21:04:34 -05:00
Matthias Clasen
32e9659d83 widget factory: Don't make file chooser local-only
There's no reason to.
2015-02-24 21:04:05 -05:00
Rico Tzschichholz
75ab755f08 AppChooserDialog: Fix memleak 2015-02-24 21:03:38 -05:00
Paolo Borelli
8cf2c8d85a Do not use "return" when chaining up to a void function 2015-02-24 21:03:09 -05:00
Matej Urbančič
40e3cd0dac Updated Slovenian translation 2015-02-24 19:56:42 +01:00
Matej Urbančič
073e0483e9 Updated Slovenian translation 2015-02-24 19:08:54 +01:00
Thibault Saunier
e2d89d21d4 gdk/quartz: Fix mixup in attributes usage creating window implementation
First, attributes can be NULL (which is always the case when calling
gdk_window_ensure_native) so do not unconditionally dereference it.

Then the window_type should be taken directly from the GdkWindow as
in other backends (such as the X11 one for example).

https://bugzilla.gnome.org/show_bug.cgi?id=744942
2015-02-22 15:52:44 +01:00
Ignacio Casal Quinteiro
e2e37c772f statusicon: missed setting one uID 2015-02-21 16:02:03 +01:00
Arnav Singh
e17fb52cfc statusicon: fix crash storing pointer in UINT
https://bugzilla.gnome.org/show_bug.cgi?id=696505
2015-02-21 16:01:57 +01:00
Piotr Drąg
c724f4b57e Updated POTFILES.skip 2015-02-17 01:14:04 +01:00
Pier Luigi Fiorini
071447700e wayland: Do not require latest wl_seat
Some compositors might not offer wl_seat 4 resulting in GTK+ clients not
working on that compositor.

wl_seat 4 introduces keyboard repeat information, but when that information
is missing it is retrieved from settings, hence there's no reason to
require wl_seat 4.

This patch was tested against QtCompositor (5.5, dev branch)
and Weston 1.6.1.

Reviewed-by: Daniel Stone <daniels@collabora.com>

https://bugzilla.gnome.org/show_bug.cgi?id=744172
2015-02-15 18:37:02 -05:00
Benjamin Otte
77c27772c5 treeview: Don't create an overly large pixel cache
GPUs generally have problems when you create a 35000px wide surface.
Luckily X catches this and sends a BadAlloc. Which GTK immediately
abort()s on.

Testcase included.

https://bugzilla.redhat.com/show_bug.cgi?id=1163579
2015-02-15 18:31:06 -05:00
Matej Urbančič
8ad8cc703b Updated Slovenian translation 2015-02-14 21:00:08 +01:00
Necdet Yücel
1a9ed8c524 Updated Turkish translation 2015-02-14 17:06:03 +00:00
Matthias Clasen
e810cb8782 Revert "image: Optimize non-resize changes"
This reverts commit 82c21b1e93.

This change was causing problems in gnome-mines. Revert it
until we can figure out what exactly is going wrong there.
See https://bugzilla.redhat.com/show_bug.cgi?id=1190887
2015-02-11 11:24:28 -05:00
38 changed files with 8839 additions and 5953 deletions

23
NEWS
View File

@@ -1,3 +1,26 @@
Overview of Changes in GTK+ 3.14.8 to 3.14.9
============================================
* GtkScrolledWindow
- Avoid 'jumping' when zoom scrolling kicks in
- Make zoom scrolling less easy to trigger
* Bugs fixed:
743323 avahi-discovered CUPS printers don't work
744172 Wayland: Clients won't work on compositors that support wl_...
744683 Tooltips should have ATK_ROLE_TOOL_TIP (like they did before)
744942 quartz: Avoid segfaulting when calling gdk_window_ensure_native
744991 Fix loading of GResource SVGs
745052 Icon theme code assumes directories with mtime 0 don't exist
Fix crash and miscalculation in css bitmask manipulation
Fix a crash due to too large surfaces
Update on text scale factor changes
* Translation updates:
Slovenian
Turkish
Overview of Changes in GTK+ 3.14.7 to 3.14.8
============================================

View File

@@ -10,8 +10,8 @@
m4_define([gtk_major_version], [3])
m4_define([gtk_minor_version], [14])
m4_define([gtk_micro_version], [8])
m4_define([gtk_interface_age], [8])
m4_define([gtk_micro_version], [9])
m4_define([gtk_interface_age], [9])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
m4_define([gtk_version],

View File

@@ -1037,6 +1037,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
<object class="GtkFileChooserButton" id="filechooserbutton1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="local_only">False</property>
</object>
<packing>
<property name="expand">False</property>

View File

@@ -185,6 +185,9 @@ gdk_cairo_surface_paint_pixbuf (cairo_surface_t *surface,
int n_channels;
int j;
if (cairo_surface_status (surface) != CAIRO_STATUS_SUCCESS)
return;
/* This function can't just copy any pixbuf to any surface, be
* sure to read the invariants here before calling it */

View File

@@ -3629,10 +3629,10 @@ gdk_window_process_updates (GdkWindow *window,
{
g_return_if_fail (GDK_IS_WINDOW (window));
return gdk_window_process_updates_with_mode (window,
update_children ?
PROCESS_UPDATES_WITH_ALL_CHILDREN :
PROCESS_UPDATES_NO_RECURSE);
gdk_window_process_updates_with_mode (window,
update_children ?
PROCESS_UPDATES_WITH_ALL_CHILDREN :
PROCESS_UPDATES_NO_RECURSE);
}
static void
@@ -10781,7 +10781,7 @@ gdk_window_set_opaque_region (GdkWindow *window,
impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
if (impl_class->set_opaque_region)
return impl_class->set_opaque_region (window, region);
impl_class->set_opaque_region (window, region);
}
/**

View File

@@ -873,7 +873,7 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display,
impl->view = NULL;
switch (attributes->window_type)
switch (window->window_type)
{
case GDK_WINDOW_TOPLEVEL:
case GDK_WINDOW_TEMP:
@@ -901,8 +901,9 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display,
window->width,
window->height);
if (attributes->window_type == GDK_WINDOW_TEMP ||
attributes->type_hint == GDK_WINDOW_TYPE_HINT_SPLASHSCREEN)
if (window->window_type == GDK_WINDOW_TEMP ||
((attributes_mask & GDK_WA_TYPE_HINT) &&
attributes->type_hint == GDK_WINDOW_TYPE_HINT_SPLASHSCREEN))
{
style_mask = NSBorderlessWindowMask;
}

View File

@@ -171,7 +171,7 @@ gdk_registry_handle_global(void *data, struct wl_registry *registry, uint32_t id
wl_registry_bind(display_wayland->wl_registry, id, &wl_output_interface, MIN (version, 2));
_gdk_wayland_screen_add_output(display_wayland->screen, id, output, MIN (version, 2));
} else if (strcmp(interface, "wl_seat") == 0) {
seat = wl_registry_bind(display_wayland->wl_registry, id, &wl_seat_interface, 4);
seat = wl_registry_bind(display_wayland->wl_registry, id, &wl_seat_interface, MIN (version, 4));
_gdk_wayland_device_manager_add_seat (gdk_display->device_manager, id, seat);
} else if (strcmp(interface, "wl_data_device_manager") == 0) {
display_wayland->data_device_manager =

View File

@@ -90,25 +90,16 @@ gtk_window_accessible_initialize (AtkObject *obj,
gpointer data)
{
GtkWidget *widget = GTK_WIDGET (data);
const gchar *name;
ATK_OBJECT_CLASS (gtk_window_accessible_parent_class)->initialize (obj, data);
g_signal_connect (data, "window-state-event", G_CALLBACK (window_state_event_cb), NULL);
_gtk_widget_accessible_set_layer (GTK_WIDGET_ACCESSIBLE (obj), ATK_LAYER_WINDOW);
name = gtk_widget_get_name (widget);
if (!g_strcmp0 (name, "gtk-tooltip"))
obj->role = ATK_ROLE_TOOL_TIP;
else if (gtk_window_get_window_type (GTK_WINDOW (widget)) == GTK_WINDOW_POPUP)
if (gtk_window_get_window_type (GTK_WINDOW (widget)) == GTK_WINDOW_POPUP)
obj->role = ATK_ROLE_WINDOW;
else
obj->role = ATK_ROLE_FRAME;
/* Notify that tooltip is showing */
if (obj->role == ATK_ROLE_TOOL_TIP && gtk_widget_get_mapped (widget))
atk_object_notify_state_change (obj, ATK_STATE_SHOWING, 1);
}
static GtkWidget *

View File

@@ -691,6 +691,24 @@ button_callback (gpointer data)
static UINT taskbar_created_msg = 0;
static GSList *status_icons = NULL;
static UINT status_icon_id = 0;
static GtkStatusIcon *
find_status_icon (UINT id)
{
GSList *rover;
for (rover = status_icons; rover != NULL; rover = rover->next)
{
GtkStatusIcon *status_icon = GTK_STATUS_ICON (rover->data);
GtkStatusIconPrivate *priv = status_icon->priv;
if (priv->nid.uID == id)
return status_icon;
}
return NULL;
}
static LRESULT CALLBACK
wndproc (HWND hwnd,
@@ -708,7 +726,7 @@ wndproc (HWND hwnd,
GtkStatusIconPrivate *priv = status_icon->priv;
priv->nid.hWnd = hwnd;
priv->nid.uID = GPOINTER_TO_UINT (status_icon);
priv->nid.uID = status_icon_id++;
priv->nid.uCallbackMessage = WM_GTK_TRAY_NOTIFICATION;
priv->nid.uFlags = NIF_MESSAGE;
@@ -752,7 +770,7 @@ wndproc (HWND hwnd,
buttondown0:
bc = g_new (ButtonCallbackData, 1);
bc->event = (GdkEventButton *) gdk_event_new (GDK_BUTTON_PRESS);
bc->status_icon = GTK_STATUS_ICON (wparam);
bc->status_icon = find_status_icon (wparam);
build_button_event (bc->status_icon->priv, bc->event, button);
g_idle_add (button_callback, bc);
break;
@@ -778,7 +796,7 @@ wndproc (HWND hwnd,
buttonup0:
bc = g_new (ButtonCallbackData, 1);
bc->event = (GdkEventButton *) gdk_event_new (GDK_BUTTON_RELEASE);
bc->status_icon = GTK_STATUS_ICON (wparam);
bc->status_icon = find_status_icon (wparam);
build_button_event (bc->status_icon->priv, bc->event, button);
g_idle_add (button_callback, bc);
break;
@@ -925,7 +943,7 @@ gtk_status_icon_init (GtkStatusIcon *status_icon)
memset (&priv->nid, 0, sizeof (priv->nid));
priv->nid.hWnd = create_tray_observer ();
priv->nid.uID = GPOINTER_TO_UINT (status_icon);
priv->nid.uID = status_icon_id++;
priv->nid.uCallbackMessage = WM_GTK_TRAY_NOTIFICATION;
priv->nid.uFlags = NIF_MESSAGE;

View File

@@ -207,7 +207,7 @@ _gtk_allocated_bitmask_subtract (GtkBitmask *mask,
const GtkBitmask *other)
{
GtkBitmask other_allocated;
guint i;
guint i, len;
g_return_val_if_fail (mask != NULL, NULL);
g_return_val_if_fail (other != NULL, NULL);
@@ -215,9 +215,10 @@ _gtk_allocated_bitmask_subtract (GtkBitmask *mask,
mask = gtk_bitmask_ensure_allocated (mask);
ENSURE_ALLOCATED (other, other_allocated);
for (i = 0; i < other->len; i++)
len = MIN (mask->len, other->len);
for (i = 0; i < len; i++)
{
mask->data[i] |= ~other->data[i];
mask->data[i] &= ~other->data[i];
}
return gtk_allocated_bitmask_shrink (mask);

View File

@@ -460,10 +460,15 @@ software_button_clicked_cb (GtkButton *button,
static void
ensure_software_button (GtkAppChooserDialog *self)
{
if (g_find_program_in_path ("gnome-software"))
gchar *path;
path = g_find_program_in_path ("gnome-software");
if (path != NULL)
gtk_widget_show (self->priv->software_button);
else
gtk_widget_hide (self->priv->software_button);
g_free (path);
}
static void

View File

@@ -38,7 +38,7 @@ static inline void
_gtk_bitmask_free (GtkBitmask *mask)
{
if (_gtk_bitmask_is_allocated (mask))
return _gtk_allocated_bitmask_free (mask);
_gtk_allocated_bitmask_free (mask);
}
static inline char *
@@ -55,7 +55,7 @@ static inline void
_gtk_bitmask_print (const GtkBitmask *mask,
GString *string)
{
return _gtk_allocated_bitmask_print (mask, string);
_gtk_allocated_bitmask_print (mask, string);
}
static inline GtkBitmask *

View File

@@ -947,23 +947,23 @@ subparser_end (GMarkupParseContext *context,
if (data->subparser->parser->end_element)
data->subparser->parser->end_element (context, element_name,
data->subparser->data, error);
if (!strcmp (data->subparser->start, element_name) == 0)
if (strcmp (data->subparser->start, element_name) != 0)
return;
gtk_buildable_custom_tag_end (GTK_BUILDABLE (data->subparser->object),
data->builder,
data->subparser->child,
element_name,
data->subparser->data);
g_free (data->subparser->parser);
if (GTK_BUILDABLE_GET_IFACE (data->subparser->object)->custom_finished)
data->custom_finalizers = g_slist_prepend (data->custom_finalizers,
data->subparser);
else
free_subparser (data->subparser);
data->subparser = NULL;
}

View File

@@ -309,7 +309,7 @@ scale_set_type (GtkColorScale *scale,
atk_object_set_name (atk_obj, C_("Color channel", "Hue"));
else if (type == GTK_COLOR_SCALE_ALPHA)
atk_object_set_name (atk_obj, C_("Color channel", "Alpha"));
atk_object_set_role (gtk_widget_get_accessible (GTK_WIDGET (scale)), ATK_ROLE_COLOR_CHOOSER);
atk_object_set_role (atk_obj, ATK_ROLE_COLOR_CHOOSER);
}
}

View File

@@ -82,7 +82,7 @@ _gtk_css_shorthand_property_query (GtkStyleProperty *property,
{
GtkCssShorthandProperty *shorthand = GTK_CSS_SHORTHAND_PROPERTY (property);
return shorthand->query (shorthand, value, query_func, query_data);
shorthand->query (shorthand, value, query_func, query_data);
}
static GtkCssValue *

View File

@@ -49,11 +49,16 @@ enum {
N_SIGNALS
};
enum {
PROP_DELAY_FACTOR = 1
};
struct _GtkGestureLongPressPrivate
{
gdouble initial_x;
gdouble initial_y;
gdouble delay_factor;
guint timeout_id;
guint delay;
guint cancelled : 1;
@@ -67,6 +72,10 @@ G_DEFINE_TYPE_WITH_PRIVATE (GtkGestureLongPress, gtk_gesture_long_press, GTK_TYP
static void
gtk_gesture_long_press_init (GtkGestureLongPress *gesture)
{
GtkGestureLongPressPrivate *priv;
priv = gtk_gesture_long_press_get_instance_private (GTK_GESTURE_LONG_PRESS (gesture));
priv->delay_factor = 1.0;
}
static gboolean
@@ -121,7 +130,10 @@ gtk_gesture_long_press_begin (GtkGesture *gesture,
widget = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (gesture));
g_object_get (gtk_widget_get_settings (widget),
"gtk-long-press-time", &delay, NULL);
"gtk-long-press-time", &delay,
NULL);
delay = (gint)(priv->delay_factor * delay);
gtk_gesture_get_point (gesture, sequence,
&priv->initial_x, &priv->initial_y);
@@ -205,6 +217,50 @@ gtk_gesture_long_press_finalize (GObject *object)
G_OBJECT_CLASS (gtk_gesture_long_press_parent_class)->finalize (object);
}
static void
gtk_gesture_long_press_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
GtkGestureLongPressPrivate *priv;
priv = gtk_gesture_long_press_get_instance_private (GTK_GESTURE_LONG_PRESS (object));
switch (property_id)
{
case PROP_DELAY_FACTOR:
g_value_set_double (value, priv->delay_factor);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void
gtk_gesture_long_press_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
GtkGestureLongPressPrivate *priv;
priv = gtk_gesture_long_press_get_instance_private (GTK_GESTURE_LONG_PRESS (object));
switch (property_id)
{
case PROP_DELAY_FACTOR:
priv->delay_factor = g_value_get_double (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void
gtk_gesture_long_press_class_init (GtkGestureLongPressClass *klass)
{
@@ -212,14 +268,23 @@ gtk_gesture_long_press_class_init (GtkGestureLongPressClass *klass)
GtkGestureClass *gesture_class = GTK_GESTURE_CLASS (klass);
object_class->finalize = gtk_gesture_long_press_finalize;
object_class->get_property = gtk_gesture_long_press_get_property;
object_class->set_property = gtk_gesture_long_press_set_property;
gesture_class->check = gtk_gesture_long_press_check;
gesture_class->begin = gtk_gesture_long_press_begin;
gesture_class->update = gtk_gesture_long_press_update;
gesture_class->end = gtk_gesture_long_press_end;
gesture_class->cancel = gtk_gesture_long_press_cancel;
gesture_class->sequence_state_changed =
gtk_gesture_long_press_sequence_state_changed;
gesture_class->sequence_state_changed = gtk_gesture_long_press_sequence_state_changed;
g_object_class_install_property (object_class,
PROP_DELAY_FACTOR,
g_param_spec_double ("delay-factor",
P_("Delay factor"),
P_("Factor by which to modify the default timeout"),
0.5, 2.0, 1.0,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GtkGestureLongPress::pressed:

View File

@@ -921,20 +921,14 @@ gtk_image_set_from_file (GtkImage *image,
GtkImagePrivate *priv;
GdkPixbufAnimation *anim;
gint scale_factor;
gint old_width, old_height;
gint new_width, new_height;
GtkStyleContext *context;
g_return_if_fail (GTK_IS_IMAGE (image));
priv = image->priv;
g_object_freeze_notify (G_OBJECT (image));
context = gtk_widget_get_style_context (GTK_WIDGET (image));
_gtk_icon_helper_get_size (priv->icon_helper, context, &old_width, &old_height);
gtk_image_reset (image);
gtk_image_clear (image);
if (filename == NULL)
{
@@ -947,7 +941,9 @@ gtk_image_set_from_file (GtkImage *image,
if (anim == NULL)
{
gtk_image_set_from_icon_name (image, "image-missing", DEFAULT_ICON_SIZE);
gtk_image_set_from_icon_name (image,
"image-missing",
DEFAULT_ICON_SIZE);
g_object_thaw_notify (G_OBJECT (image));
return;
}
@@ -968,16 +964,7 @@ gtk_image_set_from_file (GtkImage *image,
g_object_unref (anim);
priv->filename = g_strdup (filename);
_gtk_icon_helper_get_size (priv->icon_helper, context, &new_width, &new_height);
if (gtk_widget_get_visible (GTK_WIDGET (image)))
{
if (old_width != new_width || old_height != new_height)
gtk_widget_queue_resize (GTK_WIDGET (image));
else
gtk_widget_queue_draw (GTK_WIDGET (image));
}
g_object_thaw_notify (G_OBJECT (image));
}
@@ -1014,7 +1001,9 @@ gtk_image_set_from_resource (GtkImage *image,
if (animation == NULL)
{
gtk_image_set_from_icon_name (image, "image-missing", DEFAULT_ICON_SIZE);
gtk_image_set_from_icon_name (image,
"image-missing",
DEFAULT_ICON_SIZE);
g_object_thaw_notify (G_OBJECT (image));
return;
}
@@ -1048,36 +1037,22 @@ gtk_image_set_from_pixbuf (GtkImage *image,
GdkPixbuf *pixbuf)
{
GtkImagePrivate *priv;
gint old_width, old_height;
gint new_width, new_height;
GtkStyleContext *context;
g_return_if_fail (GTK_IS_IMAGE (image));
g_return_if_fail (pixbuf == NULL || GDK_IS_PIXBUF (pixbuf));
g_return_if_fail (pixbuf == NULL ||
GDK_IS_PIXBUF (pixbuf));
priv = image->priv;
g_object_freeze_notify (G_OBJECT (image));
context = gtk_widget_get_style_context (GTK_WIDGET (image));
_gtk_icon_helper_get_size (priv->icon_helper, context, &old_width, &old_height);
gtk_image_reset (image);
gtk_image_clear (image);
if (pixbuf != NULL)
_gtk_icon_helper_set_pixbuf (priv->icon_helper, pixbuf);
_gtk_icon_helper_get_size (priv->icon_helper, context, &new_width, &new_height);
if (gtk_widget_get_visible (GTK_WIDGET (image)))
{
if (old_width != new_width || old_height != new_height)
gtk_widget_queue_resize (GTK_WIDGET (image));
else
gtk_widget_queue_draw (GTK_WIDGET (image));
}
g_object_notify (G_OBJECT (image), "pixbuf");
g_object_thaw_notify (G_OBJECT (image));
}
@@ -1177,9 +1152,6 @@ gtk_image_set_from_animation (GtkImage *image,
GdkPixbufAnimation *animation)
{
GtkImagePrivate *priv;
gint old_width, old_height;
gint new_width, new_height;
GtkStyleContext *context;
g_return_if_fail (GTK_IS_IMAGE (image));
g_return_if_fail (animation == NULL ||
@@ -1192,10 +1164,7 @@ gtk_image_set_from_animation (GtkImage *image,
if (animation)
g_object_ref (animation);
context = gtk_widget_get_style_context (GTK_WIDGET (image));
_gtk_icon_helper_get_size (priv->icon_helper, context, &old_width, &old_height);
gtk_image_reset (image);
gtk_image_clear (image);
if (animation != NULL)
{
@@ -1204,16 +1173,7 @@ gtk_image_set_from_animation (GtkImage *image,
}
g_object_notify (G_OBJECT (image), "pixbuf-animation");
_gtk_icon_helper_get_size (priv->icon_helper, context, &new_width, &new_height);
if (gtk_widget_get_visible (GTK_WIDGET (image)))
{
if (old_width != new_width || old_height != new_height)
gtk_widget_queue_resize (GTK_WIDGET (image));
else
gtk_widget_queue_draw (GTK_WIDGET (image));
}
g_object_thaw_notify (G_OBJECT (image));
}
@@ -1234,9 +1194,6 @@ gtk_image_set_from_icon_name (GtkImage *image,
{
GtkImagePrivate *priv;
gchar *new_name;
gint old_width, old_height;
gint new_width, new_height;
GtkStyleContext *context;
g_return_if_fail (GTK_IS_IMAGE (image));
@@ -1245,11 +1202,7 @@ gtk_image_set_from_icon_name (GtkImage *image,
g_object_freeze_notify (G_OBJECT (image));
new_name = g_strdup (icon_name);
context = gtk_widget_get_style_context (GTK_WIDGET (image));
_gtk_icon_helper_get_size (priv->icon_helper, context, &old_width, &old_height);
gtk_image_reset (image);
gtk_image_clear (image);
if (new_name)
{
@@ -1259,16 +1212,7 @@ gtk_image_set_from_icon_name (GtkImage *image,
g_object_notify (G_OBJECT (image), "icon-name");
g_object_notify (G_OBJECT (image), "icon-size");
_gtk_icon_helper_get_size (priv->icon_helper, context, &new_width, &new_height);
if (gtk_widget_get_visible (GTK_WIDGET (image)))
{
if (old_width != new_width || old_height != new_height)
gtk_widget_queue_resize (GTK_WIDGET (image));
else
gtk_widget_queue_draw (GTK_WIDGET (image));
}
g_object_thaw_notify (G_OBJECT (image));
}
@@ -1288,9 +1232,6 @@ gtk_image_set_from_gicon (GtkImage *image,
GtkIconSize size)
{
GtkImagePrivate *priv;
gint old_width, old_height;
gint new_width, new_height;
GtkStyleContext *context;
g_return_if_fail (GTK_IS_IMAGE (image));
@@ -1301,10 +1242,7 @@ gtk_image_set_from_gicon (GtkImage *image,
if (icon)
g_object_ref (icon);
context = gtk_widget_get_style_context (GTK_WIDGET (image));
_gtk_icon_helper_get_size (priv->icon_helper, context, &old_width, &old_height);
gtk_image_reset (image);
gtk_image_clear (image);
if (icon)
{
@@ -1314,16 +1252,7 @@ gtk_image_set_from_gicon (GtkImage *image,
g_object_notify (G_OBJECT (image), "gicon");
g_object_notify (G_OBJECT (image), "icon-size");
_gtk_icon_helper_get_size (priv->icon_helper, context, &new_width, &new_height);
if (gtk_widget_get_visible (GTK_WIDGET (image)))
{
if (old_width != new_width || old_height != new_height)
gtk_widget_queue_resize (GTK_WIDGET (image));
else
gtk_widget_queue_draw (GTK_WIDGET (image));
}
g_object_thaw_notify (G_OBJECT (image));
}
@@ -1341,9 +1270,6 @@ gtk_image_set_from_surface (GtkImage *image,
cairo_surface_t *surface)
{
GtkImagePrivate *priv;
gint old_width, old_height;
gint new_width, new_height;
GtkStyleContext *context;
g_return_if_fail (GTK_IS_IMAGE (image));
@@ -1354,10 +1280,7 @@ gtk_image_set_from_surface (GtkImage *image,
if (surface)
cairo_surface_reference (surface);
context = gtk_widget_get_style_context (GTK_WIDGET (image));
_gtk_icon_helper_get_size (priv->icon_helper, context, &old_width, &old_height);
gtk_image_reset (image);
gtk_image_clear (image);
if (surface)
{
@@ -1366,16 +1289,7 @@ gtk_image_set_from_surface (GtkImage *image,
}
g_object_notify (G_OBJECT (image), "surface");
_gtk_icon_helper_get_size (priv->icon_helper, context, &new_width, &new_height);
if (gtk_widget_get_visible (GTK_WIDGET (image)))
{
if (old_width != new_width || old_height != new_height)
gtk_widget_queue_resize (GTK_WIDGET (image));
else
gtk_widget_queue_draw (GTK_WIDGET (image));
}
g_object_thaw_notify (G_OBJECT (image));
}

View File

@@ -461,6 +461,7 @@ check_compact_table (GtkIMContextSimple *context_simple,
GTK_NOTE (MISC, g_print ("compact: %d ", *seq_index));
seq = NULL;
match = FALSE;
value = 0;
for (i = n_compose - 1; i < table->max_seq_len; i++)
{

View File

@@ -1158,9 +1158,9 @@ gtk_paned_get_preferred_size (GtkWidget *widget,
GtkPanedPrivate *priv = paned->priv;
if (orientation == priv->orientation)
return gtk_paned_get_preferred_size_for_orientation (widget, size, minimum, natural);
gtk_paned_get_preferred_size_for_orientation (widget, size, minimum, natural);
else
return gtk_paned_get_preferred_size_for_opposite_orientation (widget, size, minimum, natural);
gtk_paned_get_preferred_size_for_opposite_orientation (widget, size, minimum, natural);
}
static void

View File

@@ -34,6 +34,7 @@
#include "gtkadjustmentprivate.h"
#include "gtkcolorscaleprivate.h"
#include "gtkintl.h"
#include "gtkgesturelongpressprivate.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "gtkorientableprivate.h"
@@ -782,6 +783,7 @@ gtk_range_init (GtkRange *range)
G_CALLBACK (gtk_range_multipress_gesture_released), range);
priv->long_press_gesture = gtk_gesture_long_press_new (GTK_WIDGET (range));
g_object_set (priv->long_press_gesture, "delay-factor", 2.0, NULL);
gtk_gesture_group (priv->drag_gesture, priv->long_press_gesture);
g_signal_connect (priv->long_press_gesture, "pressed",
G_CALLBACK (gtk_range_long_press_gesture_pressed), range);
@@ -2453,8 +2455,24 @@ gtk_range_long_press_gesture_pressed (GtkGestureLongPress *gesture,
gdouble y,
GtkRange *range)
{
update_zoom_state (range, TRUE);
range->priv->zoom_set = TRUE;
GtkRangePrivate *priv = range->priv;
if (!priv->zoom)
{
if (priv->orientation == GTK_ORIENTATION_VERTICAL)
{
priv->slide_initial_slider_position = priv->slider.y;
priv->slide_initial_coordinate_delta = y - priv->slider.y;
}
else
{
priv->slide_initial_slider_position = priv->slider.x;
priv->slide_initial_coordinate_delta = x - priv->slider.x;
}
update_zoom_state (range, TRUE);
range->priv->zoom_set = TRUE;
}
}
static void

View File

@@ -214,7 +214,7 @@ _gtk_style_property_query (GtkStyleProperty *property,
klass = GTK_STYLE_PROPERTY_GET_CLASS (property);
return klass->query (property, value, query_func, query_data);
klass->query (property, value, query_func, query_data);
}
void

View File

@@ -34,6 +34,7 @@
#include "gtksizerequest.h"
#include "gtkstylecontext.h"
#include "gtkwindowprivate.h"
#include "gtkaccessible.h"
#ifdef GDK_WINDOWING_WAYLAND
@@ -166,6 +167,7 @@ gtk_tooltip_init (GtkTooltip *tooltip)
GtkWidget *box;
GtkWidget *image;
GtkWidget *label;
AtkObject *atk_obj;
tooltip->timeout_id = 0;
tooltip->browse_mode_timeout_id = 0;
@@ -191,6 +193,10 @@ gtk_tooltip_init (GtkTooltip *tooltip)
context = gtk_widget_get_style_context (window);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_TOOLTIP);
atk_obj = gtk_widget_get_accessible (window);
if (GTK_IS_ACCESSIBLE (atk_obj))
atk_object_set_role (atk_obj, ATK_ROLE_TOOL_TIP);
/* FIXME: don't hardcode the padding */
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_widget_set_margin_start (box, 6);

View File

@@ -5576,8 +5576,8 @@ gtk_tree_view_draw (GtkWidget *widget,
view_rect.x = 0;
view_rect.y = gtk_tree_view_get_effective_header_height (tree_view);
view_rect.width = gdk_window_get_width (tree_view->priv->bin_window);
view_rect.height = gdk_window_get_height (tree_view->priv->bin_window);
view_rect.width = gtk_widget_get_allocated_width (widget);
view_rect.height = gtk_widget_get_allocated_height (widget) - view_rect.y;
gdk_window_get_position (tree_view->priv->bin_window, &canvas_rect.x, &canvas_rect.y);
canvas_rect.y = -gtk_adjustment_get_value (tree_view->priv->vadjustment);

View File

@@ -119,7 +119,8 @@ template_headers = $(templates:.ui=.ui.h)
EXTRA_DIST += \
inspector.gresource.xml \
$(resource_files) \
$(templates)
$(templates) \
$(template_headers)
MAINTAINERCLEANFILES = \
resources.c \

View File

@@ -136,9 +136,6 @@ struct _GtkPrintBackendCups
GtkCupsConnectionTest *cups_connection_test;
gint reading_ppds;
char **covers;
int number_of_covers;
GList *requests;
GHashTable *auth;
gchar *username;
@@ -770,9 +767,6 @@ gtk_print_backend_cups_init (GtkPrintBackendCups *backend_cups)
backend_cups->auth = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, overwrite_and_free);
backend_cups->authentication_lock = FALSE;
backend_cups->covers = NULL;
backend_cups->number_of_covers = 0;
backend_cups->default_printer_poll = 0;
backend_cups->cups_connection_test = NULL;
@@ -816,9 +810,6 @@ gtk_print_backend_cups_finalize (GObject *object)
g_free (backend_cups->default_printer);
backend_cups->default_printer = NULL;
g_strfreev (backend_cups->covers);
backend_cups->number_of_covers = 0;
gtk_cups_connection_test_free (backend_cups->cups_connection_test);
backend_cups->cups_connection_test = NULL;
@@ -2021,8 +2012,18 @@ typedef struct
gboolean supports_copies;
gboolean supports_collate;
gboolean supports_number_up;
char **covers;
int number_of_covers;
} PrinterSetupInfo;
static void
printer_setup_info_free (PrinterSetupInfo *info)
{
g_free (info->state_msg);
g_strfreev (info->covers);
g_slice_free (PrinterSetupInfo, info);
}
static void
get_ipp_version (const char *ipp_version_string,
guchar *ipp_version_major,
@@ -2177,14 +2178,11 @@ cups_printer_handle_attribute (GtkPrintBackendCups *cups_backend,
}
else if (strcmp (ippGetName (attr), "job-sheets-supported") == 0)
{
if (cups_backend->covers == NULL)
{
cups_backend->number_of_covers = ippGetCount (attr);
cups_backend->covers = g_new (char *, cups_backend->number_of_covers + 1);
for (i = 0; i < cups_backend->number_of_covers; i++)
cups_backend->covers[i] = g_strdup (ippGetString (attr, i, NULL));
cups_backend->covers[cups_backend->number_of_covers] = NULL;
}
info->number_of_covers = ippGetCount (attr);
info->covers = g_new (char *, info->number_of_covers + 1);
for (i = 0; i < info->number_of_covers; i++)
info->covers[i] = g_strdup (ippGetString (attr, i, NULL));
info->covers[info->number_of_covers] = NULL;
}
else if (strcmp (ippGetName (attr), "job-sheets-default") == 0)
{
@@ -2542,15 +2540,10 @@ cups_request_avahi_printer_info_cb (GtkPrintBackendCups *cups_backend,
set_info_state_message (info);
printer = gtk_print_backend_find_printer (backend, info->printer_name);
if (printer != NULL &&
GTK_PRINTER_CUPS (printer)->avahi_browsed)
{
g_object_ref (printer);
}
if (printer != NULL)
g_object_ref (printer);
else
{
goto done;
}
goto done;
if (info->got_printer_type &&
info->default_printer &&
@@ -2567,6 +2560,8 @@ cups_request_avahi_printer_info_cb (GtkPrintBackendCups *cups_backend,
GTK_PRINTER_CUPS (printer)->supports_copies = info->supports_copies;
GTK_PRINTER_CUPS (printer)->supports_collate = info->supports_collate;
GTK_PRINTER_CUPS (printer)->supports_number_up = info->supports_number_up;
GTK_PRINTER_CUPS (printer)->number_of_covers = info->number_of_covers;
GTK_PRINTER_CUPS (printer)->covers = g_strdupv (info->covers);
status_changed = gtk_printer_set_job_count (printer, info->job_count);
status_changed |= gtk_printer_set_location (printer, info->location);
status_changed |= gtk_printer_set_description (printer, info->description);
@@ -2595,8 +2590,7 @@ done:
set_default_printer (cups_backend, cups_backend->avahi_default_printer);
}
g_free (info->state_msg);
g_slice_free (PrinterSetupInfo, info);
printer_setup_info_free (info);
gdk_threads_leave ();
}
@@ -2741,8 +2735,7 @@ create_cups_printer_from_avahi_data (AvahiConnectionTestData *data)
g_object_unref (printer);
}
g_free (info->state_msg);
g_slice_free (PrinterSetupInfo, info);
printer_setup_info_free (info);
}
static void
@@ -3372,6 +3365,8 @@ cups_request_printer_list_cb (GtkPrintBackendCups *cups_backend,
GTK_PRINTER_CUPS (printer)->supports_copies = info->supports_copies;
GTK_PRINTER_CUPS (printer)->supports_collate = info->supports_collate;
GTK_PRINTER_CUPS (printer)->supports_number_up = info->supports_number_up;
GTK_PRINTER_CUPS (printer)->number_of_covers = info->number_of_covers;
GTK_PRINTER_CUPS (printer)->covers = g_strdupv (info->covers);
status_changed = gtk_printer_set_job_count (printer, info->job_count);
status_changed |= gtk_printer_set_location (printer, info->location);
status_changed |= gtk_printer_set_description (printer,
@@ -3390,8 +3385,7 @@ cups_request_printer_list_cb (GtkPrintBackendCups *cups_backend,
/* The ref is held by GtkPrintBackend, in add_printer() */
g_object_unref (printer);
g_free (info->state_msg);
g_slice_free (PrinterSetupInfo, info);
printer_setup_info_free (info);
if (attr == NULL)
break;
@@ -3568,20 +3562,12 @@ cups_request_ppd_cb (GtkPrintBackendCups *print_backend,
if (gtk_cups_result_is_error (result))
{
gboolean success = FALSE;
#ifdef HAVE_CUPS_API_1_6
/* Standalone Avahi printers don't have PPD files. */
if (GTK_PRINTER_CUPS (printer)->avahi_browsed)
{
cups_request_avahi_printer_info (GTK_PRINTER_CUPS (printer)->printer_uri,
GTK_PRINTER_CUPS (printer)->hostname,
GTK_PRINTER_CUPS (printer)->port,
GTK_PRINT_BACKEND_CUPS (gtk_printer_get_backend (printer)));
}
else
if (!GTK_PRINTER_CUPS (printer)->avahi_browsed)
#endif
{
gboolean success = FALSE;
/* If we get a 404 then it is just a raw printer without a ppd
and not an error. */
if ((gtk_cups_result_get_error_type (result) == GTK_CUPS_ERROR_HTTP) &&
@@ -3592,16 +3578,31 @@ cups_request_ppd_cb (GtkPrintBackendCups *print_backend,
}
g_signal_emit_by_name (printer, "details-acquired", success);
goto done;
}
}
else
{
/* let ppdOpenFd take over the ownership of the open file */
g_io_channel_seek_position (data->ppd_io, 0, G_SEEK_SET, NULL);
data->printer->ppd_file = ppdOpenFd (dup (g_io_channel_unix_get_fd (data->ppd_io)));
ppdLocalize (data->printer->ppd_file);
ppdMarkDefaults (data->printer->ppd_file);
}
#ifdef HAVE_CUPS_API_1_6
/* Get additional details of Avahi browsed printer via an IPP request */
if (GTK_PRINTER_CUPS (printer)->avahi_browsed)
{
cups_request_avahi_printer_info (GTK_PRINTER_CUPS (printer)->printer_uri,
GTK_PRINTER_CUPS (printer)->hostname,
GTK_PRINTER_CUPS (printer)->port,
GTK_PRINT_BACKEND_CUPS (gtk_printer_get_backend (printer)));
goto done;
}
/* let ppdOpenFd take over the ownership of the open file */
g_io_channel_seek_position (data->ppd_io, 0, G_SEEK_SET, NULL);
data->printer->ppd_file = ppdOpenFd (dup (g_io_channel_unix_get_fd (data->ppd_io)));
ppdLocalize (data->printer->ppd_file);
ppdMarkDefaults (data->printer->ppd_file);
#endif
gtk_printer_set_has_details (printer, TRUE);
g_signal_emit_by_name (printer, "details-acquired", TRUE);
@@ -4999,7 +5000,7 @@ cups_printer_get_options (GtkPrinter *printer,
g_object_unref (option);
}
num_of_covers = backend->number_of_covers;
num_of_covers = cups_printer->number_of_covers;
cover = g_new (char *, num_of_covers + 1);
cover[num_of_covers] = NULL;
cover_display = g_new (char *, num_of_covers + 1);
@@ -5009,7 +5010,7 @@ cups_printer_get_options (GtkPrinter *printer,
for (i = 0; i < num_of_covers; i++)
{
cover[i] = g_strdup (backend->covers[i]);
cover[i] = g_strdup (cups_printer->covers[i]);
value = NULL;
for (j = 0; j < G_N_ELEMENTS (cover_default); j++)
if (strcmp (cover_default[j], cover[i]) == 0)
@@ -5017,7 +5018,7 @@ cups_printer_get_options (GtkPrinter *printer,
value = cover_display_default[j];
break;
}
cover_display[i] = (value != NULL) ? g_strdup (value) : g_strdup (backend->covers[i]);
cover_display[i] = (value != NULL) ? g_strdup (value) : g_strdup (cups_printer->covers[i]);
}
for (i = 0; i < num_of_covers; i++)

View File

@@ -125,6 +125,8 @@ gtk_printer_cups_init (GtkPrinterCups *printer)
printer->supports_copies = FALSE;
printer->supports_collate = FALSE;
printer->supports_number_up = FALSE;
printer->number_of_covers = 0;
printer->covers = NULL;
}
static void
@@ -166,6 +168,8 @@ gtk_printer_cups_finalize (GObject *object)
g_free (printer->avahi_domain);
#endif
g_strfreev (printer->covers);
if (printer->ppd_file)
ppdClose (printer->ppd_file);

View File

@@ -86,6 +86,8 @@ struct _GtkPrinterCups
gboolean supports_copies;
gboolean supports_collate;
gboolean supports_number_up;
char **covers;
int number_of_covers;
};
struct _GtkPrinterCupsClass

View File

@@ -273,6 +273,8 @@ testsuite/reftests/textview-margins.ref.ui
testsuite/reftests/textview-margins.ui
testsuite/reftests/toplevel-vs-popup.ref.ui
testsuite/reftests/toplevel-vs-popup.ui
testsuite/reftests/treeview-crash-too-wide.ref.ui
testsuite/reftests/treeview-crash-too-wide.ui
testsuite/reftests/treeview-fixed-height.ref.ui
testsuite/reftests/treeview-fixed-height.ui
testsuite/reftests/treeview-headers-hidden.ref.ui

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -242,6 +242,8 @@ testsuite/reftests/textview-margins.ref.ui
testsuite/reftests/textview-margins.ui
testsuite/reftests/toplevel-vs-popup.ref.ui
testsuite/reftests/toplevel-vs-popup.ui
testsuite/reftests/treeview-crash-too-wide.ref.ui
testsuite/reftests/treeview-crash-too-wide.ui
testsuite/reftests/treeview-fixed-height.ref.ui
testsuite/reftests/treeview-fixed-height.ui
testsuite/reftests/treeview-headers-hidden.ref.ui

2175
po/sl.po

File diff suppressed because it is too large Load Diff

View File

@@ -18,10 +18,11 @@ LDADD = \
#TEST_PROGS += check-gdk-cairo
TEST_PROGS += \
rgba \
encoding \
cairo \
display \
encoding \
keysyms \
rgba \
$(NULL)
CLEANFILES = \

40
testsuite/gdk/cairo.c Normal file
View File

@@ -0,0 +1,40 @@
#include <gdk/gdk.h>
static void
test_set_source_big_pixbuf (void)
{
cairo_surface_t *surface;
GdkPixbuf *pixbuf;
cairo_t *cr;
#define WAY_TOO_BIG 65540
/* Check that too big really is to big.
* If this check fails, somebody improved Cairo and this test is useless.
*/
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, WAY_TOO_BIG, 1);
g_assert_cmpint (cairo_surface_status (surface), !=, CAIRO_STATUS_SUCCESS);
cairo_surface_destroy (surface);
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 10, 10);
cr = cairo_create (surface);
pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, WAY_TOO_BIG, 1);
gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0);
g_assert_cmpint (cairo_status (cr), !=, CAIRO_STATUS_SUCCESS);
g_object_unref (pixbuf);
cairo_destroy (cr);
cairo_surface_destroy (surface);
}
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
gdk_init (&argc, &argv);
g_test_add_func ("/drawing/set-source-big-pixbuf", test_set_source_big_pixbuf);
return g_test_run ();
}

View File

@@ -280,6 +280,53 @@ test_intersect_hardcoded (void)
}
}
static void
test_subtract_hardcoded (void)
{
GtkBitmask *left, *right, *subtracted, *expected;
const char *left_str, *right_str;
guint left_len, right_len;
guint i, l, r;
for (l = 0; l < G_N_ELEMENTS (tests); l++)
{
for (r = 0; r < G_N_ELEMENTS (tests); r++)
{
left = masks[l];
right = masks[r];
left_str = tests[l];
right_str = tests[r];
left_len = strlen (tests[l]);
right_len = strlen (tests[r]);
expected = _gtk_bitmask_new ();
for (i = MIN (right_len, left_len); i < left_len; i++)
{
expected = _gtk_bitmask_set (expected, i, left_str[left_len - i - 1] == '1');
}
if (left_len > right_len)
left_str += left_len - right_len;
if (right_len > left_len)
right_str += right_len - left_len;
i = MIN (right_len, left_len);
while (i--)
{
expected = _gtk_bitmask_set (expected, i, left_str[0] == '1' && right_str[0] == '0');
right_str++;
left_str++;
}
g_print ("%s - %s\n", _gtk_bitmask_to_string (left), _gtk_bitmask_to_string (right));
subtracted = _gtk_bitmask_subtract (_gtk_bitmask_copy (left), right);
assert_cmpmasks (subtracted, expected);
_gtk_bitmask_free (subtracted);
_gtk_bitmask_free (expected);
}
}
}
#define SWAP(_a, _b) G_STMT_START{ \
guint _tmp = _a; \
_a = _b; \
@@ -375,6 +422,7 @@ main (int argc, char *argv[])
g_test_add_func ("/bitmask/union", test_union);
g_test_add_func ("/bitmask/intersect", test_intersect);
g_test_add_func ("/bitmask/intersect_hardcoded", test_intersect_hardcoded);
g_test_add_func ("/bitmask/subtract_hardcoded", test_subtract_hardcoded);
g_test_add_func ("/bitmask/invert_range", test_invert_range);
result = g_test_run ();

View File

@@ -407,6 +407,8 @@ testdata = \
textview-margins.ui \
toplevel-vs-popup.ref.ui \
toplevel-vs-popup.ui \
treeview-crash-too-wide.ref.ui \
treeview-crash-too-wide.ui \
treeview-fixed-height.css \
treeview-fixed-height.ref.ui \
treeview-fixed-height.ui \

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long