Re: GTK from assembly

2008-03-27 Thread Gabriele Greco
On 3/26/08, Jason Ward [EMAIL PROTECTED] wrote:

 It didn't work.
 was there something else I am supposed to do after I download this bundle.
 I
 do have the run-time installed since I installed Pidgin


Note that there is at least one version of Pidgin that installs a private
copy of GTK inside it's directory, so you cannot see it from your
application, install the full GTK+ bundle:

http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.12/gtk+-2.12.9-bundle.zip

And place your executable in the path where DLLs are.

If your assembler don't let you build executables maybe you should tell it
where to find GTK dlls or def files, I cannot tell you how to do that since
it's specific to your development enviroment, but you find all the
developers files in the package in the link.

-- 
Bye,
 Gabry
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GTK from assembly

2008-03-27 Thread Jason Ward
On Thu, Mar 27, 2008 at 1:58 PM, Gabriele Greco [EMAIL PROTECTED]
wrote:



 On 3/26/08, Jason Ward [EMAIL PROTECTED] wrote:
 
  It didn't work.
  was there something else I am supposed to do after I download this
  bundle. I
  do have the run-time installed since I installed Pidgin
 
 
 Note that there is at least one version of Pidgin that installs a private
 copy of GTK inside it's directory, so you cannot see it from your
 application, install the full GTK+ bundle:


 http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.12/gtk+-2.12.9-bundle.zip

 And place your executable in the path where DLLs are.

 If your assembler don't let you build executables maybe you should tell it
 where to find GTK dlls or def files, I cannot tell you how to do that since
 it's specific to your development enviroment, but you find all the
 developers files in the package in the link.

 --
 Bye,
  Gabry


Thanks this works perfectly
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Quitting an application

2008-03-27 Thread Sujith
Hi,

I am writing a music library manager and I have a small problem when 
terminating the application.
On starting the app, I scan a DB and load the tracks into a treeview.
When this is in progress, if the user closes the application, a segfault occurs
because gtk_main_quit() has been called and the scanning function tries to 
access
data structures that are no more. How do I synchronize between them ?

Any help is appreciated.

Sujith
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


GLib questions, GArray and GNode

2008-03-27 Thread Kaustubh Patil
Hi,

I am using glib (version 2.0) for developing some
applications. I have some questions about use of
Garray and GNode (G-n-ary tree).

1. Is it safe to return an initialized GArray * from a
function? e.g. copying garray array1 into garray
array2 and then returning pointer to array2.

2. For n-ary tree, is it possible to add strings
(static) as data?

3. Is it possible to add a structure as data in
n-ary-tree? If yes, how to the functions like
g_node_find work?

Thanks in advance,
Kaustubh



  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Quitting an application

2008-03-27 Thread Gabriele Greco

 I am writing a music library manager and I have a small problem when
 terminating the application.
 On starting the app, I scan a DB and load the tracks into a treeview.
 When this is in progress, if the user closes the application, a segfault
 occurs
 because gtk_main_quit() has been called and the scanning function tries to
 access
 data structures that are no more. How do I synchronize between them ?


Intercept the delete_event or modify the callback where you do the
gtk_main_quit() and insert there some thread sync code.

You should take care also when you add the rows to your Tree/ListStore if
you do that directly from the  thread that scans the db.

I suppose there is a thread since if there isn't one when you quit the main
loop nothing can crash it (except something you call after gtk_main()) :)

-- 
Bye,
 Gabry
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


How place correctly GtkVPaned separtor?

2008-03-27 Thread gege2061
Hello,

I want set position of GtkVPaned, but I don't understand when set
position attribut for separator correctly show when widget showing.

My new class (write in Vala) :

---
public class Valide.SmartVPaned : Gtk.VPaned
{
  private Gtk.HBox hbox;
  private Gtk.Widget child;
  private const int DEFAULT_SIZE = 700;

  [Callback]
  private void expande (Gtk.Button sender)
  {
if (this.child.visible == true)
{
  this.child.visible = false;
  sender.image = new Gtk.Image.from_stock (Gtk.STOCK_GO_UP,
Gtk.IconSize.SMALL_TOOLBAR);
  this.position = Window.get_instance ().default_height;
}
else
{
  this.child.visible = true;
  sender.image = new Gtk.Image.from_stock (Gtk.STOCK_GO_DOWN,
Gtk.IconSize.SMALL_TOOLBAR);
  this.position = this.DEFAULT_SIZE;
}
  }

  construct
  {
this.hbox = new Gtk.HBox (false, 0);

Gtk.VBox vbox = new Gtk.VBox (false, 0);
this.hbox.pack_start (vbox, false, false, 0);

Gtk.Button button = new Gtk.Button ();
button.relief = Gtk.ReliefStyle.NONE;
button.image = new Gtk.Image.from_stock (Gtk.STOCK_GO_DOWN,
Gtk.IconSize.SMALL_TOOLBAR);
button.clicked += this.expande;

vbox.pack_start (button, false, false, 0);
this.position = this.DEFAULT_SIZE;
  }

  public void show ()
  {
base.show ();
this.position = this.DEFAULT_SIZE;
  }

  public void add2 (Gtk.Widget child)
  {
this.child = child;
base.add2 (this.hbox);
this.hbox.pack_start (this.child, true, true, 0);
this.position = this.DEFAULT_SIZE;
  }
}
---

I set the default position at three locations:

   1. In widget constructor
   2. In show function
   3. In add2 function

But sepator appears on top. However, after show/hide, the separator
displays correctly.

Thanks in advance.
-- 
Nicolas Joseph

Responsable de la rubrique GTK+ de developpez.com

http://nicolasj.developpez.com
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list