Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

It has just been discovered that research causes cancer in rats.


devel / comp.lang.ada / Re: Gtk.Message_Dialog

SubjectAuthor
* Gtk.Message_DialogAdaMagica
`* Re: Gtk.Message_DialogDmitry A. Kazakov
 `* Re: Gtk.Message_DialogAdaMagica
  `* Re: Gtk.Message_DialogDmitry A. Kazakov
   `- Re: Gtk.Message_DialogMark Wilson

1
Gtk.Message_Dialog

<296e83e5-5855-4732-94ba-ed9c05f3dd6dn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5850&group=comp.lang.ada#5850

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a37:6253:: with SMTP id w80mr3636273qkb.237.1631109134075;
Wed, 08 Sep 2021 06:52:14 -0700 (PDT)
X-Received: by 2002:a25:2ccf:: with SMTP id s198mr4876593ybs.452.1631109133889;
Wed, 08 Sep 2021 06:52:13 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Wed, 8 Sep 2021 06:52:13 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=94.31.101.123; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf
NNTP-Posting-Host: 94.31.101.123
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <296e83e5-5855-4732-94ba-ed9c05f3dd6dn@googlegroups.com>
Subject: Gtk.Message_Dialog
From: christ-u...@t-online.de (AdaMagica)
Injection-Date: Wed, 08 Sep 2021 13:52:14 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 30
 by: AdaMagica - Wed, 8 Sep 2021 13:52 UTC

I need a two page message for a help button, so I have the callback

