Skip to content

gtk4: address review feedback from #1318 (setup logo, tab-view background, progress dialog) - #1329

Open
eaescob wants to merge 1 commit into
masterfrom
gtk4-review-fixes
Open

eaescob wants to merge 1 commit into
masterfrom
gtk4-review-fixes

Conversation

@eaescob

@eaescob eaescob commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Addresses @koeppea's review of the GTK4 interface (#1318). These fixes were
meant to ride along with #1320 but landed after that PR was merged, so here
they are as a standalone follow-up.

  • Redundant toastoverlay redeclaration — ec_gtk4_dialogs.c re-declared
    it extern even though ec_gtk4.h already does, producing a
    -Wredundant-decls warning. Removed.

  • Setup screen: missing logo / stray editable box — the setup screen was
    showing the message-log GtkTextView (which looks like an editable text
    box) instead of the ettercap logo. GTK3 shows the logo there and keeps the
    message log on the sniffing screen only. Fixed to match: the setup screen
    shows the logo under the setup form; the message log is created only on the
    sniffing screen (msgbuffer stays NULL until then, and gtkui_msg()
    already no-ops on a NULL buffer).

  • Background logo not replaced when opening a list — on the sniffing
    screen the logo was a sibling stacked above the tab view, so opening a list
    never replaced it. It is now an overlay on the tab view, shown only while
    the view has no pages (via notify::n-pages), so opening a list hides it.

  • Trying to measure GtkLabel … needs at least N during scan — the
    progress dialog set its title as both the AdwAlertDialog heading and a
    separate label; the duplicate, unwrapped label caused those warnings. The
    body now holds only the progress bar; the heading carries the title.

Only touches src/interfaces/gtk4/ (GTK3 untouched). Verified against the
tests/gtk4/ sandbox harness (5/5). A full GTK3-vs-GTK4 parity audit (menu
actions, context menus, header buttons, accelerators) is in #1320.


🤖 Generated with Claude Code

Fixes reported by @koeppea reviewing the merged GTK4 interface:

- ec_gtk4_dialogs.c redeclared `toastoverlay` extern even though ec_gtk4.h
  already declares it, producing a -Wredundant-decls warning. Removed.

- The setup screen showed a large message-log GtkTextView (which looked like
  an editable text box) and no ettercap logo. GTK3 shows the logo there and
  puts the message log only on the sniffing screen. The GTK4 setup screen now
  matches: it shows the logo under the setup form and no longer creates a
  message log (msgbuffer stays NULL until the sniffing screen, and
  gtkui_msg() already no-ops on a NULL buffer).

- On the sniffing screen the background logo was a sibling box child stacked
  above the tab view, so opening a list did not replace it. It is now an
  overlay on the tab view, shown only while the view has no pages (driven by
  notify::n-pages), so opening a list hides it.

- The scan progress dialog put the title in both the AdwAlertDialog heading
  and a separate GtkLabel; the duplicate unwrapped label triggered
  "Trying to measure GtkLabel ... needs at least N" warnings. The body now
  holds only the progress bar; the heading (which AdwAlertDialog wraps) is
  the title.

The application menu (Open/Save/Quit) was not dropped -- it is in the primary
"hamburger" menu in the header bar, alongside the Options submenu restored in
the previous commit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019BH79eFmKHXYo6dYnQLcep
@koeppea

koeppea commented Sep 19, 2026

Copy link
Copy Markdown
Member

This PR fixes the observations I reported in #1318
However I found some other topics, including a segfault, I'll make up a new issue for these observations.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants