Update of /cvsroot/gaim/gaim/src
In directory usw-pr-cvs1:/tmp/cvs-serv31301/src
Modified Files:
conversation.c perl.c
Log Message:
Perl can play sounds!
Index: conversation.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/conversation.c,v
retrieving revision 1.354
retrieving revision 1.355
diff -u -d -r1.354 -r1.355
--- conversation.c 28 May 2002 08:00:27 -0000 1.354
+++ conversation.c 29 May 2002 01:44:39 -0000 1.355
@@ -2822,7 +2822,12 @@
gtk_object_set_user_data(GTK_OBJECT(entry), c);
gtk_text_set_editable(GTK_TEXT(entry), TRUE);
gtk_text_set_word_wrap(GTK_TEXT(entry), TRUE);
- gtk_widget_set_usize(entry, conv_size.width - 20, MAX(conv_size.entry_height, 25));
+ /* I hate hackish workarounds. According to Ari Pollak, a gtk bug causes Gaim to loop
+ * infinitely if the entry is smaller than the text height. This is a hackish workaround */
+ gtk_widget_set_usize(entry, conv_size.width - 20,
+ MAX(conv_size.entry_height,
+ gdk_char_height(gtk_widget_get_default_style()->font, '0') +
+ gtk_widget_get_default_style()->font->ascent + 1));
gtk_signal_connect(GTK_OBJECT(entry), "activate", GTK_SIGNAL_FUNC(send_callback), c);
gtk_signal_connect(GTK_OBJECT(entry), "key_press_event", GTK_SIGNAL_FUNC(keypress_callback), c);
Index: perl.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/perl.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- perl.c 25 Apr 2002 05:48:20 -0000 1.71
+++ perl.c 29 May 2002 01:44:40 -0000 1.72
@@ -105,6 +105,9 @@
XS(XS_GAIM_add_event_handler); /* when servers talk */
XS(XS_GAIM_add_timeout_handler); /* figure it out */
+/* play sound */
+XS(XS_GAIM_play_sound); /*play a sound*/
+
void xs_init()
{
char *file = __FILE__;
@@ -238,6 +241,8 @@
newXS ("GAIM::add_event_handler", XS_GAIM_add_event_handler, "GAIM");
newXS ("GAIM::add_timeout_handler", XS_GAIM_add_timeout_handler, "GAIM");
+
+ newXS ("GAIM::play_sound", XS_GAIM_play_sound, "GAIM");
}
void perl_end()
@@ -617,6 +622,8 @@
XSRETURN(0);
}
+
+
XS (XS_GAIM_print_to_chat)
{
struct gaim_connection *gc;
@@ -830,6 +837,18 @@
handler->handler_args = g_strdup(SvPV(ST(2), junk));
perl_timeout_handlers = g_list_append(perl_timeout_handlers, handler);
handler->iotag = g_timeout_add(timeout, perl_timeout, handler);
+ XSRETURN_EMPTY;
+}
+
+XS (XS_GAIM_play_sound)
+{
+ int id;
+ dXSARGS;
+
+ id = SvIV(ST(0));
+
+ play_sound(id);
+
XSRETURN_EMPTY;
}
|