epiphany-browser-backport-hardy
Describe epiphany-browser-backport-hardy here.
Needs new libsoup2.4 which needs the following:
new glib symbols:
g_hostname_is_ip_address
g_inet_address_to_string
g_inet_socket_address_get_address
g_inet_socket_address_new
g_main_context_pop_thread_default
g_main_context_push_thread_default
g_poll
g_resolver_free_addresses
g_resolver_get_default
g_resolver_get_type
g_resolver_lookup_by_address
g_resolver_lookup_by_address_async
g_resolver_lookup_by_address_finish
g_resolver_lookup_by_name
g_resolver_lookup_by_name_async
g_resolver_lookup_by_name_finish
g_set_error_literal
g_socket_address_get_native_size
g_socket_address_new_from_native
g_socket_address_to_native
---
Also needs webkit which needs the following:
new glib symbols:
g_dgettext
g_mapped_file_unref
new gdk/gtk symbols:
gdk_x11_window_get_drawable_impl
gtk_orientable_get_type
gtk_orientable_set_orientation
gtk_widget_get_window
---
epiphany-browser also needs the following itself:
new glib symbols:
g_dpgettext2
g_irepository_get_option_group
new gdk/gtk symbols:
gdk_app_launch_context_new
gdk_app_launch_context_set_display
gdk_app_launch_context_set_screen
gdk_app_launch_context_set_timestamp
gtk_activatable_get_related_action
gtk_activatable_get_type
gtk_entry_get_current_icon_drag_source
gtk_entry_set_icon_activatable
gtk_entry_set_icon_drag_source
gtk_entry_set_icon_from_icon_name
gtk_entry_set_icon_from_pixbuf
gtk_entry_set_icon_from_stock
gtk_entry_set_icon_tooltip_text
gtk_entry_set_progress_fraction
gtk_image_menu_item_set_always_show_image
gtk_show_uri
gtk_status_icon_set_tooltip_text
---
18:08 < asac> ccheney: so the class and main struct seem compatible
18:08 < asac> so we can do this:
18:09 * ccheney looks to see where the problem laid
18:09 -!- BUGabundo [~bugabundo@ubuntu/member/bugabundo] has joined #ubuntu-mozillateam
18:09 < asac> ccheney: no i see
18:09 < ccheney> oh ok
18:09 < asac> one second ;)
18:09 < asac> the icon stuff needs Private struct
18:09 < asac> which you cannot break/change
18:09 < asac> whati think we should do is because Class and main struct are compatible
18:09 < asac> we just copy the full gtkentry.c and gtkentry.h and name it gtkentryBackported
18:10 < asac> define a new type gtkentrybackported etc.
18:10 < asac> and use that in epiphany
18:10 < asac> that type would just inherit from gtkentry
18:10 < ccheney> iirc it uses some other newer types along with it might need to do that for those two i guess?
18:11 < ccheney> i'm not sure what you mean wrt inherit with C :)
18:11 < ccheney> i'm still pretty new with using glib/gtk so its probably something that they do with macros i suppose?
18:11 < asac> ccheney: right. the G_DEFINE_YPE Macro specifies a supertype
18:11 < asac> also you derive the structs like this:
18:12 < asac> struct _GtkEntryBackport {
18:12 < asac> GtkEntry parent;
18:12 < asac> };
18:12 < asac> and GtkEntryBackportClass {
18:12 < asac> GtkEntryClass parent_klass;
18:12 < asac> }
18:12 < asac> ;
18:12 < ccheney> ah ok
18:12 < asac> then you basically put the G_DEFINE_TYPE macro there that says that GTK_TYPE_ENTRY is supertype
18:12 < asac> and in _init and _class_init you dont do anything
18:12 < ccheney> i'm going to copy this into the epiphany wiki page so i don't forget anything while working on it tomorrow
18:13 < asac> err
18:13 < ccheney> if that is ok?
18:13 < asac> in _class_init you basically copy what you currently have there
18:13 < ccheney> rather i just copy it locally
18:13 < asac> no wiki is fine
18:13 < ccheney> ok
18:13 < asac> so _class_init you keep as it is in the copy you created from the new gtkentry
18:14 < ccheney> ok
18:15 < asac> ccheney: look at the class_init
18:15 < asac> function
18:15 < asac> thats where they bind the functions to the static impls
18:15 < ccheney> yea i remember seeing that when working on it before
18:16 < ccheney> i'll try to get it at least partially done tonight after i get something to eat, if i am lucky maybe done by meeting tomorrow :)
18:17 < asac> ccheney: maybe we can even just first try to copy that entry over
18:17 < asac> as it is ... rename all the funcs and types
18:17 < asac> and see if that is enough ... if all uses of that are redirected in epiphany
18:18 < asac> for the other symbols:
18:18 < asac> gtk_show_uri -> shouldnt be a problem
18:18 < asac> gtk_status_icon_set_tooltip_text -> we can survive without that?
18:18 < asac> gtk_activatable_get_type -> guess we need this type backported
18:18 < ccheney> ok
18:18 < asac> gdk_app_launch_context_* -> feels like thats confined and can be backported or even added to gtk
18:19 < asac> if its imliar to the thread thing
18:19 < asac> from glib
18:19 < ccheney> yea probably so
18:19 < asac> let me check something
18:19 < asac> ok for gtk_entry we have icon and progress
18:19 < ccheney> from what i remember the context stuff seemed pretty easy
18:20 < asac> lib/widgets/ephy-location-entry.c lib/widgets/ephy-search-entry.c:
18:20 < asac> those are the places for icon
18:20 < ccheney> yea
18:20 < ccheney> iirc there is one other place but i forgot the filename
18:21 < ccheney> maybe was src/ephy-location-action.c
18:22 < ccheney> yea it refers to GtkEntry at least, not sure if it used the new functions though
18:22 < ccheney> oh no i think it wasn't that but src/ephy-window.c
18:23 < ccheney> i see where i commented out the +// #include "../lib/gtk-gtkentry.h"
18:23 < asac> hmm. problem is you did abunch of stuff
18:23 < ccheney> which i had done when trying to do the initial func backport
18:23 < asac> so i dont even see the original ;)
18:23 < ccheney> oh :-\
18:23 < asac> let me revert everything in that tree
18:24 < ccheney> ok
18:27 < asac> ccheney: so yeah. simple approach would be to copy GtkEntry as EphyGtkEntry ... rename all gtk_entry to ephy_gtk_entry and all GtkEntry to
EphyGtkEntry and GTK_ENTRY to EPHY_GTK_ENTRY etc.
18:28 < asac> in the copied source files
18:28 < asac> and then fix the few places where they say: gtk_entry_new() -> ephy_gtk_entry_new()
18:28 < asac> and of course all the other gtk_entry.* func
18:28 < asac> s
18:29 < ccheney> ok
18:30 < asac> feels like a plan
18:30 < asac> i dont think it passes gtk entries to different libs etc.
18:30 < asac> so should be fine
18:30 < ccheney> ok will try to implement it tonight and let you know how it goes tomorrow :)
18:31 < asac> yeah. just copy over ... and sed ;)
18:31 < asac> well. first see if it builds ;)
18:31 < asac> who knows what that thing pulls in
18:31 < ccheney> heh yea
18:32 < ccheney> iirc it pulls a few other bits in but not too much
18:32 < asac> the gtkentry.c file?
18:32 < ccheney> i can probably get away by doing something similar with the other bits if they have problems
18:32 < ccheney> yea
18:32 < asac> would be fun if gtk code is more portable than ephy ;)
18:32 < ccheney> i think there is a glib icon thing as well it messes with but i can remember for certain
18:33 < ccheney> er can'tepiphany-browser-backport-hardy (last edited 2010-03-09 00:32:41 by ccheney)