diff --git a/src/objects/window/window.c b/src/objects/window/window.c index 8098aaf..57611fe 100644 --- a/src/objects/window/window.c +++ b/src/objects/window/window.c @@ -143,25 +143,75 @@ static void constructed(GObject *object) { static void pw3270ApplicationWindow_class_init(pw3270ApplicationWindowClass *klass) { + static const char * icon_search_paths[] = { + "icons", +#ifdef _WIN32 + "share/icons", +#endif // _WIN32 + }; + + size_t ix; + for(ix = 0; ix < G_N_ELEMENTS(icon_search_paths); ix++) { +#ifdef DEBUG + lib3270_autoptr(char) path = g_build_filename(g_get_current_dir(),icon_search_paths[ix],NULL); +#else + lib3270_autoptr(char) path = lib3270_build_data_filename(icon_search_paths[ix],NULL); +#endif + + if(g_file_test(path,G_FILE_TEST_IS_DIR)) { + g_message("Adding '%s' on icon search path",path); + gtk_icon_theme_append_search_path( + gtk_icon_theme_get_default(), + path + ); + } + } + #ifdef DEBUG { + gchar **paths = NULL; + gint n_paths = 0; + + gtk_icon_theme_get_search_path ( + gtk_icon_theme_get_default(), + &paths, + &n_paths + ); + + gint p; + for(p = 0; p < n_paths;p++) { + printf("**** [%s]\n",paths[p]); + } + } +#endif // DEBUG + + /* + { gtk_icon_theme_append_search_path( gtk_icon_theme_get_default(), "./icons" ); + + gchar **paths = NULL; + gint n_paths = 0; + + gtk_icon_theme_get_search_path ( + gtk_icon_theme_get_default(), + &paths, + &n_paths + ); + + gint p; + for(p = 0; p < n_paths;p++) { + printf("**** [%s]\n",paths[p]); + } + } #else { - lib3270_autoptr(char) path = lib3270_build_data_filename("icons",NULL); - if(g_file_test(path,G_FILE_TEST_IS_DIR)) { - gtk_icon_theme_append_search_path( - gtk_icon_theme_get_default(), - path - ); - } } #endif // DEBUG - + */ { GtkWidgetClass *widget = GTK_WIDGET_CLASS(klass); diff --git a/win/gtk.css b/win/gtk.css index a3691d4..e58e051 100644 --- a/win/gtk.css +++ b/win/gtk.css @@ -1,7 +1,13 @@ -/* Disable F10 */ @binding-set NoKeyboardNavigation { - unbind "F10" - unbind "F10" + + /* Disable F10 */ + unbind "F10" + unbind "F10" + + /* Disable Print-Screen */ + unbind "Print" + unbind "Print" + } * { diff --git a/win/makeruntime.sh.in b/win/makeruntime.sh.in index 93a5e36..9040a47 100755 --- a/win/makeruntime.sh.in +++ b/win/makeruntime.sh.in @@ -264,15 +264,6 @@ copy_theme() { rm -f ${TARGET}/etc/gtk-3.0/settings.ini rm -f ${TARGET}/etc/gtk-3.0/gtkrc -# echo "[Settings]" >> ${TARGET}/etc/gtk-3.0/settings.ini -# echo "gtk-theme-name = win32" >> ${TARGET}/etc/gtk-3.0/settings.ini - -# echo "gtk-theme-name = MS-Windows" >> ${TARGET}/etc/gtk-3.0/settings.ini -# echo "gtk-icon-theme-name = ${1}" >> ${TARGET}/etc/gtk-3.0/settings.ini -# echo "gtk-fallback-icon-theme = ${1}" >> ${TARGET}/etc/gtk-3.0/settings.ini -# echo "gtk-font-name = Sans 10" >> ${TARGET}/etc/gtk-3.0/settings.ini -# echo "gtk-button-images = 1" >> ${TARGET}/etc/gtk-3.0/settings.ini - mkdir -p ${TARGET}/share/icons if [ "$?" != 0 ]; then echo "Can´t create icons folder" @@ -291,11 +282,11 @@ copy_theme() { exit -1 fi - cp -rv /usr/share/themes/${1} ${TARGET}/share/themes - if [ "$?" != 0 ]; then - echo "Can´t copy ${1} theme" - exit -1 - fi +# cp -rv /usr/share/themes/${1} ${TARGET}/share/themes +# if [ "$?" != 0 ]; then +# echo "Can´t copy ${1} theme" +# exit -1 +# fi echo "${myDIR}/gtk.css" if [ -e "${myDIR}/gtk.css" ]; then -- libgit2 0.21.2