Re: [Vala] The future of Vala

2016-09-10 Thread Flavio Danesse
I 'm spending all my applications python Vala , I would like to know the
current state of Vala . Maybe I can contribute in some way to its
continuity.

2016-09-09 18:50 GMT-03:00 rastersoft :

> Hi:
>
> I was hoping to see at least one answer to this, but now I'm really
> scared. I really love Vala, so the perspective of missing it is really
> horrible :(
>
>
> El 08/09/16 a las 19:34, Timm Bäder escribió:
> > Hey,
> >
> > this is probably just a mail for Jürg and maybe Luca, but if you have a
> > relevant opinion on the matter, that might be a fine reply as well.
> >
> > So, for quite a while the Vala project has seen very little activity.
> > The three people most involved (Jürg, Luca and Flo) are barely on IRC
> > and/or otherwise reachable which makes it hard to get an opinion or info
> > from them. On the other hand, some people are still doing a great job,
> > namely Rico with all the binding work, as well as Evan (I haven't kept
> > up with what Al is doing other than replying to bugzilla issues that
> > won't be fixed unless it's a binding issue).
> >
> > Lots of people are worried about how the project will stay alive (or
> > if), and quite a lot of projects are written in Vala (including one I
> > maintain) -- and people keep porting projects from C to Vala, mostly
> > hoping for more contributions, hoping the Vala's C#-like syntax scares
> > off less people.
> >
> > Now, we all know that Vala has enough bugs that need to get fixed, as
> > well as lots of potential for improvements (I'll just disregard all the
> > wishes for special syntax for fringe features on IRC, that's not what
> > I'm talking about). Some of them are easy to fix but even if the patches
> > are present in bugzilla and their author is willing to fix them after
> > a review, the review just never happens. This doesn't just cause those
> > bugs to stay unfixed, but those people will also never get accustomed
> > to the internals of valac and so they will never work on anything more
> > important than this simple fix.
> >
> > I have tried in the past to do exactly that and post some patches for
> > simple fixes to get an understanding of valac internals but it's quite
> > frankly huge and there's not a real high-level documentation one could
> > work with (apart from a few very old blog posts form Luca) and neither
> > working tools do debug it (I've once spent a few hours on fixing valag
> > but then gave up...).
> >
> >
> > So... what's the deal here? Is there any way forward one could look
> > into? Is it wip/transform? IIRC there was some dbus stuff broken here?
> > Are there any TODO items for cleaning up the compiler? Should we just
> > tell people to not use Vala in the first place (which would be better
> > for the in the long run)? All of these are fine, but the current
> > situation not so much.
> >
> >
> > Sincerely,
> > Timm
> > ___
> > vala-list mailing list
> > vala-list@gnome.org
> > https://mail.gnome.org/mailman/listinfo/vala-list
> >
>
> --
> Nos leemos
>  RASTER(Linux user #228804)
> ras...@rastersoft.com  http://www.rastersoft.com
>
> ___
> vala-list mailing list
> vala-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/vala-list
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] query

2016-09-09 Thread Flavio Danesse
As I do to get the permissions on a file?

I'm doing a code editor , I wonder if there is a library that allows to
obtain the classes, methods and functions declared in a file for several
different languages.
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Question "Gtk.SourceFile.is_externally_modified()"

2016-08-19 Thread Flavio Danesse
According to the documentation of Gtk.SourceFile there is a function called
is_externally_modified but when trying to use it gives me error and says it
does not exist.
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Gtk.TreeView + Cellrender + text different colors ???

2016-08-11 Thread Flavio Danesse
OK thanks.
Now I understand that those declared in the fields TreeStore not correspond
to the columns.
make it work achieved thanks for your attention and apologize for any
inconvenience.

2016-08-11 1:10 GMT-03:00 Michael Gratton :

> On Thu, Aug 11, 2016 at 1:09 PM, Flavio Danesse 
> wrote:
>
>> That does not work.
>> According to the documentation you must specify the column number.
>>
>
> Oh yes, right you are. If you add the column numbers to the ::set() call
> then the example should work.
>
> In my example I have two columns but I want to change the color of the
>> letter only in the second column and the color varies according to row.
>>
>
> This is more of a general GTK+ question than specifically about Vala, but
> just create a model with at least three columns: One for the first view
> column's text, one for the second view column's text, and one for the
> second view column's colour:
>
> Gtk.ListStore list_store = new Gtk.ListStore(3,
>> typeof(string),
>> typeof(string),
>> typeof(string)
>> );
>>
>
> Then create the second view column that hools up the cell renderer's
> properties so they refer to the second two model columns:
>
> insert_column_with_attributes(-1, "Content",
>>   new Gtk.CellRendererText(),
>>   "text", 1,
>>   "foreground", 2,
>>   null);
>>
>
> //Mike
>
> --
> ⊨ Michael Gratton, Percept Wrangler.
> ⚙ <http://mjog.vee.net/>
>
>
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Gtk.TreeView + Cellrender + text different colors ???

2016-08-10 Thread Flavio Danesse
That does not work.
According to the documentation you must specify the column number.
In my example I have two columns but I want to change the color of the
letter only in the second column and the color varies according to row.

In short my example says:


...

Gtk.CellRendererText cell = new Gtk.CellRendererText();
insert_column_with_attributes(-1, "Line", cell, "text", 0, null);

cell = new Gtk.CellRendererText();
cell.set("foreground_set", true);
insert_column_with_attributes(-1, "Content", cell, "text", 1, null);

...

treeview.append(out iter, rootiter);
treeview.set(iter, 0, item.line, 1, item.def, -1);


How would you do in this instance?

2016-08-10 23:21 GMT-03:00 Michael Gratton :

>
> Hi Flavio,
>
> On Thu, Aug 11, 2016 at 11:34 AM, Flavio Danesse 
> wrote:
>
>> Hello, to see if anyone knows how to do this ? I try pass this code python
>> to Vala:
>>
>> self.get_model (). append ( _iter , [int (key) , text, color] )
>>
>>
>> The idea is that adding a new element in a treeview , you can specify a
>> particular color in that cellrender I tried a little of everything and
>> nothing seems to work
>>
>
> In Vala, you get the newly appended row out first and then set values on
> it, e.g.:
>
> > Gtk.ListStore model = ...
> > Gtk.TreeIter iter;
> > model.append(out iter);
> > model.set(iter, int(key), text, color);
>
> HTH,
> //Mike
>
> --
> ⊨ Michael Gratton, Percept Wrangler.
> ⚙ <http://mjog.vee.net/>
>
>
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Gtk.TreeView + Cellrender + text different colors ???

2016-08-10 Thread Flavio Danesse
Hello, to see if anyone knows how to do this ? I try pass this code python
to Vala:

self.get_model (). append ( _iter , [int (key) , text, color] )


The idea is that adding a new element in a treeview , you can specify a
particular color in that cellrender I tried a little of everything and
nothing seems to work
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Query !!

2015-10-22 Thread Flavio Danesse
Sorry , I solved it by replacing the function:

Gdk.Pixbuf.from_data
Gdk.Pixbuf.with_unowned_data

Thanks and sorry for the trouble .

2015-10-22 19:57 GMT-03:00 Flavio Danesse :

> See if someone can help me with this :
>
> The following example compiles fine , but to run it throws an error :
>
> Rape segment (` core ' generated)
>
> private unowned uint8[] array;
>
> this.pixbuf = new Gdk.Pixbuf.from_file(path);
>
> this.array = this.pixbuf.get_pixels();
>
> Gdk.Pixbuf pix = new Gdk.Pixbuf.from_data(
> this.array, Gdk.Colorspace.RGB, this.pixbuf.has_alpha,
> this.pixbuf.bits_per_sample, this.pixbuf.width,
> this.pixbuf.height, this.pixbuf.rowstride, null);
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Query !!

2015-10-22 Thread Flavio Danesse
See if someone can help me with this :

The following example compiles fine , but to run it throws an error :

Rape segment (` core ' generated)

private unowned uint8[] array;

this.pixbuf = new Gdk.Pixbuf.from_file(path);

this.array = this.pixbuf.get_pixels();

Gdk.Pixbuf pix = new Gdk.Pixbuf.from_data(
this.array, Gdk.Colorspace.RGB, this.pixbuf.has_alpha,
this.pixbuf.bits_per_sample, this.pixbuf.width,
this.pixbuf.height, this.pixbuf.rowstride, null);
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] How to change the widget color

2015-03-11 Thread Flavio Danesse
var screen = Gdk.Screen.get_default();
var css_provider = new Gtk.CssProvider();
string style_path = "Estilo.css";
css_provider.load_from_path(style_path);
Gtk.StyleContext.add_provider_for_screen(
screen, css_provider,
Gtk.STYLE_PROVIDER_PRIORITY_USER);


If you want you can review the code of my player:
https://github.com/fdanesse/JAMediaSuite/tree/master/JAMedia/vala
Incidentally, I accept tips to improve it, I come from python so surely my
vala code can be substantially improved.

2015-03-11 16:08 GMT-03:00 Erick Pérez Castellanos :

> Hi:
>
> You need to take into account that vala is only a kind-of preprocessor
> that converts Vala language into C, so using devhelp and Gtk+ [1]
> documentation works perfectly fine.
>
> You need to use GtkCssProvider to do this. gtk_widget_override family
> of functions are deprecated.
>
> 1. Obtain your widget GtkStyleContext
> 2. Attach a custom CSS class
> 3. Load some CSS sinppets with the customization you want using
> GtkCssProvider API.
>
> Cheers
>
> [1]: https://developer.gnome.org/gtk3/stable
> ___
> vala-list mailing list
> vala-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/vala-list
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] question

2015-01-17 Thread Flavio Danesse
*As is done in vala?*

scroll = self.get_parent()
notebook = scroll.get_parent()
paginas = notebook.get_n_pages()

for indice in range(paginas):
page = notebook.get_children()[indice]
if page == scroll:
pag = notebook.get_children()[indice]
label = notebook.get_tab_label(pag).get_children()[0]
label.set_text(nombre)
break
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] I found a major bug

2014-12-20 Thread Flavio Danesse
Thank you very much for the very detailed responses are helpful.

Long time no do anything in C or Java, since I discovered python not write
in another language. vala seems excellent among other things because I can
run my python application to vala practically without changes.

Hence come my difficulties with these functions.

In python get_toplevel () always returns the main Gtk.Window of apicación.
Get the value of any property is made by GET_PROPERTY ("property_name"),
etc. . .

These details are important for code clarity for those who got to vala from
python.

2014-12-20 2:36 GMT-02:00 Evan Nemerson :

> On Sat, 2014-12-20 at 00:51 -0200, Flavio Danesse wrote:
> > Another thing that does not work as expected is:
> >
> > this.get_toplevel ()
> >
> > This should return the main application window, or one Gtk.Window, but
> > returns a Gtk.Widget
>
> Because that's what the C function does.  The documentation describes
> when the return value will *not* be a Gtk.Window.  See
>
> https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-get-toplevel
>
> > 2014-12-20 0:32 GMT-02:00 Flavio Danesse :
> >
> > > I understand, but it is logical that a get back what is asked, things
> like
> > > that are not logical fol:
> > >
> > > error: invocation of void method not allowed as expression
> > > this.get_property("type");
>
> Not sure where you're getting that error from—trying to call
> GLib.Object.get_property like that here results in:
>
> error: 1 missing arguments for `void GLib.Object.get_property
> (string property_name, ref GLib.Value value)'
>
> As for why it returns void instead of GLib.Value, look at the C
> function:
>
> https://developer.gnome.org/gobject/stable/gobject-The-Base-Object-Type.html#g-object-get-property
>
> > >
> > > In the initial example:
> > > this.get_allocation()
> > > does not work, though:
> > > this.get_allocated_width()
> > > if it works.
>
> This is a more interesting example, but again it's a reflection of the C
> API:
>
>
> https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-get-allocation
>
> https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-get-allocated-width
>
> For this function it would actually be possible to alter the bindings to
>
> public Gtk.Allocation get_allocation ();
>
> Actually, these days it is generated like that by default, but we have a
> line in our metadata file to change it back to avoid breaking backwards
> compatibility.
>
> Also, we have to be careful changing out params to return values like
> that since in the future the C API may change to include a return value
> (which isn't an API break for the C API).  That happened recently in
> GtkSourceview and it broke several Vala programs.  See
> https://bugzilla.gnome.org/show_bug.cgi?id=738896
>
>
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] I found a major bug

2014-12-19 Thread Flavio Danesse
Another thing that does not work as expected is:

this.get_toplevel ()

This should return the main application window, or one Gtk.Window, but
returns a Gtk.Widget

2014-12-20 0:32 GMT-02:00 Flavio Danesse :

> I understand, but it is logical that a get back what is asked, things like
> that are not logical fol:
>
> error: invocation of void method not allowed as expression
> this.get_property("type");
>
> In the initial example:
> this.get_allocation()
> does not work, though:
> this.get_allocated_width()
> if it works.
>
> 2014-12-19 14:01 GMT-02:00 Andre Masella :
>
> Mmm, no you didn't. :-)
>>
>> Gdk.Allocation allocation;
>> this.get_allocation(out allocation);
>>
>> This is admittedly more awkward and Gtk.Widget.get_allocation has the
>> right type signature in C to return, but this binding works too.
>>
>> On 19 December 2014 at 10:27, Flavio Danesse  wrote:
>>>
>>> *Hi, I just wanted to comment that I found a major bug in gtk:*
>>>
>>> error: invocation of void method not allowed as expression
>>> Gdk.Rectangle rect = this.get_allocation();
>>>  ^
>>> ___
>>> vala-list mailing list
>>> vala-list@gnome.org
>>> https://mail.gnome.org/mailman/listinfo/vala-list
>>>
>>
>>
>> --
>> --Andre Masella
>> http://www.masella.name/
>>
>
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] I found a major bug

2014-12-19 Thread Flavio Danesse
I understand, but it is logical that a get back what is asked, things like
that are not logical fol:

error: invocation of void method not allowed as expression
this.get_property("type");

In the initial example:
this.get_allocation()
does not work, though:
this.get_allocated_width()
if it works.

2014-12-19 14:01 GMT-02:00 Andre Masella :

> Mmm, no you didn't. :-)
>
> Gdk.Allocation allocation;
> this.get_allocation(out allocation);
>
> This is admittedly more awkward and Gtk.Widget.get_allocation has the
> right type signature in C to return, but this binding works too.
>
> On 19 December 2014 at 10:27, Flavio Danesse  wrote:
>>
>> *Hi, I just wanted to comment that I found a major bug in gtk:*
>>
>> error: invocation of void method not allowed as expression
>> Gdk.Rectangle rect = this.get_allocation();
>>  ^
>> ___
>> vala-list mailing list
>> vala-list@gnome.org
>> https://mail.gnome.org/mailman/listinfo/vala-list
>>
>
>
> --
> --Andre Masella
> http://www.masella.name/
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] I found a major bug

2014-12-19 Thread Flavio Danesse
*Hi, I just wanted to comment that I found a major bug in gtk:*

error: invocation of void method not allowed as expression
Gdk.Rectangle rect = this.get_allocation();
 ^
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Is there any cool modern library to make a screen-based apps?

2014-03-11 Thread Flavio Danesse
http://references.valadoc.org/#!api=vte-2.90/Vte


2014-03-11 18:29 GMT-03:00 Александер Пономарёв :

> Hello,
> I'm looking for a tool to make reach terminal app (like mc). Does anybody
> know about some library to make it easy? Some kind of Gtk for terminal
> screens =)
> I'm trying to use ncurses, but:
> 1. Vala doesn't have bindings of panels and forms (correct me if I wrong)
> and so on.
> 2. ncurses has awfull support of utf-8.
> 3. and of course I hope there is more cool and usefull library for vala
> than ncurses.
>
> Thanks for your'e time =)
> ___
> vala-list mailing list
> vala-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/vala-list
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] This is a bug or part of my ignorance?

2014-03-07 Thread Flavio Danesse
public static int main (string[] args) {
int x = 0;
x++;
return 0;
}


2014-03-08 3:51 GMT-02:00 Flavio Danesse :

> public static int main (string[] args) {
> int x = 0;
> int x++;
> return 0;
> }
>
>
> 2014-03-08 3:34 GMT-02:00 Nor Jaidi Tuah :
>
> On Sat, 2014-03-08 at 00:10 -0200, Flavio Danesse wrote:
>> > int x = 0;
>> > x += 1;
>> > Violation segment (`core 'generated)
>> >
>> > int x = 0;
>> > x ++;
>> > Violation segment (`core 'generated)
>> >
>> > int x = 0;
>> > x = x + 1;
>>
>> I don't think you will get useful answers
>> unless you provide more context.
>>
>> Those statements by themselves are harmless.
>> But if, say, they are executed within the
>> context of an object that is already
>> freed, then... boom, you get a core.
>>
>>
>> Nice day
>> Nor Jaidi Tuah
>>
>>
>>
>>
>> PRIVILEGED/CONFIDENTIAL information may be contained in this message. If
>> you are neither the addressee (intended recipient) nor an authorised
>> recipient of the addressee, and have received this message in error, please
>> destroy this message (including attachments) and notify the sender
>> immediately. STRICT PROHIBITION: This message, whether in part or in whole,
>> should not be reviewed, retained, copied, reused, disclosed, distributed or
>> used for any purpose whatsoever. Such unauthorised use may be unlawful and
>> may contain material protected by the Official Secrets Act (Cap 153) of the
>> Laws of Brunei Darussalam. DISCLAIMER: We/This Department/The Government of
>> Brunei Darussalam, accept[s] no responsibility for loss or damage arising
>> from the use of this message in any manner whatsoever. Our messages are
>> checked for viruses but we do not accept liability for any viruses which
>> may be transmitted in or with this message.
>> ___
>> vala-list mailing list
>> vala-list@gnome.org
>> https://mail.gnome.org/mailman/listinfo/vala-list
>>
>
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] This is a bug or part of my ignorance?

2014-03-07 Thread Flavio Danesse
public static int main (string[] args) {
int x = 0;
int x++;
return 0;
}


2014-03-08 3:34 GMT-02:00 Nor Jaidi Tuah :

> On Sat, 2014-03-08 at 00:10 -0200, Flavio Danesse wrote:
> > int x = 0;
> > x += 1;
> > Violation segment (`core 'generated)
> >
> > int x = 0;
> > x ++;
> > Violation segment (`core 'generated)
> >
> > int x = 0;
> > x = x + 1;
>
> I don't think you will get useful answers
> unless you provide more context.
>
> Those statements by themselves are harmless.
> But if, say, they are executed within the
> context of an object that is already
> freed, then... boom, you get a core.
>
>
> Nice day
> Nor Jaidi Tuah
>
>
>
>
> PRIVILEGED/CONFIDENTIAL information may be contained in this message. If
> you are neither the addressee (intended recipient) nor an authorised
> recipient of the addressee, and have received this message in error, please
> destroy this message (including attachments) and notify the sender
> immediately. STRICT PROHIBITION: This message, whether in part or in whole,
> should not be reviewed, retained, copied, reused, disclosed, distributed or
> used for any purpose whatsoever. Such unauthorised use may be unlawful and
> may contain material protected by the Official Secrets Act (Cap 153) of the
> Laws of Brunei Darussalam. DISCLAIMER: We/This Department/The Government of
> Brunei Darussalam, accept[s] no responsibility for loss or damage arising
> from the use of this message in any manner whatsoever. Our messages are
> checked for viruses but we do not accept liability for any viruses which
> may be transmitted in or with this message.
> ___
> vala-list mailing list
> vala-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/vala-list
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] This is a bug or part of my ignorance?

2014-03-07 Thread Flavio Danesse
int x = 0;
x += 1;
Violation segment (`core 'generated)

int x = 0;
x ++;
Violation segment (`core 'generated)

int x = 0;
x = x + 1;
Violation segment (`core 'generated)
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] question Gtk 3 + gstreamer 1.0

2014-03-05 Thread Flavio Danesse
Excellent, you're a genius, thank you very much.
He had tried to do this myself, but I could not write it correctly (in
python only needs: *GLib.idle_add (callback, parameters)* )


2014-03-05 21:53 GMT-02:00 Luca Bruno :

> Gstreamer fires signals in a different thread than the gui mainloop. Use
> something like
> Idle.add (() => { this.image_button.set_from_stock(
> Gtk.Stock.MEDIA_PLAY, Gtk.IconSize.BUTTON);
>   return false; });
> to run your code in the gui mainloop.
>
>
> On Thu, Mar 6, 2014 at 12:28 AM, Flavio Danesse wrote:
>
>> *Hello, I'm back with questions on the list :) *
>>
>>
>> In my application I have gtk3 interface and streamings player gstreamer
>> 1.0
>> implemented separately.
>> Both work correctly separately and jointly work correctly except in the
>> following case:
>>
>> The player emits a signal when the bus changes state of reproduction, that
>> is, when it comes into play mode, pause, stop, etc.. . .
>> That signal is captured by the gtk interface to update the image of the
>> play button - stop.
>>
>> *The problem is that when this happens, everything freezes gnome.*
>>
>>
>> private void update_state(string state){
>>
>> if (state == "playing"){
>> this.image_button.set_from_stock(
>> Gtk.Stock.MEDIA_STOP, Gtk.IconSize.BUTTON);
>> }
>> else{
>> this.image_button.set_from_stock(
>> Gtk.Stock.MEDIA_PLAY, Gtk.IconSize.BUTTON);
>> }
>> }
>>
>> *I would clean the following warning in my application, but not how to do
>> it:*
>>
>>
>>
>> /home/flavio/Documentos/JAMediaSuite/UbuntuRadio/vala/UbuntuRadio.vala.c:164:2:
>> warning: 'gtk_window_set_opacity' is deprecated (declared at
>> /usr/include/gtk-3.0/gtk/gtkwindow.h:142): Use 'gtk_widget_set_opacity'
>> instead [-Wdeprecated-declarations]
>>   gtk_window_set_opacity ((GtkWindow*) self, 0.5);
>>   ^
>> /home/flavio/Documentos/JAMediaSuite/UbuntuRadio/vala/UbuntuRadio.vala.c:
>> In function 'main':
>>
>> /home/flavio/Documentos/JAMediaSuite/UbuntuRadio/vala/UbuntuRadio.vala.c:377:2:
>> warning: 'g_type_init' is deprecated (declared at
>> /usr/include/glib-2.0/gobject/gtype.h:669) [-Wdeprecated-declarations]
>>   g_type_init ();
>>   ^
>> ___
>> vala-list mailing list
>> vala-list@gnome.org
>> https://mail.gnome.org/mailman/listinfo/vala-list
>>
>
>
>
> --
> www.debian.org - The Universal Operating System
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] question Gtk 3 + gstreamer 1.0

2014-03-05 Thread Flavio Danesse
*Hello, I'm back with questions on the list :) *

In my application I have gtk3 interface and streamings player gstreamer 1.0
implemented separately.
Both work correctly separately and jointly work correctly except in the
following case:

The player emits a signal when the bus changes state of reproduction, that
is, when it comes into play mode, pause, stop, etc.. . .
That signal is captured by the gtk interface to update the image of the
play button - stop.

*The problem is that when this happens, everything freezes gnome.*

private void update_state(string state){

if (state == "playing"){
this.image_button.set_from_stock(
Gtk.Stock.MEDIA_STOP, Gtk.IconSize.BUTTON);
}
else{
this.image_button.set_from_stock(
Gtk.Stock.MEDIA_PLAY, Gtk.IconSize.BUTTON);
}
}

*I would clean the following warning in my application, but not how to do
it:*

/home/flavio/Documentos/JAMediaSuite/UbuntuRadio/vala/UbuntuRadio.vala.c:164:2:
warning: 'gtk_window_set_opacity' is deprecated (declared at
/usr/include/gtk-3.0/gtk/gtkwindow.h:142): Use 'gtk_widget_set_opacity'
instead [-Wdeprecated-declarations]
  gtk_window_set_opacity ((GtkWindow*) self, 0.5);
  ^
/home/flavio/Documentos/JAMediaSuite/UbuntuRadio/vala/UbuntuRadio.vala.c:
In function 'main':
/home/flavio/Documentos/JAMediaSuite/UbuntuRadio/vala/UbuntuRadio.vala.c:377:2:
warning: 'g_type_init' is deprecated (declared at
/usr/include/glib-2.0/gobject/gtype.h:669) [-Wdeprecated-declarations]
  g_type_init ();
  ^
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] question

2014-03-04 Thread Flavio Danesse
Yes, I've read the tutorial, I'm slowly reading and trying.
In fact my application is already running, but surely not the best code for
vala and many details are not working.

For example, as I express this python code in vala?:

 self.inplay.get_children items = ()

 for item in items:
 if item.tipo == "Player":
 item.stop ()
 self.inplay.remove (item)
 item.destroy ()

This does not work:

 var items = this.inplay.get_children();

 foreach (var item in items) {
 if (item.tipo == "Player") {
 item.player.stop ();
 this.inplay.remove (item);
 item.destroy ();
 }
 }


2014-03-04 14:13 GMT-02:00 Luca Dionisi :

> I suggest you not to spend time learning the Makefile syntax.
> As a beginner, try to compile the program yourself, is easier.
> You pass all the files to the valac command line.
> If you do not use namespaces your classes must have unique names.
> Did you already read the vala tutorial, at least the first part?
> https://wiki.gnome.org/Projects/Vala/Tutorial
>
>
> On Tue, Mar 4, 2014 at 5:00 PM, Flavio Danesse  wrote:
> > Well, but there are several things I do not understand because I can not
> > find examples.
> >
> > For example, namespaces not uses because I have not found any example of
> > use, explanations of the official website I have no clear and it does not
> > say as implemented in practice.
> >
> > Regarding compiling with python is not required, so not much about it .
> > I found an example where a makefile gun and I rely on it, but do not
> > understand much either, so far I've only written the following:
> >
> > all: jamedia
> >
> > jamedia : JAMedia.vala
> > valac - pkg gtk + -3.0 - pkg gstreamer -1.0 $ < -o $ @
> >
> > How do I add other files .vala in the makefile?
> >
> > If I have a directory structure with many files of code, as I do to
> compile
> > it?
> > And as I do in the code to refer to particular classes of certain files
> > within that structure where I can have files with the same name and
> classes
> > with the same name?
> >
> > As I said before I am python programmer.
> > There are things that are very simple to do in python, there are both
> vala,
> >
> > Some examples :
> >
> > I have a class called MyClass ( Gtk.Frame ), from which instantiate
> objects
> > and pack it into a box, in python, if I box.get_children (), it returns
> the
> > type MyClass widgets, but widgets vala me back, so which I can not use my
> > implementation will MyClass.
> >
> > Sorry for my ignorance, I'm just a few days ago vala programming in, I
> > really like, but there are still several things I do not understand.
> >
> > Thank you for your attention and response.
> >
> >
> > 2014-03-04 9:38 GMT-02:00 Luca Dionisi :
> >
> >> I assume you are not using namespaces.
> >> I assume the external files that you talk about are source files of
> >> your application (as in not an already compiled library)
> >> In this case you should need to do... nothing.
> >> Just include all the source files during compilation.
> >>
> >> HTH. Go ahead with learning!
> >>
> >>
> >> On Tue, Mar 4, 2014 at 12:22 PM, Flavio Danesse 
> >> wrote:
> >> > Hello, I'm starting to learn this language and basically I decided to
> >> > migrate one of my applications python + gtk + gstreamer and although I
> >> > already have a lot of ported code, I have some doubts that I can not
> >> > solve.
> >> >
> >> > One is as I import classes that are in external files to python style:
> >> >
> >> > from my_file import my_class
> >> > ___
> >> > vala-list mailing list
> >> > vala-list@gnome.org
> >> > https://mail.gnome.org/mailman/listinfo/vala-list
> >
> >
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] question

2014-03-04 Thread Flavio Danesse
Well, but there are several things I do not understand because I can not
find examples.

For example, namespaces not uses because I have not found any example of
use, explanations of the official website I have no clear and it does not
say as implemented in practice.

Regarding compiling with python is not required, so not much about it .
I found an example where a makefile gun and I rely on it, but do not
understand much either, so far I've only written the following:

*all: jamedia*

*jamedia : JAMedia.vala*
*valac - pkg gtk + -3.0 - pkg gstreamer -1.0 $ < -o $ @*

How do I add other files .vala in the makefile?

If I have a directory structure with many files of code, as I do to compile
it?
And as I do in the code to refer to particular classes of certain files
within that structure where I can have files with the same name and classes
with the same name?

As I said before I am python programmer.
There are things that are very simple to do in python, there are both vala,

Some examples :

I have a class called MyClass ( Gtk.Frame ), from which instantiate objects
and pack it into a box, in python, if I box.get_children (), it returns the
type MyClass widgets, but widgets vala me back, so which I can not use my
implementation will MyClass.

Sorry for my ignorance, I'm just a few days ago vala programming in, I
really like, but there are still several things I do not understand.

Thank you for your attention and response.


2014-03-04 9:38 GMT-02:00 Luca Dionisi :

> I assume you are not using namespaces.
> I assume the external files that you talk about are source files of
> your application (as in not an already compiled library)
> In this case you should need to do... nothing.
> Just include all the source files during compilation.
>
> HTH. Go ahead with learning!
>
>
> On Tue, Mar 4, 2014 at 12:22 PM, Flavio Danesse 
> wrote:
> > Hello, I'm starting to learn this language and basically I decided to
> > migrate one of my applications python + gtk + gstreamer and although I
> > already have a lot of ported code, I have some doubts that I can not
> solve.
> >
> > One is as I import classes that are in external files to python style:
> >
> > from my_file import my_class
> > ___
> > vala-list mailing list
> > vala-list@gnome.org
> > https://mail.gnome.org/mailman/listinfo/vala-list
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] question

2014-03-04 Thread Flavio Danesse
Hello, I'm starting to learn this language and basically I decided to
migrate one of my applications python + gtk + gstreamer and although I
already have a lot of ported code, I have some doubts that I can not solve.

One is as I import classes that are in external files to python style:

from my_file import my_class
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list