Status: | Merged |
---|---|
Approved by: | Paweł Forysiuk |
Approved revision: | 6229 |
Merged at revision: | 6228 |
Proposed branch: | lp:~kalikiana/midori/gtk2.24 |
Merge into: | lp:midori |
Diff against target: |
912 lines (+34/-390) 15 files modified
README (+1/-1) extensions/adblock.c (+0/-9) katze/gtk3-compat.h (+0/-34) katze/katze-throbber.c (+0/-121) midori/gtkiconentry.h (+0/-41) midori/main.c (+0/-26) midori/midori-browser.c (+0/-55) midori/midori-locationaction.c (+13/-17) midori/midori-platform.h (+0/-1) midori/midori-searchaction.c (+8/-12) midori/midori-speeddial.vala (+0/-17) midori/midori-view.c (+0/-43) midori/sokoke.c (+5/-6) toolbars/midori-findbar.c (+6/-6) wscript (+1/-1) |
To merge this branch: | bzr merge lp:~kalikiana/midori/gtk2.24 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
gue5t gue5t | Approve | ||
Review via email: mp+170710@code.launchpad.net |
Commit message
Bump GTK+ requirement to 2.24 and drop support for earlier versions
Description of the change
Bump GTK+ requirement to 2.24 and drop support for earlier versions
To post a comment you must log in.
lp:~kalikiana/midori/gtk2.24
updated
- 6228. By Cris Dywan
-
Drop Gtk.AboutDialog
::activate- link signal callback The default works well enough.
- 6229. By Cris Dywan
-
Remove Gtk.IconEntry compatibility aliases
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'README' | |||
2 | --- README 2013-06-17 17:53:51 +0000 | |||
3 | +++ README 2013-06-21 20:53:25 +0000 | |||
4 | @@ -11,7 +11,7 @@ | |||
5 | 11 | * Straightforward bookmark management. | 11 | * Straightforward bookmark management. |
6 | 12 | * Customizable interface, extensions written in C and Vala. | 12 | * Customizable interface, extensions written in C and Vala. |
7 | 13 | 13 | ||
9 | 14 | Requirements: GLib 2.22, GTK+ 2.16, WebkitGTK+ 1.8.3, libXML2, | 14 | Requirements: GLib 2.22, GTK+ 2.24, WebkitGTK+ 1.8.3, libXML2, |
10 | 15 | libsoup 2.27.90, sqlite 3.0, Vala 0.14, libnotify | 15 | libsoup 2.27.90, sqlite 3.0, Vala 0.14, libnotify |
11 | 16 | 16 | ||
12 | 17 | Optional: GTK+ 3.0, Unique 0.9, gcr, Granite 0.2, WebKit2GTK+ 1.11.91/ 2.0.0 | 17 | Optional: GTK+ 3.0, Unique 0.9, gcr, Granite 0.2, WebKit2GTK+ 1.11.91/ 2.0.0 |
13 | 18 | 18 | ||
14 | === modified file 'extensions/adblock.c' | |||
15 | --- extensions/adblock.c 2013-06-20 20:53:02 +0000 | |||
16 | +++ extensions/adblock.c 2013-06-21 20:53:25 +0000 | |||
17 | @@ -439,7 +439,6 @@ | |||
18 | 439 | gtk_list_store_remove (GTK_LIST_STORE (model), &iter); | 439 | gtk_list_store_remove (GTK_LIST_STORE (model), &iter); |
19 | 440 | } | 440 | } |
20 | 441 | 441 | ||
21 | 442 | #if GTK_CHECK_VERSION (2, 18, 0) | ||
22 | 443 | static gboolean | 442 | static gboolean |
23 | 444 | adblock_activate_link_cb (GtkWidget* label, | 443 | adblock_activate_link_cb (GtkWidget* label, |
24 | 445 | const gchar* uri) | 444 | const gchar* uri) |
25 | @@ -449,7 +448,6 @@ | |||
26 | 449 | midori_browser_set_current_tab (browser, view); | 448 | midori_browser_set_current_tab (browser, view); |
27 | 450 | return TRUE; | 449 | return TRUE; |
28 | 451 | } | 450 | } |
29 | 452 | #endif | ||
30 | 453 | 451 | ||
31 | 454 | static GtkWidget* | 452 | static GtkWidget* |
32 | 455 | adblock_get_preferences_dialog (MidoriExtension* extension) | 453 | adblock_get_preferences_dialog (MidoriExtension* extension) |
33 | @@ -512,17 +510,10 @@ | |||
34 | 512 | "Type the address of a preconfigured filter list in the text entry " | 510 | "Type the address of a preconfigured filter list in the text entry " |
35 | 513 | "and click \"Add\" to add it to the list. " | 511 | "and click \"Add\" to add it to the list. " |
36 | 514 | "You can find more lists at %s."), | 512 | "You can find more lists at %s."), |
37 | 515 | #if GTK_CHECK_VERSION (2, 18, 0) | ||
38 | 516 | "<a href=\"http://adblockplus.org/en/subscriptions\">adblockplus.org/en/subscriptions</a> " | 513 | "<a href=\"http://adblockplus.org/en/subscriptions\">adblockplus.org/en/subscriptions</a> " |
39 | 517 | "<a href=\"http://easylist.adblockplus.org/\">easylist.adblockplus.org</a>"); | 514 | "<a href=\"http://easylist.adblockplus.org/\">easylist.adblockplus.org</a>"); |
40 | 518 | #else | ||
41 | 519 | "<u>http://adblockplus.org/en/subscriptions</u> " | ||
42 | 520 | "<u>http://easylist.adblockplus.org/</u>"); | ||
43 | 521 | #endif | ||
44 | 522 | #if GTK_CHECK_VERSION (2, 18, 0) | ||
45 | 523 | g_signal_connect (button, "activate-link", | 515 | g_signal_connect (button, "activate-link", |
46 | 524 | G_CALLBACK (adblock_activate_link_cb), NULL); | 516 | G_CALLBACK (adblock_activate_link_cb), NULL); |
47 | 525 | #endif | ||
48 | 526 | gtk_label_set_markup (GTK_LABEL (button), description); | 517 | gtk_label_set_markup (GTK_LABEL (button), description); |
49 | 527 | g_free (description); | 518 | g_free (description); |
50 | 528 | gtk_label_set_line_wrap (GTK_LABEL (button), TRUE); | 519 | gtk_label_set_line_wrap (GTK_LABEL (button), TRUE); |
51 | 529 | 520 | ||
52 | === modified file 'katze/gtk3-compat.h' | |||
53 | --- katze/gtk3-compat.h 2012-12-13 22:58:07 +0000 | |||
54 | +++ katze/gtk3-compat.h 2013-06-21 20:53:25 +0000 | |||
55 | @@ -50,31 +50,6 @@ | |||
56 | 50 | #define g_format_size(sz) g_format_size_for_display ((goffset)sz) | 50 | #define g_format_size(sz) g_format_size_for_display ((goffset)sz) |
57 | 51 | #endif | 51 | #endif |
58 | 52 | 52 | ||
59 | 53 | #if !GTK_CHECK_VERSION (2, 18, 0) | ||
60 | 54 | #define gtk_widget_is_toplevel(widget) GTK_WIDGET_TOPLEVEL (widget) | ||
61 | 55 | #define gtk_widget_has_focus(widget) GTK_WIDGET_HAS_FOCUS (widget) | ||
62 | 56 | #define gtk_widget_get_visible(widget) GTK_WIDGET_VISIBLE (widget) | ||
63 | 57 | #define gtk_widget_get_sensitive(widget) GTK_WIDGET_IS_SENSITIVE (widget) | ||
64 | 58 | #define gtk_widget_set_can_focus(widget,flag) \ | ||
65 | 59 | GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_FOCUS) | ||
66 | 60 | #define gtk_widget_get_allocation(wdgt, alloc) *alloc = wdgt->allocation | ||
67 | 61 | #define gtk_widget_get_has_window(wdgt) !GTK_WIDGET_NO_WINDOW (wdgt) | ||
68 | 62 | #define gtk_widget_get_allocation(wdgt, alloc) *alloc = wdgt->allocation | ||
69 | 63 | #define gtk_widget_set_window(wdgt, wndw) wdgt->window = wndw | ||
70 | 64 | #define gtk_widget_is_drawable GTK_WIDGET_DRAWABLE | ||
71 | 65 | #define gtk_widget_get_drawable GTK_WIDGET_VISIBLE | ||
72 | 66 | #define gtk_widget_set_has_window(wdgt, wnd) \ | ||
73 | 67 | if (wnd) GTK_WIDGET_UNSET_FLAGS (wdgt, GTK_NO_WINDOW); \ | ||
74 | 68 | else GTK_WIDGET_SET_FLAGS (wdgt, GTK_NO_WINDOW) | ||
75 | 69 | #endif | ||
76 | 70 | |||
77 | 71 | #if !GTK_CHECK_VERSION (2, 20, 0) | ||
78 | 72 | #define gtk_widget_get_realized(widget) GTK_WIDGET_REALIZED (widget) | ||
79 | 73 | #define gtk_widget_set_realized(wdgt, real) \ | ||
80 | 74 | if (real) GTK_WIDGET_SET_FLAGS (wdgt, GTK_REALIZED); \ | ||
81 | 75 | else GTK_WIDGET_UNSET_FLAGS (wdgt, GTK_REALIZED) | ||
82 | 76 | #endif | ||
83 | 77 | |||
84 | 78 | #if GTK_CHECK_VERSION (3, 0, 0) | 53 | #if GTK_CHECK_VERSION (3, 0, 0) |
85 | 79 | #define GTK_DIALOG_NO_SEPARATOR 0 | 54 | #define GTK_DIALOG_NO_SEPARATOR 0 |
86 | 80 | #endif | 55 | #endif |
87 | @@ -84,15 +59,6 @@ | |||
88 | 84 | const gchar* gtk_entry_get_placeholder_text (GtkEntry* entry); | 59 | const gchar* gtk_entry_get_placeholder_text (GtkEntry* entry); |
89 | 85 | #endif | 60 | #endif |
90 | 86 | 61 | ||
91 | 87 | #if !GTK_CHECK_VERSION (2, 24 ,0) | ||
92 | 88 | #define gtk_combo_box_text_append_text gtk_combo_box_append_text | ||
93 | 89 | #define gtk_combo_box_text_new gtk_combo_box_new_text | ||
94 | 90 | #define gtk_combo_box_text_new_with_entry gtk_combo_box_entry_new_text | ||
95 | 91 | #define gtk_combo_box_text_get_active_text gtk_combo_box_get_active_text | ||
96 | 92 | #define GTK_COMBO_BOX_TEXT GTK_COMBO_BOX | ||
97 | 93 | #define GtkComboBoxText GtkComboBox | ||
98 | 94 | #endif | ||
99 | 95 | |||
100 | 96 | #ifndef GDK_KEY_Return | 62 | #ifndef GDK_KEY_Return |
101 | 97 | #define GDK_KEY_0 GDK_0 | 63 | #define GDK_KEY_0 GDK_0 |
102 | 98 | #define GDK_KEY_BackSpace GDK_BackSpace | 64 | #define GDK_KEY_BackSpace GDK_BackSpace |
103 | 99 | 65 | ||
104 | === modified file 'katze/katze-throbber.c' | |||
105 | --- katze/katze-throbber.c 2013-04-01 14:21:39 +0000 | |||
106 | +++ katze/katze-throbber.c 2013-06-21 20:53:25 +0000 | |||
107 | @@ -16,16 +16,9 @@ | |||
108 | 16 | #include <glib/gi18n.h> | 16 | #include <glib/gi18n.h> |
109 | 17 | #include <math.h> | 17 | #include <math.h> |
110 | 18 | 18 | ||
111 | 19 | #define HAVE_SPINNER GTK_CHECK_VERSION (2, 20, 0) | ||
112 | 20 | |||
113 | 21 | struct _KatzeThrobber | 19 | struct _KatzeThrobber |
114 | 22 | { | 20 | { |
115 | 23 | #if HAVE_SPINNER | ||
116 | 24 | GtkSpinner parent_instance; | 21 | GtkSpinner parent_instance; |
117 | 25 | #else | ||
118 | 26 | GtkMisc parent_instance; | ||
119 | 27 | #endif | ||
120 | 28 | |||
121 | 29 | GtkIconSize icon_size; | 22 | GtkIconSize icon_size; |
122 | 30 | gchar* icon_name; | 23 | gchar* icon_name; |
123 | 31 | GdkPixbuf* pixbuf; | 24 | GdkPixbuf* pixbuf; |
124 | @@ -43,18 +36,10 @@ | |||
125 | 43 | 36 | ||
126 | 44 | struct _KatzeThrobberClass | 37 | struct _KatzeThrobberClass |
127 | 45 | { | 38 | { |
128 | 46 | #if HAVE_SPINNER | ||
129 | 47 | GtkSpinnerClass parent_class; | 39 | GtkSpinnerClass parent_class; |
130 | 48 | #else | ||
131 | 49 | GtkMiscClass parent_class; | ||
132 | 50 | #endif | ||
133 | 51 | }; | 40 | }; |
134 | 52 | 41 | ||
135 | 53 | #if HAVE_SPINNER | ||
136 | 54 | G_DEFINE_TYPE (KatzeThrobber, katze_throbber, GTK_TYPE_SPINNER); | 42 | G_DEFINE_TYPE (KatzeThrobber, katze_throbber, GTK_TYPE_SPINNER); |
137 | 55 | #else | ||
138 | 56 | G_DEFINE_TYPE (KatzeThrobber, katze_throbber, GTK_TYPE_MISC); | ||
139 | 57 | #endif | ||
140 | 58 | 43 | ||
141 | 59 | enum | 44 | enum |
142 | 60 | { | 45 | { |
143 | @@ -136,14 +121,6 @@ | |||
144 | 136 | static void | 121 | static void |
145 | 137 | icon_theme_changed (KatzeThrobber* throbber); | 122 | icon_theme_changed (KatzeThrobber* throbber); |
146 | 138 | 123 | ||
147 | 139 | #if !HAVE_SPINNER | ||
148 | 140 | static gboolean | ||
149 | 141 | katze_throbber_timeout (KatzeThrobber* throbber); | ||
150 | 142 | |||
151 | 143 | static void | ||
152 | 144 | katze_throbber_timeout_destroy (KatzeThrobber* throbber); | ||
153 | 145 | #endif | ||
154 | 146 | |||
155 | 147 | static void | 124 | static void |
156 | 148 | katze_throbber_class_init (KatzeThrobberClass* class) | 125 | katze_throbber_class_init (KatzeThrobberClass* class) |
157 | 149 | { | 126 | { |
158 | @@ -251,9 +228,6 @@ | |||
159 | 251 | katze_throbber_init (KatzeThrobber *throbber) | 228 | katze_throbber_init (KatzeThrobber *throbber) |
160 | 252 | { | 229 | { |
161 | 253 | gtk_widget_set_has_window (GTK_WIDGET (throbber), FALSE); | 230 | gtk_widget_set_has_window (GTK_WIDGET (throbber), FALSE); |
162 | 254 | #if !HAVE_SPINNER | ||
163 | 255 | gtk_misc_set_alignment (GTK_MISC (throbber), 0.0, 0.5); | ||
164 | 256 | #endif | ||
165 | 257 | 231 | ||
166 | 258 | throbber->timer_id = -1; | 232 | throbber->timer_id = -1; |
167 | 259 | } | 233 | } |
168 | @@ -486,14 +460,7 @@ | |||
169 | 486 | 460 | ||
170 | 487 | throbber->animated = animated; | 461 | throbber->animated = animated; |
171 | 488 | 462 | ||
172 | 489 | #if HAVE_SPINNER | ||
173 | 490 | g_object_set (throbber, "active", animated, NULL); | 463 | g_object_set (throbber, "active", animated, NULL); |
174 | 491 | #else | ||
175 | 492 | if (animated && (throbber->timer_id < 0)) | ||
176 | 493 | throbber->timer_id = midori_timeout_add (50, | ||
177 | 494 | (GSourceFunc)katze_throbber_timeout, throbber, | ||
178 | 495 | (GDestroyNotify)katze_throbber_timeout_destroy); | ||
179 | 496 | #endif | ||
180 | 497 | gtk_widget_queue_draw (GTK_WIDGET (throbber)); | 464 | gtk_widget_queue_draw (GTK_WIDGET (throbber)); |
181 | 498 | 465 | ||
182 | 499 | g_object_notify (G_OBJECT (throbber), "animated"); | 466 | g_object_notify (G_OBJECT (throbber), "animated"); |
183 | @@ -797,24 +764,6 @@ | |||
184 | 797 | GTK_WIDGET_CLASS (katze_throbber_parent_class)->unmap (widget); | 764 | GTK_WIDGET_CLASS (katze_throbber_parent_class)->unmap (widget); |
185 | 798 | } | 765 | } |
186 | 799 | 766 | ||
187 | 800 | #if !HAVE_SPINNER | ||
188 | 801 | static gboolean | ||
189 | 802 | katze_throbber_timeout (KatzeThrobber* throbber) | ||
190 | 803 | { | ||
191 | 804 | throbber->index++; | ||
192 | 805 | gtk_widget_queue_draw (GTK_WIDGET (throbber)); | ||
193 | 806 | |||
194 | 807 | return throbber->animated; | ||
195 | 808 | } | ||
196 | 809 | |||
197 | 810 | static void | ||
198 | 811 | katze_throbber_timeout_destroy (KatzeThrobber* throbber) | ||
199 | 812 | { | ||
200 | 813 | throbber->index = 0; | ||
201 | 814 | throbber->timer_id = -1; | ||
202 | 815 | } | ||
203 | 816 | #endif | ||
204 | 817 | |||
205 | 818 | static void | 767 | static void |
206 | 819 | katze_throbber_style_set (GtkWidget* widget, | 768 | katze_throbber_style_set (GtkWidget* widget, |
207 | 820 | GtkStyle* prev_style) | 769 | GtkStyle* prev_style) |
208 | @@ -888,16 +837,9 @@ | |||
209 | 888 | GtkAllocation allocation; | 837 | GtkAllocation allocation; |
210 | 889 | GtkRequisition requisition; | 838 | GtkRequisition requisition; |
211 | 890 | 839 | ||
212 | 891 | #if HAVE_SPINNER | ||
213 | 892 | xalign = 0.0; | 840 | xalign = 0.0; |
214 | 893 | yalign = 0.5; | 841 | yalign = 0.5; |
215 | 894 | xpad = ypad = 0.0; | 842 | xpad = ypad = 0.0; |
216 | 895 | #else | ||
217 | 896 | gtk_misc_get_alignment (GTK_MISC (widget), &xalign, &yalign); | ||
218 | 897 | if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) | ||
219 | 898 | xalign = 1.0f - xalign; | ||
220 | 899 | gtk_misc_get_padding (GTK_MISC (widget), &xpad, &ypad); | ||
221 | 900 | #endif | ||
222 | 901 | 843 | ||
223 | 902 | #if GTK_CHECK_VERSION (3, 0, 0) | 844 | #if GTK_CHECK_VERSION (3, 0, 0) |
224 | 903 | allocation.x = allocation.y = 0; | 845 | allocation.x = allocation.y = 0; |
225 | @@ -978,75 +920,12 @@ | |||
226 | 978 | } | 920 | } |
227 | 979 | else | 921 | else |
228 | 980 | { | 922 | { |
229 | 981 | #if HAVE_SPINNER | ||
230 | 982 | if (throbber->animated) | 923 | if (throbber->animated) |
231 | 983 | #if GTK_CHECK_VERSION (3, 0, 0) | 924 | #if GTK_CHECK_VERSION (3, 0, 0) |
232 | 984 | return GTK_WIDGET_CLASS (katze_throbber_parent_class)->draw (widget, cr); | 925 | return GTK_WIDGET_CLASS (katze_throbber_parent_class)->draw (widget, cr); |
233 | 985 | #else | 926 | #else |
234 | 986 | return GTK_WIDGET_CLASS (katze_throbber_parent_class)->expose_event (widget, event); | 927 | return GTK_WIDGET_CLASS (katze_throbber_parent_class)->expose_event (widget, event); |
235 | 987 | #endif | 928 | #endif |
236 | 988 | #else | ||
237 | 989 | gint cols, rows; | ||
238 | 990 | |||
239 | 991 | if (G_UNLIKELY (throbber->icon_name && !throbber->pixbuf)) | ||
240 | 992 | { | ||
241 | 993 | icon_theme_changed (KATZE_THROBBER (widget)); | ||
242 | 994 | |||
243 | 995 | if (!throbber->pixbuf) | ||
244 | 996 | { | ||
245 | 997 | /* Fallback to a stock icon */ | ||
246 | 998 | katze_assign (throbber->icon_name, g_strdup (GTK_STOCK_EXECUTE)); | ||
247 | 999 | g_object_notify (G_OBJECT (throbber), "icon-name"); | ||
248 | 1000 | return TRUE; | ||
249 | 1001 | } | ||
250 | 1002 | } | ||
251 | 1003 | |||
252 | 1004 | cols = gdk_pixbuf_get_width (throbber->pixbuf) / throbber->width; | ||
253 | 1005 | rows = gdk_pixbuf_get_height (throbber->pixbuf) / throbber->height; | ||
254 | 1006 | |||
255 | 1007 | if (G_UNLIKELY (cols == 1 && cols == rows)) | ||
256 | 1008 | { | ||
257 | 1009 | katze_throbber_aligned_coords (widget, &ax, &ay); | ||
258 | 1010 | |||
259 | 1011 | if (throbber->animated) | ||
260 | 1012 | gdk_draw_pixbuf (event->window, NULL, throbber->pixbuf, | ||
261 | 1013 | 0, 0, ax, ay, | ||
262 | 1014 | throbber->width, throbber->height, | ||
263 | 1015 | GDK_RGB_DITHER_NONE, 0, 0); | ||
264 | 1016 | return TRUE; | ||
265 | 1017 | } | ||
266 | 1018 | |||
267 | 1019 | if (G_LIKELY (cols > 0 && rows > 0)) | ||
268 | 1020 | { | ||
269 | 1021 | gint idx; | ||
270 | 1022 | guint x, y; | ||
271 | 1023 | |||
272 | 1024 | katze_throbber_aligned_coords (widget, &ax, &ay); | ||
273 | 1025 | |||
274 | 1026 | idx = throbber->index % (cols * rows); | ||
275 | 1027 | if (G_LIKELY (throbber->timer_id >= 0)) | ||
276 | 1028 | idx = MAX (idx, 1); | ||
277 | 1029 | |||
278 | 1030 | x = (idx % cols) * throbber->width; | ||
279 | 1031 | y = (idx / cols) * throbber->height; | ||
280 | 1032 | |||
281 | 1033 | gdk_draw_pixbuf (event->window, NULL, throbber->pixbuf, | ||
282 | 1034 | x, y, ax, ay, | ||
283 | 1035 | throbber->width, throbber->height, | ||
284 | 1036 | GDK_RGB_DITHER_NONE, 0, 0); | ||
285 | 1037 | } | ||
286 | 1038 | else | ||
287 | 1039 | { | ||
288 | 1040 | g_warning (_("Animation frames are broken")); | ||
289 | 1041 | katze_assign (throbber->icon_name, NULL); | ||
290 | 1042 | katze_object_assign (throbber->pixbuf, NULL); | ||
291 | 1043 | |||
292 | 1044 | g_object_freeze_notify (G_OBJECT (throbber)); | ||
293 | 1045 | g_object_notify (G_OBJECT (throbber), "icon-name"); | ||
294 | 1046 | g_object_notify (G_OBJECT (throbber), "pixbuf"); | ||
295 | 1047 | g_object_thaw_notify (G_OBJECT (throbber)); | ||
296 | 1048 | } | ||
297 | 1049 | #endif | ||
298 | 1050 | } | 929 | } |
299 | 1051 | 930 | ||
300 | 1052 | return TRUE; | 931 | return TRUE; |
301 | 1053 | 932 | ||
302 | === removed file 'midori/gtkiconentry.h' | |||
303 | --- midori/gtkiconentry.h 2012-11-18 15:48:46 +0000 | |||
304 | +++ midori/gtkiconentry.h 1970-01-01 00:00:00 +0000 | |||
305 | @@ -1,41 +0,0 @@ | |||
306 | 1 | /* | ||
307 | 2 | * Copyright (C) 2004-2006 Christian Hammond. | ||
308 | 3 | * Copyright (C) 2008 Cody Russell <bratsche@gnome.org> | ||
309 | 4 | * | ||
310 | 5 | * This library is free software; you can redistribute it and/or | ||
311 | 6 | * modify it under the terms of the GNU Lesser General Public | ||
312 | 7 | * License as published by the Free Software Foundation; either | ||
313 | 8 | * version 2 of the License, or (at your option) any later version. | ||
314 | 9 | * | ||
315 | 10 | * This library is distributed in the hope that it will be useful, | ||
316 | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
317 | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
318 | 13 | * Lesser General Public License for more details. | ||
319 | 14 | * | ||
320 | 15 | * You should have received a copy of the GNU Lesser General Public | ||
321 | 16 | * License along with this library; if not, write to the | ||
322 | 17 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
323 | 18 | * Boston, MA 02111-1307, USA. | ||
324 | 19 | */ | ||
325 | 20 | |||
326 | 21 | #ifndef __GTK_ICON_ENTRY_H__ | ||
327 | 22 | #define __GTK_ICON_ENTRY_H__ | ||
328 | 23 | |||
329 | 24 | #include <gio/gio.h> | ||
330 | 25 | #include <gtk/gtk.h> | ||
331 | 26 | |||
332 | 27 | G_BEGIN_DECLS | ||
333 | 28 | |||
334 | 29 | #define GtkIconEntryPosition GtkEntryIconPosition | ||
335 | 30 | #define GTK_ICON_ENTRY_PRIMARY GTK_ENTRY_ICON_PRIMARY | ||
336 | 31 | #define GTK_ICON_ENTRY_SECONDARY GTK_ENTRY_ICON_SECONDARY | ||
337 | 32 | #define GTK_ICON_ENTRY GTK_ENTRY | ||
338 | 33 | #define gtk_icon_entry_set_icon_from_stock gtk_entry_set_icon_from_stock | ||
339 | 34 | #define gtk_icon_entry_set_icon_from_icon_name gtk_entry_set_icon_from_icon_name | ||
340 | 35 | |||
341 | 36 | #define gtk_icon_entry_set_tooltip gtk_entry_set_icon_tooltip_text | ||
342 | 37 | #define gtk_icon_entry_set_icon_highlight gtk_entry_set_icon_activatable | ||
343 | 38 | |||
344 | 39 | G_END_DECLS | ||
345 | 40 | |||
346 | 41 | #endif /* __GTK_ICON_ENTRY_H__ */ | ||
347 | 42 | 0 | ||
348 | === modified file 'midori/main.c' | |||
349 | --- midori/main.c 2013-05-23 21:10:22 +0000 | |||
350 | +++ midori/main.c 2013-06-21 20:53:25 +0000 | |||
351 | @@ -39,36 +39,16 @@ | |||
352 | 39 | g_free (uri); | 39 | g_free (uri); |
353 | 40 | } | 40 | } |
354 | 41 | 41 | ||
355 | 42 | #define HAVE_OFFSCREEN GTK_CHECK_VERSION (2, 20, 0) | ||
356 | 43 | |||
357 | 44 | #ifndef HAVE_WEBKIT2 | 42 | #ifndef HAVE_WEBKIT2 |
358 | 45 | static void | 43 | static void |
359 | 46 | snapshot_load_finished_cb (GtkWidget* web_view, | 44 | snapshot_load_finished_cb (GtkWidget* web_view, |
360 | 47 | WebKitWebFrame* web_frame, | 45 | WebKitWebFrame* web_frame, |
361 | 48 | gchar* filename) | 46 | gchar* filename) |
362 | 49 | { | 47 | { |
363 | 50 | #if HAVE_OFFSCREEN | ||
364 | 51 | GdkPixbuf* pixbuf = gtk_offscreen_window_get_pixbuf (GTK_OFFSCREEN_WINDOW ( | 48 | GdkPixbuf* pixbuf = gtk_offscreen_window_get_pixbuf (GTK_OFFSCREEN_WINDOW ( |
365 | 52 | gtk_widget_get_parent (web_view))); | 49 | gtk_widget_get_parent (web_view))); |
366 | 53 | gdk_pixbuf_save (pixbuf, filename, "png", NULL, "compression", "7", NULL); | 50 | gdk_pixbuf_save (pixbuf, filename, "png", NULL, "compression", "7", NULL); |
367 | 54 | g_object_unref (pixbuf); | 51 | g_object_unref (pixbuf); |
368 | 55 | #else | ||
369 | 56 | GError* error; | ||
370 | 57 | GtkPrintOperation* operation = gtk_print_operation_new (); | ||
371 | 58 | |||
372 | 59 | gtk_print_operation_set_export_filename (operation, filename); | ||
373 | 60 | error = NULL; | ||
374 | 61 | webkit_web_frame_print_full (web_frame, operation, | ||
375 | 62 | GTK_PRINT_OPERATION_ACTION_EXPORT, &error); | ||
376 | 63 | |||
377 | 64 | if (error != NULL) | ||
378 | 65 | { | ||
379 | 66 | g_error ("%s", error->message); | ||
380 | 67 | gtk_main_quit (); | ||
381 | 68 | } | ||
382 | 69 | |||
383 | 70 | g_object_unref (operation); | ||
384 | 71 | #endif | ||
385 | 72 | g_print (_("Snapshot saved to: %s\n"), filename); | 52 | g_print (_("Snapshot saved to: %s\n"), filename); |
386 | 73 | gtk_main_quit (); | 53 | gtk_main_quit (); |
387 | 74 | } | 54 | } |
388 | @@ -268,14 +248,10 @@ | |||
389 | 268 | gchar* filename; | 248 | gchar* filename; |
390 | 269 | GtkWidget* web_view; | 249 | GtkWidget* web_view; |
391 | 270 | gchar* uri; | 250 | gchar* uri; |
392 | 271 | #if HAVE_OFFSCREEN | ||
393 | 272 | GtkWidget* offscreen; | 251 | GtkWidget* offscreen; |
394 | 273 | GdkScreen* screen; | 252 | GdkScreen* screen; |
395 | 274 | 253 | ||
396 | 275 | gint fd = g_file_open_tmp ("snapshot-XXXXXX.png", &filename, &error); | 254 | gint fd = g_file_open_tmp ("snapshot-XXXXXX.png", &filename, &error); |
397 | 276 | #else | ||
398 | 277 | gint fd = g_file_open_tmp ("snapshot-XXXXXX.pdf", &filename, &error); | ||
399 | 278 | #endif | ||
400 | 279 | close (fd); | 255 | close (fd); |
401 | 280 | 256 | ||
402 | 281 | if (error) | 257 | if (error) |
403 | @@ -291,7 +267,6 @@ | |||
404 | 291 | } | 267 | } |
405 | 292 | 268 | ||
406 | 293 | web_view = webkit_web_view_new (); | 269 | web_view = webkit_web_view_new (); |
407 | 294 | #if HAVE_OFFSCREEN | ||
408 | 295 | offscreen = gtk_offscreen_window_new (); | 270 | offscreen = gtk_offscreen_window_new (); |
409 | 296 | gtk_container_add (GTK_CONTAINER (offscreen), web_view); | 271 | gtk_container_add (GTK_CONTAINER (offscreen), web_view); |
410 | 297 | if ((screen = gdk_screen_get_default ())) | 272 | if ((screen = gdk_screen_get_default ())) |
411 | @@ -300,7 +275,6 @@ | |||
412 | 300 | else | 275 | else |
413 | 301 | gtk_widget_set_size_request (web_view, 800, 600); | 276 | gtk_widget_set_size_request (web_view, 800, 600); |
414 | 302 | gtk_widget_show_all (offscreen); | 277 | gtk_widget_show_all (offscreen); |
415 | 303 | #endif | ||
416 | 304 | #ifndef HAVE_WEBKIT2 | 278 | #ifndef HAVE_WEBKIT2 |
417 | 305 | g_signal_connect (web_view, "load-finished", | 279 | g_signal_connect (web_view, "load-finished", |
418 | 306 | G_CALLBACK (snapshot_load_finished_cb), filename); | 280 | G_CALLBACK (snapshot_load_finished_cb), filename); |
419 | 307 | 281 | ||
420 | === modified file 'midori/midori-browser.c' | |||
421 | --- midori/midori-browser.c 2013-06-21 19:21:07 +0000 | |||
422 | +++ midori/midori-browser.c 2013-06-21 20:53:25 +0000 | |||
423 | @@ -997,11 +997,7 @@ | |||
424 | 997 | if (!is_folder) | 997 | if (!is_folder) |
425 | 998 | { | 998 | { |
426 | 999 | entry_uri = katze_uri_entry_new ( | 999 | entry_uri = katze_uri_entry_new ( |
427 | 1000 | #if GTK_CHECK_VERSION (2, 20, 0) | ||
428 | 1001 | gtk_dialog_get_widget_for_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT)); | 1000 | gtk_dialog_get_widget_for_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT)); |
429 | 1002 | #else | ||
430 | 1003 | NULL); | ||
431 | 1004 | #endif | ||
432 | 1005 | gtk_entry_set_activates_default (GTK_ENTRY (entry_uri), TRUE); | 1001 | gtk_entry_set_activates_default (GTK_ENTRY (entry_uri), TRUE); |
433 | 1006 | gtk_entry_set_text (GTK_ENTRY (entry_uri), katze_item_get_uri (bookmark)); | 1002 | gtk_entry_set_text (GTK_ENTRY (entry_uri), katze_item_get_uri (bookmark)); |
434 | 1007 | gtk_box_pack_start (GTK_BOX (vbox), entry_uri, FALSE, FALSE, 0); | 1003 | gtk_box_pack_start (GTK_BOX (vbox), entry_uri, FALSE, FALSE, 0); |
435 | @@ -4689,32 +4685,6 @@ | |||
436 | 4689 | static const gchar* credits_artists[] = | 4685 | static const gchar* credits_artists[] = |
437 | 4690 | { "Nancy Runge <nancy@twotoasts.de>", NULL }; | 4686 | { "Nancy Runge <nancy@twotoasts.de>", NULL }; |
438 | 4691 | 4687 | ||
439 | 4692 | #if !GTK_CHECK_VERSION (2, 24, 0) | ||
440 | 4693 | static void | ||
441 | 4694 | _action_about_activate_link (GtkAboutDialog* about, | ||
442 | 4695 | const gchar* uri, | ||
443 | 4696 | gpointer user_data) | ||
444 | 4697 | { | ||
445 | 4698 | MidoriBrowser* browser = MIDORI_BROWSER (user_data); | ||
446 | 4699 | GtkWidget* view = midori_browser_add_uri (browser, uri); | ||
447 | 4700 | midori_browser_set_current_tab (browser, view); | ||
448 | 4701 | } | ||
449 | 4702 | |||
450 | 4703 | static void | ||
451 | 4704 | _action_about_activate_email (GtkAboutDialog* about, | ||
452 | 4705 | const gchar* uri, | ||
453 | 4706 | gpointer user_data) | ||
454 | 4707 | { | ||
455 | 4708 | /* Some email clients need the 'mailto' to function properly */ | ||
456 | 4709 | gchar* newuri = NULL; | ||
457 | 4710 | if (!g_str_has_prefix (uri, "mailto:")) | ||
458 | 4711 | newuri = g_strconcat ("mailto:", uri, NULL); | ||
459 | 4712 | |||
460 | 4713 | sokoke_show_uri (NULL, newuri ? newuri : uri, GDK_CURRENT_TIME, NULL); | ||
461 | 4714 | g_free (newuri); | ||
462 | 4715 | } | ||
463 | 4716 | #endif | ||
464 | 4717 | |||
465 | 4718 | static gchar* | 4688 | static gchar* |
466 | 4719 | midori_browser_get_docs (gboolean error) | 4689 | midori_browser_get_docs (gboolean error) |
467 | 4720 | { | 4690 | { |
468 | @@ -4748,10 +4718,6 @@ | |||
469 | 4748 | "License as published by the Free Software Foundation; either " | 4718 | "License as published by the Free Software Foundation; either " |
470 | 4749 | "version 2.1 of the License, or (at your option) any later version."); | 4719 | "version 2.1 of the License, or (at your option) any later version."); |
471 | 4750 | 4720 | ||
472 | 4751 | #if !GTK_CHECK_VERSION (2, 24, 0) | ||
473 | 4752 | gtk_about_dialog_set_email_hook (_action_about_activate_email, NULL, NULL); | ||
474 | 4753 | gtk_about_dialog_set_url_hook (_action_about_activate_link, browser, NULL); | ||
475 | 4754 | #endif | ||
476 | 4755 | #ifdef HAVE_GRANITE | 4721 | #ifdef HAVE_GRANITE |
477 | 4756 | gchar* docs = midori_browser_get_docs (FALSE); | 4722 | gchar* docs = midori_browser_get_docs (FALSE); |
478 | 4757 | /* Avoid granite_widgets_show_about_dialog for invalid memory and crashes */ | 4723 | /* Avoid granite_widgets_show_about_dialog for invalid memory and crashes */ |
479 | @@ -6358,29 +6324,8 @@ | |||
480 | 6358 | 6324 | ||
481 | 6359 | /* Statusbar */ | 6325 | /* Statusbar */ |
482 | 6360 | browser->statusbar = gtk_statusbar_new (); | 6326 | browser->statusbar = gtk_statusbar_new (); |
483 | 6361 | #if GTK_CHECK_VERSION (2, 20, 0) | ||
484 | 6362 | browser->statusbar_contents = | 6327 | browser->statusbar_contents = |
485 | 6363 | gtk_statusbar_get_message_area (GTK_STATUSBAR (browser->statusbar)); | 6328 | gtk_statusbar_get_message_area (GTK_STATUSBAR (browser->statusbar)); |
486 | 6364 | #else | ||
487 | 6365 | /* Rearrange the statusbar packing. This is necessariy to keep | ||
488 | 6366 | themes happy while there is no support from GtkStatusbar. */ | ||
489 | 6367 | forward = GTK_STATUSBAR (browser->statusbar)->label; | ||
490 | 6368 | if (GTK_IS_BOX (gtk_widget_get_parent (forward))) | ||
491 | 6369 | browser->statusbar_contents = gtk_widget_get_parent (forward); | ||
492 | 6370 | else | ||
493 | 6371 | { | ||
494 | 6372 | browser->statusbar_contents = gtk_hbox_new (FALSE, 4); | ||
495 | 6373 | gtk_widget_show (browser->statusbar_contents); | ||
496 | 6374 | g_object_ref (GTK_STATUSBAR (browser->statusbar)->label); | ||
497 | 6375 | gtk_container_remove ( | ||
498 | 6376 | GTK_CONTAINER (GTK_STATUSBAR (browser->statusbar)->frame), forward); | ||
499 | 6377 | gtk_box_pack_start (GTK_BOX (browser->statusbar_contents), | ||
500 | 6378 | forward, TRUE, TRUE, 0); | ||
501 | 6379 | g_object_unref (forward); | ||
502 | 6380 | gtk_container_add (GTK_CONTAINER (GTK_STATUSBAR (browser->statusbar)->frame), | ||
503 | 6381 | browser->statusbar_contents); | ||
504 | 6382 | } | ||
505 | 6383 | #endif | ||
506 | 6384 | gtk_box_pack_start (GTK_BOX (vbox), browser->statusbar, FALSE, FALSE, 0); | 6329 | gtk_box_pack_start (GTK_BOX (vbox), browser->statusbar, FALSE, FALSE, 0); |
507 | 6385 | 6330 | ||
508 | 6386 | g_signal_connect (browser->statusbar, "button-press-event", | 6331 | g_signal_connect (browser->statusbar, "button-press-event", |
509 | 6387 | 6332 | ||
510 | === modified file 'midori/midori-locationaction.c' | |||
511 | --- midori/midori-locationaction.c 2013-05-21 16:08:19 +0000 | |||
512 | +++ midori/midori-locationaction.c 2013-06-21 20:53:25 +0000 | |||
513 | @@ -945,10 +945,10 @@ | |||
514 | 945 | #if GTK_CHECK_VERSION (3, 6, 0) | 945 | #if GTK_CHECK_VERSION (3, 6, 0) |
515 | 946 | gtk_entry_set_input_purpose (GTK_ENTRY (entry), GTK_INPUT_PURPOSE_URL); | 946 | gtk_entry_set_input_purpose (GTK_ENTRY (entry), GTK_INPUT_PURPOSE_URL); |
516 | 947 | #endif | 947 | #endif |
521 | 948 | gtk_icon_entry_set_icon_highlight (GTK_ICON_ENTRY (entry), | 948 | gtk_entry_set_icon_activatable (GTK_ENTRY (entry), |
522 | 949 | GTK_ICON_ENTRY_PRIMARY, TRUE); | 949 | GTK_ENTRY_ICON_PRIMARY, TRUE); |
523 | 950 | gtk_icon_entry_set_icon_highlight (GTK_ICON_ENTRY (entry), | 950 | gtk_entry_set_icon_activatable (GTK_ENTRY (entry), |
524 | 951 | GTK_ICON_ENTRY_SECONDARY, TRUE); | 951 | GTK_ENTRY_ICON_SECONDARY, TRUE); |
525 | 952 | 952 | ||
526 | 953 | targetlist = gtk_target_list_new (NULL, 0); | 953 | targetlist = gtk_target_list_new (NULL, 0); |
527 | 954 | gtk_target_list_add_uri_targets (targetlist, 0); | 954 | gtk_target_list_add_uri_targets (targetlist, 0); |
528 | @@ -1235,7 +1235,6 @@ | |||
529 | 1235 | return FALSE; | 1235 | return FALSE; |
530 | 1236 | } | 1236 | } |
531 | 1237 | 1237 | ||
532 | 1238 | #if GTK_CHECK_VERSION (2, 19, 3) | ||
533 | 1239 | static void | 1238 | static void |
534 | 1240 | midori_location_action_preedit_changed_cb (GtkWidget* entry, | 1239 | midori_location_action_preedit_changed_cb (GtkWidget* entry, |
535 | 1241 | const gchar* preedit, | 1240 | const gchar* preedit, |
536 | @@ -1245,7 +1244,6 @@ | |||
537 | 1245 | gchar* key = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry))); | 1244 | gchar* key = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry))); |
538 | 1246 | midori_location_action_popup_completion (location_action, entry, key); | 1245 | midori_location_action_popup_completion (location_action, entry, key); |
539 | 1247 | } | 1246 | } |
540 | 1248 | #endif | ||
541 | 1249 | 1247 | ||
542 | 1250 | static gboolean | 1248 | static gboolean |
543 | 1251 | midori_location_action_focus_in_event_cb (GtkWidget* widget, | 1249 | midori_location_action_focus_in_event_cb (GtkWidget* widget, |
544 | @@ -1450,10 +1448,10 @@ | |||
545 | 1450 | /* The dialog should "toggle" like a menu, as far as users go | 1448 | /* The dialog should "toggle" like a menu, as far as users go |
546 | 1451 | FIXME: Half-working: the dialog closes but re-opens */ | 1449 | FIXME: Half-working: the dialog closes but re-opens */ |
547 | 1452 | static GtkWidget* dialog = NULL; | 1450 | static GtkWidget* dialog = NULL; |
549 | 1453 | if (icon_pos == GTK_ICON_ENTRY_PRIMARY && dialog != NULL) | 1451 | if (icon_pos == GTK_ENTRY_ICON_PRIMARY && dialog != NULL) |
550 | 1454 | gtk_widget_destroy (dialog); | 1452 | gtk_widget_destroy (dialog); |
551 | 1455 | 1453 | ||
553 | 1456 | if (icon_pos == GTK_ICON_ENTRY_PRIMARY) | 1454 | if (icon_pos == GTK_ENTRY_ICON_PRIMARY) |
554 | 1457 | { | 1455 | { |
555 | 1458 | /* No "security" window for blank pages */ | 1456 | /* No "security" window for blank pages */ |
556 | 1459 | if (midori_uri_is_blank (MIDORI_LOCATION_ACTION (action)->text)) | 1457 | if (midori_uri_is_blank (MIDORI_LOCATION_ACTION (action)->text)) |
557 | @@ -1501,7 +1499,7 @@ | |||
558 | 1501 | g_signal_connect (dialog, "destroy", G_CALLBACK (gtk_widget_destroyed), &dialog); | 1499 | g_signal_connect (dialog, "destroy", G_CALLBACK (gtk_widget_destroyed), &dialog); |
559 | 1502 | gtk_widget_show_all (dialog); | 1500 | gtk_widget_show_all (dialog); |
560 | 1503 | } | 1501 | } |
562 | 1504 | if (icon_pos == GTK_ICON_ENTRY_SECONDARY) | 1502 | if (icon_pos == GTK_ENTRY_ICON_SECONDARY) |
563 | 1505 | { | 1503 | { |
564 | 1506 | gboolean result; | 1504 | gboolean result; |
565 | 1507 | g_signal_emit (action, signals[SECONDARY_ICON_RELEASED], 0, | 1505 | g_signal_emit (action, signals[SECONDARY_ICON_RELEASED], 0, |
566 | @@ -1578,10 +1576,8 @@ | |||
567 | 1578 | midori_location_action_button_press_event_cb, action, | 1576 | midori_location_action_button_press_event_cb, action, |
568 | 1579 | "signal::key-press-event", | 1577 | "signal::key-press-event", |
569 | 1580 | midori_location_action_key_press_event_cb, action, | 1578 | midori_location_action_key_press_event_cb, action, |
570 | 1581 | #if GTK_CHECK_VERSION (2, 19, 3) | ||
571 | 1582 | "signal-after::preedit-changed", | 1579 | "signal-after::preedit-changed", |
572 | 1583 | midori_location_action_preedit_changed_cb, action, | 1580 | midori_location_action_preedit_changed_cb, action, |
573 | 1584 | #endif | ||
574 | 1585 | "signal::focus-in-event", | 1581 | "signal::focus-in-event", |
575 | 1586 | midori_location_action_focus_in_event_cb, action, | 1582 | midori_location_action_focus_in_event_cb, action, |
576 | 1587 | "signal::focus-out-event", | 1583 | "signal::focus-out-event", |
577 | @@ -1735,11 +1731,11 @@ | |||
578 | 1735 | { | 1731 | { |
579 | 1736 | GtkWidget* entry = midori_location_action_entry_for_proxy (proxies->data); | 1732 | GtkWidget* entry = midori_location_action_entry_for_proxy (proxies->data); |
580 | 1737 | if (stock_id && gtk_stock_lookup (stock_id, &stock_item)) | 1733 | if (stock_id && gtk_stock_lookup (stock_id, &stock_item)) |
583 | 1738 | gtk_icon_entry_set_icon_from_stock (GTK_ICON_ENTRY (entry), | 1734 | gtk_entry_set_icon_from_stock (GTK_ENTRY (entry), |
584 | 1739 | GTK_ICON_ENTRY_SECONDARY, stock_id); | 1735 | GTK_ENTRY_ICON_SECONDARY, stock_id); |
585 | 1740 | else | 1736 | else |
588 | 1741 | gtk_icon_entry_set_icon_from_icon_name (GTK_ICON_ENTRY (entry), | 1737 | gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry), |
589 | 1742 | GTK_ICON_ENTRY_SECONDARY, stock_id); | 1738 | GTK_ENTRY_ICON_SECONDARY, stock_id); |
590 | 1743 | } | 1739 | } |
591 | 1744 | } | 1740 | } |
592 | 1745 | 1741 | ||
593 | @@ -1768,8 +1764,8 @@ | |||
594 | 1768 | if (GTK_IS_TOOL_ITEM (proxies->data)) | 1764 | if (GTK_IS_TOOL_ITEM (proxies->data)) |
595 | 1769 | { | 1765 | { |
596 | 1770 | GtkWidget* entry = midori_location_action_entry_for_proxy (proxies->data); | 1766 | GtkWidget* entry = midori_location_action_entry_for_proxy (proxies->data); |
599 | 1771 | gtk_entry_set_icon_from_gicon (GTK_ENTRY (entry), GTK_ICON_ENTRY_PRIMARY, icon); | 1767 | gtk_entry_set_icon_from_gicon (GTK_ENTRY (entry), GTK_ENTRY_ICON_PRIMARY, icon); |
600 | 1772 | gtk_icon_entry_set_tooltip (GTK_ICON_ENTRY (entry), GTK_ICON_ENTRY_PRIMARY, tooltip); | 1768 | gtk_entry_set_icon_tooltip_text (GTK_ENTRY (entry), GTK_ENTRY_ICON_PRIMARY, tooltip); |
601 | 1773 | } | 1769 | } |
602 | 1774 | } | 1770 | } |
603 | 1775 | 1771 | ||
604 | 1776 | 1772 | ||
605 | === modified file 'midori/midori-platform.h' | |||
606 | --- midori/midori-platform.h 2013-05-19 09:33:02 +0000 | |||
607 | +++ midori/midori-platform.h 2013-06-21 20:53:25 +0000 | |||
608 | @@ -14,7 +14,6 @@ | |||
609 | 14 | 14 | ||
610 | 15 | #include "midori/midori-stock.h" | 15 | #include "midori/midori-stock.h" |
611 | 16 | #include "katze/gtk3-compat.h" | 16 | #include "katze/gtk3-compat.h" |
612 | 17 | #include "midori/gtkiconentry.h" | ||
613 | 18 | #include "midori/sokoke.h" | 17 | #include "midori/sokoke.h" |
614 | 19 | 18 | ||
615 | 20 | /* Common behavior modifiers */ | 19 | /* Common behavior modifiers */ |
616 | 21 | 20 | ||
617 | === modified file 'midori/midori-searchaction.c' | |||
618 | --- midori/midori-searchaction.c 2013-06-19 20:27:53 +0000 | |||
619 | +++ midori/midori-searchaction.c 2013-06-21 20:53:25 +0000 | |||
620 | @@ -312,8 +312,8 @@ | |||
621 | 312 | 312 | ||
622 | 313 | toolitem = GTK_WIDGET (gtk_tool_item_new ()); | 313 | toolitem = GTK_WIDGET (gtk_tool_item_new ()); |
623 | 314 | entry = sokoke_search_entry_new (NULL); | 314 | entry = sokoke_search_entry_new (NULL); |
626 | 315 | gtk_icon_entry_set_icon_highlight (GTK_ICON_ENTRY (entry), | 315 | gtk_entry_set_icon_activatable (GTK_ENTRY (entry), |
627 | 316 | GTK_ICON_ENTRY_PRIMARY, TRUE); | 316 | GTK_ENTRY_ICON_PRIMARY, TRUE); |
628 | 317 | alignment = gtk_alignment_new (0, 0.5, 1, 0.1); | 317 | alignment = gtk_alignment_new (0, 0.5, 1, 0.1); |
629 | 318 | gtk_container_add (GTK_CONTAINER (alignment), entry); | 318 | gtk_container_add (GTK_CONTAINER (alignment), entry); |
630 | 319 | gtk_widget_show (entry); | 319 | gtk_widget_show (entry); |
631 | @@ -402,7 +402,7 @@ | |||
632 | 402 | 402 | ||
633 | 403 | static void | 403 | static void |
634 | 404 | midori_search_action_icon_released_cb (GtkWidget* entry, | 404 | midori_search_action_icon_released_cb (GtkWidget* entry, |
636 | 405 | GtkIconEntryPosition icon_pos, | 405 | GtkEntryIconPosition icon_pos, |
637 | 406 | gint button, | 406 | gint button, |
638 | 407 | GtkAction* action) | 407 | GtkAction* action) |
639 | 408 | { | 408 | { |
640 | @@ -413,7 +413,7 @@ | |||
641 | 413 | GdkPixbuf* icon; | 413 | GdkPixbuf* icon; |
642 | 414 | GtkWidget* image; | 414 | GtkWidget* image; |
643 | 415 | 415 | ||
645 | 416 | if (icon_pos == GTK_ICON_ENTRY_SECONDARY) | 416 | if (icon_pos == GTK_ENTRY_ICON_SECONDARY) |
646 | 417 | return; | 417 | return; |
647 | 418 | 418 | ||
648 | 419 | search_engines = MIDORI_SEARCH_ACTION (action)->search_engines; | 419 | search_engines = MIDORI_SEARCH_ACTION (action)->search_engines; |
649 | @@ -502,16 +502,16 @@ | |||
650 | 502 | icon_name = "edit-find-option"; | 502 | icon_name = "edit-find-option"; |
651 | 503 | else | 503 | else |
652 | 504 | icon_name = STOCK_EDIT_FIND; | 504 | icon_name = STOCK_EDIT_FIND; |
655 | 505 | gtk_icon_entry_set_icon_from_icon_name (GTK_ICON_ENTRY (entry), | 505 | gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry), |
656 | 506 | GTK_ICON_ENTRY_PRIMARY, icon_name); | 506 | GTK_ENTRY_ICON_PRIMARY, icon_name); |
657 | 507 | } | 507 | } |
658 | 508 | gtk_entry_set_placeholder_text (GTK_ENTRY (entry), | 508 | gtk_entry_set_placeholder_text (GTK_ENTRY (entry), |
659 | 509 | katze_item_get_name (search_action->current_item)); | 509 | katze_item_get_name (search_action->current_item)); |
660 | 510 | } | 510 | } |
661 | 511 | else | 511 | else |
662 | 512 | { | 512 | { |
665 | 513 | gtk_icon_entry_set_icon_from_stock (GTK_ICON_ENTRY (entry), | 513 | gtk_entry_set_icon_from_stock (GTK_ENTRY (entry), |
666 | 514 | GTK_ICON_ENTRY_PRIMARY, | 514 | GTK_ENTRY_ICON_PRIMARY, |
667 | 515 | GTK_STOCK_FIND); | 515 | GTK_STOCK_FIND); |
668 | 516 | gtk_entry_set_placeholder_text (GTK_ENTRY (entry), ""); | 516 | gtk_entry_set_placeholder_text (GTK_ENTRY (entry), ""); |
669 | 517 | } | 517 | } |
670 | @@ -1102,11 +1102,7 @@ | |||
671 | 1102 | gtk_size_group_add_widget (sizegroup, label); | 1102 | gtk_size_group_add_widget (sizegroup, label); |
672 | 1103 | gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); | 1103 | gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); |
673 | 1104 | entry_uri = katze_uri_entry_new ( | 1104 | entry_uri = katze_uri_entry_new ( |
674 | 1105 | #if GTK_CHECK_VERSION (2, 20, 0) | ||
675 | 1106 | gtk_dialog_get_widget_for_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT)); | 1105 | gtk_dialog_get_widget_for_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT)); |
676 | 1107 | #else | ||
677 | 1108 | NULL); | ||
678 | 1109 | #endif | ||
679 | 1110 | g_object_set_data (G_OBJECT (entry_uri), "allow_%s", (void*)1); | 1106 | g_object_set_data (G_OBJECT (entry_uri), "allow_%s", (void*)1); |
680 | 1111 | gtk_entry_set_activates_default (GTK_ENTRY (entry_uri), TRUE); | 1107 | gtk_entry_set_activates_default (GTK_ENTRY (entry_uri), TRUE); |
681 | 1112 | gtk_entry_set_text (GTK_ENTRY (entry_uri), | 1108 | gtk_entry_set_text (GTK_ENTRY (entry_uri), |
682 | 1113 | 1109 | ||
683 | === modified file 'midori/midori-speeddial.vala' | |||
684 | --- midori/midori-speeddial.vala 2013-05-19 09:33:02 +0000 | |||
685 | +++ midori/midori-speeddial.vala 2013-06-21 20:53:25 +0000 | |||
686 | @@ -339,14 +339,9 @@ | |||
687 | 339 | return; | 339 | return; |
688 | 340 | 340 | ||
689 | 341 | return_if_fail (spec != null); | 341 | return_if_fail (spec != null); |
690 | 342 | #if HAVE_OFFSCREEN | ||
691 | 343 | var img = (thumb_view.parent as Gtk.OffscreenWindow).get_pixbuf (); | 342 | var img = (thumb_view.parent as Gtk.OffscreenWindow).get_pixbuf (); |
692 | 344 | var pixbuf_scaled = img.scale_simple (240, 160, Gdk.InterpType.TILES); | 343 | var pixbuf_scaled = img.scale_simple (240, 160, Gdk.InterpType.TILES); |
693 | 345 | img = pixbuf_scaled; | 344 | img = pixbuf_scaled; |
694 | 346 | #else | ||
695 | 347 | thumb_view.realize (); | ||
696 | 348 | var img = midori_view_web_view_get_snapshot (thumb_view, 240, 160); | ||
697 | 349 | #endif | ||
698 | 350 | unowned string title = thumb_view.get_title (); | 345 | unowned string title = thumb_view.get_title (); |
699 | 351 | add_with_id (spec.dial_id, spec.uri, title ?? spec.uri, img); | 346 | add_with_id (spec.dial_id, spec.uri, title ?? spec.uri, img); |
700 | 352 | 347 | ||
701 | @@ -373,22 +368,10 @@ | |||
702 | 373 | if (settings.get_class ().find_property ("enable-java-applet") != null) | 368 | if (settings.get_class ().find_property ("enable-java-applet") != null) |
703 | 374 | settings.set ("enable-java-applet", false); | 369 | settings.set ("enable-java-applet", false); |
704 | 375 | thumb_view.settings = settings; | 370 | thumb_view.settings = settings; |
705 | 376 | #if HAVE_OFFSCREEN | ||
706 | 377 | var offscreen = new Gtk.OffscreenWindow (); | 371 | var offscreen = new Gtk.OffscreenWindow (); |
707 | 378 | offscreen.add (thumb_view); | 372 | offscreen.add (thumb_view); |
708 | 379 | thumb_view.set_size_request (800, 600); | 373 | thumb_view.set_size_request (800, 600); |
709 | 380 | offscreen.show_all (); | 374 | offscreen.show_all (); |
710 | 381 | #else | ||
711 | 382 | /* What we are doing here is a bit of a hack. In order to render a | ||
712 | 383 | thumbnail we need a new view and load the url in it. But it has | ||
713 | 384 | to be visible and packed in a container. So we secretly pack it | ||
714 | 385 | into the notebook of the parent browser. */ | ||
715 | 386 | notebook.add (thumb_view); | ||
716 | 387 | thumb_view.destroy.connect (Gtk.widget_destroyed); | ||
717 | 388 | /* We use an empty label. It's not invisible but hard to spot. */ | ||
718 | 389 | notebook.set_tab_label (thumb_view, new Gtk.EventBox ()); | ||
719 | 390 | thumb_view.show (); | ||
720 | 391 | #endif | ||
721 | 392 | } | 375 | } |
722 | 393 | 376 | ||
723 | 394 | thumb_queue.append (new Spec (dial_id, uri)); | 377 | thumb_queue.append (new Spec (dial_id, uri)); |
724 | 395 | 378 | ||
725 | === modified file 'midori/midori-view.c' | |||
726 | --- midori/midori-view.c 2013-06-19 21:00:46 +0000 | |||
727 | +++ midori/midori-view.c 2013-06-21 20:53:25 +0000 | |||
728 | @@ -969,9 +969,6 @@ | |||
729 | 969 | } | 969 | } |
730 | 970 | } | 970 | } |
731 | 971 | 971 | ||
732 | 972 | #define HAVE_GTK_INFO_BAR GTK_CHECK_VERSION (2, 18, 0) | ||
733 | 973 | |||
734 | 974 | #if HAVE_GTK_INFO_BAR | ||
735 | 975 | static void | 972 | static void |
736 | 976 | midori_view_infobar_response_cb (GtkWidget* infobar, | 973 | midori_view_infobar_response_cb (GtkWidget* infobar, |
737 | 977 | gint response, | 974 | gint response, |
738 | @@ -983,20 +980,6 @@ | |||
739 | 983 | response_cb (infobar, response, data_object); | 980 | response_cb (infobar, response, data_object); |
740 | 984 | gtk_widget_destroy (infobar); | 981 | gtk_widget_destroy (infobar); |
741 | 985 | } | 982 | } |
742 | 986 | #else | ||
743 | 987 | static void | ||
744 | 988 | midori_view_info_bar_button_cb (GtkWidget* button, | ||
745 | 989 | gpointer data_object) | ||
746 | 990 | { | ||
747 | 991 | GtkWidget* infobar = gtk_widget_get_parent (gtk_widget_get_parent (button)); | ||
748 | 992 | gint response = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (button), "midori-infobar-response")); | ||
749 | 993 | void (*response_cb) (GtkWidget*, gint, gpointer); | ||
750 | 994 | response_cb = g_object_get_data (G_OBJECT (infobar), "midori-infobar-cb"); | ||
751 | 995 | if (response_cb != NULL) | ||
752 | 996 | response_cb (infobar, response, data_object); | ||
753 | 997 | gtk_widget_destroy (infobar); | ||
754 | 998 | } | ||
755 | 999 | #endif | ||
756 | 1000 | 983 | ||
757 | 1001 | /** | 984 | /** |
758 | 1002 | * midori_view_add_info_bar | 985 | * midori_view_add_info_bar |
759 | @@ -1037,7 +1020,6 @@ | |||
760 | 1037 | 1020 | ||
761 | 1038 | va_start (args, first_button_text); | 1021 | va_start (args, first_button_text); |
762 | 1039 | 1022 | ||
763 | 1040 | #if HAVE_GTK_INFO_BAR | ||
764 | 1041 | infobar = gtk_info_bar_new (); | 1023 | infobar = gtk_info_bar_new (); |
765 | 1042 | for (button_text = first_button_text; button_text; | 1024 | for (button_text = first_button_text; button_text; |
766 | 1043 | button_text = va_arg (args, const gchar*)) | 1025 | button_text = va_arg (args, const gchar*)) |
767 | @@ -1053,29 +1035,6 @@ | |||
768 | 1053 | GTK_ORIENTATION_HORIZONTAL); | 1035 | GTK_ORIENTATION_HORIZONTAL); |
769 | 1054 | g_signal_connect (infobar, "response", | 1036 | g_signal_connect (infobar, "response", |
770 | 1055 | G_CALLBACK (midori_view_infobar_response_cb), data_object); | 1037 | G_CALLBACK (midori_view_infobar_response_cb), data_object); |
771 | 1056 | #else | ||
772 | 1057 | infobar = gtk_hbox_new (FALSE, 0); | ||
773 | 1058 | gtk_container_set_border_width (GTK_CONTAINER (infobar), 4); | ||
774 | 1059 | |||
775 | 1060 | content_area = gtk_hbox_new (FALSE, 0); | ||
776 | 1061 | gtk_box_pack_start (GTK_BOX (infobar), content_area, TRUE, TRUE, 0); | ||
777 | 1062 | action_area = gtk_hbutton_box_new (); | ||
778 | 1063 | for (button_text = first_button_text; button_text; | ||
779 | 1064 | button_text = va_arg (args, const gchar*)) | ||
780 | 1065 | { | ||
781 | 1066 | gint response_id = va_arg (args, gint); | ||
782 | 1067 | GtkWidget* button = gtk_button_new_with_mnemonic (button_text); | ||
783 | 1068 | g_object_set_data (G_OBJECT (button), "midori-infobar-response", | ||
784 | 1069 | GINT_TO_POINTER (response_id)); | ||
785 | 1070 | g_signal_connect (button, "clicked", | ||
786 | 1071 | G_CALLBACK (midori_view_info_bar_button_cb), data_object); | ||
787 | 1072 | gtk_box_pack_start (GTK_BOX (action_area), button, FALSE, FALSE, 0); | ||
788 | 1073 | if (response_id == GTK_RESPONSE_HELP) | ||
789 | 1074 | gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (action_area), | ||
790 | 1075 | button, TRUE); | ||
791 | 1076 | } | ||
792 | 1077 | gtk_box_pack_start (GTK_BOX (infobar), action_area, FALSE, FALSE, 0); | ||
793 | 1078 | #endif | ||
794 | 1079 | 1038 | ||
795 | 1080 | va_end (args); | 1039 | va_end (args); |
796 | 1081 | label = gtk_label_new (message); | 1040 | label = gtk_label_new (message); |
797 | @@ -5383,9 +5342,7 @@ | |||
798 | 5383 | WebKitWebFrame* frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW (view->web_view)); | 5342 | WebKitWebFrame* frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW (view->web_view)); |
799 | 5384 | GtkPrintOperation* operation = gtk_print_operation_new (); | 5343 | GtkPrintOperation* operation = gtk_print_operation_new (); |
800 | 5385 | gtk_print_operation_set_custom_tab_label (operation, _("Features")); | 5344 | gtk_print_operation_set_custom_tab_label (operation, _("Features")); |
801 | 5386 | #if GTK_CHECK_VERSION (2, 18, 0) | ||
802 | 5387 | gtk_print_operation_set_embed_page_setup (operation, TRUE); | 5345 | gtk_print_operation_set_embed_page_setup (operation, TRUE); |
803 | 5388 | #endif | ||
804 | 5389 | g_signal_connect (operation, "create-custom-widget", | 5346 | g_signal_connect (operation, "create-custom-widget", |
805 | 5390 | G_CALLBACK (midori_view_print_create_custom_widget_cb), view); | 5347 | G_CALLBACK (midori_view_print_create_custom_widget_cb), view); |
806 | 5391 | GError* error = NULL; | 5348 | GError* error = NULL; |
807 | 5392 | 5349 | ||
808 | === modified file 'midori/sokoke.c' | |||
809 | --- midori/sokoke.c 2013-05-27 00:00:58 +0000 | |||
810 | +++ midori/sokoke.c 2013-06-21 20:53:25 +0000 | |||
811 | @@ -1096,9 +1096,8 @@ | |||
812 | 1096 | const gchar* text = gtk_entry_get_text (entry); | 1096 | const gchar* text = gtk_entry_get_text (entry); |
813 | 1097 | gboolean visible = text && *text | 1097 | gboolean visible = text && *text |
814 | 1098 | && ! sokoke_entry_has_placeholder_text (entry); | 1098 | && ! sokoke_entry_has_placeholder_text (entry); |
818 | 1099 | gtk_icon_entry_set_icon_from_stock ( | 1099 | gtk_entry_set_icon_from_stock ( |
819 | 1100 | GTK_ICON_ENTRY (entry), | 1100 | entry, GTK_ENTRY_ICON_SECONDARY, |
817 | 1101 | GTK_ICON_ENTRY_SECONDARY, | ||
820 | 1102 | visible ? GTK_STOCK_CLEAR : NULL); | 1101 | visible ? GTK_STOCK_CLEAR : NULL); |
821 | 1103 | } | 1102 | } |
822 | 1104 | 1103 | ||
823 | @@ -1113,11 +1112,11 @@ | |||
824 | 1113 | 1112 | ||
825 | 1114 | static void | 1113 | static void |
826 | 1115 | sokoke_entry_icon_released_cb (GtkEntry* entry, | 1114 | sokoke_entry_icon_released_cb (GtkEntry* entry, |
828 | 1116 | GtkIconEntryPosition icon_pos, | 1115 | GtkEntryIconPosition icon_pos, |
829 | 1117 | GdkEvent* event, | 1116 | GdkEvent* event, |
830 | 1118 | gpointer user_data) | 1117 | gpointer user_data) |
831 | 1119 | { | 1118 | { |
833 | 1120 | if (icon_pos != GTK_ICON_ENTRY_SECONDARY) | 1119 | if (icon_pos != GTK_ENTRY_ICON_SECONDARY) |
834 | 1121 | return; | 1120 | return; |
835 | 1122 | 1121 | ||
836 | 1123 | gtk_entry_set_text (entry, ""); | 1122 | gtk_entry_set_text (entry, ""); |
837 | @@ -1131,7 +1130,7 @@ | |||
838 | 1131 | gtk_entry_set_placeholder_text (GTK_ENTRY (entry), placeholder_text); | 1130 | gtk_entry_set_placeholder_text (GTK_ENTRY (entry), placeholder_text); |
839 | 1132 | gtk_entry_set_icon_from_stock (GTK_ENTRY (entry), | 1131 | gtk_entry_set_icon_from_stock (GTK_ENTRY (entry), |
840 | 1133 | GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_FIND); | 1132 | GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_FIND); |
842 | 1134 | gtk_icon_entry_set_icon_highlight (GTK_ENTRY (entry), | 1133 | gtk_entry_set_icon_activatable (GTK_ENTRY (entry), |
843 | 1135 | GTK_ENTRY_ICON_SECONDARY, TRUE); | 1134 | GTK_ENTRY_ICON_SECONDARY, TRUE); |
844 | 1136 | { | 1135 | { |
845 | 1137 | g_object_connect (entry, | 1136 | g_object_connect (entry, |
846 | 1138 | 1137 | ||
847 | === modified file 'toolbars/midori-findbar.c' | |||
848 | --- toolbars/midori-findbar.c 2012-10-10 22:25:05 +0000 | |||
849 | +++ toolbars/midori-findbar.c 2013-06-21 20:53:25 +0000 | |||
850 | @@ -46,7 +46,7 @@ | |||
851 | 46 | 46 | ||
852 | 47 | static void | 47 | static void |
853 | 48 | midori_findbar_set_icon (MidoriFindbar* findbar, | 48 | midori_findbar_set_icon (MidoriFindbar* findbar, |
855 | 49 | GtkIconEntryPosition icon_pos, | 49 | GtkEntryIconPosition icon_pos, |
856 | 50 | const gchar* icon_name) | 50 | const gchar* icon_name) |
857 | 51 | { | 51 | { |
858 | 52 | if (icon_name != NULL) | 52 | if (icon_name != NULL) |
859 | @@ -57,7 +57,7 @@ | |||
860 | 57 | g_free (symbolic_icon_name); | 57 | g_free (symbolic_icon_name); |
861 | 58 | } | 58 | } |
862 | 59 | else | 59 | else |
864 | 60 | gtk_icon_entry_set_icon_from_icon_name (GTK_ICON_ENTRY (findbar->find_text), | 60 | gtk_entry_set_icon_from_icon_name (GTK_ENTRY (findbar->find_text), |
865 | 61 | icon_pos, NULL); | 61 | icon_pos, NULL); |
866 | 62 | } | 62 | } |
867 | 63 | 63 | ||
868 | @@ -146,7 +146,7 @@ | |||
869 | 146 | gtk_widget_grab_focus (GTK_WIDGET (findbar->find_text)); | 146 | gtk_widget_grab_focus (GTK_WIDGET (findbar->find_text)); |
870 | 147 | else | 147 | else |
871 | 148 | { | 148 | { |
873 | 149 | midori_findbar_set_icon (findbar, GTK_ICON_ENTRY_PRIMARY, STOCK_EDIT_FIND); | 149 | midori_findbar_set_icon (findbar, GTK_ENTRY_ICON_PRIMARY, STOCK_EDIT_FIND); |
874 | 150 | gtk_widget_show (GTK_WIDGET (findbar->find_case)); | 150 | gtk_widget_show (GTK_WIDGET (findbar->find_case)); |
875 | 151 | gtk_widget_show (GTK_WIDGET (findbar->find_close)); | 151 | gtk_widget_show (GTK_WIDGET (findbar->find_close)); |
876 | 152 | if (selected_text != NULL) | 152 | if (selected_text != NULL) |
877 | @@ -188,11 +188,11 @@ | |||
878 | 188 | if (g_utf8_strlen (preedit, -1) >= 1) | 188 | if (g_utf8_strlen (preedit, -1) >= 1) |
879 | 189 | { | 189 | { |
880 | 190 | gboolean case_sensitive = midori_findbar_case_sensitive (findbar); | 190 | gboolean case_sensitive = midori_findbar_case_sensitive (findbar); |
882 | 191 | midori_findbar_set_icon (findbar, GTK_ICON_ENTRY_SECONDARY, STOCK_EDIT_CLEAR); | 191 | midori_findbar_set_icon (findbar, GTK_ENTRY_ICON_SECONDARY, STOCK_EDIT_CLEAR); |
883 | 192 | midori_tab_find (MIDORI_TAB (view), preedit, case_sensitive, TRUE); | 192 | midori_tab_find (MIDORI_TAB (view), preedit, case_sensitive, TRUE); |
884 | 193 | } | 193 | } |
885 | 194 | else | 194 | else |
887 | 195 | midori_findbar_set_icon (findbar, GTK_ICON_ENTRY_SECONDARY, NULL); | 195 | midori_findbar_set_icon (findbar, GTK_ENTRY_ICON_SECONDARY, NULL); |
888 | 196 | } | 196 | } |
889 | 197 | 197 | ||
890 | 198 | static void | 198 | static void |
891 | @@ -292,7 +292,7 @@ | |||
892 | 292 | const gchar* text; | 292 | const gchar* text; |
893 | 293 | gboolean case_sensitive; | 293 | gboolean case_sensitive; |
894 | 294 | 294 | ||
896 | 295 | midori_findbar_set_icon (findbar, GTK_ICON_ENTRY_PRIMARY, found ? STOCK_EDIT_FIND : STOCK_STOP); | 295 | midori_findbar_set_icon (findbar, GTK_ENTRY_ICON_PRIMARY, found ? STOCK_EDIT_FIND : STOCK_STOP); |
897 | 296 | 296 | ||
898 | 297 | if (typing) | 297 | if (typing) |
899 | 298 | { | 298 | { |
900 | 299 | 299 | ||
901 | === modified file 'wscript' | |||
902 | --- wscript 2013-06-17 17:53:51 +0000 | |||
903 | +++ wscript 2013-06-21 20:53:25 +0000 | |||
904 | @@ -263,7 +263,7 @@ | |||
905 | 263 | conf.env.append_value ('VALAFLAGS', '-D HAVE_OFFSCREEN') | 263 | conf.env.append_value ('VALAFLAGS', '-D HAVE_OFFSCREEN') |
906 | 264 | conf.env.append_value ('VALAFLAGS', '-D HAVE_DOM') | 264 | conf.env.append_value ('VALAFLAGS', '-D HAVE_DOM') |
907 | 265 | else: | 265 | else: |
909 | 266 | check_pkg ('gtk+-2.0', '2.16.0', var='GTK') | 266 | check_pkg ('gtk+-2.0', '2.24.0', var='GTK') |
910 | 267 | check_pkg ('webkit-1.0', '1.8.3', args=args) | 267 | check_pkg ('webkit-1.0', '1.8.3', args=args) |
911 | 268 | conf.define ('GCR_VERSION', 'No') | 268 | conf.define ('GCR_VERSION', 'No') |
912 | 269 | check_pkg ('javascriptcoregtk-1.0', '1.8.3', args=args) | 269 | check_pkg ('javascriptcoregtk-1.0', '1.8.3', args=args) |
Mostly looks good, except:
403 + if (g_str_has_prefix (uri, "mailto:"))
404 + {
405 + gchar* newuri = NULL;
406 + if (!g_str_has_prefix (uri, "mailto:"))
The inner condition will never be true. I don't think the function should be interpreting "fuzzy" URIs anyhow--if we want it to accept "fuzzy" uris, I think we should reuse "stronger" existing functions for the purpose. Most likely though all the logic can simply be removed--we can put full URIs in the dialogs.