Mercurial > pidgin.yaz
comparison src/main.c @ 5024:8e55a4d362a3
[gaim-migrate @ 5361]
Patch by Rob McQueen, NEWS and CREDITS updates.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sat, 05 Apr 2003 05:01:47 +0000 |
parents | 307c16c4b57e |
children | cb700c07ee07 |
comparison
equal
deleted
inserted
replaced
5023:e218d2d2b7e9 | 5024:8e55a4d362a3 |
---|---|
291 GtkWidget *button; | 291 GtkWidget *button; |
292 GtkWidget *hbox; | 292 GtkWidget *hbox; |
293 GtkWidget *label; | 293 GtkWidget *label; |
294 GtkWidget *vbox2; | 294 GtkWidget *vbox2; |
295 GList *tmp; | 295 GList *tmp; |
296 char *filename; | |
297 | 296 |
298 /* Do we already have a main window opened? If so, bring it back, baby... ribs... yeah */ | 297 /* Do we already have a main window opened? If so, bring it back, baby... ribs... yeah */ |
299 if (mainwindow) { | 298 if (mainwindow) { |
300 gtk_window_present(GTK_WINDOW(mainwindow)); | 299 gtk_window_present(GTK_WINDOW(mainwindow)); |
301 return; | 300 return; |
313 G_CALLBACK(login_window_closed), mainwindow); | 312 G_CALLBACK(login_window_closed), mainwindow); |
314 | 313 |
315 vbox = gtk_vbox_new(FALSE, 0); | 314 vbox = gtk_vbox_new(FALSE, 0); |
316 gtk_container_add(GTK_CONTAINER(mainwindow), vbox); | 315 gtk_container_add(GTK_CONTAINER(mainwindow), vbox); |
317 | 316 |
318 filename = g_build_filename(DATADIR, "pixmaps", "gaim", "logo.png", NULL); | 317 image = gtk_image_new_from_stock(GAIM_STOCK_LOGO, gtk_icon_size_from_name(GAIM_ICON_SIZE_LOGO)); |
319 image = gtk_image_new_from_file(filename); | |
320 g_free(filename); | |
321 gtk_box_pack_start(GTK_BOX(vbox), image, FALSE, FALSE, 0); | 318 gtk_box_pack_start(GTK_BOX(vbox), image, FALSE, FALSE, 0); |
322 | 319 |
323 vbox2 = gtk_vbox_new(FALSE, 0); | 320 vbox2 = gtk_vbox_new(FALSE, 0); |
324 gtk_container_set_border_width(GTK_CONTAINER(vbox2), 5); | 321 gtk_container_set_border_width(GTK_CONTAINER(vbox2), 5); |
325 | 322 |
355 /* Now for the button box */ | 352 /* Now for the button box */ |
356 hbox = gtk_hbox_new(TRUE, 0); | 353 hbox = gtk_hbox_new(TRUE, 0); |
357 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 5); | 354 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 5); |
358 | 355 |
359 /* And now for the buttons */ | 356 /* And now for the buttons */ |
360 button = gaim_pixbuf_button(_("Accounts"), "accounts.png", GAIM_BUTTON_VERTICAL); | 357 button = gaim_pixbuf_button_from_stock(_("Accounts"), GAIM_STOCK_ACCOUNTS, GAIM_BUTTON_VERTICAL); |
361 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | 358 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); |
362 g_signal_connect(G_OBJECT(button), "clicked", | 359 g_signal_connect(G_OBJECT(button), "clicked", |
363 G_CALLBACK(account_editor), mainwindow); | 360 G_CALLBACK(account_editor), mainwindow); |
364 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 361 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
365 | 362 |
366 #ifdef NO_MULTI | 363 #ifdef NO_MULTI |
367 gtk_widget_set_sensitive(GTK_WIDGET(button), FALSE); | 364 gtk_widget_set_sensitive(GTK_WIDGET(button), FALSE); |
368 #endif | 365 #endif |
369 | 366 |
370 button = gaim_pixbuf_button(_("Settings"), "preferences.png", GAIM_BUTTON_VERTICAL); | 367 button = gaim_pixbuf_button_from_stock(_("Preferences"), GTK_STOCK_PREFERENCES, GAIM_BUTTON_VERTICAL); |
371 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | 368 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); |
372 g_signal_connect(G_OBJECT(button), "clicked", | 369 g_signal_connect(G_OBJECT(button), "clicked", |
373 G_CALLBACK(show_prefs), mainwindow); | 370 G_CALLBACK(show_prefs), mainwindow); |
374 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 371 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
375 | 372 |
376 button = gaim_pixbuf_button(_("Sign On"), "signon.png", GAIM_BUTTON_VERTICAL); | 373 button = gaim_pixbuf_button_from_stock(_("Sign On"), GAIM_STOCK_SIGN_ON, GAIM_BUTTON_VERTICAL); |
377 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | 374 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); |
378 g_signal_connect(G_OBJECT(button), "clicked", | 375 g_signal_connect(G_OBJECT(button), "clicked", |
379 G_CALLBACK(dologin), mainwindow); | 376 G_CALLBACK(dologin), mainwindow); |
380 g_signal_connect(G_OBJECT(button), "button-press-event", G_CALLBACK(domiddleclick), NULL); | 377 g_signal_connect(G_OBJECT(button), "button-press-event", G_CALLBACK(domiddleclick), NULL); |
381 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 378 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
536 | 533 |
537 setup_stock(); | 534 setup_stock(); |
538 | 535 |
539 #ifndef _WIN32 | 536 #ifndef _WIN32 |
540 /* use the nice PNG icon for all the windows */ | 537 /* use the nice PNG icon for all the windows */ |
541 icon_path = g_build_filename(DATADIR, "pixmaps", "gaim.png", NULL); | 538 icon_path = g_build_filename(DATADIR, "pixmaps", "gaim", "icons", "online.png", NULL); |
542 icon = gdk_pixbuf_new_from_file(icon_path, NULL); | 539 icon = gdk_pixbuf_new_from_file(icon_path, NULL); |
543 g_free(icon_path); | 540 g_free(icon_path); |
544 if (icon) { | 541 if (icon) { |
545 icons = g_list_append(icons,icon); | 542 icons = g_list_append(icons,icon); |
546 gtk_window_set_default_icon_list(icons); | 543 gtk_window_set_default_icon_list(icons); |