[Vala] trouble with Gir and Ganv



hi

I'm trying to use ganv (an interactive Gtk canvas widget for graph-based interfaces)

Vala version..
  0.20.1

OS..
  debian unstable amd64

Installed debian packages ..
  gir1.2-ganv-1.0
  libganv-1-1
  libganv-dev
  gir1.2-glib-2.0
  gir1.2-gtk-2.0
  gir1.2-gtk-3.0


Files..
  /usr/lib/girepository-1.0/Ganv-1.0.typelib
  /usr/share/gir-1.0/Ganv-1.0.gir
  /usr/lib/pkgconfig/ganv-1.pc

================

First i tried to create a vapi..

bash$ vapigen  --library ganv-1  /usr/share/gir-1.0/Ganv-1.0.gir
error: Package `GLib-2.0' not found in specified Vala API directories or GObject-Introspection GIR directories error: Package `GModule-2.0' not found in specified Vala API directories or GObject-Introspection GIR directories error: Package `GObject-2.0' not found in specified Vala API directories or GObject-Introspection GIR directories error: Package `Gio-2.0' not found in specified Vala API directories or GObject-Introspection GIR directories error: Package `cairo-1.0' not found in specified Vala API directories or GObject-Introspection GIR directories error: Package `GObject-2.0' not found in specified Vala API directories or GObject-Introspection GIR directories error: Package `Gio-2.0' not found in specified Vala API directories or GObject-Introspection GIR directories error: Package `cairo-1.0' not found in specified Vala API directories or GObject-Introspection GIR directories error: Package `GModule-2.0' not found in specified Vala API directories or GObject-Introspection GIR directories error: Package `Gio-2.0' not found in specified Vala API directories or GObject-Introspection GIR directories error: Package `GObject-2.0' not found in specified Vala API directories or GObject-Introspection GIR directories error: Package `cairo-1.0' not found in specified Vala API directories or GObject-Introspection GIR directories Gtk-2.0.gir:9864.7-9864.27: warning: Virtual method `Gtk.CList.select_row' conflicts with method of the same name
      <virtual-method name="select_row">
      ^^^^^^^^^^^^^^^^^^^^^
Gtk-2.0.gir:10010.7-10010.31: warning: Virtual method `Gtk.CList.unselect_row' conflicts with method of the same name
      <virtual-method name="unselect_row">
      ^^^^^^^^^^^^^^^^^^^^^^^^^
Gtk-2.0.gir:10498.7-10498.68: warning: Signal `Gtk.CList.select_row' conflicts with method of the same name
      <method name="select_row" c:identifier="gtk_clist_select_row">
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Gtk-2.0.gir:11097.7-11097.76: warning: Signal `Gtk.CList.unselect_row' conflicts with method of the same name
      <method name="unselect_row" c:identifier="gtk_clist_unselect_row">

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Gtk-2.0.gir:27119.7-27119.23: warning: Virtual method `Gtk.EntryBuffer.get_text' conflicts with method of the same name
      <virtual-method name="get_text">
      ^^^^^^^^^^^^^^^^^
Gtk-2.0.gir:27868.7-27868.33: warning: Virtual method `Gtk.EntryCompletion.insert_prefix' conflicts with method of the same name
      <virtual-method name="insert_prefix">
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Gtk-2.0.gir:28133.7-28135.20: warning: Signal `Gtk.EntryCompletion.insert_prefix' conflicts with method of the same name Gtk-2.0.gir:49113.7-49113.29: warning: Virtual method `Gtk.Notebook.insert_page' conflicts with method of the same name
      <virtual-method name="insert_page">
      ^^^^^^^^^^^^^^^^^^^^^^^
Gtk-2.0.gir:71658.7-71658.15: warning: Virtual method `Gtk.Style.copy' conflicts with method of the same name
      <virtual-method name="copy">
      ^^^^^^^^^
Gtk-2.0.gir:86157.7-86157.29: warning: Virtual method `Gtk.ToolItem.set_tooltip' conflicts with method of the same name
      <virtual-method name="set_tooltip">
      ^^^^^^^^^^^^^^^^^^^^^^^
Gtk-2.0.gir:87905.7-87905.33: warning: Virtual method `Gtk.ToolShell.get_icon_size' conflicts with method of the same name
      <virtual-method name="get_icon_size">
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Gtk-2.0.gir:94936.7-94936.31: warning: Virtual method `Gtk.TreeView.row_expanded' conflicts with method of the same name
      <virtual-method name="row_expanded">
      ^^^^^^^^^^^^^^^^^^^^^^^^^
Gtk-2.0.gir:96468.7-96468.84: warning: Signal `Gtk.TreeView.row_expanded' conflicts with method of the same name <method name="row_expanded" c:identifier="gtk_tree_view_row_expanded">

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Gtk-2.0.gir:108673.7-108673.39: warning: Virtual method `Gtk.Window.activate_default' conflicts with method of the same name
      <virtual-method name="activate_default">
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Gtk-2.0.gir:108683.7-108683.35: warning: Virtual method `Gtk.Window.activate_focus' conflicts with method of the same name
      <virtual-method name="activate_focus">
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Generation failed: 12 error(s), 15 warning(s)


================
Then i tried this..

If you have already created the .gir file
and installed it in the proper location (with other gir files),
then you should be able to use it directly in vala code.


using Gtk;
using Ganv;

int main (string[] args) {
  Gtk.init (ref args);
  var win = new Window ();
  win.title = "Ganv test";
  win.destroy.connect (Gtk.main_quit);
  win.show_all ();
  Gtk.main ();
  return 0;
}

valac --pkg gtk+-3.0 --pkg Ganv-1.0 ganv.vala

which produces much the same errors as vapigen did,
plus a huge amount like this..

Gtk-2.0.gir:118301.5-118303.22: error: `Gtk' already contains a definition for `test_widget_click' gtk+-3.0.vapi:9010.2-9010.37: note: previous definition of `test_widget_click' was here public static bool test_widget_click (Gtk.Widget widget, uint button, Gdk.ModifierType modifiers);


I am confused

-billy


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]