GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Fri Jul 25, 2014 10:15 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Tutorial Glade 3 including Gtkfilechooser dialog
PostPosted: Fri Dec 28, 2012 10:31 am 
Offline
Familiar Face

Joined: Fri Sep 23, 2011 12:04 pm
Posts: 28
Is there somwhere a tutorial where I can learn how to create and use a file chooser dialog within Glade3.
It may be in C, C++ or Ada as these are the languages I can understand.
My problem is mainly retreving the File chooser dialog from the builder and after that opening the dialog.
At this moment when I retreve the element from the builder with a get_widget statement and typecasting
it as an filechooser dialog analog to the way it works with the parent window I try to use show_all, also analog
to the mainwindow my program quits when running outside a debugger program or hangs inside a debugger
program, in this case also the debugger program hangs. I am using Ada and the GNAT Programming studio.
The last also as debugger

L. Dries


Top
 Profile  
 
 Post subject: Re: Tutorial Glade 3 including Gtkfilechooser dialog
PostPosted: Sat Dec 29, 2012 1:00 am 
Offline
Never Seen the Sunlight

Joined: Thu Mar 24, 2011 2:10 pm
Posts: 328
Location: Sydney, Australia
Glade3 has a few tutorials around, the easiest to direct you to would be by users of this site Tadej http://blog.borovsak.si/ and Micah http://www.micahcarrick.com/gtk-glade-tutorial-part-1.html. I haven't noticed much in the way of dialog windows however.
It does implement gtkbuildable so you should be able to do it.
Is it just a glade problem (i.e. if you put in c code to directly create a GtkFileChooserDialog do you get any of the same errors?


Top
 Profile  
 
 Post subject: Re: Tutorial Glade 3 including Gtkfilechooser dialog
PostPosted: Mon Dec 31, 2012 9:59 am 
Offline
Familiar Face

Joined: Fri Sep 23, 2011 12:04 pm
Posts: 28
As I already said I am writing in Ada. I had a program written in Ada where I started the programming from a Glade 2 GUI. In ada that presents direct ADA code. In glade 3 it seems possible to change my user interface so I want to convert this program to one using Glade 3. The simple program I used worked but the moment I included a Gtk Filechooser Dialog, I get troubles connecting to that dialog, the problem occurs when applie the run statement for that dialog:
Code:
      if Run(File_Open_Dialog) = gtk_response_accept then
         FileName := To_Unbounded_String(Get_FileName(+File_Open_Dialog));

The program creates a legal address with the statement:
Code:
   File_Open_Dialog := Gtk_File_Chooser_Dialog(Get_Object(ConvertCtoAda_Init.Builder, "OpenFile_Dialog"));

I tried this last code also with Grt_Widget. Ada, which is very strict, accepts boyh codes and in both cases it returms a vlrgal pointer bit in the run styatement the program just hangs so bad that even must even end tyhe complete GNAT Programming Studio, as the In the debugger I no longer am able to interven (stop the program).

L. Dries


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group