[v3.73]
- Fixed a compilation bug ocurring on big endian systems only.
- Fixed the built-in wav loading routines for big endian systems (again).
+- Finally traced down and fixed a long outstanding bug in the dial widget,
+ the background of the dials is now drawn correctly.
- Ported terminatorX to gtk+ Version 2. The code for gtk2 will be enabled
when gtk2 is detected by configure. To force terminatorX to use the good
old gtk 1.2.x (x>=5) run configure with the '--disable-gtk2' switch.
tX_threads=auto
fi
+dnl Some machines prefer the -lpthread...
+
+if test "$tX_threads" = "no"; then
+ pthread_lib=no
+ AC_CHECK_LIB(pthread, pthread_detach, pthread_lib=yes, pthread_lib=no)
+
+ if test "$pthread_lib" = "yes"; then
+ tX_threads=lpthread
+ LIBS="$LIBS -lpthread"
+ fi
+fi
+
dnl Some machines prefer a -pthread...
if test "$tX_threads" = "no"; then
fi
fi
-dnl If we haven't found pthreads yet will try -lpthread...
-
-if test "$tX_threads" = "no"; then
- pthread_lib=no
- AC_CHECK_LIB(pthread, pthread_detach, pthread_lib=yes, pthread_lib=no)
-
- if test "$pthread_lib" = "yes"; then
- tX_threads=lpthread
- fi
-fi
-
dnl If we still haven't found pthreads, we panic...
if test "$tX_threads" = "no"; then
#include "tX_vtt.h"
#endif
-#ifdef USE_DIAL
-#include "tX_knobloader.h"
-#endif
-
GTimer *my_time;
gint idle_tag;
}
#ifndef CREATE_BENCHMARK
-#ifdef USE_DIAL
- load_knob_pixs(main_window);
-#endif
// gdk_input_init();
&attributes,
attributes_mask);
- widget->style = gtk_style_attach (widget->style, widget->window);
-
gdk_window_set_user_data (widget->window, widget);
+ widget->style = gtk_style_attach (widget->style, widget->window);
+ gtk_widget_set_style(widget, gtk_widget_get_default_style());
+ gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
-// gtk_widget_set_style(widget, gtk_widget_get_default_style());
- gtk_style_set_background (widget->style, widget->window, GTK_WIDGET_STATE (widget));
+ gdk_window_set_background (widget->window,
+ &widget->style->base[GTK_STATE_NORMAL]);
+ gtk_widget_shape_combine_mask (widget, knob_mask, 0,0);
}
static void
inline void
gtk_tx_dial_draw (GtkTxDial *tx_dial, GtkWidget *widget)
{
- if (GTK_WIDGET_DRAWABLE (widget))
- gdk_draw_pixmap(widget->window, widget->style->fg_gc[GTK_WIDGET_STATE(widget)],
- knob_pixmaps[tx_dial->old_image], 0, 0, tx_dial->xofs, tx_dial->yofs, KNOB_SIZE, KNOB_SIZE);
+ if (GTK_WIDGET_DRAWABLE (widget)) {
+ gdk_draw_pixmap(widget->window, widget->style->bg_gc[GTK_WIDGET_STATE(widget)],
+ knob_pixmaps[tx_dial->old_image], 0, 0, tx_dial->xofs, tx_dial->yofs, KNOB_SIZE, KNOB_SIZE);
+ }
}
static gint
tx_dial = GTK_TX_DIAL (widget);
-/* gdk_window_clear_area (widget->window,
- 0, 0,
- widget->allocation.width,
- widget->allocation.height);
-gdk_draw_rectangle(widget->window, widget->style->fg_gc[widget->state], 1, 0, 0,
- widget->allocation.width,
- widget->allocation.height);*/
-
gtk_tx_dial_draw(tx_dial, widget);
return FALSE;
#define add_about_wid(wid); gtk_box_pack_start(GTK_BOX(box), wid, WID_DYN); \
gtk_widget_show(wid);
+#define add_about_wid_fix(wid); gtk_box_pack_start(GTK_BOX(box), wid, WID_FIX); \
+ gtk_widget_show(wid);
+
GdkFont *GPL_font=NULL;
void show_about(int nag)
else
{
box=gtk_vbox_new(FALSE, 5);
- add_about_wid(pwid);
+ add_about_wid_fix(pwid);
sep=gtk_hseparator_new();
- add_about_wid(sep);
+ add_about_wid_fix(sep);
+#ifdef USE_GTK2
+ char about_prefix_umlaut[]="\nThis is "PACKAGE" Release "VERSION" - Copyright (C) 1999-2002 by Alexander K\xC3\xB6nig";
+#else
char about_prefix_umlaut[]="\nThis is "PACKAGE" Release "VERSION" - Copyright (C) 1999-2002 by Alexander König";
char about_prefix_broken_umlaut[]="\nThis is "PACKAGE" Release "VERSION" - Copyright (C) 1999-2002 by Alexander Ko\"nig";
+#endif
char about_rest[]="\n\nSend comments, patches and scratches to: alex@lisas.de\n"
"terminatorX-homepage: http://www.terminatorX.cx\n\nThis binary has been compiled with the following flags: "
"Sox support: "
strcat(buffer, about_rest);
label=gtk_label_new(buffer);
+
+#ifndef USE_GTK2
gtk_label_get(GTK_LABEL(label), &str);
- /* Fixng a strange gtk+ bug that appears at least on my system.
+ /* Fixing a strange gtk+ bug that appears at least on my system.
*/
if (strlen(str)==0)
{
strcat(buffer, about_rest);
gtk_label_set(GTK_LABEL(label), buffer);
}
+#endif
gtk_misc_set_alignment (GTK_MISC(label), 0.5 ,0.5);
- add_about_wid(label);
+ add_about_wid_fix(label);
sep=gtk_hseparator_new();
- add_about_wid(sep);
+ add_about_wid_fix(sep);
label=gtk_label_new("License (GPL V2):");
gtk_misc_set_alignment (GTK_MISC(label), 0.5 ,0.5);
- add_about_wid(label);
+ add_about_wid_fix(label);
hbox=gtk_hbox_new(FALSE, 5);
gtk_text_buffer_get_iter_at_offset (tbuffer, &iter, 0);
scroll=gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_container_add (GTK_CONTAINER (scroll), text);
+ gtk_text_buffer_create_tag (tbuffer, "courier", "family", "courier", NULL);
+
+ gtk_text_buffer_insert_with_tags_by_name(tbuffer, &iter, license, -1, "courier", NULL);
+ gtk_text_view_set_left_margin(GTK_TEXT_VIEW(text), 5);
+ gtk_text_view_set_right_margin(GTK_TEXT_VIEW(text), 5);
+ gtk_widget_set_usize(GTK_WIDGET(text), 640, 180);
gtk_widget_show(text);
-
- gtk_text_buffer_insert (tbuffer, &iter, license, -1);
gtk_box_pack_start(GTK_BOX(hbox), scroll, WID_DYN);
gtk_widget_show(scroll);
add_about_wid(hbox);
sep=gtk_hseparator_new();
- add_about_wid(sep);
+ add_about_wid_fix(sep);
btn=gtk_button_new_with_label("Close");
- add_about_wid(btn);
+ add_about_wid_fix(btn);
gtk_container_add(GTK_CONTAINER(window), box);
gtk_widget_show(box);
};
GdkPixmap *knob_pixmaps[MAX_KNOB_PIX];
+GdkBitmap *knob_mask;
void load_knob_pixs(GtkWidget *wid_for_style)
{
int i;
- GdkBitmap *mask;
GtkStyle *style;
style = gtk_widget_get_style(wid_for_style);
for (i=0; i<MAX_KNOB_PIX; i++)
{
- knob_pixmaps[i]=gdk_pixmap_create_from_xpm_d(wid_for_style->window, &mask,
+ knob_pixmaps[i]=gdk_pixmap_create_from_xpm_d(wid_for_style->window, &knob_mask,
&style->bg[GTK_STATE_NORMAL],
(gchar **) knob_pixs[i]);
}
#endif
extern GdkPixmap *knob_pixmaps[MAX_KNOB_PIX];
+extern GdkBitmap *knob_mask;
extern void load_knob_pixs(GtkWidget *);
#ifdef __cplusplus
#include "tX_pbutton.h"
#include "tX_sequencer.h"
#include "tX_mastergui.h"
+#include "tX_knobloader.h"
/* I don't know a display that can handle that, but
just to be on the safe side...
GtkWidget *top;
gtk_widget_realize(main_window);
tX_set_icon(main_window, "terminatorX");
+ load_knob_pixs(main_window);
+
gtk_widget_show(main_window);
top=gtk_widget_get_toplevel(main_window);
xwindow=GDK_WINDOW_XWINDOW(top->window);