[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/src ChangeLog frame.c
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] emacs/src ChangeLog frame.c |
Date: |
Thu, 17 Sep 2009 16:41:58 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 09/09/17 16:41:57
Modified files:
src : ChangeLog frame.c
Log message:
(x_get_resource_string): Re-add for non-toolkit builds (bug#4461).
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/ChangeLog?cvsroot=emacs&r1=1.7749&r2=1.7750
http://cvs.savannah.gnu.org/viewcvs/emacs/src/frame.c?cvsroot=emacs&r1=1.427&r2=1.428
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/src/ChangeLog,v
retrieving revision 1.7749
retrieving revision 1.7750
diff -u -b -r1.7749 -r1.7750
--- ChangeLog 17 Sep 2009 06:10:46 -0000 1.7749
+++ ChangeLog 17 Sep 2009 16:41:55 -0000 1.7750
@@ -1,3 +1,8 @@
+2009-09-17 Stefan Monnier <address@hidden>
+
+ * frame.c (x_get_resource_string): Re-add for non-toolkit builds
+ (bug#4461).
+
2009-09-17 Dan Nicolaescu <address@hidden>
* puresize.h (BASE_PURESIZE): Increase to 1290000.
Index: frame.c
===================================================================
RCS file: /sources/emacs/emacs/src/frame.c,v
retrieving revision 1.427
retrieving revision 1.428
diff -u -b -r1.427 -r1.428
--- frame.c 16 Sep 2009 20:36:55 -0000 1.427
+++ frame.c 17 Sep 2009 16:41:57 -0000 1.428
@@ -3893,6 +3893,32 @@
attribute, class, component, subclass);
}
+#if defined HAVE_X_WINDOWS && !defined USE_X_TOOLKIT
+/* Used when C code wants a resource value. */
+/* Called from oldXMenu/Create.c. */
+char *
+x_get_resource_string (attribute, class)
+ char *attribute, *class;
+{
+ char *name_key;
+ char *class_key;
+ struct frame *sf = SELECTED_FRAME ();
+
+ /* Allocate space for the components, the dots which separate them,
+ and the final '\0'. */
+ name_key = (char *) alloca (SBYTES (Vinvocation_name)
+ + strlen (attribute) + 2);
+ class_key = (char *) alloca ((sizeof (EMACS_CLASS) - 1)
+ + strlen (class) + 2);
+
+ sprintf (name_key, "%s.%s", SDATA (Vinvocation_name), attribute);
+ sprintf (class_key, "%s.%s", EMACS_CLASS, class);
+
+ return x_get_string_resource (FRAME_X_DISPLAY_INFO (sf)->xrdb,
+ name_key, class_key);
+}
+#endif
+
/* Return the value of parameter PARAM.
First search ALIST, then Vdefault_frame_alist, then the X defaults