Mercurial > pidgin.yaz
changeset 2115:3ce77b547cf2
[gaim-migrate @ 2125]
idle stuff. does this look odd to you?
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 03 Aug 2001 10:17:06 +0000 |
parents | c582116e8463 |
children | 6402958c64c9 |
files | configure.in src/gtkimhtml.c src/idle.c |
diffstat | 3 files changed, 21 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.in Fri Aug 03 09:40:13 2001 +0000 +++ b/configure.in Fri Aug 03 10:17:06 2001 +0000 @@ -169,17 +169,18 @@ if test \! "$XSS_LIBS" = "no"; then AC_TRY_COMPILE([ #include <X11/extensions/scrnsaver.h> - ],[],[],[ + ],[],[enable_xss=no],[ AC_DEFINE(USE_SCREENSAVER) - AC_SUBST(XSS_LIBS) ]) else XSS_LIBS="" + enable_xss=no fi else XSS_LIBS="" + enable_xss=no fi - +AC_SUBST(XSS_LIBS) @@ -345,6 +346,8 @@ echo Build with Plugin support... : $enable_plugins echo Build with Perl support..... : $enable_perl echo +echo Use XScreenSaver Extension.. : $enable_xss +echo echo Build with ESD.............. : $enable_esd echo Build with NAS.............. : $enable_nas echo
--- a/src/gtkimhtml.c Fri Aug 03 09:40:13 2001 +0000 +++ b/src/gtkimhtml.c Fri Aug 03 10:17:06 2001 +0000 @@ -1626,10 +1626,10 @@ if (!choice) { if (imhtml->default_font) return gdk_font_ref (imhtml->default_font); - return gdk_fontset_load ("-*-*-*-*-*-*-*-*-*-*-*-*-*-*"); + return gdk_fontset_load ("-*-*-*-*-*-*-*-*-*-*-*-*-*-*,*"); } - g_snprintf (buf, sizeof (buf), "-*-%s-%s-%c-*-*-*-%d-*-*-*-*-iso8859-*", + g_snprintf (buf, sizeof (buf), "-*-%s-%s-%c-*-*-*-%d-*-*-*-*-iso8859-*,*", choice, bold ? "bold" : "medium", italics ? 'i' : 'r', @@ -1637,7 +1637,7 @@ font = gdk_fontset_load (buf); if (!font) { - g_snprintf (buf, sizeof (buf), "-*-%s-%s-%c-*-*-*-*-*-*-*-*-iso8859-*", + g_snprintf (buf, sizeof (buf), "-*-%s-%s-%c-*-*-*-*-*-*-*-*-iso8859-*,*", choice, bold ? "bold" : "medium", italics ? 'i' : 'r'); @@ -1645,27 +1645,27 @@ } if (!font) { - g_snprintf (buf, sizeof (buf), "-*-%s-*-%c-*-*-*-*-*-*-*-*-iso8859-*", + g_snprintf (buf, sizeof (buf), "-*-%s-*-%c-*-*-*-*-*-*-*-*-iso8859-*,*", choice, italics ? 'i' : 'r'); font = gdk_fontset_load (buf); } if (!font) { - g_snprintf (buf, sizeof (buf), "-*-%s-*-%c-*-*-*-*-*-*-*-*-iso8859-*", + g_snprintf (buf, sizeof (buf), "-*-%s-*-%c-*-*-*-*-*-*-*-*-iso8859-*,*", choice, italics ? 'o' : '*'); font = gdk_fontset_load (buf); } if (!font && italics) { - g_snprintf (buf, sizeof (buf), "-*-%s-*-*-*-*-*-*-*-*-*-*-iso8859-*", + g_snprintf (buf, sizeof (buf), "-*-%s-*-*-*-*-*-*-*-*-*-*-iso8859-*,*", choice); font = gdk_fontset_load (buf); } if (!font) { - g_snprintf (buf, sizeof (buf), "-*-%s-%s-%c-*-*-*-%d-*-*-*-*-*-*", + g_snprintf (buf, sizeof (buf), "-*-%s-%s-%c-*-*-*-%d-*-*-*-*-*-*,*", choice, bold ? "bold" : "medium", italics ? 'i' : 'r', @@ -1674,7 +1674,7 @@ } if (!font) { - g_snprintf (buf, sizeof (buf), "-*-%s-%s-%c-*-*-*-*-*-*-*-*-*-*", + g_snprintf (buf, sizeof (buf), "-*-%s-%s-%c-*-*-*-*-*-*-*-*-*-*,*", choice, bold ? "bold" : "medium", italics ? 'i' : 'r'); @@ -1682,21 +1682,21 @@ } if (!font) { - g_snprintf (buf, sizeof (buf), "-*-%s-*-%c-*-*-*-*-*-*-*-*-*-*", + g_snprintf (buf, sizeof (buf), "-*-%s-*-%c-*-*-*-*-*-*-*-*-*-*,*", choice, italics ? 'i' : 'r'); font = gdk_fontset_load (buf); } if (!font) { - g_snprintf (buf, sizeof (buf), "-*-%s-*-%c-*-*-*-*-*-*-*-*-*-*", + g_snprintf (buf, sizeof (buf), "-*-%s-*-%c-*-*-*-*-*-*-*-*-*-*,*", choice, italics ? 'o' : '*'); font = gdk_fontset_load (buf); } if (!font && italics) { - g_snprintf (buf, sizeof (buf), "-*-%s-*-*-*-*-*-*-*-*-*-*-*-*", + g_snprintf (buf, sizeof (buf), "-*-%s-*-*-*-*-*-*-*-*-*-*-*-*,*", choice); font = gdk_fontset_load (buf); }
--- a/src/idle.c Fri Aug 03 09:40:13 2001 +0000 +++ b/src/idle.c Fri Aug 03 10:17:06 2001 +0000 @@ -30,6 +30,7 @@ #include <X11/Xlib.h> #include <X11/Xutil.h> #include <X11/extensions/scrnsaver.h> +#include <gdk/gdkx.h> #endif /* USE_SCREENSAVER */ #include "multi.h" @@ -42,7 +43,6 @@ time_t t; #ifdef USE_SCREENSAVER static XScreenSaverInfo *mit_info = NULL; - static Display *d = NULL; #endif time_t idle_time; @@ -56,11 +56,12 @@ #ifdef USE_SCREENSAVER if (report_idle == IDLE_SCREENSAVER) { - if (d || (d = XOpenDisplay((char *)NULL))) { + int event_base, error_base; + if (XScreenSaverQueryExtension(GDK_DISPLAY(), &event_base, &error_base)) { if (mit_info == NULL) { mit_info = XScreenSaverAllocInfo(); } - XScreenSaverQueryInfo(d, DefaultRootWindow(d), mit_info); + XScreenSaverQueryInfo(GDK_DISPLAY(), GDK_ROOT_WINDOW(), mit_info); idle_time = (mit_info->idle) / 1000; } else idle_time = 0;