aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--GNUmakefile15
-rw-r--r--vconsole.c12
2 files changed, 19 insertions, 8 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 6db99e3..ab4ec44 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -20,12 +20,21 @@ define make-config
LIB := $(LIB)
HAVE_GLIB := $(call ac_pkg_config,glib-2.0)
HAVE_GTHREAD := $(call ac_pkg_config,gthread-2.0)
-HAVE_GTK := $(call ac_pkg_config,gtk+-2.0)
-HAVE_VTE := $(call ac_pkg_config,vte)
+HAVE_GTK2 := $(call ac_pkg_config,gtk+-2.0)
+HAVE_VTE2 := $(call ac_pkg_config,vte)
+HAVE_GTK3 := $(call ac_pkg_config,gtk+-3.0)
+HAVE_VTE3 := $(call ac_pkg_config,vte-2.90)
HAVE_LIBVIRT := $(call ac_pkg_config,libvirt)
endef
+ifeq ($(HAVE_GTK3)-$(HAVE_VTE3),yes-yes)
+CFLAGS += -Wno-deprecated-declarations
+wanted := $(HAVE_GLIB)-$(HAVE_GTHREAD)-$(HAVE_GTK3)-$(HAVE_VTE3)-$(HAVE_LIBVIRT)
+pkglst := glib-2.0 gthread-2.0 gtk+-3.0 vte-2.90 libvirt
+else
+wanted := $(HAVE_GLIB)-$(HAVE_GTHREAD)-$(HAVE_GTK2)-$(HAVE_VTE2)-$(HAVE_LIBVIRT)
pkglst := glib-2.0 gthread-2.0 gtk+-2.0 vte libvirt
+endif
CFLAGS += -Wno-strict-prototypes
CFLAGS += $(shell test "$(pkglst)" != "" && pkg-config --cflags $(pkglst))
@@ -38,7 +47,7 @@ DESKTOP := $(wildcard $(patsubst %,%.desktop,$(TARGETS)))
########################################################################
# rules
-ifeq ($(HAVE_GLIB)-$(HAVE_GTHREAD)-$(HAVE_GTK)-$(HAVE_VTE)-$(HAVE_LIBVIRT),yes-yes-yes-yes-yes)
+ifeq ($(wanted),yes-yes-yes-yes-yes)
build: $(TARGETS)
else
build:
diff --git a/vconsole.c b/vconsole.c
index 2e73119..64a96d7 100644
--- a/vconsole.c
+++ b/vconsole.c
@@ -46,7 +46,7 @@ void config_write(void)
static int gtk_getstring(GtkWidget *window, char *title, char *message,
char *dest, int dlen)
{
- GtkWidget *dialog, *label, *entry;
+ GtkWidget *dialog, *label, *entry, *vbox;
const char *txt;
int retval;
@@ -68,9 +68,10 @@ static int gtk_getstring(GtkWidget *window, char *title, char *message,
gtk_entry_set_text(GTK_ENTRY(entry), dest);
gtk_entry_set_activates_default(GTK_ENTRY(entry), TRUE);
- gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), label);
- gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), entry);
- gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog)->vbox), 10);
+ vbox = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
+ gtk_container_add(GTK_CONTAINER(vbox), label);
+ gtk_container_add(GTK_CONTAINER(vbox), entry);
+ gtk_box_set_spacing(GTK_BOX(vbox), 10);
/* show and wait for response */
gtk_widget_show_all(dialog);
@@ -158,7 +159,8 @@ static int pickcolor(char *title, char *group, char *key, char *current)
gdk_color_parse(current, &color);
dialog = gtk_color_selection_dialog_new(title);
- csel = GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(dialog)->colorsel);
+ csel = GTK_COLOR_SELECTION(gtk_color_selection_dialog_get_color_selection
+ (GTK_COLOR_SELECTION_DIALOG(dialog)));
gtk_color_selection_set_has_opacity_control(csel, FALSE);
gtk_color_selection_set_current_color(csel, &color);