Commit 8d4eb8bc1ec71fcf118660a36bc8bbebe91ac886

Authored by Perry Werneck
1 parent fa528fb5

Trying to fix windows icons.

src/objects/window/window.c
... ... @@ -143,25 +143,75 @@ static void constructed(GObject *object) {
143 143  
144 144 static void pw3270ApplicationWindow_class_init(pw3270ApplicationWindowClass *klass) {
145 145  
  146 + static const char * icon_search_paths[] = {
  147 + "icons",
  148 +#ifdef _WIN32
  149 + "share/icons",
  150 +#endif // _WIN32
  151 + };
  152 +
  153 + size_t ix;
  154 + for(ix = 0; ix < G_N_ELEMENTS(icon_search_paths); ix++) {
  155 +#ifdef DEBUG
  156 + lib3270_autoptr(char) path = g_build_filename(g_get_current_dir(),icon_search_paths[ix],NULL);
  157 +#else
  158 + lib3270_autoptr(char) path = lib3270_build_data_filename(icon_search_paths[ix],NULL);
  159 +#endif
  160 +
  161 + if(g_file_test(path,G_FILE_TEST_IS_DIR)) {
  162 + g_message("Adding '%s' on icon search path",path);
  163 + gtk_icon_theme_append_search_path(
  164 + gtk_icon_theme_get_default(),
  165 + path
  166 + );
  167 + }
  168 + }
  169 +
146 170 #ifdef DEBUG
147 171 {
  172 + gchar **paths = NULL;
  173 + gint n_paths = 0;
  174 +
  175 + gtk_icon_theme_get_search_path (
  176 + gtk_icon_theme_get_default(),
  177 + &paths,
  178 + &n_paths
  179 + );
  180 +
  181 + gint p;
  182 + for(p = 0; p < n_paths;p++) {
  183 + printf("**** [%s]\n",paths[p]);
  184 + }
  185 + }
  186 +#endif // DEBUG
  187 +
  188 + /*
  189 + {
148 190 gtk_icon_theme_append_search_path(
149 191 gtk_icon_theme_get_default(),
150 192 "./icons"
151 193 );
  194 +
  195 + gchar **paths = NULL;
  196 + gint n_paths = 0;
  197 +
  198 + gtk_icon_theme_get_search_path (
  199 + gtk_icon_theme_get_default(),
  200 + &paths,
  201 + &n_paths
  202 + );
  203 +
  204 + gint p;
  205 + for(p = 0; p < n_paths;p++) {
  206 + printf("**** [%s]\n",paths[p]);
  207 + }
  208 +
152 209 }
153 210 #else
154 211 {
155   - lib3270_autoptr(char) path = lib3270_build_data_filename("icons",NULL);
156   - if(g_file_test(path,G_FILE_TEST_IS_DIR)) {
157   - gtk_icon_theme_append_search_path(
158   - gtk_icon_theme_get_default(),
159   - path
160   - );
161   - }
162 212 }
163 213 #endif // DEBUG
164   -
  214 + */
165 215  
166 216 {
167 217 GtkWidgetClass *widget = GTK_WIDGET_CLASS(klass);
... ...
win/gtk.css
1   -/* Disable F10 */
2 1 @binding-set NoKeyboardNavigation {
3   - unbind "<shift>F10"
4   - unbind "F10"
  2 +
  3 + /* Disable F10 */
  4 + unbind "<shift>F10"
  5 + unbind "F10"
  6 +
  7 + /* Disable Print-Screen */
  8 + unbind "<shift>Print"
  9 + unbind "Print"
  10 +
5 11 }
6 12  
7 13 * {
... ...
win/makeruntime.sh.in
... ... @@ -264,15 +264,6 @@ copy_theme() {
264 264 rm -f ${TARGET}/etc/gtk-3.0/settings.ini
265 265 rm -f ${TARGET}/etc/gtk-3.0/gtkrc
266 266  
267   -# echo "[Settings]" >> ${TARGET}/etc/gtk-3.0/settings.ini
268   -# echo "gtk-theme-name = win32" >> ${TARGET}/etc/gtk-3.0/settings.ini
269   -
270   -# echo "gtk-theme-name = MS-Windows" >> ${TARGET}/etc/gtk-3.0/settings.ini
271   -# echo "gtk-icon-theme-name = ${1}" >> ${TARGET}/etc/gtk-3.0/settings.ini
272   -# echo "gtk-fallback-icon-theme = ${1}" >> ${TARGET}/etc/gtk-3.0/settings.ini
273   -# echo "gtk-font-name = Sans 10" >> ${TARGET}/etc/gtk-3.0/settings.ini
274   -# echo "gtk-button-images = 1" >> ${TARGET}/etc/gtk-3.0/settings.ini
275   -
276 267 mkdir -p ${TARGET}/share/icons
277 268 if [ "$?" != 0 ]; then
278 269 echo "Can´t create icons folder"
... ... @@ -291,11 +282,11 @@ copy_theme() {
291 282 exit -1
292 283 fi
293 284  
294   - cp -rv /usr/share/themes/${1} ${TARGET}/share/themes
295   - if [ "$?" != 0 ]; then
296   - echo "Can´t copy ${1} theme"
297   - exit -1
298   - fi
  285 +# cp -rv /usr/share/themes/${1} ${TARGET}/share/themes
  286 +# if [ "$?" != 0 ]; then
  287 +# echo "Can´t copy ${1} theme"
  288 +# exit -1
  289 +# fi
299 290  
300 291 echo "${myDIR}/gtk.css"
301 292 if [ -e "${myDIR}/gtk.css" ]; then
... ...