Re: [Vala] Application Menu

2018-01-25 Thread Steven Oliver
Nor Jaidi, Thank you very much for the response! I do have that attribute set as you suggested. Here is my gresources.xml file: https://github.com/steveno/balistica/blob/master/ui/menu.ui And here is where I create the menu using Vala (lines 69 and 117 - 125):

Re: [Vala] compiler warning for Variant.strv()

2018-01-25 Thread Al Thomas via vala-list
> On Thursday, 25 January 2018, 10:32:07 GMT, Yasushi SHOJI wrote: > void main () { >         Variant ary = new Variant.strv({"foo", "bar", "baz"}); > } > In file included from /usr/include/glib-2.0/glib/gmessages.h:35:0, >                 from

Re: [Vala] Need help to scroll a textview using a scale

2018-01-25 Thread Manish Jain
  void scale_moved (Gtk.Range range)   {   int i;   Gtk.TextIter iter = new Gtk. TextIter();   view.get_iter_at_position(out iter, out i, 0, 0);   iter.set_line(iter.get_line() + 10);   view.scroll_to_iter(iter, 0, false, 0, 0);   }

Re: [Vala] Need help to scroll a textview using a scale

2018-01-25 Thread Christian Hergert
On 01/24/2018 10:03 AM, Manish Jain wrote: My last effort at the event handler is below (it is of no use, really): void scale_moved (Gtk.Range range) { int i; Gtk.TextIter iter = new Gtk. TextIter(); view.get_iter_at_position(out iter, out i, 0, 0);

[Vala] Need help to scroll a textview using a scale

2018-01-25 Thread Manish Jain
Hi, I am new to vala and am trying to pick up the fundamentals. I was trying to create a a GTK application with 3 components: Gtk.ScrolledWindow scrolled; Gtk.TextView view; Gtk.Scale v_scale; The scrolled view widget is to display a text file read at run time. I would like to

Re: [Vala] Package `Gee-0.8' not found

2018-01-25 Thread Al Thomas via vala-list
> On Thursday, 25 January 2018, 16:41:31 GMT, Ralf Ganswindt wrote: > I'm experimenting with Vala and so far I like how it works. However, I > tried to compile a basic gee example from the sample programs and I get the > following: > $ valac --pkg Gee-0.8

[Vala] Package `Gee-0.8' not found

2018-01-25 Thread Ralf Ganswindt
I'm experimenting with Vala and so far I like how it works. However, I tried to compile a basic gee example from the sample programs and I get the following: $ valac --pkg Gee-0.8 list.vala error: Package `Gee-0.8' not found in specified Vala API directories or GObject-Introspection GIR

Re: [Vala] Confusing issue with static struct method: too many arguments to function

2018-01-25 Thread Abderrahim Kitouni
Hello, On Mon, 22 Jan 2018, 23:00 Michael Murphy, wrote: > I have the following which is automatically generated by bindgen. > > ```c > DistinstSector distinst_sector_megabyte(uint64_t value); > ``` > If the struct is returned (and passed as a parameter) like this in C,

Re: [Vala] compiler warning for Variant.strv()

2018-01-25 Thread Al Thomas via vala-list
> On Thursday, 25 January 2018, 10:32:07 GMT, Yasushi SHOJI wrote: > void main () { >         Variant ary = new Variant.strv({"foo", "bar", "baz"}); > } > /usr/include/glib-2.0/glib/gvariant.h:118:33: note: expected ‘const > gchar * const* {aka const char *

Re: [Vala] Newbie help requested for scrolling a TextView

2018-01-25 Thread Manish Jain
On 01/25/18 16:11, Al Thomas wrote: > On Thursday, 25 January 2018, 01:00:05 GMT, Manish Jain wrote: > Despite a lot of effort to write an event handler, I still cannot get > the scale to tell the view to scroll. I have tried scrolling with the > scroll_to_iter()

Re: [Vala] Newbie help requested for scrolling a TextView

2018-01-25 Thread Al Thomas via vala-list
> On Thursday, 25 January 2018, 11:37:49 GMT, Manish Jain wrote: > I was filling up the view> with text += . And I think Vala> removes the trailing newline, so essentially my buffer always had> just one line! By using += with the text property of the buffer you are

Re: [Vala] Newbie help requested for scrolling a TextView

2018-01-25 Thread Manish Jain
Hi Al, Tx for replying. As part of my teething struggles, I discovered what I think was essentially wrong. I was filling up the view with text += . And I think Vala removes the trailing newline, so essentially my buffer always had just one line! Let me see if I can get my code to work

Re: [Vala] compiler warning for Variant.strv()

2018-01-25 Thread Al Thomas via vala-list
> On Thursday, 25 January 2018, 11:19:44 GMT, Abderrahim Kitouni > wrote: > You can try to use the latest development version of Vala. Most of those > warnings should go away. Unfortunately that isn't fixed in this case. The g_variant_new_strv has a C type signature for

Re: [Vala] compiler warning for Variant.strv()

2018-01-25 Thread Abderrahim Kitouni
Hello, You can try to use the latest development version of Vala. Most of those warnings should go away. https://blogs.gnome.org/despinosa/2018/01/09/vala-warnings-output-improvements/ HTH, Abderrahim On Thu, 25 Jan 2018, 11:32 Yasushi SHOJI, wrote: > Hi, > > I have

Re: [Vala] Newbie help requested for scrolling a TextView

2018-01-25 Thread Al Thomas via vala-list
> On Thursday, 25 January 2018, 01:00:05 GMT, Manish Jain wrote: > Despite a lot of effort to write an event handler, I still cannot get > the > scale to tell the view to scroll. I have tried scrolling with the > scroll_to_iter() method, but the iterator always

[Vala] compiler warning for Variant.strv()

2018-01-25 Thread Yasushi SHOJI
Hi, I have a code snippet which gets incompatible pointer type warning from gcc. Is there anyway to fix this except "-Wno-incompatible-pointer-types"? $ cat a.vala using Gee; void main () { Variant ary = new Variant.strv({"foo", "bar", "baz"}); } $ valac --pkg gee-0.8 a.vala