From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 8B2823858C2D for ; Sun, 6 Feb 2022 14:13:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8B2823858C2D Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-316-gFM_0q_SMxCG5Nm5bb56uw-1; Sun, 06 Feb 2022 09:13:04 -0500 X-MC-Unique: gFM_0q_SMxCG5Nm5bb56uw-1 Received: by mail-ed1-f70.google.com with SMTP id k5-20020a508ac5000000b00408dec8390aso6064995edk.13 for ; Sun, 06 Feb 2022 06:13:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rRQujnsq9O7MNAxKupVOyCZTDPb9bKJJOsIQGcAqMFY=; b=bge2we/OBBNjVE5DSM+KM3ieezoPa/bDViZk13q/AuM9stXL5K/8kUszshCUkkQVxg N3AbPOcEbXYG6HH0GMWM0VXj/+Mtdny8YMJDaq5PqhJsQstSgQC7ysOrxZXb2h0UhIaT QSwBW69pGT4UnMWxmOw1rk6a1yBPgCE0+1CMA9kOZuVUCEB4GnPAO2YaJwJfVlTDKoYl jUMil3h41bP22Bgmwyj1ED45yAcboEO+GQzPUHZGMjPK73wCvwQew7TrMpwhFtPgiqmG AgAGV31nknpa+4HgntJ/wJqwexClSg04Sr6aKcnCfUZA9s3l7GFaMvk6MTqsuOZKz4tq LYNw== X-Gm-Message-State: AOAM531ndhKJNqhXpz6uhYYB6h7xS59Rw7Ov4zOXek0oNApvef5kdoLl MAFgntMuHTLL7sttRgQkafiXtaXvPxwPiPT8nppkf+qk33w2m2ybp8TxFZBG5wZgXAfiKl5cOqY ME0u3WIbxzC3SGYeBIGBzvzUTzg4lVIku1PsqyWd9LYLLe92Uka6bXrpi8b5GjxJjiZgaL1XgXw == X-Received: by 2002:a17:907:724c:: with SMTP id ds12mr6528103ejc.203.1644156782315; Sun, 06 Feb 2022 06:13:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJyWjh40UZ+K4J9+J7kLunqKdhO67pjJNO/FGxfbyCWJiFrUhkIjjB7s1K8crdhW6DarpnyHrA== X-Received: by 2002:a17:907:724c:: with SMTP id ds12mr6528085ejc.203.1644156782071; Sun, 06 Feb 2022 06:13:02 -0800 (PST) Received: from localhost (92.40.178.36.threembb.co.uk. [92.40.178.36]) by smtp.gmail.com with ESMTPSA id y27sm624007ejd.19.2022.02.06.06.13.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Feb 2022 06:13:01 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv2 02/15] gdb/tui: rename tui_layout_base::adjust_size to ::set_height Date: Sun, 6 Feb 2022 14:12:40 +0000 Message-Id: X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Feb 2022 14:13:06 -0000 Rename tui_layout_base::adjust_size to tui_layout_base::set_height, the new name more accurately reflects what this member function does, and makes it easier for a later commit to add a new tui_layout_base::set_width member function. There should be no user visible changes after this commit. --- gdb/tui/tui-layout.c | 6 +++--- gdb/tui/tui-layout.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index f8388e3fca5..4c355c79d65 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -118,7 +118,7 @@ tui_apply_current_layout () void tui_adjust_window_height (struct tui_win_info *win, int new_height) { - applied_layout->adjust_size (win->name (), new_height); + applied_layout->set_height (win->name (), new_height); } /* Set the current layout to LAYOUT. */ @@ -570,7 +570,7 @@ tui_layout_split::set_weights_from_heights () /* See tui-layout.h. */ tui_adjust_result -tui_layout_split::adjust_size (const char *name, int new_height) +tui_layout_split::set_height (const char *name, int new_height) { /* Look through the children. If one is a layout holding the named window, we're done; or if one actually is the named window, @@ -579,7 +579,7 @@ tui_layout_split::adjust_size (const char *name, int new_height) for (int i = 0; i < m_splits.size (); ++i) { tui_adjust_result adjusted - = m_splits[i].layout->adjust_size (name, new_height); + = m_splits[i].layout->set_height (name, new_height); if (adjusted == HANDLED) return HANDLED; if (adjusted == FOUND) diff --git a/gdb/tui/tui-layout.h b/gdb/tui/tui-layout.h index b9a5d9b898d..acea7ac8f64 100644 --- a/gdb/tui/tui-layout.h +++ b/gdb/tui/tui-layout.h @@ -75,9 +75,9 @@ class tui_layout_base return nullptr; } - /* Adjust the size of the window named NAME to NEW_HEIGHT, updating + /* Set the height of the window named NAME to NEW_HEIGHT, updating the sizes of the other windows around it. */ - virtual tui_adjust_result adjust_size (const char *name, int new_height) = 0; + virtual tui_adjust_result set_height (const char *name, int new_height) = 0; /* Remove some windows from the layout, leaving the command window and the window being passed in here. */ @@ -127,7 +127,7 @@ class tui_layout_window : public tui_layout_base return m_contents.c_str (); } - tui_adjust_result adjust_size (const char *name, int new_height) override + tui_adjust_result set_height (const char *name, int new_height) override { return m_contents == name ? FOUND : NOT_FOUND; } @@ -192,7 +192,7 @@ class tui_layout_split : public tui_layout_base void apply (int x, int y, int width, int height) override; - tui_adjust_result adjust_size (const char *name, int new_height) override; + tui_adjust_result set_height (const char *name, int new_height) override; bool top_boxed_p () const override; -- 2.25.4