]> Pileus Git - ~andy/gtk/commitdiff
If we can't find helvetica, fall back to "fixed". If we can't find
authorOwen Taylor <otaylor@redhat.com>
Wed, 10 Feb 1999 00:21:09 +0000 (00:21 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Wed, 10 Feb 1999 00:21:09 +0000 (00:21 +0000)
Tue Feb  9 19:11:43 1999  Owen Taylor  <otaylor@redhat.com>

* gtk/gtkstyle.c (gtk_style_new): If we can't find
  helvetica, fall back to "fixed". If we can't
  find "fixed", exit cleanly.

14 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
acconfig.h
configure.in
gdk/gdkevents.c
gdk/gdkim.c
gdk/x11/gdkevents-x11.c
gdk/x11/gdkim-x11.c
gtk/gtkstyle.c

index 7ef146b595f6d9e21d0de2b01224e0603bde66a2..ae35e800c694786634c0f81127b1c1563df740a8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Tue Feb  9 19:11:43 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkstyle.c (gtk_style_new): If we can't find
+         helvetica, fall back to "fixed". If we can't
+         find "fixed", exit cleanly.
+
+Tue Feb  9 16:03:44 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * acconfig.h configure.in: Rename 
+         XIM_INST_IS_MISSING_OR_STRANGE to USE_X11R6_XIM
+
+       * Conditionalize destroy callbacks with USE_X11R6_XIM.
+
 Tue Feb  9 15:35:13 1999  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtklabel.c (gtk_label_style_set): Added
index 7ef146b595f6d9e21d0de2b01224e0603bde66a2..ae35e800c694786634c0f81127b1c1563df740a8 100644 (file)
@@ -1,3 +1,16 @@
+Tue Feb  9 19:11:43 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkstyle.c (gtk_style_new): If we can't find
+         helvetica, fall back to "fixed". If we can't
+         find "fixed", exit cleanly.
+
+Tue Feb  9 16:03:44 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * acconfig.h configure.in: Rename 
+         XIM_INST_IS_MISSING_OR_STRANGE to USE_X11R6_XIM
+
+       * Conditionalize destroy callbacks with USE_X11R6_XIM.
+
 Tue Feb  9 15:35:13 1999  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtklabel.c (gtk_label_style_set): Added
index 7ef146b595f6d9e21d0de2b01224e0603bde66a2..ae35e800c694786634c0f81127b1c1563df740a8 100644 (file)
@@ -1,3 +1,16 @@
+Tue Feb  9 19:11:43 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkstyle.c (gtk_style_new): If we can't find
+         helvetica, fall back to "fixed". If we can't
+         find "fixed", exit cleanly.
+
+Tue Feb  9 16:03:44 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * acconfig.h configure.in: Rename 
+         XIM_INST_IS_MISSING_OR_STRANGE to USE_X11R6_XIM
+
+       * Conditionalize destroy callbacks with USE_X11R6_XIM.
+
 Tue Feb  9 15:35:13 1999  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtklabel.c (gtk_label_style_set): Added
index 7ef146b595f6d9e21d0de2b01224e0603bde66a2..ae35e800c694786634c0f81127b1c1563df740a8 100644 (file)
@@ -1,3 +1,16 @@
+Tue Feb  9 19:11:43 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkstyle.c (gtk_style_new): If we can't find
+         helvetica, fall back to "fixed". If we can't
+         find "fixed", exit cleanly.
+
+Tue Feb  9 16:03:44 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * acconfig.h configure.in: Rename 
+         XIM_INST_IS_MISSING_OR_STRANGE to USE_X11R6_XIM
+
+       * Conditionalize destroy callbacks with USE_X11R6_XIM.
+
 Tue Feb  9 15:35:13 1999  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtklabel.c (gtk_label_style_set): Added
index 7ef146b595f6d9e21d0de2b01224e0603bde66a2..ae35e800c694786634c0f81127b1c1563df740a8 100644 (file)
@@ -1,3 +1,16 @@
+Tue Feb  9 19:11:43 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkstyle.c (gtk_style_new): If we can't find
+         helvetica, fall back to "fixed". If we can't
+         find "fixed", exit cleanly.
+
+Tue Feb  9 16:03:44 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * acconfig.h configure.in: Rename 
+         XIM_INST_IS_MISSING_OR_STRANGE to USE_X11R6_XIM
+
+       * Conditionalize destroy callbacks with USE_X11R6_XIM.
+
 Tue Feb  9 15:35:13 1999  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtklabel.c (gtk_label_style_set): Added
index 7ef146b595f6d9e21d0de2b01224e0603bde66a2..ae35e800c694786634c0f81127b1c1563df740a8 100644 (file)
@@ -1,3 +1,16 @@
+Tue Feb  9 19:11:43 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkstyle.c (gtk_style_new): If we can't find
+         helvetica, fall back to "fixed". If we can't
+         find "fixed", exit cleanly.
+
+Tue Feb  9 16:03:44 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * acconfig.h configure.in: Rename 
+         XIM_INST_IS_MISSING_OR_STRANGE to USE_X11R6_XIM
+
+       * Conditionalize destroy callbacks with USE_X11R6_XIM.
+
 Tue Feb  9 15:35:13 1999  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtklabel.c (gtk_label_style_set): Added
index 7ef146b595f6d9e21d0de2b01224e0603bde66a2..ae35e800c694786634c0f81127b1c1563df740a8 100644 (file)
@@ -1,3 +1,16 @@
+Tue Feb  9 19:11:43 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkstyle.c (gtk_style_new): If we can't find
+         helvetica, fall back to "fixed". If we can't
+         find "fixed", exit cleanly.
+
+Tue Feb  9 16:03:44 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * acconfig.h configure.in: Rename 
+         XIM_INST_IS_MISSING_OR_STRANGE to USE_X11R6_XIM
+
+       * Conditionalize destroy callbacks with USE_X11R6_XIM.
+
 Tue Feb  9 15:35:13 1999  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtklabel.c (gtk_label_style_set): Added
index 6142aa465fe1dd8c7fd9e4986ccb86a02a26f711..b6cb32d37f95406d0da98ecd2be2431d64d3f92a 100644 (file)
 
 #undef RESOURCE_BASE
 
-/* Define to enable POSIX threading awareness */
-#undef USE_PTHREADS
-
-#undef XIM_INST_IS_MISSING_OR_STRANGE
+/* Define to use X11R6 additions to XIM */
+#undef USE_X11R6_XIM
 
 #undef XINPUT_NONE
 #undef XINPUT_GXI
index 0d2ec29f83d3ff4ccc073b785a10db26663d1d27..2c8bfa4180bf5508e8d7b274435526816a51a9d0 100644 (file)
@@ -328,9 +328,10 @@ if test x$enable_xim_inst = xmaybe ; then
 fi
 
 if test "x$enable_xim" = "xyes"; then
+  AC_DEFINE(USE_XIM)
   GTK_XIM_FLAGS="-DUSE_XIM"
-  if test "x$enable_xim_inst" = "xno"; then
-    AC_DEFINE(XIM_INST_IS_MISSING_OR_STRANGE)
+  if test "x$enable_xim_inst" = "xyes"; then
+    AC_DEFINE(USE_X11R6_XIM)
   fi
 fi
 
index e83b05086fa0b3c0258b849f42fff68976b26b57..3ac781aac8a5f2e6a62acf30c5ec765277897bcc 100644 (file)
@@ -1955,7 +1955,7 @@ gdk_events_queue (void)
 
   while (!gdk_event_queue_find_first() && XPending (gdk_display))
     {
-  #ifdef USE_XIM
+#ifdef USE_XIM
       Window w = None;
       
       XNextEvent (gdk_display, &xevent);
index 1d833997430d48cb50d35fd9bad001c54ac62bc0..6451529f78f2cca0e09e113f7222a5a6498cf880 100644 (file)
@@ -54,7 +54,7 @@ typedef struct {
   gpointer value;
 } GdkImArg;
 
-#ifndef XIM_INST_IS_MISSING_OR_STRANGE
+#ifdef USE_X11R6_XIM
 static void   gdk_im_instantiate_cb      (Display *display,
                                          XPointer client_data,
                                          XPointer call_data);
@@ -318,6 +318,7 @@ gdk_im_set_best_style (GdkIMStyle style)
   return xim_best_allowed_style;
 }
 
+#ifdef USE_X11R6_XIM
 static void
 gdk_im_destroy_cb (XIM im, XPointer client_data, XPointer call_data)
 {
@@ -340,13 +341,10 @@ gdk_im_destroy_cb (XIM im, XPointer client_data, XPointer call_data)
       private->xic = NULL;
     }
 
-#ifndef XIM_INST_IS_MISSING_OR_STRANGE
   XRegisterIMInstantiateCallback (gdk_display, NULL, NULL, NULL,
                                  gdk_im_instantiate_cb, NULL);
-#endif
 }
 
-#ifndef XIM_INST_IS_MISSING_OR_STRANGE
 static void
 gdk_im_instantiate_cb (Display *display,
                       XPointer client_data, XPointer call_data)
@@ -366,7 +364,6 @@ gdk_im_instantiate_cb (Display *display,
 static gint
 gdk_im_real_open (void)
 {
-  XIMCallback destroy_cb;
   GList *node;
 
   xim_im = XOpenIM (GDK_DISPLAY(), NULL, NULL, NULL);
@@ -377,10 +374,14 @@ gdk_im_real_open (void)
     }
   else
     {
+#ifdef USE_X11R6_XIM
+      XIMCallback destroy_cb;
+
       destroy_cb.callback = gdk_im_destroy_cb;
       destroy_cb.client_data = NULL;
       if (NULL != XSetIMValues (xim_im, XNDestroyCallback, &destroy_cb, NULL))
        GDK_NOTE (XIM, g_warning ("Could not set destroy callback to IM. Be careful to not destroy your input method."));
+#endif
 
       XGetIMValues (xim_im, XNQueryInputStyle, &xim_styles, NULL, NULL);
 
@@ -411,7 +412,7 @@ gdk_im_open (void)
   if (gdk_im_real_open ())
     return TRUE;
 
-#ifndef XIM_INST_IS_MISSING_OR_STRANGE
+#ifdef USE_X11R6_XIM
   XRegisterIMInstantiateCallback (gdk_display, NULL, NULL, NULL,
                                  gdk_im_instantiate_cb, NULL);
 #endif
index e83b05086fa0b3c0258b849f42fff68976b26b57..3ac781aac8a5f2e6a62acf30c5ec765277897bcc 100644 (file)
@@ -1955,7 +1955,7 @@ gdk_events_queue (void)
 
   while (!gdk_event_queue_find_first() && XPending (gdk_display))
     {
-  #ifdef USE_XIM
+#ifdef USE_XIM
       Window w = None;
       
       XNextEvent (gdk_display, &xevent);
index 1d833997430d48cb50d35fd9bad001c54ac62bc0..6451529f78f2cca0e09e113f7222a5a6498cf880 100644 (file)
@@ -54,7 +54,7 @@ typedef struct {
   gpointer value;
 } GdkImArg;
 
-#ifndef XIM_INST_IS_MISSING_OR_STRANGE
+#ifdef USE_X11R6_XIM
 static void   gdk_im_instantiate_cb      (Display *display,
                                          XPointer client_data,
                                          XPointer call_data);
@@ -318,6 +318,7 @@ gdk_im_set_best_style (GdkIMStyle style)
   return xim_best_allowed_style;
 }
 
+#ifdef USE_X11R6_XIM
 static void
 gdk_im_destroy_cb (XIM im, XPointer client_data, XPointer call_data)
 {
@@ -340,13 +341,10 @@ gdk_im_destroy_cb (XIM im, XPointer client_data, XPointer call_data)
       private->xic = NULL;
     }
 
-#ifndef XIM_INST_IS_MISSING_OR_STRANGE
   XRegisterIMInstantiateCallback (gdk_display, NULL, NULL, NULL,
                                  gdk_im_instantiate_cb, NULL);
-#endif
 }
 
-#ifndef XIM_INST_IS_MISSING_OR_STRANGE
 static void
 gdk_im_instantiate_cb (Display *display,
                       XPointer client_data, XPointer call_data)
@@ -366,7 +364,6 @@ gdk_im_instantiate_cb (Display *display,
 static gint
 gdk_im_real_open (void)
 {
-  XIMCallback destroy_cb;
   GList *node;
 
   xim_im = XOpenIM (GDK_DISPLAY(), NULL, NULL, NULL);
@@ -377,10 +374,14 @@ gdk_im_real_open (void)
     }
   else
     {
+#ifdef USE_X11R6_XIM
+      XIMCallback destroy_cb;
+
       destroy_cb.callback = gdk_im_destroy_cb;
       destroy_cb.client_data = NULL;
       if (NULL != XSetIMValues (xim_im, XNDestroyCallback, &destroy_cb, NULL))
        GDK_NOTE (XIM, g_warning ("Could not set destroy callback to IM. Be careful to not destroy your input method."));
+#endif
 
       XGetIMValues (xim_im, XNQueryInputStyle, &xim_styles, NULL, NULL);
 
@@ -411,7 +412,7 @@ gdk_im_open (void)
   if (gdk_im_real_open ())
     return TRUE;
 
-#ifndef XIM_INST_IS_MISSING_OR_STRANGE
+#ifdef USE_X11R6_XIM
   XRegisterIMInstantiateCallback (gdk_display, NULL, NULL, NULL,
                                  gdk_im_instantiate_cb, NULL);
 #endif
index 097d68c2375dc603ab94c315450c8b4ae1cb616a..8090325d934c1dd36b4dd0b015131a69738af6dc 100644 (file)
@@ -396,8 +396,14 @@ gtk_style_new (void)
   style = g_new0 (GtkStyle, 1);
   
   if (!default_font)
-    default_font =
-      gdk_font_load ("-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*");
+    {
+      default_font =
+       gdk_font_load ("-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*");
+      if (!default_font)
+       default_font = gdk_font_load ("fixed");
+      if (!default_font)
+       g_error ("Unable to load default font.");
+    }
   
   style->font = default_font;
   gdk_font_ref (style->font);