[Xfce4-commits] midori:master Make invalid actions fail; abstract exit on error

2013-03-26 Thread Christian Dywan
Updating branch refs/heads/master
 to be0e4aa9c86c6a51ed94b61f2d637b7c10d4 (commit)
   from bca7ae6c834c43f958e45ad50ab6d02ab85d9c8e (commit)

commit be0e4aa9c86c6a51ed94b61f2d637b7c10d4
Author: Christian Dywan christ...@twotoasts.de
Date:   Sat Mar 23 13:40:40 2013 +0100

Make invalid actions fail; abstract exit on error

 midori/midori-app.c |   18 ++
 midori/midori-app.h |4 
 midori/midori-browser.c |8 
 midori/sokoke.c |5 +
 4 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/midori/midori-app.c b/midori/midori-app.c
index df2a060..955f6fd 100644
--- a/midori/midori-app.c
+++ b/midori/midori-app.c
@@ -1439,10 +1439,20 @@ midori_app_setup (gint   *argc,
 g_object_unref (factory);
 
 if (!success)
-{
-g_printerr (%s - %s\n, _(Midori), error-message);
-exit (1);
-}
+midori_error (error-message);
+}
+
+void
+midori_error (const gchar* format,
+  ...)
+{
+g_printerr (%s - , _(Midori));
+va_list args;
+va_start (args, format);
+g_vfprintf (stderr, format, args);
+va_end (args);
+g_printerr (\n);
+exit (1);
 }
 
 gboolean
diff --git a/midori/midori-app.h b/midori/midori-app.h
index 3fc101e..8ec9f4b 100644
--- a/midori/midori-app.h
+++ b/midori/midori-app.h
@@ -96,6 +96,10 @@ midori_app_setup  (gint   *argc,
 gboolean
 midori_debug  (const gchar*   token);
 
+void
+midori_error  (const gchar*   format,
+   ...);
+
 G_END_DECLS
 
 #endif /* __MIDORI_APP_H__ */
diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index c8981c1..fef0009 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -559,14 +559,14 @@ _midori_browser_activate_action (MidoriBrowser* browser,
 if (enum_value != NULL)
 g_object_set (browser-settings, parts[0], enum_value-value, 
NULL);
 else
-g_warning (_(Value '%s' is invalid for %s), parts[1], 
parts[0]);
+midori_error (_(Value '%s' is invalid for %s), parts[1], 
parts[0]);
 }
-else if (pspec != NULL)
-g_warning (_(Value '%s' is invalid for %s), parts[1], parts[0]);
+else
+midori_error (_(Value '%s' is invalid for %s), parts[1], 
parts[0]);
 g_strfreev (parts);
 }
 else
-g_warning (_(Unexpected action '%s'.), name);
+midori_error (_(Unexpected action '%s'.), name);
 }
 
 static void
diff --git a/midori/sokoke.c b/midori/sokoke.c
index 0d76914..66636ba 100644
--- a/midori/sokoke.c
+++ b/midori/sokoke.c
@@ -557,10 +557,7 @@ sokoke_magic_uri (const gchar* uri,
 g_strfreev (parts);
 }
 if (!allow_search)
-{
-g_printerr (%s - %s\n, _(Midori), _(Invalid URI));
-exit (1);
-}
+midori_error (_(Invalid URI));
 return NULL;
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Add 'Show last crash log' button to diagnostic dialog

2013-03-26 Thread Christian Dywan
Updating branch refs/heads/master
 to 7dcbee43f9cb428bccabbee6b256c2482fdca508 (commit)
   from be0e4aa9c86c6a51ed94b61f2d637b7c10d4 (commit)

commit 7dcbee43f9cb428bccabbee6b256c2482fdca508
Author: Christian Dywan christ...@twotoasts.de
Date:   Sun Mar 24 14:08:28 2013 +0100

Add 'Show last crash log' button to diagnostic dialog

 katze/midori-paths.vala  |   21 +++--
 midori/main.c|   12 ++--
 midori/midori-frontend.c |   22 ++
 3 files changed, 43 insertions(+), 12 deletions(-)

