mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-11 21:20:09 +00:00
build: Enable -Wswitch-enum and -Wswitch-default
This patch makes that work using 1 of 2 options: 1. Add all missing enums to the switch statement or 2. Cast the switch argument to a uint to avoid having to do that (mostly for GdkEventType). I even found a bug while doing that: clearing a GtkImage with a surface did not notify thae surface property. The reason for enabling this flag even though it is tedious at times is that it is very useful when adding values to an enum, because it makes GTK immediately warn about all the switch statements where this enum is relevant. And I expect changes to enums to be frequent during the GTK4 development cycle.
This commit is contained in:
parent
2ac66328a3
commit
43c212ac28
@ -1101,6 +1101,8 @@ update_pos (MoveResizeData *mv_resize,
|
||||
x += dx;
|
||||
w -= dx;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
x = MAX (x, 0);
|
||||
@ -1228,6 +1230,8 @@ _gdk_broadway_moveresize_handle_event (GdkDisplay *display,
|
||||
if (event->button.button == mv_resize->moveresize_button)
|
||||
finish_drag (mv_resize);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@ -1349,6 +1353,7 @@ calculate_unmoving_origin (MoveResizeData *mv_resize)
|
||||
mv_resize->moveresize_orig_x = rect.x + rect.width - width;
|
||||
mv_resize->moveresize_orig_y = rect.y + rect.height - height;
|
||||
break;
|
||||
case GDK_GRAVITY_STATIC:
|
||||
default:
|
||||
mv_resize->moveresize_orig_x = rect.x;
|
||||
mv_resize->moveresize_orig_y = rect.y;
|
||||
|
@ -1051,7 +1051,7 @@ gdk_device_set_axis_use (GdkDevice *device,
|
||||
info = &g_array_index (device->axes, GdkAxisInfo, index_);
|
||||
info->use = use;
|
||||
|
||||
switch (use)
|
||||
switch ((guint) use)
|
||||
{
|
||||
case GDK_AXIS_X:
|
||||
case GDK_AXIS_Y:
|
||||
@ -1574,7 +1574,7 @@ _gdk_device_add_axis (GdkDevice *device,
|
||||
axis_info.max_value = max_value;
|
||||
axis_info.resolution = resolution;
|
||||
|
||||
switch (use)
|
||||
switch ((guint) use)
|
||||
{
|
||||
case GDK_AXIS_X:
|
||||
case GDK_AXIS_Y:
|
||||
|
@ -789,7 +789,7 @@ gdk_drag_context_handle_dest_event (GdkEvent *event)
|
||||
GdkDragContext *context = NULL;
|
||||
GList *l;
|
||||
|
||||
switch (event->type)
|
||||
switch ((guint) event->type)
|
||||
{
|
||||
case GDK_DRAG_MOTION:
|
||||
case GDK_DROP_START:
|
||||
|
@ -520,7 +520,7 @@ gdk_event_new (GdkEventType type)
|
||||
* since I trust bytewise 0 == 0. less than for integers
|
||||
* or pointers.
|
||||
*/
|
||||
switch (type)
|
||||
switch ((guint) type)
|
||||
{
|
||||
case GDK_MOTION_NOTIFY:
|
||||
new_event->motion.x = 0.;
|
||||
@ -666,7 +666,7 @@ gdk_event_copy (const GdkEvent *event)
|
||||
g_set_object (&new_private->user_data, private->user_data);
|
||||
}
|
||||
|
||||
switch (event->any.type)
|
||||
switch ((guint) event->any.type)
|
||||
{
|
||||
case GDK_KEY_PRESS:
|
||||
case GDK_KEY_RELEASE:
|
||||
@ -769,7 +769,7 @@ gdk_event_free (GdkEvent *event)
|
||||
g_clear_object (&private->user_data);
|
||||
}
|
||||
|
||||
switch (event->any.type)
|
||||
switch ((guint) event->any.type)
|
||||
{
|
||||
case GDK_KEY_PRESS:
|
||||
case GDK_KEY_RELEASE:
|
||||
@ -940,6 +940,7 @@ gdk_event_get_time (const GdkEvent *event)
|
||||
case GDK_OWNER_CHANGE:
|
||||
case GDK_GRAB_BROKEN:
|
||||
case GDK_EVENT_LAST:
|
||||
default:
|
||||
/* return current time */
|
||||
break;
|
||||
}
|
||||
@ -1031,6 +1032,7 @@ gdk_event_get_state (const GdkEvent *event,
|
||||
case GDK_PAD_STRIP:
|
||||
case GDK_PAD_GROUP_MODE:
|
||||
case GDK_EVENT_LAST:
|
||||
default:
|
||||
/* no state field */
|
||||
break;
|
||||
}
|
||||
@ -1059,7 +1061,7 @@ gdk_event_get_coords (const GdkEvent *event,
|
||||
|
||||
g_return_val_if_fail (event != NULL, FALSE);
|
||||
|
||||
switch (event->type)
|
||||
switch ((guint) event->type)
|
||||
{
|
||||
case GDK_CONFIGURE:
|
||||
x = event->configure.x;
|
||||
@ -1131,7 +1133,7 @@ gdk_event_get_root_coords (const GdkEvent *event,
|
||||
|
||||
g_return_val_if_fail (event != NULL, FALSE);
|
||||
|
||||
switch (event->type)
|
||||
switch ((guint) event->type)
|
||||
{
|
||||
case GDK_MOTION_NOTIFY:
|
||||
x = event->motion.x_root;
|
||||
@ -1195,7 +1197,7 @@ gdk_event_set_coords (GdkEvent *event,
|
||||
{
|
||||
g_return_if_fail (event != NULL);
|
||||
|
||||
switch (event->type)
|
||||
switch ((guint) event->type)
|
||||
{
|
||||
case GDK_CONFIGURE:
|
||||
event->configure.x = x;
|
||||
@ -1259,7 +1261,7 @@ gdk_event_get_button (const GdkEvent *event,
|
||||
|
||||
g_return_val_if_fail (event != NULL, FALSE);
|
||||
|
||||
switch (event->type)
|
||||
switch ((guint) event->type)
|
||||
{
|
||||
case GDK_BUTTON_PRESS:
|
||||
case GDK_BUTTON_RELEASE:
|
||||
@ -1300,7 +1302,7 @@ gdk_event_get_click_count (const GdkEvent *event,
|
||||
|
||||
g_return_val_if_fail (event != NULL, FALSE);
|
||||
|
||||
switch (event->type)
|
||||
switch ((guint) event->type)
|
||||
{
|
||||
case GDK_BUTTON_PRESS:
|
||||
case GDK_BUTTON_RELEASE:
|
||||
@ -1335,7 +1337,7 @@ gdk_event_get_keyval (const GdkEvent *event,
|
||||
gboolean fetched = TRUE;
|
||||
guint number = 0;
|
||||
|
||||
switch (event->type)
|
||||
switch ((guint) event->type)
|
||||
{
|
||||
case GDK_KEY_PRESS:
|
||||
case GDK_KEY_RELEASE:
|
||||
@ -1381,7 +1383,7 @@ gdk_event_get_keycode (const GdkEvent *event,
|
||||
gboolean fetched = TRUE;
|
||||
guint16 number = 0;
|
||||
|
||||
switch (event->type)
|
||||
switch ((guint) event->type)
|
||||
{
|
||||
case GDK_KEY_PRESS:
|
||||
case GDK_KEY_RELEASE:
|
||||
@ -1411,7 +1413,7 @@ gdk_event_get_key_group (const GdkEvent *event,
|
||||
{
|
||||
gboolean fetched = TRUE;
|
||||
|
||||
switch (event->type)
|
||||
switch ((guint) event->type)
|
||||
{
|
||||
case GDK_KEY_PRESS:
|
||||
case GDK_KEY_RELEASE:
|
||||
@ -1439,7 +1441,7 @@ gdk_event_get_string (const GdkEvent *event,
|
||||
{
|
||||
gboolean fetched = TRUE;
|
||||
|
||||
switch (event->type)
|
||||
switch ((guint) event->type)
|
||||
{
|
||||
case GDK_KEY_PRESS:
|
||||
case GDK_KEY_RELEASE:
|
||||
@ -1467,7 +1469,7 @@ gdk_event_get_key_is_modifier (const GdkEvent *event,
|
||||
{
|
||||
gboolean fetched = TRUE;
|
||||
|
||||
switch (event->type)
|
||||
switch ((guint) event->type)
|
||||
{
|
||||
case GDK_KEY_PRESS:
|
||||
case GDK_KEY_RELEASE:
|
||||
@ -1500,7 +1502,7 @@ gdk_event_get_scroll_direction (const GdkEvent *event,
|
||||
gboolean fetched = TRUE;
|
||||
GdkScrollDirection dir = 0;
|
||||
|
||||
switch (event->type)
|
||||
switch ((guint) event->type)
|
||||
{
|
||||
case GDK_SCROLL:
|
||||
if (event->scroll.direction == GDK_SCROLL_SMOOTH)
|
||||
@ -1540,7 +1542,7 @@ gdk_event_get_scroll_deltas (const GdkEvent *event,
|
||||
gdouble dx = 0.0;
|
||||
gdouble dy = 0.0;
|
||||
|
||||
switch (event->type)
|
||||
switch ((guint) event->type)
|
||||
{
|
||||
case GDK_SCROLL:
|
||||
if (event->scroll.direction == GDK_SCROLL_SMOOTH)
|
||||
@ -1612,7 +1614,7 @@ gdk_event_get_axis (const GdkEvent *event,
|
||||
{
|
||||
gdouble x, y;
|
||||
|
||||
switch (event->type)
|
||||
switch ((guint) event->type)
|
||||
{
|
||||
case GDK_MOTION_NOTIFY:
|
||||
x = event->motion.x;
|
||||
@ -1699,7 +1701,7 @@ gdk_event_set_device (GdkEvent *event,
|
||||
|
||||
g_set_object (&private->device, device);
|
||||
|
||||
switch (event->type)
|
||||
switch ((guint) event->type)
|
||||
{
|
||||
case GDK_MOTION_NOTIFY:
|
||||
event->motion.device = device;
|
||||
@ -1750,7 +1752,7 @@ gdk_event_get_device (const GdkEvent *event)
|
||||
return private->device;
|
||||
}
|
||||
|
||||
switch (event->type)
|
||||
switch ((guint) event->type)
|
||||
{
|
||||
case GDK_MOTION_NOTIFY:
|
||||
return event->motion.device;
|
||||
@ -1767,32 +1769,15 @@ gdk_event_get_device (const GdkEvent *event)
|
||||
case GDK_PROXIMITY_IN:
|
||||
case GDK_PROXIMITY_OUT:
|
||||
return event->proximity.device;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* Fallback if event has no device set */
|
||||
switch (event->type)
|
||||
{
|
||||
case GDK_MOTION_NOTIFY:
|
||||
case GDK_BUTTON_PRESS:
|
||||
case GDK_BUTTON_RELEASE:
|
||||
case GDK_TOUCH_BEGIN:
|
||||
case GDK_TOUCH_UPDATE:
|
||||
case GDK_TOUCH_END:
|
||||
case GDK_TOUCH_CANCEL:
|
||||
case GDK_ENTER_NOTIFY:
|
||||
case GDK_LEAVE_NOTIFY:
|
||||
case GDK_FOCUS_CHANGE:
|
||||
case GDK_PROXIMITY_IN:
|
||||
case GDK_PROXIMITY_OUT:
|
||||
case GDK_DRAG_ENTER:
|
||||
case GDK_DRAG_LEAVE:
|
||||
case GDK_DRAG_MOTION:
|
||||
case GDK_DRAG_STATUS:
|
||||
case GDK_DROP_START:
|
||||
case GDK_DROP_FINISHED:
|
||||
case GDK_SCROLL:
|
||||
case GDK_GRAB_BROKEN:
|
||||
case GDK_KEY_PRESS:
|
||||
case GDK_KEY_RELEASE:
|
||||
@ -2255,6 +2240,7 @@ _gdk_set_window_state (GdkWindow *window,
|
||||
case GDK_WINDOW_FOREIGN:
|
||||
case GDK_WINDOW_ROOT:
|
||||
case GDK_WINDOW_CHILD:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -447,6 +447,7 @@ gdk_frame_clock_paint_idle (void *data)
|
||||
}
|
||||
/* fallthrough */
|
||||
case GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS:
|
||||
default:
|
||||
;
|
||||
}
|
||||
}
|
||||
|
@ -47,8 +47,9 @@ get_vertex_type_name (int type)
|
||||
return "geometry";
|
||||
case GL_FRAGMENT_SHADER:
|
||||
return "fragment";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
static guint
|
||||
|
@ -859,6 +859,9 @@ gdk_keyval_convert_case (guint symbol,
|
||||
symbol != GDK_KEY_Greek_finalsmallsigma)
|
||||
xupper -= (GDK_KEY_Greek_alpha - GDK_KEY_Greek_ALPHA);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (lower)
|
||||
|
@ -194,7 +194,7 @@ gdk_seat_default_get_master (GdkSeat *seat,
|
||||
priv = gdk_seat_default_get_instance_private (GDK_SEAT_DEFAULT (seat));
|
||||
|
||||
/* There must be only one flag set */
|
||||
switch (capability)
|
||||
switch ((guint) capability)
|
||||
{
|
||||
case GDK_SEAT_CAPABILITY_POINTER:
|
||||
case GDK_SEAT_CAPABILITY_TOUCH:
|
||||
@ -224,6 +224,11 @@ device_get_capability (GdkDevice *device)
|
||||
return GDK_SEAT_CAPABILITY_TOUCH;
|
||||
case GDK_SOURCE_MOUSE:
|
||||
case GDK_SOURCE_TOUCHPAD:
|
||||
case GDK_SOURCE_PEN:
|
||||
case GDK_SOURCE_ERASER:
|
||||
case GDK_SOURCE_CURSOR:
|
||||
case GDK_SOURCE_TRACKPOINT:
|
||||
case GDK_SOURCE_TABLET_PAD:
|
||||
default:
|
||||
return GDK_SEAT_CAPABILITY_POINTER;
|
||||
}
|
||||
|
@ -118,6 +118,12 @@ gdk_vulkan_strerror (VkResult result)
|
||||
return "A surface has changed in such a way that it is no longer compatible with the swapchain.";
|
||||
case VK_ERROR_INCOMPATIBLE_DISPLAY_KHR:
|
||||
return "The display used by a swapchain does not use the same presentable image layout, or is incompatible in a way that prevents sharing an image.";
|
||||
case VK_ERROR_VALIDATION_FAILED_EXT:
|
||||
return "The application caused the validation layer to fail.";
|
||||
case VK_ERROR_INVALID_SHADER_NV:
|
||||
return "One or more shaders failed to compile or link.";
|
||||
case VK_RESULT_RANGE_SIZE:
|
||||
case VK_RESULT_MAX_ENUM:
|
||||
default:
|
||||
return "Unknown Vulkan error.";
|
||||
}
|
||||
|
@ -1384,6 +1384,10 @@ _gdk_window_destroy_hierarchy (GdkWindow *window,
|
||||
|
||||
switch (window->window_type)
|
||||
{
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
|
||||
case GDK_WINDOW_ROOT:
|
||||
if (!screen->closed)
|
||||
{
|
||||
@ -5626,7 +5630,7 @@ _gdk_make_event (GdkWindow *window,
|
||||
if (event_in_queue && event_in_queue->any.send_event)
|
||||
event->any.send_event = TRUE;
|
||||
|
||||
switch (type)
|
||||
switch ((guint) type)
|
||||
{
|
||||
case GDK_MOTION_NOTIFY:
|
||||
event->motion.time = the_time;
|
||||
|
@ -1753,6 +1753,8 @@ get_axis_source_name (enum wl_pointer_axis_source source)
|
||||
return "finger";
|
||||
case WL_POINTER_AXIS_SOURCE_CONTINUOUS:
|
||||
return "continuous";
|
||||
case WL_POINTER_AXIS_SOURCE_WHEEL_TILT:
|
||||
return "wheel-tilt";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
@ -3288,6 +3290,7 @@ get_scroll_device (GdkWaylandSeat *seat,
|
||||
}
|
||||
return seat->continuous_scrolling;
|
||||
|
||||
case WL_POINTER_AXIS_SOURCE_WHEEL_TILT:
|
||||
default:
|
||||
return seat->pointer;
|
||||
}
|
||||
@ -3390,6 +3393,8 @@ tablet_tool_handle_capability (void *data,
|
||||
case ZWP_TABLET_TOOL_V2_CAPABILITY_SLIDER:
|
||||
tool->axes |= GDK_AXIS_FLAG_SLIDER;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3426,7 +3431,7 @@ gdk_wayland_tablet_flush_frame_event (GdkWaylandTabletData *tablet,
|
||||
if (!event)
|
||||
return;
|
||||
|
||||
switch (event->type)
|
||||
switch ((guint) event->type)
|
||||
{
|
||||
case GDK_MOTION_NOTIFY:
|
||||
event->motion.time = time;
|
||||
|
@ -107,7 +107,7 @@ _gdk_wayland_drag_context_emit_event (GdkDragContext *context,
|
||||
GdkWindow *window;
|
||||
GdkEvent *event;
|
||||
|
||||
switch (type)
|
||||
switch ((guint) type)
|
||||
{
|
||||
case GDK_DRAG_ENTER:
|
||||
case GDK_DRAG_LEAVE:
|
||||
|
@ -508,6 +508,11 @@ update_direction (GdkWaylandKeymap *keymap)
|
||||
case PANGO_DIRECTION_LTR:
|
||||
rtl[layout]--;
|
||||
break;
|
||||
case PANGO_DIRECTION_TTB_LTR:
|
||||
case PANGO_DIRECTION_TTB_RTL:
|
||||
case PANGO_DIRECTION_WEAK_LTR:
|
||||
case PANGO_DIRECTION_WEAK_RTL:
|
||||
case PANGO_DIRECTION_NEUTRAL:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -191,11 +191,8 @@ update_xft_settings (GdkScreen *screen)
|
||||
order = GSD_FONT_RGBA_ORDER_RGB;
|
||||
}
|
||||
|
||||
xft_settings.antialias = (antialiasing != GSD_FONT_ANTIALIASING_MODE_NONE);
|
||||
xft_settings.hinting = (hinting != GSD_FONT_HINTING_NONE);
|
||||
xft_settings.dpi = get_dpi_from_gsettings (screen_wayland) * 1024; /* Xft wants 1/1024ths of an inch */
|
||||
xft_settings.rgba = "rgb";
|
||||
xft_settings.hintstyle = "hintfull";
|
||||
|
||||
switch (hinting)
|
||||
{
|
||||
@ -209,6 +206,7 @@ update_xft_settings (GdkScreen *screen)
|
||||
xft_settings.hintstyle = "hintmedium";
|
||||
break;
|
||||
case GSD_FONT_HINTING_FULL:
|
||||
default:
|
||||
xft_settings.hintstyle = "hintfull";
|
||||
break;
|
||||
}
|
||||
@ -218,6 +216,7 @@ update_xft_settings (GdkScreen *screen)
|
||||
case GSD_FONT_RGBA_ORDER_RGBA:
|
||||
xft_settings.rgba = "rgba";
|
||||
break;
|
||||
default:
|
||||
case GSD_FONT_RGBA_ORDER_RGB:
|
||||
xft_settings.rgba = "rgb";
|
||||
break;
|
||||
@ -234,6 +233,7 @@ update_xft_settings (GdkScreen *screen)
|
||||
|
||||
switch (antialiasing)
|
||||
{
|
||||
default:
|
||||
case GSD_FONT_ANTIALIASING_MODE_NONE:
|
||||
xft_settings.antialias = FALSE;
|
||||
break;
|
||||
|
@ -1738,6 +1738,7 @@ calculate_popup_rect (GdkWindow *window,
|
||||
|
||||
switch (rect_anchor)
|
||||
{
|
||||
default:
|
||||
case GDK_GRAVITY_STATIC:
|
||||
case GDK_GRAVITY_NORTH_WEST:
|
||||
x = anchor_rect.x;
|
||||
@ -1779,6 +1780,7 @@ calculate_popup_rect (GdkWindow *window,
|
||||
|
||||
switch (window_anchor)
|
||||
{
|
||||
default:
|
||||
case GDK_GRAVITY_STATIC:
|
||||
case GDK_GRAVITY_NORTH_WEST:
|
||||
break;
|
||||
@ -1825,6 +1827,7 @@ flip_anchor_horizontally (GdkGravity anchor)
|
||||
{
|
||||
switch (anchor)
|
||||
{
|
||||
default:
|
||||
case GDK_GRAVITY_STATIC:
|
||||
case GDK_GRAVITY_NORTH_WEST:
|
||||
return GDK_GRAVITY_NORTH_EAST;
|
||||
@ -1854,6 +1857,7 @@ flip_anchor_vertically (GdkGravity anchor)
|
||||
{
|
||||
switch (anchor)
|
||||
{
|
||||
default:
|
||||
case GDK_GRAVITY_STATIC:
|
||||
case GDK_GRAVITY_NORTH_WEST:
|
||||
return GDK_GRAVITY_SOUTH_WEST;
|
||||
@ -2211,7 +2215,7 @@ should_map_as_popup (GdkWindow *window)
|
||||
}
|
||||
|
||||
/* Yet we need to keep the window type hint tests for compatibility */
|
||||
switch (impl->hint)
|
||||
switch ((guint) impl->hint)
|
||||
{
|
||||
case GDK_WINDOW_TYPE_HINT_POPUP_MENU:
|
||||
case GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU:
|
||||
@ -3616,7 +3620,7 @@ gdk_wayland_window_show_window_menu (GdkWindow *window,
|
||||
double x, y;
|
||||
uint32_t serial;
|
||||
|
||||
switch (event->type)
|
||||
switch ((guint) event->type)
|
||||
{
|
||||
case GDK_BUTTON_PRESS:
|
||||
case GDK_BUTTON_RELEASE:
|
||||
|
@ -526,6 +526,8 @@ get_child_info_handler (Display *dpy,
|
||||
handle_get_geometry_reply (dpy, state, repl);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -233,7 +233,7 @@ gdk_x11_device_xi2_get_state (GdkDevice *device,
|
||||
value = ((XIValuatorClassInfo *) class_info)->value;
|
||||
use = gdk_device_get_axis_use (device, j);
|
||||
|
||||
switch (use)
|
||||
switch ((guint) use)
|
||||
{
|
||||
case GDK_AXIS_X:
|
||||
case GDK_AXIS_Y:
|
||||
|
@ -1158,7 +1158,7 @@ translate_axes (GdkDevice *device,
|
||||
use = gdk_device_get_axis_use (device, i);
|
||||
val = *vals++;
|
||||
|
||||
switch (use)
|
||||
switch ((guint) use)
|
||||
{
|
||||
case GDK_AXIS_X:
|
||||
case GDK_AXIS_Y:
|
||||
|
@ -784,6 +784,8 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
|
||||
g_message ("visibility notify:\twindow: %ld full",
|
||||
xevent->xvisibility.window);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#endif /* G_ENABLE_DEBUG */
|
||||
|
||||
@ -806,6 +808,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
|
||||
event->visibility.state = GDK_VISIBILITY_PARTIAL;
|
||||
break;
|
||||
|
||||
default:
|
||||
case VisibilityUnobscured:
|
||||
event->visibility.state = GDK_VISIBILITY_UNOBSCURED;
|
||||
break;
|
||||
@ -1217,6 +1220,8 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
|
||||
case XkbStateNotify:
|
||||
_gdk_x11_keymap_state_changed (display, xevent);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -2363,6 +2368,8 @@ gdk_x11_display_broadcast_startup_message (GdkDisplay *display,
|
||||
case '\\':
|
||||
g_string_append_c (message, '\\');
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
g_string_append_c (message, *p);
|
||||
|
@ -1978,6 +1978,11 @@ gdk_drag_do_leave (GdkX11DragContext *context_x11,
|
||||
xdnd_send_leave (context_x11);
|
||||
break;
|
||||
case GDK_DRAG_PROTO_ROOTWIN:
|
||||
case GDK_DRAG_PROTO_MOTIF:
|
||||
case GDK_DRAG_PROTO_WIN32_DROPFILES:
|
||||
case GDK_DRAG_PROTO_OLE2:
|
||||
case GDK_DRAG_PROTO_LOCAL:
|
||||
case GDK_DRAG_PROTO_WAYLAND:
|
||||
case GDK_DRAG_PROTO_NONE:
|
||||
default:
|
||||
break;
|
||||
@ -2277,6 +2282,11 @@ gdk_x11_drag_context_drag_motion (GdkDragContext *context,
|
||||
break;
|
||||
|
||||
case GDK_DRAG_PROTO_ROOTWIN:
|
||||
case GDK_DRAG_PROTO_MOTIF:
|
||||
case GDK_DRAG_PROTO_WIN32_DROPFILES:
|
||||
case GDK_DRAG_PROTO_OLE2:
|
||||
case GDK_DRAG_PROTO_LOCAL:
|
||||
case GDK_DRAG_PROTO_WAYLAND:
|
||||
case GDK_DRAG_PROTO_NONE:
|
||||
default:
|
||||
break;
|
||||
@ -2360,8 +2370,13 @@ gdk_x11_drag_context_drag_motion (GdkDragContext *context,
|
||||
gdk_event_free (temp_event);
|
||||
}
|
||||
break;
|
||||
case GDK_DRAG_PROTO_MOTIF:
|
||||
case GDK_DRAG_PROTO_WIN32_DROPFILES:
|
||||
case GDK_DRAG_PROTO_OLE2:
|
||||
case GDK_DRAG_PROTO_LOCAL:
|
||||
case GDK_DRAG_PROTO_WAYLAND:
|
||||
case GDK_DRAG_PROTO_NONE:
|
||||
g_warning ("GDK_DRAG_PROTO_NONE is not valid in gdk_drag_motion()");
|
||||
g_warning ("Invalid drag protocol %u in gdk_drag_motion()", context->protocol);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -2401,7 +2416,13 @@ gdk_x11_drag_context_drag_drop (GdkDragContext *context,
|
||||
case GDK_DRAG_PROTO_NONE:
|
||||
g_warning ("GDK_DRAG_PROTO_NONE is not valid in gdk_drag_drop()");
|
||||
break;
|
||||
case GDK_DRAG_PROTO_MOTIF:
|
||||
case GDK_DRAG_PROTO_WIN32_DROPFILES:
|
||||
case GDK_DRAG_PROTO_OLE2:
|
||||
case GDK_DRAG_PROTO_LOCAL:
|
||||
case GDK_DRAG_PROTO_WAYLAND:
|
||||
default:
|
||||
g_warning ("Drag protocol %u is not valid in gdk_drag_drop()", context->protocol);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -3014,6 +3035,9 @@ gdk_dnd_handle_key_event (GdkDragContext *context,
|
||||
case GDK_KEY_KP_Right:
|
||||
dx = (state & GDK_MOD1_MASK) ? BIG_STEP : SMALL_STEP;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3130,7 +3154,7 @@ gdk_x11_drag_context_handle_event (GdkDragContext *context,
|
||||
if (!x11_context->grab_seat && event->type != GDK_DROP_FINISHED)
|
||||
return FALSE;
|
||||
|
||||
switch (event->type)
|
||||
switch ((guint) event->type)
|
||||
{
|
||||
case GDK_MOTION_NOTIFY:
|
||||
return gdk_dnd_handle_motion_event (context, &event->motion);
|
||||
|
@ -490,6 +490,11 @@ get_direction (XkbDescRec *xkb,
|
||||
case PANGO_DIRECTION_LTR:
|
||||
rtl_minus_ltr--;
|
||||
break;
|
||||
case PANGO_DIRECTION_TTB_LTR:
|
||||
case PANGO_DIRECTION_TTB_RTL:
|
||||
case PANGO_DIRECTION_WEAK_LTR:
|
||||
case PANGO_DIRECTION_WEAK_RTL:
|
||||
case PANGO_DIRECTION_NEUTRAL:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -1560,15 +1565,11 @@ gdk_x11_keymap_get_modifier_mask (GdkKeymap *keymap,
|
||||
{
|
||||
GdkX11Keymap *keymap_x11 = GDK_X11_KEYMAP (keymap);
|
||||
|
||||
switch (intent)
|
||||
{
|
||||
case GDK_MODIFIER_INTENT_SHIFT_GROUP:
|
||||
return keymap_x11->group_switch_mask;
|
||||
if (intent == GDK_MODIFIER_INTENT_SHIFT_GROUP)
|
||||
return keymap_x11->group_switch_mask;
|
||||
|
||||
default:
|
||||
return GDK_KEYMAP_CLASS (gdk_x11_keymap_parent_class)->get_modifier_mask (keymap,
|
||||
intent);
|
||||
}
|
||||
return GDK_KEYMAP_CLASS (gdk_x11_keymap_parent_class)->get_modifier_mask (keymap,
|
||||
intent);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -130,11 +130,10 @@ _gdk_x11_convert_grab_status (gint status)
|
||||
return GDK_GRAB_NOT_VIEWABLE;
|
||||
case GrabFrozen:
|
||||
return GDK_GRAB_FROZEN;
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
return 0;
|
||||
}
|
||||
|
||||
g_assert_not_reached();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -124,6 +124,9 @@ _gdk_x11_screen_init_visuals (GdkScreen *screen,
|
||||
case DirectColor:
|
||||
visuals[nvisuals]->type = GDK_VISUAL_DIRECT_COLOR;
|
||||
break;
|
||||
default:
|
||||
g_warn_if_reached ();
|
||||
break;
|
||||
}
|
||||
|
||||
visuals[nvisuals]->depth = visual_list[i].depth;
|
||||
|
@ -953,6 +953,7 @@ _gdk_x11_display_create_window_impl (GdkDisplay *display,
|
||||
break;
|
||||
|
||||
case GDK_WINDOW_CHILD:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
@ -1519,6 +1520,7 @@ gdk_window_x11_hide (GdkWindow *window)
|
||||
case GDK_WINDOW_FOREIGN:
|
||||
case GDK_WINDOW_ROOT:
|
||||
case GDK_WINDOW_CHILD:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -4300,6 +4302,8 @@ update_pos (MoveResizeData *mv_resize,
|
||||
x += dx;
|
||||
w -= dx;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
x = MAX (x, 0);
|
||||
@ -4486,11 +4490,16 @@ _gdk_x11_moveresize_handle_event (XEvent *event)
|
||||
finish_drag (mv_resize);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@ -4607,6 +4616,7 @@ calculate_unmoving_origin (MoveResizeData *mv_resize)
|
||||
mv_resize->moveresize_orig_x = rect.x + rect.width - width;
|
||||
mv_resize->moveresize_orig_y = rect.y + rect.height - height;
|
||||
break;
|
||||
case GDK_GRAVITY_STATIC:
|
||||
default:
|
||||
mv_resize->moveresize_orig_x = rect.x;
|
||||
mv_resize->moveresize_orig_y = rect.y;
|
||||
@ -4963,7 +4973,7 @@ gdk_x11_window_show_window_menu (GdkWindow *window,
|
||||
double x_root, y_root;
|
||||
XClientMessageEvent xclient = { 0 };
|
||||
|
||||
switch (event->type)
|
||||
switch ((guint) event->type)
|
||||
{
|
||||
case GDK_BUTTON_PRESS:
|
||||
case GDK_BUTTON_RELEASE:
|
||||
|
@ -662,6 +662,9 @@ get_gl_scaling_filters (GskRenderNode *node,
|
||||
case GSK_SCALING_FILTER_TRILINEAR:
|
||||
*min_filter_r = GL_LINEAR_MIPMAP_LINEAR;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
switch (node->mag_filter)
|
||||
@ -675,6 +678,7 @@ get_gl_scaling_filters (GskRenderNode *node,
|
||||
*/
|
||||
case GSK_SCALING_FILTER_LINEAR:
|
||||
case GSK_SCALING_FILTER_TRILINEAR:
|
||||
default:
|
||||
*mag_filter_r = GL_LINEAR;
|
||||
break;
|
||||
}
|
||||
@ -917,6 +921,16 @@ gsk_gl_renderer_add_render_item (GskGLRenderer *self,
|
||||
g_assert_not_reached ();
|
||||
return;
|
||||
|
||||
case GSK_LINEAR_GRADIENT_NODE:
|
||||
case GSK_REPEATING_LINEAR_GRADIENT_NODE:
|
||||
case GSK_BORDER_NODE:
|
||||
case GSK_INSET_SHADOW_NODE:
|
||||
case GSK_OUTSET_SHADOW_NODE:
|
||||
case GSK_OPACITY_NODE:
|
||||
case GSK_CLIP_NODE:
|
||||
case GSK_ROUNDED_CLIP_NODE:
|
||||
case GSK_TEXT_NODE:
|
||||
case GSK_BLUR_NODE:
|
||||
default:
|
||||
{
|
||||
cairo_surface_t *surface;
|
||||
|
@ -205,6 +205,10 @@ gsk_renderer_set_property (GObject *gobject,
|
||||
/* Construct-only */
|
||||
priv->display = g_value_dup_object (value);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -238,6 +242,10 @@ gsk_renderer_get_property (GObject *gobject,
|
||||
case PROP_DISPLAY:
|
||||
g_value_set_object (value, priv->display);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,6 +72,10 @@ gsk_vulkan_clip_intersect_rect (GskVulkanClip *dest,
|
||||
*/
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@ -122,6 +126,10 @@ gsk_vulkan_clip_intersect_rounded_rect (GskVulkanClip *dest,
|
||||
case GSK_VULKAN_CLIP_ROUNDED:
|
||||
/* XXX: improve */
|
||||
return FALSE;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
@ -674,7 +674,7 @@ gsk_vulkan_render_pass_get_node_as_texture (GskVulkanRenderPass *self,
|
||||
cairo_surface_t *surface;
|
||||
cairo_t *cr;
|
||||
|
||||
switch (gsk_render_node_get_node_type (node))
|
||||
switch ((guint) gsk_render_node_get_node_type (node))
|
||||
{
|
||||
case GSK_TEXTURE_NODE:
|
||||
if (graphene_rect_equal (bounds, &node->bounds))
|
||||
@ -696,7 +696,7 @@ gsk_vulkan_render_pass_get_node_as_texture (GskVulkanRenderPass *self,
|
||||
}
|
||||
break;
|
||||
|
||||
default: ;
|
||||
default:
|
||||
{
|
||||
VkSemaphore semaphore;
|
||||
graphene_rect_t view;
|
||||
|
@ -297,6 +297,8 @@ gtk_image_accessible_get_image_size (AtkImage *image,
|
||||
*width = gdk_pixbuf_animation_get_width (animation);
|
||||
break;
|
||||
}
|
||||
case GTK_IMAGE_EMPTY:
|
||||
case GTK_IMAGE_SURFACE:
|
||||
default:
|
||||
{
|
||||
*height = -1;
|
||||
|
@ -647,6 +647,7 @@ gtk_button_box_size_request (GtkWidget *widget,
|
||||
|
||||
switch (gtk_box_get_baseline_position (GTK_BOX (widget)))
|
||||
{
|
||||
default:
|
||||
case GTK_BASELINE_POSITION_TOP:
|
||||
break;
|
||||
case GTK_BASELINE_POSITION_CENTER:
|
||||
@ -800,6 +801,7 @@ gtk_button_box_size_allocate (GtkWidget *widget,
|
||||
switch (gtk_box_get_baseline_position (GTK_BOX (widget)))
|
||||
{
|
||||
case GTK_BASELINE_POSITION_TOP:
|
||||
default:
|
||||
/* keep baseline as is */
|
||||
break;
|
||||
case GTK_BASELINE_POSITION_CENTER:
|
||||
@ -973,6 +975,7 @@ gtk_button_box_size_allocate (GtkWidget *widget,
|
||||
|
||||
break;
|
||||
|
||||
case GTK_BUTTONBOX_EXPAND:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
|
@ -1320,17 +1320,17 @@ gtk_binding_parse_bind (GScanner *scanner,
|
||||
{
|
||||
guint expected_token;
|
||||
|
||||
switch (scanner->next_token)
|
||||
if (scanner->next_token == G_TOKEN_STRING)
|
||||
{
|
||||
case G_TOKEN_STRING:
|
||||
expected_token = gtk_binding_parse_signal (scanner,
|
||||
binding_set,
|
||||
keyval,
|
||||
modifiers);
|
||||
if (expected_token != G_TOKEN_NONE)
|
||||
return expected_token;
|
||||
break;
|
||||
default:
|
||||
}
|
||||
else
|
||||
{
|
||||
g_scanner_get_next_token (scanner);
|
||||
return '}';
|
||||
}
|
||||
|
@ -207,6 +207,13 @@ bookmarks_file_changed (GFileMonitor *monitor,
|
||||
gdk_threads_leave ();
|
||||
break;
|
||||
|
||||
case G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED:
|
||||
case G_FILE_MONITOR_EVENT_PRE_UNMOUNT:
|
||||
case G_FILE_MONITOR_EVENT_UNMOUNTED:
|
||||
case G_FILE_MONITOR_EVENT_MOVED:
|
||||
case G_FILE_MONITOR_EVENT_RENAMED:
|
||||
case G_FILE_MONITOR_EVENT_MOVED_IN:
|
||||
case G_FILE_MONITOR_EVENT_MOVED_OUT:
|
||||
default:
|
||||
/* ignore at the moment */
|
||||
break;
|
||||
|
@ -576,6 +576,8 @@ gtk_box_size_allocate (GtkWidget *widget,
|
||||
case GTK_BASELINE_POSITION_BOTTOM:
|
||||
baseline = height - minimum_below;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1025,6 +1027,8 @@ gtk_box_get_size (GtkWidget *widget,
|
||||
min_baseline = minimum - minimum_below;
|
||||
nat_baseline = natural - natural_below;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1227,6 +1231,8 @@ gtk_box_compute_size_for_opposing_orientation (GtkBox *box,
|
||||
computed_minimum_baseline = computed_minimum - computed_minimum_below;
|
||||
computed_natural_baseline = computed_natural - computed_natural_below;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2858,6 +2858,8 @@ gtk_calendar_key_press (GtkWidget *widget,
|
||||
|
||||
calendar_select_and_focus_day (calendar, day);
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return return_val;
|
||||
|
@ -698,9 +698,9 @@ get_property_font_set_mask (guint prop_id)
|
||||
return PANGO_FONT_MASK_STRETCH;
|
||||
case PROP_SIZE_SET:
|
||||
return PANGO_FONT_MASK_SIZE;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1222,6 +1222,8 @@ gtk_cell_renderer_text_set_property (GObject *object,
|
||||
g_value_get_double (value) * PANGO_SCALE);
|
||||
g_object_notify_by_pspec (object, pspec);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (priv->fixed_height_rows != -1)
|
||||
@ -1539,6 +1541,9 @@ get_layout (GtkCellRendererText *celltext,
|
||||
uline = PANGO_UNDERLINE_DOUBLE;
|
||||
break;
|
||||
|
||||
case PANGO_UNDERLINE_DOUBLE:
|
||||
case PANGO_UNDERLINE_LOW:
|
||||
case PANGO_UNDERLINE_ERROR:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -350,6 +350,8 @@ gtk_center_box_measure_opposite (GtkWidget *widget,
|
||||
min_baseline = total_min - below_min;
|
||||
nat_baseline = total_nat - below_nat;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (minimum_baseline)
|
||||
@ -476,6 +478,7 @@ gtk_center_box_size_allocate (GtkWidget *widget,
|
||||
*/
|
||||
switch (self->baseline_pos)
|
||||
{
|
||||
default:
|
||||
case GTK_BASELINE_POSITION_TOP:
|
||||
baseline = min_above;
|
||||
break;
|
||||
|
@ -2583,6 +2583,8 @@ gtk_combo_box_real_move_active (GtkComboBox *combo_box,
|
||||
found = tree_first (combo_box, priv->model, &new_iter);
|
||||
break;
|
||||
|
||||
case GTK_SCROLL_NONE:
|
||||
case GTK_SCROLL_JUMP:
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
@ -2593,11 +2593,10 @@ _gtk_container_focus_sort (GtkContainer *container,
|
||||
case GTK_DIR_LEFT:
|
||||
case GTK_DIR_RIGHT:
|
||||
return gtk_container_focus_sort_left_right (container, visible_children, direction, old_focus);
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
g_assert_not_reached ();
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -93,6 +93,8 @@ gtk_css_value_color_free (GtkCssValue *color)
|
||||
case COLOR_TYPE_WIN32:
|
||||
gtk_win32_theme_unref (color->sym_col.win32.theme);
|
||||
break;
|
||||
case COLOR_TYPE_LITERAL:
|
||||
case COLOR_TYPE_CURRENT_COLOR:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -770,6 +772,9 @@ _gtk_css_color_value_parse_function (GtkCssParser *parser,
|
||||
case COLOR_MIX:
|
||||
value = _gtk_css_color_value_new_mix (child1, child2, d);
|
||||
break;
|
||||
case COLOR_RGB:
|
||||
case COLOR_RGBA:
|
||||
case COLOR_WIN32:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
value = NULL;
|
||||
|
@ -177,7 +177,7 @@ gtk_css_image_builtin_draw_arrow (GtkCssImage *image,
|
||||
size = MIN (width, height);
|
||||
|
||||
cairo_translate (cr, width / 2.0, height / 2.0);
|
||||
switch (image_type)
|
||||
switch ((guint) image_type)
|
||||
{
|
||||
case GTK_CSS_IMAGE_BUILTIN_ARROW_UP:
|
||||
break;
|
||||
|
@ -286,7 +286,9 @@ gtk_css_style_get_pango_attributes (GtkCssStyle *style)
|
||||
case GTK_CSS_FONT_KERNING_NONE:
|
||||
append_separated (s, "kern 0");
|
||||
break;
|
||||
default: ;
|
||||
case GTK_CSS_FONT_KERNING_AUTO:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
value = gtk_css_style_get_value (style, GTK_CSS_PROPERTY_FONT_VARIANT_LIGATURES);
|
||||
@ -326,7 +328,9 @@ gtk_css_style_get_pango_attributes (GtkCssStyle *style)
|
||||
case GTK_CSS_FONT_VARIANT_POSITION_SUPER:
|
||||
append_separated (s, "sups 1");
|
||||
break;
|
||||
default: ;
|
||||
case GTK_CSS_FONT_VARIANT_POSITION_NORMAL:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
value = gtk_css_style_get_value (style, GTK_CSS_PROPERTY_FONT_VARIANT_CAPS);
|
||||
@ -349,8 +353,10 @@ gtk_css_style_get_pango_attributes (GtkCssStyle *style)
|
||||
break;
|
||||
case GTK_CSS_FONT_VARIANT_CAPS_TITLING_CAPS:
|
||||
append_separated (s, "titl 1");
|
||||
break;
|
||||
default: ;
|
||||
break;
|
||||
case GTK_CSS_FONT_VARIANT_CAPS_NORMAL:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
value = gtk_css_style_get_value (style, GTK_CSS_PROPERTY_FONT_VARIANT_NUMERIC);
|
||||
@ -385,7 +391,9 @@ gtk_css_style_get_pango_attributes (GtkCssStyle *style)
|
||||
case GTK_CSS_FONT_VARIANT_ALTERNATE_HISTORICAL_FORMS:
|
||||
append_separated (s, "hist 1");
|
||||
break;
|
||||
default: ;
|
||||
case GTK_CSS_FONT_VARIANT_ALTERNATE_NORMAL:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
value = gtk_css_style_get_value (style, GTK_CSS_PROPERTY_FONT_VARIANT_EAST_ASIAN);
|
||||
|
@ -501,6 +501,8 @@ pattern_value_print (const GValue *value,
|
||||
break;
|
||||
case CAIRO_PATTERN_TYPE_LINEAR:
|
||||
case CAIRO_PATTERN_TYPE_RADIAL:
|
||||
case CAIRO_PATTERN_TYPE_MESH:
|
||||
case CAIRO_PATTERN_TYPE_RASTER_SOURCE:
|
||||
g_string_append (string, "none /* FIXME: add support for printing gradients */");
|
||||
break;
|
||||
case CAIRO_PATTERN_TYPE_SOLID:
|
||||
|
@ -41,6 +41,8 @@ _gtk_css_blend_mode_get_operator (GskBlendMode mode)
|
||||
return CAIRO_OPERATOR_EXCLUSION;
|
||||
case GSK_BLEND_MODE_HARD_LIGHT:
|
||||
return CAIRO_OPERATOR_HARD_LIGHT;
|
||||
case GSK_BLEND_MODE_SOFT_LIGHT:
|
||||
return CAIRO_OPERATOR_SOFT_LIGHT;
|
||||
case GSK_BLEND_MODE_HUE:
|
||||
return CAIRO_OPERATOR_HSL_HUE;
|
||||
case GSK_BLEND_MODE_LIGHTEN:
|
||||
|
@ -145,6 +145,10 @@ gtk_css_value_win32_size_equal (const GtkCssValue *value1,
|
||||
return value1->val.part.part == value2->val.part.part
|
||||
&& value1->val.part.state == value2->val.part.state;
|
||||
|
||||
case GTK_WIN32_PART_BORDER_TOP:
|
||||
case GTK_WIN32_PART_BORDER_RIGHT:
|
||||
case GTK_WIN32_PART_BORDER_BOTTOM:
|
||||
case GTK_WIN32_PART_BORDER_LEFT:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return FALSE;
|
||||
|
@ -732,7 +732,7 @@ _gtk_drag_dest_handle_event (GtkWidget *toplevel,
|
||||
info = gtk_drag_get_dest_info (context, TRUE);
|
||||
|
||||
/* Find the widget for the event */
|
||||
switch (event_type)
|
||||
switch ((guint) event_type)
|
||||
{
|
||||
case GDK_DRAG_ENTER:
|
||||
break;
|
||||
@ -1789,7 +1789,7 @@ _gtk_drag_source_handle_event (GtkWidget *widget,
|
||||
if (!info)
|
||||
return;
|
||||
|
||||
switch (gdk_event_get_event_type (event))
|
||||
switch ((guint) gdk_event_get_event_type (event))
|
||||
{
|
||||
case GDK_DRAG_STATUS:
|
||||
{
|
||||
@ -2352,6 +2352,9 @@ gtk_drag_key_cb (GtkWidget *widget,
|
||||
gtk_drag_cancel_internal (info, GTK_DRAG_RESULT_NO_TARGET, time);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3536,7 +3536,7 @@ gtk_entry_event (GtkWidget *widget,
|
||||
sequence = gdk_event_get_event_sequence (event);
|
||||
device = gdk_event_get_device (event);
|
||||
|
||||
switch (gdk_event_get_event_type (event))
|
||||
switch ((guint) gdk_event_get_event_type (event))
|
||||
{
|
||||
case GDK_TOUCH_BEGIN:
|
||||
if (icon_info->current_sequence)
|
||||
@ -4816,6 +4816,7 @@ gtk_entry_move_cursor (GtkEntry *entry,
|
||||
case GTK_MOVEMENT_PARAGRAPHS:
|
||||
case GTK_MOVEMENT_PAGES:
|
||||
case GTK_MOVEMENT_HORIZONTAL_PAGES:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -4888,6 +4889,7 @@ gtk_entry_move_cursor (GtkEntry *entry,
|
||||
case GTK_MOVEMENT_PARAGRAPHS:
|
||||
case GTK_MOVEMENT_PAGES:
|
||||
case GTK_MOVEMENT_HORIZONTAL_PAGES:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -4996,6 +4998,9 @@ gtk_entry_delete_from_cursor (GtkEntry *entry,
|
||||
case GTK_DELETE_WHITESPACE:
|
||||
gtk_entry_delete_whitespace (entry);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (gtk_entry_buffer_get_bytes (get_buffer (entry)) == old_n_bytes)
|
||||
@ -6634,6 +6639,9 @@ gtk_entry_clear_icon (GtkEntry *entry,
|
||||
: PROP_GICON_SECONDARY]);
|
||||
break;
|
||||
|
||||
case GTK_IMAGE_EMPTY:
|
||||
case GTK_IMAGE_ANIMATION:
|
||||
case GTK_IMAGE_SURFACE:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
|
@ -270,6 +270,7 @@ gtk_event_controller_scroll_handle_event (GtkEventController *controller,
|
||||
case GDK_SCROLL_RIGHT:
|
||||
dx += 1;
|
||||
break;
|
||||
case GDK_SCROLL_SMOOTH:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
|
@ -739,6 +739,7 @@ focus_in_site (GtkExpander *expander,
|
||||
return FALSE;
|
||||
}
|
||||
case FOCUS_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -767,6 +768,7 @@ get_next_site (GtkExpander *expander,
|
||||
case GTK_DIR_TAB_FORWARD:
|
||||
case GTK_DIR_DOWN:
|
||||
case GTK_DIR_RIGHT:
|
||||
default:
|
||||
return FOCUS_WIDGET;
|
||||
}
|
||||
break;
|
||||
@ -780,6 +782,7 @@ get_next_site (GtkExpander *expander,
|
||||
return ltr ? FOCUS_NONE : FOCUS_LABEL;
|
||||
case GTK_DIR_TAB_FORWARD:
|
||||
case GTK_DIR_DOWN:
|
||||
default:
|
||||
return FOCUS_LABEL;
|
||||
case GTK_DIR_RIGHT:
|
||||
return ltr ? FOCUS_LABEL : FOCUS_NONE;
|
||||
@ -795,6 +798,7 @@ get_next_site (GtkExpander *expander,
|
||||
return ltr ? FOCUS_WIDGET : FOCUS_CHILD;
|
||||
case GTK_DIR_TAB_FORWARD:
|
||||
case GTK_DIR_DOWN:
|
||||
default:
|
||||
return FOCUS_CHILD;
|
||||
case GTK_DIR_RIGHT:
|
||||
return ltr ? FOCUS_CHILD : FOCUS_WIDGET;
|
||||
@ -810,12 +814,15 @@ get_next_site (GtkExpander *expander,
|
||||
case GTK_DIR_TAB_FORWARD:
|
||||
case GTK_DIR_DOWN:
|
||||
case GTK_DIR_RIGHT:
|
||||
default:
|
||||
return FOCUS_NONE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
|
||||
g_assert_not_reached ();
|
||||
|
||||
return FOCUS_NONE;
|
||||
}
|
||||
|
||||
|
@ -956,6 +956,8 @@ gtk_file_chooser_button_set_property (GObject *object,
|
||||
g_value_set_enum ((GValue *) value, GTK_FILE_CHOOSER_ACTION_OPEN);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
g_object_set_property (G_OBJECT (priv->chooser), pspec->name, value);
|
||||
@ -1346,6 +1348,8 @@ gtk_file_chooser_button_mnemonic_activate (GtkWidget *widget,
|
||||
case GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER:
|
||||
return gtk_widget_mnemonic_activate (priv->combo_box, group_cycling);
|
||||
break;
|
||||
case GTK_FILE_CHOOSER_ACTION_SAVE:
|
||||
case GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
|
@ -570,6 +570,7 @@ update_inline_completion (GtkFileChooserEntry *chooser_entry)
|
||||
break;
|
||||
case GTK_FILE_CHOOSER_ACTION_SAVE:
|
||||
case GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER:
|
||||
default:
|
||||
gtk_entry_completion_set_inline_completion (completion, FALSE);
|
||||
break;
|
||||
}
|
||||
@ -975,6 +976,7 @@ _gtk_file_chooser_entry_set_action (GtkFileChooserEntry *chooser_entry,
|
||||
{
|
||||
case GTK_FILE_CHOOSER_ACTION_OPEN:
|
||||
case GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER:
|
||||
default:
|
||||
gtk_entry_completion_set_popup_single_match (comp, FALSE);
|
||||
break;
|
||||
case GTK_FILE_CHOOSER_ACTION_SAVE:
|
||||
|
@ -780,6 +780,8 @@ gtk_file_chooser_native_hide (GtkNativeDialog *native)
|
||||
case MODE_PORTAL:
|
||||
gtk_file_chooser_native_portal_hide (self);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6883,6 +6883,7 @@ gtk_file_chooser_widget_should_respond (GtkFileChooserEmbed *chooser_embed)
|
||||
case SAVE_ENTRY:
|
||||
goto save_entry;
|
||||
|
||||
case NOT_REACHED:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
@ -710,6 +710,8 @@ _gtk_file_filter_get_as_patterns (GtkFileFilter *filter)
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -804,6 +806,9 @@ gtk_file_filter_filter (GtkFileFilter *filter,
|
||||
if (rule->u.custom.func (filter_info, rule->u.custom.data))
|
||||
return TRUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1264,6 +1264,10 @@ gtk_file_system_model_monitor_change (GFileMonitor * monitor,
|
||||
/* FIXME: use freeze/thaw with this somehow? */
|
||||
case G_FILE_MONITOR_EVENT_PRE_UNMOUNT:
|
||||
case G_FILE_MONITOR_EVENT_UNMOUNTED:
|
||||
case G_FILE_MONITOR_EVENT_MOVED:
|
||||
case G_FILE_MONITOR_EVENT_RENAMED:
|
||||
case G_FILE_MONITOR_EVENT_MOVED_IN:
|
||||
case G_FILE_MONITOR_EVENT_MOVED_OUT:
|
||||
default:
|
||||
/* ignore these */
|
||||
break;
|
||||
|
@ -1371,6 +1371,7 @@ get_offset_pixels (GtkAlign align,
|
||||
case GTK_ALIGN_END:
|
||||
offset = pixels;
|
||||
break;
|
||||
case GTK_ALIGN_BASELINE:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
@ -2486,8 +2487,21 @@ autoscroll_cb (GtkWidget *widget,
|
||||
case GTK_SCROLL_PAGE_BACKWARD:
|
||||
factor = - AUTOSCROLL_FACTOR_FAST;
|
||||
break;
|
||||
case GTK_SCROLL_NONE:
|
||||
case GTK_SCROLL_JUMP:
|
||||
case GTK_SCROLL_STEP_UP:
|
||||
case GTK_SCROLL_STEP_DOWN:
|
||||
case GTK_SCROLL_STEP_LEFT:
|
||||
case GTK_SCROLL_STEP_RIGHT:
|
||||
case GTK_SCROLL_PAGE_UP:
|
||||
case GTK_SCROLL_PAGE_DOWN:
|
||||
case GTK_SCROLL_PAGE_LEFT:
|
||||
case GTK_SCROLL_PAGE_RIGHT:
|
||||
case GTK_SCROLL_START:
|
||||
case GTK_SCROLL_END:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
|
||||
increment = gtk_adjustment_get_step_increment (adjustment) / factor;
|
||||
@ -3058,7 +3072,7 @@ gtk_flow_box_move_cursor (GtkFlowBox *box,
|
||||
|
||||
if (vertical)
|
||||
{
|
||||
switch (step)
|
||||
switch ((guint) step)
|
||||
{
|
||||
case GTK_MOVEMENT_VISUAL_POSITIONS:
|
||||
step = GTK_MOVEMENT_DISPLAY_LINES;
|
||||
@ -3066,12 +3080,13 @@ gtk_flow_box_move_cursor (GtkFlowBox *box,
|
||||
case GTK_MOVEMENT_DISPLAY_LINES:
|
||||
step = GTK_MOVEMENT_VISUAL_POSITIONS;
|
||||
break;
|
||||
default: ;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
child = NULL;
|
||||
switch (step)
|
||||
switch ((guint) step)
|
||||
{
|
||||
case GTK_MOVEMENT_VISUAL_POSITIONS:
|
||||
if (priv->cursor_child != NULL)
|
||||
|
@ -1239,6 +1239,8 @@ pango_font_description_to_css (PangoFontDescription *desc)
|
||||
case PANGO_STYLE_ITALIC:
|
||||
g_string_append (s, "font-style: italic; ");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (set & PANGO_FONT_MASK_VARIANT)
|
||||
@ -1251,6 +1253,8 @@ pango_font_description_to_css (PangoFontDescription *desc)
|
||||
case PANGO_VARIANT_SMALL_CAPS:
|
||||
g_string_append (s, "font-variant: small-caps; ");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (set & PANGO_FONT_MASK_WEIGHT)
|
||||
@ -1287,6 +1291,8 @@ pango_font_description_to_css (PangoFontDescription *desc)
|
||||
case PANGO_WEIGHT_ULTRAHEAVY:
|
||||
g_string_append (s, "font-weight: 900; ");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (set & PANGO_FONT_MASK_STRETCH)
|
||||
@ -1320,6 +1326,8 @@ pango_font_description_to_css (PangoFontDescription *desc)
|
||||
case PANGO_STRETCH_ULTRA_EXPANDED:
|
||||
g_string_append (s, "font-stretch: ultra-expanded; ");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (set & PANGO_FONT_MASK_SIZE)
|
||||
|
@ -1664,7 +1664,7 @@ _gtk_gesture_get_pointer_emulating_sequence (GtkGesture *gesture,
|
||||
|
||||
while (g_hash_table_iter_next (&iter, (gpointer*) &seq, (gpointer*) &data))
|
||||
{
|
||||
switch (gdk_event_get_event_type (data->event))
|
||||
switch ((guint) gdk_event_get_event_type (data->event))
|
||||
{
|
||||
case GDK_TOUCH_BEGIN:
|
||||
case GDK_TOUCH_UPDATE:
|
||||
|
@ -155,7 +155,7 @@ gtk_gesture_single_handle_event (GtkEventController *controller,
|
||||
|
||||
event_type = gdk_event_get_event_type (event);
|
||||
|
||||
switch (event_type)
|
||||
switch ((guint) event_type)
|
||||
{
|
||||
case GDK_TOUCH_BEGIN:
|
||||
case GDK_TOUCH_END:
|
||||
|
@ -777,6 +777,8 @@ gtk_grid_request_non_spanning (GtkGridRequest *request,
|
||||
line->natural_above += line->natural - (line->natural_above + line->natural_below);
|
||||
line->natural_below += 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1357,6 +1359,8 @@ gtk_grid_request_allocate (GtkGridRequest *request,
|
||||
line->allocated_baseline =
|
||||
line->allocation - line->minimum_below;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -768,6 +768,10 @@ _gtk_icon_helper_set_pixbuf_scale (GtkIconHelper *self,
|
||||
scale));
|
||||
break;
|
||||
|
||||
case GTK_IMAGE_EMPTY:
|
||||
case GTK_IMAGE_ICON_NAME:
|
||||
case GTK_IMAGE_GICON:
|
||||
case GTK_IMAGE_SURFACE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -2797,14 +2797,14 @@ theme_dir_size_difference (IconThemeDir *dir,
|
||||
{
|
||||
case ICON_THEME_DIR_FIXED:
|
||||
return abs (scaled_size - scaled_dir_size);
|
||||
break;
|
||||
|
||||
case ICON_THEME_DIR_SCALABLE:
|
||||
if (scaled_size < (dir->min_size * dir->scale))
|
||||
return (dir->min_size * dir->scale) - scaled_size;
|
||||
if (size > (dir->max_size * dir->scale))
|
||||
return scaled_size - (dir->max_size * dir->scale);
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case ICON_THEME_DIR_THRESHOLD:
|
||||
min = (dir->size - dir->threshold) * dir->scale;
|
||||
max = (dir->size + dir->threshold) * dir->scale;
|
||||
@ -2813,13 +2813,12 @@ theme_dir_size_difference (IconThemeDir *dir,
|
||||
if (scaled_size > max)
|
||||
return scaled_size - max;
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case ICON_THEME_DIR_UNTHEMED:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
return 1000;
|
||||
}
|
||||
g_assert_not_reached ();
|
||||
return 1000;
|
||||
}
|
||||
|
||||
static const gchar *
|
||||
@ -2835,10 +2834,12 @@ string_from_suffix (IconSuffix suffix)
|
||||
return ".png";
|
||||
case ICON_SUFFIX_SYMBOLIC_PNG:
|
||||
return ".symbolic.png";
|
||||
case ICON_SUFFIX_NONE:
|
||||
case HAS_ICON_FILE:
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
return NULL;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static IconSuffix
|
||||
@ -3665,6 +3666,8 @@ apply_emblems_to_pixbuf (GdkPixbuf *pixbuf,
|
||||
x = 0;
|
||||
y = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (icon == NULL)
|
||||
|
@ -1757,7 +1757,8 @@ gtk_icon_view_snapshot (GtkWidget *widget,
|
||||
rect.y = dest_item->cell_area.y;
|
||||
rect.width = 2;
|
||||
rect.height = dest_item->cell_area.height;
|
||||
case GTK_ICON_VIEW_NO_DROP: ;
|
||||
case GTK_ICON_VIEW_NO_DROP:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2590,6 +2591,7 @@ gtk_icon_view_real_toggle_cursor_item (GtkIconView *icon_view)
|
||||
switch (icon_view->priv->selection_mode)
|
||||
{
|
||||
case GTK_SELECTION_NONE:
|
||||
default:
|
||||
break;
|
||||
case GTK_SELECTION_BROWSE:
|
||||
_gtk_icon_view_select_item (icon_view, icon_view->priv->cursor_item);
|
||||
@ -3506,8 +3508,14 @@ gtk_icon_view_real_move_cursor (GtkIconView *icon_view,
|
||||
case GTK_MOVEMENT_BUFFER_ENDS:
|
||||
gtk_icon_view_move_cursor_start_end (icon_view, count);
|
||||
break;
|
||||
case GTK_MOVEMENT_WORDS:
|
||||
case GTK_MOVEMENT_DISPLAY_LINE_ENDS:
|
||||
case GTK_MOVEMENT_PARAGRAPHS:
|
||||
case GTK_MOVEMENT_PARAGRAPH_ENDS:
|
||||
case GTK_MOVEMENT_HORIZONTAL_PAGES:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
|
||||
icon_view->priv->modify_selection_pressed = FALSE;
|
||||
|
@ -1375,6 +1375,9 @@ gtk_image_notify_for_storage_type (GtkImage *image,
|
||||
case GTK_IMAGE_GICON:
|
||||
g_object_notify_by_pspec (G_OBJECT (image), image_props[PROP_GICON]);
|
||||
break;
|
||||
case GTK_IMAGE_SURFACE:
|
||||
g_object_notify_by_pspec (G_OBJECT (image), image_props[PROP_SURFACE]);
|
||||
break;
|
||||
case GTK_IMAGE_EMPTY:
|
||||
default:
|
||||
break;
|
||||
|
@ -208,6 +208,7 @@ gtk_kinetic_scrolling_tick (GtkKineticScrolling *data,
|
||||
}
|
||||
|
||||
case GTK_KINETIC_SCROLLING_PHASE_FINISHED:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -4466,6 +4466,10 @@ gtk_label_focus (GtkWidget *widget,
|
||||
break;
|
||||
|
||||
default:
|
||||
case GTK_DIR_UP:
|
||||
case GTK_DIR_DOWN:
|
||||
case GTK_DIR_LEFT:
|
||||
case GTK_DIR_RIGHT:
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -5840,6 +5844,7 @@ gtk_label_move_cursor (GtkLabel *label,
|
||||
case GTK_MOVEMENT_PARAGRAPHS:
|
||||
case GTK_MOVEMENT_PAGES:
|
||||
case GTK_MOVEMENT_HORIZONTAL_PAGES:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -5900,6 +5905,7 @@ gtk_label_move_cursor (GtkLabel *label,
|
||||
case GTK_MOVEMENT_PARAGRAPHS:
|
||||
case GTK_MOVEMENT_PAGES:
|
||||
case GTK_MOVEMENT_HORIZONTAL_PAGES:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1904,6 +1904,10 @@ gtk_list_box_focus (GtkWidget *widget,
|
||||
if (next_focus_row == NULL)
|
||||
next_focus_row = gtk_list_box_get_last_focusable (box);
|
||||
break;
|
||||
case GTK_DIR_DOWN:
|
||||
case GTK_DIR_TAB_FORWARD:
|
||||
case GTK_DIR_LEFT:
|
||||
case GTK_DIR_RIGHT:
|
||||
default:
|
||||
next_focus_row = priv->selected_row;
|
||||
if (next_focus_row == NULL)
|
||||
@ -2722,7 +2726,7 @@ gtk_list_box_move_cursor (GtkListBox *box,
|
||||
int height;
|
||||
|
||||
row = NULL;
|
||||
switch (step)
|
||||
switch ((guint) step)
|
||||
{
|
||||
case GTK_MOVEMENT_BUFFER_ENDS:
|
||||
if (count < 0)
|
||||
|
@ -1140,7 +1140,7 @@ rewrite_event_for_window (GdkEvent *event,
|
||||
{
|
||||
event = gdk_event_copy (event);
|
||||
|
||||
switch (event->type)
|
||||
switch ((guint) event->type)
|
||||
{
|
||||
case GDK_SCROLL:
|
||||
rewrite_events_translate (event->any.window,
|
||||
@ -1211,7 +1211,7 @@ rewrite_event_for_grabs (GdkEvent *event)
|
||||
GdkDisplay *display;
|
||||
GdkDevice *device;
|
||||
|
||||
switch (event->type)
|
||||
switch ((guint) event->type)
|
||||
{
|
||||
case GDK_SCROLL:
|
||||
case GDK_BUTTON_PRESS:
|
||||
@ -1307,6 +1307,9 @@ get_virtual_notify_type (GdkNotifyType notify_type)
|
||||
return GDK_NOTIFY_VIRTUAL;
|
||||
case GDK_NOTIFY_NONLINEAR:
|
||||
return GDK_NOTIFY_NONLINEAR_VIRTUAL;
|
||||
case GDK_NOTIFY_VIRTUAL:
|
||||
case GDK_NOTIFY_NONLINEAR_VIRTUAL:
|
||||
case GDK_NOTIFY_UNKNOWN:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return GDK_NOTIFY_UNKNOWN;
|
||||
@ -1441,7 +1444,7 @@ gtk_synthesize_crossing_events (GtkWindow *toplevel,
|
||||
static gboolean
|
||||
is_pointing_event (GdkEvent *event)
|
||||
{
|
||||
switch (event->type)
|
||||
switch ((guint) event->type)
|
||||
{
|
||||
case GDK_MOTION_NOTIFY:
|
||||
case GDK_ENTER_NOTIFY:
|
||||
@ -1485,7 +1488,7 @@ handle_pointing_event (GdkEvent *event)
|
||||
|
||||
sequence = gdk_event_get_event_sequence (event);
|
||||
|
||||
switch (event->type)
|
||||
switch ((guint) event->type)
|
||||
{
|
||||
case GDK_LEAVE_NOTIFY:
|
||||
if (event->crossing.mode == GDK_CROSSING_GRAB ||
|
||||
@ -1842,6 +1845,9 @@ gtk_main_do_event (GdkEvent *event)
|
||||
case GDK_DROP_START:
|
||||
_gtk_drag_dest_handle_event (event_widget, event);
|
||||
break;
|
||||
case GDK_SETTING:
|
||||
case GDK_OWNER_CHANGE:
|
||||
case GDK_EVENT_LAST:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
|
@ -1128,7 +1128,7 @@ gtk_menu_window_event (GtkWidget *window,
|
||||
g_object_ref (window);
|
||||
g_object_ref (menu);
|
||||
|
||||
switch (gdk_event_get_event_type (event))
|
||||
switch ((guint) gdk_event_get_event_type (event))
|
||||
{
|
||||
case GDK_WINDOW_STATE:
|
||||
/* Window for the menu has been closed by the display server or by GDK.
|
||||
@ -3609,7 +3609,7 @@ gtk_menu_captured_event (GtkWidget *widget,
|
||||
source_device = gdk_event_get_source_device (event);
|
||||
gdk_event_get_root_coords (event, &x_root, &y_root);
|
||||
|
||||
switch (gdk_event_get_event_type (event))
|
||||
switch ((guint) gdk_event_get_event_type (event))
|
||||
{
|
||||
case GDK_TOUCH_BEGIN:
|
||||
case GDK_BUTTON_PRESS:
|
||||
@ -4035,10 +4035,10 @@ get_horizontally_flipped_anchor (GdkGravity anchor)
|
||||
return GDK_GRAVITY_SOUTH;
|
||||
case GDK_GRAVITY_SOUTH_EAST:
|
||||
return GDK_GRAVITY_SOUTH_WEST;
|
||||
default:
|
||||
g_warning ("unknown GdkGravity: %d", anchor);
|
||||
return anchor;
|
||||
}
|
||||
|
||||
g_warning ("unknown GdkGravity: %d", anchor);
|
||||
return anchor;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -4450,7 +4450,10 @@ gtk_menu_move_current (GtkMenuShell *menu_shell,
|
||||
case GTK_MENU_DIR_PARENT:
|
||||
direction = GTK_MENU_DIR_CHILD;
|
||||
break;
|
||||
default: ;
|
||||
case GTK_MENU_DIR_NEXT:
|
||||
case GTK_MENU_DIR_PREV:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4634,7 +4637,7 @@ gtk_menu_real_move_scroll (GtkMenu *menu,
|
||||
gint end_position = get_menu_height (menu);
|
||||
GtkMenuShell *menu_shell = GTK_MENU_SHELL (menu);
|
||||
|
||||
switch (type)
|
||||
switch ((guint) type)
|
||||
{
|
||||
case GTK_SCROLL_PAGE_UP:
|
||||
case GTK_SCROLL_PAGE_DOWN:
|
||||
|
@ -632,7 +632,10 @@ gtk_menu_bar_move_current (GtkMenuShell *menu_shell,
|
||||
case GTK_MENU_DIR_NEXT:
|
||||
direction = GTK_MENU_DIR_PREV;
|
||||
break;
|
||||
default: ;
|
||||
case GTK_MENU_DIR_PARENT:
|
||||
case GTK_MENU_DIR_CHILD:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -264,6 +264,7 @@ popup_menu (GtkMenuButton *menu_button,
|
||||
|
||||
switch (gtk_widget_get_halign (priv->menu))
|
||||
{
|
||||
default:
|
||||
case GTK_ALIGN_FILL:
|
||||
case GTK_ALIGN_START:
|
||||
case GTK_ALIGN_BASELINE:
|
||||
@ -298,6 +299,7 @@ popup_menu (GtkMenuButton *menu_button,
|
||||
|
||||
switch (gtk_widget_get_halign (priv->menu))
|
||||
{
|
||||
default:
|
||||
case GTK_ALIGN_FILL:
|
||||
case GTK_ALIGN_START:
|
||||
case GTK_ALIGN_BASELINE:
|
||||
@ -327,6 +329,7 @@ popup_menu (GtkMenuButton *menu_button,
|
||||
|
||||
switch (gtk_widget_get_valign (priv->menu))
|
||||
{
|
||||
default:
|
||||
case GTK_ALIGN_FILL:
|
||||
case GTK_ALIGN_START:
|
||||
case GTK_ALIGN_BASELINE:
|
||||
@ -356,6 +359,7 @@ popup_menu (GtkMenuButton *menu_button,
|
||||
|
||||
switch (gtk_widget_get_valign (priv->menu))
|
||||
{
|
||||
default:
|
||||
case GTK_ALIGN_FILL:
|
||||
case GTK_ALIGN_START:
|
||||
case GTK_ALIGN_BASELINE:
|
||||
@ -384,6 +388,9 @@ popup_menu (GtkMenuButton *menu_button,
|
||||
NULL);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
gtk_menu_popup_at_widget (GTK_MENU (priv->menu),
|
||||
@ -593,6 +600,8 @@ set_arrow_type (GtkImage *image,
|
||||
case GTK_ARROW_RIGHT:
|
||||
gtk_image_set_from_icon_name (image, "pan-end-symbolic", GTK_ICON_SIZE_BUTTON);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -960,6 +969,8 @@ update_popover_direction (GtkMenuButton *menu_button)
|
||||
case GTK_ARROW_RIGHT:
|
||||
gtk_popover_set_position (GTK_POPOVER (priv->popover), GTK_POS_RIGHT);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1351,6 +1351,7 @@ popped_up_cb (GtkMenu *menu,
|
||||
break;
|
||||
|
||||
case GTK_DIRECTION_RIGHT:
|
||||
default:
|
||||
menu_item->priv->submenu_direction = GTK_DIRECTION_LEFT;
|
||||
break;
|
||||
}
|
||||
@ -1425,6 +1426,7 @@ gtk_menu_item_real_popup_submenu (GtkWidget *widget,
|
||||
break;
|
||||
|
||||
case GTK_LEFT_RIGHT:
|
||||
default:
|
||||
if (parent_menu && GTK_IS_MENU_ITEM (parent_menu->priv->parent_menu_item))
|
||||
submenu_direction = GTK_MENU_ITEM (parent_menu->priv->parent_menu_item)->priv->submenu_direction;
|
||||
else
|
||||
@ -1451,6 +1453,7 @@ gtk_menu_item_real_popup_submenu (GtkWidget *widget,
|
||||
switch (submenu_direction)
|
||||
{
|
||||
case GTK_DIRECTION_RIGHT:
|
||||
default:
|
||||
g_object_set (priv->submenu,
|
||||
"rect-anchor-dx", horizontal_offset + parent_padding.right + menu_padding.left,
|
||||
NULL);
|
||||
|
@ -1413,6 +1413,9 @@ gtk_real_menu_shell_move_current (GtkMenuShell *menu_shell,
|
||||
if (!had_selection && !priv->active_menu_item && priv->children)
|
||||
gtk_menu_shell_select_first (menu_shell, TRUE);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1214,6 +1214,9 @@ gtk_notebook_focus_tab (GtkNotebook *notebook,
|
||||
if (list)
|
||||
gtk_notebook_switch_focus_tab (notebook, list);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@ -1869,6 +1872,9 @@ gtk_notebook_get_preferred_tabs_size (GtkNotebook *notebook,
|
||||
tab_width = MAX (tab_width, page->requisition.width);
|
||||
tab_max = MAX (tab_max, page->requisition.height);
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (gtk_widget_get_visible (page->tab_label))
|
||||
@ -2428,13 +2434,16 @@ get_drop_position (GtkNotebook *notebook)
|
||||
if (allocation.x + allocation.width / 2 < x)
|
||||
return children;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case GTK_POS_LEFT:
|
||||
case GTK_POS_RIGHT:
|
||||
if (allocation.y + allocation.height / 2 > y)
|
||||
return children;
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
|
||||
@ -3608,7 +3617,7 @@ gtk_notebook_focus (GtkWidget *widget,
|
||||
|
||||
if (old_focus_child == priv->action_widget[ACTION_WIDGET_START])
|
||||
{
|
||||
switch (effective_direction)
|
||||
switch ((guint) effective_direction)
|
||||
{
|
||||
case GTK_DIR_DOWN:
|
||||
return focus_child_in (notebook, GTK_DIR_TAB_FORWARD);
|
||||
@ -3619,7 +3628,7 @@ gtk_notebook_focus (GtkWidget *widget,
|
||||
case GTK_DIR_UP:
|
||||
return FALSE;
|
||||
default:
|
||||
switch (direction)
|
||||
switch ((guint) direction)
|
||||
{
|
||||
case GTK_DIR_TAB_FORWARD:
|
||||
if ((priv->tab_pos == GTK_POS_RIGHT || priv->tab_pos == GTK_POS_BOTTOM) &&
|
||||
@ -3630,12 +3639,13 @@ gtk_notebook_focus (GtkWidget *widget,
|
||||
return FALSE;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (old_focus_child == priv->action_widget[ACTION_WIDGET_END])
|
||||
{
|
||||
switch (effective_direction)
|
||||
switch ((guint) effective_direction)
|
||||
{
|
||||
case GTK_DIR_DOWN:
|
||||
return focus_child_in (notebook, GTK_DIR_TAB_FORWARD);
|
||||
@ -3646,7 +3656,7 @@ gtk_notebook_focus (GtkWidget *widget,
|
||||
case GTK_DIR_UP:
|
||||
return FALSE;
|
||||
default:
|
||||
switch (direction)
|
||||
switch ((guint) direction)
|
||||
{
|
||||
case GTK_DIR_TAB_FORWARD:
|
||||
return FALSE;
|
||||
@ -3657,12 +3667,13 @@ gtk_notebook_focus (GtkWidget *widget,
|
||||
return focus_tabs_in (notebook);
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (effective_direction)
|
||||
switch ((guint) effective_direction)
|
||||
{
|
||||
case GTK_DIR_TAB_BACKWARD:
|
||||
case GTK_DIR_UP:
|
||||
@ -3674,12 +3685,14 @@ gtk_notebook_focus (GtkWidget *widget,
|
||||
return FALSE;
|
||||
case GTK_DIR_TAB_FORWARD:
|
||||
return focus_action_in (notebook, last_action, direction);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (widget_is_focus) /* Focus was on tabs */
|
||||
{
|
||||
switch (effective_direction)
|
||||
switch ((guint) effective_direction)
|
||||
{
|
||||
case GTK_DIR_TAB_BACKWARD:
|
||||
return focus_action_in (notebook, first_action, direction);
|
||||
@ -3699,11 +3712,13 @@ gtk_notebook_focus (GtkWidget *widget,
|
||||
return focus_tabs_move (notebook, direction, STEP_PREV);
|
||||
case GTK_DIR_RIGHT:
|
||||
return focus_tabs_move (notebook, direction, STEP_NEXT);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else /* Focus was not on widget */
|
||||
{
|
||||
switch (effective_direction)
|
||||
switch ((guint) effective_direction)
|
||||
{
|
||||
case GTK_DIR_TAB_FORWARD:
|
||||
case GTK_DIR_DOWN:
|
||||
@ -3729,6 +3744,8 @@ gtk_notebook_focus (GtkWidget *widget,
|
||||
case GTK_DIR_LEFT:
|
||||
case GTK_DIR_RIGHT:
|
||||
return focus_child_in (notebook, direction);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4420,6 +4437,9 @@ gtk_notebook_snapshot_tabs (GtkGizmo *gizmo,
|
||||
case GTK_POS_RIGHT:
|
||||
step = STEP_PREV;
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4601,6 +4621,9 @@ gtk_notebook_allocate_arrows (GtkNotebook *notebook,
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4650,6 +4673,10 @@ gtk_notebook_tab_space (GtkNotebook *notebook,
|
||||
*tab_space += page->requisition.height;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
|
||||
if (!priv->scrollable)
|
||||
@ -4680,6 +4707,10 @@ gtk_notebook_tab_space (GtkNotebook *notebook,
|
||||
*tab_space = tabs_allocation->height;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4903,14 +4934,14 @@ get_allocate_at_bottom (GtkWidget *widget,
|
||||
else
|
||||
return (search_direction == STEP_NEXT);
|
||||
|
||||
break;
|
||||
case GTK_POS_RIGHT:
|
||||
case GTK_POS_LEFT:
|
||||
return (search_direction == STEP_PREV);
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@ -4939,7 +4970,6 @@ gtk_notebook_calculate_tabs_allocation (GtkNotebook *notebook,
|
||||
widget = GTK_WIDGET (notebook);
|
||||
tab_pos = get_effective_tab_pos (notebook);
|
||||
allocate_at_bottom = get_allocate_at_bottom (widget, direction);
|
||||
anchor = 0;
|
||||
|
||||
child_allocation = *allocation;
|
||||
|
||||
@ -4958,6 +4988,11 @@ gtk_notebook_calculate_tabs_allocation (GtkNotebook *notebook,
|
||||
child_allocation.y += allocation->height;
|
||||
anchor = child_allocation.y;
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
anchor = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
gtk_widget_get_own_allocation (priv->cur_page->tab_widget, &drag_allocation);
|
||||
@ -5094,7 +5129,10 @@ gtk_notebook_calculate_tabs_allocation (GtkNotebook *notebook,
|
||||
|
||||
child_allocation.y = anchor;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
|
||||
@ -5165,6 +5203,9 @@ gtk_notebook_calculate_tabs_allocation (GtkNotebook *notebook,
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -5192,6 +5233,9 @@ gtk_notebook_calculate_tabs_allocation (GtkNotebook *notebook,
|
||||
(allocate_at_bottom && priv->drag_window_y < anchor))
|
||||
priv->drag_window_y = anchor;
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5319,6 +5363,9 @@ gtk_notebook_calc_tabs (GtkNotebook *notebook,
|
||||
children = children->prev;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -5409,7 +5456,7 @@ gtk_notebook_page_select (GtkNotebook *notebook,
|
||||
{
|
||||
GtkNotebookPrivate *priv = notebook->priv;
|
||||
GtkNotebookPage *page;
|
||||
GtkDirectionType dir = GTK_DIR_DOWN; /* Quiet GCC */
|
||||
GtkDirectionType dir;
|
||||
GtkPositionType tab_pos = get_effective_tab_pos (notebook);
|
||||
|
||||
if (!priv->focus_tab)
|
||||
@ -5434,6 +5481,10 @@ gtk_notebook_page_select (GtkNotebook *notebook,
|
||||
case GTK_POS_RIGHT:
|
||||
dir = GTK_DIR_LEFT;
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
dir = GTK_DIR_DOWN;
|
||||
break;
|
||||
}
|
||||
|
||||
if (gtk_widget_child_focus (page->child, dir))
|
||||
@ -6242,6 +6293,9 @@ gtk_notebook_update_tab_pos (GtkNotebook *notebook)
|
||||
gtk_orientable_set_orientation (GTK_ORIENTABLE (priv->box), GTK_ORIENTATION_HORIZONTAL);
|
||||
gtk_orientable_set_orientation (GTK_ORIENTABLE (priv->header_widget), GTK_ORIENTATION_VERTICAL);
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
|
||||
update_node_ordering (notebook);
|
||||
|
@ -124,6 +124,9 @@ effective_align (GtkAlign align,
|
||||
return direction == GTK_TEXT_DIR_RTL ? GTK_ALIGN_END : GTK_ALIGN_START;
|
||||
case GTK_ALIGN_END:
|
||||
return direction == GTK_TEXT_DIR_RTL ? GTK_ALIGN_START : GTK_ALIGN_END;
|
||||
case GTK_ALIGN_FILL:
|
||||
case GTK_ALIGN_CENTER:
|
||||
case GTK_ALIGN_BASELINE:
|
||||
default:
|
||||
return align;
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ gtk_pad_controller_handle_event (GtkEventController *controller,
|
||||
return GDK_EVENT_PROPAGATE;
|
||||
}
|
||||
|
||||
switch (event_type)
|
||||
switch ((guint) event_type)
|
||||
{
|
||||
case GDK_PAD_BUTTON_PRESS:
|
||||
type = GTK_PAD_ACTION_BUTTON;
|
||||
|
@ -936,6 +936,8 @@ set_orientation (GtkPageSetupUnixDialog *dialog,
|
||||
case GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE:
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->reverse_landscape_radio), TRUE);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2346,6 +2346,8 @@ gtk_paned_move_handle (GtkPaned *paned,
|
||||
new_position = priv->max_position;
|
||||
break;
|
||||
|
||||
case GTK_SCROLL_NONE:
|
||||
case GTK_SCROLL_JUMP:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -761,8 +761,14 @@ pango_layout_get_line_before (PangoLayout *layout,
|
||||
start_index = 0;
|
||||
end_index = prev_line->start_index + prev_line->length;
|
||||
break;
|
||||
case ATK_TEXT_BOUNDARY_CHAR:
|
||||
case ATK_TEXT_BOUNDARY_WORD_START:
|
||||
case ATK_TEXT_BOUNDARY_WORD_END:
|
||||
case ATK_TEXT_BOUNDARY_SENTENCE_START:
|
||||
case ATK_TEXT_BOUNDARY_SENTENCE_END:
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -823,8 +829,14 @@ pango_layout_get_line_at (PangoLayout *layout,
|
||||
if (prev_line)
|
||||
start_index = prev_line->start_index + prev_line->length;
|
||||
break;
|
||||
case ATK_TEXT_BOUNDARY_CHAR:
|
||||
case ATK_TEXT_BOUNDARY_WORD_START:
|
||||
case ATK_TEXT_BOUNDARY_WORD_END:
|
||||
case ATK_TEXT_BOUNDARY_SENTENCE_START:
|
||||
case ATK_TEXT_BOUNDARY_SENTENCE_END:
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
break;
|
||||
}
|
||||
|
||||
found = TRUE;
|
||||
@ -887,8 +899,14 @@ pango_layout_get_line_after (PangoLayout *layout,
|
||||
start_index = end_index;
|
||||
end_index = line->start_index + line->length;
|
||||
break;
|
||||
case ATK_TEXT_BOUNDARY_CHAR:
|
||||
case ATK_TEXT_BOUNDARY_WORD_START:
|
||||
case ATK_TEXT_BOUNDARY_WORD_END:
|
||||
case ATK_TEXT_BOUNDARY_SENTENCE_START:
|
||||
case ATK_TEXT_BOUNDARY_SENTENCE_END:
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1004,6 +1022,10 @@ _gtk_pango_get_text_before (PangoLayout *layout,
|
||||
case ATK_TEXT_BOUNDARY_LINE_END:
|
||||
pango_layout_get_line_before (layout, boundary_type, offset, &start, &end);
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
|
||||
*start_offset = start;
|
||||
@ -1111,6 +1133,10 @@ _gtk_pango_get_text_after (PangoLayout *layout,
|
||||
case ATK_TEXT_BOUNDARY_LINE_END:
|
||||
pango_layout_get_line_after (layout, boundary_type, offset, &start, &end);
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
|
||||
*start_offset = start;
|
||||
@ -1210,6 +1236,10 @@ _gtk_pango_get_text_at (PangoLayout *layout,
|
||||
case ATK_TEXT_BOUNDARY_LINE_END:
|
||||
pango_layout_get_line_at (layout, boundary_type, offset, &start, &end);
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
|
||||
*start_offset = start;
|
||||
|
@ -1230,6 +1230,8 @@ set_button_image_get_info_cb (GCancellable *cancellable,
|
||||
g_set_object (&data->path_bar->priv->desktop_icon, icon);
|
||||
break;
|
||||
|
||||
case NORMAL_BUTTON:
|
||||
case ROOT_BUTTON:
|
||||
default:
|
||||
break;
|
||||
};
|
||||
@ -1309,6 +1311,8 @@ set_button_image (GtkPathBar *path_bar,
|
||||
set_button_image_get_info_cb,
|
||||
data);
|
||||
break;
|
||||
|
||||
case NORMAL_BUTTON:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -516,6 +516,7 @@ special_directory_get_gicon (GUserDirectory directory)
|
||||
ICON_CASE (TEMPLATES);
|
||||
ICON_CASE (VIDEOS);
|
||||
|
||||
case G_USER_N_DIRECTORIES:
|
||||
default:
|
||||
return g_themed_icon_new_with_default_fallbacks (ICON_NAME_FOLDER);
|
||||
}
|
||||
|
@ -1180,6 +1180,8 @@ gtk_popover_update_position (GtkPopover *popover)
|
||||
case GTK_POS_RIGHT:
|
||||
rect.x -= priv->transition_diff;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
_gtk_window_set_popover_position (priv->window, widget,
|
||||
@ -1363,6 +1365,8 @@ gtk_popover_size_allocate (GtkWidget *widget,
|
||||
child_alloc.x += TAIL_HEIGHT;
|
||||
child_alloc.y += TAIL_HEIGHT / 2;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
gtk_widget_size_allocate (priv->contents_widget, &child_alloc, -1, out_clip);
|
||||
|
@ -648,6 +648,14 @@ combo_changed_cb (GtkWidget *combo,
|
||||
case GTK_PRINTER_OPTION_TYPE_PICKONE_REAL:
|
||||
filtered_val = filter_numeric (value, TRUE, TRUE, &changed);
|
||||
break;
|
||||
case GTK_PRINTER_OPTION_TYPE_BOOLEAN:
|
||||
case GTK_PRINTER_OPTION_TYPE_PICKONE:
|
||||
case GTK_PRINTER_OPTION_TYPE_PICKONE_PASSWORD:
|
||||
case GTK_PRINTER_OPTION_TYPE_PICKONE_STRING:
|
||||
case GTK_PRINTER_OPTION_TYPE_ALTERNATIVE:
|
||||
case GTK_PRINTER_OPTION_TYPE_STRING:
|
||||
case GTK_PRINTER_OPTION_TYPE_FILESAVE:
|
||||
case GTK_PRINTER_OPTION_TYPE_INFO:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -129,6 +129,9 @@ portal_start_page (GtkPrintOperation *op,
|
||||
case GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE:
|
||||
cairo_ps_surface_dsc_comment (op_portal->surface, "%%PageOrientation: Landscape");
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (type == CAIRO_SURFACE_TYPE_PDF)
|
||||
|
@ -103,6 +103,8 @@ unix_start_page (GtkPrintOperation *op,
|
||||
case GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE:
|
||||
cairo_ps_surface_dsc_comment (op_unix->surface, "%%PageOrientation: Landscape");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (type == CAIRO_SURFACE_TYPE_PDF)
|
||||
|
@ -324,8 +324,9 @@ preview_iface_is_selected (GtkPrintOperationPreview *preview,
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -29,6 +29,7 @@ _gtk_print_convert_to_mm (gdouble len,
|
||||
return len;
|
||||
case GTK_UNIT_INCH:
|
||||
return len * MM_PER_INCH;
|
||||
case GTK_UNIT_NONE:
|
||||
default:
|
||||
g_warning ("Unsupported unit");
|
||||
/* Fall through */
|
||||
@ -48,6 +49,7 @@ _gtk_print_convert_from_mm (gdouble len,
|
||||
return len;
|
||||
case GTK_UNIT_INCH:
|
||||
return len / MM_PER_INCH;
|
||||
case GTK_UNIT_NONE:
|
||||
default:
|
||||
g_warning ("Unsupported unit");
|
||||
/* Fall through */
|
||||
|
@ -2219,7 +2219,7 @@ autoscroll_cb (GtkWidget *widget,
|
||||
step = gtk_adjustment_get_step_increment (adj);
|
||||
page = gtk_adjustment_get_page_increment (adj);
|
||||
|
||||
switch (priv->autoscroll_mode)
|
||||
switch ((guint) priv->autoscroll_mode)
|
||||
{
|
||||
case GTK_SCROLL_STEP_FORWARD:
|
||||
increment = step / AUTOSCROLL_FACTOR;
|
||||
@ -2655,6 +2655,7 @@ gtk_range_scroll (GtkRange *range,
|
||||
break;
|
||||
|
||||
case GTK_SCROLL_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -827,6 +827,9 @@ gtk_recent_filter_filter (GtkRecentFilter *filter,
|
||||
if (rule->u.custom.func (filter_info, rule->u.custom.data))
|
||||
return TRUE;
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -556,6 +556,15 @@ gtk_recent_manager_monitor_changed (GFileMonitor *monitor,
|
||||
gdk_threads_leave ();
|
||||
break;
|
||||
|
||||
case G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT:
|
||||
case G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED:
|
||||
case G_FILE_MONITOR_EVENT_PRE_UNMOUNT:
|
||||
case G_FILE_MONITOR_EVENT_UNMOUNTED:
|
||||
case G_FILE_MONITOR_EVENT_MOVED:
|
||||
case G_FILE_MONITOR_EVENT_RENAMED:
|
||||
case G_FILE_MONITOR_EVENT_MOVED_IN:
|
||||
case G_FILE_MONITOR_EVENT_MOVED_OUT:
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -682,6 +682,10 @@ gtk_css_style_render_frame_gap (GtkCssStyle *style,
|
||||
wc = border_width;
|
||||
hc = MAX (xy1_gap - xy0_gap - 2 * border_width, 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
|
||||
cairo_clip_extents (cr, &x0, &y0, &x1, &y1);
|
||||
|
@ -333,14 +333,19 @@ gtk_revealer_get_child_allocation (GtkRevealer *revealer,
|
||||
|
||||
switch (transition)
|
||||
{
|
||||
case GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT:
|
||||
case GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT:
|
||||
child_allocation->x = - child_allocation->width * (1 - priv->current_pos);
|
||||
break;
|
||||
case GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN:
|
||||
case GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN:
|
||||
child_allocation->y = - child_allocation->height * (1 - priv->current_pos);
|
||||
break;
|
||||
|
||||
default: {}
|
||||
case GTK_REVEALER_TRANSITION_TYPE_NONE:
|
||||
case GTK_REVEALER_TRANSITION_TYPE_CROSSFADE:
|
||||
case GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT:
|
||||
case GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1316,6 +1316,9 @@ gtk_scale_get_range_border (GtkRange *range,
|
||||
case GTK_POS_BOTTOM:
|
||||
border->bottom += value_size;
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2872,6 +2872,8 @@ gtk_scrolled_window_scroll_child (GtkScrolledWindow *scrolled_window,
|
||||
case GTK_SCROLL_START:
|
||||
case GTK_SCROLL_END:
|
||||
break;
|
||||
case GTK_SCROLL_NONE:
|
||||
case GTK_SCROLL_JUMP:
|
||||
default:
|
||||
g_warning ("Invalid scroll type %u for GtkScrolledWindow::scroll-child", scroll);
|
||||
return FALSE;
|
||||
@ -2916,6 +2918,16 @@ gtk_scrolled_window_scroll_child (GtkScrolledWindow *scrolled_window,
|
||||
case GTK_SCROLL_END:
|
||||
value = gtk_adjustment_get_upper (adjustment);
|
||||
break;
|
||||
case GTK_SCROLL_STEP_UP:
|
||||
case GTK_SCROLL_STEP_DOWN:
|
||||
case GTK_SCROLL_STEP_LEFT:
|
||||
case GTK_SCROLL_STEP_RIGHT:
|
||||
case GTK_SCROLL_PAGE_UP:
|
||||
case GTK_SCROLL_PAGE_DOWN:
|
||||
case GTK_SCROLL_PAGE_LEFT:
|
||||
case GTK_SCROLL_PAGE_RIGHT:
|
||||
case GTK_SCROLL_NONE:
|
||||
case GTK_SCROLL_JUMP:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
|
@ -1402,6 +1402,9 @@ gtk_settings_notify (GObject *object,
|
||||
case PROP_CURSOR_THEME_SIZE:
|
||||
settings_update_cursor_theme (settings);
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -240,7 +240,9 @@ update_icon_from_type (GtkShortcutsShortcut *self)
|
||||
icon = g_themed_icon_new ("gesture-swipe-right-symbolic");
|
||||
break;
|
||||
|
||||
default: ;
|
||||
case GTK_SHORTCUT_ACCELERATOR:
|
||||
case GTK_SHORTCUT_GESTURE:
|
||||
default:
|
||||
icon = NULL;
|
||||
break;
|
||||
}
|
||||
|
@ -1274,6 +1274,8 @@ gtk_spin_button_real_change_value (GtkSpinButton *spin,
|
||||
break;
|
||||
}
|
||||
|
||||
case GTK_SCROLL_NONE:
|
||||
case GTK_SCROLL_JUMP:
|
||||
default:
|
||||
g_warning ("Invalid scroll type %d for GtkSpinButton::change-value", scroll);
|
||||
break;
|
||||
|
@ -712,9 +712,23 @@ get_simple_transition_type (gboolean new_child_first,
|
||||
return new_child_first ? GTK_STACK_TRANSITION_TYPE_UNDER_RIGHT : GTK_STACK_TRANSITION_TYPE_OVER_LEFT;
|
||||
case GTK_STACK_TRANSITION_TYPE_OVER_RIGHT_LEFT:
|
||||
return new_child_first ? GTK_STACK_TRANSITION_TYPE_UNDER_LEFT : GTK_STACK_TRANSITION_TYPE_OVER_RIGHT;
|
||||
default: ;
|
||||
case GTK_STACK_TRANSITION_TYPE_SLIDE_UP:
|
||||
case GTK_STACK_TRANSITION_TYPE_SLIDE_DOWN:
|
||||
case GTK_STACK_TRANSITION_TYPE_OVER_UP:
|
||||
case GTK_STACK_TRANSITION_TYPE_OVER_DOWN:
|
||||
case GTK_STACK_TRANSITION_TYPE_UNDER_UP:
|
||||
case GTK_STACK_TRANSITION_TYPE_UNDER_DOWN:
|
||||
case GTK_STACK_TRANSITION_TYPE_NONE:
|
||||
case GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT:
|
||||
case GTK_STACK_TRANSITION_TYPE_SLIDE_RIGHT:
|
||||
case GTK_STACK_TRANSITION_TYPE_OVER_LEFT:
|
||||
case GTK_STACK_TRANSITION_TYPE_OVER_RIGHT:
|
||||
case GTK_STACK_TRANSITION_TYPE_UNDER_LEFT:
|
||||
case GTK_STACK_TRANSITION_TYPE_UNDER_RIGHT:
|
||||
case GTK_STACK_TRANSITION_TYPE_CROSSFADE:
|
||||
default:
|
||||
return transition_type;
|
||||
}
|
||||
return transition_type;
|
||||
}
|
||||
|
||||
static gint
|
||||
@ -858,11 +872,28 @@ effective_transition_type (GtkStack *stack,
|
||||
return GTK_STACK_TRANSITION_TYPE_UNDER_RIGHT;
|
||||
case GTK_STACK_TRANSITION_TYPE_UNDER_RIGHT:
|
||||
return GTK_STACK_TRANSITION_TYPE_UNDER_LEFT;
|
||||
default: ;
|
||||
case GTK_STACK_TRANSITION_TYPE_SLIDE_UP:
|
||||
case GTK_STACK_TRANSITION_TYPE_SLIDE_DOWN:
|
||||
case GTK_STACK_TRANSITION_TYPE_OVER_UP:
|
||||
case GTK_STACK_TRANSITION_TYPE_OVER_DOWN:
|
||||
case GTK_STACK_TRANSITION_TYPE_UNDER_UP:
|
||||
case GTK_STACK_TRANSITION_TYPE_UNDER_DOWN:
|
||||
case GTK_STACK_TRANSITION_TYPE_NONE:
|
||||
case GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT_RIGHT:
|
||||
case GTK_STACK_TRANSITION_TYPE_SLIDE_UP_DOWN:
|
||||
case GTK_STACK_TRANSITION_TYPE_OVER_UP_DOWN:
|
||||
case GTK_STACK_TRANSITION_TYPE_OVER_DOWN_UP:
|
||||
case GTK_STACK_TRANSITION_TYPE_OVER_LEFT_RIGHT:
|
||||
case GTK_STACK_TRANSITION_TYPE_OVER_RIGHT_LEFT:
|
||||
case GTK_STACK_TRANSITION_TYPE_CROSSFADE:
|
||||
default:
|
||||
return transition_type;
|
||||
}
|
||||
}
|
||||
|
||||
return transition_type;
|
||||
else
|
||||
{
|
||||
return transition_type;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1847,7 +1878,7 @@ gtk_stack_snapshot_under (GtkWidget *widget,
|
||||
|
||||
pos_x = pos_y = 0;
|
||||
|
||||
switch (priv->active_transition_type)
|
||||
switch ((guint) priv->active_transition_type)
|
||||
{
|
||||
case GTK_STACK_TRANSITION_TYPE_UNDER_DOWN:
|
||||
y = 0;
|
||||
@ -1913,7 +1944,7 @@ gtk_stack_snapshot_slide (GtkWidget *widget,
|
||||
x = get_bin_window_x (stack);
|
||||
y = get_bin_window_y (stack);
|
||||
|
||||
switch (priv->active_transition_type)
|
||||
switch ((guint) priv->active_transition_type)
|
||||
{
|
||||
case GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT:
|
||||
x -= width;
|
||||
@ -2015,6 +2046,13 @@ gtk_stack_snapshot (GtkWidget *widget,
|
||||
case GTK_STACK_TRANSITION_TYPE_UNDER_RIGHT:
|
||||
gtk_stack_snapshot_under (widget, snapshot);
|
||||
break;
|
||||
case GTK_STACK_TRANSITION_TYPE_NONE:
|
||||
case GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT_RIGHT:
|
||||
case GTK_STACK_TRANSITION_TYPE_SLIDE_UP_DOWN:
|
||||
case GTK_STACK_TRANSITION_TYPE_OVER_UP_DOWN:
|
||||
case GTK_STACK_TRANSITION_TYPE_OVER_DOWN_UP:
|
||||
case GTK_STACK_TRANSITION_TYPE_OVER_LEFT_RIGHT:
|
||||
case GTK_STACK_TRANSITION_TYPE_OVER_RIGHT_LEFT:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
@ -4577,6 +4577,10 @@ _gtk_text_buffer_get_text_before (GtkTextBuffer *buffer,
|
||||
gtk_text_iter_forward_to_line_end (end);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4678,6 +4682,10 @@ _gtk_text_buffer_get_text_at (GtkTextBuffer *buffer,
|
||||
}
|
||||
gtk_text_iter_forward_to_line_end (end);
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4771,6 +4779,9 @@ _gtk_text_buffer_get_text_after (GtkTextBuffer *buffer,
|
||||
gtk_text_iter_forward_to_line_end (end);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1334,6 +1334,8 @@ start_element_handler (GMarkupParseContext *context,
|
||||
attribute_names, attribute_values,
|
||||
info, error);
|
||||
break;
|
||||
case STATE_ATTR:
|
||||
case STATE_PIXBUF:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
@ -1451,6 +1453,7 @@ end_element_handler (GMarkupParseContext *context,
|
||||
g_assert (peek_state (info) == STATE_APPLY_TAG ||
|
||||
peek_state (info) == STATE_TEXT);
|
||||
break;
|
||||
case STATE_START:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
@ -1493,13 +1496,9 @@ text_handler (GMarkupParseContext *context,
|
||||
peek_state (info) != STATE_APPLY_TAG)
|
||||
return;
|
||||
|
||||
switch (peek_state (info))
|
||||
if (peek_state (info) == STATE_TEXT ||
|
||||
peek_state (info) == STATE_APPLY_TAG)
|
||||
{
|
||||
case STATE_START:
|
||||
g_assert_not_reached (); /* gmarkup shouldn't do this */
|
||||
break;
|
||||
case STATE_TEXT:
|
||||
case STATE_APPLY_TAG:
|
||||
if (text_len == 0)
|
||||
return;
|
||||
|
||||
@ -1508,10 +1507,6 @@ text_handler (GMarkupParseContext *context,
|
||||
span->tags = g_slist_copy (info->tag_stack);
|
||||
|
||||
info->spans = g_list_prepend (info->spans, span);
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1349,6 +1349,11 @@ set_para_values (GtkTextLayout *layout,
|
||||
case PANGO_DIRECTION_RTL :
|
||||
display->direction = GTK_TEXT_DIR_RTL;
|
||||
break;
|
||||
case PANGO_DIRECTION_LTR:
|
||||
case PANGO_DIRECTION_TTB_LTR:
|
||||
case PANGO_DIRECTION_TTB_RTL:
|
||||
case PANGO_DIRECTION_WEAK_LTR:
|
||||
case PANGO_DIRECTION_WEAK_RTL:
|
||||
default:
|
||||
display->direction = GTK_TEXT_DIR_LTR;
|
||||
break;
|
||||
@ -1411,6 +1416,7 @@ set_para_values (GtkTextLayout *layout,
|
||||
break;
|
||||
|
||||
case GTK_WRAP_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1998,7 +2004,7 @@ add_preedit_attrs (GtkTextLayout *layout,
|
||||
PangoAttribute *attr = tmp_list->data;
|
||||
GdkRGBA rgba;
|
||||
|
||||
switch (attr->klass->type)
|
||||
switch ((guint) attr->klass->type)
|
||||
{
|
||||
case PANGO_ATTR_FOREGROUND:
|
||||
convert_color (&rgba, (PangoAttrColor *)attr);
|
||||
@ -2583,6 +2589,7 @@ gtk_text_layout_get_line_display (GtkTextLayout *layout,
|
||||
switch (pango_layout_get_alignment (display->layout))
|
||||
{
|
||||
case PANGO_ALIGN_LEFT:
|
||||
default:
|
||||
break;
|
||||
case PANGO_ALIGN_CENTER:
|
||||
display->x_offset += excess / 2;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user