[Xfce4-commits] orage:master l10n: Updates to Japanese (ja) translation

2010-01-01 Thread Transifex
Updating branch refs/heads/master
 to e1a57cd7f83f43ccdbbcc50b92220a0c82dea7de (commit)
   from 7917885e5f7b5b23091ba4941a9fb12e559368bc (commit)

commit e1a57cd7f83f43ccdbbcc50b92220a0c82dea7de
Author: Masato Hashimoto cabezon.hashim...@gmail.com
Date:   Fri Jan 1 08:11:14 2010 +

l10n: Updates to Japanese (ja) translation

Transmitted-via: Transifex (translations.xfce.org)

 po/ja.po |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/po/ja.po b/po/ja.po
index 6ee1e7b..f31da84 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -14,8 +14,8 @@ msgid 
 msgstr 
 Project-Id-Version: orage 4.5.9.6\n
 Report-Msgid-Bugs-To: \n
-POT-Creation-Date: 2009-12-31 14:43+0900\n
-PO-Revision-Date: 2009-12-31 14:42+0900\n
+POT-Creation-Date: 2010-01-01 17:05+0900\n
+PO-Revision-Date: 2010-01-01 17:05+0900\n
 Last-Translator: Masato Hashimoto cabezon.hashim...@gmail.com\n
 Language-Team: Japanese xfce-users...@ml.fdiary.net\n
 MIME-Version: 1.0\n
@@ -319,12 +319,12 @@ msgstr %d 分
 #: ../globaltime/timezone_selection.c:169
 #: ../panel-plugin/timezone_selection.c:169 ../src/timezone_selection.c:180
 msgid backward
-msgstr 
+msgstr -
 
 #: ../globaltime/timezone_selection.c:172
 #: ../panel-plugin/timezone_selection.c:172 ../src/timezone_selection.c:183
 msgid forward
-msgstr 
+msgstr +
 
 # Summer time shift - previous
 #: ../globaltime/timezone_selection.c:196
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-dict:master Require xfce4-dev-tools 4.7.1 or newer for autogen.sh

2010-01-01 Thread Enrico Tröger
Updating branch refs/heads/master
 to 6192f807377f95450a3544c70274f4281651452e (commit)
   from 280bc46d068ceb30dd77b9c25b2f9c7a175fbe16 (commit)

commit 6192f807377f95450a3544c70274f4281651452e
Author: Enrico Tröger enrico.troe...@uvena.de
Date:   Fri Jan 1 16:02:38 2010 +0100

Require xfce4-dev-tools 4.7.1 or newer for autogen.sh

While at it, remove some useless code

 autogen.sh |   11 ++-
 1 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index 3321745..5564b30 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,8 +1,6 @@
 #!/bin/sh
 #
-# $Id$
-#
-# Copyright (c) 2002-2005
+# Copyright (c) 2002-2010
 # The Xfce development team. All rights reserved.
 #
 # Written for Xfce by Benedikt Meurer be...@xfce.org.
@@ -21,9 +19,4 @@ EOF
   exit 1
 }
 
-echo 'dnl *** This file is autogenerated.  Do not edit. ***' configure.ac
-echo configure.ac
-
-exec xdt-autogen $@
-
-# vi:set ts=2 sw=2 et ai:
+XDT_AUTOGEN_REQUIRED_VERSION=4.7.1 xdt-autogen $@
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Disable 'inline' completion, it causes a huge extra matching overhead

2010-01-01 Thread Christian Dywan
Updating branch refs/heads/master
 to 3aff0a34d0cadb99cb5db1e2912041bd5e672376 (commit)
   from 8039785073aaac784ae1917db2a46e9cb86190cb (commit)

commit 3aff0a34d0cadb99cb5db1e2912041bd5e672376
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri Jan 1 21:53:28 2010 +0100

Disable 'inline' completion, it causes a huge extra matching overhead

 midori/midori-locationaction.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c
index 73fe6af..a558997 100644
--- a/midori/midori-locationaction.c
+++ b/midori/midori-locationaction.c
@@ -1018,7 +1018,6 @@ midori_location_action_completion_init 
(MidoriLocationAction* location_action,
 ? NULL : location_action-model);
 
 gtk_entry_completion_set_text_column (completion, URI_COL);
-gtk_entry_completion_set_inline_completion (completion, TRUE);
 #if GTK_CHECK_VERSION (2, 12, 0)
 gtk_entry_completion_set_inline_selection (completion, TRUE);
 #endif
@@ -1040,7 +1039,6 @@ midori_location_action_completion_init 
(MidoriLocationAction* location_action,
 gtk_entry_completion_set_match_func (completion,
 midori_location_entry_completion_match_cb, NULL, NULL);
 
-
 g_signal_connect (completion, match-selected,
 G_CALLBACK (midori_location_entry_match_selected_cb), location_action);
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Store searches with tokens in the completion as a distinct item

2010-01-01 Thread Christian Dywan
Updating branch refs/heads/master
 to 311a5a8a1b767c36274e44819fd3a9f3ec69ce41 (commit)
   from 3aff0a34d0cadb99cb5db1e2912041bd5e672376 (commit)

commit 311a5a8a1b767c36274e44819fd3a9f3ec69ce41
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri Jan 1 22:47:24 2010 +0100

Store searches with tokens in the completion as a distinct item

Currently searches won't be stored persistently in the database.

 midori/main.c   |2 +-
 midori/midori-app.c |2 +-
 midori/midori-browser.c |   34 --
 midori/midori-view.c|4 ++--
 midori/sokoke.c |8 +++-
 midori/sokoke.h |3 ++-
 tests/magic-uri.c   |2 +-
 7 files changed, 46 insertions(+), 9 deletions(-)

diff --git a/midori/main.c b/midori/main.c
index d747282..077bc6a 100644
--- a/midori/main.c
+++ b/midori/main.c
@@ -2035,7 +2035,7 @@ main (intargc,
 g_free (current_dir);
 }
 else
-uri_ready = sokoke_magic_uri (uri, NULL);
+uri_ready = sokoke_magic_uri (uri, NULL, NULL);
 katze_item_set_uri (item, uri_ready);
 g_free (uri_ready);
 katze_array_add_item (_session, item);
diff --git a/midori/midori-app.c b/midori/midori-app.c
index 0574259..c1df59e 100644
--- a/midori/midori-app.c
+++ b/midori/midori-app.c
@@ -454,7 +454,7 @@ midori_app_command_received (MidoriApp*   app,
 first = (open_external_pages_in == MIDORI_NEW_PAGE_CURRENT);
 while (*uris)
 {
-gchar* fixed_uri = sokoke_magic_uri (*uris, NULL);
+gchar* fixed_uri = sokoke_magic_uri (*uris, NULL, NULL);
 if (first)
 {
 midori_browser_set_current_uri (browser, fixed_uri);
diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 13f0696..62667db 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -198,6 +198,11 @@ static void
 midori_browser_add_download_item (MidoriBrowser*  browser,
   WebKitDownload* download);
 
+GdkPixbuf*
+midori_search_action_get_icon (KatzeItem*item,
+   GtkWidget*widget,
+   const gchar** icon_name);
+
 static GtkAction*
 _action_by_name (MidoriBrowser* browser,
  const gchar*   name)
@@ -2918,7 +2923,7 @@ midori_browser_open_bookmark (MidoriBrowser* browser,
 return;
 
 /* Imported bookmarks may lack a protocol */
-uri_fixed = sokoke_magic_uri (uri, NULL);
+uri_fixed = sokoke_magic_uri (uri, NULL, NULL);
 
 /* FIXME: Use the same binary that is running right now */
 if (katze_item_get_meta_integer (item, app) != -1)
@@ -3707,6 +3712,8 @@ _action_location_reset_uri (GtkAction* action,
 midori_location_action_set_uri (MIDORI_LOCATION_ACTION (action), uri);
 }
 
+
+
 static void
 _action_location_submit_uri (GtkAction* action,
  const gchar*   uri,
@@ -3715,15 +3722,38 @@ _action_location_submit_uri (GtkAction* action,
 {
 gchar* stripped_uri;
 gchar* new_uri;
+KatzeItem* item;
 gint n;
 
 stripped_uri = g_strdup (uri);
 g_strstrip (stripped_uri);
-new_uri = sokoke_magic_uri (stripped_uri, browser-search_engines);
+item = NULL;
+new_uri = sokoke_magic_uri (stripped_uri, browser-search_engines, item);
 if (!new_uri)
 new_uri = sokoke_search_uri (browser-location_entry_search, 
stripped_uri);
 g_free (stripped_uri);
 
+if (item)
+{
+gchar* title;
+GdkPixbuf* icon;
+const gchar* icon_name;
+
+title = g_strdup_printf (_(Search with %s), katze_item_get_name 
(item));
+icon = midori_search_action_get_icon (item, GTK_WIDGET (browser), 
icon_name);
+if (!icon)
+{
+GdkScreen* screen = gtk_widget_get_screen (GTK_WIDGET (browser));
+GtkIconTheme* icon_theme = gtk_icon_theme_get_for_screen (screen);
+icon = gtk_icon_theme_load_icon (icon_theme, icon_name, 16, 0, 
NULL);
+}
+midori_location_action_add_item (MIDORI_LOCATION_ACTION (action),
+ uri, icon, title);
+if (icon)
+g_object_unref (icon);
+g_free (title);
+}
+
 if (new_tab)
 {
 n = midori_browser_add_uri (browser, new_uri);
diff --git a/midori/midori-view.c b/midori/midori-view.c
index 4abd75c..5a2e43d 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -1303,7 +1303,7 @@ gtk_widget_button_press_event_cb (WebKitWebView*  
web_view,
 while (uri[i++] != '\0')
 if (uri[i] == '\n' || uri[i] == '\r')
 uri[i] = ' ';
-new_uri = sokoke_magic_uri (g_strstrip (uri), empty_array);
+new_uri = sokoke_magic_uri (g_strstrip (uri), empty_array, 
NULL);
 

[Xfce4-commits] midori:master Merge compat.h into sokoke and remove gtk_show_uri implementation

2010-01-01 Thread Christian Dywan
Updating branch refs/heads/master
 to 578f74a30820dcbc5c8eb2f2d6793b46ec0deaea (commit)
   from 2f202f8020b1de16d60081e89dd6813370585f42 (commit)

commit 578f74a30820dcbc5c8eb2f2d6793b46ec0deaea
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri Jan 1 23:24:03 2010 +0100

Merge compat.h into sokoke and remove gtk_show_uri implementation

 midori/compat.c |   67 ---
 midori/compat.h |   56 
 midori/main.c   |1 -
 midori/midori-browser.c |1 -
 midori/midori-panel.c   |1 -
 midori/midori-preferences.c |1 -
 midori/midori-view.c|1 -
 midori/sokoke.c |   44 +++-
 midori/sokoke.h |   21 +
 panels/midori-transfers.c   |1 -
 tests/magic-uri.c   |1 -
 11 files changed, 64 insertions(+), 131 deletions(-)

diff --git a/midori/compat.c b/midori/compat.c
deleted file mode 100644
index 273935e..000
--- a/midori/compat.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- Copyright (C) 2008-2009 Christian Dywan christ...@twotoasts.de
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- See the file COPYING for the full license text.
-*/
-
-#include compat.h
-
-#include string.h
-
-#if !GTK_CHECK_VERSION (2, 14, 0)
-
-gboolean
-gtk_show_uri (GdkScreen*   screen,
-  const gchar* uri,
-  guint32  timestamp,
-  GError** error)
-{
-g_return_val_if_fail (uri != NULL, FALSE);
-
-return g_app_info_launch_default_for_uri (uri, NULL, NULL);
-}
-
-#endif
-
-#if !GTK_CHECK_VERSION(2, 12, 0)
-
-void
-gtk_widget_set_has_tooltip (GtkWidget* widget,
-gboolean   has_tooltip)
-{
-/* Do nothing */
-}
-
-void
-gtk_widget_set_tooltip_text (GtkWidget*   widget,
- const gchar* text)
-{
-if (text  *text)
-{
-static GtkTooltips* tooltips = NULL;
-if (G_UNLIKELY (!tooltips))
-tooltips = gtk_tooltips_new ();
-gtk_tooltips_set_tip (tooltips, widget, text, NULL);
-}
-}
-
-void
-gtk_tool_item_set_tooltip_text (GtkToolItem* toolitem,
-const gchar* text)
-{
-if (text  *text)
-{
-static GtkTooltips* tooltips = NULL;
-if (G_UNLIKELY (!tooltips))
-tooltips = gtk_tooltips_new ();
-
-gtk_tool_item_set_tooltip (toolitem, tooltips, text, NULL);
-}
-}
-
-#endif
diff --git a/midori/compat.h b/midori/compat.h
deleted file mode 100644
index b7df704..000
--- a/midori/compat.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- Copyright (C) 2008-2009 Christian Dywan christ...@twotoasts.de
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- See the file COPYING for the full license text.
-*/
-
-#ifndef __COMPAT_H__
-#define __COMPAT_H__
-
-#if HAVE_CONFIG_H
-#include config.h
-#endif
-
-#include webkit/webkit.h
-
-G_BEGIN_DECLS
-
-#if !GLIB_CHECK_VERSION (2, 14, 0)
-#define G_PARAM_STATIC_STRINGS \
-(G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)
-#endif
-
-#if !GTK_CHECK_VERSION (2, 14, 0)
-
-gboolean
-gtk_show_uri   (GdkScreen* screen,
-const gchar*   uri,
-guint32timestamp,
-GError**   error);
-
-#endif
-
-#if !GTK_CHECK_VERSION(2, 12, 0)
-
-void
-gtk_widget_set_has_tooltip (GtkWidget* widget,
-gboolean   has_tooltip);
-
-void
-gtk_widget_set_tooltip_text(GtkWidget* widget,
-const gchar*   text);
-
-void
-gtk_tool_item_set_tooltip_text (GtkToolItem*   toolitem,
-const gchar*   text);
-
-#endif
-
-G_END_DECLS
-
-#endif /* __COMPAT_H__ */
diff --git a/midori/main.c b/midori/main.c
index 077bc6a..6efde20 100644
--- a/midori/main.c
+++ b/midori/main.c
@@ -25,7 +25,6 @@
 #include midori-transfers.h
 
 #include sokoke.h
-#include compat.h
 
 #if HAVE_UNISTD_H
 #include unistd.h
diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 62667db..e65187b 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -26,7 +26,6 @@
 #include midori-stock.h
 
 #include gtkiconentry.h
-#include compat.h
 #include marshal.h
 #include sokoke.h
 
diff --git a/midori/midori-panel.c 

[Xfce4-commits] midori:master Show bookmarkbar if 'Show in the toolbar' is used on a bookmark

2010-01-01 Thread Christian Dywan
Updating branch refs/heads/master
 to d81f84aa9c7d36c5e69bba4c93aa3bc0290eaf4e (commit)
   from 578f74a30820dcbc5c8eb2f2d6793b46ec0deaea (commit)

commit d81f84aa9c7d36c5e69bba4c93aa3bc0290eaf4e
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri Jan 1 23:37:13 2010 +0100

Show bookmarkbar if 'Show in the toolbar' is used on a bookmark

 midori/midori-browser.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index e65187b..fbd0d58 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -866,6 +866,10 @@ midori_browser_edit_bookmark_dialog_new (MidoriBrowser* 
browser,
 ? 1 : -1);
 }
 
+if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check_toolbar)))
+if (!GTK_WIDGET_VISIBLE (browser-bookmarkbar))
+_action_set_active (browser, Bookmarkbar, TRUE);
+
 folder = browser-bookmarks;
 selected = gtk_combo_box_get_active_text (GTK_COMBO_BOX 
(combo_folder));
 if (strcmp (selected, _(Toplevel folder)))
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Implement Paste and proceed menuitem in location context menu

2010-01-01 Thread Christian Dywan
Updating branch refs/heads/master
 to 2f202f8020b1de16d60081e89dd6813370585f42 (commit)
   from 311a5a8a1b767c36274e44819fd3a9f3ec69ce41 (commit)

commit 2f202f8020b1de16d60081e89dd6813370585f42
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri Jan 1 23:01:56 2010 +0100

Implement Paste and proceed menuitem in location context menu

 midori/midori-locationaction.c |   20 
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c
index a558997..6b00758 100644
--- a/midori/midori-locationaction.c
+++ b/midori/midori-locationaction.c
@@ -1083,6 +1083,21 @@ midori_location_action_entry_changed_cb (GtkComboBox*
  combo_box,
 }
 
 static void
+midori_location_action_paste_proceed_cb (GtkWidget* menuitem,
+ GtkWidget* location_action)
+{
+GtkClipboard* clipboard = gtk_clipboard_get_for_display (
+gtk_widget_get_display (GTK_WIDGET 
(menuitem)),GDK_SELECTION_CLIPBOARD);
+gchar* uri;
+
+if ((uri = gtk_clipboard_wait_for_text (clipboard)))
+{
+g_signal_emit (location_action, signals[SUBMIT_URI], 0, uri, FALSE);
+g_free (uri);
+}
+}
+
+static void
 midori_location_action_populate_popup_cb (GtkWidget*entry,
   GtkMenuShell* menu,
   MidoriLocationAction* 
location_action)
@@ -1097,6 +1112,11 @@ midori_location_action_populate_popup_cb (GtkWidget* 
   entry,
 menuitem = sokoke_action_create_popup_menu_item (
 gtk_action_group_get_action (actions, ManageSearchEngines));
 gtk_menu_shell_append (menu, menuitem);
+menuitem = gtk_menu_item_new_with_mnemonic (_(Paste and p_roceed));
+gtk_widget_show (menuitem);
+gtk_menu_shell_append (menu, menuitem);
+g_signal_connect (menuitem, activate,
+G_CALLBACK (midori_location_action_paste_proceed_cb), location_action);
 }
 
 static void
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Fix a macro typo in the GtkIconEntry implementation

2010-01-01 Thread Christian Dywan
Updating branch refs/heads/master
 to fb04846992f29b5b8e7d246ba677b131518deae5 (commit)
   from d81f84aa9c7d36c5e69bba4c93aa3bc0290eaf4e (commit)

commit fb04846992f29b5b8e7d246ba677b131518deae5
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri Jan 1 23:45:29 2010 +0100

Fix a macro typo in the GtkIconEntry implementation

 midori/gtkiconentry.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/midori/gtkiconentry.c b/midori/gtkiconentry.c
index 8c28c77..1b4b872 100644
--- a/midori/gtkiconentry.c
+++ b/midori/gtkiconentry.c
@@ -1380,7 +1380,7 @@ gtk_icon_entry_set_icon_from_gicon (const GtkIconEntry 
*entry,
 GTK_ICON_SIZE_MENU,
 width, height);
 
-  #if #GTK_CHECK_VERSION (2, 14, 0)
+  #if GTK_CHECK_VERSION (2, 14, 0)
   info = gtk_icon_theme_lookup_by_gicon (icon_theme,
 icon,
 MIN (width, height), 0);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Merge MidoriLocationEntry progress drawing into GtkIconEntry

2010-01-01 Thread Christian Dywan
Updating branch refs/heads/master
 to d55e771b3a62b60e72ca87d67f0b62674c906cf5 (commit)
   from fb04846992f29b5b8e7d246ba677b131518deae5 (commit)

commit d55e771b3a62b60e72ca87d67f0b62674c906cf5
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri Jan 1 23:55:04 2010 +0100

Merge MidoriLocationEntry progress drawing into GtkIconEntry

 midori/gtkiconentry.c  |  320 ++
 midori/gtkiconentry.h  |4 +
 midori/midori-locationaction.c |8 +-
 midori/midori-locationentry.c  |  332 
 midori/midori-locationentry.h  |4 -
 5 files changed, 329 insertions(+), 339 deletions(-)

diff --git a/midori/gtkiconentry.c b/midori/gtkiconentry.c
index 1b4b872..d8e0d69 100644
--- a/midori/gtkiconentry.c
+++ b/midori/gtkiconentry.c
@@ -86,6 +86,7 @@ typedef struct
 
 typedef struct _GtkIconEntryPrivate
 {
+  gdouble fraction;
   EntryIconInfo icons[MAX_ICONS];
 
   gulong icon_released_id;
@@ -314,9 +315,313 @@ gtk_icon_entry_editable_init (GtkEditableClass *iface)
 {
 };
 
+/* GTK+/ GtkEntry internal helper function
+   Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+   Modified by the GTK+ Team and others 1997-2000
+   Copied from Gtk+ 2.13, whitespace adjusted */
+static void
+gtk_entry_get_pixel_ranges (GtkEntry  *entry,
+gint **ranges,
+gint  *n_ranges)
+{
+  gint start_char, end_char;
+
+  if (gtk_editable_get_selection_bounds (GTK_EDITABLE (entry),
+ start_char, end_char))
+{
+  PangoLayout *layout = gtk_entry_get_layout (entry);
+  PangoLayoutLine *line = pango_layout_get_lines (layout)-data;
+  const char *text = pango_layout_get_text (layout);
+  gsize start_index = g_utf8_offset_to_pointer (text, start_char) - text;
+  gsize end_index = g_utf8_offset_to_pointer (text, end_char) - text;
+  gint real_n_ranges, i;
+
+  pango_layout_line_get_x_ranges (line,
+  start_index, end_index, ranges, real_n_ranges);
+
+  if (ranges)
+{
+  gint *r = *ranges;
+
+  for (i = 0; i  real_n_ranges; ++i)
+{
+  r[2 * i + 1] = (r[2 * i + 1] - r[2 * i]) / PANGO_SCALE;
+  r[2 * i] = r[2 * i] / PANGO_SCALE;
+}
+}
+
+  if (n_ranges)
+*n_ranges = real_n_ranges;
+}
+  else
+{
+  if (n_ranges)
+*n_ranges = 0;
+  if (ranges)
+*ranges = NULL;
+}
+}
+
+/* GTK+/ GtkEntry internal helper function
+   Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+   Modified by the GTK+ Team and others 1997-2000
+   Copied from Gtk+ 2.13, whitespace adjusted
+   Code adjusted to not rely on internal qdata */
+static void
+_gtk_entry_effective_inner_border (GtkEntry  *entry,
+   GtkBorder *border)
+{
+  static const GtkBorder default_inner_border = { 2, 2, 2, 2 };
+  GtkBorder *tmp_border;
+
+  tmp_border = (GtkBorder*) gtk_entry_get_inner_border (entry);
+
+  if (tmp_border)
+{
+  *border = *tmp_border;
+  return;
+}
+
+  gtk_widget_style_get (GTK_WIDGET (entry), inner-border, tmp_border, NULL);
+
+  if (tmp_border)
+{
+  *border = *tmp_border;
+  gtk_border_free (tmp_border);
+  return;
+}
+
+  *border = default_inner_border;
+}
+
+static void
+gtk_entry_borders (GtkEntry* entry,
+   gint* xborder,
+   gint* yborder,
+   gboolean* interior_focus,
+   gint* focus_width)
+{
+  GtkWidget *widget = GTK_WIDGET (entry);
+
+  if (entry-has_frame)
+{
+  *xborder = widget-style-xthickness;
+  *yborder = widget-style-ythickness;
+}
+  else
+{
+  *xborder = 0;
+  *yborder = 0;
+}
+
+  gtk_widget_style_get (widget, interior-focus, interior_focus,
+focus-line-width, focus_width, NULL);
+
+  if (interior_focus)
+{
+  *xborder += *focus_width;
+  *yborder += *focus_width;
+}
+}
+
+/* GTK+/ GtkEntry internal helper function
+   Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+   Modified by the GTK+ Team and others 1997-2000
+   Copied from Gtk+ 2.13, whitespace adjusted */
+static void
+gtk_entry_get_text_area_size (GtkEntry *entry,
+  gint *x,
+  gint *y,
+  gint *width,
+  gint *height)
+{
+  gint frame_height;
+  gint xborder, yborder;
+  gboolean interior_focus;
+  gint focus_width;
+  GtkRequisition requisition;
+  GtkWidget *widget = GTK_WIDGET (entry);
+
+  gtk_widget_get_child_requisition (widget, requisition);
+  gtk_entry_borders (entry, xborder, yborder, interior_focus, focus_width);
+
+  if (GTK_WIDGET_REALIZED (widget))
+gdk_drawable_get_size (widget-window, 

[Xfce4-commits] midori:master Construct entry in location action, obsoleting location entry class

2010-01-01 Thread Christian Dywan
Updating branch refs/heads/master
 to af43d5a761ffc5ff770971619e30f929fd389e1f (commit)
   from d55e771b3a62b60e72ca87d67f0b62674c906cf5 (commit)

commit af43d5a761ffc5ff770971619e30f929fd389e1f
Author: Christian Dywan christ...@twotoasts.de
Date:   Sat Jan 2 00:28:44 2010 +0100

Construct entry in location action, obsoleting location entry class

 midori/midori-browser.c|2 +-
 midori/midori-locationaction.c |   28 -
 midori/midori-locationaction.h |2 -
 midori/midori-locationentry.c  |   65 
 midori/midori-locationentry.h  |   34 -
 midori/midori.h|1 -
 6 files changed, 28 insertions(+), 104 deletions(-)

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index fbd0d58..438c881 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -391,7 +391,7 @@ _midori_browser_set_statusbar_text (MidoriBrowser* browser,
 {
 GtkWidget* widget = gtk_window_get_focus (GTK_WINDOW (browser));
 gboolean is_location = widget ?
-MIDORI_IS_LOCATION_ENTRY (gtk_widget_get_parent (widget)) : FALSE;
+GTK_IS_COMBO_BOX (gtk_widget_get_parent (widget)) : FALSE;
 
 katze_assign (browser-statusbar_text, sokoke_format_uri_for_display 
(text));
 
diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c
index ee8afad..053656e 100644
--- a/midori/midori-locationaction.c
+++ b/midori/midori-locationaction.c
@@ -240,6 +240,12 @@ midori_location_action_class_init 
(MidoriLocationActionClass* class)
  The list of history items,
  KATZE_TYPE_ARRAY,
  G_PARAM_READWRITE | 
G_PARAM_STATIC_STRINGS));
+
+/* We want location entries to have appears-as-list applied */
+gtk_rc_parse_string (style \midori-location-entry-style\ {\n
+   GtkComboBox::appears-as-list = 1\n }\n
+ widget \*MidoriLocationEntry\ 
+ style \midori-location-entry-style\\n);
 }
 
 /* Allow this to be used in tests, it's otherwise private */
@@ -535,6 +541,10 @@ midori_location_action_create_tool_item (GtkAction* action)
 GtkWidget* toolitem;
 GtkWidget* alignment;
 GtkWidget* location_entry;
+GtkWidget* entry;
+#if HAVE_HILDON
+HildonGtkInputMode mode;
+#endif
 
 toolitem = GTK_WIDGET (gtk_tool_item_new ());
 gtk_tool_item_set_expand (GTK_TOOL_ITEM (toolitem), TRUE);
@@ -542,10 +552,26 @@ midori_location_action_create_tool_item (GtkAction* 
action)
 alignment = gtk_alignment_new (0.0f, 0.5f, 1.0f, 0.1f);
 gtk_widget_show (alignment);
 gtk_container_add (GTK_CONTAINER (toolitem), alignment);
-location_entry = g_object_new (MIDORI_TYPE_LOCATION_ENTRY, NULL);
+location_entry = gtk_combo_box_entry_new ();
+gtk_widget_set_name (location_entry, MidoriLocationEntry);
 gtk_widget_show (location_entry);
 gtk_container_add (GTK_CONTAINER (alignment), location_entry);
 
+#if HAVE_HILDON
+entry = gtk_entry_new ();
+mode = hildon_gtk_entry_get_input_mode (GTK_ENTRY (entry));
+mode = ~HILDON_GTK_INPUT_MODE_AUTOCAP;
+hildon_gtk_entry_set_input_mode (GTK_ENTRY (entry), mode);
+#else
+entry = gtk_icon_entry_new ();
+gtk_icon_entry_set_icon_from_stock (GTK_ICON_ENTRY (entry),
+ GTK_ICON_ENTRY_PRIMARY, GTK_STOCK_FILE);
+gtk_icon_entry_set_icon_highlight (GTK_ICON_ENTRY (entry),
+ GTK_ICON_ENTRY_SECONDARY, TRUE);
+#endif
+gtk_widget_show (entry);
+gtk_container_add (GTK_CONTAINER (location_entry), entry);
+
 return toolitem;
 }
 
diff --git a/midori/midori-locationaction.h b/midori/midori-locationaction.h
index b3f1781..33c3a39 100644
--- a/midori/midori-locationaction.h
+++ b/midori/midori-locationaction.h
@@ -12,8 +12,6 @@
 #ifndef __MIDORI_LOCATION_ACTION_H__
 #define __MIDORI_LOCATION_ACTION_H__
 
-#include midori-locationentry.h
-
 #include katze/katze.h
 
 G_BEGIN_DECLS
diff --git a/midori/midori-locationentry.c b/midori/midori-locationentry.c
deleted file mode 100644
index 80d3637..000
--- a/midori/midori-locationentry.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- Copyright (C) 2008 Dale Whittaker da...@users.sf.net
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- See the file COPYING for the full license text.
-*/
-
-#include midori-locationentry.h
-
-#include gtkiconentry.h
-#include sokoke.h
-#include gdk/gdkkeysyms.h
-
-struct _MidoriLocationEntry
-{
-GtkComboBoxEntry parent_instance;
-};
-
-struct _MidoriLocationEntryClass
-{
-GtkComboBoxEntryClass parent_class;
-};
-
-G_DEFINE_TYPE (MidoriLocationEntry,
-midori_location_entry, GTK_TYPE_COMBO_BOX_ENTRY)

[Xfce4-commits] midori:master Implement 'Block image' menuitem in adblock, adding URIs to custom list

2010-01-01 Thread Christian Dywan
Updating branch refs/heads/master
 to 5452c7c71d016caa073f089f18bef5fac4b3a4c9 (commit)
   from af43d5a761ffc5ff770971619e30f929fd389e1f (commit)

commit 5452c7c71d016caa073f089f18bef5fac4b3a4c9
Author: Alexander Butenko a.bute...@gmail.com
Date:   Sat Jan 2 03:47:56 2010 +0100

Implement 'Block image' menuitem in adblock, adding URIs to custom list

For now it only has effect after reloading the page.

 extensions/adblock.c |  115 ++---
 1 files changed, 89 insertions(+), 26 deletions(-)

diff --git a/extensions/adblock.c b/extensions/adblock.c
index 289f714..2bcdf56 100644
--- a/extensions/adblock.c
+++ b/extensions/adblock.c
@@ -24,6 +24,7 @@
 
 #define SIGNATURE_SIZE 8
 #define USE_PATTERN_MATCHING 1
+#define CUSTOM_LIST_NAME custom.list
 #define ADBLOCK_FILTER_VALID(__filter) \
 (__filter  (g_str_has_prefix (__filter, http) \
|| g_str_has_prefix (__filter, file)))
@@ -102,6 +103,7 @@ adblock_reload_rules (MidoriExtension* extension)
 gchar* folder;
 guint i = 0;
 filters = midori_extension_get_string_list (extension, filters, NULL);
+gchar* custom_list;
 
 if (!filters)
 return;
@@ -135,6 +137,10 @@ adblock_reload_rules (MidoriExtension* extension)
 g_free (path);
 g_free (filename);
 }
+custom_list = g_build_filename (midori_extension_get_config_dir 
(extension),
+CUSTOM_LIST_NAME, NULL);
+adblock_parse_file (custom_list);
+g_free (custom_list);
 katze_assign (blockscript, adblock_build_js (blockcss, blockcssprivate));
 g_strfreev (filters);
 g_free (folder);
@@ -693,6 +699,58 @@ adblock_session_request_queued_cb (SoupSession* session,
 }
 #endif
 
+#if WEBKIT_CHECK_VERSION (1, 1, 15)
+static void
+adblock_custom_block_image_cb (GtkWidget*   widget,
+   MidoriExtension* extension)
+{
+FILE* list;
+gchar* custom_list;
+gchar* uri;
+
+custom_list = g_build_filename (midori_extension_get_config_dir 
(extension),
+CUSTOM_LIST_NAME, NULL);
+if (!(list = g_fopen (custom_list, a+)))
+{
+g_free (custom_list);
+return;
+}
+uri = g_object_get_data (G_OBJECT (widget), uri);
+g_fprintf (list, %s\n, uri);
+fclose (list);
+adblock_parse_file (custom_list);
+g_free (custom_list);
+}
+
+static void
+adblock_populate_popup_cb (WebKitWebView*   web_view,
+   GtkWidget*   menu,
+   MidoriExtension* extension)
+{
+GtkWidget* menuitem;
+gchar *uri;
+gint x, y;
+GdkEventButton event;
+WebKitHitTestResultContext context;
+WebKitHitTestResult* hit_test;
+
+gdk_window_get_pointer (GTK_WIDGET (web_view)-window, x, y, NULL);
+event.x = x;
+event.y = y;
+hit_test = webkit_web_view_get_hit_test_result (web_view, event);
+context = katze_object_get_int (hit_test, context);
+if (!(context  WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE))
+return;
+uri = katze_object_get_string (hit_test, image-uri);
+menuitem = gtk_menu_item_new_with_mnemonic (B_lock image);
+gtk_widget_show (menuitem);
+gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+g_object_set_data_full (G_OBJECT (menuitem), uri, uri, 
(GDestroyNotify)g_free);
+g_signal_connect (menuitem, activate,
+G_CALLBACK (adblock_custom_block_image_cb), extension);
+}
+#endif
+
 static void
 adblock_window_object_cleared_cb (GtkWidget*  web_view,
   WebKitWebFrame* web_frame,
@@ -703,14 +761,19 @@ adblock_window_object_cleared_cb (GtkWidget*  
web_view,
 }
 
 static void
-adblock_add_tab_cb (MidoriBrowser* browser,
-MidoriView*view,
-GtkWidget* image)
+adblock_add_tab_cb (MidoriBrowser*   browser,
+MidoriView*  view,
+MidoriExtension* extension)
 {
-
 GtkWidget* web_view = gtk_bin_get_child (GTK_BIN (view));
+GtkWidget* image = g_object_get_data (G_OBJECT (browser), status-image);
+
 g_signal_connect (web_view, window-object-cleared,
 G_CALLBACK (adblock_window_object_cleared_cb), 0);
+#if WEBKIT_CHECK_VERSION (1, 1, 15)
+g_signal_connect_after (web_view, populate-popup,
+G_CALLBACK (adblock_populate_popup_cb), extension);
+#endif
 #if HAVE_WEBKIT_RESOURCE_REQUEST
 g_signal_connect (web_view, resource-request-starting,
 G_CALLBACK (adblock_resource_request_starting_cb), image);
@@ -719,14 +782,14 @@ adblock_add_tab_cb (MidoriBrowser* browser,
 
 static void
 adblock_deactivate_cb (MidoriExtension* extension,
-   GtkWidget*   image);
+   MidoriBrowser*   browser);
 
 static void
 adblock_add_tab_foreach_cb (MidoriView*  view,
 MidoriBrowser*   browser,
- 

[Xfce4-commits] midori:master Hide images blocked with 'Block image' via element hiding

2010-01-01 Thread Christian Dywan
Updating branch refs/heads/master
 to 20059d74b94f4f7357da374290901dac25e9f27d (commit)
   from 5452c7c71d016caa073f089f18bef5fac4b3a4c9 (commit)

commit 20059d74b94f4f7357da374290901dac25e9f27d
Author: Alexander Butenko a.bute...@gmail.com
Date:   Sat Jan 2 04:11:44 2010 +0100

Hide images blocked with 'Block image' via element hiding

 extensions/adblock.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/extensions/adblock.c b/extensions/adblock.c
index 2bcdf56..173e0fd 100644
--- a/extensions/adblock.c
+++ b/extensions/adblock.c
@@ -717,6 +717,7 @@ adblock_custom_block_image_cb (GtkWidget*   widget,
 }
 uri = g_object_get_data (G_OBJECT (widget), uri);
 g_fprintf (list, %s\n, uri);
+g_fprintf (list, ##img[src=\%s\]\n, uri);
 fclose (list);
 adblock_parse_file (custom_list);
 g_free (custom_list);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits