# HG changeset patch # User Christian Muise # Date 1123948409 0 # Node ID ce3b9969b3994407dfc56078cbed3f8f3d888c33 # Parent 7d31d61e643842f770034b103b3dc5d3d8b2ba7e [gaim-migrate @ 13426] Fixed to not compile without dbus. committer: Tailor Script diff -r 7d31d61e6438 -r ce3b9969b399 plugins/musicmessaging/Makefile.am --- a/plugins/musicmessaging/Makefile.am Sat Aug 13 06:43:45 2005 +0000 +++ b/plugins/musicmessaging/Makefile.am Sat Aug 13 15:53:29 2005 +0000 @@ -35,4 +35,5 @@ -DVERSION=\"$(VERSION)\" \ -I$(top_srcdir)/src \ $(DEBUG_CFLAGS) \ - $(GTK_CFLAGS) + $(GTK_CFLAGS) \ + $(DBUS_CFLAGS) diff -r 7d31d61e6438 -r ce3b9969b399 plugins/musicmessaging/musicmessaging.c --- a/plugins/musicmessaging/musicmessaging.c Sat Aug 13 06:43:45 2005 +0000 +++ b/plugins/musicmessaging/musicmessaging.c Sat Aug 13 15:53:29 2005 +0000 @@ -198,13 +198,12 @@ GaimConvIm *imData = gaim_conversation_get_im_data(conv); GaimConnection *connection = gaim_conversation_get_gc(conv); const char *convName = gaim_conversation_get_name(conv); - const char *who = gaim_account_get_username(account); + /* const char *who = gaim_account_get_username(account); */ if (0 == strncmp(*message, MUSICMESSAGING_PREFIX, strlen(MUSICMESSAGING_PREFIX))) { message = 0; gaim_debug(GAIM_DEBUG_MISC, "gaim-musicmessaging", "Received MM Message\n"); - send_change_confirmed("the command", "the params"); } else if (0 == strncmp(*message, MUSICMESSAGING_START_TAG, strlen(MUSICMESSAGING_START_TAG))) { @@ -213,7 +212,7 @@ else { serv_send_im(connection, convName, *message, GAIM_MESSAGE_SEND); - gaim_conv_im_write (imData, NULL, *message, GAIM_MESSAGE_SYSTEM, time(NULL)); + gaim_conv_im_write (imData, NULL, *message, GAIM_MESSAGE_SEND, time(NULL)); } } @@ -226,7 +225,11 @@ static gboolean start_session(MMConversation *mmconv) { - mmconv->started = TRUE; + if (!mmconv->requested) + { + mmconv->originator = TRUE; + } + run_editor(mmconv); return TRUE; } @@ -235,9 +238,10 @@ { if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) { - start_session((MMConversation *) data); + start_session((MMConversation *) data); } else { - kill_editor((MMConversation *) data); + ((MMConversation *)data)->started = FALSE; + kill_editor((MMConversation *) data); } } @@ -258,6 +262,11 @@ { gaim_notify_error(plugin_pointer, "Error Running Editor", "The following error has occured:", spawn_error->message); + mmconv->started = FALSE; + } + else + { + mmconv->started = TRUE; } } @@ -320,8 +329,9 @@ g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(music_button_toggled), mmconv); - gchar *file_path = g_build_filename (DATADIR, "pixmaps", "gaim", "buttons", "music.png", NULL); - image = gtk_image_new_from_file("/usr/local/share/pixmaps/gaim/buttons/music.png"); + /* gchar *file_path = g_build_filename (DATADIR, "pixmaps", "gaim", "buttons", "music.png", NULL); */ + gchar *file_path = "/usr/local/share/pixmaps/gaim/buttons/music.png"; + image = gtk_image_new_from_file(file_path); gtk_container_add((GtkContainer *)button, image);