comparison src/gtkpounce.c @ 7035:feb3d21a7794

[gaim-migrate @ 7598] Standardized the UI op accessor functions in every file. They're now properly namespaced. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Mon, 29 Sep 2003 23:39:02 +0000
parents 083d1e4a9c78
children 770233dad86c
comparison
equal deleted inserted replaced
7034:f7ff0dfa6b9f 7035:feb3d21a7794
3 * @ingroup gtkui 3 * @ingroup gtkui
4 * 4 *
5 * gaim 5 * gaim
6 * 6 *
7 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org> 7 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org>
8 * 8 *
9 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or 11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version. 12 * (at your option) any later version.
13 * 13 *
69 GtkWidget *exec_cmd_browse; 69 GtkWidget *exec_cmd_browse;
70 GtkWidget *play_sound; 70 GtkWidget *play_sound;
71 GtkWidget *play_sound_entry; 71 GtkWidget *play_sound_entry;
72 GtkWidget *play_sound_browse; 72 GtkWidget *play_sound_browse;
73 GtkWidget *play_sound_test; 73 GtkWidget *play_sound_test;
74 74
75 GtkWidget *save_pounce; 75 GtkWidget *save_pounce;
76 76
77 /* Buttons */ 77 /* Buttons */
78 GtkWidget *save_button; 78 GtkWidget *save_button;
79 79
132 filesel(GtkWidget *w, gpointer data) 132 filesel(GtkWidget *w, gpointer data)
133 { 133 {
134 GtkWidget *filesel; 134 GtkWidget *filesel;
135 GtkWidget *entry; 135 GtkWidget *entry;
136 GHashTable *args; 136 GHashTable *args;
137 137
138 entry = (GtkWidget *)data; 138 entry = (GtkWidget *)data;
139 139
140 filesel = gtk_file_selection_new(_("Select a file")); 140 filesel = gtk_file_selection_new(_("Select a file"));
141 gtk_file_selection_set_filename(GTK_FILE_SELECTION(filesel), 141 gtk_file_selection_set_filename(GTK_FILE_SELECTION(filesel),
142 gtk_entry_get_text(GTK_ENTRY(entry))); 142 gtk_entry_get_text(GTK_ENTRY(entry)));
143 gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(filesel)); 143 gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(filesel));
507 dialog->open_win = gtk_check_button_new_with_label(_("Open an IM window")); 507 dialog->open_win = gtk_check_button_new_with_label(_("Open an IM window"));
508 dialog->popup = gtk_check_button_new_with_label(_("Popup notification")); 508 dialog->popup = gtk_check_button_new_with_label(_("Popup notification"));
509 dialog->send_msg = gtk_check_button_new_with_label(_("Send a message")); 509 dialog->send_msg = gtk_check_button_new_with_label(_("Send a message"));
510 dialog->exec_cmd = gtk_check_button_new_with_label(_("Execute a command")); 510 dialog->exec_cmd = gtk_check_button_new_with_label(_("Execute a command"));
511 dialog->play_sound = gtk_check_button_new_with_label(_("Play a sound")); 511 dialog->play_sound = gtk_check_button_new_with_label(_("Play a sound"));
512 512
513 dialog->send_msg_entry = gtk_entry_new(); 513 dialog->send_msg_entry = gtk_entry_new();
514 dialog->exec_cmd_entry = gtk_entry_new(); 514 dialog->exec_cmd_entry = gtk_entry_new();
515 dialog->exec_cmd_browse = gtk_button_new_with_label(_("Browse")); 515 dialog->exec_cmd_browse = gtk_button_new_with_label(_("Browse"));
516 dialog->play_sound_entry = gtk_entry_new(); 516 dialog->play_sound_entry = gtk_entry_new();
517 dialog->play_sound_browse = gtk_button_new_with_label(_("Browse")); 517 dialog->play_sound_browse = gtk_button_new_with_label(_("Browse"));
518 dialog->play_sound_test = gtk_button_new_with_label(_("Test")); 518 dialog->play_sound_test = gtk_button_new_with_label(_("Test"));
519 519
520 gtk_widget_set_sensitive(dialog->send_msg_entry, FALSE); 520 gtk_widget_set_sensitive(dialog->send_msg_entry, FALSE);
521 gtk_widget_set_sensitive(dialog->exec_cmd_entry, FALSE); 521 gtk_widget_set_sensitive(dialog->exec_cmd_entry, FALSE);
522 gtk_widget_set_sensitive(dialog->exec_cmd_browse, FALSE); 522 gtk_widget_set_sensitive(dialog->exec_cmd_browse, FALSE);
523 gtk_widget_set_sensitive(dialog->play_sound_entry, FALSE); 523 gtk_widget_set_sensitive(dialog->play_sound_entry, FALSE);
524 gtk_widget_set_sensitive(dialog->play_sound_browse, FALSE); 524 gtk_widget_set_sensitive(dialog->play_sound_browse, FALSE);
564 dialog->send_msg_entry); 564 dialog->send_msg_entry);
565 565
566 exec_widgets = g_ptr_array_new(); 566 exec_widgets = g_ptr_array_new();
567 g_ptr_array_add(exec_widgets,dialog->exec_cmd_entry); 567 g_ptr_array_add(exec_widgets,dialog->exec_cmd_entry);
568 g_ptr_array_add(exec_widgets,dialog->exec_cmd_browse); 568 g_ptr_array_add(exec_widgets,dialog->exec_cmd_browse);
569 569
570 g_signal_connect(G_OBJECT(dialog->exec_cmd), "clicked", 570 g_signal_connect(G_OBJECT(dialog->exec_cmd), "clicked",
571 G_CALLBACK(gtk_toggle_sensitive_array), 571 G_CALLBACK(gtk_toggle_sensitive_array),
572 exec_widgets); 572 exec_widgets);
573 g_signal_connect(G_OBJECT(dialog->exec_cmd_browse), "clicked", 573 g_signal_connect(G_OBJECT(dialog->exec_cmd_browse), "clicked",
574 G_CALLBACK(filesel), 574 G_CALLBACK(filesel),
586 G_CALLBACK(filesel), 586 G_CALLBACK(filesel),
587 dialog->play_sound_entry); 587 dialog->play_sound_entry);
588 g_signal_connect(G_OBJECT(dialog->play_sound_test), "clicked", 588 g_signal_connect(G_OBJECT(dialog->play_sound_test), "clicked",
589 G_CALLBACK(pounce_test_sound), 589 G_CALLBACK(pounce_test_sound),
590 dialog->play_sound_entry); 590 dialog->play_sound_entry);
591 591
592 g_signal_connect(G_OBJECT(dialog->send_msg_entry), "activate", 592 g_signal_connect(G_OBJECT(dialog->send_msg_entry), "activate",
593 G_CALLBACK(save_pounce_cb), dialog); 593 G_CALLBACK(save_pounce_cb), dialog);
594 g_signal_connect(G_OBJECT(dialog->exec_cmd_entry), "activate", 594 g_signal_connect(G_OBJECT(dialog->exec_cmd_entry), "activate",
595 G_CALLBACK(save_pounce_cb), dialog); 595 G_CALLBACK(save_pounce_cb), dialog);
596 g_signal_connect(G_OBJECT(dialog->play_sound_entry), "activate", 596 g_signal_connect(G_OBJECT(dialog->play_sound_entry), "activate",
597 G_CALLBACK(save_pounce_cb), dialog); 597 G_CALLBACK(save_pounce_cb), dialog);
598 598
599 /* Now the last part, where we have the Save checkbox */ 599 /* Now the last part, where we have the Save checkbox */
600 dialog->save_pounce = gtk_check_button_new_with_mnemonic( 600 dialog->save_pounce = gtk_check_button_new_with_mnemonic(
601 _("_Save this pounce after activation")); 601 _("_Save this pounce after activation"));
602 602
603 gtk_box_pack_start(GTK_BOX(vbox2), dialog->save_pounce, FALSE, FALSE, 0); 603 gtk_box_pack_start(GTK_BOX(vbox2), dialog->save_pounce, FALSE, FALSE, 0);
632 632
633 /* Save button */ 633 /* Save button */
634 dialog->save_button = button = gtk_button_new_from_stock(GTK_STOCK_SAVE); 634 dialog->save_button = button = gtk_button_new_from_stock(GTK_STOCK_SAVE);
635 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); 635 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
636 gtk_widget_show(button); 636 gtk_widget_show(button);
637 637
638 g_signal_connect(G_OBJECT(button), "clicked", 638 g_signal_connect(G_OBJECT(button), "clicked",
639 G_CALLBACK(save_pounce_cb), dialog); 639 G_CALLBACK(save_pounce_cb), dialog);
640 640
641 if (*gtk_entry_get_text(GTK_ENTRY(dialog->buddy_entry)) == '\0') 641 if (*gtk_entry_get_text(GTK_ENTRY(dialog->buddy_entry)) == '\0')
642 gtk_widget_set_sensitive(button, FALSE); 642 gtk_widget_set_sensitive(button, FALSE);