diff --git a/katze/midori-paths.vala b/katze/midori-paths.vala
index 2f7f540..d404a5f 100644
--- a/katze/midori-paths.vala
+++ b/katze/midori-paths.vala
@@ -35,6 +35,7 @@ namespace Midori {
 namespace Paths {
 static string? exec_path = null;
 static string[] command_line = null;
+static string? runtime_dir = null;
 static RuntimeMode mode = RuntimeMode.UNDEFINED;
 
 static string? config_dir = null;
@@ -74,18 +75,26 @@ namespace Midori {
 return mode;
 }
 
-private static string get_runtime_dir () {
+public static unowned string get_runtime_dir () {
+if (runtime_dir != null)
+return runtime_dir;
+
 #if HAVE_WIN32
-string? runtime_dir = Environment.get_variable (XDG_RUNTIME_DIR);
+runtime_dir = Environment.get_variable (XDG_RUNTIME_DIR);
 if (runtime_dir == null || runtime_dir == )
 runtime_dir = Environment.get_user_data_dir ();
 #else
-string? runtime_dir = Environment.get_variable (XDG_RUNTIME_DIR);
-if (runtime_dir == null || runtime_dir == )
-return Path.build_path (Path.DIR_SEPARATOR_S,
+runtime_dir = Environment.get_variable (XDG_RUNTIME_DIR);
+if (runtime_dir == null || runtime_dir == ) {
+runtime_dir = Path.build_path (Path.DIR_SEPARATOR_S,
 Environment.get_tmp_dir (), PACKAGE_NAME + - + 
Environment.get_user_name ());
+mkdir_with_parents (runtime_dir);
+return runtime_dir;
+}
 #endif
-return Path.build_path (Path.DIR_SEPARATOR_S, runtime_dir, 
PACKAGE_NAME);
+runtime_dir = Path.build_path (Path.DIR_SEPARATOR_S, runtime_dir, 
PACKAGE_NAME);
+mkdir_with_parents (runtime_dir);
+return runtime_dir;
 }
 
 public static void init (RuntimeMode new_mode, string? config) {
diff --git a/midori/main.c b/midori/main.c
index adc93b0..a24a025 100644
--- a/midori/main.c
+++ b/midori/main.c
@@ -144,15 +144,15 @@ main (intargc,
 {
 gchar* gdb = g_find_program_in_path (gdb);
 gchar* args = midori_paths_get_command_line_str (FALSE);
+const gchar* runtime_dir = midori_paths_get_runtime_dir ();
 gchar* cmd = g_strdup_printf (
 --batch -ex 'set print thread-events off' -ex run 
--ex 'set logging on %s' -ex 'bt' --return-child-result 
+-ex 'set logging on %s/%s' -ex 'bt' --return-child-result 
 --args %s,
-/tmp/midori-gdb.bt, args);
-if (gdb != NULL)
-sokoke_spawn_program (gdb, TRUE, cmd, FALSE, TRUE);
-else
-g_print (_(Error: \gdb\ can't be found\n));
+runtime_dir, gdb.bt, args);
+if (gdb == NULL)
+midori_error (_(Error: \gdb\ can't be found\n));
+sokoke_spawn_program (gdb, TRUE, cmd, FALSE, TRUE);
 g_free (gdb);
 g_free (cmd);
 g_free (args);
diff --git a/midori/midori-frontend.c b/midori/midori-frontend.c
index 6322ff5..c8a8ea8 100644
--- a/midori/midori-frontend.c
+++ b/midori/midori-frontend.c
@@ -296,6 +296,15 @@ button_modify_preferences_clicked_cb (GtkWidget* 
button,
 gtk_widget_destroy (dialog);
 }
 
+static void
+midori_frontend_crash_log_cb (GtkWidget* button,
+  gchar* crash_log)
+{
+GError* error = NULL;
+if (!sokoke_show_uri (gtk_widget_get_screen (button), crash_log, 0, 
error))
+midori_error (error-message);
+}
+
 static MidoriStartup
 midori_frontend_diagnostic_dialog (MidoriApp* app,
MidoriWebSettings* settings,
@@ -343,6 +352,19 @@ midori_frontend_diagnostic_dialog (MidoriApp* app,
 _(Show last tabs without loading), MIDORI_STARTUP_DELAYED_PAGES,
 _(Show last open tabs), MIDORI_STARTUP_LAST_OPEN_PAGES,
 NULL);
+
+gchar* crash_log = g_build_filename (midori_paths_get_runtime_dir (), 
gdb.bt, NULL);
+if (g_access (crash_log, F_OK) == 0)
+{
+GtkWidget* button = gtk_button_new_with_mnemonic (_(Show last crash 
_log));
+g_signal_connect_data (button, clicked,
+G_CALLBACK (midori_frontend_crash_log_cb), crash_log,
+(GClosureNotify)g_free, 0);
+gtk_widget_show 

[Xfce4-commits] midori:master Stub out _midori_web_view_load_icon for WebKit2

2013-03-26 Thread Christian Dywan
Updating branch refs/heads/master
 to 0979301a577b2181c0866ad0c9960437b75dbf83 (commit)
   from 7dcbee43f9cb428bccabbee6b256c2482fdca508 (commit)

commit 0979301a577b2181c0866ad0c9960437b75dbf83
Author: Christian Dywan christ...@twotoasts.de
Date:   Sun Mar 24 14:10:54 2013 +0100

Stub out _midori_web_view_load_icon for WebKit2

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

diff --git a/midori/midori-view.c b/midori/midori-view.c
index eb20918..3f63a5a 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -605,7 +605,9 @@ _midori_web_view_load_icon (MidoriView* view)
 GtkSettings* settings = gtk_widget_get_settings (view-web_view);
 gtk_icon_size_lookup_for_settings (settings, GTK_ICON_SIZE_MENU, 
icon_width, icon_height);
 GdkPixbuf* pixbuf = NULL;
-#if WEBKIT_CHECK_VERSION (1, 8, 0)
+#ifdef HAVE_WEBKIT2
+/* FIXME */
+#elif WEBKIT_CHECK_VERSION (1, 8, 0)
 if ((pixbuf = webkit_web_view_try_get_favicon_pixbuf (
 WEBKIT_WEB_VIEW (view-web_view), icon_width, icon_height)))
 midori_view_apply_icon (view, pixbuf, view-icon_uri);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Always use proper accessors for KatzeItem

2013-03-26 Thread Christian Dywan
Updating branch refs/heads/master
 to eff6e0c33703b2ff7cc12eb9954239b47358669a (commit)
   from 0979301a577b2181c0866ad0c9960437b75dbf83 (commit)

commit eff6e0c33703b2ff7cc12eb9954239b47358669a
Author: Christian Dywan christ...@twotoasts.de
Date:   Mon Mar 25 09:17:42 2013 +0100

Always use proper accessors for KatzeItem

 extensions/feed-panel/feed-panel.c |6 +-
 midori/midori-array.c  |   73 ---
 midori/midori-browser.c|   24 
 midori/midori-searchaction.c   |   10 ++--
 midori/midori-session.c|2 +-
 midori/midori-view.c   |2 +-
 6 files changed, 68 insertions(+), 49 deletions(-)

diff --git a/extensions/feed-panel/feed-panel.c 
b/extensions/feed-panel/feed-panel.c
index 9c22340..dcb049f 100644
--- a/extensions/feed-panel/feed-panel.c
+++ b/extensions/feed-panel/feed-panel.c
@@ -376,15 +376,15 @@ feed_panel_cursor_or_row_changed_cb (GtkTreeView* 
treeview,
 text = g_strdup_printf (
 htmlheadtitlefeed/title/head
 bodyh3%s/h3p /%s/body/html,
-parent-uri, last_updated);
+katze_item_get_uri (KATZE_ITEM (parent)), 
last_updated);
 g_free (pretty);
 g_free (last_updated);
 }
 else
 {
 text = g_strdup_printf (
-htmlheadtitlefeed/title/head
-bodyh3%s/h3/body/html, parent-uri);
+htmlheadtitlefeed/title/head
+bodyh3%s/h3/body/html, katze_item_get_uri 
(KATZE_ITEM (parent)));
 }
 }
 webkit_web_view_load_html_string (
diff --git a/midori/midori-array.c b/midori/midori-array.c
index 5d7d5ff..4911c89 100644
--- a/midori/midori-array.c
+++ b/midori/midori-array.c
@@ -51,9 +51,17 @@ katze_item_from_xmlNodePtr (xmlNodePtr cur)
 while (cur)
 {
 if (katze_str_equal ((gchar*)cur-name, title))
-item-name = g_strstrip ((gchar*)xmlNodeGetContent (cur));
+{
+gchar* value = g_strstrip ((gchar*)xmlNodeGetContent (cur));
+katze_item_set_name (item, value);
+xmlFree (value);
+}
 else if (katze_str_equal ((gchar*)cur-name, desc))
-item-text = g_strstrip ((gchar*)xmlNodeGetContent (cur));
+{
+gchar* value = g_strstrip ((gchar*)xmlNodeGetContent (cur));
+katze_item_set_text (item, value);
+xmlFree (value);
+}
 else if (katze_str_equal ((gchar*)cur-name, info))
 katze_xbel_parse_info (item, cur);
 cur = cur-next;
@@ -87,9 +95,17 @@ katze_array_from_xmlNodePtr (xmlNodePtr cur)
 while (cur)
 {
 if (katze_str_equal ((gchar*)cur-name, title))
-((KatzeItem*)array)-name = g_strstrip ((gchar*)xmlNodeGetContent 
(cur));
+{
+gchar* value = g_strstrip ((gchar*)xmlNodeGetContent (cur));
+katze_item_set_text (KATZE_ITEM (array), value);
+xmlFree (value);
+}
 else if (katze_str_equal ((gchar*)cur-name, desc))
-((KatzeItem*)array)-text = g_strstrip ((gchar*)xmlNodeGetContent 
(cur));
+{
+gchar* value = g_strstrip ((gchar*)xmlNodeGetContent (cur));
+katze_item_set_name (KATZE_ITEM (array), value);
+xmlFree (value);
+}
 else if (katze_str_equal ((gchar*)cur-name, info))
 katze_xbel_parse_info ((KatzeItem*)array, cur);
 else if (katze_str_equal ((gchar*)cur-name, folder))
@@ -209,15 +225,15 @@ katze_array_from_xmlDocPtr (KatzeArray* array,
 value = (gchar*)xmlGetProp (cur, (xmlChar*)version);
 if (!tiny_xbel  (!value || !katze_str_equal (value, 1.0)))
 g_warning (XBEL version is not 1.0.);
-g_free (value);
+xmlFree (value);
 
 value = (gchar*)xmlGetProp (cur, (xmlChar*)title);
 katze_item_set_name (KATZE_ITEM (array), value);
-g_free (value);
+xmlFree (value);
 
 value = (gchar*)xmlGetProp (cur, (xmlChar*)desc);
 katze_item_set_text (KATZE_ITEM (array), value);
-g_free (value);
+xmlFree (value);
 }
 else if (katze_str_equal ((gchar*)cur-name, RDF))
 {
@@ -229,21 +245,28 @@ katze_array_from_xmlDocPtr (KatzeArray* array,
 if (katze_str_equal ((gchar*)cur-name, item))
 {
 xmlNodePtr cur_item;
-
 item = katze_item_new ();
 
 cur_item = cur-xmlChildrenNode;
 while (cur_item)
 {
 if (katze_str_equal ((gchar*)cur_item-name, title))
-item-name = g_strstrip ((gchar*)xmlNodeGetContent 
(cur_item));
+{
+

[Xfce4-commits] midori:master Color pixbuf column in history list treeview

2013-03-26 Thread Christian Dywan
Updating branch refs/heads/master
 to da9c0452c1ed92d7f08e5ec224dc80c6280cb941 (commit)
   from eff6e0c33703b2ff7cc12eb9954239b47358669a (commit)

commit da9c0452c1ed92d7f08e5ec224dc80c6280cb941
Author: Christian Dywan christ...@twotoasts.de
Date:   Tue Mar 26 08:09:02 2013 +0100

Color pixbuf column in history list treeview

 extensions/history-list.vala |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/extensions/history-list.vala b/extensions/history-list.vala
index b145e41..1d7b63a 100644
--- a/extensions/history-list.vala
+++ b/extensions/history-list.vala
@@ -128,7 +128,8 @@ namespace HistoryList {
 
 this.treeview.insert_column_with_attributes (
 -1, Icon,
-new CellRendererPixbuf (), pixbuf, 
TabTreeCells.TREE_CELL_PIXBUF);
+new CellRendererPixbuf (), pixbuf, 
TabTreeCells.TREE_CELL_PIXBUF,
+cell-background-gdk, TabTreeCells.TREE_CELL_BG);
 this.treeview.insert_column_with_attributes (
 -1, Title,
 new CellRendererText (), text, TabTreeCells.TREE_CELL_STRING,
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Implement mouse movement, load-failed, crashed in WebKit2

2013-03-26 Thread Christian Dywan
Updating branch refs/heads/master
 to 15f43889607f1261fc031bcaf2aa844787bb2bd6 (commit)
   from da9c0452c1ed92d7f08e5ec224dc80c6280cb941 (commit)

commit 15f43889607f1261fc031bcaf2aa844787bb2bd6
Author: Christian Dywan christ...@twotoasts.de
Date:   Tue Mar 26 08:11:07 2013 +0100

Implement mouse movement, load-failed, crashed in WebKit2

 midori/midori-view.c |   57 -
 1 files changed, 46 insertions(+), 11 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index b8094c3..4b4ce28 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -1332,10 +1332,13 @@ midori_view_display_error (MidoriView* view,
 return FALSE;
 }
 
-#ifndef HAVE_WEBKIT2
 static gboolean
 webkit_web_view_load_error_cb (WebKitWebView*  web_view,
+#ifdef HAVE_WEBKIT2
+   WebKitLoadEvent load_event,
+#else
WebKitWebFrame* web_frame,
+#endif
const gchar*uri,
GError* error,
MidoriView* view)
@@ -1389,7 +1392,6 @@ midori_view_apply_scroll_position (MidoriView* view)
 view-scrollv = -3;
 }
 }
-#endif
 
 static void
 midori_view_load_finished (MidoriView* view)
@@ -1497,6 +1499,18 @@ midori_view_load_finished (MidoriView* view)
 
 #ifdef HAVE_WEBKIT2
 static void
+midori_view_web_view_crashed_cb (WebKitWebView* web_view,
+ MidoriView*view)
+{
+title = g_strdup_printf (_(Oops - %s), uri);
+message = g_strdup_printf (_(Something went wrong with '%s'.), uri);
+result = midori_view_display_error (view, uri, title,
+message, error-message, _(Try again), web_frame);
+g_free (message);
+g_free (title);
+}
+
+static void
 midori_view_web_view_load_changed_cb (WebKitWebView*  web_view,
   WebKitLoadEvent load_event,
   MidoriView* view)
@@ -1563,7 +1577,9 @@ midori_web_view_notify_icon_uri_cb (WebKitWebView* 
web_view,
 GParamSpec*pspec,
 MidoriView*view)
 {
-#ifndef HAVE_WEBKIT2
+#ifdef HAVE_WEBKIT2
+/* TODO */
+#else
 const gchar* icon_uri = webkit_web_view_get_icon_uri (web_view);
 katze_assign (view-icon_uri, g_strdup (icon_uri));
 _midori_web_view_load_icon (view);
@@ -1607,11 +1623,22 @@ midori_view_web_view_leave_notify_event_cb 
(WebKitWebView*web_view,
 }
 
 static void
-webkit_web_view_hovering_over_link_cb (WebKitWebView* web_view,
-   const gchar*   tooltip,
-   const gchar*   link_uri,
-   MidoriView*view)
+webkit_web_view_hovering_over_link_cb (WebKitWebView*   web_view,
+   #ifdef HAVE_WEBKIT2
+   WebKitHitTestResult* hit_test_result,
+   guintmodifiers,
+   #else
+   const gchar* tooltip,
+   const gchar* link_uri,
+   #endif
+   MidoriView*  view)
 {
+#ifdef HAVE_WEBKIT2
+if (!webkit_hit_test_result_context_is_link (hit_test_result))
+return;
+const gchar* message = webkit_hit_test_result_get_link_uri 
(hit_test_result);
+#endif
+
 #if !(WEBKIT_CHECK_VERSION (1, 3, 1)  defined (HAVE_LIBSOUP_2_29_91))
 sokoke_prefetch_uri (view-settings, link_uri, NULL, NULL);
 #endif
@@ -3705,10 +3732,18 @@ midori_view_constructor (GType  type,
 view-web_view = GTK_WIDGET (midori_tab_get_web_view (MIDORI_TAB (view)));
 g_object_connect (view-web_view,
   #ifdef HAVE_WEBKIT2
+  signal::web-process-crashed,
+  midori_view_web_view_crashed_cb, view,
+  signal::load-failed,
+  webkit_web_view_load_error_cb, view,
   signal::load-changed,
   midori_view_web_view_load_changed_cb, view,
   signal::notify::estimated-load-progress,
   webkit_web_view_progress_changed_cb, view,
+  signal::notify::favicon,
+  midori_web_view_notify_favicon_uri_cb, view,
+  signal::mouse-target-changed,
+  webkit_web_view_hovering_over_link_cb, view,
   #else
   signal::notify::load-status,
   midori_view_web_view_notify_load_status_cb, view,
@@ -3736,12 +3771,14 @@ midori_view_constructor (GType  type,
   

[Xfce4-commits] midori:master Implement direction-based mouse gesture configuration

2013-03-26 Thread Christian Dywan
Updating branch refs/heads/master
 to ea2ba1945057936372ed2ea5eaebc3c5ae90e1c7 (commit)
   from 15f43889607f1261fc031bcaf2aa844787bb2bd6 (commit)

commit ea2ba1945057936372ed2ea5eaebc3c5ae90e1c7
Author: Christian Dywan christ...@twotoasts.de
Date:   Tue Mar 26 08:26:21 2013 +0100

Implement direction-based mouse gesture configuration

Fixes: https://bugs.launchpad.net/midori/+bug/968677

 extensions/mouse-gestures.c |  399 +--
 1 files changed, 308 insertions(+), 91 deletions(-)

diff --git a/extensions/mouse-gestures.c b/extensions/mouse-gestures.c
index 3941594..6339797 100644
--- a/extensions/mouse-gestures.c
+++ b/extensions/mouse-gestures.c
@@ -11,49 +11,207 @@
 */
 
 #include midori/midori.h
+#include math.h
 
 typedef struct _MouseGesture MouseGesture;
 typedef enum _MouseButton MouseButton;
 
-enum _MouseButton {
+enum _MouseButton
+{
 MOUSE_BUTTON_LEFT = 1,
 MOUSE_BUTTON_RIGHT = 3,
 MOUSE_BUTTON_MIDDLE = 2,
 MOUSE_BUTTON_UNSET = 0
 };
 
-struct MouseGestureNode {
+/* equivalent to the angle measured anticlockwise from east, divided by 45 or 
pi/4 */
+typedef enum
+{
+STROKE_EAST = 0,
+STROKE_NORTHEAST,
+STROKE_NORTH,
+STROKE_NORTHWEST,
+STROKE_WEST,
+STROKE_SOUTHWEST,
+STROKE_SOUTH,
+STROKE_SOUTHEAST,
+STROKE_NONE,
+} MouseGestureDirection;
+
+static const gchar* direction_names[]=
+{
+E,
+NE,
+N,
+NW,
+W,
+SW,
+S,
+SE,
+NONE,
+};
+
+#define N_DIRECTIONS 8
+
+#define DEVIANCE (15 * M_PI / 180)
+#define MINLENGTH 30
+
+char** config_actions = NULL;
+MouseGestureDirection** config_gestures = NULL;
+
+const char* default_actions[]=
+{
+TabClose,
+Reload,
+TabNew,
+Stop,
+Forward,
+Back,
+NULL
+};
+
+const MouseGestureDirection default_gesture_strokes[] =
+{
+STROKE_SOUTH, STROKE_EAST, STROKE_NONE,
+STROKE_SOUTH, STROKE_WEST, STROKE_NONE,
+STROKE_SOUTH, STROKE_NONE,
+STROKE_NORTH, STROKE_NONE,
+STROKE_EAST, STROKE_NONE,
+STROKE_WEST, STROKE_NONE,
+STROKE_NONE,
+};
+
+const MouseGestureDirection* default_gestures[] =
+{
+default_gesture_strokes[0],
+default_gesture_strokes[3],
+default_gesture_strokes[6],
+default_gesture_strokes[8],
+default_gesture_strokes[10],
+default_gesture_strokes[12],
+default_gesture_strokes[14],
+};
+
+static gboolean
+parse_direction (const char* str, MouseGestureDirection* dir)
+{
+int i;
+for (i = 0; i  N_DIRECTIONS; i++)
+{
+if(!strcmp(str, direction_names[i]))
+{
+*dir = i;
+return TRUE;
+}
+}
+return FALSE;
+}
+
+static gboolean
+strokes_equal (const MouseGestureDirection* a, const MouseGestureDirection* b)
+{
+int i;
+for (i = 0; a[i] != STROKE_NONE  b[i] != STROKE_NONE; i++)
+{
+if(a[i] != b[i])
+return FALSE;
+}
+return a[i] == b[i];
+}
+
+struct MouseGestureNode
+{
 double x;
 double y;
 };
 
-struct _MouseGesture {
+static guint
+dist_sqr (guint x1, guint y1, guint x2, guint y2)
+{
+guint xdiff = abs(x1 - x2);
+guint ydiff = abs(y1 - y2);
+return xdiff * xdiff + ydiff * ydiff;
+}
+
+static float
+get_angle_for_direction (MouseGestureDirection direction)
+{
+return direction * 2 * M_PI / N_DIRECTIONS;
+}
+
+static MouseGestureDirection
+nearest_direction_for_angle (float angle)
+{
+/* move halfway to the next direction so we can floor to round */
+angle += M_PI / N_DIRECTIONS;
+
+/* ensure we stay within [0, 2pi) */
+if (angle = 2 * M_PI)
+angle -= 2 * M_PI;
+
+return (MouseGestureDirection)((angle * N_DIRECTIONS) / (2* M_PI));
+}
+
+static gboolean
+vector_follows_direction (float angle, float distance, MouseGestureDirection 
direction)
+{
+if (direction == STROKE_NONE)
+return distance  MINLENGTH / 2;
+
+float dir_angle = get_angle_for_direction (direction);
+if (fabsf(angle - dir_angle)  DEVIANCE || fabsf(angle - dir_angle + 2 * 
M_PI)  DEVIANCE)
+return TRUE;
+
+if(distance  MINLENGTH / 2)
+return TRUE;
+
+return FALSE;
+}
+
+/* returns the angle in the range [0, 2pi) (anticlockwise from east) from 
point 1 to 2 */
+static float
+get_angle_between_points (guint x1, guint y1, guint x2, guint y2)
+{
+float distance = sqrtf (dist_sqr (x1, y1, x2, y2));
+
+/* compute the angle of the vector from a to b */
+float cval=((signed int)x2 - (signed int)x1) / distance;
+float angle = acosf (cval);
+if(y2  y1)
+angle = 2 * M_PI - angle;
+
+return angle;
+}
+
+#define N_NODES 8
+
+struct _MouseGesture
+{
 MouseButton button;
-struct MouseGestureNode start;
-struct MouseGestureNode middle;
-struct MouseGestureNode end;
+MouseGestureDirection strokes[N_NODES + 1];
+struct MouseGestureNode locations[N_NODES];
+struct MouseGestureNode last_pos;
+float last_distance;
+/* the index 

[Xfce4-commits] midori:master Check if active form element is input before getting search text

2013-03-26 Thread Christian Dywan
Updating branch refs/heads/master
 to 82eac2fc760fb42b2f91e645abc27010470ecb1d (commit)
   from ea2ba1945057936372ed2ea5eaebc3c5ae90e1c7 (commit)

commit 82eac2fc760fb42b2f91e645abc27010470ecb1d
Author: Christian Dywan christ...@twotoasts.de
Date:   Tue Mar 26 08:37:23 2013 +0100

Check if active form element is input before getting search text

Fixes: https://bugs.launchpad.net/midori/+bug/1159631

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

diff --git a/midori/midori-searchaction.c b/midori/midori-searchaction.c
index 6857e07..fd0ff4c 100644
--- a/midori/midori-searchaction.c
+++ b/midori/midori-searchaction.c
@@ -928,8 +928,10 @@ midori_search_action_get_engine_for_form (WebKitWebView*   
  web_view,
 #endif
 
 active_element = webkit_dom_html_document_get_active_element 
((WebKitDOMHTMLDocument*)doc);
-active_form = webkit_dom_html_input_element_get_form 
((WebKitDOMHTMLInputElement*)active_element);
+if (!WEBKIT_DOM_IS_HTML_INPUT_ELEMENT (active_element))
+return NULL;
 
+active_form = webkit_dom_html_input_element_get_form 
((WebKitDOMHTMLInputElement*)active_element);
 if (!active_form)
 return NULL;
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Abstract checking valid actions and use for sending commands

2013-03-26 Thread Christian Dywan
Updating branch refs/heads/master
 to 8918d50f27d4e53ed9915ba086b322a0e0af28ee (commit)
   from 82eac2fc760fb42b2f91e645abc27010470ecb1d (commit)

commit 8918d50f27d4e53ed9915ba086b322a0e0af28ee
Author: Christian Dywan christ...@twotoasts.de
Date:   Tue Mar 26 08:52:59 2013 +0100

Abstract checking valid actions and use for sending commands

Fixes: https://bugs.launchpad.net/midori/+bug/1159630

 midori/midori-app.c |5 ++---
 midori/midori-browser.c |   26 +++---
 midori/midori-browser.h |4 
 3 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/midori/midori-app.c b/midori/midori-app.c
index 955f6fd..6677ddf 100644
--- a/midori/midori-app.c
+++ b/midori/midori-app.c
@@ -1123,9 +1123,8 @@ midori_app_send_command (MidoriApp* app,
 int i;
 for (i=0; command  command[i]; i++)
 {
-gboolean action_known = (gtk_action_group_get_action 
(midori_browser_get_action_group (browser), command[i]) != NULL);
-if (!action_known)
-g_warning (_(Unexpected action '%s'.), command[i]);
+if (!midori_browser_is_action (browser, command[i]))
+midori_error (_(Unexpected action '%s'.), command[i]);
 }
 gtk_widget_destroy (GTK_WIDGET (browser));
 }
diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 96baceb..48e74dc 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -529,6 +529,26 @@ midori_browser_update_history_title (MidoriBrowser* 
browser,
 midori_browser_update_history (item, website, access);
 }
 
+gboolean
+midori_browser_is_action (MidoriBrowser* browser,
+  const gchar*   name)
+{
+g_return_val_if_fail (MIDORI_IS_BROWSER (browser), FALSE);
+
+GtkAction* action = _action_by_name (browser, name);
+if (action)
+return TRUE;
+else if (strchr (name, '='))
+{
+gchar** parts = g_strsplit (name, =, 0);
+GObjectClass* class = G_OBJECT_GET_CLASS (browser-settings);
+GParamSpec* pspec = g_object_class_find_property (class, parts[0]);
+g_strfreev (parts);
+return pspec != NULL;
+}
+return FALSE;
+}
+
 static void
 _midori_browser_activate_action (MidoriBrowser* browser,
  const gchar*   name)
@@ -559,14 +579,14 @@ _midori_browser_activate_action (MidoriBrowser* browser,
 if (enum_value != NULL)
 g_object_set (browser-settings, parts[0], enum_value-value, 
NULL);
 else
-midori_error (_(Value '%s' is invalid for %s), parts[1], 
parts[0]);
+g_warning (_(Value '%s' is invalid for %s), parts[1], 
parts[0]);
 }
 else
-midori_error (_(Value '%s' is invalid for %s), parts[1], 
parts[0]);
+g_warning (_(Value '%s' is invalid for %s), parts[1], parts[0]);
 g_strfreev (parts);
 }
 else
-midori_error (_(Unexpected action '%s'.), name);
+g_warning (_(Unexpected action '%s'.), name);
 }
 
 static void
diff --git a/midori/midori-browser.h b/midori/midori-browser.h
index f054e5a..8036678 100644
--- a/midori/midori-browser.h
+++ b/midori/midori-browser.h
@@ -96,6 +96,10 @@ void
 midori_browser_activate_action(MidoriBrowser* browser,
const gchar*   name);
 
+gboolean
+midori_browser_is_action  (MidoriBrowser* browser,
+   const gchar*   name);
+
 void
 midori_browser_block_action   (MidoriBrowser* browser,
GtkAction* action);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Make toolbar drag/ drop work in GTK+3

2013-03-26 Thread Christian Dywan
Updating branch refs/heads/master
 to 7e2bbd1df5b32ce92b48a8d4fb039644776d0d34 (commit)
   from 8918d50f27d4e53ed9915ba086b322a0e0af28ee (commit)

commit 7e2bbd1df5b32ce92b48a8d4fb039644776d0d34
Author: Christian Dywan christ...@twotoasts.de
Date:   Tue Mar 26 09:01:24 2013 +0100

Make toolbar drag/ drop work in GTK+3

Fixes: https://bugs.launchpad.net/midori/+bug/1159521

 extensions/toolbar-editor.c |6 ++
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/extensions/toolbar-editor.c b/extensions/toolbar-editor.c
index 9348668..8966a70 100644
--- a/extensions/toolbar-editor.c
+++ b/extensions/toolbar-editor.c
@@ -276,16 +276,15 @@ static void tb_editor_drag_data_rcvd_cb(GtkWidget 
*widget, GdkDragContext *conte

gint x, gint y, GtkSelectionData *data, guint info,

guint ltime, TBEditorWidget *tbw)
 {
-#if !GTK_CHECK_VERSION(3,0,0) /* TODO */
GtkTreeView *tree = GTK_TREE_VIEW(widget);
gboolean del = FALSE;
 
-   if (data-length = 0  data-format == 8)
+   if (gtk_selection_data_get_length (data) = 0  
gtk_selection_data_get_format (data) == 8)
{
gboolean is_sep;
gchar *text = NULL;
 
-   text = (gchar*) data-data;
+   text = (gchar*) gtk_selection_data_get_data (data);
 
/* We allow re-ordering the Location item but not removing it 
from the list. */
if (g_strcmp0(text, Location) == 0  widget != 
tbw-drag_source)
@@ -334,7 +333,6 @@ static void tb_editor_drag_data_rcvd_cb(GtkWidget *widget, 
GdkDragContext *conte
tbw-drag_source = NULL; /* reset the value just to be sure */
tb_editor_free_path(tbw);
gtk_drag_finish(context, TRUE, del, ltime);
-#endif
 }
 
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master l10n: Updated Italian (it) translation to 96%

2013-03-26 Thread Transifex
Updating branch refs/heads/master
 to c35eee497240f58ef64e7014d0ce937584f0972c (commit)
   from c4a9decdc92fc383cfc9b85427a76f216d31bd00 (commit)

commit c35eee497240f58ef64e7014d0ce937584f0972c
Author: Edoardo Maria Elidoro edoardo.elid...@gmail.com
Date:   Tue Mar 26 15:10:47 2013 +0100

l10n: Updated Italian (it) translation to 96%

New status: 669 messages complete with 11 fuzzies and 12 untranslated.

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

 po/it.po |   11 +--
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/po/it.po b/po/it.po
index d46e333..48c0561 100644
--- a/po/it.po
+++ b/po/it.po
@@ -2960,7 +2960,7 @@ msgid 
 policies by marking the entries and clicking on iDelete/i.You can also 
 add a policy for a domain manually by entering the domain below, choosing 
 the policy and clicking on iAdd/i.
-msgstr 
+msgstr Di seguito è riportata una lista di siti web e delle regole ad essi 
associate. È possibile cancellare una regola selezionando una entry e cliccando 
su iCancella/i. È anche possibile aggiungere manualmente una regola 
associata ad un dominio inserendo il nome di tale dominio qui sotto, scegliendo 
la regola e cliccando su iAggiungi/i.
 
 #: 
../extensions/cookie-permissions/cookie-permission-manager-preferences-window.c:740
 #: ../extensions/cookie-permissions/cookie-permission-manager.c:561
@@ -3029,7 +3029,7 @@ msgstr 
 
 #: ../extensions/cookie-permissions/cookie-permission-manager.c:493
 msgid Till session end
-msgstr 
+msgstr Fino al termine della sessione.
 
 #: ../extensions/cookie-permissions/cookie-permission-manager.c:517
 #, c-format
@@ -3044,7 +3044,7 @@ msgstr Il sito %s vuole salvare un cookie
 #: ../extensions/cookie-permissions/cookie-permission-manager.c:523
 #, c-format
 msgid Multiple websites want to store %d cookies in total.
-msgstr 
+msgstr Più siti vogliono salvare complessivamente %d cookie.
 
 #: ../extensions/cookie-permissions/cookie-permission-manager.c:532
 msgid _Accept
@@ -3060,7 +3060,7 @@ msgstr Ne_ga
 
 #: ../extensions/cookie-permissions/cookie-permission-manager.c:535
 msgid Deny _this time
-msgstr 
+msgstr Nega ques_ta volta
 
 #: ../extensions/cookie-permissions/cookie-permission-manager.c:568
 msgid Path
@@ -3099,9 +3099,8 @@ msgid Pointer to sqlite database instance used by this 
extension
 msgstr 
 
 #: ../extensions/cookie-permissions/cookie-permission-manager.c:1036
-#, fuzzy
 msgid Database path
-msgstr Istanza database
+msgstr Percorso del Database
 
 #: ../extensions/cookie-permissions/cookie-permission-manager.c:1037
 msgid Path to sqlite database instance used by this extension
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-weather-plugin:master l10n: Updated Ukrainian (uk) translation to 98%

2013-03-26 Thread Transifex
Updating branch refs/heads/master
 to c719db1c4f9878d5cb1fb134d6bf950cf5ed5b08 (commit)
   from 6f271e2e984eb4493e57e9cc12e397cc7dbbae12 (commit)

commit c719db1c4f9878d5cb1fb134d6bf950cf5ed5b08
Author: Yarema aka Knedlyk yupad...@gmail.com
Date:   Tue Mar 26 20:06:46 2013 +0100

l10n: Updated Ukrainian (uk) translation to 98%

New status: 319 messages complete with 0 fuzzies and 5 untranslated.

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

 po/uk.po |8 
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/po/uk.po b/po/uk.po
index 133b2b9..3f21537 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -379,6 +379,11 @@ msgid 
 but small differences will have no influence on the weather data. Inside 
 Norway, this setting has no effect at all.
 msgstr 
+Для місць поза межами Норвегії модель рельєфу, яка використовується у 
веб-сервісі met.no, не є дуже добра, так що, зазвичай, необхідно вказати висоту 
в якості додаткового параметра, інакше отримані значення не будуть 
правильними.\n
+\n
+Додаток намагається автоматично визначити висоту за допомогою веб-сервісу 
GeoNames, але це не завжди може бути правильно, тому Ви маєте можливість 
змінити її тут. \n
+\n
+Висота наведена в метрах над рівнем моря, або ж в футах при зміні системи 
одиниць на сторінці. Вона повинна відповідати реальному значенню, але невеликі 
відмінності не матимуть жодного впливу на дані погоди. На території Норвегії ця 
опція не дає ефекту взагалі.
 
 #: ../panel-plugin/weather-config.c:572
 msgid _Timezone:
@@ -902,6 +907,9 @@ msgid 
 \n
 bNote:/b This is a calculated value not provided by met.no.
 msgstr 
+Це температура, до якої повітря повинно бути охолоджене для досягнення 100% 
відносної вологості, при відсутності змін у вмісті води. Дійшовши до точки роси 
процес охолодження зупиняється, оскільки випадає конденсат, який вивільняє 
тепло в повітря. Висока точка роси збільшує ймовірність дощів та сильних гроз. 
Точка роси дозволяє пророкування роси, інію, туману і мінімальної температури 
протягом ночі, і має вплив на рівень відчуття комфорту\n
+\n
+bПримітка:/b Ця величина не надається сервісом met.no
 
 #: ../panel-plugin/weather-config.c:1512
 msgid 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-weather-plugin:master l10n: Updated Ukrainian (uk) translation to 98%

2013-03-26 Thread Transifex
Updating branch refs/heads/master
 to fdbd75797ea30150e5d27ccf7dbc39a5ab3325f2 (commit)
   from c719db1c4f9878d5cb1fb134d6bf950cf5ed5b08 (commit)

commit fdbd75797ea30150e5d27ccf7dbc39a5ab3325f2
Author: Yarema aka Knedlyk yupad...@gmail.com
Date:   Tue Mar 26 20:18:32 2013 +0100

l10n: Updated Ukrainian (uk) translation to 98%

New status: 320 messages complete with 0 fuzzies and 4 untranslated.

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

 po/uk.po |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/po/uk.po b/po/uk.po
index 3f21537..1f5182c 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -951,7 +951,7 @@ msgid 
 equator, where temperatures are so low that they are mainly composed of ice 
 crystals. While typically thin and white in appearance, they can be seen in 
 a magnificent array of colors when the sun is low on the horizon.
-msgstr 
+msgstr Це повідомляє про високий рівень хмарного покриву у відсотках. За 
даними визначення ВМО, хмари вищого рівня можна знайти на висотах від 8000 до 
15000 м (26000 футів до 49 000 футів), або 10.000 м-18, 000 м (33,000-59,000 
футів) на екваторі, де температура настільки низька, що вони є в основному 
складаються з кристалів льоду. Хоча вони зазвичай тонкі і білі на вигляд, їх 
можна побачити в багатьох кольорах, коли сонце знаходиться низько над 
горизонтом.
 
 #: ../panel-plugin/weather-config.c:1553
 msgid 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-weather-plugin:master l10n: Updated Ukrainian (uk) translation to 99%

2013-03-26 Thread Transifex
Updating branch refs/heads/master
 to 9b9db55aebaefed83c41e18d6916e613b8d7d76c (commit)
   from fdbd75797ea30150e5d27ccf7dbc39a5ab3325f2 (commit)

commit 9b9db55aebaefed83c41e18d6916e613b8d7d76c
Author: Yarema aka Knedlyk yupad...@gmail.com
Date:   Tue Mar 26 20:25:14 2013 +0100

l10n: Updated Ukrainian (uk) translation to 99%

New status: 321 messages complete with 0 fuzzies and 3 untranslated.

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

 po/uk.po |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/po/uk.po b/po/uk.po
index 1f5182c..eee1f09 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -924,6 +924,9 @@ msgid 
 use a calculation model appropriate for your local climate and personal 
 preferences on the units page.
 msgstr 
+Також відома як iвідчувальна температура/i, iефективна температура/i, 
або те, що деякі погодні провайдери заявляють, що iвідчувається як/i. 
Людське відчуття температури не тільки в залежить від температури повітря, але 
і від теплового потоку, фізичної активності та індивідуального стану. Це дуже 
суб’єктивне значення, відчувальна температура дійсно може бути корисна для 
попередження про екстремальні умови (холод, спека) ​​\n
+\n
+b Примітка:/b Це значення не надається в сервісі met.no. Ви повинні 
використовувати розрахункову модель, яка підходить для вашого місцевого клімату 
і особистих налаштувань на сторінці одиниць.
 
 #: ../panel-plugin/weather-config.c:1526
 msgid 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-xkb-plugin:master Include rsvg-cairo.h for older librsvg versions

2013-03-26 Thread Igor Slepchin
Updating branch refs/heads/master
 to 0c6d0d34ca9784a9c279ffd2f72b35597cfd981e (commit)
   from 655047e33de37eefa17d2325434e6cd784e893ae (commit)

commit 0c6d0d34ca9784a9c279ffd2f72b35597cfd981e
Author: Igor Slepchin igor.slepc...@gmail.com
Date:   Tue Mar 26 16:16:41 2013 -0400

Include rsvg-cairo.h for older librsvg versions

librsvg 2.6.32 deprecated #including headers other than rsvg.h.
Their standard way to check the version is LIBRSVG_CHECK_VERSION
macro defined in librsvg-features.h. Unfortunately, including *that*
header file directly is also deprecated starting with 2.6.32 and
it was not pulled in by rsvg.h in earlier versions; hence, we need
to resort to configure-time check.

 configure.in.in  |2 ++
 panel-plugin/xkb-cairo.c |4 
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/configure.in.in b/configure.in.in
index 97f3612..f57a901 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -76,6 +76,8 @@ XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0])
 XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.8.0])
 XDT_CHECK_PACKAGE([LIBXKLAVIER], [libxklavier], [5.0])
 XDT_CHECK_PACKAGE([LIBRSVG], [librsvg-2.0], [2.18])
+dnl check librsvg version to see if including headers other than rsvg.h is 
deprecated
+XDT_CHECK_OPTIONAL_PACKAGE([LIBRSVG_2_36_2], [librsvg-2.0], [2.36.2], 
[librsvg_2.36.2], [deprecated includes of librsvg header files (always leave 
enabled)], yes)
 XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-1.0], [2.12])
 
 dnl ***
diff --git a/panel-plugin/xkb-cairo.c b/panel-plugin/xkb-cairo.c
index af598a7..27ad119 100644
--- a/panel-plugin/xkb-cairo.c
+++ b/panel-plugin/xkb-cairo.c
@@ -27,6 +27,10 @@
 #include xkb-util.h
 #include xfce4-xkb-plugin.h
 
+#ifndef HAVE_LIBRSVG_2_36_2
+#include librsvg/rsvg-cairo.h
+#endif
+
 #define XKB_PREFERRED_FONT Courier New, Courier 10 Pitch, Monospace Bold
 
 #define xkb_cairo_arc_for_flag(cr, x, y, r, a1, a2) \
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Creating branch 4.10_panel_support

2013-03-26 Thread Igor Slepchin
Updating branch refs/heads/4.10_panel_support
 as new branch
 to d34f6b4ee2fede6d1652394664cb400ca7d32ed0 (commit)

Branches are created implicitly by pushing. This mail only exists to 
let you know that there was code pushed to 

  refs/heads/4.10_panel_support

for the first time. Mails for the commits that lead to the creation 
of the branch will follow after this mail.
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Fix memory corruption.

2013-03-26 Thread Igor Slepchin
Updating branch refs/heads/4.10_panel_support
 to c258a60c55071a4c6fc100afddd7d0edc41dd192 (commit)
   from ae072268976b0f8ae0602581a338c7500f2c80f6 (commit)

commit c258a60c55071a4c6fc100afddd7d0edc41dd192
Author: Igor Slepchin igor.slepc...@gmail.com
Date:   Thu Jul 19 01:59:40 2012 -0400

Fix memory corruption.

g_free(c) in the original code was freeing memory at the pointer
that was incremented a few times since the allocation.

This is similar to ubuntu bug #899290 and fedora bug 589898.
(cherry picked from commit ac73bc9de624d322b318c2eda0ace7f0bee97a64)

 panel-plugin/xkb-util.c |   15 +++
 1 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/panel-plugin/xkb-util.c b/panel-plugin/xkb-util.c
index d0d0230..324928f 100644
--- a/panel-plugin/xkb-util.c
+++ b/panel-plugin/xkb-util.c
@@ -66,11 +66,10 @@ xkb_util_get_layout_string (const gchar *group_name, const 
gchar *variant)
 gchar*
 xkb_util_normalize_group_name (const gchar* group_name)
 {
-gchar *c;
+const gchar *c;
 gchar *result;
 gint cut_length;
 gint index_of_na = -1;
-gint index_tmp = -1;
 
 if (!group_name)
 return NULL;
@@ -78,27 +77,19 @@ xkb_util_normalize_group_name (const gchar* group_name)
 if (strlen (group_name) = 3)
 return g_strdup (group_name);
 
-c = g_strdup (group_name);
-
-while (*c)
+for (c = group_name; *c; c++)
 {
-index_tmp++;
-
 if (!((*c = 'a'  *c = 'z') || (*c = 'A'  *c = 'Z')))
 {
-index_of_na = index_tmp;
+index_of_na = group_name - c;
 break;
 }
-
-c++;
 }
 
 cut_length = (index_of_na != -1  index_of_na = 3) ? index_of_na : 3;
 
 result = g_strndup (group_name, cut_length);
 
-g_free (c);
-
 return result;
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Add license and plugin version to the About dialog.

2013-03-26 Thread Igor Slepchin
Updating branch refs/heads/4.10_panel_support
 to c7e8f482fd2ffd49feda3feea729f24a88271f37 (commit)
   from c258a60c55071a4c6fc100afddd7d0edc41dd192 (commit)

commit c7e8f482fd2ffd49feda3feea729f24a88271f37
Author: Igor Slepchin igor.slepc...@gmail.com
Date:   Thu Jul 19 16:47:59 2012 -0400

Add license and plugin version to the About dialog.

Also, let the compiler determine the length of authors array.
(cherry picked from commit ffbcc2b8473cd1b2896b11c4b1c6f2e226ec1cd8)

 panel-plugin/xkb-settings-dialog.c |6 +-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/xkb-settings-dialog.c 
b/panel-plugin/xkb-settings-dialog.c
index e792725..060dac9 100644
--- a/panel-plugin/xkb-settings-dialog.c
+++ b/panel-plugin/xkb-settings-dialog.c
@@ -747,7 +747,7 @@ void
 xfce_xkb_about (XfcePanelPlugin *plugin)
 {
 GtkWidget *about;
-const gchar* authors[3] = {
+const gchar* authors[] = {
 Alexander Iliev sasoil...@mamul.org,
 Gauvain Pocentek gauvainpocen...@gmail.com,
 NULL
@@ -756,8 +756,12 @@ xfce_xkb_about (XfcePanelPlugin *plugin)
 about = gtk_about_dialog_new ();
 gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (about),
 _(Keyboard Layouts Plugin));
+gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (about),
+PACKAGE_VERSION);
 gtk_about_dialog_set_logo (GTK_ABOUT_DIALOG (about),
 NULL);
+gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (about),
+xfce_get_license_text (XFCE_LICENSE_TEXT_GPL));
 gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (about),
 (const gchar**) authors);
 gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG (about),
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Look for .rc file in system dirs as well.

2013-03-26 Thread Igor Slepchin
Updating branch refs/heads/4.10_panel_support
 to 264ff9a488c5d4ddfabe6d954e509dd42301cf63 (commit)
   from c7e8f482fd2ffd49feda3feea729f24a88271f37 (commit)

commit 264ff9a488c5d4ddfabe6d954e509dd42301cf63
Author: Szalai Bandi szalai.ba...@gmail.com
Date:   Mon Jul 23 14:33:07 2012 -0400

Look for .rc file in system dirs as well.

The patch is from bug 3263.
(cherry picked from commit cb50bc31797bf34d4896fefdcd4c99641131854a)

 panel-plugin/xfce4-xkb-plugin.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/xfce4-xkb-plugin.c b/panel-plugin/xfce4-xkb-plugin.c
index 6a0635a..e137ee2 100644
--- a/panel-plugin/xfce4-xkb-plugin.c
+++ b/panel-plugin/xfce4-xkb-plugin.c
@@ -168,7 +168,7 @@ xkb_new (XfcePanelPlugin *plugin)
 xkb-settings = g_new0 (t_xkb_settings, 1);
 xkb-plugin = plugin;
 
-filename = xfce_panel_plugin_save_location (plugin, TRUE);
+filename = xfce_panel_plugin_lookup_rc_file (plugin);
 if ((!filename) || (!xkb_load_config (xkb, filename)))
 {
 xkb_load_default (xkb);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Reset the current group to 0 whenever config change is detected.

2013-03-26 Thread Igor Slepchin
Updating branch refs/heads/4.10_panel_support
 to eb9727605d273572f03509a5c74c2d47fca6e6a7 (commit)
   from 264ff9a488c5d4ddfabe6d954e509dd42301cf63 (commit)

commit eb9727605d273572f03509a5c74c2d47fca6e6a7
Author: Igor Slepchin igor.slepc...@gmail.com
Date:   Mon Jul 23 14:34:40 2012 -0400

Reset the current group to 0 whenever config change is detected.

This avoids some weirdness when the layout change causes the current
group to change/disappear. Besides, we're resetting the rest of
the settings anyway.
(cherry picked from commit d7490a02ab8cd69a6e161e160f76adc2a600105e)

 panel-plugin/xkb-config.c |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/xkb-config.c b/panel-plugin/xkb-config.c
index 2c5af77..b2199b7 100644
--- a/panel-plugin/xkb-config.c
+++ b/panel-plugin/xkb-config.c
@@ -570,7 +570,10 @@ xkb_config_xkl_config_changed (XklEngine *engine)
 xkb_config_update_settings (config-settings);
 
 if (config-callback != NULL)
-config-callback (xkb_config_get_current_group (), TRUE, 
config-callback_data);
+{
+xkb_config_set_group (0);
+config-callback (0, TRUE, config-callback_data);
+}
 }
 
 gint
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Use configured text size when drawing text labels for missing flags. (cherry picked from commit c627b1b55afd107c634fd8530c781fbea2603829)

2013-03-26 Thread Igor Slepchin
Updating branch refs/heads/4.10_panel_support
 to e9160a826a448fa101c960eb19fba90c156967c0 (commit)
   from eb9727605d273572f03509a5c74c2d47fca6e6a7 (commit)

commit e9160a826a448fa101c960eb19fba90c156967c0
Author: Igor Slepchin igor.slepc...@gmail.com
Date:   Wed Jul 25 23:14:59 2012 -0400

Use configured text size when drawing text labels for missing flags.
(cherry picked from commit c627b1b55afd107c634fd8530c781fbea2603829)

 panel-plugin/xkb-cairo.c |3 ++-
 panel-plugin/xkb-cairo.h |1 +
 panel-plugin/xkb-callbacks.c |1 +
 3 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/xkb-cairo.c b/panel-plugin/xkb-cairo.c
index 3b828ec..86af836 100644
--- a/panel-plugin/xkb-cairo.c
+++ b/panel-plugin/xkb-cairo.c
@@ -55,6 +55,7 @@ xkb_cairo_draw_flag (cairo_t *cr,
  gint width,
  gint height,
  gint variant_markers_count,
+ gint textsize,
  GdkColor fgcolor)
 {
 gchar *filename;
@@ -81,7 +82,7 @@ xkb_cairo_draw_flag (cairo_t *cr,
 actual_width, actual_height,
 width, height,
 variant_markers_count,
-DISPLAY_TEXTSIZE_SMALL, // not used for flag layout
+textsize,
 fgcolor);
 return;
 }
diff --git a/panel-plugin/xkb-cairo.h b/panel-plugin/xkb-cairo.h
index a8ecf32..e29d82b 100644
--- a/panel-plugin/xkb-cairo.h
+++ b/panel-plugin/xkb-cairo.h
@@ -42,6 +42,7 @@ voidxkb_cairo_draw_flag (cairo_t *cr,
  gint width,
  gint height,
  gint variant_markers_count,
+ gint textsize,
  GdkColor fgcolor);
 
 voidxkb_cairo_draw_label(cairo_t *cr,
diff --git a/panel-plugin/xkb-callbacks.c b/panel-plugin/xkb-callbacks.c
index d12e086..36e5375 100644
--- a/panel-plugin/xkb-callbacks.c
+++ b/panel-plugin/xkb-callbacks.c
@@ -121,6 +121,7 @@ xkb_plugin_layout_image_exposed (GtkWidget *widget,
 actual_hsize, actual_vsize,
 xkb-hsize, xkb-vsize,
 xkb_config_variant_index_for_group (-1),
+xkb-display_textsize,
 fgcolor
 );
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Add myself to authors list.

2013-03-26 Thread Igor Slepchin
Updating branch refs/heads/4.10_panel_support
 to 2a4fefb012360b1d4b6c91f48841f90ed8505ba5 (commit)
   from e9160a826a448fa101c960eb19fba90c156967c0 (commit)

commit 2a4fefb012360b1d4b6c91f48841f90ed8505ba5
Author: Igor Slepchin igor.slepc...@gmail.com
Date:   Fri Jul 27 21:22:41 2012 -0400

Add myself to authors list.

My 30sec of fame...
(cherry picked from commit 18afdce6c6e868426fd8f188478dabc23fb4cf46)

 AUTHORS|1 +
 panel-plugin/xkb-settings-dialog.c |1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 57f793b..9706e65 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -2,3 +2,4 @@ Benedikt Meurer benedikt.meu...@unix-ag.uni-siegen.de
 Alexander Iliev sasoil...@mamul.org
 Gauvain Pocentek gauvainpocen...@gmail.com
 Azamat H. Hackimov azamat.hacki...@gmail.com
+Igor Slepchin igor.slepc...@gmail.com
\ No newline at end of file
diff --git a/panel-plugin/xkb-settings-dialog.c 
b/panel-plugin/xkb-settings-dialog.c
index 060dac9..0dab764 100644
--- a/panel-plugin/xkb-settings-dialog.c
+++ b/panel-plugin/xkb-settings-dialog.c
@@ -750,6 +750,7 @@ xfce_xkb_about (XfcePanelPlugin *plugin)
 const gchar* authors[] = {
 Alexander Iliev sasoil...@mamul.org,
 Gauvain Pocentek gauvainpocen...@gmail.com,
+Igor Slepchin igor.slepc...@gmail.com,
 NULL
 };
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Stop drawing the layout label if normalized_group_name fails UTF8 validity check. (cherry picked from commit 91940da28c9b4b7445cd058fd07a84e9ca0d5

2013-03-26 Thread Igor Slepchin
Updating branch refs/heads/4.10_panel_support
 to fba80b77c469f6731d140ff61fabdec8b3f5e695 (commit)
   from 2a4fefb012360b1d4b6c91f48841f90ed8505ba5 (commit)

commit fba80b77c469f6731d140ff61fabdec8b3f5e695
Author: Igor Slepchin igor.slepc...@gmail.com
Date:   Fri Jul 27 23:59:23 2012 -0400

Stop drawing the layout label if normalized_group_name fails UTF8 validity 
check.
(cherry picked from commit 91940da28c9b4b7445cd058fd07a84e9ca0d58c8)

 panel-plugin/xkb-cairo.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/panel-plugin/xkb-cairo.c b/panel-plugin/xkb-cairo.c
index 86af836..8de3ec5 100644
--- a/panel-plugin/xkb-cairo.c
+++ b/panel-plugin/xkb-cairo.c
@@ -159,6 +159,7 @@ xkb_cairo_draw_label (cairo_t *cr,
 {
 g_object_unref (layout);
 g_free (normalized_group_name);
+return;
 }
 
 pango_layout_set_text (layout, normalized_group_name, -1);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Get rid of a redundant if (handle) check.

2013-03-26 Thread Igor Slepchin
Updating branch refs/heads/4.10_panel_support
 to 0776b4226b2e2d705ce1c3c4817133c6b0fe9895 (commit)
   from 60213ecc3500cc35fbfc38ff00387309b7762842 (commit)

commit 0776b4226b2e2d705ce1c3c4817133c6b0fe9895
Author: Igor Slepchin igor.slepc...@gmail.com
Date:   Mon Sep 10 17:50:09 2012 -0400

Get rid of a redundant if (handle) check.

We did the same exact check a few lines earlier.
(cherry picked from commit 1474d4a846cc20781f99b7718e4b7372d47be55f)

 panel-plugin/xkb-cairo.c |   45 -
 1 files changed, 20 insertions(+), 25 deletions(-)

diff --git a/panel-plugin/xkb-cairo.c b/panel-plugin/xkb-cairo.c
index 8de3ec5..9c80444 100644
--- a/panel-plugin/xkb-cairo.c
+++ b/panel-plugin/xkb-cairo.c
@@ -92,39 +92,34 @@ xkb_cairo_draw_flag (cairo_t *cr,
 scalex = (double) (width - 4) / dim.width;
 scaley = (double) (height - 4) / dim.height;
 
-if (handle)
-{
-layoutx = (actual_width - width) / 2 + 2;
-layouty = (actual_height - height) / 2 + 2;
-cairo_translate (cr, layoutx, layouty);
-
-//cairo_translate (cr, 2, 2);
+layoutx = (actual_width - width) / 2 + 2;
+layouty = (actual_height - height) / 2 + 2;
+cairo_translate (cr, layoutx, layouty);
 
-cairo_save (cr);
+cairo_save (cr);
 
-cairo_scale (cr, scalex, scaley);
-rsvg_handle_render_cairo (handle, cr);
+cairo_scale (cr, scalex, scaley);
+rsvg_handle_render_cairo (handle, cr);
 
-cairo_restore (cr);
+cairo_restore (cr);
 
-/* draw variant_markers_count circles */
-for (i = 0; i  variant_markers_count; i++)
-{
-cairo_set_source_rgb (cr, 0, 0, 0);
-
-cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
-cairo_set_line_width (cr, 1);
+/* draw variant_markers_count circles */
+for (i = 0; i  variant_markers_count; i++)
+{
+cairo_set_source_rgb (cr, 0, 0, 0);
 
-xkb_cairo_arc_for_flag (cr, -(7 * i) + 4, 4, 2.5, 0, 2 * G_PI);
+cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
+cairo_set_line_width (cr, 1);
 
-cairo_set_source_rgb (cr, 0, 0, 0);
-cairo_fill_preserve (cr);
-cairo_set_source_rgb (cr, 1, 1, 1);
-cairo_stroke (cr);
-}
+xkb_cairo_arc_for_flag (cr, -(7 * i) + 4, 4, 2.5, 0, 2 * G_PI);
 
-g_object_unref (handle);
+cairo_set_source_rgb (cr, 0, 0, 0);
+cairo_fill_preserve (cr);
+cairo_set_source_rgb (cr, 1, 1, 1);
+cairo_stroke (cr);
 }
+
+g_object_unref (handle);
 }
 
 void
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Add Kazakh flag (bug #9186). (cherry picked from commit 886096b02e9f5ac415ba39c634fd7530124c7d96)

2013-03-26 Thread Igor Slepchin
Updating branch refs/heads/4.10_panel_support
 to 60213ecc3500cc35fbfc38ff00387309b7762842 (commit)
   from fba80b77c469f6731d140ff61fabdec8b3f5e695 (commit)

commit 60213ecc3500cc35fbfc38ff00387309b7762842
Author: Igor Slepchin igor.slepc...@gmail.com
Date:   Wed Aug 22 17:32:38 2012 -0400

Add Kazakh flag (bug #9186).
(cherry picked from commit 886096b02e9f5ac415ba39c634fd7530124c7d96)

 flags/Makefile.am |1 +
 flags/kz.svg  |  121 +
 2 files changed, 122 insertions(+), 0 deletions(-)

diff --git a/flags/Makefile.am b/flags/Makefile.am
index b48d931..d432851 100644
--- a/flags/Makefile.am
+++ b/flags/Makefile.am
@@ -48,6 +48,7 @@ flags_DATA = ae.svg \
kp.svg \
kr.svg \
kw.svg \
+   kz.svg \
la.svg \
lb.svg \
lt.svg \
diff --git a/flags/kz.svg b/flags/kz.svg
new file mode 100644
index 000..3f86704
--- /dev/null
+++ b/flags/kz.svg
@@ -0,0 +1,121 @@
+svg xmlns=http://www.w3.org/2000/svg; 
xmlns:xlink=http://www.w3.org/1999/xlink; width=600 height=300 viewBox=0 
0 2000 1000
+
+titleFlag of Kazakhstan/title
+
+defs
+
+path id=be 
d=M0-76.45c4-0.05,5.5-2.55,5.5-5.55,0-4-5.5-23.05-5.5-23.05s-5.5,19.05-5.5,23.05c0,3,1.5,5.55,5.5,5.55z/
+
+path id=orn 
d=M-1,15c0-10,9-15.14,16.072-15.14,9.528,0,14.601,5.683,14.601,13.122,0,4.2169-0.77453,6.863-2.7237,10.899,0,0-15.717,32.606-21.836,45.217-0.76309,1.5729-1.0093,3.3634-1.0093,5.9885,0,4.0539,3.9416,7.3673,8.0744,7.4688,3.7675,0.094,7.8725-3.5039,7.8725-7.6033,0-4.9796-2.5894-7.1996-5.2483-7.1996-3.2718,0-4.5755,1.3418-4.5755,3.6335,0,1.5968,0.77308,2.2877,1.884,2.2877,2.8063,0,2.0186-3.768,2.0186-3.768,1.3938,0.3044,2.5388,1.725,1.884,3.4989,1.0196,0.22647,1.9747,0.7604,2.7251,1.6149-0.75228,0.72756-1.6152,1.2892-2.7251,1.4803,0.65722,2.1644-0.221,3.222-2.1195,3.6671,0.38311-0.8326,0.39629-1.5985,0.26914-2.3214-2.9889,0.84788-7.5697-0.5014-7.5697-5.652,0-5.1138,3.5576-9.4196,10.228-8.3435-1.5869-0.75687-2.394-2.3055-2.5569-4.0372,1.2112,0.471,2.5569,0.53829,2.5569,0.53829-0.77989-1.3719-1.8631-2.5544-1.8167-5.2483,1.2367,0.56086,2.3851,1.5994,3.9699,0.94201-2.4873-4.8826,0.56859-11.599,8.3435-13.188-2.8455,3.3273-4.239,6.9201-4.239,10.497,0,11.592,3.2297,13.5
 
4,3.2297,21.599,0,3.3717-1.7375,7.013-5.181,9.4874v-0.13457c2.276,0.608,3.734,1.726,4.572,3.245-5.2,1.471-12.759,1.444-16.818-0.149-4.6656-0.539-7.9221-4.11-8.8818-5.922-0.95972-1.811-2.8237-8.364,0-14.264,3.0903-6.457,17.661-37.277,22.204-46.966,0.9636-2.055,1.5476-4.2343,1.5476-6.5941,0-5.9349-5.4502-8.0071-8.5454-8.0071-3.7007,0-7.4688,2.8125-7.4688,6.3249,0,2.2256,1.2112,3.5662,2.9606,3.5662,4.1833,0,3.9292-3.55,3.0952-5.7866,2.6035,1.1676,4.1168,3.252,3.7007,5.4502,1.474,0.2014,2.877,0.89888,4.1717,2.355-1.0187,1.2832-2.2612,2.2532-4.1717,2.2877,0.83444,3.41-1.4543,4.8522-3.7007,5.652,0.71068-2.5027,1.1772-5.3829-3.0952-5.3829-3.115,0-5.5679-0.53829-6.9978-2.5569-0.084108,2.6914-0.33643,13.323-0.33643,13.323-0.17943,3.995,5.3605,3.8808,8.8818,2.6914-1.3289,4.6018-4.0543,7.0898-10.362,6.4595,1.5308,0.63922,3.1625,2.0762,3.1625,4.8446-0.001,3.746-3.0475,7.896-5.0475,9.123l-1-39z/
+
+path id=uorn 
d=m0-35.599s4.7531-3.9844,6.3671-1.9859c2.5961,3.2144-7.982,19.225-7.982,24.863,0,9.255,6.1902,11.772,13.834,13.093,5.129,0.8871,13.481-0.371,13.481-0.371-1.5725-2.1079-2.5953-2.729-5.245-2.8975,2.9499-1.5278,5.9538-4.8441,5.9538-10.007,0-7.9617-3.2855-11.243-3.2855-20.219,0-4.9792,4.0929-11.318,4.0929-11.318-7.2343,0.72228-10.82,7.4047-8.7799,12.745-1.1516,0.16548-2.1972-0.09311-3.0952-0.94201-0.52945,1.4803,0.30635,3.1985,1.426,4.6788-0.90173,0.48068-1.564,0.19242-3-0.10332,0.13618,1.5252,1.0523,3.1455,3.2936,4.6706-6.5041-1.6845-10.506,2.8376-10.506,7.5715,0,3.5758,2.5119,6.1386,4.9671,6.1386,0.79347,0,1.959-0.326,2.6166-0.8156,0.46352,0.98414,0.22467,2.3013-0.25282,3.2855,1.7996-0.47454,2.9418-1.5407,2.1287-3.7599,1.3822-0.12667,2.4817-0.59257,3.2297-1.4803-0.75781-0.96814-1.9074-1.5258-3.2297-1.4803,1.0064-2.0718-0.11515-3.2317-1.7494-4.1718,0,0,1.0393,4.1717-1.6149,4.1717-1.1935,0-2.281-0.38758-2.281-2.1422,0-1.5279,1.339-3.6444,4.4341-3.5098,3.0952,0.
 
13457,5.6045,2.1289,5.6045,7.0577,0,4.5468-3.6762,6.8081-8.5205,6.9542-4.3688,0.13457-7.6662-2.2263-7.6662-6.7219,0-5.9835,8.6588-19.622,8.6588-24.954,0-4.0006-3.6064-6.2337-7.1351-6.2337-4.5755,0-8.4359,4.5197-8.4359,4.5197l2.688,3.362z/
+
+/defs
+
+rect height=1000 width=2000 y=0 x=0 fill=#00afca/
+
+use xlink:href=#use4303 transform=matrix(-1,0,0,1,240,0) height=1000 
width=2000 y=0 x=0/
+
+use xlink:href=#be 
transform=matrix(1.960637,0.3899949,-0.3899949,1.960637,1080.4716,420) 
height=500 width=1000 y=0 x=0 fill=#fec50c/
+
+use xlink:href=#be 
transform=matrix(1.8468795,0.7650026,-0.7650026,1.8468795,1080.4716,420) 
height=500 width=1000 y=0 x=0 fill=#fec50c/
+
+use xlink:href=#be 

[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Update the tooltip whenever the selected layout changes.

2013-03-26 Thread Igor Slepchin
Updating branch refs/heads/4.10_panel_support
 to 5f5cd2151d9961c5bc89db983228e4e8074b331f (commit)
   from 0776b4226b2e2d705ce1c3c4817133c6b0fe9895 (commit)

commit 5f5cd2151d9961c5bc89db983228e4e8074b331f
Author: Enrique cqu...@ovi.com
Date:   Tue Sep 18 13:34:58 2012 -0400

Update the tooltip whenever the selected layout changes.

Bug 9286.
(cherry picked from commit 6a0acf5d78451e4c4648d99a1b7f4c0d52d78a66)

 panel-plugin/xfce4-xkb-plugin.c |8 
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/panel-plugin/xfce4-xkb-plugin.c b/panel-plugin/xfce4-xkb-plugin.c
index e137ee2..2afc9bb 100644
--- a/panel-plugin/xfce4-xkb-plugin.c
+++ b/panel-plugin/xfce4-xkb-plugin.c
@@ -420,8 +420,16 @@ xkb_initialize_menu (t_xkb *xkb)
 void
 xkb_refresh_gui (t_xkb *xkb)
 {
+GdkDisplay * display;
+
 /* Part of the image may remain visible after display type change */
 gtk_widget_queue_draw_area (xkb-btn, 0, 0,
 xkb-button_hsize, xkb-button_vsize);
+
+display = gdk_display_get_default();
+if (display)
+{
+gtk_tooltip_trigger_tooltip_query(display);
+}
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Don't crash if keyboard model is not set

2013-03-26 Thread Igor Slepchin
Updating branch refs/heads/4.10_panel_support
 to cdc7ac5c1759e5b065ec6ddf95f57d10d0fc87cc (commit)
   from 5f5cd2151d9961c5bc89db983228e4e8074b331f (commit)

commit cdc7ac5c1759e5b065ec6ddf95f57d10d0fc87cc
Author: Igor Slepchin igor.slepc...@gmail.com
Date:   Mon Mar 25 16:41:33 2013 -0400

Don't crash if keyboard model is not set

 panel-plugin/xkb-settings-dialog.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/panel-plugin/xkb-settings-dialog.c 
b/panel-plugin/xkb-settings-dialog.c
index 0dab764..0d19c43 100644
--- a/panel-plugin/xkb-settings-dialog.c
+++ b/panel-plugin/xkb-settings-dialog.c
@@ -304,7 +304,7 @@ xkb_settings_set_kbd_combo_default_value (t_xkb *xkb)
 return;
 
 gtk_tree_model_get (model, iter, NOM, id, -1);
-if (strcmp (id, config-model) == 0 )
+if (config-model  strcmp (id, config-model) == 0 )
 gtk_combo_box_set_active_iter (GTK_COMBO_BOX (xkb-kbd_model_combo), 
iter);
 else
 {
@@ -313,7 +313,7 @@ xkb_settings_set_kbd_combo_default_value (t_xkb *xkb)
 g_free (id);
 gtk_tree_model_get (model, iter, NOM, id, -1);
 
-if (strcmp (id, config-model) == 0)
+if (config-model  strcmp (id, config-model) == 0)
 {
 gtk_combo_box_set_active_iter (GTK_COMBO_BOX 
(xkb-kbd_model_combo), iter);
 break;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Fix rsvg #include warning

2013-03-26 Thread Igor Slepchin
Updating branch refs/heads/4.10_panel_support
 to 964fcb1cd2aa57c2d92cd6ab0591618eb85643dd (commit)
   from cdc7ac5c1759e5b065ec6ddf95f57d10d0fc87cc (commit)

commit 964fcb1cd2aa57c2d92cd6ab0591618eb85643dd
Author: Igor Slepchin igor.slepc...@gmail.com
Date:   Mon Mar 11 17:43:10 2013 -0400

Fix rsvg #include warning

Including rsvg headers other than rsvg.h produces a warning;
see commit 3b8adaa7e780b85695306292dfb23107d219bb34 in librsvg.
(cherry picked from commit 9a4599dfe96247d0b3095aeec085b7c8e669545a)

 panel-plugin/xkb-cairo.h |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/xkb-cairo.h b/panel-plugin/xkb-cairo.h
index e29d82b..13b790a 100644
--- a/panel-plugin/xkb-cairo.h
+++ b/panel-plugin/xkb-cairo.h
@@ -31,7 +31,6 @@
 #include gdk/gdk.h
 #include cairo/cairo.h
 #include librsvg/rsvg.h
-#include librsvg/rsvg-cairo.h
 #include pango/pangocairo.h
 
 voidxkb_cairo_draw_flag (cairo_t *cr,
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Compatibility with 4.10 panel

2013-03-26 Thread Igor Slepchin
Updating branch refs/heads/4.10_panel_support
 to 71a87726f0cbbad1df2143c7f84d885a1b6df7e9 (commit)
   from 964fcb1cd2aa57c2d92cd6ab0591618eb85643dd (commit)

commit 71a87726f0cbbad1df2143c7f84d885a1b6df7e9
Author: Igor Slepchin igor.slepc...@gmail.com
Date:   Mon Mar 25 16:42:19 2013 -0400

Compatibility with 4.10 panel

The xkb plugin now always occupies one row only 
(xfce_panel_plugin_set_small).
If the panel has only one row, the plugin requests a rectangular shape
(just as it used to); with more than one panel row, the plugin
will be the standard square so as to better blend in with other
plugins at the expense of having smaller display area.

Bug 8762
(largely cherry picked from commit b8861cade0f00d2443358a43af8826b170673175)

 panel-plugin/xfce4-xkb-plugin.c |   29 +++--
 panel-plugin/xkb-cairo.c|4 +++-
 panel-plugin/xkb-callbacks.c|   25 +++--
 panel-plugin/xkb-config.c   |9 -
 4 files changed, 53 insertions(+), 14 deletions(-)

diff --git a/panel-plugin/xfce4-xkb-plugin.c b/panel-plugin/xfce4-xkb-plugin.c
index 2afc9bb..879346b 100644
--- a/panel-plugin/xfce4-xkb-plugin.c
+++ b/panel-plugin/xfce4-xkb-plugin.c
@@ -90,6 +90,8 @@ xfce_xkb_construct (XfcePanelPlugin *plugin)
 t_xkb *xkb = xkb_new (plugin);
 xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, UTF-8);
 
+xfce_panel_plugin_set_small (plugin, TRUE);
+
 g_signal_connect (plugin, orientation-changed,
 G_CALLBACK (xfce_xkb_orientation_changed), xkb);
 
@@ -179,6 +181,7 @@ xkb_new (XfcePanelPlugin *plugin)
 gtk_button_set_relief (GTK_BUTTON (xkb-btn), GTK_RELIEF_NONE);
 gtk_container_add (GTK_CONTAINER (xkb-plugin), xkb-btn);
 xfce_panel_plugin_add_action_widget (xkb-plugin, xkb-btn);
+xkb-button_state = GTK_STATE_NORMAL;
 
 gtk_widget_show (xkb-btn);
 g_signal_connect (xkb-btn, clicked, G_CALLBACK 
(xkb_plugin_button_clicked), xkb);
@@ -335,17 +338,37 @@ xkb_load_default (t_xkb *xkb)
 static gboolean
 xkb_calculate_sizes (t_xkb *xkb, GtkOrientation orientation, gint panel_size)
 {
+guint nrows;
+
+nrows   = xfce_panel_plugin_get_nrows (xkb-plugin);
+panel_size /= nrows;
+TRACE (calculate_sizes(%p: %d,%d), xkb, panel_size, nrows);
 
 switch (orientation)
 {
 case GTK_ORIENTATION_HORIZONTAL:
 xkb-vsize = panel_size;
-xkb-hsize = (int) (1.33 * panel_size);
+if (nrows  1)
+{
+xkb-hsize = xkb-vsize;
+}
+else
+{
+xkb-hsize = (int) (1.33 * panel_size);
+}
+
 gtk_widget_set_size_request (xkb-btn, xkb-hsize, xkb-vsize);
 break;
 case GTK_ORIENTATION_VERTICAL:
 xkb-hsize = panel_size;
-xkb-vsize = (int) (0.75 * panel_size);
+if (nrows  1)
+{
+xkb-vsize = xkb-hsize;
+}
+else
+{
+xkb-vsize = (int) (0.75 * panel_size);
+}
 if (xkb-vsize  10) xkb-vsize = 10;
 gtk_widget_set_size_request (xkb-btn, xkb-hsize, xkb-vsize);
 break;
@@ -353,6 +376,8 @@ xkb_calculate_sizes (t_xkb *xkb, GtkOrientation 
orientation, gint panel_size)
 break;
 }
 
+DBG (size requested: h/v (%p: %d/%d), xkb, xkb-hsize, xkb-vsize);
+
 xkb_refresh_gui (xkb);
 return TRUE;
 }
diff --git a/panel-plugin/xkb-cairo.c b/panel-plugin/xkb-cairo.c
index 9c80444..8a3a4ef 100644
--- a/panel-plugin/xkb-cairo.c
+++ b/panel-plugin/xkb-cairo.c
@@ -119,6 +119,7 @@ xkb_cairo_draw_flag (cairo_t *cr,
 cairo_stroke (cr);
 }
 
+rsvg_handle_close (handle, NULL);
 g_object_unref (handle);
 }
 
@@ -150,7 +151,8 @@ xkb_cairo_draw_label (cairo_t *cr,
 layout = pango_cairo_create_layout (cr);
 normalized_group_name = xkb_util_normalize_group_name (group_name);
 
-if (!g_utf8_validate (normalized_group_name, -1, NULL))
+if (!normalized_group_name ||
+!g_utf8_validate (normalized_group_name, -1, NULL))
 {
 g_object_unref (layout);
 g_free (normalized_group_name);
diff --git a/panel-plugin/xkb-callbacks.c b/panel-plugin/xkb-callbacks.c
index 36e5375..e8f6d6e 100644
--- a/panel-plugin/xkb-callbacks.c
+++ b/panel-plugin/xkb-callbacks.c
@@ -74,6 +74,9 @@ xkb_plugin_button_size_allocated (GtkWidget *button,
 {
 xkb-button_hsize = allocation-width;
 xkb-button_vsize = allocation-height;
+
+DBG (size_allocated: h/v (%p: %d/%d),
+ xkb, xkb-button_hsize, xkb-button_vsize);
 }
 
 gboolean
@@ -103,23 +106,33 @@ xkb_plugin_layout_image_exposed (GtkWidget *widget,
 cairo_t *cr;
 GtkStyle *style;
 GdkColor fgcolor;
-gint actual_hsize, actual_vsize;
+gint actual_hsize, actual_vsize, panel_size;
+gint vsize;
 
 actual_hsize = (xkb-button_hsize  xkb-hsize) ? 

[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Scale layout label text to the size of the button

2013-03-26 Thread Igor Slepchin
Updating branch refs/heads/4.10_panel_support
 to cb13f27b1a2b14a412a260b58a42a35c50dffc92 (commit)
   from 71a87726f0cbbad1df2143c7f84d885a1b6df7e9 (commit)

commit cb13f27b1a2b14a412a260b58a42a35c50dffc92
Author: Igor Slepchin igor.slepc...@gmail.com
Date:   Mon Mar 25 16:50:53 2013 -0400

Scale layout label text to the size of the button

large text size will scale to the max size that fits into the button;
medium size is 0.7 of that size; small is 0.475 of the max.

The default text label size is now large.
(largely cherry picked from commit e0fe4255033fab3615006ca23358bfbb7dba1604)

 panel-plugin/xfce4-xkb-plugin.c |4 +-
 panel-plugin/xkb-cairo.c|   82 +++
 panel-plugin/xkb-cairo.h|   16 
 3 files changed, 67 insertions(+), 35 deletions(-)

diff --git a/panel-plugin/xfce4-xkb-plugin.c b/panel-plugin/xfce4-xkb-plugin.c
index 879346b..073fba7 100644
--- a/panel-plugin/xfce4-xkb-plugin.c
+++ b/panel-plugin/xfce4-xkb-plugin.c
@@ -297,7 +297,7 @@ xkb_load_config (t_xkb *xkb, const gchar *filename)
 xfce_rc_set_group (rcfile, NULL);
 
 xkb-display_type = xfce_rc_read_int_entry (rcfile, display_type, 
DISPLAY_TYPE_IMAGE);
-xkb-display_textsize = xfce_rc_read_int_entry (rcfile, 
display_textsize, DISPLAY_TEXTSIZE_SMALL);
+xkb-display_textsize = xfce_rc_read_int_entry (rcfile, 
display_textsize, DISPLAY_TEXTSIZE_LARGE);
 xkb-settings-group_policy = xfce_rc_read_int_entry (rcfile, 
group_policy, GROUP_POLICY_PER_APPLICATION);
 
 if (xkb-settings-group_policy != GROUP_POLICY_GLOBAL)
@@ -329,7 +329,7 @@ static void
 xkb_load_default (t_xkb *xkb)
 {
 xkb-display_type = DISPLAY_TYPE_IMAGE;
-xkb-display_textsize = DISPLAY_TEXTSIZE_SMALL;
+xkb-display_textsize = DISPLAY_TEXTSIZE_LARGE;
 xkb-settings-group_policy = GROUP_POLICY_PER_APPLICATION;
 xkb-settings-default_group = 0;
 xkb-settings-kbd_config = NULL;
diff --git a/panel-plugin/xkb-cairo.c b/panel-plugin/xkb-cairo.c
index 8a3a4ef..af598a7 100644
--- a/panel-plugin/xkb-cairo.c
+++ b/panel-plugin/xkb-cairo.c
@@ -27,7 +27,7 @@
 #include xkb-util.h
 #include xfce4-xkb-plugin.h
 
-#define XKB_PREFERRED_FONT Courier New, Courier 10 Pitch, Monospace Bold %d
+#define XKB_PREFERRED_FONT Courier New, Courier 10 Pitch, Monospace Bold
 
 #define xkb_cairo_arc_for_flag(cr, x, y, r, a1, a2) \
 xx = layoutx + width - 12 + x; \
@@ -126,28 +126,31 @@ xkb_cairo_draw_flag (cairo_t *cr,
 void
 xkb_cairo_draw_label (cairo_t *cr,
   const gchar *group_name,
-  gint panel_size,
-  gint actual_width,
-  gint actual_height,
-  gint width,
-  gint height,
-  gint variant_markers_count,
-  gint textsize,
-  GdkColor fgcolor)
+  const gint panel_size,
+  const gint actual_width,
+  const gint actual_height,
+  const gint width,
+  const gint height,
+  const gint variant_markers_count,
+  const gint textsize,
+  const GdkColor fgcolor)
 {
 gchar *normalized_group_name;
-gchar font_str[80];
 gint pango_width, pango_height;
-gint layoutx, layouty;
+double layoutx, layouty, text_width, text_height;
 double xx, yy;
+double scalex, scaley;
 gint i;
-gint radius;
+double radius, diameter;
 
 PangoLayout *layout;
 PangoFontDescription *desc;
 
 g_assert (cr != NULL);
 
+DBG (actual width/height: %d/%d; markers: %d,
+ actual_width, actual_height, variant_markers_count);
+
 layout = pango_cairo_create_layout (cr);
 normalized_group_name = xkb_util_normalize_group_name (group_name);
 
@@ -160,40 +163,69 @@ xkb_cairo_draw_label (cairo_t *cr,
 }
 
 pango_layout_set_text (layout, normalized_group_name, -1);
+
+desc = pango_font_description_from_string ( XKB_PREFERRED_FONT );
+pango_layout_set_font_description (layout, desc);
+pango_font_description_free (desc);
+
+gdk_cairo_set_source_color (cr, fgcolor);
+pango_layout_get_pixel_size (layout, pango_width, pango_height);
+DBG (pango_width/height: %d/%d, pango_width, pango_height);
+
 switch (textsize){
 case DISPLAY_TEXTSIZE_SMALL:
 default:/* catch misconfiguration */
-g_sprintf (font_str, XKB_PREFERRED_FONT, (int)(0.375 * panel_size) 
);
+scalex = scaley = 0.475;
 break;
 case DISPLAY_TEXTSIZE_MEDIUM:
-g_sprintf (font_str, XKB_PREFERRED_FONT, (int)(0.600 * panel_size) 
);
+scalex = scaley = 0.7;
 break;
 case DISPLAY_TEXTSIZE_LARGE:
-g_sprintf (font_str, XKB_PREFERRED_FONT, (int)(0.900 * panel_size) 
);
+

[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Print debug configuration after running configure

2013-03-26 Thread Igor Slepchin
Updating branch refs/heads/4.10_panel_support
 to db4b0e8915db9934d921c1ba245714ba854531cd (commit)
   from 34ccbcfd64c30ae3e61c1b55970c987e7cd300e1 (commit)

commit db4b0e8915db9934d921c1ba245714ba854531cd
Author: Igor Slepchin igor.slepc...@gmail.com
Date:   Tue Mar 19 20:55:06 2013 -0400

Print debug configuration after running configure

Also, delete some unused and commented out lines.
(cherry picked from commit 8584df77c2346abf2b89246af826c8a17f413e69)

 configure.in.in |   22 +-
 1 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/configure.in.in b/configure.in.in
index 0428303..7d690fd 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -75,19 +75,6 @@ XDT_CHECK_PACKAGE([LIBXKLAVIER], [libxklavier], [5.0])
 XDT_CHECK_PACKAGE([LIBRSVG], [librsvg-2.0], [2.18])
 XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-1.0], [2.12])
 
-dnl AC_ARG_ENABLE([debug],
-dnlAC_HELP_STRING([--enable-plugin-debug],
-dnl[Enable debug messages output (default=disabled)]),
-dnl[ac_cv_enable_dummy_scripts=$enableval],
-dnl[ac_cv_enable_dummy_scripts=no])
-dnl if test x$ac_cv_enable_dummy_scripts = xno; then
-dnlXKB_DEBUG=
-dnl else
-dnlXKB_DEBUG=-DXKB_DEBUG
-dnl fi
-dnl AC_SUBST(XKB_DEBUG)
-
-
 dnl ***
 dnl *** Check for debugging support ***
 dnl ***
@@ -99,3 +86,12 @@ flags/Makefile
 Makefile
 po/Makefile.in
 ])
+
+dnl ***
+dnl *** Print configuration ***
+dnl ***
+echo
+echo Build Configuration:
+echo
+echo * Debug Support:$enable_debug
+echo
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Remove duplicate automake options

2013-03-26 Thread Igor Slepchin
Updating branch refs/heads/4.10_panel_support
 to 59fcd1d6242dd988af2eedf102a1be443aadc888 (commit)
   from db4b0e8915db9934d921c1ba245714ba854531cd (commit)

commit 59fcd1d6242dd988af2eedf102a1be443aadc888
Author: Igor Slepchin igor.slepc...@gmail.com
Date:   Tue Mar 19 20:56:00 2013 -0400

Remove duplicate automake options

We already set them with AM_INIT_AUTOMAKE in configure.in.in
(cherry picked from commit 30e92d49efea3fc6085bde1a1dcb36097177f554)

 Makefile.am |4 
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 231adb2..e3c220b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,10 +2,6 @@
 
 SUBDIRS = panel-plugin flags po
 
-AUTOMAKE_OPTIONS = \
-   1.8 \
-   dist-bzip2
-
 distclean-local:
rm -rf *.cache *~
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Include git revision in dev build numbers (cherry picked from commit f5528f22a936946e65218ddbc13c4834eb42df8d)

2013-03-26 Thread Igor Slepchin
Updating branch refs/heads/4.10_panel_support
 to 14ba169f8ea353f674a83f982dbc2f19baa7484e (commit)
   from 59fcd1d6242dd988af2eedf102a1be443aadc888 (commit)

commit 14ba169f8ea353f674a83f982dbc2f19baa7484e
Author: Igor Slepchin igor.slepc...@gmail.com
Date:   Wed Mar 20 10:59:47 2013 -0400

Include git revision in dev build numbers
(cherry picked from commit f5528f22a936946e65218ddbc13c4834eb42df8d)

 configure.in.in |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/configure.in.in b/configure.in.in
index 7d690fd..b55c92b 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -14,7 +14,9 @@ m4_define([xkb_version_major], [0])
 m4_define([xkb_version_minor], [5])
 m4_define([xkb_version_micro], [4])
 m4_define([xkb_version_nano], [3])
-m4_define([xkb_version], 
[xkb_version_major().xkb_version_minor().xkb_version_micro()ifelse(xkb_version_nano(),
 [], [], .[xkb_version_nano()])])
+m4_define([xkb_version_build], [@REVISION@])
+m4_define([xkb_version_tag], [git])
+m4_define([xkb_version], 
[xkb_version_major().xkb_version_minor().xkb_version_micro()ifelse(xkb_version_nano(),
 [], [], [.xkb_version_nano()])ifelse(xkb_version_tag(), [git], 
[xkb_version_tag()-xkb_version_build()], [xkb_version_tag()])])
 
 dnl ***
 dnl *** Initialize autoconf ***
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Add #ifdefs around calls to new 4.10 panel APIs

2013-03-26 Thread Igor Slepchin
Updating branch refs/heads/4.10_panel_support
 to 7ed289e10304c9edb26040320f636f65e7c88622 (commit)
   from e03521b269bfb29005cebce3e61e4ffe187adceb (commit)

commit 7ed289e10304c9edb26040320f636f65e7c88622
Author: Igor Slepchin igor.slepc...@gmail.com
Date:   Mon Mar 25 18:29:27 2013 -0400

Add #ifdefs around calls to new 4.10 panel APIs

 panel-plugin/xfce4-xkb-plugin.c |6 +-
 panel-plugin/xfce4-xkb-plugin.h |7 +++
 panel-plugin/xkb-callbacks.c|2 ++
 3 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/xfce4-xkb-plugin.c b/panel-plugin/xfce4-xkb-plugin.c
index 073fba7..e1c8439 100644
--- a/panel-plugin/xfce4-xkb-plugin.c
+++ b/panel-plugin/xfce4-xkb-plugin.c
@@ -90,7 +90,9 @@ xfce_xkb_construct (XfcePanelPlugin *plugin)
 t_xkb *xkb = xkb_new (plugin);
 xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, UTF-8);
 
+#ifdef HAS_PANEL_49
 xfce_panel_plugin_set_small (plugin, TRUE);
+#endif
 
 g_signal_connect (plugin, orientation-changed,
 G_CALLBACK (xfce_xkb_orientation_changed), xkb);
@@ -338,10 +340,12 @@ xkb_load_default (t_xkb *xkb)
 static gboolean
 xkb_calculate_sizes (t_xkb *xkb, GtkOrientation orientation, gint panel_size)
 {
-guint nrows;
+guint nrows = 1;
 
+#ifdef HAS_PANEL_49
 nrows   = xfce_panel_plugin_get_nrows (xkb-plugin);
 panel_size /= nrows;
+#endif
 TRACE (calculate_sizes(%p: %d,%d), xkb, panel_size, nrows);
 
 switch (orientation)
diff --git a/panel-plugin/xfce4-xkb-plugin.h b/panel-plugin/xfce4-xkb-plugin.h
index ef9b995..fe0f9b1 100644
--- a/panel-plugin/xfce4-xkb-plugin.h
+++ b/panel-plugin/xfce4-xkb-plugin.h
@@ -36,6 +36,13 @@
 #include gtk/gtk.h
 #include glib.h
 
+/* check for new Xfce 4.10 panel features */
+#ifdef LIBXFCE4PANEL_CHECK_VERSION
+#if LIBXFCE4PANEL_CHECK_VERSION (4,9,0)
+#define HAS_PANEL_49
+#endif
+#endif
+
 typedef enum
 {
 DISPLAY_TYPE_IMAGE = 0,
diff --git a/panel-plugin/xkb-callbacks.c b/panel-plugin/xkb-callbacks.c
index e8f6d6e..e0c7b87 100644
--- a/panel-plugin/xkb-callbacks.c
+++ b/panel-plugin/xkb-callbacks.c
@@ -115,7 +115,9 @@ xkb_plugin_layout_image_exposed (GtkWidget *widget,
 vsize = MIN (xkb-vsize, (int) (xkb-hsize * 0.75));
 
 panel_size   = xfce_panel_plugin_get_size (xkb-plugin);
+#ifdef HAS_PANEL_49
 panel_size  /= xfce_panel_plugin_get_nrows (xkb-plugin);
+#endif
 
 style = gtk_widget_get_style (GTK_WIDGET (xkb-btn));
 fgcolor = style-fg[xkb-button_state];
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Remove generated files from git (cherry picked from commit c696d20687631bb3300cf9cfa6bd58bc2c27f59e)

2013-03-26 Thread Igor Slepchin
Updating branch refs/heads/4.10_panel_support
 to df209e95646037e141a07ae19b94d9aa65728751 (commit)
   from cb13f27b1a2b14a412a260b58a42a35c50dffc92 (commit)

commit df209e95646037e141a07ae19b94d9aa65728751
Author: Igor Slepchin igor.slepc...@gmail.com
Date:   Tue Mar 19 19:24:53 2013 -0400

Remove generated files from git
(cherry picked from commit c696d20687631bb3300cf9cfa6bd58bc2c27f59e)

 INSTALL |  365 
 depcomp |  630 ---
 2 files changed, 0 insertions(+), 995 deletions(-)

diff --git a/INSTALL b/INSTALL
deleted file mode 100644
index 7d1c323..000
--- a/INSTALL
+++ /dev/null
@@ -1,365 +0,0 @@
-Installation Instructions
-*
-
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-
-   Copying and distribution of this file, with or without modification,
-are permitted in any medium without royalty provided the copyright
-notice and this notice are preserved.  This file is offered as-is,
-without warranty of any kind.
-
-Basic Installation
-==
-
-   Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package.  The following
-more-detailed instructions are generic; see the `README' file for
-instructions specific to this package.  Some packages provide this
-`INSTALL' file but do not implement all of the features documented
-below.  The lack of an optional feature in a given package is not
-necessarily a bug.  More recommendations for GNU packages can be found
-in *note Makefile Conventions: (standards)Makefile Conventions.
-
-   The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation.  It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions.  Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
-   It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring.  Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.
-
-   If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release.  If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
-   The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'.  You need `configure.ac' if
-you want to change it or regenerate `configure' using a newer version
-of `autoconf'.
-
-   The simplest way to compile this package is:
-
-  1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system.
-
- Running `configure' might take a while.  While running, it prints
- some messages telling which features it is checking for.
-
-  2. Type `make' to compile the package.
-
-  3. Optionally, type `make check' to run any self-tests that come with
- the package, generally using the just-built uninstalled binaries.
-
-  4. Type `make install' to install the programs and any data files and
- documentation.  When installing into a prefix owned by root, it is
- recommended that the package be configured and built as a regular
- user, and only the `make install' phase executed with root
- privileges.
-
-  5. Optionally, type `make installcheck' to repeat any self-tests, but
- this time using the binaries in their final installed location.
- This target does not install anything.  Running this target as a
- regular user, particularly if the prior `make install' required
- root privileges, verifies that the installation completed
- correctly.
-
-  6. You can remove the program binaries and object files from the
- source code directory by typing `make clean'.  To also remove the
- files that `configure' created (so you can compile the package for
- a different kind of computer), type `make distclean'.  There is
- also a `make maintainer-clean' target, but that is intended mainly
- for the package's developers.  If you use it, you may have to get
- all sorts of other programs in order to regenerate files that came
- with the distribution.
-
-  7. Often, you can also type `make uninstall' to remove the installed
- files again.  In practice, not all 

[Xfce4-commits] xfce4-xkb-plugin:4.10_panel_support Include rsvg-cairo.h for older librsvg versions

2013-03-26 Thread Igor Slepchin
Updating branch refs/heads/4.10_panel_support
 to d34f6b4ee2fede6d1652394664cb400ca7d32ed0 (commit)
   from 7ed289e10304c9edb26040320f636f65e7c88622 (commit)

commit d34f6b4ee2fede6d1652394664cb400ca7d32ed0
Author: Igor Slepchin igor.slepc...@gmail.com
Date:   Tue Mar 26 16:16:41 2013 -0400

Include rsvg-cairo.h for older librsvg versions

librsvg 2.6.32 deprecated #including headers other than rsvg.h.
Their standard way to check the version is LIBRSVG_CHECK_VERSION
macro defined in librsvg-features.h. Unfortunately, including *that*
header file directly is also deprecated starting with 2.6.32 and
it was not pulled in by rsvg.h in earlier versions; hence, we need
to resort to configure-time check.
(cherry picked from commit 0c6d0d34ca9784a9c279ffd2f72b35597cfd981e)

 configure.in.in  |2 ++
 panel-plugin/xkb-cairo.c |4 
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/configure.in.in b/configure.in.in
index b55c92b..6d48040 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -75,6 +75,8 @@ XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0])
 XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.8.0])
 XDT_CHECK_PACKAGE([LIBXKLAVIER], [libxklavier], [5.0])
 XDT_CHECK_PACKAGE([LIBRSVG], [librsvg-2.0], [2.18])
+dnl check librsvg version to see if including headers other than rsvg.h is 
deprecated
+XDT_CHECK_OPTIONAL_PACKAGE([LIBRSVG_2_36_2], [librsvg-2.0], [2.36.2], 
[librsvg_2.36.2], [deprecated includes of librsvg header files (always leave 
enabled)], yes)
 XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-1.0], [2.12])
 
 dnl ***
diff --git a/panel-plugin/xkb-cairo.c b/panel-plugin/xkb-cairo.c
index af598a7..27ad119 100644
--- a/panel-plugin/xkb-cairo.c
+++ b/panel-plugin/xkb-cairo.c
@@ -27,6 +27,10 @@
 #include xkb-util.h
 #include xfce4-xkb-plugin.h
 
+#ifndef HAVE_LIBRSVG_2_36_2
+#include librsvg/rsvg-cairo.h
+#endif
+
 #define XKB_PREFERRED_FONT Courier New, Courier 10 Pitch, Monospace Bold
 
 #define xkb_cairo_arc_for_flag(cr, x, y, r, a1, a2) \
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Replace midori_browser_is_action by _assert_action

2013-03-26 Thread Christian Dywan
Updating branch refs/heads/master
 to fc06bd5a819712fb4fd5ba30fe0b8e10f7685519 (commit)
   from af33570146f722406a753d1cb735175e72dc0f50 (commit)

commit fc06bd5a819712fb4fd5ba30fe0b8e10f7685519
Author: Christian Dywan christ...@twotoasts.de
Date:   Wed Mar 27 00:07:34 2013 +0100

Replace midori_browser_is_action by _assert_action

 midori/midori-app.c  |   18 --
 midori/midori-browser.c  |   60 +-
 midori/midori-browser.h  |4 +-
 midori/midori-frontend.c |   42 +---
 midori/midori-session.c  |   14 ---
 5 files changed, 77 insertions(+), 61 deletions(-)

diff --git a/midori/midori-app.c b/midori/midori-app.c
index 6677ddf..1dfd95a 100644
--- a/midori/midori-app.c
+++ b/midori/midori-app.c
@@ -571,15 +571,11 @@ midori_app_command_received (MidoriApp*   app,
 }
 else if (g_str_equal (command, command))
 {
-guint i = 0;
-
 if (!uris || !app-browser)
 return FALSE;
-while (uris[i] != NULL)
-{
+gint i;
+for (i = 0; uris  uris[i]; i++)
 midori_browser_activate_action (app-browser, uris[i]);
-i++;
-}
 return TRUE;
 }
 
@@ -1117,19 +1113,15 @@ midori_app_send_command (MidoriApp* app,
 g_return_val_if_fail (MIDORI_IS_APP (app), FALSE);
 g_return_val_if_fail (command != NULL, FALSE);
 
-if (midori_app_instance_is_running (app))
+if (!midori_app_instance_is_running (app))
 {
 MidoriBrowser* browser = midori_browser_new ();
 int i;
 for (i=0; command  command[i]; i++)
-{
-if (!midori_browser_is_action (browser, command[i]))
-midori_error (_(Unexpected action '%s'.), command[i]);
-}
+midori_browser_assert_action (browser, command[i]);
 gtk_widget_destroy (GTK_WIDGET (browser));
-}
-else
 return midori_app_command_received (app, command, command, NULL);
+}
 
 #if HAVE_UNIQUE
 if (app-instance)
diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 48e74dc..96db253 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -529,34 +529,54 @@ midori_browser_update_history_title (MidoriBrowser* 
browser,
 midori_browser_update_history (item, website, access);
 }
 
-gboolean
-midori_browser_is_action (MidoriBrowser* browser,
-  const gchar*   name)
+/**
+ * midori_browser_assert_action:
+ * @browser: a #MidoriBrowser
+ * @name: name of the action or setting=value expression
+ *
+ * Assert that @name is a valid action or setting expression,
+ * if it fails the program will terminate with an error.
+ * To be used with command line interfaces.
+ *
+ * Since: 0.5.0
+ **/
+void
+midori_browser_assert_action (MidoriBrowser* browser,
+  const gchar*   name)
 {
-g_return_val_if_fail (MIDORI_IS_BROWSER (browser), FALSE);
+g_return_if_fail (MIDORI_IS_BROWSER (browser));
+g_return_if_fail (name != NULL);
 
-GtkAction* action = _action_by_name (browser, name);
-if (action)
-return TRUE;
-else if (strchr (name, '='))
+if (strchr (name, '='))
 {
 gchar** parts = g_strsplit (name, =, 0);
 GObjectClass* class = G_OBJECT_GET_CLASS (browser-settings);
 GParamSpec* pspec = g_object_class_find_property (class, parts[0]);
+GType type = pspec ? G_PARAM_SPEC_TYPE (pspec) : G_TYPE_INVALID;
+if (!(
+(type == G_TYPE_PARAM_BOOLEAN  (!strcmp (parts[1], true) || 
!strcmp (parts[1], false)))
+ || type == G_TYPE_PARAM_STRING
+ || type == G_TYPE_PARAM_INT
+ || type == G_TYPE_PARAM_FLOAT
+ || type == G_TYPE_PARAM_ENUM))
+midori_error (_(Value '%s' is invalid for %s), parts[1], 
parts[0]);
 g_strfreev (parts);
-return pspec != NULL;
 }
-return FALSE;
+else
+{
+GtkAction* action = _action_by_name (browser, name);
+if (!action)
+midori_error (_(Unexpected action '%s'.), name);
+}
 }
 
 static void
 _midori_browser_activate_action (MidoriBrowser* browser,
  const gchar*   name)
 {
-GtkAction* action = _action_by_name (browser, name);
-if (action)
-gtk_action_activate (action);
-else if (strchr (name, '='))
+g_return_if_fail (name != NULL);
+
+if (strchr (name, '='))
 {
 gchar** parts = g_strsplit (name, =, 0);
 GObjectClass* class = G_OBJECT_GET_CLASS (browser-settings);
@@ -586,7 +606,13 @@ _midori_browser_activate_action (MidoriBrowser* browser,
 g_strfreev (parts);
 }
 else
-g_warning (_(Unexpected action '%s'.), name);
+{
+GtkAction* action = _action_by_name (browser, name);
+if (action)
+gtk_action_activate (action);
+else
+g_warning (_(Unexpected action '%s'.), 

[Xfce4-commits] midori:master Add Win32 work-around to History List for modifiers

2013-03-26 Thread Christian Dywan
Updating branch refs/heads/master
 to 78cc6cc295143821ae1229ddd1b691ae00c4f78b (commit)
   from fc06bd5a819712fb4fd5ba30fe0b8e10f7685519 (commit)

commit 78cc6cc295143821ae1229ddd1b691ae00c4f78b
Author: Paweł Forysiuk tuxa...@o2.pl
Date:   Wed Mar 27 00:11:40 2013 +0100

Add Win32 work-around to History List for modifiers

 extensions/history-list.vala |   16 ++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/extensions/history-list.vala b/extensions/history-list.vala
index 1d7b63a..6ad4ad6 100644
--- a/extensions/history-list.vala
+++ b/extensions/history-list.vala
@@ -339,15 +339,27 @@ namespace HistoryList {
 this.closing_behavior = this.get_integer (TabClosingBehavior);
 }
 
+public bool is_key_a_modifier (Gdk.EventKey event_key) {
+#if HAVE_WIN32
+/* On win is_modifier check does not seem to work */
+if (event_key.keyval == Gdk.keyval_from_name(Control_L))
+return true;
+#else
+if (event_key.is_modifier  0)
+return true;
+#endif
+return false;
+}
+
 public bool key_press (Gdk.EventKey event_key) {
-if (event_key.is_modifier  0) {
+if (is_key_a_modifier (event_key)) {
 this.modifier_count++;
 }
 return false;
 }
 
 public bool key_release (Gdk.EventKey event_key, Browser browser) {
-if (event_key.is_modifier  0) {
+if (is_key_a_modifier (event_key)) {
 this.modifier_count--;
 }
 if (this.modifier_count == 0 || event_key.keyval == 
this.escKeyval) {
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Implement 'Run in debugger' button in diagnostic dialog

2013-03-26 Thread Christian Dywan
Updating branch refs/heads/master
 to d31e4830493cc16b3763438bc6de68ca5eabb17e (commit)
   from 78cc6cc295143821ae1229ddd1b691ae00c4f78b (commit)

commit d31e4830493cc16b3763438bc6de68ca5eabb17e
Author: Christian Dywan christ...@twotoasts.de
Date:   Wed Mar 27 00:50:19 2013 +0100

Implement 'Run in debugger' button in diagnostic dialog

 katze/midori-paths.vala  |3 ++-
 midori/main.c|   11 +--
 midori/midori-frontend.c |   29 -
 midori/sokoke.c  |   16 
 midori/sokoke.h  |4 
 5 files changed, 51 insertions(+), 12 deletions(-)

diff --git a/katze/midori-paths.vala b/katze/midori-paths.vala
index d404a5f..6f5cd45 100644
--- a/katze/midori-paths.vala
+++ b/katze/midori-paths.vala
@@ -313,7 +313,8 @@ namespace Midori {
 assert (command_line != null);
 if (for_display)
 return string.joinv ( , command_line).replace 
(Environment.get_home_dir (), ~);
-return string.joinv ( , command_line).replace (--debug, 
).replace (-g, );
+return string.joinv ( , command_line).replace (--debug, 
).replace (-g, )
+.replace (--diagnostic-dialog, ).replace (-d, );
 }
 
 public static string get_lib_path (string package) {
diff --git a/midori/main.c b/midori/main.c
index a24a025..4dcfcab 100644
--- a/midori/main.c
+++ b/midori/main.c
@@ -143,19 +143,10 @@ main (intargc,
 if (debug)
 {
 gchar* gdb = g_find_program_in_path (gdb);
-gchar* args = midori_paths_get_command_line_str (FALSE);
-const gchar* runtime_dir = midori_paths_get_runtime_dir ();
-gchar* cmd = g_strdup_printf (
---batch -ex 'set print thread-events off' -ex run 
--ex 'set logging on %s/%s' -ex 'bt' --return-child-result 
---args %s,
-runtime_dir, gdb.bt, args);
 if (gdb == NULL)
 midori_error (_(Error: \gdb\ can't be found\n));
-sokoke_spawn_program (gdb, TRUE, cmd, FALSE, TRUE);
+sokoke_spawn_gdb (gdb, TRUE);
 g_free (gdb);
-g_free (cmd);
-g_free (args);
 return 0;
 }
 
diff --git a/midori/midori-frontend.c b/midori/midori-frontend.c
index af28e4a..d8198c8 100644
--- a/midori/midori-frontend.c
+++ b/midori/midori-frontend.c
@@ -304,7 +304,19 @@ midori_frontend_crash_log_cb (GtkWidget* button,
 {
 GError* error = NULL;
 if (!sokoke_show_uri (gtk_widget_get_screen (button), crash_log, 0, 
error))
-midori_error (error-message);
+{
+sokoke_message_dialog (GTK_MESSAGE_ERROR,
+   _(Could not run external program.),
+   error-message, FALSE);
+g_error_free (error);
+}
+}
+
+static void
+midori_frontend_debugger_cb (GtkWidget* button,
+ GtkDialog* dialog)
+{
+gtk_dialog_response (dialog, GTK_RESPONSE_HELP);
 }
 
 static MidoriStartup
@@ -367,6 +379,16 @@ midori_frontend_diagnostic_dialog (MidoriApp* app,
 }
 else
 g_free (crash_log);
+
+gchar* gdb = g_find_program_in_path (gdb);
+if (gdb != NULL)
+{
+GtkWidget* button = gtk_button_new_with_mnemonic (_(Run in 
_debugger));
+g_signal_connect (button, clicked,
+G_CALLBACK (midori_frontend_debugger_cb), dialog);
+gtk_widget_show (button);
+gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 4);
+}
 gtk_dialog_set_default_response (GTK_DIALOG (dialog),
 load_on_startup == MIDORI_STARTUP_HOMEPAGE
 ? MIDORI_STARTUP_BLANK_PAGE : load_on_startup);
@@ -390,6 +412,11 @@ midori_frontend_diagnostic_dialog (MidoriApp* app,
 gtk_widget_destroy (dialog);
 if (response == GTK_RESPONSE_DELETE_EVENT)
 response = G_MAXINT;
+else if (response == GTK_RESPONSE_HELP)
+{
+sokoke_spawn_gdb (gdb, FALSE);
+response = G_MAXINT;
+}
 else if (response == MIDORI_STARTUP_BLANK_PAGE)
 katze_array_clear (session);
 return response;
diff --git a/midori/sokoke.c b/midori/sokoke.c
index 66636ba..bcc3c24 100644
--- a/midori/sokoke.c
+++ b/midori/sokoke.c
@@ -395,6 +395,22 @@ sokoke_spawn_program (const gchar* command,
 }
 
 void
+sokoke_spawn_gdb (const gchar* gdb,
+  gboolean sync)
+{
+gchar* args = midori_paths_get_command_line_str (FALSE);
+const gchar* runtime_dir = midori_paths_get_runtime_dir ();
+gchar* cmd = g_strdup_printf (
+--batch -ex 'set print thread-events off' -ex run 
+-ex 'set logging on %s/%s' -ex 'bt' --return-child-result 
+--args %s,
+runtime_dir, gdb.bt, args);
+sokoke_spawn_program (gdb, TRUE, cmd, FALSE, sync);
+g_free (cmd);
+g_free (args);
+}
+
+void
 sokoke_spawn_app (const gchar* uri,
   gboolean private)
 {
diff --git a/midori/sokoke.h b/midori/sokoke.h
index 7074b96..b7acae4 

[Xfce4-commits] midori:master Fix erroneous about:info reference in Italian translation

2013-03-26 Thread Christian Dywan
Updating branch refs/heads/master
 to a9cbd57bcfb6e33056409e39ad58469561618312 (commit)
   from d31e4830493cc16b3763438bc6de68ca5eabb17e (commit)

commit a9cbd57bcfb6e33056409e39ad58469561618312
Author: Christian Dywan christ...@twotoasts.de
Date:   Wed Mar 27 00:52:13 2013 +0100

Fix erroneous about:info reference in Italian translation

Fixes: https://bugs.launchpad.net/midori/+bug/848927

 po/it.po |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/po/it.po b/po/it.po
index 48c0561..f5e6368 100644
--- a/po/it.po
+++ b/po/it.po
@@ -493,7 +493,7 @@ msgstr Un browser web leggero
 
 #: ../midori/midori-browser.c:4728
 msgid See about:version for version info.
-msgstr Consultare about:info per le informazioni di versione.
+msgstr Consultare about:version per le informazioni di versione.
 
 #: ../midori/midori-browser.c:4730
 msgid 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Avoid g_list_nth on app infos in katze utils

2013-03-26 Thread Christian Dywan
Updating branch refs/heads/master
 to ef5f7e82c99bdf146c3f4fc9e567bbc2fe083817 (commit)
   from a9cbd57bcfb6e33056409e39ad58469561618312 (commit)

commit ef5f7e82c99bdf146c3f4fc9e567bbc2fe083817
Author: Christian Dywan christ...@twotoasts.de
Date:   Wed Mar 27 01:05:59 2013 +0100

Avoid g_list_nth on app infos in katze utils

 katze/katze-utils.c |   11 ++-
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/katze/katze-utils.c b/katze/katze-utils.c
index 239785d..ebf7477 100644
--- a/katze/katze-utils.c
+++ b/katze/katze-utils.c
@@ -316,10 +316,11 @@ katze_app_info_get_all_for_category (const gchar* 
category)
 GList* all_apps = g_app_info_get_all ();
 #endif
 GList* apps = NULL;
-guint i = 0;
 GAppInfo* info;
-while ((info = g_list_nth_data (all_apps, i++)))
+GList* app;
+for (app = apps; app; app = g_list_next (app))
 {
+GAppInfo* info = app-data;
 #ifdef GDK_WINDOWING_X11
 gchar* filename = g_strconcat (applications/, g_app_info_get_id 
(info), NULL);
 GKeyFile* file = g_key_file_new ();
@@ -573,10 +574,10 @@ katze_property_proxy (gpointer object,
 
 if (apps != NULL)
 {
-gint i = 0;
-
-while ((info = g_list_nth_data (apps, i++)))
+GList* app;
+for (app = apps; app; app = g_list_next (app))
 {
+GAppInfo* info = app-data;
 const gchar* name = g_app_info_get_name (info);
 GIcon* icon = g_app_info_get_icon (info);
 gchar* icon_name;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] parole:master Switch to the gst-helper for setting the volume Instead of the GObject method used before, as the helper seems to keep the volume in sync with pulseaudio better

2013-03-26 Thread Simon Steinbeiss
Updating branch refs/heads/master
 to 1e3ff23b808b673923d13958cb09f6e39aee0a8e (commit)
   from 171af0ced543b2e3d2f79e49d0326b43dfc5a0f8 (commit)

commit 1e3ff23b808b673923d13958cb09f6e39aee0a8e
Author: Simon Steinbeiss simon.steinbe...@elfenbeinturm.at
Date:   Wed Mar 27 01:11:13 2013 +0100

Switch to the gst-helper for setting the volume
Instead of the GObject method used before, as the helper seems to keep the 
volume in sync with pulseaudio better

 src/gst/parole-gst.c |8 +---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/gst/parole-gst.c b/src/gst/parole-gst.c
index f81102c..9b415ec 100644
--- a/src/gst/parole-gst.c
+++ b/src/gst/parole-gst.c
@@ -33,9 +33,11 @@
 #if GST_CHECK_VERSION(1, 0, 0)
 #include gst/video/videooverlay.h
 #include gst/video/navigation.h
+#include gst/audio/streamvolume.h
 #else
 #include gst/interfaces/xoverlay.h
 #include gst/interfaces/navigation.h
+#include gst/interfaces/streamvolume.h
 #endif
 
 #include gst/pbutils/missing-plugins.h
@@ -2624,9 +2626,9 @@ void parole_gst_seek (ParoleGst *gst, gdouble seek)
 
 void parole_gst_set_volume (ParoleGst *gst, gdouble value)
 {
-g_object_set (G_OBJECT (gst-priv-playbin),
- volume, value,
- NULL);
+gst_stream_volume_set_volume (GST_STREAM_VOLUME (gst-priv-playbin),
+   GST_STREAM_VOLUME_FORMAT_CUBIC,
+   value);
 }

 gdoubleparole_gst_get_volume (ParoleGst *gst)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Use GtkFontButton with filter func with GTK+ 3.2

2013-03-26 Thread Christian Dywan
Updating branch refs/heads/master
 to 8642ec238a325d58d1341bc4b447106da5952c44 (commit)
   from ef5f7e82c99bdf146c3f4fc9e567bbc2fe083817 (commit)

commit 8642ec238a325d58d1341bc4b447106da5952c44
Author: Christian Dywan christ...@twotoasts.de
Date:   Wed Mar 27 01:26:29 2013 +0100

Use GtkFontButton with filter func with GTK+ 3.2

 katze/katze-utils.c |   46 ++
 1 files changed, 38 insertions(+), 8 deletions(-)

diff --git a/katze/katze-utils.c b/katze/katze-utils.c
index ebf7477..24e5ee1 100644
--- a/katze/katze-utils.c
+++ b/katze/katze-utils.c
@@ -70,6 +70,24 @@ proxy_uri_file_set_cb (GtkFileChooser* button,
 g_object_set (object, property, file, NULL);
 }
 
+#if GTK_CHECK_VERSION (3, 2, 0)
+static void
+proxy_font_chooser_font_activated_cb (GtkFontChooser* chooser,
+  const gchar*font_name,
+  GObject*object)
+{
+gtk_font_chooser_set_font (chooser, font_name);
+}
+
+static gboolean
+proxy_font_chooser_filter_monospace_cb (PangoFontFamily* family,
+PangoFontFace*   face,
+gpointer data)
+{
+gboolean monospace = GPOINTER_TO_INT (data);
+return monospace == pango_font_family_is_monospace (family);
+}
+#else
 static void
 proxy_combo_box_text_changed_cb (GtkComboBoxText* button,
  GObject* object)
@@ -79,6 +97,7 @@ proxy_combo_box_text_changed_cb (GtkComboBoxText* button,
 g_object_set (object, property, text, NULL);
 g_free (text);
 }
+#endif
 
 static const gchar*
 katze_app_info_get_commandline (GAppInfo* info)
@@ -498,30 +517,40 @@ katze_property_proxy (gpointer object,
 else if (type == G_TYPE_PARAM_STRING  (_hint == I_(font)
 || _hint == I_(font-monospace)))
 {
+string = katze_object_get_string (object, property);
+if (!string)
+string = g_strdup (G_PARAM_SPEC_STRING (pspec)-default_value);
+/* 'sans' and 'sans-serif' are presumably the same */
+if (!g_strcmp0 (string, sans-serif))
+katze_assign (string, g_strdup (sans));
+gboolean monospace = _hint == I_(font-monospace);
+
+#if GTK_CHECK_VERSION (3, 2, 0)
+widget = gtk_font_button_new ();
+gtk_font_button_set_show_size (GTK_FONT_BUTTON (widget), FALSE);
+gtk_font_chooser_set_font (GTK_FONT_CHOOSER (widget), string);
+g_signal_connect (widget, font-activated,
+  G_CALLBACK (proxy_font_chooser_font_activated_cb), 
object);
+gtk_font_chooser_set_filter_func (GTK_FONT_CHOOSER (widget),
+(GtkFontFilterFunc)proxy_font_chooser_filter_monospace_cb, 
GINT_TO_POINTER (monospace), NULL);
+#else
 GtkComboBox* combo;
 gint n_families, i;
 PangoContext* context;
 PangoFontFamily** families;
-gboolean monospace = _hint == I_(font-monospace);
-string = katze_object_get_string (object, property);
 
 widget = gtk_combo_box_text_new ();
 combo = GTK_COMBO_BOX (widget);
 context = gtk_widget_get_pango_context (widget);
 pango_context_list_families (context, families, n_families);
-if (!string)
-string = g_strdup (G_PARAM_SPEC_STRING (pspec)-default_value);
-/* 'sans' and 'sans-serif' are presumably the same */
-if (!g_strcmp0 (string, sans-serif))
-katze_assign (string, g_strdup (sans));
 if (string)
 {
 gint j = 0;
 for (i = 0; i  n_families; i++)
 {
-const gchar* font = pango_font_family_get_name (families[i]);
 if (monospace != pango_font_family_is_monospace (families[i]))
 continue;
+const gchar* font = pango_font_family_get_name (families[i]);
 gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), 
font);
 if (!g_ascii_strcasecmp (font, string))
 gtk_combo_box_set_active (combo, j);
@@ -533,6 +562,7 @@ katze_property_proxy (gpointer object,
 g_signal_connect (widget, changed,
   G_CALLBACK (proxy_combo_box_text_changed_cb), 
object);
 g_free (families);
+#endif
 }
 else if (type == G_TYPE_PARAM_STRING  hint  g_str_has_prefix (hint, 
application-))
 {
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits