Mercurial > hg > xemacs-beta
comparison src/device-gtk.c @ 5125:b5df3737028a ben-lisp-object
merge
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Wed, 24 Feb 2010 01:58:04 -0600 |
parents | d1247f3cc363 3c3c1d139863 |
children | a9c41067dd88 |
comparison
equal
deleted
inserted
replaced
5124:623d57b7fbe8 | 5125:b5df3737028a |
---|---|
232 allocate_gtk_device_struct (d); | 232 allocate_gtk_device_struct (d); |
233 display = DEVICE_CONNECTION (d); | 233 display = DEVICE_CONNECTION (d); |
234 | 234 |
235 /* Attempt to load a site-specific gtkrc */ | 235 /* Attempt to load a site-specific gtkrc */ |
236 { | 236 { |
237 Lisp_Object gtkrc = Fexpand_file_name (build_string ("gtkrc"), Vdata_directory); | 237 Lisp_Object gtkrc = Fexpand_file_name (build_ascstring ("gtkrc"), Vdata_directory); |
238 gchar **default_files = gtk_rc_get_default_files (); | 238 gchar **default_files = gtk_rc_get_default_files (); |
239 gint num_files; | 239 gint num_files; |
240 | 240 |
241 if (STRINGP (gtkrc)) | 241 if (STRINGP (gtkrc)) |
242 { | 242 { |
246 | 246 |
247 for (num_files = 0; default_files[num_files]; num_files++); | 247 for (num_files = 0; default_files[num_files]; num_files++); |
248 | 248 |
249 new_rc_files = xnew_array_and_zero (gchar *, num_files + 3); | 249 new_rc_files = xnew_array_and_zero (gchar *, num_files + 3); |
250 | 250 |
251 LISP_STRING_TO_EXTERNAL (gtkrc, new_rc_files[0], Qfile_name); | 251 LISP_PATHNAME_CONVERT_OUT (gtkrc, new_rc_files[0]); |
252 | 252 |
253 for (ctr = 1; default_files[ctr-1]; ctr++) | 253 for (ctr = 1; default_files[ctr-1]; ctr++) |
254 new_rc_files[ctr] = g_strdup (default_files[ctr-1]); | 254 new_rc_files[ctr] = g_strdup (default_files[ctr-1]); |
255 | 255 |
256 gtk_rc_set_default_files (new_rc_files); | 256 gtk_rc_set_default_files (new_rc_files); |
257 | 257 |
258 for (ctr = 1; new_rc_files[ctr]; ctr++) | 258 for (ctr = 1; new_rc_files[ctr]; ctr++) |
259 free(new_rc_files[ctr]); | 259 free(new_rc_files[ctr]); |
260 | 260 |
261 xfree (new_rc_files, gchar **); | 261 xfree (new_rc_files); |
262 } | 262 } |
263 } | 263 } |
264 | 264 |
265 Fgtk_init (Vgtk_initial_argv_list); | 265 Fgtk_init (Vgtk_initial_argv_list); |
266 | 266 |
352 | 352 |
353 #ifndef NEW_GC | 353 #ifndef NEW_GC |
354 static void | 354 static void |
355 free_gtk_device_struct (struct device *d) | 355 free_gtk_device_struct (struct device *d) |
356 { | 356 { |
357 xfree (d->device_data, void *); | 357 xfree (d->device_data); |
358 } | 358 } |
359 #endif /* not NEW_GC */ | 359 #endif /* not NEW_GC */ |
360 | 360 |
361 static void | 361 static void |
362 gtk_delete_device (struct device *d) | 362 gtk_delete_device (struct device *d) |
662 FROB_COLOR (base, "base"); | 662 FROB_COLOR (base, "base"); |
663 #undef FROB_COLOR | 663 #undef FROB_COLOR |
664 | 664 |
665 result = nconc2 (result, list2 (Qfont, convert_font (style->font))); | 665 result = nconc2 (result, list2 (Qfont, convert_font (style->font))); |
666 | 666 |
667 #define FROB_PIXMAP(state) (style->rc_style->bg_pixmap_name[state] ? build_string (style->rc_style->bg_pixmap_name[state]) : Qnil) | 667 #define FROB_PIXMAP(state) (style->rc_style->bg_pixmap_name[state] ? build_cistring (style->rc_style->bg_pixmap_name[state]) : Qnil) |
668 | 668 |
669 if (style->rc_style) | 669 if (style->rc_style) |
670 result = nconc2 (result, list2 (Qbackground, | 670 result = nconc2 (result, list2 (Qbackground, |
671 list5 ( FROB_PIXMAP (GTK_STATE_NORMAL), | 671 list5 ( FROB_PIXMAP (GTK_STATE_NORMAL), |
672 FROB_PIXMAP (GTK_STATE_ACTIVE), | 672 FROB_PIXMAP (GTK_STATE_ACTIVE), |
742 Vgtk_initial_argv_list = Qnil; | 742 Vgtk_initial_argv_list = Qnil; |
743 | 743 |
744 Qgtk_seen_characters = Qnil; | 744 Qgtk_seen_characters = Qnil; |
745 } | 745 } |
746 | 746 |
747 #include <gdk/gdkx.h> | 747 #include "sysgdkx.h" |
748 | |
748 static void | 749 static void |
749 gtk_device_init_x_specific_cruft (struct device *d) | 750 gtk_device_init_x_specific_cruft (struct device *d) |
750 { | 751 { |
751 DEVICE_INFD (d) = DEVICE_OUTFD (d) = ConnectionNumber (GDK_DISPLAY ()); | 752 DEVICE_INFD (d) = DEVICE_OUTFD (d) = ConnectionNumber (GDK_DISPLAY ()); |
752 } | 753 } |