summaryrefslogtreecommitdiffstats
path: root/equipment.c
diff options
context:
space:
mode:
Diffstat (limited to 'equipment.c')
-rw-r--r--equipment.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/equipment.c b/equipment.c
index 2e41bf209..5485b2101 100644
--- a/equipment.c
+++ b/equipment.c
@@ -12,8 +12,8 @@
#include <stdlib.h>
#include <stdarg.h>
#include <time.h>
-#include <glib/gi18n.h>
-
+#include "gettext.h"
+#define QT_TR_NOOP(arg) arg
#include "dive.h"
#include "display.h"
#if USE_GTK_UI
@@ -186,7 +186,7 @@ static void set_weight_weight_spinbutton(struct ws_widget *ws_widget, int grams)
static GtkTreeIter *found_match = NULL;
static GtkTreeIter match_iter;
-static gboolean match_desc(GtkTreeModel *model, GtkTreePath *path,
+static bool match_desc(GtkTreeModel *model, GtkTreePath *path,
GtkTreeIter *iter, gpointer data)
{
int match;
@@ -492,7 +492,7 @@ void add_weightsystem_description(weightsystem_t *weightsystem)
#endif /* USE_GTK_UI */
-gboolean cylinder_nodata(cylinder_t *cyl)
+bool cylinder_nodata(cylinder_t *cyl)
{
return !cyl->type.size.mliter &&
!cyl->type.workingpressure.mbar &&
@@ -503,13 +503,13 @@ gboolean cylinder_nodata(cylinder_t *cyl)
!cyl->end.mbar;
}
-static gboolean cylinder_nosamples(cylinder_t *cyl)
+static bool cylinder_nosamples(cylinder_t *cyl)
{
return !cyl->sample_start.mbar &&
!cyl->sample_end.mbar;
}
-gboolean cylinder_none(void *_data)
+bool cylinder_none(void *_data)
{
cylinder_t *cyl = _data;
return cylinder_nodata(cyl) && cylinder_nosamples(cyl);
@@ -517,19 +517,19 @@ gboolean cylinder_none(void *_data)
/* descriptions are equal if they are both NULL or both non-NULL
and the same text */
-static gboolean description_equal(const char *desc1, const char *desc2)
+static bool description_equal(const char *desc1, const char *desc2)
{
return ((! desc1 && ! desc2) ||
(desc1 && desc2 && strcmp(desc1, desc2) == 0));
}
-gboolean weightsystem_none(void *_data)
+bool weightsystem_none(void *_data)
{
weightsystem_t *ws = _data;
return !ws->weight.grams && !ws->description;
}
-gboolean no_weightsystems(weightsystem_t *ws)
+bool no_weightsystems(weightsystem_t *ws)
{
int i;
@@ -539,13 +539,13 @@ gboolean no_weightsystems(weightsystem_t *ws)
return TRUE;
}
-static gboolean one_weightsystem_equal(weightsystem_t *ws1, weightsystem_t *ws2)
+static bool one_weightsystem_equal(weightsystem_t *ws1, weightsystem_t *ws2)
{
return ws1->weight.grams == ws2->weight.grams &&
description_equal(ws1->description, ws2->description);
}
-gboolean weightsystems_equal(weightsystem_t *ws1, weightsystem_t *ws2)
+bool weightsystems_equal(weightsystem_t *ws1, weightsystem_t *ws2)
{
int i;
@@ -601,7 +601,7 @@ static void *ws_ptr(struct dive *dive, int idx)
static void show_equipment(struct dive *dive, int max,
struct equipment_list *equipment_list,
void*(*ptr_function)(struct dive*, int),
- gboolean(*none_function)(void *),
+ bool(*none_function)(void *),
void(*set_one_function)(void*, GtkListStore*, GtkTreeIter *))
{
int i, used;
@@ -861,8 +861,8 @@ struct tank_info_t tank_info[100] = {
{ "HP130", .cuft = 130, .psi = 3442 },
/* Common European steel cylinders */
- { "3L 232 bar", .ml = 3000, .bar = 232 },
- { "3L 300 bar", .ml = 3000, .bar = 300 },
+ { "3L 232 bar", .ml = 3000, .bar = 232 },
+ { "3L 300 bar", .ml = 3000, .bar = 300 },
{ "10L 300 bar", .ml = 10000, .bar = 300 },
{ "12L 200 bar", .ml = 12000, .bar = 200 },
{ "12L 232 bar", .ml = 12000, .bar = 232 },
@@ -929,11 +929,11 @@ bad_tank_info:
* This is a bit odd as the weight system types don't usually encode weight
*/
struct ws_info_t ws_info[100] = {
- { N_("integrated"), 0 },
- { N_("belt"), 0 },
- { N_("ankle"), 0 },
- { N_("backplate weight"), 0 },
- { N_("clip-on"), 0 },
+ { QT_TR_NOOP("integrated"), 0 },
+ { QT_TR_NOOP("belt"), 0 },
+ { QT_TR_NOOP("ankle"), 0 },
+ { QT_TR_NOOP("backplate weight"), 0 },
+ { QT_TR_NOOP("clip-on"), 0 },
};
#if USE_GTK_UI