Improvements and remodification on GTK+ and gtkdialog

What features/apps/bugfixes needed in a future Puppy
Post Reply
Message
Author
mistfire
Posts: 1411
Joined: Wed 05 Nov 2008, 00:35
Location: PH

Improvements and remodification on GTK+ and gtkdialog

#1 Post by mistfire »

Gtkdialog is good however the problem was there is no fixed-single a window (a window that has a close button only) and no window with title bar only. Not only that gtkdialog is poor on managing user control alignment and position but they are good in adjusting the position when the window changed size

Is there any hack to modify gtkdialog in order to create a form with a close button only o no close button at all? And also to add alignments on user controls?

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#2 Post by B.K. Johnson »

I'm not sure you are using "form" and "window" interchangeably. That said, you can obtain a window without a button using the no-buttons command. I have not tried it in a form.
[color=blue]B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM[/color]

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#3 Post by zigbert »

B.K. Johnson wrote:I'm not sure you are using "form" and "window" interchangeably. That said, you can obtain a window without a button using the no-buttons command. I have not tried it in a form.
Can you specify this...?

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#4 Post by B.K. Johnson »

@zigbert
I erred. :oops: It was not gtk, but yad I was thinking of. Like this:

Code: Select all

yad --title="Yad Message Box" --width=200 --height=150 --fixed --text="center" --skip-taskbar --window-icon="gtk-dialog-info" \
--text="<big><b>
This is a Yad message box
</b></big>" --no-buttons --timeout="3" 
[color=blue]B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM[/color]

mistfire
Posts: 1411
Joined: Wed 05 Nov 2008, 00:35
Location: PH

#5 Post by mistfire »

@B.K. Johnson forms and window are the same and interchangable. The buttons that I talked about was the control buttons (minimize, maximize and close)

@zigbert are you in charge in Gtkdialog here in puppy?

It is possible to produce a Gtkdialog windows like these (take a look at the title bars)?

Message box
Image

Dialog Window
Image

No Control Buttons on title bar
Image

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

Re: Improvements and remodification on GTK+ and gtkdialog

#6 Post by Geoffrey »

mistfire wrote:Gtkdialog is good however the problem was there is no fixed-single a window (a window that has a close button only) and no window with title bar only. Not only that gtkdialog is poor on managing user control alignment and position but they are good in adjusting the position when the window changed size

Is there any hack to modify gtkdialog in order to create a form with a close button only o no close button at all? And also to add alignments on user controls?

Code: Select all

<window resizable="false" skip_taskbar_hint="true" decorated="true">

Code: Select all

export MAIN_DIALOG='
<window icon-name="gtk-info" resizable="false" skip_taskbar_hint="true" decorated="true">
	<vbox>
	<hbox>
	<pixmap><input file stock="gtk-info"></input></pixmap> 
	<text><label>Do you really want to continue?</label></text>
	</hbox>
	<hbox homogeneous="true">
	<button ok></button>
	</hbox>
	</vbox>
</window>'

gtkdialog --program=MAIN_DIALOG
Attachments
close-only.jpg
(7.13 KiB) Downloaded 391 times
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

ebisu
Posts: 176
Joined: Wed 25 Sep 2013, 05:06

#7 Post by ebisu »

Geoffrey, what window manager are you using? JWM shows all control buttons.

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#8 Post by Geoffrey »

ebisu wrote:Geoffrey, what window manager are you using? JWM shows all control buttons.
XFCE, ah ok, the theme might be a problem too.
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#9 Post by zigbert »

mistfire wrote:@zigbert are you in charge in Gtkdialog here in puppy?
No, I don't think we have anyone in charge here. The gtkdialog code is moved to github
mistfire wrote:It is possible to produce a Gtkdialog windows like these (take a look at the title bars)?
Will you please show some example code? It would be great to learn this.

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

Re: Improvements and remodification on GTK+ and gtkdialog

#10 Post by zigbert »

Geoffrey wrote:

Code: Select all

<window resizable="false" skip_taskbar_hint="true" decorated="true">
I can't see any option describing buttons in the titlebar

skip_taskbar_hint="true" : Show app in the taskbar
decorated="true" : Show window decoration
resizable="false" : Do not allow user to resize the window

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

Re: Improvements and remodification on GTK+ and gtkdialog

#11 Post by Geoffrey »

zigbert wrote:I can't see any option describing buttons in the titlebar
Works with XFCE as it controls the decoration layout, if the window skips the taskbar then minimized icon is not shown,
like wise for the maximize button if the window can't be resized, it's dependent on the features of the WM.
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

ebisu
Posts: 176
Joined: Wed 25 Sep 2013, 05:06

Re: Improvements and remodification on GTK+ and gtkdialog

#12 Post by ebisu »

Geoffrey wrote:Works with XFCE as it controls the decoration layout, if the window skips the taskbar then minimized icon is not shown, like wise for the maximize button if the window can't be resized, it's dependent on the features of the WM.
It should primarily be dependent on the instructions of the application. Gtkdialog's skip_taskbar_hint="true" sets_NET_WM_STATE(ATOM) = _NET_WM_STATE_SKIP_TASKBAR and the WM skips the taskbar. If gtkdialog also wants to skip the minimize button and all other ways to minimize it should tell this to the WM and should not include _NET_WM_ACTION_MINIMIZE in the list of allowed actions, however gtkdialog does. It is not the job of the WM to interpret "skip taskbar" as "no minimize button" if the application allows _NET_WM_ACTION_MINIMIZE.

Geany does it better. Most dialogs skip the taskbar and show no minimize button. If you run xprop to check the window properties you can see that _NET_WM_ACTION_MINIMIZE is not in the list of allowed actions.

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

Re: Improvements and remodification on GTK+ and gtkdialog

#13 Post by Geoffrey »

@ebisu,

I installed slacko-6.3.2-uefi.iso to try jwm, the result I got was that all the buttons appeared and selecting the maximize sent
the gui to the top left of the screen with a reduced size, showing half of the OK button, selecting the minimized resulted in the gui disappearing from screen.

I don't normally use jwm, so I'm unfamiliar with it's settings, but it does seem to be the culprit.
X-Slacko 4.2 based on slacko-6.3.2 (32bit) works fine displaying decoration.
Attachments
close-only.jpg
(7.13 KiB) Downloaded 281 times
GUI.PNG
(5.63 KiB) Downloaded 295 times
MAX.PNG
(10.84 KiB) Downloaded 290 times
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#14 Post by MochiMoppel »

JWM's inability to maximize is the only fault I can find. I'm sure that it wasn't a priority to create window options when developing gtkdialog. Gtkdialog still lacks much more important features (and btw: YAD can't hide control buttons either), but it should be possible to add those features for anyone determined and able enough.

There is a work around when using JWM2.3. Newly introduced group options allow to suppress minimize,maximize and close functionality which also prevents the corresponding control buttons.

If this is not desirable for every gtkdialog then a unique window name should be set so that JWM's group filter can identify the dialog, e.g.

Code: Select all

gtkdialog --name=GtkNoButtons --program=MAIN_DIALOG
The group setting could look like this:

Code: Select all

<Group>
	<Name>GtkNoButtons</Name>
	<Option>nomin</Option>
	<Option>nomax</Option>
	<Option>noclose</Option>
</Group>
The result is very user-friendly. I like it when a dialog provides unambiguous choices:
Attachments
buttonless_gtkdialog_jwm2.3.png
(4.97 KiB) Downloaded 283 times

Post Reply