Merge lp:~noskcaj/ubuntu/vivid/epiphany-browser/3.14 into lp:ubuntu/vivid/epiphany-browser

Proposed by Jackson Doak
Status: Merged
Merge reported by: Tim Lunn
Merged at revision: not available
Proposed branch: lp:~noskcaj/ubuntu/vivid/epiphany-browser/3.14
Merge into: lp:ubuntu/vivid/epiphany-browser
Diff against target: 253977 lines
To merge this branch: bzr merge lp:~noskcaj/ubuntu/vivid/epiphany-browser/3.14
Reviewer Review Type Date Requested Status
Tim Lunn (community) Approve
Ubuntu branches Pending
Review via email: mp+245286@code.launchpad.net

Description of the change

Merge from debian + new upstream release

To post a comment you must log in.
Revision history for this message
Tim Lunn (darkxst) wrote :

Thanks Jackson

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory '.pc/00_epiphany-browser.patch'
2=== removed directory '.pc/00_epiphany-browser.patch'
3=== added file '.pc/00_epiphany-browser.patch/.timestamp'
4=== added file '.pc/00_epiphany-browser.patch/configure.ac'
5--- .pc/00_epiphany-browser.patch/configure.ac 1970-01-01 00:00:00 +0000
6+++ .pc/00_epiphany-browser.patch/configure.ac 2014-12-20 23:53:39 +0000
7@@ -0,0 +1,272 @@
8+# Copyright © 2000-2004 Marco Pesenti Gritti
9+# Copyright © 2003, 2004, 2005, 2006, 2007 Christian Persch
10+#
11+# This program is free software; you can redistribute it and/or modify it
12+# under the terms of the GNU General Public License as published by the
13+# Free Software Foundation; either version 2 of the License, or (at your
14+# option) any later version.
15+#
16+# This program is distributed in the hope that it will be useful, but
17+# WITHOUT ANY WARRANTY; without even the implied warranty of
18+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19+# General Public License for more details.
20+#
21+# You should have received a copy of the GNU General Public License along
22+# with this program; if not, write to the Free Software Foundation, Inc.,
23+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24+
25+m4_define([epiphany_version_major],[3])
26+m4_define([epiphany_version_minor],[14])
27+m4_define([epiphany_version_micro],[2])
28+m4_define([epiphany_version],[epiphany_version_major.epiphany_version_minor.epiphany_version_micro])
29+
30+AC_INIT([GNOME Web Browser],[epiphany_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=epiphany],[epiphany])
31+
32+AC_PREREQ([2.59])
33+
34+AC_CONFIG_MACRO_DIR([m4])
35+AC_CONFIG_HEADERS([config.h])
36+AC_CONFIG_SRCDIR([configure.ac])
37+
38+AC_SUBST([EPIPHANY_MAJOR],[epiphany_version_major.epiphany_version_minor])
39+
40+# for EPHY_CHECK_VERSION
41+AC_SUBST([EPIPHANY_MAJOR_VERSION], [epiphany_version_major])
42+AC_SUBST([EPIPHANY_MINOR_VERSION], [epiphany_version_minor])
43+AC_SUBST([EPIPHANY_MICRO_VERSION], [epiphany_version_micro])
44+
45+AM_INIT_AUTOMAKE([1.11 foreign dist-xz no-dist-gzip tar-ustar])
46+
47+# Use AM_SILENT_RULES if present
48+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
49+
50+AM_MAINTAINER_MODE([enable])
51+
52+# Initialize libtool
53+LT_PREREQ(2.2)
54+LT_INIT([dlopen disable-static])
55+
56+AC_PROG_CC
57+
58+AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
59+AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
60+
61+IT_PROG_INTLTOOL([0.50.0])
62+
63+GLIB_GSETTINGS
64+
65+PKG_PROG_PKG_CONFIG
66+
67+GNOME_DEBUG_CHECK
68+GNOME_COMPILE_WARNINGS([maximum])
69+GNOME_MAINTAINER_MODE_DEFINES
70+
71+GNOME_CODE_COVERAGE
72+
73+MORE_WARN_FLAGS="-Wdeclaration-after-statement -Wno-deprecated-declarations -Wno-missing-prototypes"
74+
75+GLIB_REQUIRED=2.38.0
76+GTK_REQUIRED=3.13.0
77+LIBXML_REQUIRED=2.6.12
78+LIBXSLT_REQUIRED=1.1.7
79+WEBKIT_GTK_REQUIRED=2.5.90
80+LIBSOUP_REQUIRED=2.48.0
81+GNOME_DESKTOP_REQUIRED=2.91.2
82+LIBSECRET_REQUIRED=0.14
83+GSETTINGS_DESKTOP_SCHEMAS_REQUIRED=0.0.1
84+LIBNOTIFY_REQUIRED=0.5.1
85+GCR_REQUIRED=3.5.5
86+AVAHI_REQUIRED=0.6.22
87+
88+WEBKIT_GTK_PC_NAME=webkit2gtk-4.0
89+
90+# Tests
91+
92+AC_MSG_CHECKING([whether to build tests])
93+AC_ARG_ENABLE([tests],
94+ AS_HELP_STRING([--enable-tests],[Whether to build tests (default: yes)]),
95+ [], [enable_tests=yes])
96+AC_MSG_RESULT([$enable_tests])
97+
98+AM_CONDITIONAL([ENABLE_TESTS],[test "$enable_tests" = "yes"])
99+
100+PKG_CHECK_MODULES([DEPENDENCIES], [
101+ glib-2.0 >= $GLIB_REQUIRED
102+ gthread-2.0
103+ gio-unix-2.0 >= $GLIB_REQUIRED
104+ gtk+-3.0 >= $GTK_REQUIRED
105+ gtk+-unix-print-3.0 >= $GTK_REQUIRED
106+ x11
107+ libwnck-3.0
108+ libxml-2.0 >= $LIBXML_REQUIRED
109+ libxslt >= $LIBXSLT_REQUIRED
110+ $WEBKIT_GTK_PC_NAME >= $WEBKIT_GTK_REQUIRED
111+ libsoup-2.4 >= $LIBSOUP_REQUIRED
112+ libsecret-1 >= $LIBSECRET_REQUIRED
113+ gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED
114+ gsettings-desktop-schemas >= $GSETTINGS_DESKTOP_SCHEMAS_REQUIRED
115+ libnotify >= $LIBNOTIFY_REQUIRED
116+ sqlite3
117+ gcr-3 >= $GCR_REQUIRED
118+ avahi-gobject >= $AVAHI_REQUIRED
119+ avahi-client >= $AVAHI_REQUIRED
120+ ])
121+
122+PKG_CHECK_MODULES(WEB_EXTENSION, [
123+ $WEBKIT_GTK_PC_NAME >= $WEBKIT_GTK_REQUIRED
124+ libsecret-1 >= $LIBSECRET_REQUIRED
125+ ])
126+AC_SUBST(WEB_EXTENSION_CFLAGS)
127+AC_SUBST(WEB_EXTENSION_LIBS)
128+
129+# ******************
130+# Portability checks
131+# ******************
132+
133+AC_CHECK_FUNCS([localtime_r memchr memmove memset mkdir mkdtemp realpath sqrt strchr strcspn strdup strerror strrchr strtol strtoul strstr])
134+
135+# for backtrace()
136+AC_CHECK_HEADERS([execinfo.h fcntl.h])
137+AC_SEARCH_LIBS([backtrace], [c execinfo])
138+AC_C_INLINE
139+AC_FUNC_MKTIME
140+AC_FUNC_STRTOD
141+AC_TYPE_SIZE_T
142+
143+# ***************
144+# Multimedia keys
145+# ***************
146+
147+AC_CHECK_HEADERS([X11/XF86keysym.h])
148+
149+# ***
150+# NSS
151+# ***
152+
153+AC_MSG_CHECKING([whether NSS support is requested])
154+AC_ARG_ENABLE([nss],
155+ [AS_HELP_STRING([--enable-nss], [Enable NSS support (default: enabled)])],
156+ [], [enable_nss=yes])
157+AC_MSG_RESULT([$enable_nss])
158+
159+if test "$enable_nss" = "yes"; then
160+ PKG_CHECK_MODULES([NSS], [nss])
161+
162+ AC_DEFINE([ENABLE_NSS], [1], [Define to compile with NSS support])
163+fi
164+
165+AM_CONDITIONAL([ENABLE_NSS],[test "$enable_nss" = "yes"])
166+
167+# *******************************
168+# Add warning flags
169+# *******************************
170+
171+AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS $MORE_WARN_FLAGS"
172+AC_SUBST([AM_CPPFLAGS])
173+AC_SUBST([AM_CFLAGS])
174+AC_SUBST([AM_LDFLAGS])
175+
176+# *******************************
177+# Internationalization
178+# *******************************
179+
180+ISO_CODES_REQUIRED=0.35
181+
182+PKG_CHECK_EXISTS([iso-codes >= $ISO_CODES_REQUIRED],
183+ [have_iso_codes=yes],[have_iso_codes=no])
184+
185+if test "$have_iso_codes" = "yes"; then
186+ AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
187+ if $PKG_CONFIG --variable=domains iso-codes | grep -q 639 && \
188+ $PKG_CONFIG --variable=domains iso-codes | grep -q 3166 ; then
189+ result=yes
190+ else
191+ result=no
192+ have_iso_codes=no
193+ fi
194+ AC_MSG_RESULT([$result])
195+fi
196+
197+if test "$have_iso_codes" = "yes"; then
198+ AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],["`$PKG_CONFIG --variable=prefix iso-codes`"],[ISO codes prefix])
199+ AC_DEFINE([HAVE_ISO_CODES],[1],[Define if you have the iso-codes package])
200+else
201+ AC_MSG_ERROR([iso-codes is required])
202+fi
203+
204+GETTEXT_PACKAGE=epiphany
205+AC_SUBST([GETTEXT_PACKAGE])
206+AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
207+AM_GLIB_GNU_GETTEXT
208+
209+# *******************************
210+# User help
211+# *******************************
212+
213+YELP_HELP_INIT
214+
215+# ****************
216+# Distributor name
217+# ****************
218+
219+AC_ARG_WITH([distributor-name],
220+ AS_HELP_STRING([--with-distributor-name=name],[Set the distributor name]),
221+ [LSB_DISTRIBUTOR="$withval"])
222+
223+if test -z "$LSB_DISTRIBUTOR"; then
224+ AC_CHECK_PROGS([LSB_RELEASE], [lsb_release],)
225+ if test -n "$LSB_RELEASE"; then
226+ # Fallback on lsb_release if available
227+ LSB_DISTRIBUTOR=$($LSB_RELEASE -i -s)
228+ else
229+ # Fallback on the product name
230+ LSB_DISTRIBUTOR="Epiphany"
231+ fi
232+fi
233+
234+AC_DEFINE_UNQUOTED([LSB_DISTRIBUTOR],["$LSB_DISTRIBUTOR"],[Distributor name])
235+
236+# ************
237+# Output files
238+# ************
239+
240+AC_DEFINE([EPIPHANY_COMPILATION],[1],[Compiling epiphany])
241+
242+AC_CONFIG_FILES([
243+Makefile
244+data/Makefile
245+data/epiphany.desktop.in
246+data/pages/Makefile
247+doc/Makefile
248+help/Makefile
249+lib/Makefile
250+lib/egg/Makefile
251+lib/history/Makefile
252+lib/widgets/Makefile
253+embed/Makefile
254+embed/web-extension/Makefile
255+src/Makefile
256+src/bookmarks/Makefile
257+po/Makefile.in
258+tests/Makefile
259+tests/data/Makefile
260+],
261+[])
262+
263+AC_OUTPUT
264+
265+# *************************************
266+# *************************************
267+
268+echo "
269+Epiphany was configured with the following options:
270+
271+ Source code location : $srcdir
272+ Compiler : $CC
273+ Prefix : $prefix
274+ Extra debugging support : $enable_debug
275+ Build tests : $enable_tests
276+ Code coverage : $enable_code_coverage
277+
278+ NSS support : $enable_nss
279+"
280
281=== removed file '.pc/00_epiphany-browser.patch/configure.ac'
282--- .pc/00_epiphany-browser.patch/configure.ac 2013-12-14 07:46:25 +0000
283+++ .pc/00_epiphany-browser.patch/configure.ac 1970-01-01 00:00:00 +0000
284@@ -1,274 +0,0 @@
285-# Copyright © 2000-2004 Marco Pesenti Gritti
286-# Copyright © 2003, 2004, 2005, 2006, 2007 Christian Persch
287-#
288-# This program is free software; you can redistribute it and/or modify it
289-# under the terms of the GNU General Public License as published by the
290-# Free Software Foundation; either version 2 of the License, or (at your
291-# option) any later version.
292-#
293-# This program is distributed in the hope that it will be useful, but
294-# WITHOUT ANY WARRANTY; without even the implied warranty of
295-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
296-# General Public License for more details.
297-#
298-# You should have received a copy of the GNU General Public License along
299-# with this program; if not, write to the Free Software Foundation, Inc.,
300-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
301-
302-m4_define([epiphany_version_major],[3])
303-m4_define([epiphany_version_minor],[10])
304-m4_define([epiphany_version_micro],[3])
305-m4_define([epiphany_version],[epiphany_version_major.epiphany_version_minor.epiphany_version_micro])
306-
307-AC_INIT([GNOME Web Browser],[epiphany_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=epiphany],[epiphany])
308-
309-AC_PREREQ([2.59])
310-
311-AC_CONFIG_MACRO_DIR([m4])
312-AC_CONFIG_HEADERS([config.h])
313-AC_CONFIG_SRCDIR([configure.ac])
314-
315-AC_SUBST([EPIPHANY_MAJOR],[epiphany_version_major.epiphany_version_minor])
316-
317-# for EPHY_CHECK_VERSION
318-AC_SUBST([EPIPHANY_MAJOR_VERSION], [epiphany_version_major])
319-AC_SUBST([EPIPHANY_MINOR_VERSION], [epiphany_version_minor])
320-AC_SUBST([EPIPHANY_MICRO_VERSION], [epiphany_version_micro])
321-
322-AM_INIT_AUTOMAKE([1.11 foreign dist-xz no-dist-gzip tar-ustar])
323-
324-# Use AM_SILENT_RULES if present
325-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
326-
327-AM_MAINTAINER_MODE([enable])
328-
329-# Initialize libtool
330-LT_PREREQ(2.2)
331-LT_INIT([dlopen disable-static])
332-
333-AC_PROG_CC
334-
335-AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
336-AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
337-
338-IT_PROG_INTLTOOL([0.50.0])
339-
340-GLIB_GSETTINGS
341-
342-PKG_PROG_PKG_CONFIG
343-
344-GNOME_DEBUG_CHECK
345-GNOME_COMPILE_WARNINGS([maximum])
346-GNOME_MAINTAINER_MODE_DEFINES
347-
348-GNOME_CODE_COVERAGE
349-
350-MORE_WARN_FLAGS="-Wdeclaration-after-statement"
351-
352-GLIB_REQUIRED=2.35.6
353-GTK_REQUIRED=3.9.12
354-LIBXML_REQUIRED=2.6.12
355-LIBXSLT_REQUIRED=1.1.7
356-WEBKIT_GTK_REQUIRED=2.2.2
357-LIBSOUP_REQUIRED=2.42.1
358-GNOME_DESKTOP_REQUIRED=2.91.2
359-LIBSECRET_REQUIRED=0.14
360-GSETTINGS_DESKTOP_SCHEMAS_REQUIRED=0.0.1
361-LIBNOTIFY_REQUIRED=0.5.1
362-GCR_REQUIRED=3.5.5
363-AVAHI_REQUIRED=0.6.22
364-
365-WEBKIT_GTK_PC_NAME=webkit2gtk-3.0
366-AC_DEFINE([HAVE_WEBKIT2],[1],[Define if building with WebKit2])
367-AM_CONDITIONAL(WITH_WEBKIT2, [test "yes" = "yes"])
368-
369-# Tests
370-
371-AC_MSG_CHECKING([whether to build tests])
372-AC_ARG_ENABLE([tests],
373- AS_HELP_STRING([--enable-tests],[Wheter to build tests (default: yes)]),
374- [], [enable_tests=yes])
375-AC_MSG_RESULT([$enable_tests])
376-
377-AM_CONDITIONAL([ENABLE_TESTS],[test "$enable_tests" = "yes"])
378-
379-PKG_CHECK_MODULES([DEPENDENCIES], [
380- glib-2.0 >= $GLIB_REQUIRED
381- gmodule-2.0
382- gthread-2.0
383- gio-unix-2.0 >= $GLIB_REQUIRED
384- gtk+-3.0 >= $GTK_REQUIRED
385- gtk+-unix-print-3.0 >= $GTK_REQUIRED
386- x11
387- libwnck-3.0
388- libxml-2.0 >= $LIBXML_REQUIRED
389- libxslt >= $LIBXSLT_REQUIRED
390- $WEBKIT_GTK_PC_NAME >= $WEBKIT_GTK_REQUIRED
391- libsoup-2.4 >= $LIBSOUP_REQUIRED
392- libsecret-1 >= $LIBSECRET_REQUIRED
393- gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED
394- gsettings-desktop-schemas >= $GSETTINGS_DESKTOP_SCHEMAS_REQUIRED
395- libnotify >= $LIBNOTIFY_REQUIRED
396- sqlite3
397- gcr-3 >= $GCR_REQUIRED
398- avahi-gobject >= $AVAHI_REQUIRED
399- avahi-client >= $AVAHI_REQUIRED
400- ])
401-
402-PKG_CHECK_MODULES(WEB_EXTENSION, [
403- $WEBKIT_GTK_PC_NAME >= $WEBKIT_GTK_REQUIRED
404- libsecret-1 >= $LIBSECRET_REQUIRED
405- ])
406-AC_SUBST(WEB_EXTENSION_CFLAGS)
407-AC_SUBST(WEB_EXTENSION_LIBS)
408-
409-# ******************
410-# Portability checks
411-# ******************
412-
413-AC_CHECK_FUNCS([localtime_r memchr memmove memset mkdir mkdtemp realpath sqrt strchr strcspn strdup strerror strrchr strtol strtoul strstr])
414-
415-# for backtrace()
416-AC_CHECK_HEADERS([execinfo.h fcntl.h])
417-AC_C_INLINE
418-AC_FUNC_MKTIME
419-AC_FUNC_STRTOD
420-AC_TYPE_SIZE_T
421-
422-# ***************
423-# Multimedia keys
424-# ***************
425-
426-AC_CHECK_HEADERS([X11/XF86keysym.h])
427-
428-# ***
429-# NSS
430-# ***
431-
432-AC_MSG_CHECKING([whether NSS support is requested])
433-AC_ARG_ENABLE([nss],
434- [AS_HELP_STRING([--enable-nss], [Enable NSS support (default: enabled)])],
435- [], [enable_nss=yes])
436-AC_MSG_RESULT([$enable_nss])
437-
438-if test "$enable_nss" = "yes"; then
439- PKG_CHECK_MODULES([NSS], [nss])
440-
441- AC_DEFINE([ENABLE_NSS], [1], [Define to compile with NSS support])
442-fi
443-
444-AM_CONDITIONAL([ENABLE_NSS],[test "$enable_nss" = "yes"])
445-
446-# *******************************
447-# Add warning flags
448-# *******************************
449-
450-AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS $MORE_WARN_FLAGS"
451-AC_SUBST([AM_CPPFLAGS])
452-AC_SUBST([AM_CFLAGS])
453-AC_SUBST([AM_LDFLAGS])
454-
455-# *******************************
456-# Internationalization
457-# *******************************
458-
459-ISO_CODES_REQUIRED=0.35
460-
461-PKG_CHECK_EXISTS([iso-codes >= $ISO_CODES_REQUIRED],
462- [have_iso_codes=yes],[have_iso_codes=no])
463-
464-if test "$have_iso_codes" = "yes"; then
465- AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
466- if $PKG_CONFIG --variable=domains iso-codes | grep -q 639 && \
467- $PKG_CONFIG --variable=domains iso-codes | grep -q 3166 ; then
468- result=yes
469- else
470- result=no
471- have_iso_codes=no
472- fi
473- AC_MSG_RESULT([$result])
474-fi
475-
476-if test "$have_iso_codes" = "yes"; then
477- AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],["`$PKG_CONFIG --variable=prefix iso-codes`"],[ISO codes prefix])
478- AC_DEFINE([HAVE_ISO_CODES],[1],[Define if you have the iso-codes package])
479-else
480- AC_MSG_ERROR([iso-codes is required])
481-fi
482-
483-GETTEXT_PACKAGE=epiphany
484-AC_SUBST([GETTEXT_PACKAGE])
485-AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
486-AM_GLIB_GNU_GETTEXT
487-
488-# *******************************
489-# User help
490-# *******************************
491-
492-YELP_HELP_INIT
493-
494-# ****************
495-# Distributor name
496-# ****************
497-
498-AC_ARG_WITH([distributor-name],
499- AS_HELP_STRING([--with-distributor-name=name],[Set the distributor name]),
500- [LSB_DISTRIBUTOR="$withval"])
501-
502-if test -z "$LSB_DISTRIBUTOR"; then
503- AC_CHECK_PROGS([LSB_RELEASE], [lsb_release],)
504- if test -n "$LSB_RELEASE"; then
505- # Fallback on lsb_release if available
506- LSB_DISTRIBUTOR=$($LSB_RELEASE -i -s)
507- else
508- # Fallback on the product name
509- LSB_DISTRIBUTOR="Epiphany"
510- fi
511-fi
512-
513-AC_DEFINE_UNQUOTED([LSB_DISTRIBUTOR],["$LSB_DISTRIBUTOR"],[Distributor name])
514-
515-# ************
516-# Output files
517-# ************
518-
519-AC_DEFINE([EPIPHANY_COMPILATION],[1],[Compiling epiphany])
520-
521-AC_CONFIG_FILES([
522-Makefile
523-data/Makefile
524-data/epiphany.desktop.in
525-data/pages/Makefile
526-doc/Makefile
527-help/Makefile
528-lib/Makefile
529-lib/egg/Makefile
530-lib/history/Makefile
531-lib/widgets/Makefile
532-embed/Makefile
533-embed/web-extension/Makefile
534-src/Makefile
535-src/bookmarks/Makefile
536-po/Makefile.in
537-tests/Makefile
538-tests/data/Makefile
539-],
540-[])
541-
542-AC_OUTPUT
543-
544-# *************************************
545-# *************************************
546-
547-echo "
548-Epiphany was configured with the following options:
549-
550- Source code location : $srcdir
551- Compiler : $CC
552- Prefix : $prefix
553- Extra debugging support : $enable_debug
554- Build tests : $enable_tests
555- Code coverage : $enable_code_coverage
556-
557- NSS support : $enable_nss
558-"
559
560=== removed directory '.pc/00_epiphany-browser.patch/data'
561=== removed file '.pc/00_epiphany-browser.patch/data/epiphany.desktop.in.in'
562--- .pc/00_epiphany-browser.patch/data/epiphany.desktop.in.in 2013-03-20 20:45:41 +0000
563+++ .pc/00_epiphany-browser.patch/data/epiphany.desktop.in.in 1970-01-01 00:00:00 +0000
564@@ -1,18 +0,0 @@
565-[Desktop Entry]
566-_Name=Web
567-_GenericName=Web Browser
568-_X-GNOME-FullName=Epiphany Web Browser
569-_Comment=Browse the web
570-_Keywords=web;browser;internet;
571-Exec=epiphany %U
572-StartupNotify=true
573-Terminal=false
574-Type=Application
575-Icon=web-browser
576-X-GNOME-Bugzilla-Bugzilla=GNOME
577-X-GNOME-Bugzilla-Product=epiphany
578-X-GNOME-Bugzilla-Component=BugBuddyBugs
579-X-GNOME-Bugzilla-Version=@VERSION@
580-X-GNOME-UsesNotifications=true
581-Categories=Network;GNOME;GTK;WebBrowser;
582-MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;
583
584=== removed directory '.pc/00_epiphany-browser.patch/src'
585=== removed file '.pc/00_epiphany-browser.patch/src/ephy-main.c'
586--- .pc/00_epiphany-browser.patch/src/ephy-main.c 2013-11-03 18:56:59 +0000
587+++ .pc/00_epiphany-browser.patch/src/ephy-main.c 1970-01-01 00:00:00 +0000
588@@ -1,509 +0,0 @@
589-/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
590-/*
591- * Copyright © 2000-2002 Marco Pesenti Gritti
592- * Copyright © 2006, 2008 Christian Persch
593- * Copyright © 2011, 2012 Igalia S.L.
594- *
595- * This program is free software; you can redistribute it and/or modify
596- * it under the terms of the GNU General Public License as published by
597- * the Free Software Foundation; either version 2, or (at your option)
598- * any later version.
599- *
600- * This program is distributed in the hope that it will be useful,
601- * but WITHOUT ANY WARRANTY; without even the implied warranty of
602- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
603- * GNU General Public License for more details.
604- *
605- * You should have received a copy of the GNU General Public License
606- * along with this program; if not, write to the Free Software
607- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
608- *
609- */
610-
611-#include "config.h"
612-
613-#include "ephy-debug.h"
614-#include "ephy-file-helpers.h"
615-#include "ephy-initial-state.h"
616-#include "ephy-private.h"
617-#include "ephy-profile-utils.h"
618-#include "ephy-session.h"
619-#include "ephy-settings.h"
620-#include "ephy-shell.h"
621-#include "ephy-string.h"
622-#include "ephy-web-app-utils.h"
623-
624-#include <errno.h>
625-#include <glib/gi18n.h>
626-#include <gtk/gtk.h>
627-#include <libnotify/notify.h>
628-#include <libxml/xmlversion.h>
629-#include <string.h>
630-
631-#ifdef GDK_WINDOWING_X11
632-#include <gdk/gdkx.h>
633-#endif
634-
635-static gboolean open_in_new_tab = FALSE;
636-static gboolean open_in_new_window = FALSE;
637-
638-static char *session_filename = NULL;
639-static char *bookmark_url = NULL;
640-static char *bookmarks_file = NULL;
641-static char **arguments = NULL;
642-static char *application_to_delete = NULL;
643-
644-static gboolean private_instance = FALSE;
645-static gboolean incognito_mode = FALSE;
646-static gboolean application_mode = FALSE;
647-static gboolean headless_mode = FALSE;
648-static char *profile_directory = NULL;
649-
650-static gboolean
651-option_version_cb (const gchar *option_name,
652- const gchar *value,
653- gpointer data,
654- GError **error)
655-{
656- g_print ("%s %s\n", _("Web"), VERSION);
657-
658- exit (EXIT_SUCCESS);
659- return FALSE;
660-}
661-
662-static const GOptionEntry option_entries[] =
663-{
664- { "new-tab", 'n', 0, G_OPTION_ARG_NONE, &open_in_new_tab,
665- N_("Open a new tab in an existing browser window"), NULL },
666- { "new-window", 0, 0, G_OPTION_ARG_NONE, &open_in_new_window,
667- N_("Open a new browser window"), NULL },
668- { "import-bookmarks", '\0', 0, G_OPTION_ARG_FILENAME, &bookmarks_file,
669- N_("Import bookmarks from the given file"), N_("FILE") },
670- { "load-session", 'l', 0, G_OPTION_ARG_FILENAME, &session_filename,
671- N_("Load the given session file"), N_("FILE") },
672- { "add-bookmark", 't', 0, G_OPTION_ARG_STRING, &bookmark_url,
673- N_("Add a bookmark"), N_("URL") },
674- { "private-instance", 'p', 0, G_OPTION_ARG_NONE, &private_instance,
675- N_("Start a private instance"), NULL },
676- { "incognito-mode", 'i', 0, G_OPTION_ARG_NONE, &incognito_mode,
677- N_("Start an instance in incognito mode"), NULL },
678- { "netbank-mode", 0, 0, G_OPTION_ARG_NONE, &incognito_mode,
679- N_("Start an instance in netbank mode"), NULL },
680- { "application-mode", 'a', 0, G_OPTION_ARG_NONE, &application_mode,
681- N_("Start the browser in application mode"), NULL },
682- { "headless-mode", 0, 0, G_OPTION_ARG_NONE, &headless_mode,
683- N_("Start the application without opening windows"), NULL },
684- { "profile", 0, 0, G_OPTION_ARG_STRING, &profile_directory,
685- N_("Profile directory to use in the private instance"), N_("DIR") },
686- { G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_FILENAME_ARRAY, &arguments,
687- "", N_("URL …")},
688- { "version", 0, G_OPTION_FLAG_NO_ARG | G_OPTION_FLAG_HIDDEN,
689- G_OPTION_ARG_CALLBACK, option_version_cb, NULL, NULL },
690- { "delete-application", 0, 0, G_OPTION_ARG_STRING | G_OPTION_FLAG_HIDDEN,
691- &application_to_delete, NULL, NULL },
692- { NULL }
693-};
694-
695-/* adapted from gtk+/gdk/x11/gdkdisplay-x11.c */
696-static guint32
697-get_startup_id (void)
698-{
699- const char *startup_id, *time_str;
700- guint32 retval = 0;
701-
702- startup_id = g_getenv ("DESKTOP_STARTUP_ID");
703- if (startup_id == NULL) return 0;
704-
705- /* Find the launch time from the startup_id, if it's there. Newer spec
706- * states that the startup_id is of the form <unique>_TIME<timestamp>
707- */
708- time_str = g_strrstr (startup_id, "_TIME");
709- if (time_str != NULL) {
710- gulong value;
711- gchar *end;
712- errno = 0;
713-
714- /* Skip past the "_TIME" part */
715- time_str += 5;
716-
717- value = strtoul (time_str, &end, 0);
718- if (end != time_str && errno == 0)
719- retval = (guint32) value;
720- }
721-
722- return retval;
723-}
724-
725-#ifdef GDK_WINDOWING_X11
726-/*
727- * FIXME: Need a solution for windowing-systems other than X11.
728- */
729-
730-/* Copied from libnautilus/nautilus-program-choosing.c; Needed in case
731- * we have no DESKTOP_STARTUP_ID (with its accompanying timestamp).
732- */
733-static Time
734-slowly_and_stupidly_obtain_timestamp (Display *xdisplay)
735-{
736- Window xwindow;
737- XEvent event;
738-
739- {
740- XSetWindowAttributes attrs;
741- Atom atom_name;
742- Atom atom_type;
743- char* name;
744-
745- attrs.override_redirect = True;
746- attrs.event_mask = PropertyChangeMask | StructureNotifyMask;
747-
748- xwindow =
749- XCreateWindow (xdisplay,
750- RootWindow (xdisplay, 0),
751- -100, -100, 1, 1,
752- 0,
753- CopyFromParent,
754- CopyFromParent,
755- CopyFromParent,
756- CWOverrideRedirect | CWEventMask,
757- &attrs);
758-
759- atom_name = XInternAtom (xdisplay, "WM_NAME", TRUE);
760- g_assert (atom_name != None);
761- atom_type = XInternAtom (xdisplay, "STRING", TRUE);
762- g_assert (atom_type != None);
763-
764- name = "Fake Window";
765- XChangeProperty (xdisplay,
766- xwindow, atom_name,
767- atom_type,
768- 8, PropModeReplace, (unsigned char *)name, strlen (name));
769- }
770-
771- XWindowEvent (xdisplay,
772- xwindow,
773- PropertyChangeMask,
774- &event);
775-
776- XDestroyWindow(xdisplay, xwindow);
777-
778- return event.xproperty.time;
779-}
780-#endif
781-
782-static void
783-show_error_message (GError **error)
784-{
785- GtkWidget *dialog;
786-
787- /* FIXME better texts!!! */
788- dialog = gtk_message_dialog_new (NULL,
789- GTK_DIALOG_MODAL,
790- GTK_MESSAGE_ERROR,
791- GTK_BUTTONS_CLOSE,
792- _("Could not start Web"));
793- gtk_message_dialog_format_secondary_text
794- (GTK_MESSAGE_DIALOG (dialog),
795- _("Startup failed because of the following error:\n%s"),
796- (*error)->message);
797-
798- g_clear_error (error);
799-
800- gtk_dialog_run (GTK_DIALOG (dialog));
801-}
802-
803-static EphyStartupFlags
804-get_startup_flags (void)
805-{
806- EphyStartupFlags flags = 0;
807-
808- if (headless_mode)
809- return EPHY_STARTUP_OPEN_NOTHING;
810-
811- if (open_in_new_tab)
812- flags |= EPHY_STARTUP_NEW_TAB;
813- if (open_in_new_window)
814- flags |= EPHY_STARTUP_NEW_WINDOW;
815-
816- return flags;
817-}
818-
819-int
820-main (int argc,
821- char *argv[])
822-{
823- GOptionContext *option_context;
824- GOptionGroup *option_group;
825- GError *error = NULL;
826- guint32 user_time;
827- gboolean arbitrary_url;
828- EphyShellStartupContext *ctx;
829- EphyStartupFlags startup_flags;
830- EphyEmbedShellMode mode;
831- EphyShell *ephy_shell;
832- int status;
833- EphyFileHelpersFlags flags;
834-
835-#ifdef ENABLE_NLS
836- /* Initialize the i18n stuff */
837- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
838- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
839- textdomain (GETTEXT_PACKAGE);
840-#endif
841-
842- /* check libxml2 API version epiphany was compiled with against the
843- * version we're running with.
844- */
845- LIBXML_TEST_VERSION;
846-
847- notify_init (PACKAGE);
848-
849- /* If we're given -remote arguments, translate them */
850- if (argc >= 2 && strcmp (argv[1], "-remote") == 0) {
851- const char *opening, *closing;
852- char *command, *argument;
853- char **arguments;
854-
855- if (argc != 3) {
856- g_print ("-remote allows exactly one argument\n");
857- exit (1);
858- }
859-
860- opening = strchr (argv[2], '(');
861- closing = strchr (argv[2], ')');
862-
863- if (opening == NULL ||
864- closing == NULL ||
865- opening == argv[2] ||
866- opening + 1 >= closing) {
867- g_print ("Invalid argument for -remote\n");
868- exit (1);
869- }
870-
871- command = g_strstrip (g_strndup (argv[2], opening - argv[2]));
872-
873- /* See http://lxr.mozilla.org/seamonkey/source/xpfe/components/xremote/src/XRemoteService.cpp
874- * for the commands that mozilla supports; we'll just support openURL here.
875- */
876- if (g_ascii_strcasecmp (command, "openURL") != 0) {
877- g_print ("-remote command \"%s\" not supported\n", command);
878- g_free (command);
879- exit (1);
880- }
881-
882- g_free (command);
883-
884- argument = g_strstrip (g_strndup (opening + 1, closing - opening - 1));
885- arguments = g_strsplit (argument, ",", -1);
886- g_free (argument);
887- if (arguments == NULL) {
888- g_print ("Invalid argument for -remote\n");
889-
890- exit (1);
891- }
892-
893- /* replace arguments */
894- argv[1] = g_strstrip (g_strdup (arguments[0]));
895- argc = 2;
896-
897- g_strfreev (arguments);
898- }
899-
900- /* Initialise our debug helpers */
901- ephy_debug_init ();
902-
903- /* get this early, since gdk will unset the env var */
904- user_time = get_startup_id ();
905-
906- option_context = g_option_context_new ("");
907- option_group = g_option_group_new ("epiphany",
908- N_("Web"),
909- N_("Web options"),
910- NULL, NULL);
911-
912- g_option_group_set_translation_domain (option_group, GETTEXT_PACKAGE);
913-
914- g_option_group_add_entries (option_group, option_entries);
915-
916- g_option_context_set_main_group (option_context, option_group);
917-
918- g_option_context_add_group (option_context, gtk_get_option_group (TRUE));
919-
920- if (!g_option_context_parse (option_context, &argc, &argv, &error)) {
921- g_print ("Failed to parse arguments: %s\n", error->message);
922- g_error_free (error);
923- g_option_context_free (option_context);
924- exit (1);
925- }
926-
927- g_option_context_free (option_context);
928-
929- /* Some argument sanity checks*/
930- if (application_to_delete != NULL && argc > 3) {
931- g_print ("Cannot pass any other parameter when using --delete-application\n");
932- exit (1);
933- }
934-
935- if (private_instance == TRUE && application_mode == TRUE) {
936- g_print ("Cannot use --private-instance and --application-mode at the same time\n");
937- exit (1);
938- }
939-
940- if (application_mode && profile_directory == NULL) {
941- g_print ("--profile must be used when --application-mode is requested\n");
942- exit (1);
943- }
944-
945- if (application_mode && !g_file_test (profile_directory, G_FILE_TEST_IS_DIR)) {
946- g_print ("--profile must be an existing directory when --application-mode is requested\n");
947- exit (1);
948- }
949-
950- if (incognito_mode && profile_directory == NULL) {
951- g_print ("--incognito-mode needs a --profile parameter to steal the data from\n");
952- exit (1);
953- }
954-
955- /* Run the migration in all cases, except when running a private
956- instance without a given profile directory or running in
957- incognito mode. */
958- if (!(private_instance && profile_directory == NULL) && incognito_mode == FALSE) {
959- /* If the migration fails we don't really want to continue. */
960- if (!ephy_profile_utils_do_migration ((const char *)profile_directory, -1, FALSE)) {
961- g_print ("Failed to run the migrator process, Web will now abort.");
962- exit (1);
963- }
964- }
965-
966- /* Start our services */
967- flags = EPHY_FILE_HELPERS_ENSURE_EXISTS;
968-
969- if (incognito_mode || private_instance || application_mode)
970- flags |= EPHY_FILE_HELPERS_PRIVATE_PROFILE;
971- if (incognito_mode)
972- flags |= EPHY_FILE_HELPERS_STEAL_DATA;
973- if (profile_directory && !incognito_mode)
974- flags |= EPHY_FILE_HELPERS_KEEP_DIR;
975-
976- if (!ephy_file_helpers_init (profile_directory, flags,
977- &error)) {
978- show_error_message (&error);
979- exit (1);
980- }
981-
982- arbitrary_url = g_settings_get_boolean (EPHY_SETTINGS_LOCKDOWN,
983- EPHY_PREFS_LOCKDOWN_ARBITRARY_URL);
984-
985- if (arguments != NULL && arbitrary_url) {
986- g_print ("URL loading is locked down.\n");
987- exit (1);
988- }
989-
990- /* convert arguments to uris or at least to utf8 */
991- if (arguments != NULL) {
992- char **args = ephy_string_commandline_args_to_uris (arguments,
993- &error);
994- if (error) {
995- g_print ("Could not convert to UTF-8: %s!\n",
996- error->message);
997- g_error_free (error);
998- exit (1);
999- }
1000- g_strfreev (arguments);
1001- arguments = args;
1002- }
1003-
1004-#ifdef GDK_WINDOWING_X11
1005- /* Get a timestamp manually if need be */
1006- if (user_time == 0) {
1007- GdkDisplay* display =
1008- gdk_display_manager_get_default_display (gdk_display_manager_get ());
1009- if (GDK_IS_X11_DISPLAY (display))
1010- user_time =
1011- slowly_and_stupidly_obtain_timestamp (GDK_DISPLAY_XDISPLAY (display));
1012- }
1013-#endif
1014-
1015- /* Delete the requested web application, if any. Must happen after
1016- * ephy_file_helpers_init (). */
1017- if (application_to_delete) {
1018- ephy_web_application_delete (application_to_delete);
1019- exit (0);
1020- }
1021-
1022- /* Now create the shell */
1023- if (private_instance)
1024- mode = EPHY_EMBED_SHELL_MODE_PRIVATE;
1025- else if (incognito_mode) {
1026- mode = EPHY_EMBED_SHELL_MODE_INCOGNITO;
1027-
1028- /* Use the right theming. */
1029- g_object_set (gtk_settings_get_default (),
1030- "gtk-application-prefer-dark-theme", TRUE,
1031- NULL);
1032- } else if (application_mode) {
1033- char *app_name;
1034- char *app_icon;
1035-
1036- mode = EPHY_EMBED_SHELL_MODE_APPLICATION;
1037-
1038- app_name = g_strrstr (profile_directory, EPHY_WEB_APP_PREFIX);
1039- app_icon = g_build_filename (profile_directory, EPHY_WEB_APP_ICON_NAME, NULL);
1040-
1041- if (app_name) {
1042- /* Skip the 'app-' part */
1043- app_name += strlen (EPHY_WEB_APP_PREFIX);
1044-
1045- g_set_prgname (app_name);
1046- g_set_application_name (app_name);
1047-
1048- gtk_window_set_default_icon_from_file (app_icon, NULL);
1049-
1050- /* We need to re-set this because we have already parsed the
1051- * options, which inits GTK+ and sets this as a side effect. */
1052- gdk_set_program_class (app_name);
1053- }
1054-
1055- g_free (app_icon);
1056- } else if (profile_directory) {
1057- /* This mode exists purely for letting EphyShell know it should
1058- * not consider this instance part of the unique application
1059- * represented by the BROWSER mode.
1060- */
1061- mode = EPHY_EMBED_SHELL_MODE_STANDALONE;
1062- } else {
1063- mode = EPHY_EMBED_SHELL_MODE_BROWSER;
1064-
1065- g_set_prgname ("epiphany");
1066- g_set_application_name (_("Web"));
1067-
1068- gtk_window_set_default_icon_name ("web-browser");
1069- }
1070-
1071- _ephy_shell_create_instance (mode);
1072-
1073- startup_flags = get_startup_flags ();
1074- ctx = ephy_shell_startup_context_new (startup_flags,
1075- bookmarks_file,
1076- session_filename,
1077- bookmark_url,
1078- arguments,
1079- user_time);
1080- g_strfreev (arguments);
1081- ephy_shell = ephy_shell_get_default ();
1082- ephy_shell_set_startup_context (ephy_shell, ctx);
1083- status = g_application_run (G_APPLICATION (ephy_shell), argc, argv);
1084-
1085- /* Shutdown */
1086- g_object_unref (ephy_shell);
1087-
1088- if (notify_is_initted ())
1089- notify_uninit ();
1090-
1091- ephy_initial_state_save ();
1092- ephy_settings_shutdown ();
1093- ephy_file_helpers_shutdown ();
1094- xmlCleanupParser ();
1095-
1096- return status;
1097-}
1098
1099=== removed directory '.pc/01_with_webkit2.patch'
1100=== removed directory '.pc/01_with_webkit2.patch/lib'
1101=== removed directory '.pc/01_with_webkit2.patch/lib/widgets'
1102=== removed file '.pc/01_with_webkit2.patch/lib/widgets/ephy-overview-store.h'
1103--- .pc/01_with_webkit2.patch/lib/widgets/ephy-overview-store.h 2013-11-03 18:56:59 +0000
1104+++ .pc/01_with_webkit2.patch/lib/widgets/ephy-overview-store.h 1970-01-01 00:00:00 +0000
1105@@ -1,112 +0,0 @@
1106-/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
1107-/*
1108- * Copyright © 2012 Igalia S.L.
1109- *
1110- * This program is free software; you can redistribute it and/or modify
1111- * it under the terms of the GNU General Public License as published by
1112- * the Free Software Foundation; either version 2, or (at your option)
1113- * any later version.
1114- *
1115- * This program is distributed in the hope that it will be useful,
1116- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1117- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1118- * GNU General Public License for more details.
1119- *
1120- * You should have received a copy of the GNU General Public License
1121- * along with this program; if not, write to the Free Software
1122- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1123- *
1124- */
1125-
1126-#ifndef _EPHY_OVERVIEW_STORE_H
1127-#define _EPHY_OVERVIEW_STORE_H
1128-
1129-#include <gtk/gtk.h>
1130-#ifdef HAVE_WEBKIT2
1131-#include <webkit2/webkit2.h>
1132-#else
1133-#include <webkit/webkit.h>
1134-#endif
1135-#include "gd-main-view.h"
1136-
1137-G_BEGIN_DECLS
1138-
1139-#define EPHY_TYPE_OVERVIEW_STORE (ephy_overview_store_get_type())
1140-#define EPHY_OVERVIEW_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EPHY_TYPE_OVERVIEW_STORE, EphyOverviewStore))
1141-#define EPHY_OVERVIEW_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EPHY_TYPE_OVERVIEW_STORE, EphyOverviewStoreClass))
1142-#define EPHY_IS_OVERVIEW_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EPHY_TYPE_OVERVIEW_STORE))
1143-#define EPHY_IS_OVERVIEW_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EPHY_TYPE_OVERVIEW_STORE))
1144-#define EPHY_OVERVIEW_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EPHY_TYPE_OVERVIEW_STORE, EphyOverviewStoreClass))
1145-
1146-typedef struct _EphyOverviewStore EphyOverviewStore;
1147-typedef struct _EphyOverviewStoreClass EphyOverviewStoreClass;
1148-typedef struct _EphyOverviewStorePrivate EphyOverviewStorePrivate;
1149-
1150-struct _EphyOverviewStore
1151-{
1152- GtkListStore parent;
1153-
1154- EphyOverviewStorePrivate *priv;
1155-};
1156-
1157-struct _EphyOverviewStoreClass
1158-{
1159- GtkListStoreClass parent_class;
1160-};
1161-
1162-enum {
1163- EPHY_OVERVIEW_STORE_ID = GD_MAIN_COLUMN_ID,
1164- EPHY_OVERVIEW_STORE_URI = GD_MAIN_COLUMN_URI,
1165- EPHY_OVERVIEW_STORE_TITLE = GD_MAIN_COLUMN_TITLE,
1166- EPHY_OVERVIEW_STORE_AUTHOR = GD_MAIN_COLUMN_AUTHOR,
1167- EPHY_OVERVIEW_STORE_SNAPSHOT = GD_MAIN_COLUMN_ICON,
1168- EPHY_OVERVIEW_STORE_LAST_VISIT = GD_MAIN_COLUMN_MTIME,
1169- EPHY_OVERVIEW_STORE_SELECTED = GD_MAIN_COLUMN_SELECTED,
1170- EPHY_OVERVIEW_STORE_SNAPSHOT_CANCELLABLE,
1171- EPHY_OVERVIEW_STORE_SNAPSHOT_MTIME,
1172- EPHY_OVERVIEW_STORE_CLOSE_BUTTON_RENDER_POLICY,
1173- EPHY_OVERVIEW_STORE_NCOLS
1174-};
1175-
1176-GType ephy_overview_store_get_type (void) G_GNUC_CONST;
1177-
1178-void ephy_overview_store_peek_snapshot (EphyOverviewStore *self,
1179- WebKitWebView *webview,
1180- GtkTreeIter *iter);
1181-
1182-void ephy_overview_store_set_default_icon (EphyOverviewStore *store,
1183- GdkPixbuf *default_icon);
1184-
1185-void ephy_overview_store_set_icon_frame (EphyOverviewStore *store,
1186- GdkPixbuf *icon_frame);
1187-
1188-gboolean ephy_overview_store_needs_snapshot (EphyOverviewStore *store,
1189- GtkTreeIter *iter);
1190-
1191-gboolean ephy_overview_store_remove (EphyOverviewStore *store,
1192- GtkTreeIter *iter);
1193-
1194-
1195-typedef void (* EphyOverviewStoreAnimRemoveFunc) (EphyOverviewStore *store,
1196- GtkTreeIter *iter,
1197- gboolean valid,
1198- gpointer user_data);
1199-
1200-void ephy_overview_store_animated_remove (EphyOverviewStore *store,
1201- GtkTreeRowReference *ref,
1202- EphyOverviewStoreAnimRemoveFunc func,
1203- gpointer user_data);
1204-
1205-
1206-gboolean ephy_overview_store_find_url (EphyOverviewStore *store,
1207- const char *url,
1208- GtkTreeIter *iter);
1209-
1210-void ephy_overview_store_set_snapshot (EphyOverviewStore *store,
1211- GtkTreeIter *iter,
1212- cairo_surface_t *snapshot,
1213- cairo_surface_t *favicon);
1214-
1215-G_END_DECLS
1216-
1217-#endif /* _EPHY_OVERVIEW_STORE_H */
1218
1219=== added directory '.pc/07_bookmarks.patch'
1220=== removed directory '.pc/07_bookmarks.patch'
1221=== added file '.pc/07_bookmarks.patch/.timestamp'
1222=== added directory '.pc/07_bookmarks.patch/data'
1223=== removed directory '.pc/07_bookmarks.patch/data'
1224=== added file '.pc/07_bookmarks.patch/data/default-bookmarks.rdf.in'
1225--- .pc/07_bookmarks.patch/data/default-bookmarks.rdf.in 1970-01-01 00:00:00 +0000
1226+++ .pc/07_bookmarks.patch/data/default-bookmarks.rdf.in 2014-12-20 23:53:39 +0000
1227@@ -0,0 +1,37 @@
1228+<?xml version="1.0"?>
1229+<rdf:RDF xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ephy="http://gnome.org/ns/epiphany#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
1230+ <channel rdf:about="file://@pkgdatadir@/default-bookmarks.rdf">
1231+ <title>Web bookmarks</title>
1232+ <link>https://wiki.gnome.org/Apps/Web</link>
1233+ <items>
1234+ <rdf:Seq>
1235+ <rdf:li rdf:resource="https://duckduckgo.com"/>
1236+ </rdf:Seq>
1237+ </items>
1238+ </channel>
1239+ <item rdf:about="https://duckduckgo.com">
1240+ <_title>Search the web</_title>
1241+ <!-- Translators: you can use the regions listed in
1242+ https://duckduckgo.com/params to boost a particular region
1243+ associated with your language. For instance, for translators
1244+ to Finnish, it might make sense to add kl=fi-fi to the search
1245+ URL in order to boost results from Finland. Additionally, the
1246+ 'kad' parameter can be used to specify the locale in which
1247+ duckduckgo must be translated. So, for a Finnish localized
1248+ version of duckduckgo that will render results tailored for
1249+ Finland, the string would be:
1250+ https://duckduckgo.com/?t=epiphany&amp;kl=fi-fi&amp;kad=fi_FI
1251+ -->
1252+ <_link>https://duckduckgo.com/?t=epiphany</_link>
1253+ <!-- Translators: you can use the regions listed in
1254+ https://duckduckgo.com/params to boost a particular region
1255+ associated with your language. For instance, for translators
1256+ to Finnish, it might make sense to add kl=fi-fi to the search
1257+ URL in order to boost results from Finland. Additionally, the
1258+ 'kad' parameter can be used to specify the locale in which
1259+ duckduckgo must be translated. For such case, the search url
1260+ would be
1261+ https://duckduckgo.com/?q=%s&amp;t=epiphany&amp;kl=fi-fi&amp;kad=fi_FI -->
1262+ <_ephy:smartlink>https://duckduckgo.com/?q=%s&amp;t=epiphany</_ephy:smartlink>
1263+ </item>
1264+</rdf:RDF>
1265
1266=== removed file '.pc/07_bookmarks.patch/data/default-bookmarks.rdf.in'
1267--- .pc/07_bookmarks.patch/data/default-bookmarks.rdf.in 2013-11-03 18:56:59 +0000
1268+++ .pc/07_bookmarks.patch/data/default-bookmarks.rdf.in 1970-01-01 00:00:00 +0000
1269@@ -1,37 +0,0 @@
1270-<?xml version="1.0"?>
1271-<rdf:RDF xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ephy="http://gnome.org/ns/epiphany#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
1272- <channel rdf:about="file://@pkgdatadir@/default-bookmarks.rdf">
1273- <title>Epiphany bookmarks</title>
1274- <link>http://www.gnome.org/projects/epiphany/</link>
1275- <items>
1276- <rdf:Seq>
1277- <rdf:li rdf:resource="http://duckduckgo.com"/>
1278- </rdf:Seq>
1279- </items>
1280- </channel>
1281- <item rdf:about="http://duckduckgo.com">
1282- <_title>Search the web</_title>
1283- <!-- Translators: you can use the regions listed in
1284- https://duckduckgo.com/params to boost a particular region
1285- associated with your language. For instance, for translators
1286- to Finnish, it might make sense to add kl=fi-fi to the search
1287- URL in order to boost results from Finland. Additionally, the
1288- 'kad' parameter can be used to specify the locale in which
1289- duckduckgo must be translated. So, for a Finnish localized
1290- version of duckduckgo that will render results tailored for
1291- Finland, the string would be:
1292- http://duckduckgo.com/?t=epiphany&amp;kl=fi-fi&amp;kad=fi_FI
1293- -->
1294- <_link>http://duckduckgo.com/?t=epiphany</_link>
1295- <!-- Translators: you can use the regions listed in
1296- https://duckduckgo.com/params to boost a particular region
1297- associated with your language. For instance, for translators
1298- to Finnish, it might make sense to add kl=fi-fi to the search
1299- URL in order to boost results from Finland. Additionally, the
1300- 'kad' parameter can be used to specify the locale in which
1301- duckduckgo must be translated. For such case, the search url
1302- would be
1303- http://duckduckgo.com/?q=%s&amp;t=epiphany&amp;kl=fi-fi&amp;kad=fi_FI -->
1304- <_ephy:smartlink>http://duckduckgo.com/?q=%s&amp;t=epiphany</_ephy:smartlink>
1305- </item>
1306-</rdf:RDF>
1307
1308=== added directory '.pc/12_safetypes.patch'
1309=== removed directory '.pc/12_safetypes.patch'
1310=== added file '.pc/12_safetypes.patch/.timestamp'
1311=== added directory '.pc/12_safetypes.patch/data'
1312=== removed directory '.pc/12_safetypes.patch/data'
1313=== added file '.pc/12_safetypes.patch/data/mime-types-permissions.xml'
1314--- .pc/12_safetypes.patch/data/mime-types-permissions.xml 1970-01-01 00:00:00 +0000
1315+++ .pc/12_safetypes.patch/data/mime-types-permissions.xml 2014-12-20 23:53:39 +0000
1316@@ -0,0 +1,482 @@
1317+<mime-types-permissions>
1318+<safe>
1319+<mime-type type="application/andrew-inset"/>
1320+<mime-type type="application/dicom"/>
1321+<mime-type type="application/illustrator"/>
1322+<mime-type type="application/mathematica"/>
1323+<mime-type type="application/msexcel"/>
1324+<mime-type type="application/msword"/>
1325+<mime-type type="application/octet-stream"/>
1326+<mime-type type="application/oda"/>
1327+<mime-type type="application/ogg"/>
1328+<mime-type type="application/pdf"/>
1329+<mime-type type="application/pgp"/>
1330+<mime-type type="application/pgp-encrypted"/>
1331+<mime-type type="application/pgp-keys"/>
1332+<mime-type type="application/pgp-signature"/>
1333+<mime-type type="application/pkcs7-mime"/>
1334+<mime-type type="application/pkcs7-signature"/>
1335+<mime-type type="application/postscript"/>
1336+<mime-type type="application/ram"/>
1337+<mime-type type="application/rdf+xml"/>
1338+<mime-type type="application/rtf"/>
1339+<mime-type type="application/sdp"/>
1340+<mime-type type="application/smil"/>
1341+<mime-type type="application/stuffit"/>
1342+<mime-type type="application/vlc"/>
1343+<mime-type type="application/vnd.corel-draw"/>
1344+<mime-type type="application/vnd.emusic-emusic_package"/>
1345+<mime-type type="application/vnd.lotus-1-2-3"/>
1346+<mime-type type="application/vnd.ms-excel"/>
1347+<mime-type type="application/vnd.ms-powerpoint"/>
1348+<mime-type type="application/vnd.ms-word"/>
1349+<mime-type type="application/vnd.oasis.opendocument.text"/>
1350+<mime-type type="application/vnd.oasis.opendocument.text-template"/>
1351+<mime-type type="application/vnd.oasis.opendocument.text-web"/>
1352+<mime-type type="application/vnd.oasis.opendocument.text-master"/>
1353+<mime-type type="application/vnd.oasis.opendocument.graphics"/>
1354+<mime-type type="application/vnd.oasis.opendocument.graphics-template"/>
1355+<mime-type type="application/vnd.oasis.opendocument.presentation"/>
1356+<mime-type type="application/vnd.oasis.opendocument.presentation-template"/>
1357+<mime-type type="application/vnd.oasis.opendocument.spreadsheet"/>
1358+<mime-type type="application/vnd.oasis.opendocument.spreadsheet-template"/>
1359+<mime-type type="application/vnd.oasis.opendocument.chart"/>
1360+<mime-type type="application/vnd.oasis.opendocument.formula"/>
1361+<mime-type type="application/vnd.oasis.opendocument.database"/>
1362+<mime-type type="application/vnd.oasis.opendocument.image"/>
1363+<mime-type type="application/vnd.rn-realmedia"/>
1364+<mime-type type="application/vnd.stardivision.calc"/>
1365+<mime-type type="application/vnd.stardivision.chart"/>
1366+<mime-type type="application/vnd.stardivision.draw"/>
1367+<mime-type type="application/vnd.stardivision.impress"/>
1368+<mime-type type="application/vnd.stardivision.mail"/>
1369+<mime-type type="application/vnd.stardivision.math"/>
1370+<mime-type type="application/vnd.stardivision.writer"/>
1371+<mime-type type="application/vnd.sun.xml.calc"/>
1372+<mime-type type="application/vnd.sun.xml.calc.template"/>
1373+<mime-type type="application/vnd.sun.xml.draw"/>
1374+<mime-type type="application/vnd.sun.xml.draw.template"/>
1375+<mime-type type="application/vnd.sun.xml.impress"/>
1376+<mime-type type="application/vnd.sun.xml.impress.template"/>
1377+<mime-type type="application/vnd.sun.xml.math"/>
1378+<mime-type type="application/vnd.sun.xml.writer"/>
1379+<mime-type type="application/vnd.sun.xml.writer.global"/>
1380+<mime-type type="application/vnd.sun.xml.writer.template"/>
1381+<mime-type type="application/vnd.wordperfect"/>
1382+<mime-type type="application/wordperfect"/>
1383+<mime-type type="application/x-7z-compressed"/>
1384+<mime-type type="application/x-abiword"/>
1385+<mime-type type="application/x-amipro"/>
1386+<mime-type type="application/x-applix-spreadsheet"/>
1387+<mime-type type="application/x-applix-word"/>
1388+<mime-type type="application/x-archive"/>
1389+<mime-type type="application/x-arj"/>
1390+<mime-type type="application/x-asp"/>
1391+<mime-type type="application/x-bcpio"/>
1392+<mime-type type="application/x-bittorrent"/>
1393+<mime-type type="application/x-blender"/>
1394+<mime-type type="application/x-bzip"/>
1395+<mime-type type="application/x-bzip2"/>
1396+<mime-type type="application/x-bzip-compressed-tar"/>
1397+<mime-type type="application/x-cd-image"/>
1398+<mime-type type="application/x-cgi"/>
1399+<mime-type type="application/x-chess-pgn"/>
1400+<mime-type type="application/x-chm"/>
1401+<mime-type type="application/x-compress"/>
1402+<mime-type type="application/x-compressed-tar"/>
1403+<mime-type type="application/x-cpio"/>
1404+<mime-type type="application/x-cpio-compressed"/>
1405+<mime-type type="application/x-dbase"/>
1406+<mime-type type="application/x-dbm"/>
1407+<mime-type type="application/x-designer"/>
1408+<mime-type type="application/x-desktop"/>
1409+<mime-type type="application/x-dia-diagram"/>
1410+<mime-type type="application/x-dvi"/>
1411+<mime-type type="application/x-e-theme"/>
1412+<mime-type type="application/x-egon"/>
1413+<mime-type type="application/x-excellon"/>
1414+<mime-type type="application/x-flash-video"/>
1415+<mime-type type="application/x-font"/>
1416+<mime-type type="application/x-font-afm"/>
1417+<mime-type type="application/x-font-bdf"/>
1418+<mime-type type="application/x-font-dos"/>
1419+<mime-type type="application/x-font-framemaker"/>
1420+<mime-type type="application/x-font-libgrx"/>
1421+<mime-type type="application/x-font-linux-psf"/>
1422+<mime-type type="application/x-font-otf"/>
1423+<mime-type type="application/x-font-pcf"/>
1424+<mime-type type="application/x-font-speedo"/>
1425+<mime-type type="application/x-font-sunos-news"/>
1426+<mime-type type="application/x-font-tex"/>
1427+<mime-type type="application/x-font-tex-tfm"/>
1428+<mime-type type="application/x-font-ttf"/>
1429+<mime-type type="application/x-font-type1"/>
1430+<mime-type type="application/x-font-vfont"/>
1431+<mime-type type="application/x-frame"/>
1432+<mime-type type="application/x-gdbm"/>
1433+<mime-type type="application/x-geda-gsch2pcb-project"/>
1434+<mime-type type="application/x-geda-schematic"/>
1435+<mime-type type="application/x-geda-symbol"/>
1436+<mime-type type="application/x-gerber"/>
1437+<mime-type type="application/x-gettext-translation"/>
1438+<mime-type type="application/x-glade"/>
1439+<mime-type type="application/x-gmc-link"/>
1440+<mime-type type="application/x-gnome-app-info"/>
1441+<mime-type type="application/x-gnucash"/>
1442+<mime-type type="application/x-gnumeric"/>
1443+<mime-type type="application/x-graphite"/>
1444+<mime-type type="application/x-gtar"/>
1445+<mime-type type="application/x-gtktalog"/>
1446+<mime-type type="application/x-gzip"/>
1447+<mime-type type="application/x-gzpostscript"/>
1448+<mime-type type="application/x-hdf"/>
1449+<mime-type type="application/x-jar"/>
1450+<mime-type type="application/x-java"/>
1451+<mime-type type="application/x-java-jnlp-file"/>
1452+<mime-type type="application/x-jbuilder-project"/>
1453+<mime-type type="application/x-karbon"/>
1454+<mime-type type="application/x-kchart"/>
1455+<mime-type type="application/x-kformula"/>
1456+<mime-type type="application/x-killustrator"/>
1457+<mime-type type="application/x-kivio"/>
1458+<mime-type type="application/x-kontour"/>
1459+<mime-type type="application/x-kpovmodeler"/>
1460+<mime-type type="application/x-kpresenter"/>
1461+<mime-type type="application/x-krita"/>
1462+<mime-type type="application/x-kspread"/>
1463+<mime-type type="application/x-kspread-crypt"/>
1464+<mime-type type="application/x-ksysv-package"/>
1465+<mime-type type="application/x-kugar"/>
1466+<mime-type type="application/x-kword"/>
1467+<mime-type type="application/x-kword-crypt"/>
1468+<mime-type type="application/x-lha"/>
1469+<mime-type type="application/x-lhz"/>
1470+<mime-type type="application/x-linguist"/>
1471+<mime-type type="application/x-lyx"/>
1472+<mime-type type="application/x-lzop"/>
1473+<mime-type type="application/x-magicpoint"/>
1474+<mime-type type="application/x-matroska"/>
1475+<mime-type type="application/x-mif"/>
1476+<mime-type type="application/x-mozilla-bookmarks"/>
1477+<mime-type type="application/x-mswinurl"/>
1478+<mime-type type="application/x-mswrite"/>
1479+<mime-type type="application/x-nautilus-link"/>
1480+<mime-type type="application/x-netcdf"/>
1481+<mime-type type="application/x-netscape-bookmarks"/>
1482+<mime-type type="application/x-netshow-channel"/>
1483+<mime-type type="application/x-ogg"/>
1484+<mime-type type="application/x-oleo"/>
1485+<mime-type type="application/x-palm-database"/>
1486+<mime-type type="application/x-pcb-layout"/>
1487+<mime-type type="application/x-pcb-footprint"/>
1488+<mime-type type="application/x-pcb-netlist"/>
1489+<mime-type type="application/x-pdf"/>
1490+<mime-type type="application/x-php"/>
1491+<mime-type type="application/x-pkcs12"/>
1492+<mime-type type="application/x-profile"/>
1493+<mime-type type="application/x-pw"/>
1494+<mime-type type="application/x-quattropro"/>
1495+<mime-type type="application/x-quicktime-media-link"/>
1496+<mime-type type="application/x-quicktimeplayer"/>
1497+<mime-type type="application/x-qw"/>
1498+<mime-type type="application/x-rar"/>
1499+<mime-type type="application/x-reject"/>
1500+<mime-type type="application/x-rpm"/>
1501+<mime-type type="application/x-sc"/>
1502+<mime-type type="application/x-shar"/>
1503+<mime-type type="application/x-shared-library-la"/>
1504+<mime-type type="application/x-shockwave-flash"/>
1505+<mime-type type="application/x-siag"/>
1506+<mime-type type="application/x-sit"/>
1507+<mime-type type="application/x-slp"/>
1508+<mime-type type="application/x-smil"/>
1509+<mime-type type="application/x-stuffit"/>
1510+<mime-type type="application/x-sv4cpio"/>
1511+<mime-type type="application/x-sv4crc"/>
1512+<mime-type type="application/x-tar"/>
1513+<mime-type type="application/x-tarz"/>
1514+<mime-type type="application/x-tex-gf"/>
1515+<mime-type type="application/x-tex-pk"/>
1516+<mime-type type="application/x-tgif"/>
1517+<mime-type type="application/x-theme"/>
1518+<mime-type type="application/x-toutdoux"/>
1519+<mime-type type="application/x-trash"/>
1520+<mime-type type="application/x-troff"/>
1521+<mime-type type="application/x-troff-man"/>
1522+<mime-type type="application/x-troff-man-compressed"/>
1523+<mime-type type="application/x-tzo"/>
1524+<mime-type type="application/x-ustar"/>
1525+<mime-type type="application/x-wais-source"/>
1526+<mime-type type="application/x-wordperfect"/>
1527+<mime-type type="application/x-wpg"/>
1528+<mime-type type="application/x-x509-ca-cert"/>
1529+<mime-type type="application/x-xbel"/>
1530+<mime-type type="application/x-zerosize"/>
1531+<mime-type type="application/x-zip-compressed"/>
1532+<mime-type type="application/x-zoo"/>
1533+<mime-type type="application/xhtml+xml"/>
1534+<mime-type type="application/zip"/>
1535+<mime-type type="audio/ac3"/>
1536+<mime-type type="audio/AMR"/>
1537+<mime-type type="audio/AMR-WB"/>
1538+<mime-type type="audio/basic"/>
1539+<mime-type type="audio/midi"/>
1540+<mime-type type="audio/mpeg"/>
1541+<mime-type type="audio/mpegurl"/>
1542+<mime-type type="audio/ogg"/>
1543+<mime-type type="audio/playlist"/>
1544+<mime-type type="audio/prs.sid"/>
1545+<mime-type type="audio/vnd.rn-realaudio"/>
1546+<mime-type type="audio/vnd.wave"/>
1547+<mime-type type="audio/x-vorbis"/>
1548+<mime-type type="audio/wav"/>
1549+<mime-type type="audio/x-adpcm"/>
1550+<mime-type type="audio/x-aifc"/>
1551+<mime-type type="audio/x-aiff"/>
1552+<mime-type type="audio/x-aiffc"/>
1553+<mime-type type="audio/x-ape"/>
1554+<mime-type type="audio/x-flac"/>
1555+<mime-type type="audio/x-it"/>
1556+<mime-type type="audio/x-m4a"/>
1557+<mime-type type="audio/x-matroska"/>
1558+<mime-type type="audio/x-midi"/>
1559+<mime-type type="audio/x-mod"/>
1560+<mime-type type="audio/x-mp3"/>
1561+<mime-type type="audio/x-mp3-playlist"/>
1562+<mime-type type="audio/x-mpeg"/>
1563+<mime-type type="audio/x-mpegurl"/>
1564+<mime-type type="audio/x-ms-asx"/>
1565+<mime-type type="audio/x-ms-wax"/>
1566+<mime-type type="audio/x-musepack"/>
1567+<mime-type type="audio/x-pn-realaudio"/>
1568+<mime-type type="audio/x-pn-realaudio-plugin"/>
1569+<mime-type type="audio/x-realaudio"/>
1570+<mime-type type="audio/x-real-audio"/>
1571+<mime-type type="audio/x-riff"/>
1572+<mime-type type="audio/x-s3m"/>
1573+<mime-type type="audio/x-sbc"/>
1574+<mime-type type="audio/x-scpls"/>
1575+<mime-type type="audio/x-stm"/>
1576+<mime-type type="audio/x-tta"/>
1577+<mime-type type="audio/x-voc"/>
1578+<mime-type type="audio/x-wav"/>
1579+<mime-type type="audio/x-wavpack"/>
1580+<mime-type type="audio/x-xi"/>
1581+<mime-type type="audio/x-xm"/>
1582+<mime-type type="image/bmp"/>
1583+<mime-type type="image/cgm"/>
1584+<mime-type type="image/dpx"/>
1585+<mime-type type="image/fax-g3"/>
1586+<mime-type type="image/g3fax"/>
1587+<mime-type type="image/gif"/>
1588+<mime-type type="image/ief"/>
1589+<mime-type type="image/jpeg"/>
1590+<mime-type type="image/jpeg2000"/>
1591+<mime-type type="image/png"/>
1592+<mime-type type="image/rle"/>
1593+<mime-type type="image/svg+xml"/>
1594+<mime-type type="image/tiff"/>
1595+<mime-type type="image/vnd.djvu"/>
1596+<mime-type type="image/vnd.dwg"/>
1597+<mime-type type="image/vnd.dxf"/>
1598+<mime-type type="image/x-3ds"/>
1599+<mime-type type="image/x-applix-graphics"/>
1600+<mime-type type="image/x-cmu-raster"/>
1601+<mime-type type="image/x-compressed-xcf"/>
1602+<mime-type type="image/x-dcm"/>
1603+<mime-type type="image/x-dib"/>
1604+<mime-type type="image/x-djvu"/>
1605+<mime-type type="image/x-eps"/>
1606+<mime-type type="image/x-fits"/>
1607+<mime-type type="image/x-fpx"/>
1608+<mime-type type="image/x-icb"/>
1609+<mime-type type="image/x-ico"/>
1610+<mime-type type="image/x-iff"/>
1611+<mime-type type="image/x-ilbm"/>
1612+<mime-type type="image/x-jng"/>
1613+<mime-type type="image/x-lwo"/>
1614+<mime-type type="image/x-lws"/>
1615+<mime-type type="image/x-msod"/>
1616+<mime-type type="image/x-niff"/>
1617+<mime-type type="image/x-pcx"/>
1618+<mime-type type="image/x-photo-cd"/>
1619+<mime-type type="image/x-pict"/>
1620+<mime-type type="image/x-png"/>
1621+<mime-type type="image/x-portable-anymap"/>
1622+<mime-type type="image/x-portable-bitmap"/>
1623+<mime-type type="image/x-portable-graymap"/>
1624+<mime-type type="image/x-portable-pixmap"/>
1625+<mime-type type="image/x-psd"/>
1626+<mime-type type="image/x-rgb"/>
1627+<mime-type type="image/x-sgi"/>
1628+<mime-type type="image/x-sun-raster"/>
1629+<mime-type type="image/x-tga"/>
1630+<mime-type type="image/x-win-bitmap"/>
1631+<mime-type type="image/x-wmf"/>
1632+<mime-type type="image/x-xbitmap"/>
1633+<mime-type type="image/x-xcf"/>
1634+<mime-type type="image/x-xfig"/>
1635+<mime-type type="image/x-xpixmap"/>
1636+<mime-type type="image/x-xwindowdump"/>
1637+<mime-type type="message/delivery-status"/>
1638+<mime-type type="message/disposition-notification"/>
1639+<mime-type type="message/external-body"/>
1640+<mime-type type="message/news"/>
1641+<mime-type type="message/partial"/>
1642+<mime-type type="message/rfc822"/>
1643+<mime-type type="message/x-gnu-rmail"/>
1644+<mime-type type="model/vrml"/>
1645+<mime-type type="multipart/alternative"/>
1646+<mime-type type="multipart/appledouble"/>
1647+<mime-type type="multipart/digest"/>
1648+<mime-type type="multipart/encrypted"/>
1649+<mime-type type="multipart/mixed"/>
1650+<mime-type type="multipart/related"/>
1651+<mime-type type="multipart/report"/>
1652+<mime-type type="multipart/signed"/>
1653+<mime-type type="multipart/x-mixed-replace"/>
1654+<mime-type type="text/calendar"/>
1655+<mime-type type="text/css"/>
1656+<mime-type type="text/csv"/>
1657+<mime-type type="text/directory"/>
1658+<mime-type type="text/enriched"/>
1659+<mime-type type="text/google-video-pointer"/>
1660+<mime-type type="text/html"/>
1661+<mime-type type="text/htmlh"/>
1662+<mime-type type="text/mathml"/>
1663+<mime-type type="text/plain"/>
1664+<mime-type type="text/rdf"/>
1665+<mime-type type="text/rfc822-headers"/>
1666+<mime-type type="text/richtext"/>
1667+<mime-type type="text/rss"/>
1668+<mime-type type="text/rtf"/>
1669+<mime-type type="text/sgml"/>
1670+<mime-type type="text/spreadsheet"/>
1671+<mime-type type="text/tab-separated-values"/>
1672+<mime-type type="text/vnd.wap.wml"/>
1673+<mime-type type="text/x-adasrc"/>
1674+<mime-type type="text/x-authors"/>
1675+<mime-type type="text/x-bibtex"/>
1676+<mime-type type="text/x-c++hdr"/>
1677+<mime-type type="text/x-c++src"/>
1678+<mime-type type="text/x-chdr"/>
1679+<mime-type type="text/x-comma-separated-values"/>
1680+<mime-type type="text/x-copying"/>
1681+<mime-type type="text/x-credits"/>
1682+<mime-type type="text/x-csharp"/>
1683+<mime-type type="text/x-csrc"/>
1684+<mime-type type="text/x-dcl"/>
1685+<mime-type type="text/x-diff"/>
1686+<mime-type type="text/x-dsl"/>
1687+<mime-type type="text/x-dsrc"/>
1688+<mime-type type="text/x-dtd"/>
1689+<mime-type type="text/x-emacs-lisp"/>
1690+<mime-type type="text/x-fortran"/>
1691+<mime-type type="text/x-gettext-translation"/>
1692+<mime-type type="text/x-gettext-translation-template"/>
1693+<mime-type type="text/x-google-video-pointer"/>
1694+<mime-type type="text/x-gtkrc"/>
1695+<mime-type type="text/x-haskell"/>
1696+<mime-type type="text/x-idl"/>
1697+<mime-type type="text/x-install"/>
1698+<mime-type type="text/x-java"/>
1699+<mime-type type="text/x-ksysv-log"/>
1700+<mime-type type="text/x-literate-haskell"/>
1701+<mime-type type="text/x-log"/>
1702+<mime-type type="text/x-makefile"/>
1703+<mime-type type="text/x-moc"/>
1704+<mime-type type="text/x-objcsrc"/>
1705+<mime-type type="text/x-pascal"/>
1706+<mime-type type="text/x-patch"/>
1707+<mime-type type="text/x-python"/>
1708+<mime-type type="text/x-readme"/>
1709+<mime-type type="text/x-scheme"/>
1710+<mime-type type="text/x-setext"/>
1711+<mime-type type="text/x-speech"/>
1712+<mime-type type="text/x-sql"/>
1713+<mime-type type="text/x-tcl"/>
1714+<mime-type type="text/x-tex"/>
1715+<mime-type type="text/x-texinfo"/>
1716+<mime-type type="text/x-troff-me"/>
1717+<mime-type type="text/x-troff-mm"/>
1718+<mime-type type="text/x-troff-ms"/>
1719+<mime-type type="text/x-uil"/>
1720+<mime-type type="text/x-uri"/>
1721+<mime-type type="text/x-vcalendar"/>
1722+<mime-type type="text/x-vcard"/>
1723+<mime-type type="text/x-xmi"/>
1724+<mime-type type="text/x-xslfo"/>
1725+<mime-type type="text/x-xslt"/>
1726+<mime-type type="text/xmcd"/>
1727+<mime-type type="text/xml"/>
1728+<mime-type type="video/flv"/>
1729+<mime-type type="video/isivideo"/>
1730+<mime-type type="video/mp4"/>
1731+<mime-type type="video/mpeg"/>
1732+<mime-type type="video/quicktime"/>
1733+<mime-type type="video/vivo"/>
1734+<mime-type type="video/wavelet"/>
1735+<mime-type type="video/x-anim"/>
1736+<mime-type type="video/x-avi"/>
1737+<mime-type type="video/x-flic"/>
1738+<mime-type type="video/x-flv"/>
1739+<mime-type type="video/x-m4v"/>
1740+<mime-type type="video/x-matroska"/>
1741+<mime-type type="video/x-mng"/>
1742+<mime-type type="video/x-ms-asf"/>
1743+<mime-type type="video/x-ms-asf-plugin"/>
1744+<mime-type type="video/x-ms-wmv"/>
1745+<mime-type type="video/x-ms-wvx"/>
1746+<mime-type type="video/x-msvideo"/>
1747+<mime-type type="video/x-nsv"/>
1748+<mime-type type="video/x-ogm+ogg"/>
1749+<mime-type type="video/x-real-video"/>
1750+<mime-type type="video/x-theora+ogg"/>
1751+<mime-type type="video/x-sgi-movie"/>
1752+</safe>
1753+<unsafe>
1754+<mime-type type="application/mac-binhex40"/>
1755+<mime-type type="application/vnd.hp-hpgl"/>
1756+<mime-type type="application/vnd.hp-pcl"/>
1757+<mime-type type="application/vnd.mozilla.xul+xml"/>
1758+<mime-type type="application/vnd.palm"/>
1759+<mime-type type="application/x-arc"/>
1760+<mime-type type="application/x-awk"/>
1761+<mime-type type="application/x-class-file"/>
1762+<mime-type type="application/x-core"/>
1763+<mime-type type="application/x-csh"/>
1764+<mime-type type="application/x-dc-rom"/>
1765+<mime-type type="application/x-deb"/>
1766+<mime-type type="application/x-executable"/>
1767+<mime-type type="application/x-gameboy-rom"/>
1768+<mime-type type="application/x-genesis-rom"/>
1769+<mime-type type="application/x-ipod-firmware"/>
1770+<mime-type type="application/x-javascript"/>
1771+<mime-type type="application/x-macbinary"/>
1772+<mime-type type="application/x-mplayer2"/>
1773+<mime-type type="application/x-ms-dos-executable"/>
1774+<mime-type type="application/x-msx-rom"/>
1775+<mime-type type="application/x-n64-rom"/>
1776+<mime-type type="application/x-nes-rom"/>
1777+<mime-type type="application/x-object"/>
1778+<mime-type type="application/x-ole-storage"/>
1779+<mime-type type="application/x-par2"/>
1780+<mime-type type="application/x-pef-executable"/>
1781+<mime-type type="application/x-perl"/>
1782+<mime-type type="application/x-python"/>
1783+<mime-type type="application/x-python-bytecode"/>
1784+<mime-type type="application/x-ruby"/>
1785+<mime-type type="application/x-sharedlib"/>
1786+<mime-type type="application/x-shellscript"/>
1787+<mime-type type="application/x-sms-rom"/>
1788+<mime-type type="application/x-xpinstall"/>
1789+<mime-type type="inode/blockdevice"/>
1790+<mime-type type="inode/chardevice"/>
1791+<mime-type type="inode/directory"/>
1792+<mime-type type="inode/fifo"/>
1793+<mime-type type="inode/mount-point"/>
1794+<mime-type type="inode/socket"/>
1795+<mime-type type="inode/symlink"/>
1796+<mime-type type="text/x-ksh"/>
1797+</unsafe>
1798+</mime-types-permissions>
1799
1800=== removed file '.pc/12_safetypes.patch/data/mime-types-permissions.xml'
1801--- .pc/12_safetypes.patch/data/mime-types-permissions.xml 2010-07-03 01:38:24 +0000
1802+++ .pc/12_safetypes.patch/data/mime-types-permissions.xml 1970-01-01 00:00:00 +0000
1803@@ -1,482 +0,0 @@
1804-<mime-types-permissions>
1805-<safe>
1806-<mime-type type="application/andrew-inset"/>
1807-<mime-type type="application/dicom"/>
1808-<mime-type type="application/illustrator"/>
1809-<mime-type type="application/mathematica"/>
1810-<mime-type type="application/msexcel"/>
1811-<mime-type type="application/msword"/>
1812-<mime-type type="application/octet-stream"/>
1813-<mime-type type="application/oda"/>
1814-<mime-type type="application/ogg"/>
1815-<mime-type type="application/pdf"/>
1816-<mime-type type="application/pgp"/>
1817-<mime-type type="application/pgp-encrypted"/>
1818-<mime-type type="application/pgp-keys"/>
1819-<mime-type type="application/pgp-signature"/>
1820-<mime-type type="application/pkcs7-mime"/>
1821-<mime-type type="application/pkcs7-signature"/>
1822-<mime-type type="application/postscript"/>
1823-<mime-type type="application/ram"/>
1824-<mime-type type="application/rdf+xml"/>
1825-<mime-type type="application/rtf"/>
1826-<mime-type type="application/sdp"/>
1827-<mime-type type="application/smil"/>
1828-<mime-type type="application/stuffit"/>
1829-<mime-type type="application/vlc"/>
1830-<mime-type type="application/vnd.corel-draw"/>
1831-<mime-type type="application/vnd.emusic-emusic_package"/>
1832-<mime-type type="application/vnd.lotus-1-2-3"/>
1833-<mime-type type="application/vnd.ms-excel"/>
1834-<mime-type type="application/vnd.ms-powerpoint"/>
1835-<mime-type type="application/vnd.ms-word"/>
1836-<mime-type type="application/vnd.oasis.opendocument.text"/>
1837-<mime-type type="application/vnd.oasis.opendocument.text-template"/>
1838-<mime-type type="application/vnd.oasis.opendocument.text-web"/>
1839-<mime-type type="application/vnd.oasis.opendocument.text-master"/>
1840-<mime-type type="application/vnd.oasis.opendocument.graphics"/>
1841-<mime-type type="application/vnd.oasis.opendocument.graphics-template"/>
1842-<mime-type type="application/vnd.oasis.opendocument.presentation"/>
1843-<mime-type type="application/vnd.oasis.opendocument.presentation-template"/>
1844-<mime-type type="application/vnd.oasis.opendocument.spreadsheet"/>
1845-<mime-type type="application/vnd.oasis.opendocument.spreadsheet-template"/>
1846-<mime-type type="application/vnd.oasis.opendocument.chart"/>
1847-<mime-type type="application/vnd.oasis.opendocument.formula"/>
1848-<mime-type type="application/vnd.oasis.opendocument.database"/>
1849-<mime-type type="application/vnd.oasis.opendocument.image"/>
1850-<mime-type type="application/vnd.rn-realmedia"/>
1851-<mime-type type="application/vnd.stardivision.calc"/>
1852-<mime-type type="application/vnd.stardivision.chart"/>
1853-<mime-type type="application/vnd.stardivision.draw"/>
1854-<mime-type type="application/vnd.stardivision.impress"/>
1855-<mime-type type="application/vnd.stardivision.mail"/>
1856-<mime-type type="application/vnd.stardivision.math"/>
1857-<mime-type type="application/vnd.stardivision.writer"/>
1858-<mime-type type="application/vnd.sun.xml.calc"/>
1859-<mime-type type="application/vnd.sun.xml.calc.template"/>
1860-<mime-type type="application/vnd.sun.xml.draw"/>
1861-<mime-type type="application/vnd.sun.xml.draw.template"/>
1862-<mime-type type="application/vnd.sun.xml.impress"/>
1863-<mime-type type="application/vnd.sun.xml.impress.template"/>
1864-<mime-type type="application/vnd.sun.xml.math"/>
1865-<mime-type type="application/vnd.sun.xml.writer"/>
1866-<mime-type type="application/vnd.sun.xml.writer.global"/>
1867-<mime-type type="application/vnd.sun.xml.writer.template"/>
1868-<mime-type type="application/vnd.wordperfect"/>
1869-<mime-type type="application/wordperfect"/>
1870-<mime-type type="application/x-7z-compressed"/>
1871-<mime-type type="application/x-abiword"/>
1872-<mime-type type="application/x-amipro"/>
1873-<mime-type type="application/x-applix-spreadsheet"/>
1874-<mime-type type="application/x-applix-word"/>
1875-<mime-type type="application/x-archive"/>
1876-<mime-type type="application/x-arj"/>
1877-<mime-type type="application/x-asp"/>
1878-<mime-type type="application/x-bcpio"/>
1879-<mime-type type="application/x-bittorrent"/>
1880-<mime-type type="application/x-blender"/>
1881-<mime-type type="application/x-bzip"/>
1882-<mime-type type="application/x-bzip2"/>
1883-<mime-type type="application/x-bzip-compressed-tar"/>
1884-<mime-type type="application/x-cd-image"/>
1885-<mime-type type="application/x-cgi"/>
1886-<mime-type type="application/x-chess-pgn"/>
1887-<mime-type type="application/x-chm"/>
1888-<mime-type type="application/x-compress"/>
1889-<mime-type type="application/x-compressed-tar"/>
1890-<mime-type type="application/x-cpio"/>
1891-<mime-type type="application/x-cpio-compressed"/>
1892-<mime-type type="application/x-dbase"/>
1893-<mime-type type="application/x-dbm"/>
1894-<mime-type type="application/x-designer"/>
1895-<mime-type type="application/x-desktop"/>
1896-<mime-type type="application/x-dia-diagram"/>
1897-<mime-type type="application/x-dvi"/>
1898-<mime-type type="application/x-e-theme"/>
1899-<mime-type type="application/x-egon"/>
1900-<mime-type type="application/x-excellon"/>
1901-<mime-type type="application/x-flash-video"/>
1902-<mime-type type="application/x-font"/>
1903-<mime-type type="application/x-font-afm"/>
1904-<mime-type type="application/x-font-bdf"/>
1905-<mime-type type="application/x-font-dos"/>
1906-<mime-type type="application/x-font-framemaker"/>
1907-<mime-type type="application/x-font-libgrx"/>
1908-<mime-type type="application/x-font-linux-psf"/>
1909-<mime-type type="application/x-font-otf"/>
1910-<mime-type type="application/x-font-pcf"/>
1911-<mime-type type="application/x-font-speedo"/>
1912-<mime-type type="application/x-font-sunos-news"/>
1913-<mime-type type="application/x-font-tex"/>
1914-<mime-type type="application/x-font-tex-tfm"/>
1915-<mime-type type="application/x-font-ttf"/>
1916-<mime-type type="application/x-font-type1"/>
1917-<mime-type type="application/x-font-vfont"/>
1918-<mime-type type="application/x-frame"/>
1919-<mime-type type="application/x-gdbm"/>
1920-<mime-type type="application/x-geda-gsch2pcb-project"/>
1921-<mime-type type="application/x-geda-schematic"/>
1922-<mime-type type="application/x-geda-symbol"/>
1923-<mime-type type="application/x-gerber"/>
1924-<mime-type type="application/x-gettext-translation"/>
1925-<mime-type type="application/x-glade"/>
1926-<mime-type type="application/x-gmc-link"/>
1927-<mime-type type="application/x-gnome-app-info"/>
1928-<mime-type type="application/x-gnucash"/>
1929-<mime-type type="application/x-gnumeric"/>
1930-<mime-type type="application/x-graphite"/>
1931-<mime-type type="application/x-gtar"/>
1932-<mime-type type="application/x-gtktalog"/>
1933-<mime-type type="application/x-gzip"/>
1934-<mime-type type="application/x-gzpostscript"/>
1935-<mime-type type="application/x-hdf"/>
1936-<mime-type type="application/x-jar"/>
1937-<mime-type type="application/x-java"/>
1938-<mime-type type="application/x-java-jnlp-file"/>
1939-<mime-type type="application/x-jbuilder-project"/>
1940-<mime-type type="application/x-karbon"/>
1941-<mime-type type="application/x-kchart"/>
1942-<mime-type type="application/x-kformula"/>
1943-<mime-type type="application/x-killustrator"/>
1944-<mime-type type="application/x-kivio"/>
1945-<mime-type type="application/x-kontour"/>
1946-<mime-type type="application/x-kpovmodeler"/>
1947-<mime-type type="application/x-kpresenter"/>
1948-<mime-type type="application/x-krita"/>
1949-<mime-type type="application/x-kspread"/>
1950-<mime-type type="application/x-kspread-crypt"/>
1951-<mime-type type="application/x-ksysv-package"/>
1952-<mime-type type="application/x-kugar"/>
1953-<mime-type type="application/x-kword"/>
1954-<mime-type type="application/x-kword-crypt"/>
1955-<mime-type type="application/x-lha"/>
1956-<mime-type type="application/x-lhz"/>
1957-<mime-type type="application/x-linguist"/>
1958-<mime-type type="application/x-lyx"/>
1959-<mime-type type="application/x-lzop"/>
1960-<mime-type type="application/x-magicpoint"/>
1961-<mime-type type="application/x-matroska"/>
1962-<mime-type type="application/x-mif"/>
1963-<mime-type type="application/x-mozilla-bookmarks"/>
1964-<mime-type type="application/x-mswinurl"/>
1965-<mime-type type="application/x-mswrite"/>
1966-<mime-type type="application/x-nautilus-link"/>
1967-<mime-type type="application/x-netcdf"/>
1968-<mime-type type="application/x-netscape-bookmarks"/>
1969-<mime-type type="application/x-netshow-channel"/>
1970-<mime-type type="application/x-ogg"/>
1971-<mime-type type="application/x-oleo"/>
1972-<mime-type type="application/x-palm-database"/>
1973-<mime-type type="application/x-pcb-layout"/>
1974-<mime-type type="application/x-pcb-footprint"/>
1975-<mime-type type="application/x-pcb-netlist"/>
1976-<mime-type type="application/x-pdf"/>
1977-<mime-type type="application/x-php"/>
1978-<mime-type type="application/x-pkcs12"/>
1979-<mime-type type="application/x-profile"/>
1980-<mime-type type="application/x-pw"/>
1981-<mime-type type="application/x-quattropro"/>
1982-<mime-type type="application/x-quicktime-media-link"/>
1983-<mime-type type="application/x-quicktimeplayer"/>
1984-<mime-type type="application/x-qw"/>
1985-<mime-type type="application/x-rar"/>
1986-<mime-type type="application/x-reject"/>
1987-<mime-type type="application/x-rpm"/>
1988-<mime-type type="application/x-sc"/>
1989-<mime-type type="application/x-shar"/>
1990-<mime-type type="application/x-shared-library-la"/>
1991-<mime-type type="application/x-shockwave-flash"/>
1992-<mime-type type="application/x-siag"/>
1993-<mime-type type="application/x-sit"/>
1994-<mime-type type="application/x-slp"/>
1995-<mime-type type="application/x-smil"/>
1996-<mime-type type="application/x-stuffit"/>
1997-<mime-type type="application/x-sv4cpio"/>
1998-<mime-type type="application/x-sv4crc"/>
1999-<mime-type type="application/x-tar"/>
2000-<mime-type type="application/x-tarz"/>
2001-<mime-type type="application/x-tex-gf"/>
2002-<mime-type type="application/x-tex-pk"/>
2003-<mime-type type="application/x-tgif"/>
2004-<mime-type type="application/x-theme"/>
2005-<mime-type type="application/x-toutdoux"/>
2006-<mime-type type="application/x-trash"/>
2007-<mime-type type="application/x-troff"/>
2008-<mime-type type="application/x-troff-man"/>
2009-<mime-type type="application/x-troff-man-compressed"/>
2010-<mime-type type="application/x-tzo"/>
2011-<mime-type type="application/x-ustar"/>
2012-<mime-type type="application/x-wais-source"/>
2013-<mime-type type="application/x-wordperfect"/>
2014-<mime-type type="application/x-wpg"/>
2015-<mime-type type="application/x-x509-ca-cert"/>
2016-<mime-type type="application/x-xbel"/>
2017-<mime-type type="application/x-zerosize"/>
2018-<mime-type type="application/x-zip-compressed"/>
2019-<mime-type type="application/x-zoo"/>
2020-<mime-type type="application/xhtml+xml"/>
2021-<mime-type type="application/zip"/>
2022-<mime-type type="audio/ac3"/>
2023-<mime-type type="audio/AMR"/>
2024-<mime-type type="audio/AMR-WB"/>
2025-<mime-type type="audio/basic"/>
2026-<mime-type type="audio/midi"/>
2027-<mime-type type="audio/mpeg"/>
2028-<mime-type type="audio/mpegurl"/>
2029-<mime-type type="audio/ogg"/>
2030-<mime-type type="audio/playlist"/>
2031-<mime-type type="audio/prs.sid"/>
2032-<mime-type type="audio/vnd.rn-realaudio"/>
2033-<mime-type type="audio/vnd.wave"/>
2034-<mime-type type="audio/x-vorbis"/>
2035-<mime-type type="audio/wav"/>
2036-<mime-type type="audio/x-adpcm"/>
2037-<mime-type type="audio/x-aifc"/>
2038-<mime-type type="audio/x-aiff"/>
2039-<mime-type type="audio/x-aiffc"/>
2040-<mime-type type="audio/x-ape"/>
2041-<mime-type type="audio/x-flac"/>
2042-<mime-type type="audio/x-it"/>
2043-<mime-type type="audio/x-m4a"/>
2044-<mime-type type="audio/x-matroska"/>
2045-<mime-type type="audio/x-midi"/>
2046-<mime-type type="audio/x-mod"/>
2047-<mime-type type="audio/x-mp3"/>
2048-<mime-type type="audio/x-mp3-playlist"/>
2049-<mime-type type="audio/x-mpeg"/>
2050-<mime-type type="audio/x-mpegurl"/>
2051-<mime-type type="audio/x-ms-asx"/>
2052-<mime-type type="audio/x-ms-wax"/>
2053-<mime-type type="audio/x-musepack"/>
2054-<mime-type type="audio/x-pn-realaudio"/>
2055-<mime-type type="audio/x-pn-realaudio-plugin"/>
2056-<mime-type type="audio/x-realaudio"/>
2057-<mime-type type="audio/x-real-audio"/>
2058-<mime-type type="audio/x-riff"/>
2059-<mime-type type="audio/x-s3m"/>
2060-<mime-type type="audio/x-sbc"/>
2061-<mime-type type="audio/x-scpls"/>
2062-<mime-type type="audio/x-stm"/>
2063-<mime-type type="audio/x-tta"/>
2064-<mime-type type="audio/x-voc"/>
2065-<mime-type type="audio/x-wav"/>
2066-<mime-type type="audio/x-wavpack"/>
2067-<mime-type type="audio/x-xi"/>
2068-<mime-type type="audio/x-xm"/>
2069-<mime-type type="image/bmp"/>
2070-<mime-type type="image/cgm"/>
2071-<mime-type type="image/dpx"/>
2072-<mime-type type="image/fax-g3"/>
2073-<mime-type type="image/g3fax"/>
2074-<mime-type type="image/gif"/>
2075-<mime-type type="image/ief"/>
2076-<mime-type type="image/jpeg"/>
2077-<mime-type type="image/jpeg2000"/>
2078-<mime-type type="image/png"/>
2079-<mime-type type="image/rle"/>
2080-<mime-type type="image/svg+xml"/>
2081-<mime-type type="image/tiff"/>
2082-<mime-type type="image/vnd.djvu"/>
2083-<mime-type type="image/vnd.dwg"/>
2084-<mime-type type="image/vnd.dxf"/>
2085-<mime-type type="image/x-3ds"/>
2086-<mime-type type="image/x-applix-graphics"/>
2087-<mime-type type="image/x-cmu-raster"/>
2088-<mime-type type="image/x-compressed-xcf"/>
2089-<mime-type type="image/x-dcm"/>
2090-<mime-type type="image/x-dib"/>
2091-<mime-type type="image/x-djvu"/>
2092-<mime-type type="image/x-eps"/>
2093-<mime-type type="image/x-fits"/>
2094-<mime-type type="image/x-fpx"/>
2095-<mime-type type="image/x-icb"/>
2096-<mime-type type="image/x-ico"/>
2097-<mime-type type="image/x-iff"/>
2098-<mime-type type="image/x-ilbm"/>
2099-<mime-type type="image/x-jng"/>
2100-<mime-type type="image/x-lwo"/>
2101-<mime-type type="image/x-lws"/>
2102-<mime-type type="image/x-msod"/>
2103-<mime-type type="image/x-niff"/>
2104-<mime-type type="image/x-pcx"/>
2105-<mime-type type="image/x-photo-cd"/>
2106-<mime-type type="image/x-pict"/>
2107-<mime-type type="image/x-png"/>
2108-<mime-type type="image/x-portable-anymap"/>
2109-<mime-type type="image/x-portable-bitmap"/>
2110-<mime-type type="image/x-portable-graymap"/>
2111-<mime-type type="image/x-portable-pixmap"/>
2112-<mime-type type="image/x-psd"/>
2113-<mime-type type="image/x-rgb"/>
2114-<mime-type type="image/x-sgi"/>
2115-<mime-type type="image/x-sun-raster"/>
2116-<mime-type type="image/x-tga"/>
2117-<mime-type type="image/x-win-bitmap"/>
2118-<mime-type type="image/x-wmf"/>
2119-<mime-type type="image/x-xbitmap"/>
2120-<mime-type type="image/x-xcf"/>
2121-<mime-type type="image/x-xfig"/>
2122-<mime-type type="image/x-xpixmap"/>
2123-<mime-type type="image/x-xwindowdump"/>
2124-<mime-type type="message/delivery-status"/>
2125-<mime-type type="message/disposition-notification"/>
2126-<mime-type type="message/external-body"/>
2127-<mime-type type="message/news"/>
2128-<mime-type type="message/partial"/>
2129-<mime-type type="message/rfc822"/>
2130-<mime-type type="message/x-gnu-rmail"/>
2131-<mime-type type="model/vrml"/>
2132-<mime-type type="multipart/alternative"/>
2133-<mime-type type="multipart/appledouble"/>
2134-<mime-type type="multipart/digest"/>
2135-<mime-type type="multipart/encrypted"/>
2136-<mime-type type="multipart/mixed"/>
2137-<mime-type type="multipart/related"/>
2138-<mime-type type="multipart/report"/>
2139-<mime-type type="multipart/signed"/>
2140-<mime-type type="multipart/x-mixed-replace"/>
2141-<mime-type type="text/calendar"/>
2142-<mime-type type="text/css"/>
2143-<mime-type type="text/csv"/>
2144-<mime-type type="text/directory"/>
2145-<mime-type type="text/enriched"/>
2146-<mime-type type="text/google-video-pointer"/>
2147-<mime-type type="text/html"/>
2148-<mime-type type="text/htmlh"/>
2149-<mime-type type="text/mathml"/>
2150-<mime-type type="text/plain"/>
2151-<mime-type type="text/rdf"/>
2152-<mime-type type="text/rfc822-headers"/>
2153-<mime-type type="text/richtext"/>
2154-<mime-type type="text/rss"/>
2155-<mime-type type="text/rtf"/>
2156-<mime-type type="text/sgml"/>
2157-<mime-type type="text/spreadsheet"/>
2158-<mime-type type="text/tab-separated-values"/>
2159-<mime-type type="text/vnd.wap.wml"/>
2160-<mime-type type="text/x-adasrc"/>
2161-<mime-type type="text/x-authors"/>
2162-<mime-type type="text/x-bibtex"/>
2163-<mime-type type="text/x-c++hdr"/>
2164-<mime-type type="text/x-c++src"/>
2165-<mime-type type="text/x-chdr"/>
2166-<mime-type type="text/x-comma-separated-values"/>
2167-<mime-type type="text/x-copying"/>
2168-<mime-type type="text/x-credits"/>
2169-<mime-type type="text/x-csharp"/>
2170-<mime-type type="text/x-csrc"/>
2171-<mime-type type="text/x-dcl"/>
2172-<mime-type type="text/x-diff"/>
2173-<mime-type type="text/x-dsl"/>
2174-<mime-type type="text/x-dsrc"/>
2175-<mime-type type="text/x-dtd"/>
2176-<mime-type type="text/x-emacs-lisp"/>
2177-<mime-type type="text/x-fortran"/>
2178-<mime-type type="text/x-gettext-translation"/>
2179-<mime-type type="text/x-gettext-translation-template"/>
2180-<mime-type type="text/x-google-video-pointer"/>
2181-<mime-type type="text/x-gtkrc"/>
2182-<mime-type type="text/x-haskell"/>
2183-<mime-type type="text/x-idl"/>
2184-<mime-type type="text/x-install"/>
2185-<mime-type type="text/x-java"/>
2186-<mime-type type="text/x-ksysv-log"/>
2187-<mime-type type="text/x-literate-haskell"/>
2188-<mime-type type="text/x-log"/>
2189-<mime-type type="text/x-makefile"/>
2190-<mime-type type="text/x-moc"/>
2191-<mime-type type="text/x-objcsrc"/>
2192-<mime-type type="text/x-pascal"/>
2193-<mime-type type="text/x-patch"/>
2194-<mime-type type="text/x-python"/>
2195-<mime-type type="text/x-readme"/>
2196-<mime-type type="text/x-scheme"/>
2197-<mime-type type="text/x-setext"/>
2198-<mime-type type="text/x-speech"/>
2199-<mime-type type="text/x-sql"/>
2200-<mime-type type="text/x-tcl"/>
2201-<mime-type type="text/x-tex"/>
2202-<mime-type type="text/x-texinfo"/>
2203-<mime-type type="text/x-troff-me"/>
2204-<mime-type type="text/x-troff-mm"/>
2205-<mime-type type="text/x-troff-ms"/>
2206-<mime-type type="text/x-uil"/>
2207-<mime-type type="text/x-uri"/>
2208-<mime-type type="text/x-vcalendar"/>
2209-<mime-type type="text/x-vcard"/>
2210-<mime-type type="text/x-xmi"/>
2211-<mime-type type="text/x-xslfo"/>
2212-<mime-type type="text/x-xslt"/>
2213-<mime-type type="text/xmcd"/>
2214-<mime-type type="text/xml"/>
2215-<mime-type type="video/flv"/>
2216-<mime-type type="video/isivideo"/>
2217-<mime-type type="video/mp4"/>
2218-<mime-type type="video/mpeg"/>
2219-<mime-type type="video/quicktime"/>
2220-<mime-type type="video/vivo"/>
2221-<mime-type type="video/wavelet"/>
2222-<mime-type type="video/x-anim"/>
2223-<mime-type type="video/x-avi"/>
2224-<mime-type type="video/x-flic"/>
2225-<mime-type type="video/x-flv"/>
2226-<mime-type type="video/x-m4v"/>
2227-<mime-type type="video/x-matroska"/>
2228-<mime-type type="video/x-mng"/>
2229-<mime-type type="video/x-ms-asf"/>
2230-<mime-type type="video/x-ms-asf-plugin"/>
2231-<mime-type type="video/x-ms-wmv"/>
2232-<mime-type type="video/x-ms-wvx"/>
2233-<mime-type type="video/x-msvideo"/>
2234-<mime-type type="video/x-nsv"/>
2235-<mime-type type="video/x-ogm+ogg"/>
2236-<mime-type type="video/x-real-video"/>
2237-<mime-type type="video/x-theora+ogg"/>
2238-<mime-type type="video/x-sgi-movie"/>
2239-</safe>
2240-<unsafe>
2241-<mime-type type="application/mac-binhex40"/>
2242-<mime-type type="application/vnd.hp-hpgl"/>
2243-<mime-type type="application/vnd.hp-pcl"/>
2244-<mime-type type="application/vnd.mozilla.xul+xml"/>
2245-<mime-type type="application/vnd.palm"/>
2246-<mime-type type="application/x-arc"/>
2247-<mime-type type="application/x-awk"/>
2248-<mime-type type="application/x-class-file"/>
2249-<mime-type type="application/x-core"/>
2250-<mime-type type="application/x-csh"/>
2251-<mime-type type="application/x-dc-rom"/>
2252-<mime-type type="application/x-deb"/>
2253-<mime-type type="application/x-executable"/>
2254-<mime-type type="application/x-gameboy-rom"/>
2255-<mime-type type="application/x-genesis-rom"/>
2256-<mime-type type="application/x-ipod-firmware"/>
2257-<mime-type type="application/x-javascript"/>
2258-<mime-type type="application/x-macbinary"/>
2259-<mime-type type="application/x-mplayer2"/>
2260-<mime-type type="application/x-ms-dos-executable"/>
2261-<mime-type type="application/x-msx-rom"/>
2262-<mime-type type="application/x-n64-rom"/>
2263-<mime-type type="application/x-nes-rom"/>
2264-<mime-type type="application/x-object"/>
2265-<mime-type type="application/x-ole-storage"/>
2266-<mime-type type="application/x-par2"/>
2267-<mime-type type="application/x-pef-executable"/>
2268-<mime-type type="application/x-perl"/>
2269-<mime-type type="application/x-python"/>
2270-<mime-type type="application/x-python-bytecode"/>
2271-<mime-type type="application/x-ruby"/>
2272-<mime-type type="application/x-sharedlib"/>
2273-<mime-type type="application/x-shellscript"/>
2274-<mime-type type="application/x-sms-rom"/>
2275-<mime-type type="application/x-xpinstall"/>
2276-<mime-type type="inode/blockdevice"/>
2277-<mime-type type="inode/chardevice"/>
2278-<mime-type type="inode/directory"/>
2279-<mime-type type="inode/fifo"/>
2280-<mime-type type="inode/mount-point"/>
2281-<mime-type type="inode/socket"/>
2282-<mime-type type="inode/symlink"/>
2283-<mime-type type="text/x-ksh"/>
2284-</unsafe>
2285-</mime-types-permissions>
2286
2287=== added directory '.pc/81_ubuntu_force_update_bookmarks_menu.patch'
2288=== removed directory '.pc/81_ubuntu_force_update_bookmarks_menu.patch'
2289=== added file '.pc/81_ubuntu_force_update_bookmarks_menu.patch/.timestamp'
2290=== added directory '.pc/81_ubuntu_force_update_bookmarks_menu.patch/src'
2291=== removed directory '.pc/81_ubuntu_force_update_bookmarks_menu.patch/src'
2292=== added directory '.pc/81_ubuntu_force_update_bookmarks_menu.patch/src/bookmarks'
2293=== removed directory '.pc/81_ubuntu_force_update_bookmarks_menu.patch/src/bookmarks'
2294=== added file '.pc/81_ubuntu_force_update_bookmarks_menu.patch/src/bookmarks/ephy-bookmarks-ui.c'
2295--- .pc/81_ubuntu_force_update_bookmarks_menu.patch/src/bookmarks/ephy-bookmarks-ui.c 1970-01-01 00:00:00 +0000
2296+++ .pc/81_ubuntu_force_update_bookmarks_menu.patch/src/bookmarks/ephy-bookmarks-ui.c 2014-12-20 23:53:39 +0000
2297@@ -0,0 +1,363 @@
2298+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2299+/*
2300+ * Copyright © 2005 Peter Harvey
2301+ * Copyright © 2006 Christian Persch
2302+ *
2303+ * This program is free software; you can redistribute it and/or modify
2304+ * it under the terms of the GNU General Public License as published by
2305+ * the Free Software Foundation; either version 2, or (at your option)
2306+ * any later version.
2307+ *
2308+ * This program is distributed in the hope that it will be useful,
2309+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2310+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2311+ * GNU General Public License for more details.
2312+ *
2313+ * You should have received a copy of the GNU General Public License
2314+ * along with this program; if not, write to the Free Software
2315+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2316+ *
2317+ */
2318+
2319+#include "config.h"
2320+#include "ephy-bookmarks-ui.h"
2321+
2322+#include "ephy-bookmark-action-group.h"
2323+#include "ephy-bookmark-action.h"
2324+#include "ephy-bookmark-properties.h"
2325+#include "ephy-bookmarks-menu.h"
2326+#include "ephy-bookmarks.h"
2327+#include "ephy-debug.h"
2328+#include "ephy-dnd.h"
2329+#include "ephy-embed-shell.h"
2330+#include "ephy-file-helpers.h"
2331+#include "ephy-gui.h"
2332+#include "ephy-link.h"
2333+#include "ephy-node-common.h"
2334+#include "ephy-open-tabs-action.h"
2335+#include "ephy-prefs.h"
2336+#include "ephy-settings.h"
2337+#include "ephy-shell.h"
2338+#include "ephy-string.h"
2339+#include "ephy-topic-action-group.h"
2340+#include "ephy-topic-action.h"
2341+
2342+#include <string.h>
2343+#include <glib/gi18n.h>
2344+#include <gtk/gtk.h>
2345+
2346+#define BM_WINDOW_DATA_KEY "bookmarks-window-data"
2347+
2348+typedef struct
2349+{
2350+ guint bookmarks_menu;
2351+ guint toolbar_menu;
2352+} BookmarksWindowData;
2353+
2354+enum
2355+{
2356+ RESPONSE_SHOW_PROPERTIES = 1,
2357+ RESPONSE_NEW_BOOKMARK = 2
2358+};
2359+
2360+static GString * bookmarks_menu_string = 0;
2361+static GHashTable *properties_dialogs = 0;
2362+
2363+static GtkAction *
2364+find_action (GtkUIManager *manager, const char *name)
2365+{
2366+ GList *l = gtk_ui_manager_get_action_groups (manager);
2367+ GtkAction *action;
2368+
2369+ while (l != NULL)
2370+ {
2371+ action = gtk_action_group_get_action (GTK_ACTION_GROUP (l->data), name);
2372+ if (action) return action;
2373+ l = l->next;
2374+ }
2375+
2376+ return NULL;
2377+}
2378+
2379+static void
2380+activate_bookmarks_menu (GtkAction *action, EphyWindow *window)
2381+{
2382+ BookmarksWindowData *data = g_object_get_data (G_OBJECT (window), BM_WINDOW_DATA_KEY);
2383+ if (data && !data->bookmarks_menu)
2384+ {
2385+ GtkUIManager *manager = ephy_window_get_ui_manager (window);
2386+ gtk_ui_manager_ensure_update (manager);
2387+
2388+ if (!bookmarks_menu_string->len)
2389+ {
2390+ g_string_append (bookmarks_menu_string,
2391+ "<ui><popup name=\"PagePopup\" action=\"PagePopupAction\"><menu name=\"BookmarksMenu\" action=\"Bookmarks\">");
2392+ ephy_bookmarks_menu_build (bookmarks_menu_string, 0);
2393+ g_string_append (bookmarks_menu_string, "</menu></popup></ui>");
2394+ }
2395+
2396+ data->bookmarks_menu = gtk_ui_manager_add_ui_from_string
2397+ (manager, bookmarks_menu_string->str, bookmarks_menu_string->len, 0);
2398+
2399+ gtk_ui_manager_ensure_update (manager);
2400+ }
2401+}
2402+
2403+static void
2404+erase_bookmarks_menu (EphyWindow *window)
2405+{
2406+ BookmarksWindowData *data;
2407+ GtkUIManager *manager;
2408+
2409+ manager = ephy_window_get_ui_manager (window);
2410+ data = g_object_get_data (G_OBJECT (window), BM_WINDOW_DATA_KEY);
2411+
2412+ if (data != NULL && data->bookmarks_menu != 0)
2413+ {
2414+ gtk_ui_manager_remove_ui (manager, data->bookmarks_menu);
2415+ data->bookmarks_menu = 0;
2416+ }
2417+
2418+ g_string_truncate (bookmarks_menu_string, 0);
2419+}
2420+
2421+static void
2422+tree_changed_cb (EphyBookmarks *bookmarks,
2423+ EphyWindow *window)
2424+{
2425+ erase_bookmarks_menu (window);
2426+}
2427+
2428+static void
2429+node_added_cb (EphyNode *parent,
2430+ EphyNode *child,
2431+ EphyWindow *window)
2432+{
2433+ erase_bookmarks_menu (window);
2434+}
2435+
2436+static void
2437+node_changed_cb (EphyNode *parent,
2438+ EphyNode *child,
2439+ guint property_id,
2440+ EphyWindow *window)
2441+{
2442+ if (property_id == EPHY_NODE_KEYWORD_PROP_NAME ||
2443+ property_id == EPHY_NODE_BMK_PROP_TITLE)
2444+ {
2445+ erase_bookmarks_menu (window);
2446+ }
2447+}
2448+
2449+static void
2450+node_removed_cb (EphyNode *parent,
2451+ EphyNode *child,
2452+ guint index,
2453+ EphyWindow *window)
2454+{
2455+ erase_bookmarks_menu (window);
2456+}
2457+
2458+void
2459+ephy_bookmarks_ui_attach_window (EphyWindow *window)
2460+{
2461+ EphyBookmarks *eb;
2462+ EphyNode *bookmarks;
2463+ EphyNode *topics;
2464+ BookmarksWindowData *data;
2465+ GtkUIManager *manager;
2466+ GtkActionGroup *actions;
2467+ GtkAction *action;
2468+
2469+ eb = ephy_shell_get_bookmarks (ephy_shell_get_default ());
2470+ bookmarks = ephy_bookmarks_get_bookmarks (eb);
2471+ topics = ephy_bookmarks_get_keywords (eb);
2472+ data = g_object_get_data (G_OBJECT (window), BM_WINDOW_DATA_KEY);
2473+ g_return_if_fail (data == NULL);
2474+
2475+ manager = ephy_window_get_ui_manager (window);
2476+
2477+ data = g_new0 (BookmarksWindowData, 1);
2478+ g_object_set_data_full (G_OBJECT (window), BM_WINDOW_DATA_KEY, data, g_free);
2479+
2480+ /* Create the self-maintaining action groups for bookmarks and topics */
2481+ actions = ephy_bookmark_group_new (bookmarks);
2482+ gtk_ui_manager_insert_action_group (manager, actions, -1);
2483+ g_signal_connect_object (actions, "open-link",
2484+ G_CALLBACK (ephy_link_open), G_OBJECT (window),
2485+ G_CONNECT_SWAPPED | G_CONNECT_AFTER);
2486+ g_object_unref (actions);
2487+
2488+ actions = ephy_topic_action_group_new (topics, manager);
2489+ gtk_ui_manager_insert_action_group (manager, actions, -1);
2490+ g_object_unref (actions);
2491+
2492+ actions = ephy_open_tabs_group_new (topics);
2493+ gtk_ui_manager_insert_action_group (manager, actions, -1);
2494+ g_signal_connect_object (actions, "open-link",
2495+ G_CALLBACK (ephy_link_open), G_OBJECT (window),
2496+ G_CONNECT_SWAPPED | G_CONNECT_AFTER);
2497+ g_object_unref (actions);
2498+
2499+ /* Add signal handlers for the bookmark database */
2500+ ephy_node_signal_connect_object (bookmarks, EPHY_NODE_CHILD_ADDED,
2501+ (EphyNodeCallback)node_added_cb,
2502+ G_OBJECT (window));
2503+ ephy_node_signal_connect_object (topics, EPHY_NODE_CHILD_ADDED,
2504+ (EphyNodeCallback)node_added_cb,
2505+ G_OBJECT (window));
2506+
2507+ ephy_node_signal_connect_object (bookmarks, EPHY_NODE_CHILD_REMOVED,
2508+ (EphyNodeCallback)node_removed_cb,
2509+ G_OBJECT (window));
2510+ ephy_node_signal_connect_object (topics, EPHY_NODE_CHILD_REMOVED,
2511+ (EphyNodeCallback)node_removed_cb,
2512+ G_OBJECT (window));
2513+
2514+ ephy_node_signal_connect_object (bookmarks, EPHY_NODE_CHILD_CHANGED,
2515+ (EphyNodeCallback)node_changed_cb,
2516+ G_OBJECT (window));
2517+ ephy_node_signal_connect_object (topics, EPHY_NODE_CHILD_CHANGED,
2518+ (EphyNodeCallback)node_changed_cb,
2519+ G_OBJECT (window));
2520+
2521+ g_signal_connect_object (eb, "tree_changed",
2522+ G_CALLBACK (tree_changed_cb),
2523+ G_OBJECT (window), 0);
2524+
2525+ /* Setup empty menu strings and add signal handlers to build the menus on demand */
2526+ if (!bookmarks_menu_string)
2527+ bookmarks_menu_string = g_string_new ("");
2528+
2529+ action = find_action (manager, "Bookmarks");
2530+ g_signal_connect_object (action, "activate",
2531+ G_CALLBACK (activate_bookmarks_menu),
2532+ G_OBJECT (window), 0);
2533+}
2534+
2535+void
2536+ephy_bookmarks_ui_detach_window (EphyWindow *window)
2537+{
2538+ EphyBookmarks *eb = ephy_shell_get_bookmarks (ephy_shell_get_default ());
2539+ EphyNode *bookmarks = ephy_bookmarks_get_bookmarks (eb);
2540+ EphyNode *topics = ephy_bookmarks_get_keywords (eb);
2541+
2542+ BookmarksWindowData *data = g_object_get_data (G_OBJECT (window), BM_WINDOW_DATA_KEY);
2543+ GtkUIManager *manager = ephy_window_get_ui_manager (window);
2544+ GtkAction *action;
2545+
2546+ g_return_if_fail (data != 0);
2547+
2548+ if (data->bookmarks_menu)
2549+ gtk_ui_manager_remove_ui (manager, data->bookmarks_menu);
2550+
2551+ g_object_set_data (G_OBJECT (window), BM_WINDOW_DATA_KEY, 0);
2552+
2553+ ephy_node_signal_disconnect_object (bookmarks, EPHY_NODE_CHILD_ADDED,
2554+ (EphyNodeCallback)node_added_cb,
2555+ G_OBJECT (window));
2556+ ephy_node_signal_disconnect_object (topics, EPHY_NODE_CHILD_ADDED,
2557+ (EphyNodeCallback)node_added_cb,
2558+ G_OBJECT (window));
2559+
2560+ ephy_node_signal_disconnect_object (bookmarks, EPHY_NODE_CHILD_REMOVED,
2561+ (EphyNodeCallback)node_removed_cb,
2562+ G_OBJECT (window));
2563+ ephy_node_signal_disconnect_object (topics, EPHY_NODE_CHILD_REMOVED,
2564+ (EphyNodeCallback)node_removed_cb,
2565+ G_OBJECT (window));
2566+
2567+ ephy_node_signal_disconnect_object (bookmarks, EPHY_NODE_CHILD_CHANGED,
2568+ (EphyNodeCallback)node_changed_cb,
2569+ G_OBJECT (window));
2570+ ephy_node_signal_disconnect_object (topics, EPHY_NODE_CHILD_CHANGED,
2571+ (EphyNodeCallback)node_changed_cb,
2572+ G_OBJECT (window));
2573+
2574+ g_signal_handlers_disconnect_by_func
2575+ (G_OBJECT (eb), G_CALLBACK (tree_changed_cb), G_OBJECT (window));
2576+
2577+ action = find_action (manager, "Bookmarks");
2578+ g_signal_handlers_disconnect_by_func
2579+ (G_OBJECT (action), G_CALLBACK (activate_bookmarks_menu), G_OBJECT (window));
2580+}
2581+
2582+static void
2583+properties_dialog_destroy_cb (EphyBookmarkProperties *dialog,
2584+ EphyNode *bookmark)
2585+{
2586+ g_hash_table_remove (properties_dialogs, bookmark);
2587+}
2588+
2589+void
2590+ephy_bookmarks_ui_add_bookmark (GtkWindow *parent,
2591+ const char *location,
2592+ const char *title)
2593+{
2594+ EphyBookmarks *bookmarks;
2595+ EphyNode *bookmark;
2596+ GtkWidget *dialog;
2597+
2598+ if (g_settings_get_boolean (EPHY_SETTINGS_LOCKDOWN,
2599+ EPHY_PREFS_LOCKDOWN_BOOKMARK_EDITING))
2600+ return;
2601+
2602+ bookmarks = ephy_shell_get_bookmarks (ephy_shell_get_default ());
2603+ bookmark = ephy_bookmarks_add (bookmarks, title, location);
2604+
2605+ if (properties_dialogs == 0)
2606+ {
2607+ properties_dialogs = g_hash_table_new (g_direct_hash, g_direct_equal);
2608+ }
2609+
2610+ dialog = ephy_bookmark_properties_new (bookmarks, bookmark, TRUE);
2611+
2612+ g_assert (parent != NULL);
2613+
2614+ gtk_window_group_add_window (ephy_gui_ensure_window_group (parent),
2615+ GTK_WINDOW (dialog));
2616+ gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
2617+
2618+ g_signal_connect (dialog, "destroy",
2619+ G_CALLBACK (properties_dialog_destroy_cb), bookmark);
2620+ g_hash_table_insert (properties_dialogs,
2621+ bookmark, dialog);
2622+
2623+ gtk_window_present_with_time (GTK_WINDOW (dialog),
2624+ gtk_get_current_event_time ());
2625+}
2626+
2627+void
2628+ephy_bookmarks_ui_show_bookmark (EphyNode *bookmark)
2629+{
2630+ EphyBookmarks *bookmarks;
2631+ GtkWidget *dialog;
2632+
2633+ bookmarks = ephy_shell_get_bookmarks (ephy_shell_get_default ());
2634+
2635+ g_return_if_fail (EPHY_IS_BOOKMARKS (bookmarks));
2636+ g_return_if_fail (EPHY_IS_NODE (bookmark));
2637+
2638+ if (properties_dialogs == 0)
2639+ {
2640+ properties_dialogs = g_hash_table_new (g_direct_hash, g_direct_equal);
2641+ }
2642+
2643+ dialog = g_hash_table_lookup (properties_dialogs, bookmark);
2644+
2645+ if (dialog == NULL)
2646+ {
2647+ dialog = ephy_bookmark_properties_new (bookmarks, bookmark, FALSE);
2648+
2649+ g_signal_connect (dialog, "destroy",
2650+ G_CALLBACK (properties_dialog_destroy_cb), bookmark);
2651+ g_hash_table_insert (properties_dialogs,
2652+ bookmark, dialog);
2653+ }
2654+
2655+ gtk_window_present_with_time (GTK_WINDOW (dialog),
2656+ gtk_get_current_event_time ());
2657+}
2658+
2659+
2660+
2661
2662=== removed file '.pc/81_ubuntu_force_update_bookmarks_menu.patch/src/bookmarks/ephy-bookmarks-ui.c'
2663--- .pc/81_ubuntu_force_update_bookmarks_menu.patch/src/bookmarks/ephy-bookmarks-ui.c 2013-11-13 11:39:29 +0000
2664+++ .pc/81_ubuntu_force_update_bookmarks_menu.patch/src/bookmarks/ephy-bookmarks-ui.c 1970-01-01 00:00:00 +0000
2665@@ -1,363 +0,0 @@
2666-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2667-/*
2668- * Copyright © 2005 Peter Harvey
2669- * Copyright © 2006 Christian Persch
2670- *
2671- * This program is free software; you can redistribute it and/or modify
2672- * it under the terms of the GNU General Public License as published by
2673- * the Free Software Foundation; either version 2, or (at your option)
2674- * any later version.
2675- *
2676- * This program is distributed in the hope that it will be useful,
2677- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2678- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2679- * GNU General Public License for more details.
2680- *
2681- * You should have received a copy of the GNU General Public License
2682- * along with this program; if not, write to the Free Software
2683- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2684- *
2685- */
2686-
2687-#include "config.h"
2688-#include "ephy-bookmarks-ui.h"
2689-
2690-#include "ephy-bookmark-action-group.h"
2691-#include "ephy-bookmark-action.h"
2692-#include "ephy-bookmark-properties.h"
2693-#include "ephy-bookmarks-menu.h"
2694-#include "ephy-bookmarks.h"
2695-#include "ephy-debug.h"
2696-#include "ephy-dnd.h"
2697-#include "ephy-embed-shell.h"
2698-#include "ephy-file-helpers.h"
2699-#include "ephy-gui.h"
2700-#include "ephy-link.h"
2701-#include "ephy-node-common.h"
2702-#include "ephy-open-tabs-action.h"
2703-#include "ephy-prefs.h"
2704-#include "ephy-settings.h"
2705-#include "ephy-shell.h"
2706-#include "ephy-string.h"
2707-#include "ephy-topic-action-group.h"
2708-#include "ephy-topic-action.h"
2709-
2710-#include <string.h>
2711-#include <glib/gi18n.h>
2712-#include <gtk/gtk.h>
2713-
2714-#define BM_WINDOW_DATA_KEY "bookmarks-window-data"
2715-
2716-typedef struct
2717-{
2718- guint bookmarks_menu;
2719- guint toolbar_menu;
2720-} BookmarksWindowData;
2721-
2722-enum
2723-{
2724- RESPONSE_SHOW_PROPERTIES = 1,
2725- RESPONSE_NEW_BOOKMARK = 2
2726-};
2727-
2728-static GString * bookmarks_menu_string = 0;
2729-static GHashTable *properties_dialogs = 0;
2730-
2731-static GtkAction *
2732-find_action (GtkUIManager *manager, const char *name)
2733-{
2734- GList *l = gtk_ui_manager_get_action_groups (manager);
2735- GtkAction *action;
2736-
2737- while (l != NULL)
2738- {
2739- action = gtk_action_group_get_action (GTK_ACTION_GROUP (l->data), name);
2740- if (action) return action;
2741- l = l->next;
2742- }
2743-
2744- return NULL;
2745-}
2746-
2747-static void
2748-activate_bookmarks_menu (GtkAction *action, EphyWindow *window)
2749-{
2750- BookmarksWindowData *data = g_object_get_data (G_OBJECT (window), BM_WINDOW_DATA_KEY);
2751- if (data && !data->bookmarks_menu)
2752- {
2753- GtkUIManager *manager = ephy_window_get_ui_manager (window);
2754- gtk_ui_manager_ensure_update (manager);
2755-
2756- if (!bookmarks_menu_string->len)
2757- {
2758- g_string_append (bookmarks_menu_string,
2759- "<ui><popup name=\"PagePopup\" action=\"PagePopupAction\"><menu name=\"BookmarksMenu\" action=\"Bookmarks\">");
2760- ephy_bookmarks_menu_build (bookmarks_menu_string, 0);
2761- g_string_append (bookmarks_menu_string, "</menu></popup></ui>");
2762- }
2763-
2764- data->bookmarks_menu = gtk_ui_manager_add_ui_from_string
2765- (manager, bookmarks_menu_string->str, bookmarks_menu_string->len, 0);
2766-
2767- gtk_ui_manager_ensure_update (manager);
2768- }
2769-}
2770-
2771-static void
2772-erase_bookmarks_menu (EphyWindow *window)
2773-{
2774- BookmarksWindowData *data;
2775- GtkUIManager *manager;
2776-
2777- manager = ephy_window_get_ui_manager (window);
2778- data = g_object_get_data (G_OBJECT (window), BM_WINDOW_DATA_KEY);
2779-
2780- if (data != NULL && data->bookmarks_menu != 0)
2781- {
2782- gtk_ui_manager_remove_ui (manager, data->bookmarks_menu);
2783- data->bookmarks_menu = 0;
2784- }
2785-
2786- g_string_truncate (bookmarks_menu_string, 0);
2787-}
2788-
2789-static void
2790-tree_changed_cb (EphyBookmarks *bookmarks,
2791- EphyWindow *window)
2792-{
2793- erase_bookmarks_menu (window);
2794-}
2795-
2796-static void
2797-node_added_cb (EphyNode *parent,
2798- EphyNode *child,
2799- EphyWindow *window)
2800-{
2801- erase_bookmarks_menu (window);
2802-}
2803-
2804-static void
2805-node_changed_cb (EphyNode *parent,
2806- EphyNode *child,
2807- guint property_id,
2808- EphyWindow *window)
2809-{
2810- if (property_id == EPHY_NODE_KEYWORD_PROP_NAME ||
2811- property_id == EPHY_NODE_BMK_PROP_TITLE)
2812- {
2813- erase_bookmarks_menu (window);
2814- }
2815-}
2816-
2817-static void
2818-node_removed_cb (EphyNode *parent,
2819- EphyNode *child,
2820- guint index,
2821- EphyWindow *window)
2822-{
2823- erase_bookmarks_menu (window);
2824-}
2825-
2826-void
2827-ephy_bookmarks_ui_attach_window (EphyWindow *window)
2828-{
2829- EphyBookmarks *eb;
2830- EphyNode *bookmarks;
2831- EphyNode *topics;
2832- BookmarksWindowData *data;
2833- GtkUIManager *manager;
2834- GtkActionGroup *actions;
2835- GtkAction *action;
2836-
2837- eb = ephy_shell_get_bookmarks (ephy_shell_get_default ());
2838- bookmarks = ephy_bookmarks_get_bookmarks (eb);
2839- topics = ephy_bookmarks_get_keywords (eb);
2840- data = g_object_get_data (G_OBJECT (window), BM_WINDOW_DATA_KEY);
2841- g_return_if_fail (data == NULL);
2842-
2843- manager = ephy_window_get_ui_manager (window);
2844-
2845- data = g_new0 (BookmarksWindowData, 1);
2846- g_object_set_data_full (G_OBJECT (window), BM_WINDOW_DATA_KEY, data, g_free);
2847-
2848- /* Create the self-maintaining action groups for bookmarks and topics */
2849- actions = ephy_bookmark_group_new (bookmarks);
2850- gtk_ui_manager_insert_action_group (manager, actions, -1);
2851- g_signal_connect_object (actions, "open-link",
2852- G_CALLBACK (ephy_link_open), G_OBJECT (window),
2853- G_CONNECT_SWAPPED | G_CONNECT_AFTER);
2854- g_object_unref (actions);
2855-
2856- actions = ephy_topic_action_group_new (topics, manager);
2857- gtk_ui_manager_insert_action_group (manager, actions, -1);
2858- g_object_unref (actions);
2859-
2860- actions = ephy_open_tabs_group_new (topics);
2861- gtk_ui_manager_insert_action_group (manager, actions, -1);
2862- g_signal_connect_object (actions, "open-link",
2863- G_CALLBACK (ephy_link_open), G_OBJECT (window),
2864- G_CONNECT_SWAPPED | G_CONNECT_AFTER);
2865- g_object_unref (actions);
2866-
2867- /* Add signal handlers for the bookmark database */
2868- ephy_node_signal_connect_object (bookmarks, EPHY_NODE_CHILD_ADDED,
2869- (EphyNodeCallback)node_added_cb,
2870- G_OBJECT (window));
2871- ephy_node_signal_connect_object (topics, EPHY_NODE_CHILD_ADDED,
2872- (EphyNodeCallback)node_added_cb,
2873- G_OBJECT (window));
2874-
2875- ephy_node_signal_connect_object (bookmarks, EPHY_NODE_CHILD_REMOVED,
2876- (EphyNodeCallback)node_removed_cb,
2877- G_OBJECT (window));
2878- ephy_node_signal_connect_object (topics, EPHY_NODE_CHILD_REMOVED,
2879- (EphyNodeCallback)node_removed_cb,
2880- G_OBJECT (window));
2881-
2882- ephy_node_signal_connect_object (bookmarks, EPHY_NODE_CHILD_CHANGED,
2883- (EphyNodeCallback)node_changed_cb,
2884- G_OBJECT (window));
2885- ephy_node_signal_connect_object (topics, EPHY_NODE_CHILD_CHANGED,
2886- (EphyNodeCallback)node_changed_cb,
2887- G_OBJECT (window));
2888-
2889- g_signal_connect_object (eb, "tree_changed",
2890- G_CALLBACK (tree_changed_cb),
2891- G_OBJECT (window), 0);
2892-
2893- /* Setup empty menu strings and add signal handlers to build the menus on demand */
2894- if (!bookmarks_menu_string)
2895- bookmarks_menu_string = g_string_new ("");
2896-
2897- action = find_action (manager, "Bookmarks");
2898- g_signal_connect_object (action, "activate",
2899- G_CALLBACK (activate_bookmarks_menu),
2900- G_OBJECT (window), 0);
2901-}
2902-
2903-void
2904-ephy_bookmarks_ui_detach_window (EphyWindow *window)
2905-{
2906- EphyBookmarks *eb = ephy_shell_get_bookmarks (ephy_shell_get_default ());
2907- EphyNode *bookmarks = ephy_bookmarks_get_bookmarks (eb);
2908- EphyNode *topics = ephy_bookmarks_get_keywords (eb);
2909-
2910- BookmarksWindowData *data = g_object_get_data (G_OBJECT (window), BM_WINDOW_DATA_KEY);
2911- GtkUIManager *manager = ephy_window_get_ui_manager (window);
2912- GtkAction *action;
2913-
2914- g_return_if_fail (data != 0);
2915-
2916- if (data->bookmarks_menu)
2917- gtk_ui_manager_remove_ui (manager, data->bookmarks_menu);
2918-
2919- g_object_set_data (G_OBJECT (window), BM_WINDOW_DATA_KEY, 0);
2920-
2921- ephy_node_signal_disconnect_object (bookmarks, EPHY_NODE_CHILD_ADDED,
2922- (EphyNodeCallback)node_added_cb,
2923- G_OBJECT (window));
2924- ephy_node_signal_disconnect_object (topics, EPHY_NODE_CHILD_ADDED,
2925- (EphyNodeCallback)node_added_cb,
2926- G_OBJECT (window));
2927-
2928- ephy_node_signal_disconnect_object (bookmarks, EPHY_NODE_CHILD_REMOVED,
2929- (EphyNodeCallback)node_removed_cb,
2930- G_OBJECT (window));
2931- ephy_node_signal_disconnect_object (topics, EPHY_NODE_CHILD_REMOVED,
2932- (EphyNodeCallback)node_removed_cb,
2933- G_OBJECT (window));
2934-
2935- ephy_node_signal_disconnect_object (bookmarks, EPHY_NODE_CHILD_CHANGED,
2936- (EphyNodeCallback)node_changed_cb,
2937- G_OBJECT (window));
2938- ephy_node_signal_disconnect_object (topics, EPHY_NODE_CHILD_CHANGED,
2939- (EphyNodeCallback)node_changed_cb,
2940- G_OBJECT (window));
2941-
2942- g_signal_handlers_disconnect_by_func
2943- (G_OBJECT (eb), G_CALLBACK (tree_changed_cb), G_OBJECT (window));
2944-
2945- action = find_action (manager, "Bookmarks");
2946- g_signal_handlers_disconnect_by_func
2947- (G_OBJECT (action), G_CALLBACK (activate_bookmarks_menu), G_OBJECT (window));
2948-}
2949-
2950-static void
2951-properties_dialog_destroy_cb (EphyBookmarkProperties *dialog,
2952- EphyNode *bookmark)
2953-{
2954- g_hash_table_remove (properties_dialogs, bookmark);
2955-}
2956-
2957-void
2958-ephy_bookmarks_ui_add_bookmark (GtkWindow *parent,
2959- const char *location,
2960- const char *title)
2961-{
2962- EphyBookmarks *bookmarks;
2963- EphyNode *bookmark;
2964- GtkWidget *dialog;
2965-
2966- if (g_settings_get_boolean (EPHY_SETTINGS_LOCKDOWN,
2967- EPHY_PREFS_LOCKDOWN_BOOKMARK_EDITING))
2968- return;
2969-
2970- bookmarks = ephy_shell_get_bookmarks (ephy_shell_get_default ());
2971- bookmark = ephy_bookmarks_add (bookmarks, title, location);
2972-
2973- if (properties_dialogs == 0)
2974- {
2975- properties_dialogs = g_hash_table_new (g_direct_hash, g_direct_equal);
2976- }
2977-
2978- dialog = ephy_bookmark_properties_new (bookmarks, bookmark, TRUE);
2979-
2980- g_assert (parent != NULL);
2981-
2982- gtk_window_group_add_window (ephy_gui_ensure_window_group (parent),
2983- GTK_WINDOW (dialog));
2984- gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
2985-
2986- g_signal_connect (dialog, "destroy",
2987- G_CALLBACK (properties_dialog_destroy_cb), bookmark);
2988- g_hash_table_insert (properties_dialogs,
2989- bookmark, dialog);
2990-
2991- gtk_window_present_with_time (GTK_WINDOW (dialog),
2992- gtk_get_current_event_time ());
2993-}
2994-
2995-void
2996-ephy_bookmarks_ui_show_bookmark (EphyNode *bookmark)
2997-{
2998- EphyBookmarks *bookmarks;
2999- GtkWidget *dialog;
3000-
3001- bookmarks = ephy_shell_get_bookmarks (ephy_shell_get_default ());
3002-
3003- g_return_if_fail (EPHY_IS_BOOKMARKS (bookmarks));
3004- g_return_if_fail (EPHY_IS_NODE (bookmark));
3005-
3006- if (properties_dialogs == 0)
3007- {
3008- properties_dialogs = g_hash_table_new (g_direct_hash, g_direct_equal);
3009- }
3010-
3011- dialog = g_hash_table_lookup (properties_dialogs, bookmark);
3012-
3013- if (dialog == NULL)
3014- {
3015- dialog = ephy_bookmark_properties_new (bookmarks, bookmark, FALSE);
3016-
3017- g_signal_connect (dialog, "destroy",
3018- G_CALLBACK (properties_dialog_destroy_cb), bookmark);
3019- g_hash_table_insert (properties_dialogs,
3020- bookmark, dialog);
3021- }
3022-
3023- gtk_window_present_with_time (GTK_WINDOW (dialog),
3024- gtk_get_current_event_time ());
3025-}
3026-
3027-
3028-
3029
3030=== added file '.pc/applied-patches'
3031--- .pc/applied-patches 1970-01-01 00:00:00 +0000
3032+++ .pc/applied-patches 2014-12-20 23:53:39 +0000
3033@@ -0,0 +1,5 @@
3034+00_epiphany-browser.patch
3035+07_bookmarks.patch
3036+12_safetypes.patch
3037+81_ubuntu_force_update_bookmarks_menu.patch
3038+ubuntu_titlebars.patch
3039
3040=== removed file '.pc/applied-patches'
3041--- .pc/applied-patches 2013-12-22 11:03:08 +0000
3042+++ .pc/applied-patches 1970-01-01 00:00:00 +0000
3043@@ -1,6 +0,0 @@
3044-00_epiphany-browser.patch
3045-01_with_webkit2.patch
3046-07_bookmarks.patch
3047-12_safetypes.patch
3048-81_ubuntu_force_update_bookmarks_menu.patch
3049-ubuntu_titlebars.patch
3050
3051=== added directory '.pc/ubuntu_titlebars.patch'
3052=== removed directory '.pc/ubuntu_titlebars.patch'
3053=== added file '.pc/ubuntu_titlebars.patch/.timestamp'
3054=== added directory '.pc/ubuntu_titlebars.patch/src'
3055=== removed directory '.pc/ubuntu_titlebars.patch/src'
3056=== removed file '.pc/ubuntu_titlebars.patch/src/ephy-toolbar.c'
3057--- .pc/ubuntu_titlebars.patch/src/ephy-toolbar.c 2013-12-22 11:03:08 +0000
3058+++ .pc/ubuntu_titlebars.patch/src/ephy-toolbar.c 1970-01-01 00:00:00 +0000
3059@@ -1,320 +0,0 @@
3060-/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
3061-/*
3062- * Copyright © 2012 Igalia S.L
3063- * Copyright © 2013 Yosef Or Boczko <yoseforb@gmail.com>
3064- *
3065- * This program is free software; you can redistribute it and/or modify
3066- * it under the terms of the GNU General Public License as published by
3067- * the Free Software Foundation; either version 2, or (at your option)
3068- * any later version.
3069- *
3070- * This program is distributed in the hope that it will be useful,
3071- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3072- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3073- * GNU General Public License for more details.
3074- *
3075- * You should have received a copy of the GNU General Public License
3076- * along with this program; if not, write to the Free Software
3077- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
3078- *
3079- */
3080-
3081-#include "config.h"
3082-#include "ephy-toolbar.h"
3083-
3084-#include "ephy-location-entry.h"
3085-#include "ephy-middle-clickable-button.h"
3086-#include "ephy-private.h"
3087-
3088-G_DEFINE_TYPE (EphyToolbar, ephy_toolbar, GTK_TYPE_BOX)
3089-
3090-#define EPHY_TOOLBAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EPHY_TYPE_TOOLBAR, EphyToolbarPrivate))
3091-
3092-enum {
3093- PROP_0,
3094- PROP_WINDOW,
3095- N_PROPERTIES
3096-};
3097-
3098-static GParamSpec *object_properties[N_PROPERTIES] = { NULL, };
3099-
3100-struct _EphyToolbarPrivate {
3101- EphyWindow *window;
3102- GtkWidget *entry;
3103-};
3104-
3105-static void
3106-ephy_toolbar_set_property (GObject *object,
3107- guint property_id,
3108- const GValue *value,
3109- GParamSpec *pspec)
3110-{
3111- EphyToolbarPrivate *priv = EPHY_TOOLBAR (object)->priv;
3112-
3113- switch (property_id) {
3114- case PROP_WINDOW:
3115- priv->window = EPHY_WINDOW (g_value_get_object (value));
3116- g_object_notify_by_pspec (object, object_properties[PROP_WINDOW]);
3117- break;
3118- default:
3119- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
3120- }
3121-}
3122-
3123-static void
3124-ephy_toolbar_get_property (GObject *object,
3125- guint property_id,
3126- GValue *value,
3127- GParamSpec *pspec)
3128-{
3129- EphyToolbarPrivate *priv = EPHY_TOOLBAR (object)->priv;
3130-
3131- switch (property_id) {
3132- case PROP_WINDOW:
3133- g_value_set_object (value, priv->window);
3134- break;
3135- default:
3136- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
3137- }
3138-}
3139-
3140-static void
3141-close_button_clicked (GtkButton *button, gpointer data)
3142-{
3143- GtkWidget *toplevel;
3144-
3145- toplevel = gtk_widget_get_toplevel (GTK_WIDGET (button));
3146- gtk_window_close (GTK_WINDOW (toplevel));
3147-}
3148-
3149-static void
3150-ephy_toolbar_constructed (GObject *object)
3151-{
3152- EphyToolbarPrivate *priv = EPHY_TOOLBAR (object)->priv;
3153- GtkActionGroup *action_group;
3154- GtkAction *action;
3155- GtkWidget *toolbar, *box, *button, *reload, *separator, *label;
3156- GtkStyleContext *context;
3157- GtkSizeGroup *size;
3158- EphyEmbedShellMode mode;
3159-
3160- G_OBJECT_CLASS (ephy_toolbar_parent_class)->constructed (object);
3161-
3162- toolbar = GTK_WIDGET (object);
3163-
3164- mode = ephy_embed_shell_get_mode (ephy_embed_shell_get_default ());
3165-
3166- /* Back and Forward */
3167- box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
3168-
3169- /* Back */
3170- button = ephy_middle_clickable_button_new ();
3171- /* FIXME: apparently we need an image inside the button for the action
3172- * icon to appear. */
3173- gtk_button_set_image (GTK_BUTTON (button), gtk_image_new ());
3174- action_group = ephy_window_get_toolbar_action_group (priv->window);
3175- action = gtk_action_group_get_action (action_group, "NavigationBack");
3176- gtk_activatable_set_related_action (GTK_ACTIVATABLE (button),
3177- action);
3178- gtk_button_set_label (GTK_BUTTON (button), NULL);
3179- gtk_container_add (GTK_CONTAINER (box), button);
3180-
3181- /* Forward */
3182- button = ephy_middle_clickable_button_new ();
3183- /* FIXME: apparently we need an image inside the button for the action
3184- * icon to appear. */
3185- gtk_button_set_image (GTK_BUTTON (button), gtk_image_new ());
3186- action = gtk_action_group_get_action (action_group, "NavigationForward");
3187- gtk_activatable_set_related_action (GTK_ACTIVATABLE (button),
3188- action);
3189- gtk_button_set_label (GTK_BUTTON (button), NULL);
3190- gtk_container_add (GTK_CONTAINER (box), button);
3191-
3192- gtk_style_context_add_class (gtk_widget_get_style_context (box),
3193- "raised");
3194- gtk_style_context_add_class (gtk_widget_get_style_context (box),
3195- "linked");
3196-
3197- gtk_container_add (GTK_CONTAINER (toolbar), box);
3198- gtk_widget_show_all (box);
3199-
3200- if (gtk_widget_get_direction (box) == GTK_TEXT_DIR_RTL)
3201- gtk_widget_set_margin_left (box, 27);
3202- else
3203- gtk_widget_set_margin_right (box, 27);
3204-
3205- /* Location and Reload/Stop */
3206- box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
3207- gtk_widget_set_halign (box, GTK_ALIGN_CENTER);
3208-
3209- /* Location */
3210- priv->entry = ephy_location_entry_new ();
3211- gtk_box_pack_start (GTK_BOX (box), priv->entry, TRUE, TRUE, 0);
3212- gtk_style_context_add_class (gtk_widget_get_style_context (box),
3213- "location-entry");
3214-
3215- /* Reload/Stop */
3216- reload = gtk_button_new ();
3217- /* FIXME: apparently we need an image inside the button for the action
3218- * icon to appear. */
3219- gtk_button_set_image (GTK_BUTTON (reload), gtk_image_new ());
3220- gtk_widget_set_valign (reload, GTK_ALIGN_CENTER);
3221- action = gtk_action_group_get_action (action_group, "ViewCombinedStopReload");
3222- gtk_activatable_set_related_action (GTK_ACTIVATABLE (reload),
3223- action);
3224-
3225-
3226- if (mode != EPHY_EMBED_SHELL_MODE_APPLICATION)
3227- {
3228- gtk_container_add (GTK_CONTAINER (box), reload);
3229-
3230- /* Create a GtkSizeGroup to sync the height of the location entry, and
3231- * the stop/reload button. */
3232- size = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
3233-
3234- gtk_size_group_add_widget (size, reload);
3235- gtk_size_group_add_widget (size, priv->entry);
3236- g_object_unref (size);
3237- }
3238-
3239- gtk_box_pack_start (GTK_BOX (toolbar), box, TRUE, TRUE, 0);
3240- if (mode != EPHY_EMBED_SHELL_MODE_APPLICATION)
3241- gtk_widget_show_all (box);
3242-
3243- if (gtk_widget_get_direction (box) == GTK_TEXT_DIR_RTL)
3244- gtk_widget_set_margin_left (box, 12);
3245- else
3246- gtk_widget_set_margin_right (box, 12);
3247-
3248- /* New Tab */
3249- button = gtk_button_new ();
3250- /* FIXME: apparently we need an image inside the button for the action
3251- * icon to appear. */
3252- gtk_button_set_image (GTK_BUTTON (button), gtk_image_new ());
3253- action = gtk_action_group_get_action (action_group, "FileNewTab");
3254- gtk_activatable_set_related_action (GTK_ACTIVATABLE (button),
3255- action);
3256- gtk_button_set_label (GTK_BUTTON (button), NULL);
3257- gtk_container_add (GTK_CONTAINER (toolbar), button);
3258- if (mode != EPHY_EMBED_SHELL_MODE_APPLICATION)
3259- gtk_widget_show_all (button);
3260-
3261- if (gtk_widget_get_direction (button) == GTK_TEXT_DIR_RTL)
3262- gtk_widget_set_margin_left (button, 6);
3263- else
3264- gtk_widget_set_margin_right (button, 6);
3265-
3266- if (gtk_widget_get_direction (button) == GTK_TEXT_DIR_RTL)
3267- gtk_widget_set_margin_right (button, 15);
3268- else
3269- gtk_widget_set_margin_left (button, 15);
3270-
3271- /* Page Menu */
3272- button = gtk_button_new ();
3273- gtk_widget_set_name (button, "ephy-page-menu-button");
3274- /* FIXME: apparently we need an image inside the button for the action
3275- * icon to appear. */
3276- gtk_button_set_image (GTK_BUTTON (button), gtk_image_new ());
3277- action = gtk_action_group_get_action (action_group, "PageMenu");
3278- gtk_activatable_set_related_action (GTK_ACTIVATABLE (button),
3279- action);
3280- gtk_container_add (GTK_CONTAINER (toolbar), button);
3281- gtk_widget_show_all (button);
3282-
3283- /* Add title only in application mode. */
3284- if (mode == EPHY_EMBED_SHELL_MODE_APPLICATION)
3285- {
3286- /* The title of the window in web application - need
3287- * settings of padding same the location entry. */
3288- label = gtk_label_new (NULL);
3289- context = gtk_widget_get_style_context (label);
3290- gtk_style_context_add_class (context, "title");
3291- gtk_style_context_add_class (context, "dim-label");
3292- gtk_label_set_line_wrap (GTK_LABEL (label), FALSE);
3293- gtk_label_set_single_line_mode (GTK_LABEL (label), TRUE);
3294- gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
3295- gtk_widget_set_size_request (label, 530, -1);
3296- gtk_box_pack_start (GTK_BOX (toolbar), label, TRUE, TRUE, 0);
3297- gtk_widget_show_all (label);
3298-
3299- if (gtk_widget_get_direction (GTK_WIDGET (label)) == GTK_TEXT_DIR_RTL)
3300- gtk_widget_set_margin_left (GTK_WIDGET (label), 12);
3301- else
3302- gtk_widget_set_margin_right (GTK_WIDGET (label), 12);
3303-
3304- g_object_bind_property (label, "label",
3305- priv->window, "title",
3306- G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
3307-
3308- /* Reload/Stop for web application. */
3309- gtk_container_add (GTK_CONTAINER (toolbar), reload);
3310- }
3311-
3312- /* Separator and Close */
3313- separator = gtk_separator_new (GTK_ORIENTATION_VERTICAL);
3314- gtk_container_add (GTK_CONTAINER (toolbar), separator);
3315- gtk_widget_show_all (separator);
3316-
3317- if (gtk_widget_get_direction (GTK_WIDGET (separator)) == GTK_TEXT_DIR_RTL)
3318- gtk_widget_set_margin_right (GTK_WIDGET (separator), 6);
3319- else
3320- gtk_widget_set_margin_left (GTK_WIDGET (separator), 6);
3321-
3322- button = gtk_button_new_from_icon_name ("window-close-symbolic",
3323- GTK_ICON_SIZE_MENU);
3324- gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
3325- g_signal_connect (button, "clicked",
3326- G_CALLBACK (close_button_clicked), NULL);
3327- gtk_container_add (GTK_CONTAINER (toolbar), button);
3328- gtk_widget_show_all (button);
3329-
3330- if (gtk_widget_get_direction (button) == GTK_TEXT_DIR_RTL)
3331- gtk_widget_set_margin_right (button, 6);
3332- else
3333- gtk_widget_set_margin_left (button, 6);
3334-}
3335-
3336-static void
3337-ephy_toolbar_class_init (EphyToolbarClass *klass)
3338-{
3339- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
3340-
3341- gobject_class->set_property = ephy_toolbar_set_property;
3342- gobject_class->get_property = ephy_toolbar_get_property;
3343- gobject_class->constructed = ephy_toolbar_constructed;
3344-
3345- object_properties[PROP_WINDOW] =
3346- g_param_spec_object ("window",
3347- "Window",
3348- "The toolbar's EphyWindow",
3349- EPHY_TYPE_WINDOW,
3350- G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_CONSTRUCT_ONLY);
3351-
3352- g_object_class_install_properties (gobject_class,
3353- N_PROPERTIES,
3354- object_properties);
3355-
3356- g_type_class_add_private (klass, sizeof (EphyToolbarPrivate));
3357-}
3358-
3359-static void
3360-ephy_toolbar_init (EphyToolbar *toolbar)
3361-{
3362- toolbar->priv = EPHY_TOOLBAR_GET_PRIVATE (toolbar);
3363-}
3364-
3365-GtkWidget*
3366-ephy_toolbar_new (EphyWindow *window)
3367-{
3368- g_return_val_if_fail (EPHY_IS_WINDOW (window), NULL);
3369-
3370- return GTK_WIDGET (g_object_new (EPHY_TYPE_TOOLBAR,
3371- "window", window,
3372- NULL));
3373-}
3374-
3375-GtkWidget *
3376-ephy_toolbar_get_location_entry (EphyToolbar *toolbar)
3377-{
3378- return toolbar->priv->entry;
3379-}
3380
3381=== added file '.pc/ubuntu_titlebars.patch/src/ephy-window.c'
3382--- .pc/ubuntu_titlebars.patch/src/ephy-window.c 1970-01-01 00:00:00 +0000
3383+++ .pc/ubuntu_titlebars.patch/src/ephy-window.c 2014-12-20 23:53:39 +0000
3384@@ -0,0 +1,4055 @@
3385+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3386+/*
3387+ * Copyright © 2000, 2001, 2002, 2003, 2004 Marco Pesenti Gritti
3388+ * Copyright © 2003, 2004 Christian Persch
3389+ * Copyright © 2011 Igalia S.L.
3390+ *
3391+ * This program is free software; you can redistribute it and/or modify
3392+ * it under the terms of the GNU General Public License as published by
3393+ * the Free Software Foundation; either version 2, or (at your option)
3394+ * any later version.
3395+ *
3396+ * This program is distributed in the hope that it will be useful,
3397+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3398+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3399+ * GNU General Public License for more details.
3400+ *
3401+ * You should have received a copy of the GNU General Public License
3402+ * along with this program; if not, write to the Free Software
3403+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
3404+ *
3405+ */
3406+
3407+#include "config.h"
3408+#include "ephy-window.h"
3409+
3410+#include "ephy-action-helper.h"
3411+#include "ephy-bookmarks-ui.h"
3412+#include "ephy-certificate-popover.h"
3413+#include "ephy-combined-stop-reload-action.h"
3414+#include "ephy-debug.h"
3415+#include "ephy-download-widget.h"
3416+#include "ephy-embed-container.h"
3417+#include "ephy-embed-prefs.h"
3418+#include "ephy-embed-shell.h"
3419+#include "ephy-embed-type-builtins.h"
3420+#include "ephy-embed-utils.h"
3421+#include "ephy-encoding-menu.h"
3422+#include "ephy-file-helpers.h"
3423+#include "ephy-find-toolbar.h"
3424+#include "ephy-gui.h"
3425+#include "ephy-home-action.h"
3426+#include "ephy-initial-state.h"
3427+#include "ephy-link.h"
3428+#include "ephy-location-entry.h"
3429+#include "ephy-navigation-history-action.h"
3430+#include "ephy-notebook.h"
3431+#include "ephy-prefs.h"
3432+#include "ephy-private.h"
3433+#include "ephy-session.h"
3434+#include "ephy-settings.h"
3435+#include "ephy-shell.h"
3436+#include "ephy-title-box.h"
3437+#include "ephy-toolbar.h"
3438+#include "ephy-type-builtins.h"
3439+#include "ephy-web-app-utils.h"
3440+#include "ephy-web-view.h"
3441+#include "ephy-zoom-action.h"
3442+#include "ephy-zoom.h"
3443+#include "popup-commands.h"
3444+#include "window-commands.h"
3445+
3446+#include <gdk/gdkkeysyms.h>
3447+#include <gdk/gdkx.h>
3448+#include <gio/gio.h>
3449+#include <glib/gi18n.h>
3450+#include <gtk/gtk.h>
3451+#include <libsoup/soup.h>
3452+
3453+#define WNCK_I_KNOW_THIS_IS_UNSTABLE
3454+#include <libwnck/libwnck.h>
3455+
3456+#include <webkit2/webkit2.h>
3457+
3458+#ifdef HAVE_X11_XF86KEYSYM_H
3459+#include <X11/XF86keysym.h>
3460+#endif
3461+
3462+/**
3463+ * SECTION:ephy-window
3464+ * @short_description: Epiphany's main #GtkWindow widget
3465+ *
3466+ * #EphyWindow is Epiphany's main widget.
3467+ */
3468+
3469+static void ephy_window_view_popup_windows_cb (GtkAction *action,
3470+ EphyWindow *window);
3471+
3472+static const GtkActionEntry ephy_menu_entries [] = {
3473+
3474+ /* Toplevel */
3475+
3476+ { "Bookmarks", NULL, N_("_Bookmarks") },
3477+ { "PopupAction", NULL, "" },
3478+ { "PagePopupAction", NULL, "" },
3479+ { "NotebookPopupAction", NULL, "" },
3480+
3481+ /* File actions. */
3482+
3483+ { "FileNewWindow", NULL, N_("_New Window"), "<control>N", NULL,
3484+ G_CALLBACK (window_cmd_file_new_window) },
3485+ { "FileNewWindowIncognito", NULL, N_("New _Incognito Window"), "<control><shift>N", NULL,
3486+ G_CALLBACK (window_cmd_file_new_incognito_window) },
3487+ { "FileOpen", NULL, N_("_Open…"), "<control>O", NULL,
3488+ G_CALLBACK (window_cmd_file_open) },
3489+ { "FileSaveAs", NULL, N_("Save _As…"), "<shift><control>S", NULL,
3490+ G_CALLBACK (window_cmd_file_save_as) },
3491+ { "FileSaveAsApplication", NULL, N_("Save As _Web Application…"), "<shift><control>A", NULL,
3492+ G_CALLBACK (window_cmd_file_save_as_application) },
3493+ { "FilePrint", NULL, N_("_Print…"), "<control>P", NULL,
3494+ G_CALLBACK (window_cmd_file_print) },
3495+ { "FileSendTo", NULL, N_("S_end Link by Email…"), NULL, NULL,
3496+ G_CALLBACK (window_cmd_file_send_to) },
3497+ { "FileCloseTab", NULL, N_("_Close"), "<control>W", NULL,
3498+ G_CALLBACK (window_cmd_file_close_window) },
3499+ { "FileQuit", NULL, N_("_Quit"), "<control>Q", NULL,
3500+ G_CALLBACK (window_cmd_file_quit) },
3501+
3502+ /* Edit actions. */
3503+
3504+ { "EditUndo", NULL, N_("_Undo"), "<control>Z", NULL,
3505+ G_CALLBACK (window_cmd_edit_undo) },
3506+ { "EditRedo", NULL, N_("Re_do"), "<shift><control>Z", NULL,
3507+ G_CALLBACK (window_cmd_edit_redo) },
3508+ { "EditCut", NULL, N_("Cu_t"), "<control>X", NULL,
3509+ G_CALLBACK (window_cmd_edit_cut) },
3510+ { "EditCopy", NULL, N_("_Copy"), "<control>C", NULL,
3511+ G_CALLBACK (window_cmd_edit_copy) },
3512+ { "EditPaste", NULL, N_("_Paste"), "<control>V", NULL,
3513+ G_CALLBACK (window_cmd_edit_paste) },
3514+ { "EditDelete", NULL, NULL, NULL, NULL,
3515+ G_CALLBACK (window_cmd_edit_delete) },
3516+ { "EditSelectAll", NULL, N_("Select _All"), "<control>A", NULL,
3517+ G_CALLBACK (window_cmd_edit_select_all) },
3518+ { "EditFind", NULL, N_("_Find…"), "<control>F", NULL,
3519+ G_CALLBACK (window_cmd_edit_find) },
3520+ { "EditFindNext", NULL, N_("Find Ne_xt"), "<control>G", NULL,
3521+ G_CALLBACK (window_cmd_edit_find_next) },
3522+ { "EditFindPrev", NULL, N_("Find Pre_vious"), "<shift><control>G", NULL,
3523+ G_CALLBACK (window_cmd_edit_find_prev) },
3524+ { "EditBookmarks", NULL, N_("Edit _Bookmarks"), "<control>B", NULL,
3525+ G_CALLBACK (window_cmd_edit_bookmarks) },
3526+ { "EditHistory", NULL, N_("_History"), "<control>H", NULL,
3527+ G_CALLBACK (window_cmd_edit_history) },
3528+ { "EditPreferences", NULL, N_("Pr_eferences"), "<control>e", NULL,
3529+ G_CALLBACK (window_cmd_edit_preferences) },
3530+
3531+ /* View actions. */
3532+
3533+ { "ViewStop", NULL, N_("_Stop"), "Escape", NULL,
3534+ G_CALLBACK (window_cmd_view_stop) },
3535+ { "ViewAlwaysStop", NULL, N_("_Stop"), "Escape",
3536+ NULL, G_CALLBACK (window_cmd_view_stop) },
3537+ { "ViewReload", NULL, N_("_Reload"), "<control>R", NULL,
3538+ G_CALLBACK (window_cmd_view_reload) },
3539+ { "ViewZoomIn", NULL, N_("Zoom _In"), "<control>plus", NULL,
3540+ G_CALLBACK (window_cmd_view_zoom_in) },
3541+ { "ViewZoomOut", NULL, N_("Zoom O_ut"), "<control>minus", NULL,
3542+ G_CALLBACK (window_cmd_view_zoom_out) },
3543+ { "ViewZoomNormal", NULL, N_("_Normal Size"), "<control>0", NULL,
3544+ G_CALLBACK (window_cmd_view_zoom_normal) },
3545+ { "ViewEncoding", NULL, N_("Text _Encoding"), NULL, NULL, NULL },
3546+ { "ViewPageSource", NULL, N_("_Page Source"), "<control>U", NULL,
3547+ G_CALLBACK (window_cmd_view_page_source) },
3548+
3549+ /* Bookmarks actions. */
3550+
3551+ { "FileBookmarkPage", NULL, N_("_Add Bookmark…"), "<control>D", NULL,
3552+ G_CALLBACK (window_cmd_file_bookmark_page) },
3553+
3554+ /* Go actions. */
3555+
3556+ { "GoLocation", NULL, N_("_Location…"), "<control>L", NULL,
3557+ G_CALLBACK (window_cmd_go_location) },
3558+
3559+ /* Tabs actions. */
3560+
3561+ { "TabsPrevious", NULL, N_("_Previous Tab"), "<control>Page_Up", NULL,
3562+ G_CALLBACK (window_cmd_tabs_previous) },
3563+ { "TabsNext", NULL, N_("_Next Tab"), "<control>Page_Down", NULL,
3564+ G_CALLBACK (window_cmd_tabs_next) },
3565+ { "TabsMoveLeft", NULL, N_("Move Tab _Left"), "<shift><control>Page_Up", NULL,
3566+ G_CALLBACK (window_cmd_tabs_move_left) },
3567+ { "TabsMoveRight", NULL, N_("Move Tab _Right"), "<shift><control>Page_Down", NULL,
3568+ G_CALLBACK (window_cmd_tabs_move_right) },
3569+ { "TabsDetach", NULL, N_("_Detach Tab"), NULL, NULL,
3570+ G_CALLBACK (window_cmd_tabs_detach) },
3571+
3572+ /* Help. */
3573+
3574+ { "HelpContents", NULL, N_("_Help"), NULL, NULL,
3575+ G_CALLBACK (window_cmd_help_contents) },
3576+ { "HelpAbout", NULL, N_("_About"), NULL, NULL,
3577+ G_CALLBACK (window_cmd_help_about) }
3578+};
3579+
3580+static const GtkToggleActionEntry ephy_menu_toggle_entries [] =
3581+{
3582+ /* View actions. */
3583+
3584+ { "ViewDownloadsBar", NULL, N_("_Downloads Bar"), NULL, NULL,
3585+ NULL, FALSE },
3586+
3587+ { "ViewFullscreen", NULL, N_("_Fullscreen"), "F11", NULL,
3588+ G_CALLBACK (window_cmd_view_fullscreen), FALSE },
3589+ { "ViewPopupWindows", NULL, N_("Popup _Windows"), NULL, NULL,
3590+ G_CALLBACK (ephy_window_view_popup_windows_cb), FALSE },
3591+ { "BrowseWithCaret", NULL, N_("Selection Caret"), "F7", NULL,
3592+ G_CALLBACK (window_cmd_browse_with_caret), FALSE }
3593+};
3594+
3595+static const GtkActionEntry ephy_popups_entries [] = {
3596+ /* Document. */
3597+
3598+ { "ContextBookmarkPage", NULL, N_("Add Boo_kmark…"), "<control>D", NULL,
3599+ G_CALLBACK (window_cmd_file_bookmark_page) },
3600+
3601+ /* Links. */
3602+
3603+ { "OpenLinkInNewWindow", NULL, N_("Open Link in New _Window"), NULL, NULL,
3604+ G_CALLBACK (popup_cmd_link_in_new_window) },
3605+ { "OpenLinkInNewTab", NULL, N_("Open Link in New _Tab"), NULL, NULL,
3606+ G_CALLBACK (popup_cmd_link_in_new_tab) },
3607+ { "DownloadLinkAs", NULL, N_("_Save Link As…"), NULL, NULL,
3608+ G_CALLBACK (popup_cmd_download_link_as) },
3609+ { "CopyLinkAddress", NULL, N_("_Copy Link Address"), NULL,
3610+ NULL, G_CALLBACK (popup_cmd_copy_link_address) },
3611+ { "CopyEmailAddress", NULL, N_("_Copy E-mail Address"), NULL,
3612+ NULL, G_CALLBACK (popup_cmd_copy_link_address) },
3613+
3614+ /* Images. */
3615+
3616+ { "ViewImage", NULL, N_("View _Image in New Tab"), NULL,
3617+ NULL, G_CALLBACK (popup_cmd_view_image_in_new_tab) },
3618+ { "CopyImageLocation", NULL, N_("Copy I_mage Address"), NULL,
3619+ NULL, G_CALLBACK (popup_cmd_copy_image_location) },
3620+ { "SaveImageAs", NULL, N_("_Save Image As…"), NULL,
3621+ NULL, G_CALLBACK (popup_cmd_save_image_as) },
3622+ { "SetImageAsBackground", NULL, N_("Set as _Wallpaper"), NULL,
3623+ NULL, G_CALLBACK (popup_cmd_set_image_as_background) },
3624+
3625+ /* Video. */
3626+
3627+ { "OpenVideoInNewWindow", NULL, N_("Open Video in New _Window"), NULL, NULL,
3628+ G_CALLBACK (popup_cmd_media_in_new_window) },
3629+ { "OpenVideoInNewTab", NULL, N_("Open Video in New _Tab"), NULL, NULL,
3630+ G_CALLBACK (popup_cmd_media_in_new_tab) },
3631+ { "SaveVideoAs", NULL, N_("_Save Video As…"), NULL,
3632+ NULL, G_CALLBACK (popup_cmd_save_media_as) },
3633+ { "CopyVideoLocation", NULL, N_("_Copy Video Address"), NULL,
3634+ NULL, G_CALLBACK (popup_cmd_copy_media_location) },
3635+
3636+ /* Audio. */
3637+
3638+ { "OpenAudioInNewWindow", NULL, N_("Open Audio in New _Window"), NULL, NULL,
3639+ G_CALLBACK (popup_cmd_media_in_new_window) },
3640+ { "OpenAudioInNewTab", NULL, N_("Open Audio in New _Tab"), NULL, NULL,
3641+ G_CALLBACK (popup_cmd_media_in_new_tab) },
3642+ { "SaveAudioAs", NULL, N_("_Save Audio As…"), NULL,
3643+ NULL, G_CALLBACK (popup_cmd_save_media_as) },
3644+ { "CopyAudioLocation", NULL, N_("_Copy Audio Address"), NULL,
3645+ NULL, G_CALLBACK (popup_cmd_copy_media_location) },
3646+};
3647+
3648+static const struct
3649+{
3650+ guint keyval;
3651+ GdkModifierType modifier;
3652+ const gchar *action;
3653+ gboolean fromToolbar;
3654+} extra_keybindings [] = {
3655+ /* FIXME: PageMenu should have its accel without being in the
3656+ * extra keybindings, but does not seem to work for some
3657+ * reason. */
3658+ { GDK_KEY_F10, 0, "PageMenu", TRUE },
3659+ { GDK_KEY_Home, GDK_MOD1_MASK, "FileHome", TRUE },
3660+ /* FIXME: these are not in any menu for now, so add them here. */
3661+ { GDK_KEY_F11, 0, "ViewFullscreen", FALSE },
3662+ { GDK_KEY_plus, GDK_CONTROL_MASK, "ViewZoomIn", FALSE },
3663+ { GDK_KEY_minus, GDK_CONTROL_MASK, "ViewZoomOut", FALSE },
3664+ { GDK_KEY_0, GDK_CONTROL_MASK, "ViewZoomNormal", FALSE },
3665+ { GDK_KEY_g, GDK_CONTROL_MASK, "EditFindNext", FALSE },
3666+ { GDK_KEY_G, GDK_CONTROL_MASK |
3667+ GDK_SHIFT_MASK, "EditFindPrev", FALSE },
3668+
3669+ { GDK_KEY_s, GDK_CONTROL_MASK, "FileSaveAs", FALSE },
3670+ { GDK_KEY_r, GDK_CONTROL_MASK, "ViewReload", FALSE },
3671+ { GDK_KEY_R, GDK_CONTROL_MASK, "ViewReload", FALSE },
3672+ { GDK_KEY_R, GDK_CONTROL_MASK |
3673+ GDK_SHIFT_MASK, "ViewReload", FALSE },
3674+ /* Tab navigation */
3675+ { GDK_KEY_Page_Up, GDK_CONTROL_MASK, "TabsPrevious", FALSE },
3676+ { GDK_KEY_Page_Down, GDK_CONTROL_MASK, "TabsNext", FALSE },
3677+ { GDK_KEY_Page_Up, GDK_CONTROL_MASK |
3678+ GDK_SHIFT_MASK, "TabsMoveLeft", FALSE },
3679+ { GDK_KEY_Page_Down, GDK_CONTROL_MASK |
3680+ GDK_SHIFT_MASK, "TabsMoveRight", FALSE },
3681+ /* Go */
3682+ { GDK_KEY_l, GDK_CONTROL_MASK, "GoLocation", FALSE },
3683+ /* Support all the MSIE tricks as well ;) */
3684+ { GDK_KEY_F5, 0, "ViewReload", FALSE },
3685+ { GDK_KEY_F5, GDK_CONTROL_MASK, "ViewReload", FALSE },
3686+ { GDK_KEY_F5, GDK_SHIFT_MASK, "ViewReload", FALSE },
3687+ { GDK_KEY_F5, GDK_CONTROL_MASK |
3688+ GDK_SHIFT_MASK, "ViewReload", FALSE },
3689+ { GDK_KEY_KP_Add, GDK_CONTROL_MASK, "ViewZoomIn", FALSE },
3690+ { GDK_KEY_KP_Subtract, GDK_CONTROL_MASK, "ViewZoomOut", FALSE },
3691+ { GDK_KEY_equal, GDK_CONTROL_MASK, "ViewZoomIn", FALSE },
3692+ { GDK_KEY_KP_0, GDK_CONTROL_MASK, "ViewZoomNormal", FALSE },
3693+ /* These keys are a bit strange: when pressed with no modifiers, they emit
3694+ * KP_PageUp/Down Control; when pressed with Control+Shift they are KP_9/3,
3695+ * when NumLock is on they are KP_9/3 and with NumLock and Control+Shift
3696+ * They're KP_PageUp/Down again!
3697+ */
3698+ { GDK_KEY_Left, GDK_MOD1_MASK /*Alt*/, "NavigationBack", TRUE },
3699+ { GDK_KEY_KP_Left, GDK_MOD1_MASK /*Alt*/, "NavigationBack", TRUE },
3700+ { GDK_KEY_KP_4, GDK_MOD1_MASK /*Alt*/, "NavigationBack", TRUE },
3701+ { GDK_KEY_Right, GDK_MOD1_MASK /*Alt*/, "NavigationForward", TRUE },
3702+ { GDK_KEY_KP_Right, GDK_MOD1_MASK /*Alt*/, "NavigationForward", TRUE },
3703+ { GDK_KEY_KP_6, GDK_MOD1_MASK /*Alt*/, "NavigationForward", TRUE },
3704+ { GDK_KEY_KP_Page_Up, GDK_CONTROL_MASK, "TabsPrevious", FALSE },
3705+ { GDK_KEY_KP_9, GDK_CONTROL_MASK, "TabsPrevious", FALSE },
3706+ { GDK_KEY_KP_Page_Down, GDK_CONTROL_MASK, "TabsNext", FALSE },
3707+ { GDK_KEY_KP_3, GDK_CONTROL_MASK, "TabsNext", FALSE },
3708+ { GDK_KEY_KP_Page_Up, GDK_SHIFT_MASK | GDK_CONTROL_MASK, "TabsMoveLeft", FALSE },
3709+ { GDK_KEY_KP_9, GDK_SHIFT_MASK | GDK_CONTROL_MASK, "TabsMoveLeft", FALSE },
3710+ { GDK_KEY_KP_Page_Down, GDK_SHIFT_MASK | GDK_CONTROL_MASK, "TabsMoveRight", FALSE },
3711+ { GDK_KEY_KP_3, GDK_SHIFT_MASK | GDK_CONTROL_MASK, "TabsMoveRight", FALSE },
3712+#ifdef HAVE_X11_XF86KEYSYM_H
3713+ { XF86XK_Back, 0, "NavigationBack", TRUE },
3714+ { XF86XK_Forward, 0, "NavigationForward", TRUE },
3715+ { XF86XK_Go, 0, "GoLocation", FALSE },
3716+ { XF86XK_OpenURL, 0, "GoLocation", FALSE },
3717+ { XF86XK_AddFavorite, 0, "FileBookmarkPage", FALSE },
3718+ { XF86XK_Refresh, 0, "ViewReload", FALSE },
3719+ { XF86XK_Reload, 0, "ViewReload", FALSE },
3720+ { XF86XK_Search, 0, "EditFind", FALSE },
3721+ { XF86XK_Send, 0, "FileSendTo", FALSE },
3722+ { XF86XK_Stop, 0, "ViewStop", FALSE },
3723+ { XF86XK_ZoomIn, 0, "ViewZoomIn", FALSE },
3724+ { XF86XK_ZoomOut, 0, "ViewZoomOut", FALSE }
3725+ /* FIXME: what about ScrollUp, ScrollDown, Menu*, Option, LogOff, Save,.. any others? */
3726+#endif /* HAVE_X11_XF86KEYSYM_H */
3727+};
3728+
3729+#define SETTINGS_CONNECTION_DATA_KEY "EphyWindowSettings"
3730+
3731+#define EPHY_WINDOW_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_WINDOW, EphyWindowPrivate))
3732+
3733+struct _EphyWindowPrivate
3734+{
3735+ GtkWidget *main_vbox;
3736+ GtkWidget *toolbar;
3737+ GtkUIManager *manager;
3738+ GtkActionGroup *action_group;
3739+ GtkActionGroup *popups_action_group;
3740+ GtkActionGroup *toolbar_action_group;
3741+ GtkActionGroup *tab_accels_action_group;
3742+ EphyEncodingMenu *enc_menu;
3743+ GtkNotebook *notebook;
3744+ EphyEmbed *active_embed;
3745+ EphyWindowChrome chrome;
3746+ EphyEmbedEvent *context_event;
3747+ WebKitHitTestResult *hit_test_result;
3748+ guint idle_worker;
3749+ GtkWidget *downloads_box;
3750+
3751+ EphyLocationController *location_controller;
3752+
3753+ gulong app_menu_visibility_handler;
3754+
3755+ guint closing : 1;
3756+ guint has_size : 1;
3757+ guint fullscreen_mode : 1;
3758+ guint is_popup : 1;
3759+ guint present_on_insert : 1;
3760+ guint key_theme_is_emacs : 1;
3761+ guint updating_address : 1;
3762+ guint force_close : 1;
3763+ guint checking_modified_forms : 1;
3764+};
3765+
3766+enum
3767+{
3768+ PROP_0,
3769+ PROP_ACTIVE_CHILD,
3770+ PROP_CHROME,
3771+ PROP_SINGLE_TAB_MODE
3772+};
3773+
3774+/* Make sure not to overlap with those in ephy-lockdown.c */
3775+enum
3776+{
3777+ SENS_FLAG_CHROME = 1 << 0,
3778+ SENS_FLAG_CONTEXT = 1 << 1,
3779+ SENS_FLAG_DOCUMENT = 1 << 2,
3780+ SENS_FLAG_LOADING = 1 << 3,
3781+ SENS_FLAG_NAVIGATION = 1 << 4,
3782+ SENS_FLAG_IS_BLANK = 1 << 5
3783+};
3784+
3785+static gint
3786+impl_add_child (EphyEmbedContainer *container,
3787+ EphyEmbed *child,
3788+ gint position,
3789+ gboolean jump_to)
3790+{
3791+ EphyWindow *window = EPHY_WINDOW (container);
3792+
3793+ g_return_val_if_fail (!window->priv->is_popup ||
3794+ gtk_notebook_get_n_pages (GTK_NOTEBOOK (window->priv->notebook)) < 1, -1);
3795+
3796+ return ephy_notebook_add_tab (EPHY_NOTEBOOK (window->priv->notebook),
3797+ child, position, jump_to);
3798+}
3799+
3800+static void
3801+impl_set_active_child (EphyEmbedContainer *container,
3802+ EphyEmbed *child)
3803+{
3804+ int page;
3805+ EphyWindow *window;
3806+
3807+ window = EPHY_WINDOW (container);
3808+
3809+ page = gtk_notebook_page_num
3810+ (window->priv->notebook, GTK_WIDGET (child));
3811+ gtk_notebook_set_current_page
3812+ (window->priv->notebook, page);
3813+}
3814+
3815+static GtkWidget *
3816+construct_confirm_close_dialog (EphyWindow *window,
3817+ const char *title,
3818+ const char *info,
3819+ const char *action)
3820+{
3821+ GtkWidget *dialog;
3822+
3823+ dialog = gtk_message_dialog_new (GTK_WINDOW (window),
3824+ GTK_DIALOG_MODAL,
3825+ GTK_MESSAGE_WARNING,
3826+ GTK_BUTTONS_CANCEL,
3827+ "%s", title);
3828+
3829+ gtk_message_dialog_format_secondary_text
3830+ (GTK_MESSAGE_DIALOG (dialog), "%s", info);
3831+
3832+ gtk_dialog_add_button (GTK_DIALOG (dialog),
3833+ action, GTK_RESPONSE_ACCEPT);
3834+
3835+ gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL);
3836+
3837+ /* FIXME gtk_window_set_title (GTK_WINDOW (dialog), _("Close Document?")); */
3838+ gtk_window_group_add_window (gtk_window_get_group (GTK_WINDOW (window)),
3839+ GTK_WINDOW (dialog));
3840+
3841+ return dialog;
3842+}
3843+
3844+static gboolean
3845+confirm_close_with_modified_forms (EphyWindow *window)
3846+{
3847+ GtkWidget *dialog;
3848+ int response;
3849+
3850+ dialog = construct_confirm_close_dialog (window,
3851+ _("There are unsubmitted changes to form elements"),
3852+ _("If you close the document anyway, "
3853+ "you will lose that information."),
3854+ _("Close _Document"));
3855+ response = gtk_dialog_run (GTK_DIALOG (dialog));
3856+
3857+ gtk_widget_destroy (dialog);
3858+
3859+ return response == GTK_RESPONSE_ACCEPT;
3860+}
3861+
3862+static gboolean
3863+confirm_close_with_downloads (EphyWindow *window)
3864+{
3865+ GtkWidget *dialog;
3866+ int response;
3867+
3868+ dialog = construct_confirm_close_dialog (window,
3869+ _("There are ongoing downloads in this window"),
3870+ _("If you close this window, the downloads will be cancelled"),
3871+ _("Close window and cancel downloads"));
3872+ response = gtk_dialog_run (GTK_DIALOG (dialog));
3873+
3874+ gtk_widget_destroy (dialog);
3875+
3876+ return response == GTK_RESPONSE_ACCEPT;
3877+}
3878+
3879+static void
3880+impl_remove_child (EphyEmbedContainer *container,
3881+ EphyEmbed *child)
3882+{
3883+ EphyWindow *window;
3884+
3885+ window = EPHY_WINDOW (container);
3886+ g_signal_emit_by_name (window->priv->notebook,
3887+ "tab-close-request",
3888+ child, window);
3889+}
3890+
3891+static EphyEmbed *
3892+impl_get_active_child (EphyEmbedContainer *container)
3893+{
3894+ return EPHY_WINDOW (container)->priv->active_embed;
3895+}
3896+
3897+static GList *
3898+impl_get_children (EphyEmbedContainer *container)
3899+{
3900+ EphyWindow *window = EPHY_WINDOW (container);
3901+
3902+ return gtk_container_get_children (GTK_CONTAINER (window->priv->notebook));
3903+}
3904+
3905+static gboolean
3906+impl_get_is_popup (EphyEmbedContainer *container)
3907+{
3908+ return EPHY_WINDOW (container)->priv->is_popup;
3909+}
3910+
3911+static void
3912+ephy_window_embed_container_iface_init (EphyEmbedContainerIface *iface)
3913+{
3914+ iface->add_child = impl_add_child;
3915+ iface->set_active_child = impl_set_active_child;
3916+ iface->remove_child = impl_remove_child;
3917+ iface->get_active_child = impl_get_active_child;
3918+ iface->get_children = impl_get_children;
3919+ iface->get_is_popup = impl_get_is_popup;
3920+}
3921+
3922+static EphyEmbed *
3923+ephy_window_open_link (EphyLink *link,
3924+ const char *address,
3925+ EphyEmbed *embed,
3926+ EphyLinkFlags flags)
3927+{
3928+ EphyWindow *window = EPHY_WINDOW (link);
3929+ EphyWindowPrivate *priv = window->priv;
3930+ EphyEmbed *new_embed;
3931+
3932+ g_return_val_if_fail (address != NULL, NULL);
3933+
3934+ if (embed == NULL)
3935+ {
3936+ embed = window->priv->active_embed;
3937+ }
3938+
3939+ if (flags & EPHY_LINK_BOOKMARK)
3940+ ephy_web_view_set_visit_type (ephy_embed_get_web_view (embed),
3941+ EPHY_PAGE_VISIT_BOOKMARK);
3942+ else if (flags & EPHY_LINK_TYPED)
3943+ ephy_web_view_set_visit_type (ephy_embed_get_web_view (embed),
3944+ EPHY_PAGE_VISIT_TYPED);
3945+
3946+ if (flags & (EPHY_LINK_JUMP_TO |
3947+ EPHY_LINK_NEW_TAB |
3948+ EPHY_LINK_NEW_WINDOW))
3949+ {
3950+ EphyNewTabFlags ntflags = 0;
3951+ EphyWindow *target_window = EPHY_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (embed)));
3952+
3953+ if (flags & EPHY_LINK_JUMP_TO)
3954+ {
3955+ ntflags |= EPHY_NEW_TAB_JUMP;
3956+ }
3957+
3958+ if (flags & EPHY_LINK_NEW_WINDOW ||
3959+ (flags & EPHY_LINK_NEW_TAB && priv->is_popup))
3960+ {
3961+ target_window = ephy_window_new ();
3962+ }
3963+
3964+ if (flags & EPHY_LINK_NEW_TAB_APPEND_AFTER)
3965+ ntflags |= EPHY_NEW_TAB_APPEND_AFTER;
3966+
3967+ new_embed = ephy_shell_new_tab
3968+ (ephy_shell_get_default (),
3969+ target_window,
3970+ embed, ntflags);
3971+ if (flags & EPHY_LINK_HOME_PAGE)
3972+ {
3973+ ephy_web_view_load_homepage (ephy_embed_get_web_view (new_embed));
3974+ ephy_window_activate_location (window);
3975+ }
3976+ else
3977+ {
3978+ ephy_web_view_load_url (ephy_embed_get_web_view (new_embed), address);
3979+ if (flags & EPHY_LINK_JUMP_TO)
3980+ {
3981+ gtk_widget_grab_focus (GTK_WIDGET (new_embed));
3982+ }
3983+ }
3984+ }
3985+ else
3986+ {
3987+ ephy_web_view_load_url (ephy_embed_get_web_view (embed), address);
3988+
3989+ if (address == NULL || address[0] == '\0' || g_str_equal (address, "about:blank"))
3990+ {
3991+ ephy_window_activate_location (window);
3992+ }
3993+ else
3994+ {
3995+ gtk_widget_grab_focus (GTK_WIDGET (embed));
3996+ }
3997+
3998+ new_embed = embed;
3999+ }
4000+
4001+ return new_embed;
4002+}
4003+
4004+static void
4005+ephy_window_link_iface_init (EphyLinkIface *iface)
4006+{
4007+ iface->open_link = ephy_window_open_link;
4008+}
4009+
4010+G_DEFINE_TYPE_WITH_CODE (EphyWindow, ephy_window, GTK_TYPE_APPLICATION_WINDOW,
4011+ G_IMPLEMENT_INTERFACE (EPHY_TYPE_LINK,
4012+ ephy_window_link_iface_init)
4013+ G_IMPLEMENT_INTERFACE (EPHY_TYPE_EMBED_CONTAINER,
4014+ ephy_window_embed_container_iface_init))
4015+
4016+static void
4017+settings_change_notify (GtkSettings *settings,
4018+ EphyWindow *window)
4019+{
4020+ EphyWindowPrivate *priv = window->priv;
4021+ char *key_theme_name;
4022+
4023+ g_object_get (settings,
4024+ "gtk-key-theme-name", &key_theme_name,
4025+ NULL);
4026+
4027+ priv->key_theme_is_emacs =
4028+ key_theme_name &&
4029+ g_ascii_strcasecmp (key_theme_name, "Emacs") == 0;
4030+
4031+ g_free (key_theme_name);
4032+}
4033+
4034+static void
4035+settings_changed_cb (GtkSettings *settings)
4036+{
4037+ GList *list, *l;
4038+
4039+ /* FIXME: multi-head */
4040+ list = gtk_window_list_toplevels ();
4041+
4042+ for (l = list; l != NULL; l = l->next)
4043+ {
4044+ if (EPHY_IS_WINDOW (l->data))
4045+ {
4046+ settings_change_notify (settings, l->data);
4047+ }
4048+ }
4049+
4050+ g_list_free (list);
4051+}
4052+
4053+static void
4054+sync_chromes_visibility (EphyWindow *window)
4055+{
4056+ EphyWindowPrivate *priv = window->priv;
4057+ gboolean show_tabsbar, show_downloads_box;
4058+
4059+ if (priv->closing)
4060+ return;
4061+
4062+ show_tabsbar = (priv->chrome & EPHY_WINDOW_CHROME_TABSBAR);
4063+ show_downloads_box = (priv->chrome & EPHY_WINDOW_CHROME_DOWNLOADS_BOX);
4064+
4065+ ephy_notebook_set_tabs_allowed (EPHY_NOTEBOOK (priv->notebook),
4066+ show_tabsbar && !(priv->is_popup || priv->fullscreen_mode));
4067+ gtk_widget_set_visible (priv->downloads_box,
4068+ show_downloads_box && !priv->fullscreen_mode);
4069+}
4070+
4071+static void
4072+ephy_window_set_chrome (EphyWindow *window,
4073+ EphyWindowChrome chrome)
4074+{
4075+ if (window->priv->chrome == chrome)
4076+ return;
4077+
4078+ window->priv->chrome = chrome;
4079+ if (window->priv->closing)
4080+ return;
4081+
4082+ g_object_notify (G_OBJECT (window), "chrome");
4083+ sync_chromes_visibility (window);
4084+}
4085+
4086+static void
4087+sync_tab_load_status (EphyWebView *view,
4088+ WebKitLoadEvent load_event,
4089+ EphyWindow *window)
4090+{
4091+ EphyWindowPrivate *priv = window->priv;
4092+ GtkActionGroup *action_group = priv->action_group;
4093+ GtkAction *action;
4094+ gboolean loading;
4095+
4096+ if (window->priv->closing) return;
4097+
4098+ loading = ephy_web_view_is_loading (view);
4099+
4100+ action = gtk_action_group_get_action (action_group, "ViewStop");
4101+ gtk_action_set_sensitive (action, loading);
4102+
4103+ /* disable print while loading, see bug #116344 */
4104+ action = gtk_action_group_get_action (action_group, "FilePrint");
4105+ ephy_action_change_sensitivity_flags (action, SENS_FLAG_LOADING, loading);
4106+
4107+ action = gtk_action_group_get_action (priv->toolbar_action_group,
4108+ "ViewCombinedStopReload");
4109+ ephy_combined_stop_reload_action_set_loading (EPHY_COMBINED_STOP_RELOAD_ACTION (action),
4110+ loading);
4111+}
4112+
4113+static void
4114+sync_tab_security (EphyWebView *view,
4115+ GParamSpec *pspec,
4116+ EphyWindow *window)
4117+{
4118+ EphyWindowPrivate *priv = window->priv;
4119+ EphyTitleBox *title_box;
4120+ EphySecurityLevel security_level;
4121+
4122+ if (priv->closing) return;
4123+
4124+ ephy_web_view_get_security_level (view, &security_level, NULL, NULL);
4125+ title_box = ephy_toolbar_get_title_box (EPHY_TOOLBAR (priv->toolbar));
4126+ ephy_title_box_set_security_level (title_box, security_level);
4127+}
4128+
4129+static void
4130+ephy_window_fullscreen (EphyWindow *window)
4131+{
4132+ EphyWindowPrivate *priv = window->priv;
4133+ EphyEmbed *embed;
4134+
4135+ priv->fullscreen_mode = TRUE;
4136+
4137+ /* sync status */
4138+ embed = window->priv->active_embed;
4139+ sync_tab_load_status (ephy_embed_get_web_view (embed), WEBKIT_LOAD_STARTED, window);
4140+ sync_tab_security (ephy_embed_get_web_view (embed), NULL, window);
4141+
4142+ sync_chromes_visibility (window);
4143+ gtk_widget_hide (priv->toolbar);
4144+ ephy_embed_entering_fullscreen (embed);
4145+}
4146+
4147+static void
4148+ephy_window_unfullscreen (EphyWindow *window)
4149+{
4150+ window->priv->fullscreen_mode = FALSE;
4151+
4152+ gtk_widget_show (window->priv->toolbar);
4153+ sync_chromes_visibility (window);
4154+ ephy_embed_leaving_fullscreen (window->priv->active_embed);
4155+}
4156+
4157+static gboolean
4158+ephy_window_key_press_event (GtkWidget *widget,
4159+ GdkEventKey *event)
4160+{
4161+ EphyWindow *window = EPHY_WINDOW (widget);
4162+ EphyWindowPrivate *priv = window->priv;
4163+ GtkWidget *focus_widget;
4164+ gboolean shortcircuit = FALSE, force_chain = FALSE, handled = FALSE;
4165+ guint modifier = event->state & gtk_accelerator_get_default_mod_mask ();
4166+ guint i;
4167+
4168+ /* In an attempt to get the mozembed playing nice with things like emacs keybindings
4169+ * we are passing important events to the focused child widget before letting the window's
4170+ * base handler see them. This is *completely against* stated gtk2 policy but the
4171+ * 'correct' behaviour is exceptionally useless. We need to keep an eye out for
4172+ * unexpected consequences of this decision. IME's should be a high concern, but
4173+ * considering that the IME folks complained about the upside-down event propagation
4174+ * rules, we might be doing them a favour.
4175+ *
4176+ * We achieve this by first evaluating the event to see if it's important, and if
4177+ * so, we get the focus widget and attempt to get the widget to handle that event.
4178+ * If the widget does handle it, we're done (unless force_chain is true, in which
4179+ * case the event is handled as normal in addition to being sent to the focus
4180+ * widget), otherwise the event follows the normal handling path.
4181+ */
4182+
4183+ if (event->keyval == GDK_KEY_Escape && modifier == 0)
4184+ {
4185+ /* Always pass Escape to both the widget, and the parent */
4186+ shortcircuit = TRUE;
4187+ force_chain = TRUE;
4188+ }
4189+ else if (priv->key_theme_is_emacs &&
4190+ (modifier == GDK_CONTROL_MASK) &&
4191+ event->length > 0 &&
4192+ /* But don't pass Ctrl+Enter twice */
4193+ event->keyval != GDK_KEY_Return &&
4194+ event->keyval != GDK_KEY_KP_Enter &&
4195+ event->keyval != GDK_KEY_ISO_Enter)
4196+ {
4197+ /* Pass CTRL+letter characters to the widget */
4198+ shortcircuit = TRUE;
4199+ }
4200+
4201+ if (shortcircuit)
4202+ {
4203+ focus_widget = gtk_window_get_focus (GTK_WINDOW (window));
4204+
4205+ if (GTK_IS_WIDGET (focus_widget))
4206+ {
4207+ handled = gtk_widget_event (focus_widget,
4208+ (GdkEvent*) event);
4209+ }
4210+
4211+ if (handled && !force_chain)
4212+ {
4213+ return handled;
4214+ }
4215+ }
4216+
4217+ /* Handle accelerators that we want bound, but aren't associated with
4218+ * an action */
4219+ for (i = 0; i < G_N_ELEMENTS (extra_keybindings); i++)
4220+ {
4221+ if (event->keyval == extra_keybindings[i].keyval &&
4222+ modifier == extra_keybindings[i].modifier)
4223+ {
4224+ GtkAction * action = gtk_action_group_get_action
4225+ (extra_keybindings[i].fromToolbar ?
4226+ priv->toolbar_action_group :
4227+ priv->action_group,
4228+ extra_keybindings[i].action);
4229+ if (gtk_action_is_sensitive (action))
4230+ {
4231+ gtk_action_activate (action);
4232+ return TRUE;
4233+ }
4234+ break;
4235+ }
4236+ }
4237+
4238+ return GTK_WIDGET_CLASS (ephy_window_parent_class)->key_press_event (widget, event);
4239+}
4240+
4241+static gboolean
4242+window_has_ongoing_downloads (EphyWindow *window)
4243+{
4244+ GList *l, *downloads;
4245+ gboolean downloading = FALSE;
4246+
4247+ downloads = gtk_container_get_children (GTK_CONTAINER (window->priv->downloads_box));
4248+
4249+ for (l = downloads; l != NULL; l = l->next)
4250+ {
4251+ if (EPHY_IS_DOWNLOAD_WIDGET (l->data) != TRUE)
4252+ continue;
4253+
4254+ if (!ephy_download_widget_download_is_finished (EPHY_DOWNLOAD_WIDGET (l->data)))
4255+ {
4256+ downloading = TRUE;
4257+ break;
4258+ }
4259+ }
4260+ g_list_free (downloads);
4261+
4262+ return downloading;
4263+}
4264+
4265+static gboolean
4266+ephy_window_delete_event (GtkWidget *widget,
4267+ GdkEventAny *event)
4268+{
4269+ if (!ephy_window_close (EPHY_WINDOW (widget)))
4270+ return TRUE;
4271+
4272+ /* proceed with window close */
4273+ if (GTK_WIDGET_CLASS (ephy_window_parent_class)->delete_event)
4274+ {
4275+ return GTK_WIDGET_CLASS (ephy_window_parent_class)->delete_event (widget, event);
4276+ }
4277+
4278+ return FALSE;
4279+}
4280+
4281+#define MAX_SPELL_CHECK_GUESSES 4
4282+
4283+static void
4284+update_link_actions_sensitivity (EphyWindow *window,
4285+ gboolean link_has_web_scheme)
4286+{
4287+ GtkAction *action;
4288+ GtkActionGroup *action_group;
4289+
4290+ action_group = window->priv->popups_action_group;
4291+
4292+ action = gtk_action_group_get_action (action_group, "OpenLinkInNewWindow");
4293+ gtk_action_set_sensitive (action, link_has_web_scheme);
4294+
4295+ action = gtk_action_group_get_action (action_group, "OpenLinkInNewTab");
4296+ ephy_action_change_sensitivity_flags (action, SENS_FLAG_CONTEXT, !link_has_web_scheme);
4297+}
4298+
4299+static void
4300+update_edit_action_sensitivity (EphyWindow *window, const gchar *action_name, gboolean sensitive, gboolean hide)
4301+{
4302+ GtkAction *action;
4303+
4304+ action = gtk_action_group_get_action (window->priv->action_group, action_name);
4305+ gtk_action_set_sensitive (action, sensitive);
4306+ gtk_action_set_visible (action, !hide || sensitive);
4307+}
4308+
4309+typedef struct
4310+{
4311+ EphyWindow *window;
4312+ const gchar *action_name;
4313+ gboolean hide;
4314+} CanEditCommandAsyncData;
4315+
4316+static CanEditCommandAsyncData *
4317+can_edit_command_async_data_new (EphyWindow *window, const gchar *action_name, gboolean hide)
4318+{
4319+ CanEditCommandAsyncData *data;
4320+
4321+ data = g_slice_new (CanEditCommandAsyncData);
4322+ data->window = g_object_ref (window);
4323+ data->action_name = action_name;
4324+ data->hide = hide;
4325+
4326+ return data;
4327+}
4328+
4329+static void
4330+can_edit_command_async_data_free (CanEditCommandAsyncData *data)
4331+{
4332+ if (G_UNLIKELY (!data))
4333+ return;
4334+
4335+ g_object_unref (data->window);
4336+ g_slice_free (CanEditCommandAsyncData, data);
4337+}
4338+
4339+static void
4340+can_edit_command_callback (GObject *object, GAsyncResult *result, CanEditCommandAsyncData *data)
4341+{
4342+ gboolean sensitive;
4343+ GError *error = NULL;
4344+
4345+ sensitive = webkit_web_view_can_execute_editing_command_finish (WEBKIT_WEB_VIEW (object), result, &error);
4346+ if (!error)
4347+ {
4348+ update_edit_action_sensitivity (data->window, data->action_name, sensitive, data->hide);
4349+
4350+ }
4351+ else
4352+ {
4353+ g_error_free (error);
4354+ }
4355+
4356+ can_edit_command_async_data_free (data);
4357+}
4358+
4359+static void
4360+update_edit_actions_sensitivity (EphyWindow *window, gboolean hide)
4361+{
4362+ GtkWidget *widget = gtk_window_get_focus (GTK_WINDOW (window));
4363+ gboolean can_copy, can_cut, can_undo, can_redo, can_paste;
4364+
4365+ if (GTK_IS_EDITABLE (widget))
4366+ {
4367+ GtkWidget *entry;
4368+ gboolean has_selection;
4369+
4370+ entry = ephy_toolbar_get_location_entry (EPHY_TOOLBAR (window->priv->toolbar));
4371+
4372+ has_selection = gtk_editable_get_selection_bounds
4373+ (GTK_EDITABLE (widget), NULL, NULL);
4374+
4375+ can_copy = has_selection;
4376+ can_cut = has_selection;
4377+ can_paste = TRUE;
4378+ can_undo = ephy_location_entry_get_can_undo (EPHY_LOCATION_ENTRY (entry));
4379+ can_redo = ephy_location_entry_get_can_redo (EPHY_LOCATION_ENTRY (entry));
4380+ }
4381+ else
4382+ {
4383+ EphyEmbed *embed;
4384+ WebKitWebView *view;
4385+ CanEditCommandAsyncData *data;
4386+
4387+ embed = window->priv->active_embed;
4388+ g_return_if_fail (embed != NULL);
4389+
4390+ view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed);
4391+
4392+ data = can_edit_command_async_data_new (window, "EditCopy", hide);
4393+ webkit_web_view_can_execute_editing_command (view, WEBKIT_EDITING_COMMAND_COPY, NULL,
4394+ (GAsyncReadyCallback)can_edit_command_callback,
4395+ data);
4396+ data = can_edit_command_async_data_new (window, "EditCut", hide);
4397+ webkit_web_view_can_execute_editing_command (view, WEBKIT_EDITING_COMMAND_CUT, NULL,
4398+ (GAsyncReadyCallback)can_edit_command_callback,
4399+ data);
4400+ data = can_edit_command_async_data_new (window, "EditPaste", hide);
4401+ webkit_web_view_can_execute_editing_command (view, WEBKIT_EDITING_COMMAND_PASTE, NULL,
4402+ (GAsyncReadyCallback)can_edit_command_callback,
4403+ data);
4404+ data = can_edit_command_async_data_new (window, "EditUndo", hide);
4405+ webkit_web_view_can_execute_editing_command (view, "Undo", NULL,
4406+ (GAsyncReadyCallback)can_edit_command_callback,
4407+ data);
4408+ data = can_edit_command_async_data_new (window, "EditRedo", hide);
4409+ webkit_web_view_can_execute_editing_command (view, "Redo", NULL,
4410+ (GAsyncReadyCallback)can_edit_command_callback,
4411+ data);
4412+ return;
4413+ }
4414+
4415+ update_edit_action_sensitivity (window, "EditCopy", can_copy, hide);
4416+ update_edit_action_sensitivity (window, "EditCut", can_cut, hide);
4417+ update_edit_action_sensitivity (window, "EditPaste", can_paste, hide);
4418+ update_edit_action_sensitivity (window, "EditUndo", can_undo, hide);
4419+ update_edit_action_sensitivity (window, "EditRedo", can_redo, hide);
4420+}
4421+
4422+static void
4423+enable_edit_actions_sensitivity (EphyWindow *window)
4424+{
4425+ GtkActionGroup *action_group;
4426+ GtkAction *action;
4427+
4428+ action_group = window->priv->action_group;
4429+
4430+ action = gtk_action_group_get_action (action_group, "EditCopy");
4431+ gtk_action_set_sensitive (action, TRUE);
4432+ gtk_action_set_visible (action, TRUE);
4433+ action = gtk_action_group_get_action (action_group, "EditCut");
4434+ gtk_action_set_sensitive (action, TRUE);
4435+ gtk_action_set_visible (action, TRUE);
4436+ action = gtk_action_group_get_action (action_group, "EditPaste");
4437+ gtk_action_set_sensitive (action, TRUE);
4438+ gtk_action_set_visible (action, TRUE);
4439+ action = gtk_action_group_get_action (action_group, "EditUndo");
4440+ gtk_action_set_sensitive (action, TRUE);
4441+ gtk_action_set_visible (action, TRUE);
4442+ action = gtk_action_group_get_action (action_group, "EditRedo");
4443+ gtk_action_set_sensitive (action, TRUE);
4444+ gtk_action_set_visible (action, TRUE);
4445+}
4446+
4447+static void
4448+edit_menu_show_cb (GtkWidget *menu,
4449+ EphyWindow *window)
4450+{
4451+ update_edit_actions_sensitivity (window, FALSE);
4452+}
4453+
4454+static void
4455+edit_menu_hide_cb (GtkWidget *menu,
4456+ EphyWindow *window)
4457+{
4458+ enable_edit_actions_sensitivity (window);
4459+}
4460+
4461+static void
4462+init_menu_updaters (EphyWindow *window)
4463+{
4464+ GtkWidget *edit_menu;
4465+
4466+ edit_menu = gtk_ui_manager_get_widget
4467+ (window->priv->manager, "/ui/PagePopup");
4468+
4469+ g_signal_connect (edit_menu, "show",
4470+ G_CALLBACK (edit_menu_show_cb), window);
4471+ g_signal_connect (edit_menu, "hide",
4472+ G_CALLBACK (edit_menu_hide_cb), window);
4473+}
4474+
4475+static void
4476+setup_ui_manager (EphyWindow *window)
4477+{
4478+ GtkActionGroup *action_group;
4479+ GtkAccelGroup *accel_group;
4480+ GtkAction *action;
4481+ GtkUIManager *manager;
4482+
4483+ window->priv->main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
4484+ gtk_widget_show (window->priv->main_vbox);
4485+ gtk_container_add (GTK_CONTAINER (window),
4486+ window->priv->main_vbox);
4487+
4488+ manager = gtk_ui_manager_new ();
4489+ accel_group = gtk_ui_manager_get_accel_group (manager);
4490+
4491+ action_group = gtk_action_group_new ("WindowActions");
4492+ gtk_action_group_set_translation_domain (action_group, NULL);
4493+ gtk_action_group_add_actions (action_group, ephy_menu_entries,
4494+ G_N_ELEMENTS (ephy_menu_entries), window);
4495+ gtk_action_group_add_toggle_actions (action_group,
4496+ ephy_menu_toggle_entries,
4497+ G_N_ELEMENTS (ephy_menu_toggle_entries),
4498+ window);
4499+ gtk_action_group_set_accel_group (action_group, accel_group);
4500+ gtk_ui_manager_insert_action_group (manager, action_group, 0);
4501+ window->priv->action_group = action_group;
4502+ g_object_unref (action_group);
4503+
4504+ action = gtk_action_group_get_action (action_group, "FileOpen");
4505+ g_object_set (action, "short_label", _("Open"), NULL);
4506+ action = gtk_action_group_get_action (action_group, "FileSaveAs");
4507+ g_object_set (action, "short_label", _("Save As"), NULL);
4508+ action = gtk_action_group_get_action (action_group, "FileSaveAsApplication");
4509+ g_object_set (action, "short_label", _("Save As Application"), NULL);
4510+ action = gtk_action_group_get_action (action_group, "FilePrint");
4511+ g_object_set (action, "short_label", _("Print"), NULL);
4512+ action = gtk_action_group_get_action (action_group, "FileBookmarkPage");
4513+ g_object_set (action, "short_label", _("Bookmark"), NULL);
4514+ action = gtk_action_group_get_action (action_group, "EditFind");
4515+ g_object_set (action, "short_label", _("Find"), NULL);
4516+
4517+ action = gtk_action_group_get_action (action_group, "EditFind");
4518+ g_object_set (action, "is_important", TRUE, NULL);
4519+
4520+ action = gtk_action_group_get_action (action_group, "ViewEncoding");
4521+ g_object_set (action, "hide_if_empty", FALSE, NULL);
4522+ action = gtk_action_group_get_action (action_group, "ViewZoomIn");
4523+ /* Translators: This refers to text size */
4524+ g_object_set (action, "short-label", _("Larger"), NULL);
4525+ action = gtk_action_group_get_action (action_group, "ViewZoomOut");
4526+ /* Translators: This refers to text size */
4527+ g_object_set (action, "short-label", _("Smaller"), NULL);
4528+
4529+ action_group = gtk_action_group_new ("PopupsActions");
4530+ gtk_action_group_set_translation_domain (action_group, NULL);
4531+ gtk_action_group_add_actions (action_group, ephy_popups_entries,
4532+ G_N_ELEMENTS (ephy_popups_entries), window);
4533+ gtk_action_group_set_accel_group (action_group, accel_group);
4534+ gtk_ui_manager_insert_action_group (manager, action_group, 0);
4535+ window->priv->popups_action_group = action_group;
4536+ g_object_unref (action_group);
4537+
4538+ /* Tab accels */
4539+ action_group = gtk_action_group_new ("TabAccelsActions");
4540+ gtk_action_group_set_accel_group (action_group, accel_group);
4541+ gtk_ui_manager_insert_action_group (manager, action_group, 0);
4542+ window->priv->tab_accels_action_group = action_group;
4543+ g_object_unref (action_group);
4544+
4545+ action_group = gtk_action_group_new ("SpecialToolbarActions");
4546+ action =
4547+ g_object_new (EPHY_TYPE_NAVIGATION_HISTORY_ACTION,
4548+ "name", "NavigationBack",
4549+ "label", _("Back"),
4550+ "icon-name", "go-previous-symbolic",
4551+ "window", window,
4552+ "direction", EPHY_NAVIGATION_HISTORY_DIRECTION_BACK,
4553+ NULL);
4554+ gtk_action_group_add_action_with_accel (action_group, action,
4555+ "<alt>Left");
4556+ g_object_unref (action);
4557+
4558+ action =
4559+ g_object_new (EPHY_TYPE_NAVIGATION_HISTORY_ACTION,
4560+ "name", "NavigationForward",
4561+ "label", _("Forward"),
4562+ "icon-name", "go-next-symbolic",
4563+ "window", window,
4564+ "direction", EPHY_NAVIGATION_HISTORY_DIRECTION_FORWARD,
4565+ NULL);
4566+ gtk_action_group_add_action_with_accel (action_group, action,
4567+ "<alt>Right");
4568+ g_object_unref (action);
4569+
4570+ action =
4571+ g_object_new (EPHY_TYPE_ZOOM_ACTION,
4572+ "name", "Zoom",
4573+ "label", _("Zoom"),
4574+ "zoom", 1.0,
4575+ NULL);
4576+ gtk_action_group_add_action (action_group, action);
4577+ g_object_unref (action);
4578+
4579+ action = g_object_new (EPHY_TYPE_HOME_ACTION,
4580+ "name", "FileNewTab",
4581+ "icon-name", "tab-new-symbolic",
4582+ "label", _("New _Tab"),
4583+ NULL);
4584+ gtk_action_group_add_action_with_accel (action_group, action, "<control>T");
4585+ g_object_unref (action);
4586+
4587+ action =
4588+ g_object_new (EPHY_TYPE_HOME_ACTION,
4589+ "name", "FileHome",
4590+ "label", _("Go to most visited"),
4591+ NULL);
4592+ gtk_action_group_add_action_with_accel (action_group, action, "<alt>Home");
4593+ g_signal_connect_swapped (action, "open-link",
4594+ G_CALLBACK (ephy_link_open), window);
4595+ g_object_unref (action);
4596+
4597+ action = g_object_new (EPHY_TYPE_COMBINED_STOP_RELOAD_ACTION,
4598+ "name", "ViewCombinedStopReload",
4599+ "loading", FALSE,
4600+ "window", window,
4601+ NULL);
4602+ gtk_action_group_add_action (action_group, action);
4603+ g_object_unref (action);
4604+
4605+ gtk_action_group_set_accel_group (action_group, accel_group);
4606+ gtk_ui_manager_insert_action_group (manager, action_group, 0);
4607+ window->priv->toolbar_action_group = action_group;
4608+ g_object_unref (action_group);
4609+
4610+ window->priv->manager = manager;
4611+ gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
4612+}
4613+
4614+static char *
4615+calculate_location (const char *typed_address, const char *address)
4616+{
4617+ const char *location;
4618+
4619+ /* If there's a typed address, use that over address. Never
4620+ * show URIs in the 'do_not_show_address' array. */
4621+ location = typed_address ? typed_address : address;
4622+ location = ephy_embed_utils_is_no_show_address (location) ? NULL : location;
4623+
4624+ return g_strdup (location);
4625+}
4626+
4627+static void
4628+_ephy_window_set_default_actions_sensitive (EphyWindow *window,
4629+ guint flags,
4630+ gboolean set)
4631+{
4632+ EphyWindowPrivate *priv = window->priv;
4633+ GtkActionGroup *action_group;
4634+ GtkAction *action;
4635+ int i;
4636+ const char *action_group_actions[] = { "FileSaveAs", "FileSaveAsApplication", "FilePrint",
4637+ "FileSendTo", "FileBookmarkPage", "EditFind",
4638+ "EditFindPrev", "EditFindNext", "ViewEncoding",
4639+ "ViewZoomIn", "ViewZoomOut", "ViewPageSource",
4640+ NULL };
4641+
4642+ action_group = priv->action_group;
4643+
4644+ /* Page menu */
4645+ for (i = 0; action_group_actions[i] != NULL; i++)
4646+ {
4647+ action = gtk_action_group_get_action (action_group,
4648+ action_group_actions[i]);
4649+ ephy_action_change_sensitivity_flags (action,
4650+ flags, set);
4651+ }
4652+
4653+ /* Page context popup */
4654+ action = gtk_action_group_get_action (priv->popups_action_group,
4655+ "ContextBookmarkPage");
4656+ ephy_action_change_sensitivity_flags (action,
4657+ flags, set);
4658+
4659+ /* Toolbar */
4660+ action = gtk_action_group_get_action (priv->toolbar_action_group,
4661+ "ViewCombinedStopReload");
4662+ ephy_action_change_sensitivity_flags (action,
4663+ flags, set);
4664+}
4665+
4666+static void
4667+sync_tab_address (EphyWebView *view,
4668+ GParamSpec *pspec,
4669+ EphyWindow *window)
4670+{
4671+ EphyWindowPrivate *priv = window->priv;
4672+ const char *address;
4673+ const char *typed_address;
4674+ char *location;
4675+
4676+ if (priv->closing) return;
4677+
4678+ address = ephy_web_view_get_address (view);
4679+ typed_address = ephy_web_view_get_typed_address (view);
4680+
4681+ _ephy_window_set_default_actions_sensitive (window,
4682+ SENS_FLAG_IS_BLANK,
4683+ ephy_web_view_is_overview (view));
4684+
4685+ location = calculate_location (typed_address, address);
4686+ ephy_window_set_location (window, location);
4687+ g_free (location);
4688+}
4689+
4690+static void
4691+sync_tab_zoom (WebKitWebView *web_view, GParamSpec *pspec, EphyWindow *window)
4692+{
4693+ GtkActionGroup *action_group;
4694+ GtkAction *action;
4695+ gboolean can_zoom_in = TRUE, can_zoom_out = TRUE, can_zoom_normal = FALSE;
4696+ double zoom;
4697+
4698+ if (window->priv->closing) return;
4699+
4700+ zoom = webkit_web_view_get_zoom_level (web_view);
4701+
4702+ if (zoom >= ZOOM_MAXIMAL)
4703+ {
4704+ can_zoom_in = FALSE;
4705+ }
4706+
4707+ if (zoom <= ZOOM_MINIMAL)
4708+ {
4709+ can_zoom_out = FALSE;
4710+ }
4711+
4712+ if (zoom != 1.0)
4713+ {
4714+ can_zoom_normal = TRUE;
4715+ }
4716+
4717+ action_group = window->priv->action_group;
4718+ action = gtk_action_group_get_action (action_group, "ViewZoomIn");
4719+ gtk_action_set_sensitive (action, can_zoom_in);
4720+ action = gtk_action_group_get_action (action_group, "ViewZoomOut");
4721+ gtk_action_set_sensitive (action, can_zoom_out);
4722+ action = gtk_action_group_get_action (action_group, "ViewZoomNormal");
4723+ gtk_action_set_sensitive (action, can_zoom_normal);
4724+}
4725+
4726+static void
4727+sync_tab_document_type (EphyWebView *view,
4728+ GParamSpec *pspec,
4729+ EphyWindow *window)
4730+{
4731+ EphyWindowPrivate *priv = window->priv;
4732+ GtkActionGroup *action_group = priv->action_group;
4733+ GtkAction *action;
4734+ EphyWebViewDocumentType type;
4735+ gboolean can_find, disable, is_image;
4736+
4737+ if (priv->closing) return;
4738+
4739+ /* update zoom actions */
4740+ sync_tab_zoom (WEBKIT_WEB_VIEW (view), NULL, window);
4741+
4742+ type = ephy_web_view_get_document_type (view);
4743+ can_find = (type != EPHY_WEB_VIEW_DOCUMENT_IMAGE);
4744+ is_image = type == EPHY_WEB_VIEW_DOCUMENT_IMAGE;
4745+ disable = (type != EPHY_WEB_VIEW_DOCUMENT_HTML);
4746+
4747+ action = gtk_action_group_get_action (action_group, "ViewEncoding");
4748+ ephy_action_change_sensitivity_flags (action, SENS_FLAG_DOCUMENT, disable);
4749+ action = gtk_action_group_get_action (action_group, "ViewPageSource");
4750+ ephy_action_change_sensitivity_flags (action, SENS_FLAG_DOCUMENT, is_image);
4751+ action = gtk_action_group_get_action (action_group, "EditFind");
4752+ ephy_action_change_sensitivity_flags (action, SENS_FLAG_DOCUMENT, !can_find);
4753+ action = gtk_action_group_get_action (action_group, "EditFindNext");
4754+ ephy_action_change_sensitivity_flags (action, SENS_FLAG_DOCUMENT, !can_find);
4755+ action = gtk_action_group_get_action (action_group, "EditFindPrev");
4756+ ephy_action_change_sensitivity_flags (action, SENS_FLAG_DOCUMENT, !can_find);
4757+
4758+ if (!can_find)
4759+ {
4760+ ephy_find_toolbar_request_close (ephy_embed_get_find_toolbar (priv->active_embed));
4761+ }
4762+}
4763+
4764+static void
4765+_ephy_window_action_set_favicon (EphyWindow *window,
4766+ GdkPixbuf *icon)
4767+{
4768+ EphyWindowPrivate *priv = window->priv;
4769+
4770+ g_object_set (priv->location_controller, "icon", icon, NULL);
4771+}
4772+
4773+static void
4774+sync_tab_icon (EphyWebView *view,
4775+ GParamSpec *pspec,
4776+ EphyWindow *window)
4777+{
4778+ EphyWindowPrivate *priv = window->priv;
4779+ GdkPixbuf *icon;
4780+
4781+ if (priv->closing) return;
4782+
4783+ icon = ephy_web_view_get_icon (view);
4784+
4785+ _ephy_window_action_set_favicon (window, icon);
4786+}
4787+
4788+static void
4789+_ephy_window_set_navigation_flags (EphyWindow *window,
4790+ EphyWebViewNavigationFlags flags)
4791+{
4792+ GtkAction *action;
4793+
4794+ action = gtk_action_group_get_action (window->priv->toolbar_action_group, "NavigationBack");
4795+ gtk_action_set_sensitive (action, flags & EPHY_WEB_VIEW_NAV_BACK);
4796+ action = gtk_action_group_get_action (window->priv->toolbar_action_group, "NavigationForward");
4797+ gtk_action_set_sensitive (action, flags & EPHY_WEB_VIEW_NAV_FORWARD);
4798+}
4799+
4800+static void
4801+sync_tab_navigation (EphyWebView *view,
4802+ GParamSpec *pspec,
4803+ EphyWindow *window)
4804+{
4805+ if (window->priv->closing) return;
4806+
4807+ _ephy_window_set_navigation_flags (window,
4808+ ephy_web_view_get_navigation_flags (view));
4809+}
4810+
4811+static void
4812+sync_tab_is_blank (EphyWebView *view,
4813+ GParamSpec *pspec,
4814+ EphyWindow *window)
4815+{
4816+ if (window->priv->closing) return;
4817+
4818+ _ephy_window_set_default_actions_sensitive (window,
4819+ SENS_FLAG_IS_BLANK,
4820+ ephy_web_view_get_is_blank (view));
4821+}
4822+
4823+static void
4824+sync_tab_popup_windows (EphyWebView *view,
4825+ GParamSpec *pspec,
4826+ EphyWindow *window)
4827+{
4828+ /* FIXME: show popup count somehow */
4829+}
4830+
4831+static void
4832+sync_tab_popups_allowed (EphyWebView *view,
4833+ GParamSpec *pspec,
4834+ EphyWindow *window)
4835+{
4836+ GtkAction *action;
4837+ gboolean allow;
4838+
4839+ g_return_if_fail (EPHY_IS_WEB_VIEW (view));
4840+ g_return_if_fail (EPHY_IS_WINDOW (window));
4841+
4842+ action = gtk_action_group_get_action (window->priv->action_group,
4843+ "ViewPopupWindows");
4844+ g_return_if_fail (GTK_IS_ACTION (action));
4845+
4846+ g_object_get (view, "popups-allowed", &allow, NULL);
4847+
4848+ g_signal_handlers_block_by_func
4849+ (G_OBJECT (action),
4850+ G_CALLBACK (ephy_window_view_popup_windows_cb),
4851+ window);
4852+
4853+ gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), allow);
4854+
4855+ g_signal_handlers_unblock_by_func
4856+ (G_OBJECT (action),
4857+ G_CALLBACK (ephy_window_view_popup_windows_cb),
4858+ window);
4859+}
4860+
4861+static void
4862+sync_tab_title (EphyEmbed *embed,
4863+ GParamSpec *pspec,
4864+ EphyWindow *window)
4865+{
4866+ EphyWindowPrivate *priv = window->priv;
4867+
4868+ if (priv->closing) return;
4869+
4870+ gtk_window_set_title (GTK_WINDOW(window),
4871+ ephy_embed_get_title (embed));
4872+}
4873+
4874+static gboolean
4875+idle_unref_context_event (EphyWindow *window)
4876+{
4877+ EphyWindowPrivate *priv = window->priv;
4878+
4879+ LOG ("Idle unreffing context event %p", priv->context_event);
4880+
4881+ if (priv->context_event != NULL)
4882+ {
4883+ g_object_unref (priv->context_event);
4884+ priv->context_event = NULL;
4885+ }
4886+
4887+ priv->idle_worker = 0;
4888+ return FALSE;
4889+}
4890+
4891+static void
4892+_ephy_window_set_context_event (EphyWindow *window,
4893+ EphyEmbedEvent *event)
4894+{
4895+ EphyWindowPrivate *priv = window->priv;
4896+
4897+ if (priv->idle_worker != 0)
4898+ {
4899+ g_source_remove (priv->idle_worker);
4900+ priv->idle_worker = 0;
4901+ }
4902+
4903+ if (priv->context_event != NULL)
4904+ {
4905+ g_object_unref (priv->context_event);
4906+ }
4907+
4908+ priv->context_event = event != NULL ? g_object_ref (event) : NULL;
4909+}
4910+
4911+static void
4912+_ephy_window_unset_context_event (EphyWindow *window)
4913+{
4914+ EphyWindowPrivate *priv = window->priv;
4915+
4916+ /* Unref the event from idle since we still need it
4917+ * from the action callbacks which will run before idle.
4918+ */
4919+ if (priv->idle_worker == 0 && priv->context_event != NULL)
4920+ {
4921+ priv->idle_worker =
4922+ g_idle_add ((GSourceFunc) idle_unref_context_event, window);
4923+ }
4924+}
4925+
4926+static void
4927+context_menu_dismissed_cb (WebKitWebView *webView,
4928+ EphyWindow *window)
4929+{
4930+ LOG ("Deactivating popup menu");
4931+
4932+ enable_edit_actions_sensitivity (window);
4933+
4934+ g_signal_handlers_disconnect_by_func
4935+ (webView, G_CALLBACK (context_menu_dismissed_cb), window);
4936+
4937+ _ephy_window_unset_context_event (window);
4938+}
4939+
4940+static void
4941+add_action_to_context_menu (WebKitContextMenu *context_menu,
4942+ GtkActionGroup *action_group,
4943+ const char *action_name)
4944+{
4945+ GtkAction *action;
4946+
4947+ action = gtk_action_group_get_action (action_group, action_name);
4948+ webkit_context_menu_append (context_menu, webkit_context_menu_item_new (action));
4949+}
4950+
4951+static void
4952+add_item_to_context_menu (WebKitContextMenu *context_menu,
4953+ WebKitContextMenuItem *item)
4954+{
4955+ if (!item)
4956+ return;
4957+
4958+ webkit_context_menu_append (context_menu, item);
4959+ g_object_unref (item);
4960+}
4961+
4962+/* FIXME: Add webkit_context_menu_find() ? */
4963+static WebKitContextMenuItem *
4964+find_item_in_context_menu (WebKitContextMenu *context_menu,
4965+ WebKitContextMenuAction action)
4966+{
4967+ GList *items, *iter;
4968+
4969+ items = webkit_context_menu_get_items (context_menu);
4970+ for (iter = items; iter; iter = g_list_next (iter))
4971+ {
4972+ WebKitContextMenuItem *item = (WebKitContextMenuItem *)iter->data;
4973+
4974+ if (webkit_context_menu_item_get_stock_action (item) == action)
4975+ return g_object_ref (item);
4976+ }
4977+
4978+ return NULL;
4979+}
4980+
4981+static GList *
4982+find_spelling_guess_context_menu_items (WebKitContextMenu *context_menu)
4983+{
4984+ GList *items, *iter;
4985+ guint i;
4986+ GList *retval = NULL;
4987+
4988+ items = webkit_context_menu_get_items (context_menu);
4989+ for (iter = items, i = 0; iter && i < MAX_SPELL_CHECK_GUESSES; iter = g_list_next (iter), i++)
4990+ {
4991+ WebKitContextMenuItem *item = (WebKitContextMenuItem *)iter->data;
4992+
4993+ if (webkit_context_menu_item_get_stock_action (item) == WEBKIT_CONTEXT_MENU_ACTION_SPELLING_GUESS)
4994+ {
4995+ retval = g_list_prepend (retval, g_object_ref (item));
4996+ }
4997+ else
4998+ {
4999+ /* Spelling guesses are always at the beginning of the context menu, so
5000+ * we can break the loop as soon as we find the first item that is not
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: