Re: Writing an extension



Hi there!

Il giorno dom, 19/12/2010 alle 12.32 +0100, Thomas Bouffon ha scritto:
> Sorry I didn't answer to the last e-mail but i'm stuck on 2.31

No problem, I knew I had to make some work on my own, and it was fun
indeed :)

> 
>         display.connect('window-created',FindAndMove);
>         
>         I would like to ask if it is possible to perform an action
>         ONLY on the
>         new window that is opened, something like (this is a
>         theoretical guess,
>         hope you get the point):
>         
>         display.connect('window-created',FindAndMove(opened_window));
>         
> That's strange, I thought I solved this. Maybe it was after I sent the
> e-mail. Basically I create an array with the windows id and set a
> boolean to true if they've already been managed. I'll send the source
> asap, i.e tomorrow morning.

The last version checked all the apps, I never thought of using a
boolean already_set to check whether the window was already processed
because I think that having a way to identify the new opened window
would be better. However I am no good with JS and Gnome Shell sources,
hence I couldn't find a way to do that yet.

>         Furthermore, I'd like to ask if there is a way to know how
>         many
>         workspaces are open when the new window is created, so I do
>         not have to
>         cycle as done in the extension, which goes like
>         
>         for ( let j = global.screen.n_workspaces; j <=
>         workspace_where_i_want_to_open_app ; j++ ) {
>                global.screen.append_new_workspace(false,0);
>         }
> The loop is just here to open new workspaces, if there are not enough.

I am a moron, I always thought that loop started from j=1, don't know
why.

>  
> 
>         Finally, is there any documentation listing objects and
>         methods for
>         things like global, get_window_actors, etc. or do I have to
>         rely on
>         Looking Glass?
>  
> It looks like I didn't communicate enough on my work, my bad. Which
> leads to a question : will there be some kind of extension
> repository/tracker, so that extensions can be shared/worked on more
> easily in the community ? We can create webpages for our extensions,
> but a central repo would  be a plus !

This will be sweet, however I remember someone saying that there will be
a clear and easy way to add extensions to the shell and a central place
where to get them. Maybe not in time for 3.0. I saw it in this ML
sometime ago, poke me if I am wrong.

Besides, thanks anybody for the kind help, I wouldn't go on without the
great feedback I get :)

Alessandro



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