summary refs log tree commit diff
path: root/src/libnmt-newt
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2024-01-25 09:46:18 +0100
committerMichael Biebl <biebl@debian.org>2024-01-25 09:46:18 +0100
commit70e18d99b8e3e77bb37e218d7ac582130156f8ef (patch)
treed40c587e6d3f0e094ff558e415f1bb9803643214 /src/libnmt-newt
parentd4d8b2b91f7ba000d97a8b2aab48c85000c11314 (diff)
New upstream version 1.45.90 upstream/1.45.90
Diffstat (limited to 'src/libnmt-newt')
-rw-r--r--src/libnmt-newt/nmt-newt-button-box.c4
-rw-r--r--src/libnmt-newt/nmt-newt-form.c4
-rw-r--r--src/libnmt-newt/nmt-newt-section.c2
-rw-r--r--src/libnmt-newt/nmt-newt-textbox.c2
-rw-r--r--src/libnmt-newt/nmt-newt-utils.c4
5 files changed, 8 insertions, 8 deletions
diff --git a/src/libnmt-newt/nmt-newt-button-box.c b/src/libnmt-newt/nmt-newt-button-box.c
index f3c8b27e..de17d5a8 100644
--- a/src/libnmt-newt/nmt-newt-button-box.c
+++ b/src/libnmt-newt/nmt-newt-button-box.c
@@ -218,12 +218,12 @@ size_request_buttons(NmtNewtButtonBox *bbox, GPtrArray *buttons, int *width, int
             *width += child_width;
             if (i > 0)
                 *width += 1;
-            *height = MAX(*height, child_height);
+            *height = NM_MAX(*height, child_height);
         } else {
             *height += child_height;
             if (i > 0)
                 *height += 1;
-            *width = MAX(*width, child_width);
+            *width = NM_MAX(*width, child_width);
         }
     }
 }
diff --git a/src/libnmt-newt/nmt-newt-form.c b/src/libnmt-newt/nmt-newt-form.c
index 6e0589cc..3565799c 100644
--- a/src/libnmt-newt/nmt-newt-form.c
+++ b/src/libnmt-newt/nmt-newt-form.c
@@ -182,9 +182,9 @@ nmt_newt_form_build(NmtNewtForm *form)
     newtGetScreenSize(&screen_width, &screen_height);
 
     if (!priv->fixed_width)
-        priv->width = MIN(form_width + 2 * priv->padding, screen_width - 2);
+        priv->width = NM_MIN(form_width + 2 * ((gint64) priv->padding), screen_width - 2);
     if (!priv->fixed_height)
-        priv->height = MIN(form_height + 2 * priv->padding, screen_height - 2);
+        priv->height = NM_MIN(form_height + 2 * ((gint64) priv->padding), screen_height - 2);
 
     if (!priv->fixed_x)
         priv->x = (screen_width - form_width) / 2;
diff --git a/src/libnmt-newt/nmt-newt-section.c b/src/libnmt-newt/nmt-newt-section.c
index eb551273..e0c404f0 100644
--- a/src/libnmt-newt/nmt-newt-section.c
+++ b/src/libnmt-newt/nmt-newt-section.c
@@ -249,7 +249,7 @@ nmt_newt_section_size_request(NmtNewtWidget *widget, int *width, int *height)
     nmt_newt_widget_size_request(priv->header, &priv->hwidth_req, &priv->hheight_req);
     nmt_newt_widget_size_request(priv->body, &priv->bwidth_req, &priv->bheight_req);
 
-    *width = MAX(priv->hwidth_req, priv->bwidth_req) + 2;
+    *width = NM_MAX(priv->hwidth_req, priv->bwidth_req) + 2;
     if (priv->open)
         *height = priv->hheight_req + priv->bheight_req + (priv->show_border ? 1 : 0);
     else
diff --git a/src/libnmt-newt/nmt-newt-textbox.c b/src/libnmt-newt/nmt-newt-textbox.c
index 24aae9f9..bf9b6a294 100644
--- a/src/libnmt-newt/nmt-newt-textbox.c
+++ b/src/libnmt-newt/nmt-newt-textbox.c
@@ -95,7 +95,7 @@ nmt_newt_textbox_set_text(NmtNewtTextbox *textbox, const char *text)
             priv->width = width;
     }
     g_free(lines);
-    priv->height = MIN(i, 1);
+    priv->height = NM_MIN(i, 1);
 
     g_object_notify(G_OBJECT(textbox), "text");
     nmt_newt_widget_needs_rebuild(NMT_NEWT_WIDGET(textbox));
diff --git a/src/libnmt-newt/nmt-newt-utils.c b/src/libnmt-newt/nmt-newt-utils.c
index 14825fab..8eeee202 100644
--- a/src/libnmt-newt/nmt-newt-utils.c
+++ b/src/libnmt-newt/nmt-newt-utils.c
@@ -65,7 +65,7 @@ nmt_newt_dialog_g_log_handler(const char    *log_domain,
      */
 
     newtGetScreenSize(&screen_width, &screen_height);
-    text = newtTextboxReflowed(-1, -1, full_message, MAX(70, screen_width - 10), 0, 0, 0);
+    text = newtTextboxReflowed(-1, -1, full_message, NM_MAX(70, screen_width - 10), 0, 0, 0);
     g_free(full_message);
 
     ok = newtButton(-1, -1, "OK");
@@ -282,7 +282,7 @@ nmt_newt_message_dialog(const char *message, ...)
  * Displays the given message in a dialog box with two buttons with
  * the indicated labels, and waits for the user to click one.
  *
- * Returns: which button was clicked: 0 for @button1 or 1 for @button2
+ * Returns: which button was clicked: 1 for @button1, 2 for @button2 or 0 otherwise
  */
 int
 nmt_newt_choice_dialog(const char *button1, const char *button2, const char *message, ...)