diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 6 | ||||
-rw-r--r-- | src/interface-gtk.cpp | 14 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 739aefd..384d8f3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -7,7 +7,11 @@ if CLANG AM_CXXFLAGS += -Wno-mismatched-tags endif -AM_CPPFLAGS = -D'SCITECOLIBDIR="@scitecolibdir@"' +# These paths can be changed at install-time and +# should not be written into config.h: +AM_CPPFLAGS = -D'SCITECODATADIR="$(pkgdatadir)"' \ + -D'SCITECOLIBDIR="@scitecolibdir@"' + if NEED_COMPAT AM_CPPFLAGS += -I@top_srcdir@/compat endif diff --git a/src/interface-gtk.cpp b/src/interface-gtk.cpp index e01a2eb..ebc7cb1 100644 --- a/src/interface-gtk.cpp +++ b/src/interface-gtk.cpp @@ -27,6 +27,7 @@ #include <gdk/gdk.h> #include <gdk/gdkkeysyms.h> +#include <gdk-pixbuf/gdk-pixbuf.h> #include <gtk/gtk.h> #include "gtk-info-popup.h" @@ -346,9 +347,22 @@ InterfaceGtk::widget_set_font(GtkWidget *widget, const gchar *font_name) void InterfaceGtk::event_loop_impl(void) { + GdkPixbuf *icon; GThread *thread; /* + * Assign an icon to the window. + * If the file could not be found, we fail silently. + * On Windows, it may be better to load the icon compiled + * as a resource into the binary. + */ + icon = gdk_pixbuf_new_from_file(SCITECODATADIR G_DIR_SEPARATOR_S + "sciteco-48.png", + NULL); + if (icon) + gtk_window_set_icon(GTK_WINDOW(window), icon); + + /* * When changing views, the new widget is not * added immediately to avoid flickering in the GUI. * It is only updated once per key press and only |