Skip to content

Commit

Permalink
[gtk] fix depreciated gtk2 elements
Browse files Browse the repository at this point in the history
  • Loading branch information
gautierhattenberger committed Mar 30, 2020
1 parent 30f63ac commit 00d0c27
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion sw/ground_segment/misc/Makefile
Expand Up @@ -36,7 +36,7 @@ else
endif

CFLAGS += -Wall -fPIC -g
GTK_CFLAGS = $(shell pkg-config gtk+-2.0 --cflags)
GTK_CFLAGS = $(shell pkg-config gtk+-2.0 --cflags) -DGTK_DISABLE_DEPRECATED
GTK_LDFLAGS = $(shell pkg-config gtk+-2.0 --libs) $(shell pkg-config --libs ivy-glib) $(shell pcre-config --libs) -fPIC

GLIBIVY_CFLAGS = $(shell pkg-config --cflags ivy-glib)
Expand Down
6 changes: 3 additions & 3 deletions sw/ground_segment/misc/sbs2ivy.c
Expand Up @@ -597,14 +597,14 @@ int main(int argc, char **argv)
IvyStart(options.ivy_bus);

// Add Timer
gtk_timeout_add(delay / 4, timeout_callback, NULL);
g_timeout_add(delay / 4, timeout_callback, NULL);

// GTK Window
GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(window), "SBS2Ivy");

gtk_signal_connect(GTK_OBJECT(window), "delete_event",
GTK_SIGNAL_FUNC(delete_event), NULL);
g_signal_connect(GTK_OBJECT(window), "delete_event",
G_CALLBACK(delete_event), NULL);

GtkWidget *box = gtk_vbox_new(TRUE, 1);
gtk_container_add(GTK_CONTAINER(window), box);
Expand Down
4 changes: 2 additions & 2 deletions sw/ground_segment/misc/video_synchronizer.c
Expand Up @@ -217,15 +217,15 @@ static void on_quit(GtkWidget *object, gpointer user_data) {

static void on_video_sync_changed(GtkWidget *widget, gpointer data) {

startVideoAfter = gtk_spin_button_get_value_as_float((GtkSpinButton *)spinButton);
startVideoAfter = gtk_spin_button_get_value((GtkSpinButton *)spinButton);

calcCurrentPlayingTime();
sendCurrentPlayingTime();
}

static void on_video_time_tag_changed(GtkWidget *widget, gpointer data) {

timeTagInVideo = gtk_spin_button_get_value_as_float((GtkSpinButton *)spinButtonVideo);
timeTagInVideo = gtk_spin_button_get_value((GtkSpinButton *)spinButtonVideo);

calcCurrentPlayingTime();
sendCurrentPlayingTime();
Expand Down
2 changes: 1 addition & 1 deletion sw/ground_segment/tmtc/Makefile
Expand Up @@ -112,7 +112,7 @@ settings.cmo : ../cockpit/page_settings.cmi

CC = gcc

GTK_CFLAGS = $(shell pkg-config gtk+-2.0 --cflags)
GTK_CFLAGS = $(shell pkg-config gtk+-2.0 --cflags) -DGTK_DISABLE_DEPRECATED
GTK_LDFLAGS = $(shell pkg-config gtk+-2.0 --libs) $(shell pcre-config --libs)

GLIBIVY_CFLAGS = -Wall -fPIC $(shell pkg-config --cflags ivy-glib)
Expand Down
6 changes: 3 additions & 3 deletions sw/ground_segment/tmtc/ivy_serial_bridge.c
Expand Up @@ -780,14 +780,14 @@ int main ( int argc, char** argv)
IvyStart("127.255.255.255");

// Add Timer
gtk_timeout_add(delay / 4, timeout_callback, NULL);
g_timeout_add(delay / 4, timeout_callback, NULL);

// GTK Window
GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "IVY_Serial_Bridge");

gtk_signal_connect (GTK_OBJECT (window), "delete_event",
GTK_SIGNAL_FUNC (delete_event), NULL);
g_signal_connect (GTK_OBJECT (window), "delete_event",
G_CALLBACK (delete_event), NULL);

GtkWidget *box = gtk_vbox_new(TRUE, 1);
gtk_container_add (GTK_CONTAINER (window), box);
Expand Down
2 changes: 1 addition & 1 deletion sw/lib/ocaml/Makefile
Expand Up @@ -131,7 +131,7 @@ tests : lib-pprz.cma $(TESTS_CMO)
$(XCMO) $(XCMX): PKGCOMMON=$(XPKGCOMMON)


GTKCFLAGS := $(shell pkg-config --cflags gtk+-2.0)
GTKCFLAGS := $(shell pkg-config --cflags gtk+-2.0) -DGTK_DISABLE_DEPRECATED
ml_gtk_drag.o : ml_gtk_drag.c
@echo OC $<
$(Q)$(OCAMLC) $(INCLUDES) -package $(PKGCOMMON) -c -ccopt "$(GTKCFLAGS)" $<
Expand Down

0 comments on commit 00d0c27

Please sign in to comment.