pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/graphics/girara
Module Name: pkgsrc
Committed By: leot
Date: Fri Dec 9 08:06:50 UTC 2016
Modified Files:
pkgsrc/graphics/girara: Makefile distinfo
Added Files:
pkgsrc/graphics/girara/patches: patch-data_girara-post-3.20.css__t
patch-girara_config.c patch-girara_internal.h
patch-girara_session.c
Log Message:
Fix various rendering problems for changes in Gtk+ 3.21 (due font handling
incompatibilites).
Bump PKGREVISION
Patches back-ported from `develop' branch via upstream.
Approved by <degroote>
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/graphics/girara/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/graphics/girara/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/graphics/girara/patches/patch-data_girara-post-3.20.css__t \
pkgsrc/graphics/girara/patches/patch-girara_config.c \
pkgsrc/graphics/girara/patches/patch-girara_internal.h \
pkgsrc/graphics/girara/patches/patch-girara_session.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/graphics/girara/Makefile
diff -u pkgsrc/graphics/girara/Makefile:1.3 pkgsrc/graphics/girara/Makefile:1.4
--- pkgsrc/graphics/girara/Makefile:1.3 Wed Aug 3 10:22:14 2016
+++ pkgsrc/graphics/girara/Makefile Fri Dec 9 08:06:50 2016
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.3 2016/08/03 10:22:14 adam Exp $
+# $NetBSD: Makefile,v 1.4 2016/12/09 08:06:50 leot Exp $
#
DISTNAME= girara-0.2.6
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= x11
MASTER_SITES= http://pwmt.org/projects/girara/download/
Index: pkgsrc/graphics/girara/distinfo
diff -u pkgsrc/graphics/girara/distinfo:1.2 pkgsrc/graphics/girara/distinfo:1.3
--- pkgsrc/graphics/girara/distinfo:1.2 Wed Apr 20 06:57:21 2016
+++ pkgsrc/graphics/girara/distinfo Fri Dec 9 08:06:50 2016
@@ -1,8 +1,12 @@
-$NetBSD: distinfo,v 1.2 2016/04/20 06:57:21 leot Exp $
+$NetBSD: distinfo,v 1.3 2016/12/09 08:06:50 leot Exp $
SHA1 (girara-0.2.6.tar.gz) = 674e4294fe091fe93a1c186d95b3263b30cd8a5e
RMD160 (girara-0.2.6.tar.gz) = 872889a2d5abcb907d8dbe2a27e7c9bb238963b8
SHA512 (girara-0.2.6.tar.gz) = a55702fc85594c6b8ee2cf3cdcde659b2b85559d1d5d2eff9ff05247b9762d0ee4ccc8e5e2fbb12ad174fb85bca7941a413c866aafa419765ed88cc1c4efa901
Size (girara-0.2.6.tar.gz) = 75841 bytes
SHA1 (patch-Makefile) = 26e28108f3d448ee4305cd4e3d8f7e9e3b24d343
+SHA1 (patch-data_girara-post-3.20.css__t) = a62cb52542c2a47cfc4536167eac7fcab9d6e6a5
+SHA1 (patch-girara_config.c) = 2682de9155162519bd719ad443dd3226c2c75109
+SHA1 (patch-girara_internal.h) = a2ac39fd53099bba7ef0b4ebd99074dfc60477cb
+SHA1 (patch-girara_session.c) = 973c3a4ac598425518524eb6285b589fcafb9ab2
SHA1 (patch-macros.h) = f9467ab009a53feec710a5f3d984c7b67b6747be
Added files:
Index: pkgsrc/graphics/girara/patches/patch-data_girara-post-3.20.css__t
diff -u /dev/null pkgsrc/graphics/girara/patches/patch-data_girara-post-3.20.css__t:1.1
--- /dev/null Fri Dec 9 08:06:50 2016
+++ pkgsrc/graphics/girara/patches/patch-data_girara-post-3.20.css__t Fri Dec 9 08:06:50 2016
@@ -0,0 +1,43 @@
+$NetBSD: patch-data_girara-post-3.20.css__t,v 1.1 2016/12/09 08:06:50 leot Exp $
+
+Update font handling for changes in Gtk+ 3.21
+(from upstream commit 949c879aa84e9496fabc7d3602060e29f9dc42a1)
+
+--- data/girara-post-3.20.css_t.orig 2016-04-18 20:35:34.000000000 +0000
++++ data/girara-post-3.20.css_t
+@@ -1,17 +1,22 @@
++#@session@ * {
++ color: @default-fg@;
++ background-color: @default-bg@;
++ background-image: none;
++ font-family: @font-family@;
++ font-size: @font-size@;
++ font-weight: @font-weight@;
++}
++
++/* Scrollbar */
++
+ #@session@ scrolledwindow scrollbar {
+ background-color: @scrollbar-bg@;
+ }
++
+ #@session@ scrolledwindow scrollbar > slider {
+ background-color: @scrollbar-fg@;
+ }
+
+-#@session@ * {
+- color: @default-fg@;
+- background-color: @default-bg@;
+- background-image: none;
+- font: @font@;
+-}
+-
+ /* Inputbar */
+
+ #@session@ entry.inputbar {
+@@ -111,4 +116,5 @@
+ #@session@ scrolledwindow overshoot.right,
+ #@session@ scrolledwindow overshoot.right:backdrop {
+ background-color: transparent;
++ background-image: none;
+ }
Index: pkgsrc/graphics/girara/patches/patch-girara_config.c
diff -u /dev/null pkgsrc/graphics/girara/patches/patch-girara_config.c:1.1
--- /dev/null Fri Dec 9 08:06:50 2016
+++ pkgsrc/graphics/girara/patches/patch-girara_config.c Fri Dec 9 08:06:50 2016
@@ -0,0 +1,17 @@
+$NetBSD: patch-girara_config.c,v 1.1 2016/12/09 08:06:50 leot Exp $
+
+Update font handling for changes in Gtk+ 3.21
+(from upstream commit 949c879aa84e9496fabc7d3602060e29f9dc42a1)
+
+--- girara/config.c.orig 2016-04-18 20:35:34.000000000 +0000
++++ girara/config.c
+@@ -50,8 +50,7 @@ cb_font(girara_session_t* session, const
+ {
+ g_return_if_fail(session != NULL && value != NULL);
+
+- girara_template_set_variable_value(session->private_data->csstemplate, "font",
+- value);
++ css_template_fill_font(session->private_data->csstemplate, value);
+ }
+
+ static void
Index: pkgsrc/graphics/girara/patches/patch-girara_internal.h
diff -u /dev/null pkgsrc/graphics/girara/patches/patch-girara_internal.h:1.1
--- /dev/null Fri Dec 9 08:06:50 2016
+++ pkgsrc/graphics/girara/patches/patch-girara_internal.h Fri Dec 9 08:06:50 2016
@@ -0,0 +1,16 @@
+$NetBSD: patch-girara_internal.h,v 1.1 2016/12/09 08:06:50 leot Exp $
+
+Update font handling for changes in Gtk+ 3.21
+(from upstream commit 949c879aa84e9496fabc7d3602060e29f9dc42a1)
+
+--- girara/internal.h.orig 2016-04-18 20:35:34.000000000 +0000
++++ girara/internal.h
+@@ -148,6 +148,8 @@ HIDDEN bool girara_cmd_dump_config(girar
+ HIDDEN bool girara_sc_feedkeys(girara_session_t* session, girara_argument_t* argument,
+ girara_event_t* event, unsigned int t);
+
++HIDDEN void css_template_fill_font(GiraraTemplate* csstemplate, const char* font);
++
+ /**
+ * Structure of a command
+ */
Index: pkgsrc/graphics/girara/patches/patch-girara_session.c
diff -u /dev/null pkgsrc/graphics/girara/patches/patch-girara_session.c:1.1
--- /dev/null Fri Dec 9 08:06:50 2016
+++ pkgsrc/graphics/girara/patches/patch-girara_session.c Fri Dec 9 08:06:50 2016
@@ -0,0 +1,123 @@
+$NetBSD: patch-girara_session.c,v 1.1 2016/12/09 08:06:50 leot Exp $
+
+Update font handling for changes in Gtk+ 3.21
+(from upstream commit 949c879aa84e9496fabc7d3602060e29f9dc42a1)
+
+--- girara/session.c.orig 2016-04-18 20:35:34.000000000 +0000
++++ girara/session.c
+@@ -44,7 +44,6 @@ init_template_engine(GiraraTemplate* css
+ {
+ static const char* variable_names[] = {
+ "session",
+- "font",
+ "default-fg",
+ "default-bg",
+ "inputbar-fg",
+@@ -78,6 +77,88 @@ init_template_engine(GiraraTemplate* css
+ for (size_t idx = 0; idx < LENGTH(variable_names); ++idx) {
+ girara_template_add_variable(csstemplate, variable_names[idx]);
+ }
++
++ if (gtk_check_version(3, 20, 0) == NULL) {
++ girara_template_add_variable(csstemplate, "font-family");
++ girara_template_add_variable(csstemplate, "font-size");
++ girara_template_add_variable(csstemplate, "font-weight");
++ } else {
++ girara_template_add_variable(csstemplate, "font");
++ }
++}
++
++void
++css_template_fill_font(GiraraTemplate* csstemplate, const char* font)
++{
++ if (gtk_check_version(3, 20, 0) != NULL) {
++ girara_template_set_variable_value(csstemplate, "font", font);
++ return;
++ }
++
++ PangoFontDescription* descr = pango_font_description_from_string(font);
++ if (descr == NULL) {
++ return;
++ }
++
++ girara_template_set_variable_value(csstemplate, "font-family",
++ pango_font_description_get_family(descr));
++
++ char* size = g_strdup_printf("%d%s", pango_font_description_get_size(descr) / PANGO_SCALE,
++ pango_font_description_get_size_is_absolute(descr) == FALSE ? "pt" : "");
++ girara_template_set_variable_value(csstemplate, "font-size", size);
++ g_free(size);
++
++ switch (pango_font_description_get_weight(descr)) {
++ case PANGO_WEIGHT_THIN:
++ girara_template_set_variable_value(csstemplate, "font-weight", "thin");
++ break;
++
++ case PANGO_WEIGHT_ULTRALIGHT:
++ girara_template_set_variable_value(csstemplate, "font-weight", "ultralight");
++ break;
++
++ case PANGO_WEIGHT_SEMILIGHT:
++ girara_template_set_variable_value(csstemplate, "font-weight", "light");
++ break;
++
++ case PANGO_WEIGHT_LIGHT:
++ girara_template_set_variable_value(csstemplate, "font-weight", "light");
++ break;
++
++ case PANGO_WEIGHT_BOOK:
++ girara_template_set_variable_value(csstemplate, "font-weight", "book");
++ break;
++
++ case PANGO_WEIGHT_MEDIUM:
++ girara_template_set_variable_value(csstemplate, "font-weight", "medium");
++ break;
++
++ case PANGO_WEIGHT_SEMIBOLD:
++ girara_template_set_variable_value(csstemplate, "font-weight", "semibold");
++ break;
++
++ case PANGO_WEIGHT_BOLD:
++ girara_template_set_variable_value(csstemplate, "font-weight", "bold");
++ break;
++
++ case PANGO_WEIGHT_ULTRABOLD:
++ girara_template_set_variable_value(csstemplate, "font-weight", "ultrabold");
++ break;
++
++ case PANGO_WEIGHT_HEAVY:
++ girara_template_set_variable_value(csstemplate, "font-weight", "heavy");
++ break;
++
++ case PANGO_WEIGHT_ULTRAHEAVY:
++ girara_template_set_variable_value(csstemplate, "font-weight", "ultraheavy");
++ break;
++
++ default:
++ girara_template_set_variable_value(csstemplate, "font-weight", "normal");
++ break;
++ }
++
++ pango_font_description_free(descr);
+ }
+
+ static void
+@@ -91,10 +172,16 @@ fill_template_with_values(girara_session
+ char* font = NULL;
+ girara_setting_get(session, "font", &font);
+ if (font != NULL) {
+- girara_template_set_variable_value(csstemplate, "font", font);
++ css_template_fill_font(csstemplate, font);
+ g_free(font);
+ } else {
+- girara_template_set_variable_value(csstemplate, "font", "monospace normal 9");
++ if (gtk_check_version(3, 20, 0) == NULL) {
++ girara_template_set_variable_value(csstemplate, "font-family", "monospace");
++ girara_template_set_variable_value(csstemplate, "font-size", "9pt");
++ girara_template_set_variable_value(csstemplate, "font-weight", "normal");
++ } else {
++ girara_template_set_variable_value(csstemplate, "font", "monospace normal 9");
++ }
+ };
+
+ /* parse color values */
Home |
Main Index |
Thread Index |
Old Index