12 #include <gdk-pixbuf/gdk-pixbuf.h>
20 #include "xgamelist.h"
22 #include "xedittags.h"
27 # define _(s) gettext (s)
28 # define N_(s) gettext_noop (s)
36 GdkPixbuf *load_pixbuf(char *filename,int size)
41 image = gdk_pixbuf_new_from_file_at_size(filename,size,size,NULL);
43 image = gdk_pixbuf_new_from_file(filename,NULL);
47 fprintf(stderr,_("Error: couldn't load file: %s\n"),filename);
53 void GUI_DisplayTitle(text)
57 extern GtkWidget *GUI_Window;
59 if (text == NULL) text = "";
62 if (appData.titleInWindow) {
64 XtSetArg(args[i], XtNlabel, text); i++;
65 XtSetValues(titleWidget, args, i);
68 if (*text != NULLCHAR) {
70 } else if (appData.icsActive) {
71 sprintf(title, "%s: %s", programName, appData.icsHost);
72 } else if (appData.cmailGameName[0] != NULLCHAR) {
73 sprintf(title, "%s: %s", programName, "CMail");
74 } else if (appData.noChessProgram) {
75 strcpy(title, programName);
77 sprintf(title, "%s: %s", programName, first.tidy);
79 gtk_window_set_title(GTK_WINDOW(GUI_Window),title);
82 void GUI_SetAspectRatio(ratio)
85 /* sets the aspect ration of the main window */
87 extern GtkWidget *GUI_Window;
89 hints.min_aspect = ratio;
90 hints.max_aspect = ratio;
92 gtk_window_set_geometry_hints (GTK_WINDOW (GUI_Window),
93 GTK_WIDGET (GUI_Window),