Merge lp:~kalikiana/midori/gtk2.24 into lp:midori

Proposed by Cris Dywan
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
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.
Revision history for this message
gue5t gue5t (gue5t) wrote :

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.

review: Needs Fixing
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

Revision history for this message
gue5t gue5t (gue5t) wrote :

Looks good now.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'README'
--- README 2013-06-17 17:53:51 +0000
+++ README 2013-06-21 20:53:25 +0000
@@ -11,7 +11,7 @@
11* Straightforward bookmark management.11* Straightforward bookmark management.
12* Customizable interface, extensions written in C and Vala.12* Customizable interface, extensions written in C and Vala.
1313
14Requirements: GLib 2.22, GTK+ 2.16, WebkitGTK+ 1.8.3, libXML2,14Requirements: GLib 2.22, GTK+ 2.24, WebkitGTK+ 1.8.3, libXML2,
15 libsoup 2.27.90, sqlite 3.0, Vala 0.14, libnotify15 libsoup 2.27.90, sqlite 3.0, Vala 0.14, libnotify
1616
17Optional: GTK+ 3.0, Unique 0.9, gcr, Granite 0.2, WebKit2GTK+ 1.11.91/ 2.0.017Optional: GTK+ 3.0, Unique 0.9, gcr, Granite 0.2, WebKit2GTK+ 1.11.91/ 2.0.0
1818
=== modified file 'extensions/adblock.c'
--- extensions/adblock.c 2013-06-20 20:53:02 +0000
+++ extensions/adblock.c 2013-06-21 20:53:25 +0000
@@ -439,7 +439,6 @@
439 gtk_list_store_remove (GTK_LIST_STORE (model), &iter);439 gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
440}440}
441441
442#if GTK_CHECK_VERSION (2, 18, 0)
443static gboolean442static gboolean
444adblock_activate_link_cb (GtkWidget* label,443adblock_activate_link_cb (GtkWidget* label,
445 const gchar* uri)444 const gchar* uri)
@@ -449,7 +448,6 @@
449 midori_browser_set_current_tab (browser, view);448 midori_browser_set_current_tab (browser, view);
450 return TRUE;449 return TRUE;
451}450}
452#endif
453451
454static GtkWidget*452static GtkWidget*
455adblock_get_preferences_dialog (MidoriExtension* extension)453adblock_get_preferences_dialog (MidoriExtension* extension)
@@ -512,17 +510,10 @@
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 "
513 "and click \"Add\" to add it to the list. "511 "and click \"Add\" to add it to the list. "
514 "You can find more lists at %s."),512 "You can find more lists at %s."),
515 #if GTK_CHECK_VERSION (2, 18, 0)
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> "
517 "<a href=\"http://easylist.adblockplus.org/\">easylist.adblockplus.org</a>");514 "<a href=\"http://easylist.adblockplus.org/\">easylist.adblockplus.org</a>");
518 #else
519 "<u>http://adblockplus.org/en/subscriptions</u> "
520 "<u>http://easylist.adblockplus.org/</u>");
521 #endif
522 #if GTK_CHECK_VERSION (2, 18, 0)
523 g_signal_connect (button, "activate-link",515 g_signal_connect (button, "activate-link",
524 G_CALLBACK (adblock_activate_link_cb), NULL);516 G_CALLBACK (adblock_activate_link_cb), NULL);
525 #endif
526 gtk_label_set_markup (GTK_LABEL (button), description);517 gtk_label_set_markup (GTK_LABEL (button), description);
527 g_free (description);518 g_free (description);
528 gtk_label_set_line_wrap (GTK_LABEL (button), TRUE);519 gtk_label_set_line_wrap (GTK_LABEL (button), TRUE);
529520
=== modified file 'katze/gtk3-compat.h'
--- katze/gtk3-compat.h 2012-12-13 22:58:07 +0000
+++ katze/gtk3-compat.h 2013-06-21 20:53:25 +0000
@@ -50,31 +50,6 @@
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)
51#endif51#endif
5252
53#if !GTK_CHECK_VERSION (2, 18, 0)
54 #define gtk_widget_is_toplevel(widget) GTK_WIDGET_TOPLEVEL (widget)
55 #define gtk_widget_has_focus(widget) GTK_WIDGET_HAS_FOCUS (widget)
56 #define gtk_widget_get_visible(widget) GTK_WIDGET_VISIBLE (widget)
57 #define gtk_widget_get_sensitive(widget) GTK_WIDGET_IS_SENSITIVE (widget)
58 #define gtk_widget_set_can_focus(widget,flag) \
59 GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_FOCUS)
60 #define gtk_widget_get_allocation(wdgt, alloc) *alloc = wdgt->allocation
61 #define gtk_widget_get_has_window(wdgt) !GTK_WIDGET_NO_WINDOW (wdgt)
62 #define gtk_widget_get_allocation(wdgt, alloc) *alloc = wdgt->allocation
63 #define gtk_widget_set_window(wdgt, wndw) wdgt->window = wndw
64 #define gtk_widget_is_drawable GTK_WIDGET_DRAWABLE
65 #define gtk_widget_get_drawable GTK_WIDGET_VISIBLE
66 #define gtk_widget_set_has_window(wdgt, wnd) \
67 if (wnd) GTK_WIDGET_UNSET_FLAGS (wdgt, GTK_NO_WINDOW); \
68 else GTK_WIDGET_SET_FLAGS (wdgt, GTK_NO_WINDOW)
69#endif
70
71#if !GTK_CHECK_VERSION (2, 20, 0)
72 #define gtk_widget_get_realized(widget) GTK_WIDGET_REALIZED (widget)
73 #define gtk_widget_set_realized(wdgt, real) \
74 if (real) GTK_WIDGET_SET_FLAGS (wdgt, GTK_REALIZED); \
75 else GTK_WIDGET_UNSET_FLAGS (wdgt, GTK_REALIZED)
76#endif
77
78#if GTK_CHECK_VERSION (3, 0, 0)53#if GTK_CHECK_VERSION (3, 0, 0)
79 #define GTK_DIALOG_NO_SEPARATOR 054 #define GTK_DIALOG_NO_SEPARATOR 0
80#endif55#endif
@@ -84,15 +59,6 @@
84 const gchar* gtk_entry_get_placeholder_text (GtkEntry* entry);59 const gchar* gtk_entry_get_placeholder_text (GtkEntry* entry);
85#endif60#endif
8661
87#if !GTK_CHECK_VERSION (2, 24 ,0)
88 #define gtk_combo_box_text_append_text gtk_combo_box_append_text
89 #define gtk_combo_box_text_new gtk_combo_box_new_text
90 #define gtk_combo_box_text_new_with_entry gtk_combo_box_entry_new_text
91 #define gtk_combo_box_text_get_active_text gtk_combo_box_get_active_text
92 #define GTK_COMBO_BOX_TEXT GTK_COMBO_BOX
93 #define GtkComboBoxText GtkComboBox
94#endif
95
96#ifndef GDK_KEY_Return62#ifndef GDK_KEY_Return
97 #define GDK_KEY_0 GDK_063 #define GDK_KEY_0 GDK_0
98 #define GDK_KEY_BackSpace GDK_BackSpace64 #define GDK_KEY_BackSpace GDK_BackSpace
9965
=== modified file 'katze/katze-throbber.c'
--- katze/katze-throbber.c 2013-04-01 14:21:39 +0000
+++ katze/katze-throbber.c 2013-06-21 20:53:25 +0000
@@ -16,16 +16,9 @@
16#include <glib/gi18n.h>16#include <glib/gi18n.h>
17#include <math.h>17#include <math.h>
1818
19#define HAVE_SPINNER GTK_CHECK_VERSION (2, 20, 0)
20
21struct _KatzeThrobber19struct _KatzeThrobber
22{20{
23 #if HAVE_SPINNER
24 GtkSpinner parent_instance;21 GtkSpinner parent_instance;
25 #else
26 GtkMisc parent_instance;
27 #endif
28
29 GtkIconSize icon_size;22 GtkIconSize icon_size;
30 gchar* icon_name;23 gchar* icon_name;
31 GdkPixbuf* pixbuf;24 GdkPixbuf* pixbuf;
@@ -43,18 +36,10 @@
4336
44struct _KatzeThrobberClass37struct _KatzeThrobberClass
45{38{
46 #if HAVE_SPINNER
47 GtkSpinnerClass parent_class;39 GtkSpinnerClass parent_class;
48 #else
49 GtkMiscClass parent_class;
50 #endif
51};40};
5241
53#if HAVE_SPINNER
54G_DEFINE_TYPE (KatzeThrobber, katze_throbber, GTK_TYPE_SPINNER);42G_DEFINE_TYPE (KatzeThrobber, katze_throbber, GTK_TYPE_SPINNER);
55#else
56G_DEFINE_TYPE (KatzeThrobber, katze_throbber, GTK_TYPE_MISC);
57#endif
5843
59enum44enum
60{45{
@@ -136,14 +121,6 @@
136static void121static void
137icon_theme_changed (KatzeThrobber* throbber);122icon_theme_changed (KatzeThrobber* throbber);
138123
139#if !HAVE_SPINNER
140static gboolean
141katze_throbber_timeout (KatzeThrobber* throbber);
142
143static void
144katze_throbber_timeout_destroy (KatzeThrobber* throbber);
145#endif
146
147static void124static void
148katze_throbber_class_init (KatzeThrobberClass* class)125katze_throbber_class_init (KatzeThrobberClass* class)
149{126{
@@ -251,9 +228,6 @@
251katze_throbber_init (KatzeThrobber *throbber)228katze_throbber_init (KatzeThrobber *throbber)
252{229{
253 gtk_widget_set_has_window (GTK_WIDGET (throbber), FALSE);230 gtk_widget_set_has_window (GTK_WIDGET (throbber), FALSE);
254 #if !HAVE_SPINNER
255 gtk_misc_set_alignment (GTK_MISC (throbber), 0.0, 0.5);
256 #endif
257231
258 throbber->timer_id = -1;232 throbber->timer_id = -1;
259}233}
@@ -486,14 +460,7 @@
486460
487 throbber->animated = animated;461 throbber->animated = animated;
488462
489 #if HAVE_SPINNER
490 g_object_set (throbber, "active", animated, NULL);463 g_object_set (throbber, "active", animated, NULL);
491 #else
492 if (animated && (throbber->timer_id < 0))
493 throbber->timer_id = midori_timeout_add (50,
494 (GSourceFunc)katze_throbber_timeout, throbber,
495 (GDestroyNotify)katze_throbber_timeout_destroy);
496 #endif
497 gtk_widget_queue_draw (GTK_WIDGET (throbber));464 gtk_widget_queue_draw (GTK_WIDGET (throbber));
498465
499 g_object_notify (G_OBJECT (throbber), "animated");466 g_object_notify (G_OBJECT (throbber), "animated");
@@ -797,24 +764,6 @@
797 GTK_WIDGET_CLASS (katze_throbber_parent_class)->unmap (widget);764 GTK_WIDGET_CLASS (katze_throbber_parent_class)->unmap (widget);
798}765}
799766
800#if !HAVE_SPINNER
801static gboolean
802katze_throbber_timeout (KatzeThrobber* throbber)
803{
804 throbber->index++;
805 gtk_widget_queue_draw (GTK_WIDGET (throbber));
806
807 return throbber->animated;
808}
809
810static void
811katze_throbber_timeout_destroy (KatzeThrobber* throbber)
812{
813 throbber->index = 0;
814 throbber->timer_id = -1;
815}
816#endif
817
818static void767static void
819katze_throbber_style_set (GtkWidget* widget,768katze_throbber_style_set (GtkWidget* widget,
820 GtkStyle* prev_style)769 GtkStyle* prev_style)
@@ -888,16 +837,9 @@
888 GtkAllocation allocation;837 GtkAllocation allocation;
889 GtkRequisition requisition;838 GtkRequisition requisition;
890839
891 #if HAVE_SPINNER
892 xalign = 0.0;840 xalign = 0.0;
893 yalign = 0.5;841 yalign = 0.5;
894 xpad = ypad = 0.0;842 xpad = ypad = 0.0;
895 #else
896 gtk_misc_get_alignment (GTK_MISC (widget), &xalign, &yalign);
897 if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
898 xalign = 1.0f - xalign;
899 gtk_misc_get_padding (GTK_MISC (widget), &xpad, &ypad);
900 #endif
901843
902 #if GTK_CHECK_VERSION (3, 0, 0)844 #if GTK_CHECK_VERSION (3, 0, 0)
903 allocation.x = allocation.y = 0;845 allocation.x = allocation.y = 0;
@@ -978,75 +920,12 @@
978 }920 }
979 else921 else
980 {922 {
981 #if HAVE_SPINNER
982 if (throbber->animated)923 if (throbber->animated)
983#if GTK_CHECK_VERSION (3, 0, 0)924#if GTK_CHECK_VERSION (3, 0, 0)
984 return GTK_WIDGET_CLASS (katze_throbber_parent_class)->draw (widget, cr);925 return GTK_WIDGET_CLASS (katze_throbber_parent_class)->draw (widget, cr);
985#else926#else
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);
987#endif928#endif
988 #else
989 gint cols, rows;
990
991 if (G_UNLIKELY (throbber->icon_name && !throbber->pixbuf))
992 {
993 icon_theme_changed (KATZE_THROBBER (widget));
994
995 if (!throbber->pixbuf)
996 {
997 /* Fallback to a stock icon */
998 katze_assign (throbber->icon_name, g_strdup (GTK_STOCK_EXECUTE));
999 g_object_notify (G_OBJECT (throbber), "icon-name");
1000 return TRUE;
1001 }
1002 }
1003
1004 cols = gdk_pixbuf_get_width (throbber->pixbuf) / throbber->width;
1005 rows = gdk_pixbuf_get_height (throbber->pixbuf) / throbber->height;
1006
1007 if (G_UNLIKELY (cols == 1 && cols == rows))
1008 {
1009 katze_throbber_aligned_coords (widget, &ax, &ay);
1010
1011 if (throbber->animated)
1012 gdk_draw_pixbuf (event->window, NULL, throbber->pixbuf,
1013 0, 0, ax, ay,
1014 throbber->width, throbber->height,
1015 GDK_RGB_DITHER_NONE, 0, 0);
1016 return TRUE;
1017 }
1018
1019 if (G_LIKELY (cols > 0 && rows > 0))
1020 {
1021 gint idx;
1022 guint x, y;
1023
1024 katze_throbber_aligned_coords (widget, &ax, &ay);
1025
1026 idx = throbber->index % (cols * rows);
1027 if (G_LIKELY (throbber->timer_id >= 0))
1028 idx = MAX (idx, 1);
1029
1030 x = (idx % cols) * throbber->width;
1031 y = (idx / cols) * throbber->height;
1032
1033 gdk_draw_pixbuf (event->window, NULL, throbber->pixbuf,
1034 x, y, ax, ay,
1035 throbber->width, throbber->height,
1036 GDK_RGB_DITHER_NONE, 0, 0);
1037 }
1038 else
1039 {
1040 g_warning (_("Animation frames are broken"));
1041 katze_assign (throbber->icon_name, NULL);
1042 katze_object_assign (throbber->pixbuf, NULL);
1043
1044 g_object_freeze_notify (G_OBJECT (throbber));
1045 g_object_notify (G_OBJECT (throbber), "icon-name");
1046 g_object_notify (G_OBJECT (throbber), "pixbuf");
1047 g_object_thaw_notify (G_OBJECT (throbber));
1048 }
1049 #endif
1050 }929 }
1051930
1052 return TRUE;931 return TRUE;
1053932
=== removed file 'midori/gtkiconentry.h'
--- midori/gtkiconentry.h 2012-11-18 15:48:46 +0000
+++ midori/gtkiconentry.h 1970-01-01 00:00:00 +0000
@@ -1,41 +0,0 @@
1/*
2 * Copyright (C) 2004-2006 Christian Hammond.
3 * Copyright (C) 2008 Cody Russell <bratsche@gnome.org>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21#ifndef __GTK_ICON_ENTRY_H__
22#define __GTK_ICON_ENTRY_H__
23
24#include <gio/gio.h>
25#include <gtk/gtk.h>
26
27G_BEGIN_DECLS
28
29 #define GtkIconEntryPosition GtkEntryIconPosition
30 #define GTK_ICON_ENTRY_PRIMARY GTK_ENTRY_ICON_PRIMARY
31 #define GTK_ICON_ENTRY_SECONDARY GTK_ENTRY_ICON_SECONDARY
32 #define GTK_ICON_ENTRY GTK_ENTRY
33 #define gtk_icon_entry_set_icon_from_stock gtk_entry_set_icon_from_stock
34 #define gtk_icon_entry_set_icon_from_icon_name gtk_entry_set_icon_from_icon_name
35
36 #define gtk_icon_entry_set_tooltip gtk_entry_set_icon_tooltip_text
37 #define gtk_icon_entry_set_icon_highlight gtk_entry_set_icon_activatable
38
39G_END_DECLS
40
41#endif /* __GTK_ICON_ENTRY_H__ */
420
=== modified file 'midori/main.c'
--- midori/main.c 2013-05-23 21:10:22 +0000
+++ midori/main.c 2013-06-21 20:53:25 +0000
@@ -39,36 +39,16 @@
39 g_free (uri);39 g_free (uri);
40}40}
4141
42#define HAVE_OFFSCREEN GTK_CHECK_VERSION (2, 20, 0)
43
44#ifndef HAVE_WEBKIT242#ifndef HAVE_WEBKIT2
45static void43static void
46snapshot_load_finished_cb (GtkWidget* web_view,44snapshot_load_finished_cb (GtkWidget* web_view,
47 WebKitWebFrame* web_frame,45 WebKitWebFrame* web_frame,
48 gchar* filename)46 gchar* filename)
49{47{
50 #if HAVE_OFFSCREEN
51 GdkPixbuf* pixbuf = gtk_offscreen_window_get_pixbuf (GTK_OFFSCREEN_WINDOW (48 GdkPixbuf* pixbuf = gtk_offscreen_window_get_pixbuf (GTK_OFFSCREEN_WINDOW (
52 gtk_widget_get_parent (web_view)));49 gtk_widget_get_parent (web_view)));
53 gdk_pixbuf_save (pixbuf, filename, "png", NULL, "compression", "7", NULL);50 gdk_pixbuf_save (pixbuf, filename, "png", NULL, "compression", "7", NULL);
54 g_object_unref (pixbuf);51 g_object_unref (pixbuf);
55 #else
56 GError* error;
57 GtkPrintOperation* operation = gtk_print_operation_new ();
58
59 gtk_print_operation_set_export_filename (operation, filename);
60 error = NULL;
61 webkit_web_frame_print_full (web_frame, operation,
62 GTK_PRINT_OPERATION_ACTION_EXPORT, &error);
63
64 if (error != NULL)
65 {
66 g_error ("%s", error->message);
67 gtk_main_quit ();
68 }
69
70 g_object_unref (operation);
71 #endif
72 g_print (_("Snapshot saved to: %s\n"), filename);52 g_print (_("Snapshot saved to: %s\n"), filename);
73 gtk_main_quit ();53 gtk_main_quit ();
74}54}
@@ -268,14 +248,10 @@
268 gchar* filename;248 gchar* filename;
269 GtkWidget* web_view;249 GtkWidget* web_view;
270 gchar* uri;250 gchar* uri;
271 #if HAVE_OFFSCREEN
272 GtkWidget* offscreen;251 GtkWidget* offscreen;
273 GdkScreen* screen;252 GdkScreen* screen;
274253
275 gint fd = g_file_open_tmp ("snapshot-XXXXXX.png", &filename, &error);254 gint fd = g_file_open_tmp ("snapshot-XXXXXX.png", &filename, &error);
276 #else
277 gint fd = g_file_open_tmp ("snapshot-XXXXXX.pdf", &filename, &error);
278 #endif
279 close (fd);255 close (fd);
280256
281 if (error)257 if (error)
@@ -291,7 +267,6 @@
291 }267 }
292268
293 web_view = webkit_web_view_new ();269 web_view = webkit_web_view_new ();
294 #if HAVE_OFFSCREEN
295 offscreen = gtk_offscreen_window_new ();270 offscreen = gtk_offscreen_window_new ();
296 gtk_container_add (GTK_CONTAINER (offscreen), web_view);271 gtk_container_add (GTK_CONTAINER (offscreen), web_view);
297 if ((screen = gdk_screen_get_default ()))272 if ((screen = gdk_screen_get_default ()))
@@ -300,7 +275,6 @@
300 else275 else
301 gtk_widget_set_size_request (web_view, 800, 600);276 gtk_widget_set_size_request (web_view, 800, 600);
302 gtk_widget_show_all (offscreen);277 gtk_widget_show_all (offscreen);
303 #endif
304 #ifndef HAVE_WEBKIT2278 #ifndef HAVE_WEBKIT2
305 g_signal_connect (web_view, "load-finished",279 g_signal_connect (web_view, "load-finished",
306 G_CALLBACK (snapshot_load_finished_cb), filename);280 G_CALLBACK (snapshot_load_finished_cb), filename);
307281
=== modified file 'midori/midori-browser.c'
--- midori/midori-browser.c 2013-06-21 19:21:07 +0000
+++ midori/midori-browser.c 2013-06-21 20:53:25 +0000
@@ -997,11 +997,7 @@
997 if (!is_folder)997 if (!is_folder)
998 {998 {
999 entry_uri = katze_uri_entry_new (999 entry_uri = katze_uri_entry_new (
1000 #if GTK_CHECK_VERSION (2, 20, 0)
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));
1002 #else
1003 NULL);
1004 #endif
1005 gtk_entry_set_activates_default (GTK_ENTRY (entry_uri), TRUE);1001 gtk_entry_set_activates_default (GTK_ENTRY (entry_uri), TRUE);
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));
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);
@@ -4689,32 +4685,6 @@
4689static const gchar* credits_artists[] =4685static const gchar* credits_artists[] =
4690 { "Nancy Runge <nancy@twotoasts.de>", NULL };4686 { "Nancy Runge <nancy@twotoasts.de>", NULL };
46914687
4692#if !GTK_CHECK_VERSION (2, 24, 0)
4693static void
4694_action_about_activate_link (GtkAboutDialog* about,
4695 const gchar* uri,
4696 gpointer user_data)
4697{
4698 MidoriBrowser* browser = MIDORI_BROWSER (user_data);
4699 GtkWidget* view = midori_browser_add_uri (browser, uri);
4700 midori_browser_set_current_tab (browser, view);
4701}
4702
4703static void
4704_action_about_activate_email (GtkAboutDialog* about,
4705 const gchar* uri,
4706 gpointer user_data)
4707{
4708 /* Some email clients need the 'mailto' to function properly */
4709 gchar* newuri = NULL;
4710 if (!g_str_has_prefix (uri, "mailto:"))
4711 newuri = g_strconcat ("mailto:", uri, NULL);
4712
4713 sokoke_show_uri (NULL, newuri ? newuri : uri, GDK_CURRENT_TIME, NULL);
4714 g_free (newuri);
4715}
4716#endif
4717
4718static gchar*4688static gchar*
4719midori_browser_get_docs (gboolean error)4689midori_browser_get_docs (gboolean error)
4720{4690{
@@ -4748,10 +4718,6 @@
4748 "License as published by the Free Software Foundation; either "4718 "License as published by the Free Software Foundation; either "
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.");
47504720
4751#if !GTK_CHECK_VERSION (2, 24, 0)
4752 gtk_about_dialog_set_email_hook (_action_about_activate_email, NULL, NULL);
4753 gtk_about_dialog_set_url_hook (_action_about_activate_link, browser, NULL);
4754#endif
4755#ifdef HAVE_GRANITE4721#ifdef HAVE_GRANITE
4756 gchar* docs = midori_browser_get_docs (FALSE);4722 gchar* docs = midori_browser_get_docs (FALSE);
4757 /* Avoid granite_widgets_show_about_dialog for invalid memory and crashes */4723 /* Avoid granite_widgets_show_about_dialog for invalid memory and crashes */
@@ -6358,29 +6324,8 @@
63586324
6359 /* Statusbar */6325 /* Statusbar */
6360 browser->statusbar = gtk_statusbar_new ();6326 browser->statusbar = gtk_statusbar_new ();
6361 #if GTK_CHECK_VERSION (2, 20, 0)
6362 browser->statusbar_contents =6327 browser->statusbar_contents =
6363 gtk_statusbar_get_message_area (GTK_STATUSBAR (browser->statusbar));6328 gtk_statusbar_get_message_area (GTK_STATUSBAR (browser->statusbar));
6364 #else
6365 /* Rearrange the statusbar packing. This is necessariy to keep
6366 themes happy while there is no support from GtkStatusbar. */
6367 forward = GTK_STATUSBAR (browser->statusbar)->label;
6368 if (GTK_IS_BOX (gtk_widget_get_parent (forward)))
6369 browser->statusbar_contents = gtk_widget_get_parent (forward);
6370 else
6371 {
6372 browser->statusbar_contents = gtk_hbox_new (FALSE, 4);
6373 gtk_widget_show (browser->statusbar_contents);
6374 g_object_ref (GTK_STATUSBAR (browser->statusbar)->label);
6375 gtk_container_remove (
6376 GTK_CONTAINER (GTK_STATUSBAR (browser->statusbar)->frame), forward);
6377 gtk_box_pack_start (GTK_BOX (browser->statusbar_contents),
6378 forward, TRUE, TRUE, 0);
6379 g_object_unref (forward);
6380 gtk_container_add (GTK_CONTAINER (GTK_STATUSBAR (browser->statusbar)->frame),
6381 browser->statusbar_contents);
6382 }
6383 #endif
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);
63856330
6386 g_signal_connect (browser->statusbar, "button-press-event",6331 g_signal_connect (browser->statusbar, "button-press-event",
63876332
=== modified file 'midori/midori-locationaction.c'
--- midori/midori-locationaction.c 2013-05-21 16:08:19 +0000
+++ midori/midori-locationaction.c 2013-06-21 20:53:25 +0000
@@ -945,10 +945,10 @@
945 #if GTK_CHECK_VERSION (3, 6, 0)945 #if GTK_CHECK_VERSION (3, 6, 0)
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);
947 #endif947 #endif
948 gtk_icon_entry_set_icon_highlight (GTK_ICON_ENTRY (entry),948 gtk_entry_set_icon_activatable (GTK_ENTRY (entry),
949 GTK_ICON_ENTRY_PRIMARY, TRUE);949 GTK_ENTRY_ICON_PRIMARY, TRUE);
950 gtk_icon_entry_set_icon_highlight (GTK_ICON_ENTRY (entry),950 gtk_entry_set_icon_activatable (GTK_ENTRY (entry),
951 GTK_ICON_ENTRY_SECONDARY, TRUE);951 GTK_ENTRY_ICON_SECONDARY, TRUE);
952952
953 targetlist = gtk_target_list_new (NULL, 0);953 targetlist = gtk_target_list_new (NULL, 0);
954 gtk_target_list_add_uri_targets (targetlist, 0);954 gtk_target_list_add_uri_targets (targetlist, 0);
@@ -1235,7 +1235,6 @@
1235 return FALSE;1235 return FALSE;
1236}1236}
12371237
1238#if GTK_CHECK_VERSION (2, 19, 3)
1239static void1238static void
1240midori_location_action_preedit_changed_cb (GtkWidget* entry,1239midori_location_action_preedit_changed_cb (GtkWidget* entry,
1241 const gchar* preedit,1240 const gchar* preedit,
@@ -1245,7 +1244,6 @@
1245 gchar* key = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry)));1244 gchar* key = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry)));
1246 midori_location_action_popup_completion (location_action, entry, key);1245 midori_location_action_popup_completion (location_action, entry, key);
1247}1246}
1248#endif
12491247
1250static gboolean1248static gboolean
1251midori_location_action_focus_in_event_cb (GtkWidget* widget,1249midori_location_action_focus_in_event_cb (GtkWidget* widget,
@@ -1450,10 +1448,10 @@
1450 /* The dialog should "toggle" like a menu, as far as users go1448 /* The dialog should "toggle" like a menu, as far as users go
1451 FIXME: Half-working: the dialog closes but re-opens */1449 FIXME: Half-working: the dialog closes but re-opens */
1452 static GtkWidget* dialog = NULL;1450 static GtkWidget* dialog = NULL;
1453 if (icon_pos == GTK_ICON_ENTRY_PRIMARY && dialog != NULL)1451 if (icon_pos == GTK_ENTRY_ICON_PRIMARY && dialog != NULL)
1454 gtk_widget_destroy (dialog);1452 gtk_widget_destroy (dialog);
14551453
1456 if (icon_pos == GTK_ICON_ENTRY_PRIMARY)1454 if (icon_pos == GTK_ENTRY_ICON_PRIMARY)
1457 {1455 {
1458 /* No "security" window for blank pages */1456 /* No "security" window for blank pages */
1459 if (midori_uri_is_blank (MIDORI_LOCATION_ACTION (action)->text))1457 if (midori_uri_is_blank (MIDORI_LOCATION_ACTION (action)->text))
@@ -1501,7 +1499,7 @@
1501 g_signal_connect (dialog, "destroy", G_CALLBACK (gtk_widget_destroyed), &dialog);1499 g_signal_connect (dialog, "destroy", G_CALLBACK (gtk_widget_destroyed), &dialog);
1502 gtk_widget_show_all (dialog);1500 gtk_widget_show_all (dialog);
1503 }1501 }
1504 if (icon_pos == GTK_ICON_ENTRY_SECONDARY)1502 if (icon_pos == GTK_ENTRY_ICON_SECONDARY)
1505 {1503 {
1506 gboolean result;1504 gboolean result;
1507 g_signal_emit (action, signals[SECONDARY_ICON_RELEASED], 0,1505 g_signal_emit (action, signals[SECONDARY_ICON_RELEASED], 0,
@@ -1578,10 +1576,8 @@
1578 midori_location_action_button_press_event_cb, action,1576 midori_location_action_button_press_event_cb, action,
1579 "signal::key-press-event",1577 "signal::key-press-event",
1580 midori_location_action_key_press_event_cb, action,1578 midori_location_action_key_press_event_cb, action,
1581 #if GTK_CHECK_VERSION (2, 19, 3)
1582 "signal-after::preedit-changed",1579 "signal-after::preedit-changed",
1583 midori_location_action_preedit_changed_cb, action,1580 midori_location_action_preedit_changed_cb, action,
1584 #endif
1585 "signal::focus-in-event",1581 "signal::focus-in-event",
1586 midori_location_action_focus_in_event_cb, action,1582 midori_location_action_focus_in_event_cb, action,
1587 "signal::focus-out-event",1583 "signal::focus-out-event",
@@ -1735,11 +1731,11 @@
1735 {1731 {
1736 GtkWidget* entry = midori_location_action_entry_for_proxy (proxies->data);1732 GtkWidget* entry = midori_location_action_entry_for_proxy (proxies->data);
1737 if (stock_id && gtk_stock_lookup (stock_id, &stock_item))1733 if (stock_id && gtk_stock_lookup (stock_id, &stock_item))
1738 gtk_icon_entry_set_icon_from_stock (GTK_ICON_ENTRY (entry),1734 gtk_entry_set_icon_from_stock (GTK_ENTRY (entry),
1739 GTK_ICON_ENTRY_SECONDARY, stock_id);1735 GTK_ENTRY_ICON_SECONDARY, stock_id);
1740 else1736 else
1741 gtk_icon_entry_set_icon_from_icon_name (GTK_ICON_ENTRY (entry),1737 gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry),
1742 GTK_ICON_ENTRY_SECONDARY, stock_id);1738 GTK_ENTRY_ICON_SECONDARY, stock_id);
1743 }1739 }
1744}1740}
17451741
@@ -1768,8 +1764,8 @@
1768 if (GTK_IS_TOOL_ITEM (proxies->data))1764 if (GTK_IS_TOOL_ITEM (proxies->data))
1769 {1765 {
1770 GtkWidget* entry = midori_location_action_entry_for_proxy (proxies->data);1766 GtkWidget* entry = midori_location_action_entry_for_proxy (proxies->data);
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);
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);
1773 }1769 }
1774}1770}
17751771
17761772
=== modified file 'midori/midori-platform.h'
--- midori/midori-platform.h 2013-05-19 09:33:02 +0000
+++ midori/midori-platform.h 2013-06-21 20:53:25 +0000
@@ -14,7 +14,6 @@
1414
15#include "midori/midori-stock.h"15#include "midori/midori-stock.h"
16#include "katze/gtk3-compat.h"16#include "katze/gtk3-compat.h"
17#include "midori/gtkiconentry.h"
18#include "midori/sokoke.h"17#include "midori/sokoke.h"
1918
20/* Common behavior modifiers */19/* Common behavior modifiers */
2120
=== modified file 'midori/midori-searchaction.c'
--- midori/midori-searchaction.c 2013-06-19 20:27:53 +0000
+++ midori/midori-searchaction.c 2013-06-21 20:53:25 +0000
@@ -312,8 +312,8 @@
312312
313 toolitem = GTK_WIDGET (gtk_tool_item_new ());313 toolitem = GTK_WIDGET (gtk_tool_item_new ());
314 entry = sokoke_search_entry_new (NULL);314 entry = sokoke_search_entry_new (NULL);
315 gtk_icon_entry_set_icon_highlight (GTK_ICON_ENTRY (entry),315 gtk_entry_set_icon_activatable (GTK_ENTRY (entry),
316 GTK_ICON_ENTRY_PRIMARY, TRUE);316 GTK_ENTRY_ICON_PRIMARY, TRUE);
317 alignment = gtk_alignment_new (0, 0.5, 1, 0.1);317 alignment = gtk_alignment_new (0, 0.5, 1, 0.1);
318 gtk_container_add (GTK_CONTAINER (alignment), entry);318 gtk_container_add (GTK_CONTAINER (alignment), entry);
319 gtk_widget_show (entry);319 gtk_widget_show (entry);
@@ -402,7 +402,7 @@
402402
403static void403static void
404midori_search_action_icon_released_cb (GtkWidget* entry,404midori_search_action_icon_released_cb (GtkWidget* entry,
405 GtkIconEntryPosition icon_pos,405 GtkEntryIconPosition icon_pos,
406 gint button,406 gint button,
407 GtkAction* action)407 GtkAction* action)
408{408{
@@ -413,7 +413,7 @@
413 GdkPixbuf* icon;413 GdkPixbuf* icon;
414 GtkWidget* image;414 GtkWidget* image;
415415
416 if (icon_pos == GTK_ICON_ENTRY_SECONDARY)416 if (icon_pos == GTK_ENTRY_ICON_SECONDARY)
417 return;417 return;
418418
419 search_engines = MIDORI_SEARCH_ACTION (action)->search_engines;419 search_engines = MIDORI_SEARCH_ACTION (action)->search_engines;
@@ -502,16 +502,16 @@
502 icon_name = "edit-find-option";502 icon_name = "edit-find-option";
503 else503 else
504 icon_name = STOCK_EDIT_FIND;504 icon_name = STOCK_EDIT_FIND;
505 gtk_icon_entry_set_icon_from_icon_name (GTK_ICON_ENTRY (entry),505 gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry),
506 GTK_ICON_ENTRY_PRIMARY, icon_name);506 GTK_ENTRY_ICON_PRIMARY, icon_name);
507 }507 }
508 gtk_entry_set_placeholder_text (GTK_ENTRY (entry),508 gtk_entry_set_placeholder_text (GTK_ENTRY (entry),
509 katze_item_get_name (search_action->current_item));509 katze_item_get_name (search_action->current_item));
510 }510 }
511 else511 else
512 {512 {
513 gtk_icon_entry_set_icon_from_stock (GTK_ICON_ENTRY (entry),513 gtk_entry_set_icon_from_stock (GTK_ENTRY (entry),
514 GTK_ICON_ENTRY_PRIMARY,514 GTK_ENTRY_ICON_PRIMARY,
515 GTK_STOCK_FIND);515 GTK_STOCK_FIND);
516 gtk_entry_set_placeholder_text (GTK_ENTRY (entry), "");516 gtk_entry_set_placeholder_text (GTK_ENTRY (entry), "");
517 }517 }
@@ -1102,11 +1102,7 @@
1102 gtk_size_group_add_widget (sizegroup, label);1102 gtk_size_group_add_widget (sizegroup, label);
1103 gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);1103 gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
1104 entry_uri = katze_uri_entry_new (1104 entry_uri = katze_uri_entry_new (
1105 #if GTK_CHECK_VERSION (2, 20, 0)
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));
1107 #else
1108 NULL);
1109 #endif
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);
1111 gtk_entry_set_activates_default (GTK_ENTRY (entry_uri), TRUE);1107 gtk_entry_set_activates_default (GTK_ENTRY (entry_uri), TRUE);
1112 gtk_entry_set_text (GTK_ENTRY (entry_uri),1108 gtk_entry_set_text (GTK_ENTRY (entry_uri),
11131109
=== modified file 'midori/midori-speeddial.vala'
--- midori/midori-speeddial.vala 2013-05-19 09:33:02 +0000
+++ midori/midori-speeddial.vala 2013-06-21 20:53:25 +0000
@@ -339,14 +339,9 @@
339 return;339 return;
340340
341 return_if_fail (spec != null);341 return_if_fail (spec != null);
342 #if HAVE_OFFSCREEN
343 var img = (thumb_view.parent as Gtk.OffscreenWindow).get_pixbuf ();342 var img = (thumb_view.parent as Gtk.OffscreenWindow).get_pixbuf ();
344 var pixbuf_scaled = img.scale_simple (240, 160, Gdk.InterpType.TILES);343 var pixbuf_scaled = img.scale_simple (240, 160, Gdk.InterpType.TILES);
345 img = pixbuf_scaled;344 img = pixbuf_scaled;
346 #else
347 thumb_view.realize ();
348 var img = midori_view_web_view_get_snapshot (thumb_view, 240, 160);
349 #endif
350 unowned string title = thumb_view.get_title ();345 unowned string title = thumb_view.get_title ();
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);
352347
@@ -373,22 +368,10 @@
373 if (settings.get_class ().find_property ("enable-java-applet") != null)368 if (settings.get_class ().find_property ("enable-java-applet") != null)
374 settings.set ("enable-java-applet", false);369 settings.set ("enable-java-applet", false);
375 thumb_view.settings = settings;370 thumb_view.settings = settings;
376 #if HAVE_OFFSCREEN
377 var offscreen = new Gtk.OffscreenWindow ();371 var offscreen = new Gtk.OffscreenWindow ();
378 offscreen.add (thumb_view);372 offscreen.add (thumb_view);
379 thumb_view.set_size_request (800, 600);373 thumb_view.set_size_request (800, 600);
380 offscreen.show_all ();374 offscreen.show_all ();
381 #else
382 /* What we are doing here is a bit of a hack. In order to render a
383 thumbnail we need a new view and load the url in it. But it has
384 to be visible and packed in a container. So we secretly pack it
385 into the notebook of the parent browser. */
386 notebook.add (thumb_view);
387 thumb_view.destroy.connect (Gtk.widget_destroyed);
388 /* We use an empty label. It's not invisible but hard to spot. */
389 notebook.set_tab_label (thumb_view, new Gtk.EventBox ());
390 thumb_view.show ();
391 #endif
392 }375 }
393376
394 thumb_queue.append (new Spec (dial_id, uri));377 thumb_queue.append (new Spec (dial_id, uri));
395378
=== modified file 'midori/midori-view.c'
--- midori/midori-view.c 2013-06-19 21:00:46 +0000
+++ midori/midori-view.c 2013-06-21 20:53:25 +0000
@@ -969,9 +969,6 @@
969 }969 }
970}970}
971971
972#define HAVE_GTK_INFO_BAR GTK_CHECK_VERSION (2, 18, 0)
973
974#if HAVE_GTK_INFO_BAR
975static void972static void
976midori_view_infobar_response_cb (GtkWidget* infobar,973midori_view_infobar_response_cb (GtkWidget* infobar,
977 gint response,974 gint response,
@@ -983,20 +980,6 @@
983 response_cb (infobar, response, data_object);980 response_cb (infobar, response, data_object);
984 gtk_widget_destroy (infobar);981 gtk_widget_destroy (infobar);
985}982}
986#else
987static void
988midori_view_info_bar_button_cb (GtkWidget* button,
989 gpointer data_object)
990{
991 GtkWidget* infobar = gtk_widget_get_parent (gtk_widget_get_parent (button));
992 gint response = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (button), "midori-infobar-response"));
993 void (*response_cb) (GtkWidget*, gint, gpointer);
994 response_cb = g_object_get_data (G_OBJECT (infobar), "midori-infobar-cb");
995 if (response_cb != NULL)
996 response_cb (infobar, response, data_object);
997 gtk_widget_destroy (infobar);
998}
999#endif
1000983
1001/**984/**
1002 * midori_view_add_info_bar985 * midori_view_add_info_bar
@@ -1037,7 +1020,6 @@
10371020
1038 va_start (args, first_button_text);1021 va_start (args, first_button_text);
10391022
1040 #if HAVE_GTK_INFO_BAR
1041 infobar = gtk_info_bar_new ();1023 infobar = gtk_info_bar_new ();
1042 for (button_text = first_button_text; button_text;1024 for (button_text = first_button_text; button_text;
1043 button_text = va_arg (args, const gchar*))1025 button_text = va_arg (args, const gchar*))
@@ -1053,29 +1035,6 @@
1053 GTK_ORIENTATION_HORIZONTAL);1035 GTK_ORIENTATION_HORIZONTAL);
1054 g_signal_connect (infobar, "response",1036 g_signal_connect (infobar, "response",
1055 G_CALLBACK (midori_view_infobar_response_cb), data_object);1037 G_CALLBACK (midori_view_infobar_response_cb), data_object);
1056 #else
1057 infobar = gtk_hbox_new (FALSE, 0);
1058 gtk_container_set_border_width (GTK_CONTAINER (infobar), 4);
1059
1060 content_area = gtk_hbox_new (FALSE, 0);
1061 gtk_box_pack_start (GTK_BOX (infobar), content_area, TRUE, TRUE, 0);
1062 action_area = gtk_hbutton_box_new ();
1063 for (button_text = first_button_text; button_text;
1064 button_text = va_arg (args, const gchar*))
1065 {
1066 gint response_id = va_arg (args, gint);
1067 GtkWidget* button = gtk_button_new_with_mnemonic (button_text);
1068 g_object_set_data (G_OBJECT (button), "midori-infobar-response",
1069 GINT_TO_POINTER (response_id));
1070 g_signal_connect (button, "clicked",
1071 G_CALLBACK (midori_view_info_bar_button_cb), data_object);
1072 gtk_box_pack_start (GTK_BOX (action_area), button, FALSE, FALSE, 0);
1073 if (response_id == GTK_RESPONSE_HELP)
1074 gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (action_area),
1075 button, TRUE);
1076 }
1077 gtk_box_pack_start (GTK_BOX (infobar), action_area, FALSE, FALSE, 0);
1078 #endif
10791038
1080 va_end (args);1039 va_end (args);
1081 label = gtk_label_new (message);1040 label = gtk_label_new (message);
@@ -5383,9 +5342,7 @@
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));
5384 GtkPrintOperation* operation = gtk_print_operation_new ();5343 GtkPrintOperation* operation = gtk_print_operation_new ();
5385 gtk_print_operation_set_custom_tab_label (operation, _("Features"));5344 gtk_print_operation_set_custom_tab_label (operation, _("Features"));
5386 #if GTK_CHECK_VERSION (2, 18, 0)
5387 gtk_print_operation_set_embed_page_setup (operation, TRUE);5345 gtk_print_operation_set_embed_page_setup (operation, TRUE);
5388 #endif
5389 g_signal_connect (operation, "create-custom-widget",5346 g_signal_connect (operation, "create-custom-widget",
5390 G_CALLBACK (midori_view_print_create_custom_widget_cb), view);5347 G_CALLBACK (midori_view_print_create_custom_widget_cb), view);
5391 GError* error = NULL;5348 GError* error = NULL;
53925349
=== modified file 'midori/sokoke.c'
--- midori/sokoke.c 2013-05-27 00:00:58 +0000
+++ midori/sokoke.c 2013-06-21 20:53:25 +0000
@@ -1096,9 +1096,8 @@
1096 const gchar* text = gtk_entry_get_text (entry);1096 const gchar* text = gtk_entry_get_text (entry);
1097 gboolean visible = text && *text1097 gboolean visible = text && *text
1098 && ! sokoke_entry_has_placeholder_text (entry);1098 && ! sokoke_entry_has_placeholder_text (entry);
1099 gtk_icon_entry_set_icon_from_stock (1099 gtk_entry_set_icon_from_stock (
1100 GTK_ICON_ENTRY (entry),1100 entry, GTK_ENTRY_ICON_SECONDARY,
1101 GTK_ICON_ENTRY_SECONDARY,
1102 visible ? GTK_STOCK_CLEAR : NULL);1101 visible ? GTK_STOCK_CLEAR : NULL);
1103}1102}
11041103
@@ -1113,11 +1112,11 @@
11131112
1114static void1113static void
1115sokoke_entry_icon_released_cb (GtkEntry* entry,1114sokoke_entry_icon_released_cb (GtkEntry* entry,
1116 GtkIconEntryPosition icon_pos,1115 GtkEntryIconPosition icon_pos,
1117 GdkEvent* event,1116 GdkEvent* event,
1118 gpointer user_data)1117 gpointer user_data)
1119{1118{
1120 if (icon_pos != GTK_ICON_ENTRY_SECONDARY)1119 if (icon_pos != GTK_ENTRY_ICON_SECONDARY)
1121 return;1120 return;
11221121
1123 gtk_entry_set_text (entry, "");1122 gtk_entry_set_text (entry, "");
@@ -1131,7 +1130,7 @@
1131 gtk_entry_set_placeholder_text (GTK_ENTRY (entry), placeholder_text);1130 gtk_entry_set_placeholder_text (GTK_ENTRY (entry), placeholder_text);
1132 gtk_entry_set_icon_from_stock (GTK_ENTRY (entry),1131 gtk_entry_set_icon_from_stock (GTK_ENTRY (entry),
1133 GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_FIND);1132 GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_FIND);
1134 gtk_icon_entry_set_icon_highlight (GTK_ENTRY (entry),1133 gtk_entry_set_icon_activatable (GTK_ENTRY (entry),
1135 GTK_ENTRY_ICON_SECONDARY, TRUE);1134 GTK_ENTRY_ICON_SECONDARY, TRUE);
1136 {1135 {
1137 g_object_connect (entry,1136 g_object_connect (entry,
11381137
=== modified file 'toolbars/midori-findbar.c'
--- toolbars/midori-findbar.c 2012-10-10 22:25:05 +0000
+++ toolbars/midori-findbar.c 2013-06-21 20:53:25 +0000
@@ -46,7 +46,7 @@
4646
47static void47static void
48midori_findbar_set_icon (MidoriFindbar* findbar,48midori_findbar_set_icon (MidoriFindbar* findbar,
49 GtkIconEntryPosition icon_pos,49 GtkEntryIconPosition icon_pos,
50 const gchar* icon_name)50 const gchar* icon_name)
51{51{
52 if (icon_name != NULL)52 if (icon_name != NULL)
@@ -57,7 +57,7 @@
57 g_free (symbolic_icon_name);57 g_free (symbolic_icon_name);
58 }58 }
59 else59 else
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),
61 icon_pos, NULL);61 icon_pos, NULL);
62}62}
6363
@@ -146,7 +146,7 @@
146 gtk_widget_grab_focus (GTK_WIDGET (findbar->find_text));146 gtk_widget_grab_focus (GTK_WIDGET (findbar->find_text));
147 else147 else
148 {148 {
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);
150 gtk_widget_show (GTK_WIDGET (findbar->find_case));150 gtk_widget_show (GTK_WIDGET (findbar->find_case));
151 gtk_widget_show (GTK_WIDGET (findbar->find_close));151 gtk_widget_show (GTK_WIDGET (findbar->find_close));
152 if (selected_text != NULL)152 if (selected_text != NULL)
@@ -188,11 +188,11 @@
188 if (g_utf8_strlen (preedit, -1) >= 1)188 if (g_utf8_strlen (preedit, -1) >= 1)
189 {189 {
190 gboolean case_sensitive = midori_findbar_case_sensitive (findbar);190 gboolean case_sensitive = midori_findbar_case_sensitive (findbar);
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);
192 midori_tab_find (MIDORI_TAB (view), preedit, case_sensitive, TRUE);192 midori_tab_find (MIDORI_TAB (view), preedit, case_sensitive, TRUE);
193 }193 }
194 else194 else
195 midori_findbar_set_icon (findbar, GTK_ICON_ENTRY_SECONDARY, NULL);195 midori_findbar_set_icon (findbar, GTK_ENTRY_ICON_SECONDARY, NULL);
196}196}
197197
198static void198static void
@@ -292,7 +292,7 @@
292 const gchar* text;292 const gchar* text;
293 gboolean case_sensitive;293 gboolean case_sensitive;
294294
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);
296296
297 if (typing)297 if (typing)
298 {298 {
299299
=== modified file 'wscript'
--- wscript 2013-06-17 17:53:51 +0000
+++ wscript 2013-06-21 20:53:25 +0000
@@ -263,7 +263,7 @@
263 conf.env.append_value ('VALAFLAGS', '-D HAVE_OFFSCREEN')263 conf.env.append_value ('VALAFLAGS', '-D HAVE_OFFSCREEN')
264 conf.env.append_value ('VALAFLAGS', '-D HAVE_DOM')264 conf.env.append_value ('VALAFLAGS', '-D HAVE_DOM')
265 else:265 else:
266 check_pkg ('gtk+-2.0', '2.16.0', var='GTK')266 check_pkg ('gtk+-2.0', '2.24.0', var='GTK')
267 check_pkg ('webkit-1.0', '1.8.3', args=args)267 check_pkg ('webkit-1.0', '1.8.3', args=args)
268 conf.define ('GCR_VERSION', 'No')268 conf.define ('GCR_VERSION', 'No')
269 check_pkg ('javascriptcoregtk-1.0', '1.8.3', args=args)269 check_pkg ('javascriptcoregtk-1.0', '1.8.3', args=args)

Subscribers

People subscribed via source and target branches

to all changes: