[Geany-devel] Detachable Tab

Colomban Wendling lists.ban at xxxxx
Sun Dec 18 15:15:17 UTC 2011


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 at uvena.de
> https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel




More information about the Devel mailing list