Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 3024ddd

Browse files
Use TRUE/FALSE consistently for gboolean values. (#54768)
Some code was using stbool true/false - use the gboolean values consistently.
1 parent 4ba4434 commit 3024ddd

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

shell/platform/linux/fl_accessible_text_field.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ static gboolean fl_accessible_text_field_set_caret_offset(AtkText* text,
387387
FlAccessibleTextField* self = FL_ACCESSIBLE_TEXT_FIELD(text);
388388

389389
perform_set_selection_action(self, offset, offset);
390-
return true;
390+
return TRUE;
391391
}
392392

393393
// Implements AtkText::get_n_selections.
@@ -435,11 +435,11 @@ static gboolean fl_accessible_text_field_add_selection(AtkText* text,
435435
FlAccessibleTextField* self = FL_ACCESSIBLE_TEXT_FIELD(text);
436436

437437
if (self->selection_base != self->selection_extent) {
438-
return false;
438+
return FALSE;
439439
}
440440

441441
perform_set_selection_action(self, start_offset, end_offset);
442-
return true;
442+
return TRUE;
443443
}
444444

445445
// Implements AtkText::remove_selection.
@@ -449,12 +449,12 @@ static gboolean fl_accessible_text_field_remove_selection(AtkText* text,
449449
FlAccessibleTextField* self = FL_ACCESSIBLE_TEXT_FIELD(text);
450450

451451
if (selection_num != 0 || self->selection_base == self->selection_extent) {
452-
return false;
452+
return FALSE;
453453
}
454454

455455
perform_set_selection_action(self, self->selection_extent,
456456
self->selection_extent);
457-
return true;
457+
return TRUE;
458458
}
459459

460460
// Implements AtkText::set_selection.
@@ -466,11 +466,11 @@ static gboolean fl_accessible_text_field_set_selection(AtkText* text,
466466
FlAccessibleTextField* self = FL_ACCESSIBLE_TEXT_FIELD(text);
467467

468468
if (selection_num != 0) {
469-
return false;
469+
return FALSE;
470470
}
471471

472472
perform_set_selection_action(self, start_offset, end_offset);
473-
return true;
473+
return TRUE;
474474
}
475475

476476
// Implements AtkEditableText::set_text_contents.

shell/platform/linux/fl_gnome_settings.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ static FlColorScheme fl_gnome_settings_get_color_scheme(FlSettings* settings) {
6464
}
6565

6666
static gboolean fl_gnome_settings_get_enable_animations(FlSettings* settings) {
67-
return true;
67+
return TRUE;
6868
}
6969

7070
static gboolean fl_gnome_settings_get_high_contrast(FlSettings* settings) {
71-
return false;
71+
return FALSE;
7272
}
7373

7474
static gdouble fl_gnome_settings_get_text_scaling_factor(FlSettings* settings) {

shell/platform/linux/fl_renderer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ gboolean fl_renderer_present_layers(FlRenderer* self,
398398
layers[0]->offset.x == 0 && layers[0]->offset.y == 0 &&
399399
(layers[0]->size.width != priv->target_width ||
400400
layers[0]->size.height != priv->target_height)) {
401-
return true;
401+
return TRUE;
402402
}
403403

404404
priv->had_first_frame = true;

shell/platform/linux/fl_settings_portal.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,25 +123,25 @@ static gboolean settings_portal_read(GDBusProxy* proxy,
123123
if (error->domain == G_DBUS_ERROR &&
124124
error->code == G_DBUS_ERROR_SERVICE_UNKNOWN) {
125125
g_debug("XDG desktop portal unavailable: %s", error->message);
126-
return false;
126+
return FALSE;
127127
}
128128

129129
if (error->domain == G_DBUS_ERROR &&
130130
error->code == G_DBUS_ERROR_UNKNOWN_METHOD) {
131131
g_debug("XDG desktop portal settings unavailable: %s", error->message);
132-
return false;
132+
return FALSE;
133133
}
134134

135135
g_critical("Failed to read XDG desktop portal settings: %s",
136136
error->message);
137-
return false;
137+
return FALSE;
138138
}
139139

140140
g_autoptr(GVariant) child = nullptr;
141141
g_variant_get(value, "(v)", &child);
142142
g_variant_get(child, "v", out);
143143

144-
return true;
144+
return TRUE;
145145
}
146146

147147
static void settings_portal_changed_cb(GDBusProxy* proxy,
@@ -282,7 +282,7 @@ gboolean fl_settings_portal_start(FlSettingsPortal* self, GError** error) {
282282
kPortalPath, kPortalSettings, nullptr, error);
283283

284284
if (self->dbus_proxy == nullptr) {
285-
return false;
285+
return FALSE;
286286
}
287287

288288
for (const FlSetting setting : kAllSettings) {

shell/platform/linux/fl_view_accessible.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ void fl_view_accessible_handle_update_semantics(
187187
}
188188
fl_accessible_node_set_children(parent, children);
189189

190-
return true;
190+
return TRUE;
191191
},
192192
self);
193193
}

0 commit comments

Comments
 (0)