Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 24 May 2017, 07:51
All times are UTC - 4
 Forum index » Taking the Puppy out for a walk » Suggestions
Improvements and remodification on GTK+ and gtkdialog
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [14 Posts]  
Author Message
mistfire

Joined: 04 Nov 2008
Posts: 505
Location: PH

PostPosted: Sat 01 Oct 2016, 03:25    Post subject:  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?
Back to top
View user's profile Send private message 
B.K. Johnson

Joined: 12 Oct 2009
Posts: 544

PostPosted: Sat 01 Oct 2016, 10:24    Post subject:  

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.
_________________
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

Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 6415
Location: Valåmoen, Norway

PostPosted: Sat 01 Oct 2016, 11:44    Post subject:  

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...?
_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
B.K. Johnson

Joined: 12 Oct 2009
Posts: 544

PostPosted: Sat 01 Oct 2016, 12:16    Post subject:  

@zigbert
I erred. Embarassed It was not gtk, but yad I was thinking of. Like this:
Code:
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"

_________________
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

Back to top
View user's profile Send private message 
mistfire

Joined: 04 Nov 2008
Posts: 505
Location: PH

PostPosted: Sat 01 Oct 2016, 17:56    Post subject:  

@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
Back to top
View user's profile Send private message 
Geoffrey


Joined: 30 May 2010
Posts: 2265
Location: Queensland

PostPosted: Sat 01 Oct 2016, 22:10    Post subject: 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:
<window resizable="false" skip_taskbar_hint="true" decorated="true">


Code:
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
close-only.jpg
 Description   
 Filesize   7.13 KB
 Viewed   276 Time(s)

close-only.jpg


_________________
Carolina: Recent Repository Additions
Create strikethrough text HERE

Back to top
View user's profile Send private message 
ebisu

Joined: 25 Sep 2013
Posts: 173

PostPosted: Sun 02 Oct 2016, 00:10    Post subject:  

Geoffrey, what window manager are you using? JWM shows all control buttons.
Back to top
View user's profile Send private message 
Geoffrey


Joined: 30 May 2010
Posts: 2265
Location: Queensland

PostPosted: Sun 02 Oct 2016, 01:06    Post subject:  

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


XFCE, ah ok, the theme might be a problem too.

_________________
Carolina: Recent Repository Additions
Create strikethrough text HERE

Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 6415
Location: Valåmoen, Norway

PostPosted: Sun 02 Oct 2016, 04:37    Post subject:  

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.
_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 6415
Location: Valåmoen, Norway

PostPosted: Sun 02 Oct 2016, 04:42    Post subject: Re: Improvements and remodification on GTK+ and gtkdialog  

Geoffrey wrote:
Code:
<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

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
Geoffrey


Joined: 30 May 2010
Posts: 2265
Location: Queensland

PostPosted: Sun 02 Oct 2016, 05:27    Post subject: Re: Improvements and remodification on GTK+ and gtkdialog  

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.

_________________
Carolina: Recent Repository Additions
Create strikethrough text HERE

Back to top
View user's profile Send private message 
ebisu

Joined: 25 Sep 2013
Posts: 173

PostPosted: Sun 02 Oct 2016, 07:31    Post subject: Re: Improvements and remodification on GTK+ and gtkdialog  

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.
Back to top
View user's profile Send private message 
Geoffrey


Joined: 30 May 2010
Posts: 2265
Location: Queensland

PostPosted: Sun 02 Oct 2016, 16:31    Post subject: 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.
close-only.jpg
 Description   
 Filesize   7.13 KB
 Viewed   173 Time(s)

close-only.jpg

GUI.PNG
 Description   
 Filesize   5.63 KB
 Viewed   176 Time(s)

GUI.PNG

MAX.PNG
 Description   
 Filesize   10.84 KB
 Viewed   178 Time(s)

MAX.PNG


_________________
Carolina: Recent Repository Additions
Create strikethrough text HERE

Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1261
Location: Japan

PostPosted: Mon 03 Oct 2016, 01:03    Post subject:  

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:
gtkdialog --name=GtkNoButtons --program=MAIN_DIALOG

The group setting could look like this:
Code:
<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:
buttonless_gtkdialog_jwm2.3.png
 Description   
 Filesize   4.97 KB
 Viewed   145 Time(s)

buttonless_gtkdialog_jwm2.3.png

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [14 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Taking the Puppy out for a walk » Suggestions
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0650s ][ Queries: 15 (0.0064s) ][ GZIP on ]