Page 36 of 42
Posted: Mon 10 Dec 2012, 17:57
by thunor
@EDDIE_THE_HEAD
This is the order that gtkdialog creates and shows the widgets and this is gtkdialog code.
Code: Select all
#include <gtk/gtk.h>
/* Notes:
*
* Compile with:
*
* gcc menubar.c -o menubar `pkg-config --cflags --libs gtk+-2.0`
*
* Run it in a terminal and press CTRL+C to kill it */
int main(int argc, char *argv[])
{
GtkWidget *menubar;
GtkWidget *menubarmenuitem;
GtkWidget *menu;
GtkWidget *menuitem;
GtkWidget *window;
gtk_init(&argc, &argv);
menuitem = gtk_image_menu_item_new_from_stock("gtk-quit", NULL);
menu = gtk_menu_new();
gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
menubarmenuitem = gtk_menu_item_new_with_label("File");
gtk_menu_item_set_submenu(GTK_MENU_ITEM(menubarmenuitem), menu);
menubar = gtk_menu_bar_new();
gtk_menu_shell_append(GTK_MENU_SHELL(menubar), menubarmenuitem);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_container_add(GTK_CONTAINER(window), menubar);
gtk_widget_show(menuitem);
gtk_widget_show(menu);
gtk_widget_show(menubarmenuitem);
gtk_widget_show(menubar);
gtk_widget_show(window);
gtk_main();
return 0;
}
Try that although it's just a fraction of the gtkdialog code so it'll only demonstrate that you can see the menubar and menuitems. I personally can't go anywhere from here.
Regards,
Thunor
Posted: Mon 10 Dec 2012, 23:43
by thunor
@EDDIE_THE_HEAD
Actually there is one more thing: you can show and hide widgets with action functions so you can try this example:
Code: Select all
#!/bin/sh
echo '
<window window-position="1">
<vbox>
<menubar>
<menu label="_File" use-underline="true">
<menuitem stock-id="gtk-open">
<variable>OPEN</variable>
<action signal="show">echo showing OPEN</action>
<action signal="hide">echo hiding OPEN</action>
<action signal="realize">echo realizing OPEN</action>
</menuitem>
<menuitem stock-id="gtk-save">
<variable>SAVE</variable>
<action signal="show">echo showing SAVE</action>
<action signal="hide">echo hiding SAVE</action>
<action signal="realize">echo realizing SAVE</action>
</menuitem>
<menuitem stock-id="gtk-quit">
<variable>QUIT</variable>
<action signal="show">echo showing QUIT</action>
<action signal="hide">echo hiding QUIT</action>
<action signal="realize">echo realizing QUIT</action>
</menuitem>
<variable>FILE</variable>
<action signal="show">echo showing FILE</action>
<action signal="hide">echo hiding FILE</action>
<action signal="realize">echo realizing FILE</action>
</menu>
<variable>MENUBAR</variable>
<action signal="show">echo showing MENUBAR</action>
<action signal="hide">echo hiding MENUBAR</action>
<action signal="realize">echo realizing MENUBAR</action>
</menubar>
<button label="Show everything">
<action>show:OPEN</action>
<action>show:SAVE</action>
<action>show:QUIT</action>
<action>show:FILE</action>
<action>show:MENUBAR</action>
</button>
<button label="Hide everything">
<action>hide:OPEN</action>
<action>hide:SAVE</action>
<action>hide:QUIT</action>
<action>hide:FILE</action>
<action>hide:MENUBAR</action>
</button>
<button ok></button>
</vbox>
</window>
' | gtkdialog -s
Cheers,
Thunor
Posted: Wed 12 Dec 2012, 23:47
by thunor
November 16th r472 I connected-up the realize signal since it was half way there anyway but I experienced an instability later on because something was NULL that I wasn't expecting so I fixed it on November 30th r483, therefore I would recommend that if somebody has a version of gtkdialog that is r472 to r482 inclusive then they might want to consider upgrading to the latest version.
I'm all done with adding features to gtkdialog for the moment and am only hanging around making sure any potential problems are resolved, so what's in SVN now (r493) is pretty much what the next source package release is going to be although I'm trying to complete an example application before I release.
Regards,
Thunor
Posted: Thu 13 Dec 2012, 00:42
by 01micko
Thank you Thunor,
By the week's end I will build Slacko (5.3x and 5.4) gtkdialog packages for broader testing.
Posted: Thu 13 Dec 2012, 01:04
by don570
The more examples the better!!!
I'll make a pet package of the examples and post them on the
Murga forum.
I've already done this for version 8.2
http://www.murga-linux.com/puppy/viewto ... 0fabe201af
__________________________________________
Posted: Thu 13 Dec 2012, 22:32
by EDDIE_THE_HEAD
@Thunor
Thanks for everything. I haven't tried that C code you posted 'cause I've been occupied with other things and had no time to fix some issues in the virtual machine where I'm running Ubuntu. I believe that (the fact that I'm running it in VirtualBox) is the only difference in my setup, so it could certainly be the source of the problem. In fact, I've encountered much more trouble than I ever had when Ubuntu was my host OS.
I'll get back to you as soon as I can run the tests you suggested.
Cheers.
Posted: Sun 06 Jan 2013, 16:57
by thunor
Gtkdialog 0.8.3 Released
Changes:
* Solved the hidden widgets leaving artifacts at start-up problem.
* Added support for conditional actions with <action condition="type">.
* Added support for <variable export="false">VARNAME</variable>.
* Added button-press/release-event signals to comboboxentry's entry.
* Added support for break i.e. don't process any more actions.
* Connected-up the realize signal so that it can be used within actions.
* Refreshing markup in a text widget now works as expected.
* Added three new examples including the Pfeme emulator front-end.
* Fixed bashisms within examples where possible and made them portable.
* Fixed three examples.
http://code.google.com/p/gtkdialog/downloads/list
It's gone quiet so it must've matured by now
Thanks to everyone who assisted with testing.
If anyone's interested I've written an emulator front-end using gtkdialog called
Pfeme. I actually used a very small piece of perl code to
merge the times-played data into the games list and it's so fast! I really recommend taking a look at perl to manage the complex parts of your applications.
Regards,
Thunor
Posted: Thu 10 Jan 2013, 17:23
by frafa
Hi Thunor
HAPPY NEW YEAR 2013 :)
Thank you for this new version of gtkdialog,
I put the packages for Ubuntu/Debian Bits 32 and 64 provide a ...
It is here:
http://liveusb.info/tmp/gtkdialog-0.8.3/
Posted: Fri 11 Jan 2013, 01:11
by don570
I put the gtkdialog examples in an easy to install pet package
http://murga-linux.com/puppy/viewtopic.php?t=82059
__________________________________________________
Posted: Sun 03 Feb 2013, 13:08
by SFR
Hey Thunor et al
There's ambiguous behaviour of <spinbutton> when floating point values are in use.
Example 1:
Code: Select all
echo '<spinbutton range-step="0.01"></spinbutton>' | gtkdialog -s
works fine with English country settings (dot as a decimal separator), but fails with, eg. German (comma as separator).
Example 2:
Code: Select all
echo '<spinbutton range-step="0,01"></spinbutton>' | gtkdialog -s
and the situation is opposite.
Ref:
http://murga-linux.com/puppy/viewtopic. ... 587#681587
http://murga-linux.com/puppy/viewtopic. ... 138#682138 (last sentence)
Is there anything what can be done about it, or the only way is to determine which type of decimal separator is in use (btw, what's the best way to do so?), before I export the GUI?
Thanks & Greetings!
Posted: Mon 04 Feb 2013, 21:32
by thunor
@SFR: Read from
here onwards. Argolance (French user) I believe solves it 8 posts later.
Basically the decimal mark requires internationalising within your script.
Regards,
Thunor
Posted: Mon 04 Feb 2013, 23:11
by SFR
Thanks!
In the meantime I made up an alternative (not extensively tested), "dirty" method based on printf error:
Code: Select all
[ "`printf %.1f 1.1 2> /dev/null`" = "1.1" ] && echo "DOT" || echo "COMMA"
however
Argolance's looks more elegant.
Thanks again & Greetings!
Posted: Fri 22 Feb 2013, 10:24
by simargl
.
Posted: Mon 25 Feb 2013, 12:18
by thunor
simargl wrote:Hello,
Are there plans for gtkdialog to support GTK3?
I want to use gtk3 (3.6) in next release of ArchPup
http://www.murga-linux.com/puppy/viewtopic.php?t=84353 and currently
only 3 applications - gtkdialog, geany, firefox - require keeping GTK2.
Kind regard
This is on the to-do list but I'll need to install a GKT+ 3 distro and I've become accustomed to downloading a puppy ISO and extracting the few files necessary, so if it involves burning an oversized ISO image then I'll have to locate my sole CD-RW disc packed away in one of my boxes which likely won't be oversized enough anyway.
Maybe it's as simple as changing the gtk+ and gthread version numbers in configure.in and running ./autogen.sh? I doubt it but it's the first thing I would do.
Regards,
Thunor
Posted: Mon 25 Feb 2013, 13:11
by simargl
.
Posted: Mon 25 Feb 2013, 14:57
by thunor
I've found
Mageia 2 which uses gtk+ 3.6.2 on a 671MB live CD so I'll dig out my CD-RW over the next few days and partition/install/set-up etc. I'm sure ArchPup is really nice but for me it makes sense to develop on a mainstream distro that is ready to go.
Leave it with me, it'll take some time to get just the development environment running but it
might be pretty straightforward after that.
Regards,
Thunor
Posted: Sun 03 Mar 2013, 02:20
by scsijon
@thunor, there is a mage2 puppy in next to final beta out, I'm awaiting a few retro fixes by the mageia people before bringing the final beta out, if it's any help.
The link is below!
Posted: Sun 03 Mar 2013, 21:43
by thunor
scsijon wrote:@thunor, there is a mage2 puppy in next to final beta out, I'm awaiting a few retro fixes by the mageia people before bringing the final beta out, if it's any help.
There's a Puppy ISO and DEVX which includes gtk+ 3 and all dependencies ready to go? If so can I have a link please.
I haven't had any luck yet installing a gtk+ 3 distro because my CD-RW was too small and I got a boot loader up from my SD card + reader but it failed after that so I think it has to be a flash drive. I'm not familiar with installing from SD/flash so I don't know.
I shall have to create another gtkdialog branch because I'll have to purge the code of all the deprecated stuff and widgets (combobox, comboboxentry, list, table) so once I'm up and running it could take some time to complete.
Regards,
Thunor
Posted: Mon 04 Mar 2013, 00:09
by 01micko
Thunor,
I don't know what dev box you are using but Slacko-5.5 is ready very soon. It's based on slackware-14.0 bins like 5.4 but with many bugs fixed. Min system requirements are a P3 900 with 512 RAM, unless you want to do a full install then that can be cut down a bit.
I have just constructed an sfs of
audacious which includes
gtk+3-3.4.4-i486-1.txz and all development headers and libraries plus .pc files, docs and demos.
http://www.smokey01.com/01micko/sfs_xz/ ... 1-i486.sfs 12M
checksum <-- 1b5c7ad0fa837a7bea1071a2610fd012 audacious-3.3.1-i486.sfs
Posted: Mon 04 Mar 2013, 08:09
by simargl
.