aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2016-06-27 11:48:05 +0200
committerGerd Hoffmann <kraxel@redhat.com>2016-06-27 11:48:05 +0200
commit5c04870d60159bafe4931ce8a140840dd0a7429b (patch)
tree23eeaa771883f28154cd998d07159796df34f33d
parentdc7e1a348cd7b233666f7480cf3f1fbd47560acd (diff)
downloadvconsole-5c04870d60159bafe4931ce8a140840dd0a7429b.tar.gz
transition to vte-2.91
-rw-r--r--GNUmakefile8
-rw-r--r--domain.c16
-rw-r--r--vconsole.c12
3 files changed, 17 insertions, 19 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 8d4ca0b..cb92401 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -21,15 +21,9 @@ include mk/Autoconf.mk
define make-config
LIB := $(LIB)
-HAVE_VTE291 := $(call ac_pkg_config,vte-2.91)
endef
-ifeq ($(HAVE_VTE291),x-yes)
-pkgvte := vte-2.91
-else
-pkgvte := vte-2.90
-endif
-pkgs_vconsole := glib-2.0 gthread-2.0 gtk+-3.0 $(pkgvte) libvirt
+pkgs_vconsole := glib-2.0 gthread-2.0 gtk+-3.0 vte-2.91 libvirt
pkgs_vpublish := glib-2.0 gthread-2.0 libvirt libxml-2.0 avahi-client avahi-glib
HAVE_DEPS := $(shell pkg-config $(pkgs_vconsole) $(pkgs_vpublish) && echo yes)
diff --git a/domain.c b/domain.c
index 1d39776..8679271 100644
--- a/domain.c
+++ b/domain.c
@@ -71,21 +71,23 @@ static void domain_configure_vte(struct vconsole_domain *dom)
{
struct vconsole_window *win = dom->conn->win;
VteTerminal *vte = VTE_TERMINAL(dom->vte);
- VteTerminalCursorBlinkMode bl =
+ VteCursorBlinkMode bl =
win->tty_blink ? VTE_CURSOR_BLINK_ON : VTE_CURSOR_BLINK_OFF;
- GdkColor fg = {0,0,0,0};
- GdkColor bg = {0,0,0,0};
+ GdkRGBA fg = { 0, 0, 0, 0 };
+ GdkRGBA bg = { 0, 0, 0, 0 };
+ PangoFontDescription *font;
if (!dom->vte)
return;
- gdk_color_parse(win->tty_fg, &fg);
- gdk_color_parse(win->tty_bg, &bg);
-
- vte_terminal_set_font_from_string(vte, win->tty_font);
+ gdk_rgba_parse(&fg, win->tty_fg);
+ gdk_rgba_parse(&bg, win->tty_bg);
vte_terminal_set_cursor_blink_mode(vte, bl);
vte_terminal_set_color_foreground(vte, &fg);
vte_terminal_set_color_background(vte, &bg);
+
+ font = pango_font_description_from_string(win->tty_font);
+ vte_terminal_set_font(vte, font);
}
static void make_dirs(const char *filename)
diff --git a/vconsole.c b/vconsole.c
index 1556606..db172d9 100644
--- a/vconsole.c
+++ b/vconsole.c
@@ -106,15 +106,18 @@ static int gtk_getstring(GtkWidget *window, char *title, char *message,
dialog = gtk_dialog_new_with_buttons(title,
GTK_WINDOW(window),
GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_STOCK_OK,
- GTK_RESPONSE_ACCEPT,
- GTK_STOCK_CANCEL,
- GTK_RESPONSE_REJECT,
+ "_OK", GTK_RESPONSE_ACCEPT,
+ "_Cancel", GTK_RESPONSE_REJECT,
NULL);
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT);
label = gtk_label_new(message);
+#if GTK_CHECK_VERSION(3,16,0)
+ gtk_label_set_xalign(GTK_LABEL(label), 0);
+ gtk_label_set_yalign(GTK_LABEL(label), 0.5);
+#else
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+#endif
entry = gtk_entry_new();
gtk_entry_set_text(GTK_ENTRY(entry), dest);
@@ -471,7 +474,6 @@ static void menu_cb_about(GtkAction *action, gpointer userdata)
"authors", authors,
"comments", comments,
"copyright", copyright,
- "logo-icon-name", GTK_STOCK_ABOUT,
"version", VERSION,
NULL);
}