Sorry,

I was playing with mutt and git send-email and it did not work from the
first time... I'll do better the next time.

Cheers,

Ignas
>From 8443327c3344beb495b828cc0c0184dd099db673 Mon Sep 17 00:00:00 2001
From: "Ignas Anikevicius (gns_ank)" <anikevic...@gmail.com>
Date: Fri, 8 Feb 2013 13:59:40 +0000
Subject: [PATCH 1/4] Set the horizontal scroll step

Previously it was set to -1, which was essentially disabling the
horizontal scrolling. This enables the scrolling by default by setting
it to be the same as the vertical scrolling.

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevic...@gmail.com>
---
 config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config.c b/config.c
index 1753594..8eaf8c7 100644
--- a/config.c
+++ b/config.c
@@ -143,7 +143,7 @@ config_load_default(zathura_t* zathura)
   girara_setting_add(gsession, "first-page-column",     &int_value,   INT,    
false, _("Column of the first page"),cb_first_page_column_value_changed, NULL);
   float_value = 40;
   girara_setting_add(gsession, "scroll-step",           &float_value, FLOAT,  
false, _("Scroll step"),             NULL, NULL);
-  float_value = -1;
+  float_value = 40;
   girara_setting_add(gsession, "scroll-hstep",          &float_value, FLOAT,  
false, _("Horizontal scroll step"),             NULL, NULL);
   float_value = 0.0;
   girara_setting_add(gsession, "scroll-full-overlap",   &float_value, FLOAT,  
false, _("Full page scroll overlap"),           NULL, NULL);
-- 
1.8.1.2

>From 834d5d41aa7c36462348a293a28c5a7d02071e67 Mon Sep 17 00:00:00 2001
From: "Ignas Anikevicius (gns_ank)" <anikevic...@gmail.com>
Date: Fri, 8 Feb 2013 14:05:06 +0000
Subject: [PATCH 2/4] Fix some mutex deprecation warnings in page-widget

According to my compiler output and the page on glib deprecated APIs
[1], some of the stuff needed to be removed or changed.

[1] - http://developer.gnome.org/glib/2.31/glib-Deprecated-Thread-APIs.html

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevic...@gmail.com>
---
 page-widget.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/page-widget.c b/page-widget.c
index ac7e93d..d3c34e7 100644
--- a/page-widget.c
+++ b/page-widget.c
@@ -22,7 +22,7 @@ typedef struct zathura_page_widget_private_s {
   zathura_t* zathura; /**< Zathura object */
   cairo_surface_t* surface; /**< Cairo surface */
   gint64 last_view; /**< Last time the page has been viewed */
-  GStaticMutex lock; /**< Lock */
+  GMutex lock; /**< Lock */
 
   struct {
     girara_list_t* list; /**< List of links on the page */
@@ -162,7 +162,7 @@ zathura_page_widget_init(ZathuraPage* widget)
   priv->mouse.selection_basepoint.x = -1;
   priv->mouse.selection_basepoint.y = -1;
 
-  g_static_mutex_init(&(priv->lock));
+  g_mutex_init(&(priv->lock));
 
   /* we want mouse events */
   gtk_widget_add_events(GTK_WIDGET(widget),
@@ -195,8 +195,6 @@ zathura_page_widget_finalize(GObject* object)
     girara_list_free(priv->links.list);
   }
 
-  g_static_mutex_free(&(priv->lock));
-
   G_OBJECT_CLASS(zathura_page_widget_parent_class)->finalize(object);
 }
 
@@ -325,7 +323,7 @@ static gboolean
 zathura_page_widget_draw(GtkWidget* widget, cairo_t* cairo)
 {
   zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
-  g_static_mutex_lock(&(priv->lock));
+  g_mutex_lock(&(priv->lock));
 
   zathura_document_t* document = zathura_page_get_document(priv->page);
 
@@ -466,7 +464,7 @@ zathura_page_widget_draw(GtkWidget* widget, cairo_t* cairo)
     /* render real page */
     render_page(priv->zathura->sync.render_thread, priv->page);
   }
-  g_static_mutex_unlock(&(priv->lock));
+  g_mutex_unlock(&(priv->lock));
   return FALSE;
 }
 
@@ -481,13 +479,13 @@ void
 zathura_page_widget_update_surface(ZathuraPage* widget, cairo_surface_t* 
surface)
 {
   zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
-  g_static_mutex_lock(&(priv->lock));
+  g_mutex_lock(&(priv->lock));
   if (priv->surface != NULL) {
     cairo_surface_finish(priv->surface);
     cairo_surface_destroy(priv->surface);
   }
   priv->surface = surface;
-  g_static_mutex_unlock(&(priv->lock));
+  g_mutex_unlock(&(priv->lock));
   /* force a redraw here */
   zathura_page_widget_redraw_canvas(widget);
 }
-- 
1.8.1.2

>From a99e05179420ad27c0dce54b3661602615e530de Mon Sep 17 00:00:00 2001
From: "Ignas Anikevicius (gns_ank)" <anikevic...@gmail.com>
Date: Fri, 8 Feb 2013 14:17:38 +0000
Subject: [PATCH 3/4] Remove g_thread_init from main.c

g_thread_init is no longer needed as glib is taking care of it automatically.

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevic...@gmail.com>
---
 main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/main.c b/main.c
index 0920adb..aeb2519 100644
--- a/main.c
+++ b/main.c
@@ -21,7 +21,6 @@ main(int argc, char* argv[])
   textdomain(GETTEXT_PACKAGE);
 
   /* init gtk */
-  g_thread_init(NULL);
   gdk_threads_init();
   gtk_init(&argc, &argv);
 
-- 
1.8.1.2

>From 82cb6fc6cc7caa55b7f803ec1671746a66e6f139 Mon Sep 17 00:00:00 2001
From: "Ignas Anikevicius (gns_ank)" <anikevic...@gmail.com>
Date: Fri, 8 Feb 2013 14:27:48 +0000
Subject: [PATCH 4/4] Add Ignas to AUTHORS

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevic...@gmail.com>
---
 AUTHORS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/AUTHORS b/AUTHORS
index 295c248..456b172 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -22,3 +22,4 @@ Benoît Knecht <benoit.kne...@gmail.com>
 Rob Cornish <jrmcorn...@gmail.com>
 Marwan Tanager <marwan.t...@gmail.com>
 Diego Joss <djego.j...@gmail.com>
+Ignas Anikevicius <anikevic...@gmail.com>
-- 
1.8.1.2

_______________________________________________
zathura mailing list
zathura@lists.pwmt.org
http://lists.pwmt.org/mailman/listinfo/zathura

Reply via email to