Improvements and remodification on GTK+ and gtkdialog
Improvements and remodification on GTK+ and gtkdialog
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?
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?
-
- Posts: 807
- Joined: Mon 12 Oct 2009, 17:11
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]
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]
-
- Posts: 807
- Joined: Mon 12 Oct 2009, 17:11
@zigbert
I erred. It was not gtk, but yad I was thinking of. Like this:
I erred. 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]
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]
@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
Dialog Window
No Control Buttons on title bar
@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
Dialog Window
No Control Buttons on title bar
Re: Improvements and remodification on GTK+ and gtkdialog
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]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
XFCE, ah ok, the theme might be a problem too.ebisu wrote:Geoffrey, what window manager are you using? JWM shows all control buttons.
[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]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
No, I don't think we have anyone in charge here. The gtkdialog code is moved to githubmistfire wrote:@zigbert are you in charge in Gtkdialog here in puppy?
Will you please show some example code? It would be great to learn this.mistfire wrote:It is possible to produce a Gtkdialog windows like these (take a look at the title bars)?
Re: Improvements and remodification on GTK+ and gtkdialog
I can't see any option describing buttons in the titlebarGeoffrey wrote:Code: Select all
<window resizable="false" skip_taskbar_hint="true" decorated="true">
skip_taskbar_hint="true" : Show app in the taskbar
decorated="true" : Show window decoration
resizable="false" : Do not allow user to resize the window
Re: Improvements and remodification on GTK+ and gtkdialog
Works with XFCE as it controls the decoration layout, if the window skips the taskbar then minimized icon is not shown,zigbert wrote:I can't see any option describing buttons in the titlebar
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]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
Re: Improvements and remodification on GTK+ and gtkdialog
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.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.
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.
Re: Improvements and remodification on GTK+ and gtkdialog
@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.
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]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
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.
The group setting could look like this:
The result is very user-friendly. I like it when a dialog provides unambiguous choices:
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
Code: Select all
<Group>
<Name>GtkNoButtons</Name>
<Option>nomin</Option>
<Option>nomax</Option>
<Option>noclose</Option>
</Group>
- Attachments
-
- buttonless_gtkdialog_jwm2.3.png
- (4.97 KiB) Downloaded 283 times