Ethereal-dev: [Ethereal-dev] RE: Why is gdk_display_get_default() used in hostlist/conversatio
> Hi!
>
> Is there a reason gdk_display_get_default() is used? Ronnie
> noted, that
> this function is only available from GTK2.2
>
> On my machine:
>
> disp = gdk_display_get_default();
> cb = gtk_clipboard_get_for_display (disp,GDK_SELECTION_CLIPBOARD);
>
> (available only in GTK2.2) works the same way as:
>
> cb = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
>
> and the later will also work on GTK2.0
>
> So is there a reason to use gdk_display_get_default()? Otherwise we
> could use the gtk_clipboard_get() function which is working on all
> GTK2.x versions.
The reason I used the gdk_display_get_default() is that the gtk_clipboard_get_for_display() required a display object as a parameter. I didn't realize that the gdk_display_get_default() was only available in GTK2.2 and above. Therefore, it didn't occur to me that I should use the gtk_clipboard_get() function instead. I agree that the gdk_display_get_default() should be replaced as you suggest. I'm a newbie to GTK and still stumbling.
tjp
>
> BTW: Do you have any additional infos on this clipboard thing?
The reference info I used is here http://developer.gnome.org/doc/API/2.0/gtk/gtk-Clipboards.html.
>
> Regards, ULFL
>