Re: [Geany-devel] Detachable Tab

2011-12-19 Thread Thomas Martitz

Am 19.12.2011 02:38, schrieb Lex Trotman:

On Mon, Dec 19, 2011 at 6:56 AM, Matthew Brush  wrote:

On 12/18/2011 09:13 AM, David Gomes wrote:

Since I changed the name in the new_tab function of notebook.c, I expect
all notebooks in Geany to have been changed, because all are notebook.c
right?

And yes, I know set_id is not necessary in GTK 3, so I just put both lol.

I'm trying to achieve being able to send tabs from various geany
notebooks.


Hi,

If you dig around in the mailing list archive, you should be able to find a
patch I submitted that does exactly what you're trying to do. IIRC there
were two main problems, the first is that some code (might) expect that the
tab be in a specific notebook (I'm think more of plugins who add tabs here),
and the second was that we would need a way to save which tabs ended up
where when the program closes, otherwise everything would revert back when
you restart Geany.



Even if complicated to implement, I would love being able to have 2 or 
even 3 side bars with tabs draggable between them.


Best regards.
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Detachable Tab

2011-12-18 Thread Lex Trotman
On Mon, Dec 19, 2011 at 6:56 AM, Matthew Brush  wrote:
> On 12/18/2011 09:13 AM, David Gomes wrote:
>>
>> Since I changed the name in the new_tab function of notebook.c, I expect
>> all notebooks in Geany to have been changed, because all are notebook.c
>> right?
>>
>> And yes, I know set_id is not necessary in GTK 3, so I just put both lol.
>>
>> I'm trying to achieve being able to send tabs from various geany
>> notebooks.
>>
>
> Hi,
>
> If you dig around in the mailing list archive, you should be able to find a
> patch I submitted that does exactly what you're trying to do. IIRC there
> were two main problems, the first is that some code (might) expect that the
> tab be in a specific notebook (I'm think more of plugins who add tabs here),
> and the second was that we would need a way to save which tabs ended up
> where when the program closes, otherwise everything would revert back when
> you restart Geany.
>
> Also, we need to ensure that the main document notebook has a different ID
> from the other two notebooks so that you can't drag any tabs to/from it.
> AFAIK the main document notebook relies heavily on there only being document
> tabs in it and putting anything else there or moving document tabs to
> another notebook would probably cause lots of problems.

Correct, the ubiquitous document_get_current() hard codes the document notebook.

Cheers
Lex
>
> Cheers,
> Matthew Brush
>
> ___
> Geany-devel mailing list
> Geany-devel@uvena.de
> https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Detachable Tab

2011-12-18 Thread Matthew Brush

On 12/18/2011 09:13 AM, David Gomes wrote:

Since I changed the name in the new_tab function of notebook.c, I expect
all notebooks in Geany to have been changed, because all are notebook.c
right?

And yes, I know set_id is not necessary in GTK 3, so I just put both lol.

I'm trying to achieve being able to send tabs from various geany notebooks.



Hi,

If you dig around in the mailing list archive, you should be able to 
find a patch I submitted that does exactly what you're trying to do. 
IIRC there were two main problems, the first is that some code (might) 
expect that the tab be in a specific notebook (I'm think more of plugins 
who add tabs here), and the second was that we would need a way to save 
which tabs ended up where when the program closes, otherwise everything 
would revert back when you restart Geany.


Also, we need to ensure that the main document notebook has a different 
ID from the other two notebooks so that you can't drag any tabs to/from 
it. AFAIK the main document notebook relies heavily on there only being 
document tabs in it and putting anything else there or moving document 
tabs to another notebook would probably cause lots of problems.


Cheers,
Matthew Brush
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Detachable Tab

2011-12-18 Thread David Gomes
Since I changed the name in the new_tab function of notebook.c, I expect
all notebooks in Geany to have been changed, because all are notebook.c
right?

And yes, I know set_id is not necessary in GTK 3, so I just put both lol.

I'm trying to achieve being able to send tabs from various geany notebooks.

On Sunday, December 18, 2011, Colomban Wendling wrote:

> Hi David,
>
> Le 18/12/2011 16:06, David Gomes a écrit :
> > Hey, I'm David, a programmer and I wanted to make Geany tabs detachable.
> > So I went added and got the source (from Github), and added a few lines
> > in the file notebook.c:
> >
> > Line 478
> >   /* enable tab drag and drop */
> >   gtk_notebook_set_tab_detachable(GTK_NOTEBOOK(main_widgets.notebook),
> > page, TRUE);
> >   gtk_notebook_set_group_name(GTK_NOTEBOOK(main_widgets.notebook),
> > "geany_tabs");
> >   gtk_notebook_set_group_id(GTK_NOTEBOOK(main_widgets.notebook), 1);
> >
> > However, it didn't really work, the tabs were not detachable, I tried
> > different IDs too.
>
> I'm not sure what do you want to achieve, but have you read the GTK docs
> on the subject [1] ?  It tells you that you have to set
> gtk_notebook_set_tab_detachable(notebook, tab, TRUE) (as you did), and
> set the notebook group name (as you did) on *both* source and dest
> notebook.  Moreover, gtk_notebook_set_group_name() is a replacement for
> gtk_notebook_set_group_id(), no need to use both -- though you should
> use gtk_notebook_set_group_id() rather than
> gtk_notebook_set_group_name() because the latter is only present in a
> GTK version Geany doesn't depend on (2.24).
>
>
> Regards,
> Colomban
>
> [1]
>
> http://developer.gnome.org/gtk/stable/GtkNotebook.html#gtk-notebook-set-tab-detachable
>
> >
> > What do you think? Thanks.
> >
> > Also hello :) I feel like the mail isn't lovable enough.
> >
> >
> >
> > ___
> > Geany-devel mailing list
> > Geany-devel@uvena.de 
> > https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
>
> ___
> Geany-devel mailing list
> Geany-devel@uvena.de 
> https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
>
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Detachable Tab

2011-12-18 Thread Colomban Wendling
Hi David,

Le 18/12/2011 16:06, David Gomes a écrit :
> Hey, I'm David, a programmer and I wanted to make Geany tabs detachable.
> So I went added and got the source (from Github), and added a few lines
> in the file notebook.c:
> 
> Line 478
>   /* enable tab drag and drop */
>   gtk_notebook_set_tab_detachable(GTK_NOTEBOOK(main_widgets.notebook),
> page, TRUE);
>   gtk_notebook_set_group_name(GTK_NOTEBOOK(main_widgets.notebook),
> "geany_tabs");
>   gtk_notebook_set_group_id(GTK_NOTEBOOK(main_widgets.notebook), 1);
> 
> However, it didn't really work, the tabs were not detachable, I tried
> different IDs too.

I'm not sure what do you want to achieve, but have you read the GTK docs
on the subject [1] ?  It tells you that you have to set
gtk_notebook_set_tab_detachable(notebook, tab, TRUE) (as you did), and
set the notebook group name (as you did) on *both* source and dest
notebook.  Moreover, gtk_notebook_set_group_name() is a replacement for
gtk_notebook_set_group_id(), no need to use both -- though you should
use gtk_notebook_set_group_id() rather than
gtk_notebook_set_group_name() because the latter is only present in a
GTK version Geany doesn't depend on (2.24).


Regards,
Colomban

[1]
http://developer.gnome.org/gtk/stable/GtkNotebook.html#gtk-notebook-set-tab-detachable

> 
> What do you think? Thanks.
> 
> Also hello :) I feel like the mail isn't lovable enough.
> 
> 
> 
> ___
> Geany-devel mailing list
> Geany-devel@uvena.de
> https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel

___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


[Geany-devel] Detachable Tab

2011-12-18 Thread David Gomes
Hey, I'm David, a programmer and I wanted to make Geany tabs detachable. So
I went added and got the source (from Github), and added a few lines in the
file notebook.c:

Line 478
  /* enable tab drag and drop */
  gtk_notebook_set_tab_detachable(GTK_NOTEBOOK(main_widgets.notebook),
page, TRUE);
  gtk_notebook_set_group_name(GTK_NOTEBOOK(main_widgets.notebook),
"geany_tabs");
  gtk_notebook_set_group_id(GTK_NOTEBOOK(main_widgets.notebook), 1);

However, it didn't really work, the tabs were not detachable, I tried
different IDs too.

What do you think? Thanks.

Also hello :) I feel like the mail isn't lovable enough.
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel