Re: Filechooserbuttons and gtk_widget_set_sensitive

2015-10-08 Thread Stefan Salewski
On Thu, 2015-10-08 at 14:04 +1030, Roger Matthews wrote:
> To someone willing to help,

Of course the file chooser example from the book of Andrew Krause does
not really open a file. What should it open? A Video, a picture, a text?
It shows you how you can get a file path, if I remember correctly. For a
text file, you may use that path and load the text in a textview. Maybe
that is shown in the book also.

gtk_widget_set_sensitive() should work.

And the example what you refer to, it may be this:

https://developer.gnome.org/gtk3/stable/ch01s04.html#id-1.2.3.12.5

Yes that is GTK3 application style using builder and XML files. I have
just made a Nim version from that. Does work fine, but I do not
understand all currently. Converting that into a version without builder
should be some hard work.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Filechooserbuttons and gtk_widget_set_sensitive

2015-10-07 Thread Roger Matthews
To someone willing to help,
 
 1) Following the example Listing 4.10 of the GTK+ Development book 
filechooserbuttons.c I have created a filechooser button and label, which are 
attached to a grid rather than a box. When clicked a "dialogue" appears, I can 
then navigate directories to the filtered files, highlight the selected files, 
but when double-clicked or press 'open', nothing happens. That is, the 
path/filename is displayed in the label and the selected filename is displayed 
in the button but the file is not opened. How do I open the file?
 
2) I would like to activate/de-activate spinbuttons depending on whether 
certain other selections have been made (with other integer spinbuttons). I 
have tried using gtk_widget_set_sensitive ( GtkWidget *widget, gboolean 
sensitive) but get compilation warning: unknown type name 'gtk_widget_set'. I'm 
using GTK3. Any clues? 
 
3) I've built a GUI coded in C without using a builder.ui file and would like 
to make it into a stand-alone application, preferably all 'hand' coded, how do 
I do this? I'm having difficulty following the example in the documentation 
because it uses a buider.ui file, I am unsure of the form of the main() format, 
and I can't locate 
https://git.gnome.org/browse/gtk+/tree/examples/application2/exampleappwin.c 
 
Thanks,
Roger Matthews
  
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list