Changeset 2532 for trunk/jons-gtk-gui
- Timestamp:
- 05/20/01 08:22:36 (8 years ago)
- Location:
- trunk/jons-gtk-gui/src
- Files:
-
- 29 modified
-
about_window.cpp (modified) (4 diffs)
-
add_user_window.cpp (modified) (1 diff)
-
auth_user_window.cpp (modified) (1 diff)
-
away_window.cpp (modified) (8 diffs)
-
chat_window.cpp (modified) (24 diffs)
-
contact_list.cpp (modified) (7 diffs)
-
convo.cpp (modified) (9 diffs)
-
extras.cpp (modified) (14 diffs)
-
file_window.cpp (modified) (13 diffs)
-
history_window.cpp (modified) (4 diffs)
-
key_request.cpp (modified) (2 diffs)
-
log_window.cpp (modified) (5 diffs)
-
main.cpp (modified) (1 diff)
-
main_window.cpp (modified) (4 diffs)
-
Makefile.am (modified) (1 diff)
-
menu.cpp (modified) (5 diffs)
-
more_window.cpp (modified) (4 diffs)
-
option_window.cpp (modified) (2 diffs)
-
pipe.cpp (modified) (2 diffs)
-
plugin_window.cpp (modified) (4 diffs)
-
random_chat.cpp (modified) (5 diffs)
-
register_user.cpp (modified) (4 diffs)
-
search_user_window.cpp (modified) (8 diffs)
-
security_window.cpp (modified) (13 diffs)
-
stats_window.cpp (modified) (2 diffs)
-
status.cpp (modified) (2 diffs)
-
system_message.cpp (modified) (3 diffs)
-
user_info_window.cpp (modified) (10 diffs)
-
user_menu.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/jons-gtk-gui/src/about_window.cpp
r2363 r2532 33 33 { 34 34 // Only one about window 35 if(about_window != NULL)35 if(about_window != 0) 36 36 { 37 37 gdk_window_raise(about_window->window); … … 46 46 // Window delete event 47 47 gtk_signal_connect(GTK_OBJECT(about_window), "destroy", 48 GTK_SIGNAL_FUNC(close_about_window), NULL);48 GTK_SIGNAL_FUNC(close_about_window), 0); 49 49 50 50 // A vertical box for the label and ok button … … 79 79 GtkWidget *ok = gtk_button_new_with_label("OK"); 80 80 gtk_signal_connect(GTK_OBJECT(ok), "clicked", 81 GTK_SIGNAL_FUNC(close_about_window), NULL);81 GTK_SIGNAL_FUNC(close_about_window), 0); 82 82 gtk_box_pack_start(GTK_BOX(v_box), ok, true, true, 0); 83 83 … … 88 88 { 89 89 gtk_widget_destroy(about_window); 90 about_window = NULL;90 about_window = 0; 91 91 } -
trunk/jons-gtk-gui/src/add_user_window.cpp
r2092 r2532 52 52 /* Accept only numbers in the a->entry */ 53 53 gtk_signal_connect(GTK_OBJECT(a->entry), "insert-text", 54 GTK_SIGNAL_FUNC(verify_numbers), NULL);54 GTK_SIGNAL_FUNC(verify_numbers), 0); 55 55 56 56 /* Add the first hbox to the top of the vbox */ -
trunk/jons-gtk-gui/src/auth_user_window.cpp
r2092 r2532 52 52 /* Accept only numbers in au->entry */ 53 53 gtk_signal_connect(GTK_OBJECT(au->entry), "insert-text", 54 GTK_SIGNAL_FUNC(verify_numbers), NULL);54 GTK_SIGNAL_FUNC(verify_numbers), 0); 55 55 56 56 /* Make the scrolled text box */ 57 au->text = gtk_text_new( NULL, NULL);57 au->text = gtk_text_new(0, 0); 58 58 gtk_text_set_editable(GTK_TEXT(au->text), TRUE); 59 59 gtk_text_set_word_wrap(GTK_TEXT(au->text), TRUE); 60 60 gtk_text_set_line_wrap(GTK_TEXT(au->text), TRUE); 61 61 62 scroll = gtk_scrolled_window_new( NULL, NULL);62 scroll = gtk_scrolled_window_new(0, 0); 63 63 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll), 64 64 GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); -
trunk/jons-gtk-gui/src/away_window.cpp
r2363 r2532 44 44 45 45 /* The text box */ 46 away_d->text = gtk_text_new( NULL, NULL);46 away_d->text = gtk_text_new(0, 0); 47 47 gtk_text_set_editable(GTK_TEXT(away_d->text), TRUE); 48 48 gtk_widget_set_usize(GTK_WIDGET(away_d->text), 300, 100); … … 99 99 struct user_away_window *uaw = uaw_find(user->Uin()); 100 100 101 if(uaw != NULL)101 if(uaw != 0) 102 102 return; 103 103 … … 129 129 130 130 /* The scrolling window */ 131 scroll = gtk_scrolled_window_new( NULL, NULL);131 scroll = gtk_scrolled_window_new(0, 0); 132 132 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll), 133 133 GTK_POLICY_NEVER, … … 135 135 136 136 /* The text box */ 137 uaw->text_box = gtk_text_new( NULL, NULL);137 uaw->text_box = gtk_text_new(0, 0); 138 138 gtk_widget_set_usize(uaw->text_box, 235, 60); 139 139 gtk_text_set_editable(GTK_TEXT(uaw->text_box), FALSE); … … 195 195 uaw_list = g_slist_remove(uaw_list, uaw); 196 196 catcher = g_slist_remove(catcher, uaw->etag); 197 dialog_close( NULL, uaw->window);197 dialog_close(0, uaw->window); 198 198 } 199 199 … … 210 210 211 211 /* If it does, return it, if not, make one */ 212 if(uaw != NULL)212 if(uaw != 0) 213 213 return uaw; 214 214 … … 219 219 uaw_list = g_slist_append(uaw_list, uaw); 220 220 221 // list_read_message( NULL, uaw->user);221 // list_read_message(0, uaw->user); 222 222 223 223 return uaw; … … 239 239 240 240 /* It wasn't found, return null */ 241 return NULL;242 } 241 return 0; 242 } -
trunk/jons-gtk-gui/src/chat_window.cpp
r2321 r2532 37 37 38 38 // No get outta here, bitch! 39 if(rc != NULL)39 if(rc != 0) 40 40 return; 41 41 … … 71 71 72 72 /*Create the scrolled window with text and attach it to the window */ 73 scroll = gtk_scrolled_window_new( NULL, NULL);73 scroll = gtk_scrolled_window_new(0, 0); 74 74 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll), 75 75 GTK_POLICY_NEVER, 76 76 GTK_POLICY_AUTOMATIC); 77 rc->text_box = gtk_text_new( NULL, NULL);77 rc->text_box = gtk_text_new(0, 0); 78 78 gtk_text_set_editable(GTK_TEXT(rc->text_box), TRUE); 79 79 gtk_text_set_word_wrap(GTK_TEXT(rc->text_box), TRUE); … … 87 87 88 88 /* The send as buttons */ 89 rc->send_norm = gtk_radio_button_new_with_label( NULL, "Send Normal");89 rc->send_norm = gtk_radio_button_new_with_label(0, "Send Normal"); 90 90 rc->send_urg = gtk_radio_button_new_with_label_from_widget( 91 91 GTK_RADIO_BUTTON(rc->send_norm), "Send Urgent"); … … 163 163 164 164 /* Don't make it if it's already there, return it */ 165 if(rc != NULL)165 if(rc != 0) 166 166 return rc; 167 167 … … 188 188 189 189 /* It wasn't found, return null */ 190 return NULL;190 return 0; 191 191 } 192 192 … … 200 200 201 201 // Make a GList with the current chats in it 202 GList *items = NULL;202 GList *items = 0; 203 203 204 204 ChatDlgList::iterator iter; … … 207 207 208 208 // Make sure there are chats to show 209 if(items == NULL)209 if(items == 0) 210 210 return; 211 211 … … 327 327 if(auto_accept) 328 328 { 329 chat_accept( NULL, (gpointer)r_cr);329 chat_accept(0, (gpointer)r_cr); 330 330 return; 331 331 } … … 422 422 CExtendedAck *ea = event->ExtendedAck(); 423 423 424 if(ea == NULL)424 if(ea == 0) 425 425 { 426 426 gLog.Error("%sInternal error: chat_start_as_client(): chat request acknowledgement without extended result.\n", L_ERRORxSTR); … … 515 515 /* Create the remote frame with the remote scrolled text window */ 516 516 cw->frame_remote = gtk_frame_new("Remote"); 517 cw->text_remote = gtk_text_new( NULL, NULL);517 cw->text_remote = gtk_text_new(0, 0); 518 518 gtk_text_set_editable(GTK_TEXT(cw->text_remote), FALSE); 519 519 gtk_text_set_word_wrap(GTK_TEXT(cw->text_remote), TRUE); 520 520 gtk_text_set_line_wrap(GTK_TEXT(cw->text_remote), TRUE); 521 scroll1 = gtk_scrolled_window_new( NULL,521 scroll1 = gtk_scrolled_window_new(0, 522 522 GTK_TEXT(cw->text_remote)->vadj); 523 523 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll1), … … 540 540 gUserManager.DropUser(o); 541 541 542 cw->text_local = gtk_text_new( NULL, NULL);542 cw->text_local = gtk_text_new(0, 0); 543 543 gtk_text_set_editable(GTK_TEXT(cw->text_local), TRUE); 544 544 gtk_text_set_word_wrap(GTK_TEXT(cw->text_local), TRUE); 545 545 gtk_text_set_line_wrap(GTK_TEXT(cw->text_local), TRUE); 546 scroll2 = gtk_scrolled_window_new( NULL,546 scroll2 = gtk_scrolled_window_new(0, 547 547 GTK_TEXT(cw->text_local)->vadj); 548 548 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll2), … … 563 563 564 564 /* Create the main text box in a scrolled window */ 565 cw->text_irc = gtk_text_new( NULL, NULL);565 cw->text_irc = gtk_text_new(0, 0); 566 566 gtk_text_set_editable(GTK_TEXT(cw->text_irc), FALSE); 567 567 gtk_text_set_word_wrap(GTK_TEXT(cw->text_irc), TRUE); 568 568 gtk_text_set_line_wrap(GTK_TEXT(cw->text_irc), TRUE); 569 scroll1 = gtk_scrolled_window_new( NULL,569 scroll1 = gtk_scrolled_window_new(0, 570 570 GTK_TEXT(cw->text_irc)->vadj); 571 571 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll1), … … 616 616 GtkItemFactoryEntry menu_items[] = 617 617 { 618 { "/_Chat", NULL, NULL, 0, "<Branch>" },618 { "/_Chat", 0, 0, 0, "<Branch>" }, 619 619 { "/Chat/_Audio", "<control>A", 620 620 GtkItemFactoryCallback(chat_audio), 0, "<ToggleItem>" }, 621 621 // { "/Chat/_Kick", "<control>K", 622 // GtkItemFactoryCallback(chat_kick), 0, NULL},622 // GtkItemFactoryCallback(chat_kick), 0, 0}, 623 623 // { "/Chat/Kick _No Vote", "<control>N", 624 // GtkItemFactoryCallback(chat_kick_no_vote), 0, NULL},624 // GtkItemFactoryCallback(chat_kick_no_vote), 0, 0}, 625 625 { "/Chat/_Save", "<control>S", 626 GtkItemFactoryCallback(chat_save), 0, NULL},627 { "/Chat/sep1", NULL, NULL, 0, "<Separator>" },626 GtkItemFactoryCallback(chat_save), 0, 0}, 627 { "/Chat/sep1", 0, 0, 0, "<Separator>" }, 628 628 { "/Chat/_Close", "<control>C", 629 GtkItemFactoryCallback(chat_close), 0, NULL},630 { "/_More", NULL, NULL, 0, "<Branch>" },629 GtkItemFactoryCallback(chat_close), 0, 0}, 630 { "/_More", 0, 0, 0, "<Branch>" }, 631 631 { "/More/_Beep", "<control>B", 632 GtkItemFactoryCallback(chat_beep_users), 0, NULL},633 // { "/More/Change Font", NULL,634 // GtkItemFactoryCallback(chat_change_font), 0, NULL},632 GtkItemFactoryCallback(chat_beep_users), 0, 0}, 633 // { "/More/Change Font", 0, 634 // GtkItemFactoryCallback(chat_change_font), 0, 0}, 635 635 }; 636 636 … … 671 671 672 672 cw->kw->cmbUsers = gtk_combo_new(); 673 GList *users = NULL;673 GList *users = 0; 674 674 675 675 list<CChatUser *>::iterator iter; … … 798 798 GTK_OBJECT(GTK_FILE_SELECTION(dlg_save_chat)->cancel_button), 799 799 "clicked", GTK_SIGNAL_FUNC(save_chat_cancel), 800 NULL);800 0); 801 801 gtk_signal_connect(GTK_OBJECT(dlg_save_chat), "delete_event", 802 GTK_SIGNAL_FUNC(save_chat_cancel), NULL);802 GTK_SIGNAL_FUNC(save_chat_cancel), 0); 803 803 804 804 gtk_widget_show_all(dlg_save_chat); … … 819 819 struct chat_window *cw = (struct chat_window *)temp_cw; 820 820 821 if(cw->hold_cuser == NULL)821 if(cw->hold_cuser == 0) 822 822 { 823 cw->chat_user = NULL;823 cw->chat_user = 0; 824 824 gdk_input_remove(cw->input_tag); 825 825 cw->chatman->CloseChat(); … … 830 830 { 831 831 if(cw->chat_user == cw->hold_cuser) 832 cw->chat_user = NULL;832 cw->chat_user = 0; 833 833 } 834 834 … … 854 854 read(pipe, buf, 32); 855 855 856 CChatEvent *e = NULL;857 while((e = cw->chatman->PopChatEvent()) != NULL)856 CChatEvent *e = 0; 857 while((e = cw->chatman->PopChatEvent()) != 0) 858 858 { 859 859 CChatUser *user = e->Client(); … … 877 877 g_free(temp); 878 878 879 chat_close((gpointer)cw, 0, NULL);879 chat_close((gpointer)cw, 0, 0); 880 880 break; 881 881 } … … 896 896 g_free(temp); 897 897 898 chat_close((gpointer)cw, 0, NULL);898 chat_close((gpointer)cw, 0, 0); 899 899 break; 900 900 } … … 919 919 filler); 920 920 921 if(cw->chat_user == NULL)921 if(cw->chat_user == 0) 922 922 { 923 923 cw->chat_user = user; … … 1210 1210 } 1211 1211 1212 cw->hold_cuser = NULL;1212 cw->hold_cuser = 0; 1213 1213 delete e; 1214 1214 } … … 1346 1346 char *tmp = gtk_font_selection_dialog_get_font_name( 1347 1347 GTK_FONT_SELECTION_DIALOG(cw->font_sel_dlg)); 1348 if(tmp != NULL)1348 if(tmp != 0) 1349 1349 { 1350 1350 int len = 0; … … 1381 1381 GdkFont *font_tmp = gtk_font_selection_dialog_get_font( 1382 1382 GTK_FONT_SELECTION_DIALOG(cw->font_sel_dlg)); 1383 if(font_tmp != NULL)1383 if(font_tmp != 0) 1384 1384 cw->l_font = font_tmp; 1385 1385 -
trunk/jons-gtk-gui/src/contact_list.cpp
r2364 r2532 61 61 /* A double click on a user name */ 62 62 gtk_signal_connect(GTK_OBJECT(_contact_l), "button_press_event", 63 GTK_SIGNAL_FUNC(contact_list_click), NULL);63 GTK_SIGNAL_FUNC(contact_list_click), 0); 64 64 65 65 gtk_clist_set_button_actions(GTK_CLIST(_contact_l), 0, GTK_BUTTON_IGNORED); … … 309 309 AutoSecureList.clear(); 310 310 311 gtk_clist_set_compare_func(GTK_CLIST(contact_list), NULL);311 gtk_clist_set_compare_func(GTK_CLIST(contact_list), 0); 312 312 gtk_clist_set_sort_column(GTK_CLIST(contact_list), 0); 313 313 gtk_clist_sort(GTK_CLIST(contact_list)); … … 337 337 gchar str_status[30]; 338 338 ICQUser *user; 339 struct conversation *c = NULL;339 struct conversation *c = 0; 340 340 struct timeval check_timer; 341 341 … … 351 351 352 352 /* No user was clicked on */ 353 if(user == NULL)353 if(user == 0) 354 354 return; 355 355 … … 358 358 { 359 359 /* Fix the stupid contact list double click problem */ 360 gettimeofday(&check_timer, NULL);360 gettimeofday(&check_timer, 0); 361 361 362 362 if(!((check_timer.tv_sec == timer.tv_sec) && … … 373 373 c = convo_find(user->Uin()); 374 374 375 if(c != NULL)375 if(c != 0) 376 376 gdk_window_raise(c->window->window); 377 377 else … … 463 463 GTK_SIGNAL_FUNC(list_delete_user), user); 464 464 465 gtk_menu_popup(GTK_MENU(_menu), NULL, NULL, NULL, NULL,465 gtk_menu_popup(GTK_MENU(_menu), 0, 0, 0, 0, 466 466 event->button, event->time); 467 467 -
trunk/jons-gtk-gui/src/convo.cpp
r2495 r2532 40 40 c = convo_find(u->Uin()); 41 41 42 if(c != NULL)42 if(c != 0) 43 43 { 44 44 if(u->Status() == ICQ_STATUS_OFFLINE) … … 91 91 } 92 92 93 return NULL;93 return 0; 94 94 } 95 95 … … 124 124 125 125 /* The entry box */ 126 c->entry = gtk_text_new( NULL, NULL);126 c->entry = gtk_text_new(0, 0); 127 127 gtk_text_set_editable(GTK_TEXT(c->entry), TRUE); 128 128 gtk_signal_connect(GTK_OBJECT(c->entry), "key_press_event", … … 132 132 133 133 /* The viewing messages box area */ 134 c->text = gtk_text_new( NULL, NULL);134 c->text = gtk_text_new(0, 0); 135 135 gtk_text_set_editable(GTK_TEXT(c->text), FALSE); 136 136 gtk_text_set_word_wrap(GTK_TEXT(c->text), TRUE); … … 138 138 139 139 /* Scroll bar for the messages that are being viewed */ 140 scroll = gtk_scrolled_window_new( NULL, GTK_TEXT(c->text)->vadj);140 scroll = gtk_scrolled_window_new(0, GTK_TEXT(c->text)->vadj); 141 141 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll), 142 142 GTK_POLICY_NEVER, … … 168 168 169 169 /* Send the message normal */ 170 c->send_normal = gtk_radio_button_new_with_label( NULL, "Normal");170 c->send_normal = gtk_radio_button_new_with_label(0, "Normal"); 171 171 172 172 /* Send the message urgently */ … … 271 271 if(enter_sends && !(eventkey->state & GDK_SHIFT_MASK)) 272 272 { 273 convo_send( NULL, (gpointer)c);273 convo_send(0, (gpointer)c); 274 274 } 275 275 else if(enter_sends) … … 391 391 392 392 /* If the window doesn't exist, don't show anything */ 393 if(c == NULL)393 if(c == 0) 394 394 { 395 395 system_status_refresh(); … … 400 400 401 401 /* Make sure we really have an event */ 402 if(u_event == NULL)402 if(u_event == 0) 403 403 { 404 404 return; -
trunk/jons-gtk-gui/src/extras.cpp
r2358 r2532 85 85 struct status_icon *make_pixmap(struct status_icon *icon, gchar **file) 86 86 { 87 if(icon == NULL)87 if(icon == 0) 88 88 icon = g_new0(struct status_icon, 1); 89 89 90 90 icon->pm = gdk_pixmap_create_from_xpm_d(main_window->window, 91 91 &icon->bm, 92 NULL,92 0, 93 93 file); 94 94 return icon; … … 167 167 main_window_show(); 168 168 system_status_refresh(); 169 dialog_close( NULL, register_window);169 dialog_close(0, register_window); 170 170 } 171 171 else … … 202 202 { 203 203 /* Make sure we have the right event and event tag */ 204 if( (etd->e_tag == 0 && event != NULL) ||204 if( (etd->e_tag == 0 && event != 0) || 205 205 (etd->e_tag != 0 && !event->Equals(etd->e_tag)) ) 206 206 return; … … 219 219 strcpy(temp, etd->buf); 220 220 221 if(event == NULL)221 if(event == 0) 222 222 { 223 223 strcat(temp, "error"); … … 307 307 308 308 /* If the window isn't open, there isn't anything left to do */ 309 if(c == NULL)309 if(c == 0) 310 310 return; 311 311 … …
