From 5cd2227ff6ac8b358a76c09bafd4940548076467 Mon Sep 17 00:00:00 2001 From: "Gergely POLONKAI (W00d5t0ck)" Date: Sun, 8 Sep 2013 13:38:48 +0200 Subject: [PATCH] Added libgd as a compile time dependency It is now used temporarily to create a header bar in the first window --- src/Makefile.am | 4 ++-- src/astrognome.c | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 39d4cc9..5f5a0b4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -20,9 +20,9 @@ AM_CPPFLAGS = -DG_LOG_DOMAIN=\"Astrognome\" -DLOCALEDIR=\"$(localedir)\" -DPKGDA bin_PROGRAMS = astrognome astrognome_SOURCES = ag-app.c astrognome.c $(BUILT_SOURCES) -astrognome_LDADD = $(SWE_GLIB_LIBS) $(GTK_LIBS) +astrognome_LDADD = $(SWE_GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/libgd/libgd.la astrognome_LDFLAGS = -rdynamic -astrognome_CFLAGS = $(SWE_GLIB_CFLAGS) $(CFLAGS) $(GTK_CFLAGS) -Wall +astrognome_CFLAGS = $(SWE_GLIB_CFLAGS) $(CFLAGS) $(GTK_CFLAGS) -Wall -I$(top_srcdir)/libgd guidir = $(pkgdatadir) gui_DATA = astrognome.ui diff --git a/src/astrognome.c b/src/astrognome.c index 64189e9..3201f32 100644 --- a/src/astrognome.c +++ b/src/astrognome.c @@ -2,6 +2,8 @@ #include #include +#include + #include #define UI_FILE PKGDATADIR "/astrognome.ui" @@ -500,6 +502,16 @@ application_activate_cb(GtkApplication *app, gpointer user_data) grid = gtk_grid_new(); gtk_container_add(GTK_CONTAINER(window), grid); + header_bar = gd_header_bar_new(); + + menu_button = gd_header_menu_button_new(); + gd_header_button_set_symbolic_icon_name(GD_HEADER_BUTTON(menu_button), "emblem-system-symbolic"); + gtk_actionable_set_action_name(GTK_ACTIONABLE(menu_button), "win.gear-menu"); + + gd_header_bar_pack_end(GD_HEADER_BAR(header_bar), menu_button); + + gtk_grid_attach(GTK_GRID(grid), header_bar, 0, 0, 1, 1); + gtk_widget_show_all(window); /*