Multiple post-activate signal

2009-03-24 Thread gege2061
Hello,

I use GtkUIManager and connect my main window on the 'post-activate' signal
to process the actions.

Sometimes the signal is sent twice.

My UIManager class:
http://code.google.com/p/valide/source/browse/trunk/libvalide/uimanager.vala

And the connection of the window:
http://code.google.com/p/valide/source/browse/trunk/libvalide/window.vala#77

What is the problem?

Thank's in advance.
-- 
Nicolas Joseph
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Multiple post-activate signal

2009-03-24 Thread gege2061
I found where the second signal is emited, but I can't block the emission of
the signal with this code:

Gtk.ToggleAction a;
unowned SListGtk.Widget list

a = UIManager.get_instance ()
  .get_action (view-start-page) as Gtk.ToggleAction;

list = a.get_proxies ();
foreach (Gtk.Widget proxy in list)
{
  a.block_activate_from (proxy);
  a.set_active (false);
  a.unblock_activate_from (proxy);
}


2009/3/24 gege2061 gege2...@redaction-developpez.com

 Hello,

 I use GtkUIManager and connect my main window on the 'post-activate' signal
 to process the actions.

 Sometimes the signal is sent twice.

 My UIManager class:
 http://code.google.com/p/valide/source/browse/trunk/libvalide/uimanager.vala

 And the connection of the window:
 http://code.google.com/p/valide/source/browse/trunk/libvalide/window.vala#77

 What is the problem?

 Thank's in advance.
 --
 Nicolas Joseph




-- 
Nicolas Joseph

Responsable de la rubrique GTK+ de developpez.com /
In charge of the GTK+ section on 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


Re: [win32] Spawning process : Invalid argument

2008-09-21 Thread gege2061
2008/9/19 Tor Lillqvist [EMAIL PROTECTED]

 Do you have gspawn-win32-helper.exe and
 gspawn-win32-helper-console.exe in your PATH, or in the bin folder
 under your GLib installation directory?


No, now, it's works fine.


 There is little reason to insist on using the g_spawn*() API in cases
 where a standard system() should work just as well, and be simpler.


In the vala language, I don't have system function. And g_spawn* is simpler
for get the output of a program.

Thank's.

-- 
Nicolas Joseph

Responsable de la rubrique GTK+ de developpez.com /
In charge of the GTK+ section on 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


[win32] Spawning process : Invalid argument

2008-09-19 Thread gege2061
Hello,

I have a specific MS Windows problem when I launch a process.

The code :

string command = %s  -n --sort=no --fields=-k-f-s-t+K+l+n -f - \%s\
   .printf (Config.VALIDE_CTAGS_EXEC, filename);
Process.spawn_command_line_sync (command, out output, null, null);

The command launched :

ctags-vala  -n --sort=no --fields=-k-f-s-t+K+l+n -f -
E:\msys\home\gsjz8662\valide\abstract-document.vala

And the error message :

** (valide.exe:3732): DEBUG: Could not execute ctags: L'exécution du
programme d'aide a échoué (Invalid argument)

I don't have this problem under Linux or when I launch this command in
Windows console :
E:\msys\home\gsjz8662\valide_bin\binctags-vala -n --sort=no
--fields=-k-f-s-t+K+l+n -f -
E:\msys\home\gsjz8662\valide\abstract-document.vala
DocumentState   E:\msys\home\gsjz8662\valide\abstract-document.vala
24;enumline:24 language:Vala
...

Have you an idea ?

Regards,
-- 
Nicolas Joseph

Responsable de la rubrique GTK+ de developpez.com /
In charge of the GTK+ section on 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


Wysiwyg text view for html ou xml

2008-05-17 Thread gege2061
Hello,

I'm looking for a widget for a wysiwyg XML editor (I have a XSL file,
therefore an HTML version will be ok).

Do you know where I can find it?

Thanks in advance.

-- 
Nicolas Joseph

Responsable de la rubrique GTK+ de developpez.com /
In charge of the GTK+ section on 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


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


Re: How create new GtkBin widget

2008-03-18 Thread gege2061
2008/3/17, Eduardo M KALINOWSKI [EMAIL PROTECTED]:
 Use a GtkNotebook with the tabs hidden. It works perfectly for that purpose.

This is generally what I use, but for fun I want test implement this
feature from to GtkBin.

-- 
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


How create new GtkBin widget

2008-03-17 Thread gege2061
Hello,

I would like create a new GtkBin widget, but this simple code (writen in
Vala) don't work (label don't show) :

using Gtk;

public class Gtk.StackContainer : Gtk.Bin
{
}

public class Test
{
  public static int main (string[] args)
  {
Gtk.init (ref args);
Gtk.Window win = new Gtk.Window (Gtk.WindowType.TOPLEVEL);
win.destroy += Gtk.main_quit;
Gtk.StackContainer stack = new Gtk.StackContainer ();
win.add (stack);
stack.add (new Gtk.Label (Label));
win.show_all ();
Gtk.main ();
return 0;
  }
}

Can you help me?

Regards,
-- 
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


Re: How create new GtkBin widget

2008-03-17 Thread gege2061
2008/3/17, Emmanuele Bassi [EMAIL PROTECTED]:
 a Bin is a specialised container that can contain just *one* child at a
  time.

I know, I would like create a container that can contain several
widgets but just one is showing (to simulate a superposition of
widgets).

  if you want to implement a container, subclass Gtk.Container and
  override the add, remove and forall handlers.

For the moment, the default behavior implemented by GtkBin satisfies me.

Thanks for your rapid answer.

Regards,
-- 
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


Re: GTK+ Windows dependancies

2008-01-31 Thread gege2061
I looked the gimp install directory and I found this files :

 - bin/*.dll
 - etc/gtk-2.0/gdk-pixbuf.loaders
 - etc/gtk-2.0/gtk.immodules
 - etc/gtk-2.0/gtkrc
 - etc/pango/pango.aliases
 - etc/pango/pango.modules
 - lib/gtk-2.0/2.10.0/engines/*
 - lib/gtk-2.0/2.10.0/immodules/*
 - lib/gtk-2.0/2.10.0/loaders/*
 - lib/locale/*
 - share/themes/*

The files are missing from the GTK+-2.12.6 binaries archive :

 - etc/gtk-2.0/gtkrc (optionnal)
 - lib/gtk-2.0/2.10.0/loaders/* (now - for the moment ? - include in dll)
 - lib/locale/* (move in share/)

It's better ?
-- 
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


GTK+ Windows dependancies

2008-01-30 Thread gege2061
Hello,

I use http://ricardo.ecn.wfu.edu/~cottrell/cross-gtk/#installer tutoriel for
create inno setup script file for GTK+, but some files no longer exist (GTK+
2.4.0).

DLL dependencies :

; GTK+ dependencies
 Source: C:\MinGW\bin\libcairo-2.dll; DestDir: {app}; Flags:
 ignoreversion
 Source: C:\MinGW\bin\libpangocairo-1.0-0.dll; DestDir: {app}; Flags:
 ignoreversion
 Source: C:\MinGW\bin\jpeg62.dll; DestDir: {app}; Flags: ignoreversion
 Source: C:\MinGW\bin\libtiff3.dll; DestDir: {app}; Flags:
 ignoreversion
 Source: C:\MinGW\bin\libpng13.dll; DestDir: {app}; Flags:
 ignoreversion
 Source: C:\MinGW\bin\zlib1.dll; DestDir: {app}; Flags: ignoreversion
 Source: C:\MinGW\bin\intl.dll; DestDir: {app}; Flags: ignoreversion
 Source: C:\MinGW\bin\libatk-1.0-0.dll; DestDir: {app}; Flags:
 ignoreversion
 Source: C:\MinGW\bin\libgdk_pixbuf-2.0-0.dll; DestDir: {app}; Flags:
 ignoreversion
 Source: C:\MinGW\bin\libgdk-win32-2.0-0.dll; DestDir: {app}; Flags:
 ignoreversion
 Source: C:\MinGW\bin\libglib-2.0-0.dll; DestDir: {app}; Flags:
 ignoreversion
 Source: C:\MinGW\bin\libgmodule-2.0-0.dll; DestDir: {app}; Flags:
 ignoreversion
 Source: C:\MinGW\bin\libgobject-2.0-0.dll; DestDir: {app}; Flags:
 ignoreversion
 Source: C:\MinGW\bin\libgthread-2.0-0.dll; DestDir: {app}; Flags:
 ignoreversion
 Source: C:\MinGW\bin\libgtk-win32-2.0-0.dll; DestDir: {app}; Flags:
 ignoreversion
 Source: C:\MinGW\bin\libpango-1.0-0.dll; DestDir: {app}; Flags:
 ignoreversion
 Source: C:\MinGW\bin\libpangoft2-1.0-0.dll; DestDir: {app}; Flags:
 ignoreversion
 Source: C:\MinGW\bin\libpangowin32-1.0-0.dll; DestDir: {app}; Flags:
 ignoreversion


 Other dependencies :

Source: C:\MinGW\lib\locale\fr\LC_MESSAGES\atk10.mo; DestDir:
 {app}\lib\locale\fr\LC_MESSAGES; Flags: ignoreversion
 Source: C:\MinGW\etc\pango\pango.modules; Destdir: {app}\etc\pango
 Source: C:\MinGW\etc\pango\pango.aliases; Destdir: {app}\etc\pango
 ; optional: let the user make the app look more Windows-like
 Source: C:\MinGW\lib\gtk-2.0\2.10.0\engines\libwimp.dll; Destdir:
 {app}\lib\gtk-2.0\2.10.0\engines


Is this good?
-- 
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


Re: GTK+ Windows dependancies

2008-01-30 Thread gege2061
2008/1/30, Tor Lillqvist [EMAIL PROTECTED]:

   I use http://ricardo.ecn.wfu.edu/~cottrell/cross-gtk/#installertutoriel for
   create inno setup script file for GTK+, but some files no longer exist

 Which files no longer exist? Where don't they exist, in the zipfiles
 from ftp.gnome.org?


iconv.dll
etc/gtk-2.0/gdk-pixbuf.loaders
etc/gtk-2.0/gtkrc
lib/gtk-2.0/2.4.0/loaders/libpixbufloader-png.dll
lib/gtk-2.0/2.4.0/loaders/libpixbufloader-xpm.dll
lib/locale/*/LC_MESSAGES/glib20.mo
lib/locale/*/LC_MESSAGES/gtk20.mo
lib/pango/1.4.0/modules/pango-basic-win32.dll
lib/pango/1.4.0/modules/pango-basic-fc.dll
etc/gtk-2.0/gtkrc.wimp

One set of files whose location in my builds have changed recently is
 the message catalogs. They were previously in lib/locale, but will
 from now on be in share/locale.


Ok

And sure, also other changes in the GTK+ installation tree structure
 must have happened since that tutorial was written in 2004...

  (GTK+ 2.4.0).

 Ugh. I hope this is a typo? The most recent GTK+ Windows binaries are
 version 2.12.6.


 I know. It's version used in
http://ricardo.ecn.wfu.edu/~cottrell/cross-gtk/ tutoriel. My tutoriel use
newest version, of course.

   Source: C:\MinGW\bin\libcairo-2.dll; DestDir: {app}; Flags:

 I would recommend *not* installing packages from other sources in your
 MinGW folder. Keep the MinGW folder for only stuff from www.mingw.org.
 Install the GTK+ stack somewhere else.

 I did not know. It is better to install them in the directory of
Code:Blocks (my IDE)?

-- 
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


[glib] DOM API for GMarkup

2006-11-25 Thread gege2061
Hello,

I developed a function to read a file xml and to store it in a tree
(DOM API) based on GMarkup.

If that interests you, the source code is here:
http://nicolasj.developpez.com/sources/gmarkup-dom.tar.gz

The function dom_print in main.c can be modified to rewrite the tree in a file.

Regards,

-- 
Nicolas Joseph

Responsable de la rubrique C  C++ de developpez.com

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