Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.1:Update
gtkhtml2
bgo-564248-gtkhtml-copy-paste-images.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bgo-564248-gtkhtml-copy-paste-images.patch of Package gtkhtml2
Index: components/editor/gtkhtml-editor.c =================================================================== --- components/editor/gtkhtml-editor.c (revision 9066) +++ components/editor/gtkhtml-editor.c (working copy) @@ -1554,6 +1554,28 @@ gtkhtml_editor_insert_html (GtkhtmlEdito gtk_html_insert_html (html, html_text); } +/* inserts local files only, as inlined */ +void +gtkhtml_editor_insert_image (GtkhtmlEditor *editor, + const gchar *filename_uri) +{ + GtkHTML *html; + + g_return_if_fail (GTKHTML_IS_EDITOR (editor)); + g_return_if_fail (filename_uri != NULL); + + html = gtkhtml_editor_get_html (editor); + + if (html) { + HTMLObject *image; + + image = html_image_new ( + html_engine_get_image_factory (html->engine), filename_uri, + NULL, NULL, 0, 0, 0, 0, 0, NULL, HTML_VALIGN_NONE, FALSE); + html_engine_paste_object (html->engine, image, 1); + } +} + gboolean gtkhtml_editor_search_by_data (GtkhtmlEditor *editor, glong level, Index: components/editor/gtkhtml-editor.h =================================================================== --- components/editor/gtkhtml-editor.h (revision 9066) +++ components/editor/gtkhtml-editor.h (working copy) @@ -163,6 +163,8 @@ gboolean gtkhtml_editor_is_previous_para (GtkhtmlEditor *editor); void gtkhtml_editor_insert_html (GtkhtmlEditor *editor, const gchar *html_text); +void gtkhtml_editor_insert_image (GtkhtmlEditor *editor, + const gchar *filename_uri); gboolean gtkhtml_editor_search_by_data (GtkhtmlEditor *editor, glong level, const gchar *klass,
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor