GTK+tobac (Glade3 to FB code sketcher, GtkBuilder/libglade)

User projects written in or related to FreeBASIC.
TJF
Posts: 3473
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: GTK+tobac installer

Postby TJF » Dec 14, 2009 20:45

Here is my translation (hope I understand the context):

Code: Select all

  LangString TEXT_INSTTYPE1      
${LANG_GERMAN}      "Gesamt"
  LangString TEXT_INSTTYPE2         ${LANG_GERMAN}      "Minimal"
  LangString TEXT_FINISHPAGE_README   ${LANG_GERMAN}      "Zeige $(PRODUCT_README)"
  LangString TEXT_FINISHPAGE_START   ${LANG_GERMAN}      "Start ${PRODUCT_REGISTRY_KEY}"
  LangString DESC_SecCore         ${LANG_GERMAN}      "Programm Dateien."
  LangString DESC_SecGrpGTKp      ${LANG_GERMAN}      "GTK+ Dateien. Auswählen, wenn GTK+ noch nicht installiert ist."
  LangString DESC_SecGTKCore      ${LANG_GERMAN}      "Libraries für GTK+."
  LangString DESC_SecGTKGlade      ${LANG_GERMAN}      "Library für Glade3."
  LangString DESC_SecGTKMSW32Theme   ${LANG_GERMAN}      "Verwende aktuelles Windows-Thema als Applikationsthema."
  LangString DESC_SecGrpLic         ${LANG_GERMAN}      "Verschiedene Lizenzbestimmungen, die im Programm benutzt werden können."
  LangString DESC_SecLicGNUGPL3      ${LANG_GERMAN}      "Die aktuelle Version der General Public License."
  LangString DESC_SecLicGNUGPL2      ${LANG_GERMAN}      "Die populärste Version der General Public License."
  LangString DESC_SecLicGNULGPL21   ${LANG_GERMAN}      "Weniger einschränkende General Public License Version 3, verbreitet für Libraries."
  LangString DESC_SecLicGNULGPL2   ${LANG_GERMAN}      "Weniger einschränkende General Public License Version 2, verbreitet für Libraries."
  LangString DESC_SecLicBSD         ${LANG_GERMAN}      "BSD-Lizenz (weit verbreitet)."
  LangString DESC_SecLicZlib      ${LANG_GERMAN}      "Zlib-Lizenz (weit verbreitet)."
  LangString DESC_SecLicApache20   ${LANG_GERMAN}      "Apache-Lizenz."
  LangString DESC_SecLicFreeware   ${LANG_GERMAN}      "Eine gebräuchliche Lizenz für Freeware Programme."
Last edited by TJF on Dec 15, 2009 7:28, edited 1 time in total.
TJF
Posts: 3473
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Banner

Postby TJF » Dec 15, 2009 7:23

@Galeon: I like your pictures. Can you create a banner for the about dialog (width ~300 pixel and height ~100 pixel), please?
Galeon
Posts: 563
Joined: Apr 08, 2009 5:30
Location: Philippines
Contact:

Postby Galeon » Dec 22, 2009 13:19

Oh, that banner would be very large!
I'll try, maybe tomorrow, or the next time I got access to internet.
I will edit the images tonight for your program.
I also have some installers here, for Glade and GTK+. And you can have translations with these, but less space, only 15-30% of the original Glade installer. I already tried the German translation, and it works...
Galeon
Posts: 563
Joined: Apr 08, 2009 5:30
Location: Philippines
Contact:

Postby Galeon » Dec 22, 2009 13:33

Just wanted to ask: Why you're not using the license and credits buttons in the about box, but uses the space where the copyright and program description should go?
TJF
Posts: 3473
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Postby TJF » Dec 22, 2009 19:26

Galeon wrote:Just wanted to ask: Why you're not using the license and credits buttons in the about box, but uses the space where the copyright and program description should go?


If you're using the standard about dialog, GTK will cache this dialog in memory and you can not switch language for the dialog in cache. To perform a language change, you have to distroy the old dialog (at startup) and make a new one.

Just to save time, I decided to set only the main properties. Feel free to add in 'tobac/on_MnuInfo_activate.bas'.
TJF
Posts: 3473
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Postby TJF » Jan 06, 2010 16:11

Galeon wrote:Posted: Jan 06, 2010 10:53 (From topic: GTK+Headers) Post subject:
For the banner, I need to know what you want to have on it. I might be able to do it, but I'm not a good graphics designer :).


In graphic design you are much better than me!

You made a vertical banner for the installer. I like to have a horizontal version of this or something similar.
Galeon
Posts: 563
Joined: Apr 08, 2009 5:30
Location: Philippines
Contact:

Postby Galeon » Jan 08, 2010 10:08

Ok, I will try once I finished fixing my computer.
I already translated the installer, but I can't upload it.
TJF
Posts: 3473
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Version 2.2.0 released

Postby TJF » Mar 28, 2010 15:54

A new version of GTK+tobac2 is released, including binding for GTK version 2.18.6.

Details and download:
http://www.freebasic-portal.de/downloads/ressourcencompiler/gtktobac2-2-0-131.html

BR TJF
TJF
Posts: 3473
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Version 2.2.2 released

Postby TJF » Oct 24, 2010 11:07

The new version 2.2.2 of GTK+tobac2 is released, including binding for GTK version 2.22.0. It generates now matching callback routines (SUB/FUNCTION) with matching parameter lists for all known signals in GTK-2.22.0. The definitions are red from the new file data/Signals.def. Further signal definitions can be added easily by copying and paste the original text from the GTK docs.

Details and download:
http://www.freebasic-portal.de/download ... 0-131.html

Enjoy!
wallyg
Posts: 88
Joined: May 08, 2009 7:08
Location: Tucson Arizona

Question on FreeBasic warning and GTK+ 2.2

Postby wallyg » Oct 29, 2010 20:55

I have an involved glade 3.6.7 designed window and your 2.2.2 conversion.

I wanted to search a vbox which contains 18 entries by default to see if a specific button existed. After playing with different code, I reduced the problem to the following

Code: Select all

Sub GtkCallback1(g1 As GtkWidget PTR, s1 As gpointer)
      print *G_OBJECT_TYPE_NAME(g1)
End Sub
...

   gtk_init(@__FB_ARGC__, @__FB_ARGV__)    ' Start Gtk package
   gtk__XML = gtk_builder_new()
   gtk_builder_add_from_file(gtk__xml, "WSS.ui", @gtk__gerror)
 
#Include "mod/wss.bas"

    gtk_builder_connect_signals(gtk__xml, 0)
    gtk_widget_show_all(GTK_WIDGET(winMainWindow))
   
    Dim aaa As GtkCallback = @GtkCallback1
    Dim ss As gpointer
    gtk_container_foreach(GTK_CONTAINER( vboxMainWindow),aaa,ss)

    gtk_main()
    g_object_unref(gtk__xml)


I get the following message from the FreeBasic compile

[WSS.bas(128) warning 4(1): Suspicious pointer assignment] from the = @GtkCallback1] which points to the Dim aaa As GtkCallBack = @GtkCallback1 statement.

without the =@GtkCallback1 I get no warnings

If I run anyway, it prints 5 lines corresponding to the first 5 entries correctly and then does something and the system terminates and I get the standard windows message about reporting the error to Microsoft. No other error messages.

I was wondering if you see what stupid mistake I am making.
TJF
Posts: 3473
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Postby TJF » Oct 29, 2010 22:56

Hallo wallyg: thanks for your interest in GTK+tobac2!

wallyg wrote:I was wondering if you see what stupid mistake I am making.
Mistakes are stupid, if you make them twice, after learning an issue.

I wanted to search a vbox which contains 18 entries by default to see if a specific button existed. After playing with different code, I reduced the problem to the following

I do not realy understand your problem. There is no need 'to search a vbox'. GTK+tobac and GtkBuilder will search for you. Just name the widget in Glade3 and GTK+tobac generates a SHARED GObject PTR with the same name in FreeBasic (these references are build if the Glade3 standard widget name is changed).

BTW: Either you didn't use GTK+tobac2 yet or you changed the code a lot. It is recommended not to edit the GTK+tobac code unless you realy know what you are doing. Do only edit the marked spaces between the GTK+tobac2 blocks.

Ie your callback should look like:

Code: Select all

SUB GtkCallback1 CDECL ALIAS "GtkCallback1" (BYVAL g1 AS GtkWidget PTR, BYVAL s1 AS gpointer) EXPORT
  PRINT *G_OBJECT_TYPE_NAME(g1)
END SUB

Without CDECL and on win you won't get the right parameters and the result is described in the GTK docs for g_type_name:
... but randomized type IDs should not be passed in and will most likely lead to a crash.
Using the above callback, your error should not occur. (Please confirm.)
wallyg
Posts: 88
Joined: May 08, 2009 7:08
Location: Tucson Arizona

Postby wallyg » Oct 30, 2010 7:13

Thank you very much. It all seems to work now.

Again thank you for producing the FreeBasic version of GTK 2.22.

Do you know if a verison of Glade for 2.22 will produced or will the next version be for 3.0?
TJF
Posts: 3473
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Postby TJF » Oct 30, 2010 8:21

@wallyg:

Your wellcome! Thank you for asking and giving feedback!
TJF
Posts: 3473
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

GTK+tobac2.2.4

Postby TJF » Nov 04, 2010 11:33

New version GTK+tobac2.2.4 is released:
    * Signal generator bug fixed
    * header GTKGlExt-1.2_TJF.bi now included
    * header GTK-2.22.0_TJF.bi improved (BYVAL added, clean-ups)

Download:

http://www.freebasic-portal.de/downloads/ressourcencompiler/gtktobac2-2-0-131.html

Edit: I forgot to include the ReadMe.txt/LiesMich.txt files. (If needed, get them from GTK+tobac2.2.2.zip in the Alle Dateiversionen page.)
N3trunn3r
Posts: 92
Joined: Feb 14, 2008 15:48

Re: GTK+tobac2.2.4

Postby N3trunn3r » Feb 21, 2011 16:49

TJF wrote:New version GTK+tobac2.2.4 is released


I can't start it, it won't run! No error or cmd window whatsoever.
But version 2.0 works fine.

Heard in the chat that others had the same problem.

TJF Can you help?

Return to “Projects”

Who is online

Users browsing this forum: badidea, Kuan Hsu and 2 guests