procedure Help (Self: access Gtk.Button.Gtk_Button_Record'Class) is
begin
Show ("Page 1");
Show ("Page 2");
end Help;

where

procedure Show (Message: Glib.UTF8_String) is
Dialog : Gtk.Message_Dialog.Gtk_Message_Dialog;
Response: Gtk.Dialog.Gtk_Response_Type;
begin
Gtk.Message_Dialog.Gtk_New (Dialog,
Parent => Parent,
Flags => Modal,
The_Type => Message_Info,
Buttons => Buttons_Close,
Message => Message);
Response := Gtk.Message_Dialog.Run (Dialog);
Gtk.Message_Dialog.Close (Dialog);
end Show;

The problem is: When the first dialog's Close button is pressed, the next page appears, but the first is not closed. When the second page's Close is pressed, the window disappers, but the first dialog window is still there. Only pressing the red cross on the window's right upper edge closes the dialog.

What's wrong with my code?

Re: Gtk.Message_Dialog

<shajap$20i$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5851&group=comp.lang.ada#5851

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!aioe.org!x6YkKUCkj2qHLwbKnVEeag.user.46.165.242.91.POSTED!not-for-mail
From: mail...@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: Gtk.Message_Dialog
Date: Wed, 8 Sep 2021 17:02:51 +0200
Organization: Aioe.org NNTP Server
Message-ID: <shajap$20i$1@gioia.aioe.org>
References: <296e83e5-5855-4732-94ba-ed9c05f3dd6dn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="2066"; posting-host="x6YkKUCkj2qHLwbKnVEeag.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Dmitry A. Kazakov - Wed, 8 Sep 2021 15:02 UTC

On 2021-09-08 15:52, AdaMagica wrote:
> I need a two page message for a help button, so I have the callback
>
> procedure Help (Self: access Gtk.Button.Gtk_Button_Record'Class) is
> begin
> Show ("Page 1");
> Show ("Page 2");
> end Help;
>
> where
>
> procedure Show (Message: Glib.UTF8_String) is
> Dialog : Gtk.Message_Dialog.Gtk_Message_Dialog;
> Response: Gtk.Dialog.Gtk_Response_Type;
> begin
> Gtk.Message_Dialog.Gtk_New (Dialog,
> Parent => Parent,
> Flags => Modal,
> The_Type => Message_Info,
> Buttons => Buttons_Close,
> Message => Message);
> Response := Gtk.Message_Dialog.Run (Dialog);
> Gtk.Message_Dialog.Close (Dialog);
> end Show;
>
> The problem is: When the first dialog's Close button is pressed, the next page appears, but the first is not closed. When the second page's Close is pressed, the window disappers, but the first dialog window is still there. Only pressing the red cross on the window's right upper edge closes the dialog.
>
> What's wrong with my code?

You must call Destroy on the dialog to kill its window.

P.S. Note, that when the object reference is "floating" you have to sink
it first before calling Destroy. However, in your case after Run all
references must be OK.

P.P.S. Modal dialogs is the root of all evil...

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: Gtk.Message_Dialog

<96a6354d-1d37-4f61-a984-aeca00b21bcen@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5852&group=comp.lang.ada#5852

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a37:6253:: with SMTP id w80mr4619142qkb.237.1631120994684;
Wed, 08 Sep 2021 10:09:54 -0700 (PDT)
X-Received: by 2002:a25:b782:: with SMTP id n2mr6422940ybh.159.1631120994532;
Wed, 08 Sep 2021 10:09:54 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Wed, 8 Sep 2021 10:09:54 -0700 (PDT)
In-Reply-To: <shajap$20i$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=94.31.101.123; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf
NNTP-Posting-Host: 94.31.101.123
References: <296e83e5-5855-4732-94ba-ed9c05f3dd6dn@googlegroups.com> <shajap$20i$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <96a6354d-1d37-4f61-a984-aeca00b21bcen@googlegroups.com>
Subject: Re: Gtk.Message_Dialog
From: christ-u...@t-online.de (AdaMagica)
Injection-Date: Wed, 08 Sep 2021 17:09:54 +0000
Content-Type: text/plain; charset="UTF-8"
 by: AdaMagica - Wed, 8 Sep 2021 17:09 UTC

Dmitry A. Kazakov schrieb am Mittwoch, 8. September 2021 um 17:02:52 UTC+2:
> You must call Destroy on the dialog to kill its window.
Thanks, Dmitry, that worked.
> P.P.S. Modal dialogs is the root of all evil...
Whar else would you recommend?

Re: Gtk.Message_Dialog

<shb1aa$14b4$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5853&group=comp.lang.ada#5853

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!x6YkKUCkj2qHLwbKnVEeag.user.46.165.242.91.POSTED!not-for-mail
From: mail...@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: Gtk.Message_Dialog
Date: Wed, 8 Sep 2021 21:01:32 +0200
Organization: Aioe.org NNTP Server
Message-ID: <shb1aa$14b4$1@gioia.aioe.org>
References: <296e83e5-5855-4732-94ba-ed9c05f3dd6dn@googlegroups.com>
<shajap$20i$1@gioia.aioe.org>
<96a6354d-1d37-4f61-a984-aeca00b21bcen@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="37220"; posting-host="x6YkKUCkj2qHLwbKnVEeag.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Dmitry A. Kazakov - Wed, 8 Sep 2021 19:01 UTC

On 2021-09-08 19:09, AdaMagica wrote:
> Dmitry A. Kazakov schrieb am Mittwoch, 8. September 2021 um 17:02:52 UTC+2:
>> You must call Destroy on the dialog to kill its window.
> Thanks, Dmitry, that worked.
>> P.P.S. Modal dialogs is the root of all evil...
> Whar else would you recommend?

Just common sense of ergonomic UI, because I am no expert in this.

I do not like dialogs because they cover other UI elements and require
switching user attention.

If I need some input field I usually reserve a place on the screen with
confirmation and cancel buttons. I try to implement
checking-while-typing when possible and not too annoying.

A confirmation/commit button is IMO preferable, however modern UIs tend
to commit changes as soon as the UI element loses the focus.

For settings I use tabbed views. They tend to grow out of any measure.
Not a perfect solution, but IMO much better than dialogs and in any case
better than tree views when you need to expand and collapse nodes
looking for a setting parameter.

Modal dialogs are OK for emergencies when continuation is absolutely
impossible without user intervention.

One of few advantages of GTK is that widgets and containers
automatically expand and shrink. One should use this feature and avoid
fixed sizes. The minimum widget size, e.g. of a label or edit field can
be set.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: Gtk.Message_Dialog

<5352af87-e7e4-4a5a-9a5e-d59ae547513en@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5870&group=comp.lang.ada#5870

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:620a:81c:: with SMTP id s28mr8945105qks.45.1631300095848;
Fri, 10 Sep 2021 11:54:55 -0700 (PDT)
X-Received: by 2002:a05:6902:1201:: with SMTP id s1mr13332750ybu.163.1631300095720;
Fri, 10 Sep 2021 11:54:55 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Fri, 10 Sep 2021 11:54:55 -0700 (PDT)
In-Reply-To: <shb1aa$14b4$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=80.194.57.154; posting-account=xS3LTwoAAAB3aeXopC8a-M58TGE8K6go
NNTP-Posting-Host: 80.194.57.154
References: <296e83e5-5855-4732-94ba-ed9c05f3dd6dn@googlegroups.com>
<shajap$20i$1@gioia.aioe.org> <96a6354d-1d37-4f61-a984-aeca00b21bcen@googlegroups.com>
<shb1aa$14b4$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5352af87-e7e4-4a5a-9a5e-d59ae547513en@googlegroups.com>
Subject: Re: Gtk.Message_Dialog
From: markwil...@wilsonnet.technology (Mark Wilson)
Injection-Date: Fri, 10 Sep 2021 18:54:55 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 21
 by: Mark Wilson - Fri, 10 Sep 2021 18:54 UTC

On Wednesday, September 8, 2021 at 8:01:35 PM UTC+1, Dmitry A. Kazakov wrote:
> On 2021-09-08 19:09, AdaMagica wrote:
> > Dmitry A. Kazakov schrieb am Mittwoch, 8. September 2021 um 17:02:52 UTC+2:

> I do not like dialogs because they cover other UI elements and require
> switching user attention.
>

Spot on in my view.

Modality, which a vast majority of dialogs are, are anathema to a good user experience.

Apple used to know this, once, but they've relented in the face of ever increasing costs of actually giving a shit. Windows, and Linux, well, ...

You'd think that the open source software community would take one (or three) steps back, look at the literature, look at the evidence, and change their ways.

They won't. Not enough $$ in it, sadly.

Rant over.

Cheers,
M

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor