# HG changeset patch # User Herman Bloggs # Date 1054745241 0 # Node ID 6d6ae91c5de738ee66f2ddcdae659f6ddea028ee # Parent c6a30e1868ae392fc9a56ec67aedb80d16791edf [gaim-migrate @ 6174] updates for api changes committer: Tailor Script diff -r c6a30e1868ae -r 6d6ae91c5de7 plugins/win32/transparency/win2ktrans.c --- a/plugins/win32/transparency/win2ktrans.c Wed Jun 04 16:44:08 2003 +0000 +++ b/plugins/win32/transparency/win2ktrans.c Wed Jun 04 16:47:21 2003 +0000 @@ -75,12 +75,21 @@ * PROTOS */ BOOL (*MySetLayeredWindowAttributes)(HWND hwnd, COLORREF crKey, BYTE bAlpha, DWORD dwFlags)=NULL; -extern GtkWidget *gaim_button(const char*, guint*, int, GtkWidget*); static void save_trans_prefs(); /* * CODE */ +static GtkWidget *wgaim_button(const char *text, guint *options, int option, GtkWidget *page) { + GtkWidget *button; + button = gtk_check_button_new_with_mnemonic(text); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), (*options & option)); + gtk_box_pack_start(GTK_BOX(page), button, FALSE, FALSE, 0); + g_object_set_data(G_OBJECT(button), "options", options); + gtk_widget_show(button); + return button; +} + /* Set window transparency level */ void set_wintrans(GtkWidget *window, int trans) { if(MySetLayeredWindowAttributes) { @@ -168,12 +177,15 @@ GList *wl, *wl1; GtkWidget *vbox=NULL; GtkWidget *win=NULL; - struct gaim_gtk_window *gaimwin; - struct gaim_conversation *c; + GaimConversation *c; + GaimGtkConversation *gtkconv; + GaimGtkWindow *gtkwin; c = gaim_find_conversation(who); - gaimwin = GAIM_GTK_WINDOW(c->window); - win = gaimwin->window; + gtkconv = GAIM_GTK_CONVERSATION(c); + gtkwin = GAIM_GTK_WINDOW(gaim_conversation_get_window(c)); + + win = gtkwin->window; /* check prefs to see if we want trans */ if ((trans_options & OPT_WGAIM_IMTRANS) && @@ -390,8 +402,8 @@ gtk_container_set_border_width (GTK_CONTAINER (ret), 12); /* IM Convo trans options */ - imtransbox = make_frame (ret, _("IM Conversation Windows")); - button = gaim_button(_("_IM window transparency"), &trans_options, OPT_WGAIM_IMTRANS, imtransbox); + imtransbox = gaim_gtk_make_frame (ret, _("IM Conversation Windows")); + button = wgaim_button(_("_IM window transparency"), &trans_options, OPT_WGAIM_IMTRANS, imtransbox); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_trans_option), (int *)OPT_WGAIM_IMTRANS); trans_box = gtk_vbox_new(FALSE, 18); @@ -401,7 +413,7 @@ gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(gaim_gtk_toggle_sensitive), trans_box); - button = gaim_button(_("_Show slider bar in IM window"), &trans_options, OPT_WGAIM_SHOW_IMTRANS, trans_box); + button = wgaim_button(_("_Show slider bar in IM window"), &trans_options, OPT_WGAIM_SHOW_IMTRANS, trans_box); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_trans_option), (int *)OPT_WGAIM_SHOW_IMTRANS); gtk_box_pack_start(GTK_BOX(imtransbox), trans_box, FALSE, FALSE, 5); @@ -426,11 +438,11 @@ gtk_box_pack_start(GTK_BOX(trans_box), hbox, FALSE, FALSE, 5); /* Buddy List trans options */ - bltransbox = make_frame (ret, _("Buddy List Window")); - button = gaim_button(_("_Keep Buddy List window on top"), &trans_options, OPT_WGAIM_BUDDYWIN_ONTOP, bltransbox); + bltransbox = gaim_gtk_make_frame (ret, _("Buddy List Window")); + button = wgaim_button(_("_Keep Buddy List window on top"), &trans_options, OPT_WGAIM_BUDDYWIN_ONTOP, bltransbox); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_trans_option), (int *)OPT_WGAIM_BUDDYWIN_ONTOP); - button = gaim_button(_("_Buddy List window transparency"), &trans_options, OPT_WGAIM_BLTRANS, bltransbox); + button = wgaim_button(_("_Buddy List window transparency"), &trans_options, OPT_WGAIM_BLTRANS, bltransbox); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_trans_option), (int *)OPT_WGAIM_BLTRANS); trans_box = gtk_vbox_new(FALSE, 18); diff -r c6a30e1868ae -r 6d6ae91c5de7 plugins/win32/winprefs/winprefs.c --- a/plugins/win32/winprefs/winprefs.c Wed Jun 04 16:44:08 2003 +0000 +++ b/plugins/win32/winprefs/winprefs.c Wed Jun 04 16:47:21 2003 +0000 @@ -42,12 +42,21 @@ /* * PROTOS */ -extern GtkWidget *gaim_button(const char*, guint*, int, GtkWidget*); /* * CODE */ +static GtkWidget *wgaim_button(const char *text, guint *options, int option, GtkWidget *page) { + GtkWidget *button; + button = gtk_check_button_new_with_mnemonic(text); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), (*options & option)); + gtk_box_pack_start(GTK_BOX(page), button, FALSE, FALSE, 0); + g_object_set_data(G_OBJECT(button), "options", options); + gtk_widget_show(button); + return button; +} + static void write_options(FILE *f) { fprintf(f, "options {\n"); fprintf(f, "\twinprefs_options { %u }\n", winprefs_options); @@ -138,8 +147,8 @@ gtk_container_set_border_width (GTK_CONTAINER (ret), 12); /* IM Convo trans options */ - vbox = make_frame (ret, _("Startup")); - button = gaim_button(_("_Start Gaim on Windows startup"), &winprefs_options, OPT_WGAIM_AUTOSTART, vbox); + vbox = gaim_gtk_make_frame (ret, _("Startup")); + button = wgaim_button(_("_Start Gaim on Windows startup"), &winprefs_options, OPT_WGAIM_AUTOSTART, vbox); /* Set initial value */ if(open_run_key(&hKey, KEY_QUERY_VALUE)) { if(ERROR_SUCCESS == RegQueryValueEx(hKey, "Gaim", 0, NULL, NULL, NULL)) {