Changeset 2128 for trunk/jons-gtk-gui
- Timestamp:
- 07/11/00 13:48:45 (8 years ago)
- Location:
- trunk/jons-gtk-gui
- Files:
-
- 1 added
- 13 modified
-
configure.in (modified) (2 diffs)
-
src/about_window.cpp (modified) (2 diffs)
-
src/chat_window.cpp (modified) (1 diff)
-
src/contact_list.cpp (modified) (2 diffs)
-
src/convo.cpp (modified) (6 diffs)
-
src/extras.cpp (modified) (2 diffs)
-
src/key_request.cpp (added)
-
src/licq_gtk.h (modified) (5 diffs)
-
src/main.cpp (modified) (1 diff)
-
src/main_window.cpp (modified) (1 diff)
-
src/Makefile.am (modified) (1 diff)
-
src/option_window.cpp (modified) (1 diff)
-
src/pipe.cpp (modified) (1 diff)
-
src/register_user.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/jons-gtk-gui/configure.in
r2120 r2128 3 3 AM_CONFIG_HEADER(config.h) 4 4 5 AM_INIT_AUTOMAKE( GtkPlugin, 0.10)5 AM_INIT_AUTOMAKE(JonsGtkPlugin, 0.10) 6 6 7 7 AC_PROG_CC … … 17 17 AC_LIBTOOL_CXX 18 18 19 dnl Check for libraries 20 AM_PATH_GTK(1.2.0,,AC_MSG_ERROR(JonsGtkPlugin 0.10 needs GTK)) 21 19 22 dnl Check for header files 20 23 LICQ_CHECK_LICQ -
trunk/jons-gtk-gui/src/about_window.cpp
r2120 r2128 43 43 gtk_window_set_position(GTK_WINDOW(about_window), GTK_WIN_POS_CENTER); 44 44 gtk_window_set_title(GTK_WINDOW(about_window), "About Licq"); 45 gtk_widget_set_usize(about_window, 225, 180);46 45 47 46 // Window delete event … … 62 61 "Jon's GTK+ GUI Plugin Version: %s\n" 63 62 "GTK+ Version: %d.%d.%d\nCompiled On: %s\n" 64 " Currently Running On: %s %s [%s]\n\n"63 " Currently Running On: %s %s [%s] \n\n" 65 64 "Author: Jon Keating <jon@licq.org>\n" 66 65 "http://jons-gtk-gui.sourceforge.net\n\n" -
trunk/jons-gtk-gui/src/chat_window.cpp
r2097 r2128 68 68 gtk_window_set_position(GTK_WINDOW(rc->window), GTK_WIN_POS_CENTER); 69 69 gtk_container_add(GTK_CONTAINER(rc->window), table); 70 gtk_signal_connect(GTK_OBJECT(rc->window), "destroy", 71 GTK_SIGNAL_FUNC(cancel_request_chat), (gpointer)rc); 70 72 71 73 /*Create the scrolled window with text and attach it to the window */ -
trunk/jons-gtk-gui/src/contact_list.cpp
r2117 r2128 69 69 gtk_clist_freeze(GTK_CLIST(contact_list)); 70 70 71 do_colors(); /* Make the colors */72 do_pixmaps(); /* Make the pixmap */71 // do_colors(); /* Make the colors */ 72 // do_pixmaps(); /* Make the pixmap */ 73 73 74 74 blah[0] = ""; … … 337 337 GTK_SIGNAL_FUNC(list_send_url), user); 338 338 339 /* Only show chat and file requests if the user is not offline */ 340 if(user->Status() != ICQ_STATUS_OFFLINE) 341 { 342 add_to_popup("Send Chat Request", _menu, 343 GTK_SIGNAL_FUNC(list_request_chat), user); 344 345 add_to_popup("Send File Request", _menu, 346 GTK_SIGNAL_FUNC(list_request_file), user); 347 } 339 add_to_popup("Send Chat Request", _menu, 340 GTK_SIGNAL_FUNC(list_request_chat), user); 341 342 add_to_popup("Send File Request", _menu, 343 GTK_SIGNAL_FUNC(list_request_file), user); 344 345 if(user->Secure()) 346 add_to_popup("Close Secure Channel", _menu, 347 GTK_SIGNAL_FUNC(create_key_request_window), 348 user); 349 else 350 add_to_popup("Request Secure Channel", _menu, 351 GTK_SIGNAL_FUNC(create_key_request_window), 352 user); 348 353 349 354 /* A separator */ -
trunk/jons-gtk-gui/src/convo.cpp
r2095 r2128 105 105 106 106 /* Set cancel to grayed out at first */ 107 //gtk_widget_set_sensitive(c->cancel, FALSE);107 //gtk_widget_set_sensitive(c->cancel, FALSE); 108 108 109 109 /* Make the boxes */ … … 142 142 GTK_SIGNAL_FUNC(convo_cancel), c); 143 143 gtk_signal_connect(GTK_OBJECT(c->send), "clicked", 144 GTK_SIGNAL_FUNC(convo_send), c);144 GTK_SIGNAL_FUNC(convo_send), (gpointer)c); 145 145 146 146 gtk_box_pack_start(GTK_BOX(button_box), close, TRUE, TRUE, 5); … … 227 227 if(enter_sends && !(eventkey->state & GDK_SHIFT_MASK)) 228 228 { 229 convo_send(NULL, c);229 convo_send(NULL, (gpointer)c); 230 230 } 231 231 else if(enter_sends) … … 242 242 } 243 243 244 void convo_send(GtkWidget *widget, struct conversation *c) 245 { 244 void convo_send(GtkWidget *widget, gpointer _c) 245 { 246 struct conversation *c = (struct conversation *)_c; 247 246 248 /* Set the 2 button widgets */ 247 // gtk_widget_set_sensitive(c->send, FALSE); 248 // gtk_widget_set_sensitive(c->cancel, TRUE); 249 if(GTK_WIDGET_IS_SENSITIVE(c->send)) 250 gtk_widget_set_sensitive(c->send, false); 251 gtk_widget_set_sensitive(c->cancel, true); 249 252 250 253 gchar *buf; … … 315 318 g_strreverse(temp); 316 319 317 if(strncmp(temp, " en", 2) == 0)320 if(strncmp(temp, " ...", 4) == 0) 318 321 return; 319 322 320 323 else 321 324 { 322 //gtk_widget_set_sensitive(c->send, TRUE);323 //gtk_widget_set_sensitive(c->cancel, FALSE);325 gtk_widget_set_sensitive(c->send, TRUE); 326 gtk_widget_set_sensitive(c->cancel, FALSE); 324 327 } 325 328 } … … 328 331 { 329 332 /* Set the buttons sensitivity accordingly */ 330 //gtk_widget_set_sensitive(c->send, TRUE);331 //gtk_widget_set_sensitive(c->cancel, FALSE);333 gtk_widget_set_sensitive(c->send, TRUE); 334 gtk_widget_set_sensitive(c->cancel, FALSE); 332 335 333 336 /* Actually cancel this event */ -
trunk/jons-gtk-gui/src/extras.cpp
r2117 r2128 215 215 } 216 216 217 else if(event->SubCommand() == ICQ_CMDxSUB_SECURExOPEN || 218 event->SubCommand() == ICQ_CMDxSUB_SECURExCLOSE) 219 { 220 catcher = g_slist_remove(catcher, etd); 221 finish_secure(event); 222 return; 223 } 224 217 225 else 218 226 { … … 366 374 } 367 375 376 void finish_secure(ICQEvent *event) 377 { 378 struct key_request *kr = kr_find(event->Uin()); 379 380 // Window isn't open.. cya 381 if(kr == NULL) 382 return; 383 384 char result[41]; 385 386 switch(event->Result()) 387 { 388 case EVENT_FAILED: 389 strncpy(result, 390 "Remote client does not support OpenSSL.", 41); 391 break; 392 393 case EVENT_ERROR: 394 strncpy(result, "Could not connect to remote client.", 395 41); 396 break; 397 398 case EVENT_SUCCESS: 399 if(kr->open) 400 strncpy(result, "Secure channel established.", 401 41); 402 else 403 strncpy(result, "Secure channel closed.", 41); 404 break; 405 case EVENT_ACKED: 406 case EVENT_TIMEDOUT: 407 case EVENT_CANCELLED: 408 default: 409 break; 410 } 411 412 gtk_label_set_text(GTK_LABEL(kr->label_status), result); 413 } 414 415 368 416 /*************** Finishing Signals *****************************/ 369 417 -
trunk/jons-gtk-gui/src/licq_gtk.h
r2120 r2128 354 354 }; 355 355 356 struct key_request 357 { 358 GtkWidget *window; 359 GtkWidget *label_status; 360 gboolean open; 361 ICQUser *user; 362 struct e_tag_data *etag; 363 }; 364 356 365 struct e_tag_data 357 366 { … … 385 394 /* Globals in history_window.cpp */ 386 395 extern const gchar *line; 396 397 /* Globals in key_requst.cpp */ 398 extern GSList *kr_list; 387 399 388 400 /* Globals in main.cpp */ … … 488 500 extern struct conversation *convo_find(unsigned long); 489 501 extern void convo_show(struct conversation *); 490 extern void convo_send(GtkWidget *, struct conversation *);502 extern void convo_send(GtkWidget *, gpointer); 491 503 extern gboolean key_press_convo(GtkWidget *, GdkEventKey *, gpointer); 492 504 extern void verify_convo_send(GtkWidget *, guint, gchar *, … … 511 523 extern void finish_away(ICQEvent *); 512 524 extern void finish_random(ICQEvent *); 525 extern void finish_secure(ICQEvent *); 513 526 extern void finish_info(CICQSignal *); 514 527 … … 540 553 541 554 555 /* Functions in key_request.cpp */ 556 extern void create_key_request_window(GtkWidget *, ICQUser *); 557 extern struct key_request *kr_find(gulong); 558 extern struct key_request *kr_new(ICQUser *); 559 extern void send_key_request(GtkWidget *, gpointer); 560 extern void close_key_request(GtkWidget *, gpointer); 561 562 542 563 /* Functions in log_window.cpp */ 543 564 extern void new_log_window(); -
trunk/jons-gtk-gui/src/main.cpp
r2057 r2128 89 89 else 90 90 { 91 main_window = main_window_new(title, 445, 200);91 main_window = main_window_new(title, 245, 160); 92 92 main_window_show(); 93 93 contact_list_refresh(); -
trunk/jons-gtk-gui/src/main_window.cpp
r2072 r2128 72 72 gtk_signal_connect(GTK_OBJECT(main_window), "delete_event", 73 73 GTK_SIGNAL_FUNC(main_window_delete_event), NULL); 74 75 // After the main window has been created, but before the contact 76 // list or anything is shown, we need to make the colors and pixmaps 77 do_colors(); 78 do_pixmaps(); 74 79 75 80 /* Add the vertical box in */ -
trunk/jons-gtk-gui/src/Makefile.am
r2120 r2128 21 21 file_window.cpp \ 22 22 history_window.cpp \ 23 key_request.cpp \ 23 24 log_window.cpp \ 24 25 main.cpp \ -
trunk/jons-gtk-gui/src/option_window.cpp
r2092 r2128 199 199 licqConf.FlushFile(); 200 200 licqConf.CloseFile(); 201 202 // Refresh the colors 203 do_colors(); 201 204 } 202 205 -
trunk/jons-gtk-gui/src/pipe.cpp
r2097 r2128 115 115 } 116 116 117 case SIGNAL_LOGOFF: break; 118 117 119 default: 118 120 g_print("Error: Unknown signal type: %ld.", sig->Signal()); -
trunk/jons-gtk-gui/src/register_user.cpp
r2092 r2128 20 20 21 21 /* Create the window */ 22 register_window = gtk_window_new(GTK_WINDOW_ TOPLEVEL);22 register_window = gtk_window_new(GTK_WINDOW_DIALOG); 23 23 gtk_window_set_title(GTK_WINDOW(register_window), 24 24 "Licq - Registration Wizard"); … … 135 135 136 136 wizard_message(6); 137 138 main_window = main_window_new(g_strdup_printf("%ld", _uin), 139 445, 200); 140 main_window_show(); 141 system_status_refresh(); 142 dialog_close(NULL, register_window); 137 143 } 138 144
