139
145
gtk_assistant_set_page_complete (assistant, current_page, complete);
143
get_audiooutput_devices_list (Ekiga::ServiceCore *core,
144
std::vector<std::string> & device_list);
146
get_audioinput_devices_list (Ekiga::ServiceCore *core,
147
std::vector<std::string> & device_list);
149
get_videoinput_devices_list (Ekiga::ServiceCore *core,
150
std::vector<std::string> & device_list);
148
static void get_audiooutput_devices_list (boost::shared_ptr<Ekiga::AudioOutputCore> audiooutput_core,
149
std::vector<std::string> & device_list);
150
static void get_audioinput_devices_list (boost::shared_ptr<Ekiga::AudioInputCore> audioinput_core,
151
std::vector<std::string> & device_list);
152
static void get_videoinput_devices_list (boost::shared_ptr<Ekiga::VideoInputCore> videoinput_core,
153
std::vector<std::string> & device_list);
153
156
convert_string_list (const std::vector<std::string> & list);
273
void on_videoinput_device_added_cb (const Ekiga::VideoInputDevice & device, bool, EkigaAssistant *assistant)
273
on_videoinput_device_added_cb (const Ekiga::VideoInputDevice& device,
275
EkigaAssistant* assistant)
275
277
std::string device_string = device.GetString();
276
278
add_combo_box (GTK_COMBO_BOX (assistant->priv->video_device), device_string.c_str());
279
void on_videoinput_device_removed_cb (const Ekiga::VideoInputDevice & device, bool, EkigaAssistant *assistant)
282
on_videoinput_device_removed_cb (const Ekiga::VideoInputDevice& device,
284
EkigaAssistant* assistant)
281
286
std::string device_string = device.GetString();
282
287
remove_combo_box (GTK_COMBO_BOX (assistant->priv->video_device), device_string.c_str());
285
void on_audioinput_device_added_cb (const Ekiga::AudioInputDevice & device, bool, EkigaAssistant *assistant)
291
on_audioinput_device_added_cb (const Ekiga::AudioInputDevice& device,
293
EkigaAssistant* assistant)
287
295
std::string device_string = device.GetString();
288
296
add_combo_box (GTK_COMBO_BOX (assistant->priv->audio_recorder), device_string.c_str());
291
void on_audioinput_device_removed_cb (const Ekiga::AudioInputDevice & device, bool, EkigaAssistant *assistant)
300
on_audioinput_device_removed_cb (const Ekiga::AudioInputDevice& device,
302
EkigaAssistant* assistant)
293
304
std::string device_string = device.GetString();
294
305
remove_combo_box (GTK_COMBO_BOX (assistant->priv->audio_recorder), device_string.c_str());
297
void on_audiooutput_device_added_cb (const Ekiga::AudioOutputDevice & device, bool, EkigaAssistant *assistant)
309
on_audiooutput_device_added_cb (const Ekiga::AudioOutputDevice& device,
311
EkigaAssistant *assistant)
299
313
std::string device_string = device.GetString();
300
314
add_combo_box (GTK_COMBO_BOX (assistant->priv->audio_player), device_string.c_str());
301
315
add_combo_box (GTK_COMBO_BOX (assistant->priv->audio_ringer), device_string.c_str());
304
void on_audiooutput_device_removed_cb (const Ekiga::AudioOutputDevice & device, bool, EkigaAssistant *assistant)
319
on_audiooutput_device_removed_cb (const Ekiga::AudioOutputDevice& device,
321
EkigaAssistant* assistant)
306
323
std::string device_string = device.GetString();
307
324
remove_combo_box (GTK_COMBO_BOX (assistant->priv->audio_player), device_string.c_str());
308
325
remove_combo_box (GTK_COMBO_BOX (assistant->priv->audio_ringer), device_string.c_str());
329
kind_of_net_changed_nt (G_GNUC_UNUSED gpointer id,
333
gm_conf_set_int (GENERAL_KEY "kind_of_net", NET_CUSTOM);
313
337
create_welcome_page (EkigaAssistant *assistant)
322
346
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
323
347
gtk_widget_show (label);
324
348
gtk_assistant_append_page (GTK_ASSISTANT (assistant), label);
325
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), label, _("Welcome in Ekiga"));
349
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), label, _("Welcome to Ekiga"));
326
350
gtk_assistant_set_page_type (GTK_ASSISTANT (assistant), label, GTK_ASSISTANT_PAGE_INTRO);
327
351
gtk_assistant_set_page_header_image (GTK_ASSISTANT (assistant), label, assistant->priv->icon);
328
352
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), label, TRUE);
377
391
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
378
392
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
380
g_signal_connect (G_OBJECT (assistant->priv->name), "changed",
394
g_signal_connect (assistant->priv->name, "changed",
381
395
G_CALLBACK (name_changed_cb), assistant);
383
397
assistant->priv->personal_data_page = vbox;
605
622
g_signal_connect (button, "clicked",
606
623
G_CALLBACK (ekiga_net_button_clicked_cb), NULL);
608
assistant->priv->skip_ekiga_net = gtk_check_button_new ();
609
label = gtk_label_new (_("I do not want to sign up for the ekiga.net free service"));
610
gtk_container_add (GTK_CONTAINER (assistant->priv->skip_ekiga_net), label);
625
assistant->priv->skip_ekiga_net = gtk_check_button_new_with_label (_("I do not want to sign up for the ekiga.net free service"));
611
626
align = gtk_alignment_new (0, 1.0, 0, 0);
612
627
gtk_container_add (GTK_CONTAINER (align), assistant->priv->skip_ekiga_net);
613
628
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
645
659
apply_ekiga_net_page (EkigaAssistant *assistant)
647
Ekiga::AccountCore *account_core = dynamic_cast<Ekiga::AccountCore *> (assistant->priv->core->get ("account-core"));
649
/* Some specific Opal stuff for the Ekiga.net account */
650
Opal::Bank *opal_bank = dynamic_cast<Opal::Bank *> (assistant->priv->core->get ("opal-account-store"));
651
Opal::Account *account = dynamic_cast<Opal::Account *> (account_core->find_account ("ekiga.net"));
653
bool new_account = (account == NULL);
661
Opal::AccountPtr account = assistant->priv->bank->find_account ("ekiga.net");
662
bool new_account = !account;
655
664
if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (assistant->priv->skip_ekiga_net))) {
657
opal_bank->new_account (Opal::Account::Ekiga,
658
gtk_entry_get_text (GTK_ENTRY (assistant->priv->username)),
659
gtk_entry_get_text (GTK_ENTRY (assistant->priv->password)));
666
assistant->priv->bank->new_account (Opal::Account::Ekiga,
667
gtk_entry_get_text (GTK_ENTRY (assistant->priv->username)),
668
gtk_entry_get_text (GTK_ENTRY (assistant->priv->password)));
661
670
account->set_authentication_settings (gtk_entry_get_text (GTK_ENTRY (assistant->priv->username)),
662
gtk_entry_get_text (GTK_ENTRY (assistant->priv->password)));
671
gtk_entry_get_text (GTK_ENTRY (assistant->priv->password)));
695
704
label = gtk_label_new (NULL);
696
705
text = g_strdup_printf ("<i>%s</i>",
697
_("You can make calls to regular phones and cell numbers worldwide using Ekiga.\n\n"
698
"To enable this, you need to do three things:\n"
706
_("You can make calls to regular phones and cell numbers worldwide using Ekiga. "
707
"To enable this, you need to do two things:\n"
699
708
"- First buy an account at the URL below.\n"
700
709
"- Then enter your account ID and PIN code.\n"
701
710
"The service will work only if your account is created using the URL in this dialog.\n"));
753
762
g_signal_connect (button, "clicked",
754
763
G_CALLBACK (ekiga_out_history_calls_clicked_cb), assistant);
756
assistant->priv->skip_ekiga_out = gtk_check_button_new ();
757
label = gtk_label_new (_("I do not want to sign up for the Ekiga Call Out service"));
758
gtk_container_add (GTK_CONTAINER (assistant->priv->skip_ekiga_out), label);
765
assistant->priv->skip_ekiga_out = gtk_check_button_new_with_label (_("I do not want to sign up for the Ekiga Call Out service"));
759
766
align = gtk_alignment_new (0, 1.0, 0, 0);
760
767
gtk_container_add (GTK_CONTAINER (align), assistant->priv->skip_ekiga_out);
761
768
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
793
799
apply_ekiga_out_page (EkigaAssistant *assistant)
795
Ekiga::AccountCore *account_core = dynamic_cast<Ekiga::AccountCore *> (assistant->priv->core->get ("account-core"));
797
801
/* Some specific Opal stuff for the Ekiga.net account */
798
Opal::Bank *opal_bank = dynamic_cast<Opal::Bank *> (assistant->priv->core->get ("opal-account-store"));
799
Opal::Account *account = dynamic_cast<Opal::Account *> (account_core->find_account ("sip.diamondcard.us"));
801
bool new_account = (account == NULL);
802
Opal::AccountPtr account = assistant->priv->bank->find_account ("sip.diamondcard.us");
803
bool new_account = !account;
803
805
if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (assistant->priv->skip_ekiga_out))) {
805
opal_bank->new_account (Opal::Account::DiamondCard,
806
gtk_entry_get_text (GTK_ENTRY (assistant->priv->dusername)),
807
gtk_entry_get_text (GTK_ENTRY (assistant->priv->dpassword)));
807
assistant->priv->bank->new_account (Opal::Account::DiamondCard,
808
gtk_entry_get_text (GTK_ENTRY (assistant->priv->dusername)),
809
gtk_entry_get_text (GTK_ENTRY (assistant->priv->dpassword)));
809
811
account->set_authentication_settings (gtk_entry_get_text (GTK_ENTRY (assistant->priv->dusername)),
810
gtk_entry_get_text (GTK_ENTRY (assistant->priv->dpassword)));
812
gtk_entry_get_text (GTK_ENTRY (assistant->priv->dpassword)));
922
924
/* Set the connection quality settings */
923
925
switch (connection_type) {
925
gm_conf_set_bool (VIDEO_CODECS_KEY "enable_video", FALSE);
929
gm_conf_set_bool (VIDEO_CODECS_KEY "enable_video", FALSE);
928
gm_conf_set_int (VIDEO_DEVICES_KEY "size", 0); //QCIF
929
gm_conf_set_int (VIDEO_CODECS_KEY "maximum_video_tx_bitrate", 32);
933
933
gm_conf_set_int (VIDEO_DEVICES_KEY "size", 0); //QCIF
934
934
gm_conf_set_int (VIDEO_CODECS_KEY "maximum_video_tx_bitrate", 64);
935
gm_conf_set_bool (VIDEO_CODECS_KEY "enable_video", TRUE);
939
938
gm_conf_set_int (VIDEO_DEVICES_KEY "size", 3); // 320x240
940
939
gm_conf_set_int (VIDEO_CODECS_KEY "maximum_video_tx_bitrate", 384);
941
gm_conf_set_bool (VIDEO_CODECS_KEY "enable_video", TRUE);
945
943
gm_conf_set_int (VIDEO_DEVICES_KEY "size", 3); // 320x240
946
944
gm_conf_set_int (VIDEO_CODECS_KEY "maximum_video_tx_bitrate", 1024);
947
gm_conf_set_bool (VIDEO_CODECS_KEY "enable_video", TRUE);
1013
1010
"sensitive", 1,
1015
g_object_set (G_OBJECT (renderer),
1016
"ellipsize-set", TRUE,
1017
"ellipsize", PANGO_ELLIPSIZE_END,
1012
g_object_set (G_OBJECT (renderer),
1013
"ellipsize-set", TRUE,
1014
"ellipsize", PANGO_ELLIPSIZE_END,
1018
1015
"width-chars", 45, NULL);
1019
1016
gtk_label_set_mnemonic_widget (GTK_LABEL (label), assistant->priv->audio_player);
1020
1017
gtk_box_pack_start (GTK_BOX (vbox), assistant->priv->audio_player, FALSE, FALSE, 0);
1044
1041
"sensitive", 1,
1046
g_object_set (G_OBJECT (renderer),
1047
"ellipsize-set", TRUE,
1048
"ellipsize", PANGO_ELLIPSIZE_END,
1043
g_object_set (G_OBJECT (renderer),
1044
"ellipsize-set", TRUE,
1045
"ellipsize", PANGO_ELLIPSIZE_END,
1049
1046
"width-chars", 45, NULL);
1050
1047
gtk_label_set_mnemonic_widget (GTK_LABEL (label), assistant->priv->audio_recorder);
1051
1048
gtk_box_pack_start (GTK_BOX (vbox), assistant->priv->audio_recorder, FALSE, FALSE, 0);
1079
1076
ringer = gm_conf_get_string (SOUND_EVENTS_KEY "output_device");
1077
if (ringer == NULL || !ringer[0])
1078
ringer = g_strdup (DEFAULT_AUDIO_DEVICE_NAME);
1080
1080
player = gm_conf_get_string (AUDIO_DEVICES_KEY "output_device");
1081
if (player == NULL || !player[0])
1082
player = g_strdup (DEFAULT_AUDIO_DEVICE_NAME);
1081
1084
recorder = gm_conf_get_string (AUDIO_DEVICES_KEY "input_device");
1085
if (recorder == NULL || !recorder[0])
1086
recorder = g_strdup (DEFAULT_AUDIO_DEVICE_NAME);
1083
1088
/* FIXME: We should use DetectDevices, however DetectDevices
1084
1089
* works only for the currently selected audio and video plugins,
1087
1092
std::vector <std::string> device_list;
1089
get_audiooutput_devices_list (assistant->priv->core, device_list);
1094
get_audiooutput_devices_list (assistant->priv->audiooutput_core, device_list);
1090
1095
array = convert_string_list(device_list);
1091
1096
update_combo_box (GTK_COMBO_BOX (assistant->priv->audio_ringer), array, ringer);
1092
1097
update_combo_box (GTK_COMBO_BOX (assistant->priv->audio_player), array, player);
1093
1098
g_free (array);
1096
get_audioinput_devices_list (assistant->priv->core, device_list);
1101
get_audioinput_devices_list (assistant->priv->audioinput_core, device_list);
1097
1102
array = convert_string_list(device_list);
1098
1103
update_combo_box (GTK_COMBO_BOX (assistant->priv->audio_recorder), array, recorder);
1099
1104
g_free (array);
1108
1113
apply_audio_devices_page (EkigaAssistant *assistant)
1110
GtkComboBox *combo_box;
1113
combo_box = GTK_COMBO_BOX (assistant->priv->audio_ringer);
1114
device = gtk_combo_box_get_active_text (combo_box);
1116
gm_conf_set_string (SOUND_EVENTS_KEY "output_device", device);
1120
combo_box = GTK_COMBO_BOX (assistant->priv->audio_player);
1121
device = gtk_combo_box_get_active_text (combo_box);
1123
gm_conf_set_string (AUDIO_DEVICES_KEY "output_device", device);
1127
combo_box = GTK_COMBO_BOX (assistant->priv->audio_recorder);
1128
device = gtk_combo_box_get_active_text (combo_box);
1130
gm_conf_set_string (AUDIO_DEVICES_KEY "input_device", device);
1118
if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (assistant->priv->audio_ringer), &citer))
1119
g_warn_if_reached ();
1120
gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (assistant->priv->audio_ringer)), &citer, 0, &device, -1);
1121
gm_conf_set_string (SOUND_EVENTS_KEY "output_device", device);
1124
if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (assistant->priv->audio_player), &citer))
1125
g_warn_if_reached ();
1126
gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (assistant->priv->audio_player)), &citer, 0, &device, -1);
1127
gm_conf_set_string (AUDIO_DEVICES_KEY "output_device", device);
1130
if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (assistant->priv->audio_recorder), &citer))
1131
g_warn_if_reached ();
1132
gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (assistant->priv->audio_recorder)), &citer, 0, &device, -1);
1133
gm_conf_set_string (AUDIO_DEVICES_KEY "input_device", device);
1158
1159
"sensitive", 1,
1160
g_object_set (G_OBJECT (renderer),
1161
"ellipsize-set", TRUE,
1162
"ellipsize", PANGO_ELLIPSIZE_END,
1161
g_object_set (G_OBJECT (renderer),
1162
"ellipsize-set", TRUE,
1163
"ellipsize", PANGO_ELLIPSIZE_END,
1163
1164
"width-chars", 45, NULL);
1164
1165
gtk_label_set_mnemonic_widget (GTK_LABEL (label), assistant->priv->video_device);
1165
1166
gtk_box_pack_start (GTK_BOX (vbox), assistant->priv->video_device, FALSE, FALSE, 0);
1185
1186
gchar* current_plugin;
1187
get_videoinput_devices_list (assistant->priv->core, device_list);
1188
get_videoinput_devices_list (assistant->priv->videoinput_core, device_list);
1188
1189
array = convert_string_list (device_list);
1189
1190
current_plugin = gm_conf_get_string (VIDEO_DEVICES_KEY "input_device");
1191
if (current_plugin == NULL || !current_plugin[0]) {
1192
g_free (current_plugin);
1193
current_plugin = g_strdup (get_default_video_device_name (array));
1190
1195
update_combo_box (GTK_COMBO_BOX (assistant->priv->video_device),
1191
1196
array, current_plugin);
1192
1197
g_free (array);
1198
g_free (current_plugin);
1196
1202
apply_video_devices_page (EkigaAssistant *assistant)
1199
GtkComboBox *combo_box;
1200
gchar *video_device;
1202
combo_box = GTK_COMBO_BOX (assistant->priv->video_device);
1203
video_device = gtk_combo_box_get_active_text (combo_box);
1206
gm_conf_set_string (VIDEO_DEVICES_KEY "input_device", video_device);
1207
g_free (video_device);
1207
if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (assistant->priv->video_device), &citer))
1208
g_warn_if_reached ();
1209
gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (assistant->priv->video_device)), &citer, 0, &device, -1);
1210
gm_conf_set_string (VIDEO_DEVICES_KEY "input_device", device);
1212
1215
// FIXME: duplicate to gm_prefs_window_get_video_devices_list
1214
get_audiooutput_devices_list (Ekiga::ServiceCore *core,
1215
std::vector<std::string> & device_list)
1217
get_audiooutput_devices_list (boost::shared_ptr<Ekiga::AudioOutputCore> audiooutput_core,
1218
std::vector<std::string> & device_list)
1217
Ekiga::AudioOutputCore *audiooutput_core = dynamic_cast<Ekiga::AudioOutputCore *> (core->get ("audiooutput-core"));
1218
1220
std::vector <Ekiga::AudioOutputDevice> devices;
1220
1222
device_list.clear();
1221
audiooutput_core->get_devices(devices);
1223
audiooutput_core->get_devices (devices);
1223
1225
for (std::vector<Ekiga::AudioOutputDevice>::iterator iter = devices.begin ();
1224
1226
iter != devices.end ();
1237
get_audioinput_devices_list (Ekiga::ServiceCore *core,
1238
std::vector<std::string> & device_list)
1239
get_audioinput_devices_list (boost::shared_ptr<Ekiga::AudioInputCore> audioinput_core,
1240
std::vector<std::string> & device_list)
1240
Ekiga::AudioInputCore *audioinput_core = dynamic_cast<Ekiga::AudioInputCore *> (core->get ("audioinput-core"));
1241
1242
std::vector <Ekiga::AudioInputDevice> devices;
1243
1244
device_list.clear();
1244
audioinput_core->get_devices(devices);
1245
audioinput_core->get_devices (devices);
1246
1247
for (std::vector<Ekiga::AudioInputDevice>::iterator iter = devices.begin ();
1247
1248
iter != devices.end ();
1260
get_videoinput_devices_list (Ekiga::ServiceCore *core,
1261
std::vector<std::string> & device_list)
1261
get_videoinput_devices_list (boost::shared_ptr<Ekiga::VideoInputCore> videoinput_core,
1262
std::vector<std::string> & device_list)
1263
Ekiga::VideoInputCore *videoinput_core = dynamic_cast<Ekiga::VideoInputCore *> (core->get ("videoinput-core"));
1264
1264
std::vector<Ekiga::VideoInputDevice> devices;
1266
1266
device_list.clear();
1267
videoinput_core->get_devices(devices);
1267
videoinput_core->get_devices (devices);
1269
1269
for (std::vector<Ekiga::VideoInputDevice>::iterator iter = devices.begin ();
1270
1270
iter != devices.end ();
1383
1383
/* The audio ringing device */
1384
1384
gtk_list_store_append (model, &iter);
1385
value = gtk_combo_box_get_active_text (GTK_COMBO_BOX (assistant->priv->audio_ringer));
1385
if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (assistant->priv->audio_ringer), &citer))
1386
g_warn_if_reached ();
1387
gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (assistant->priv->audio_ringer)), &citer, 0, &value, -1);
1386
1388
gtk_list_store_set (model, &iter,
1387
1389
SUMMARY_KEY_COLUMN, _("Audio Ringing Device"),
1388
1390
SUMMARY_VALUE_COLUMN, value,
1392
1394
/* The audio playing device */
1393
1395
gtk_list_store_append (model, &iter);
1394
value = gtk_combo_box_get_active_text (GTK_COMBO_BOX (assistant->priv->audio_player));
1396
if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (assistant->priv->audio_player), &citer))
1397
g_warn_if_reached ();
1398
gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (assistant->priv->audio_player)), &citer, 0, &value, -1);
1395
1399
gtk_list_store_set (model, &iter,
1396
1400
SUMMARY_KEY_COLUMN, _("Audio Output Device"),
1397
1401
SUMMARY_VALUE_COLUMN, value,
1401
1405
/* The audio recording device */
1402
1406
gtk_list_store_append (model, &iter);
1403
value = gtk_combo_box_get_active_text (GTK_COMBO_BOX (assistant->priv->audio_recorder));
1407
if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (assistant->priv->audio_recorder), &citer))
1408
g_warn_if_reached ();
1409
gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (assistant->priv->audio_recorder)), &citer, 0, &value, -1);
1404
1410
gtk_list_store_set (model, &iter,
1405
1411
SUMMARY_KEY_COLUMN, _("Audio Input Device"),
1406
1412
SUMMARY_VALUE_COLUMN, value,
1410
1416
/* The video manager */
1411
1417
gtk_list_store_append (model, &iter);
1412
value = gtk_combo_box_get_active_text (GTK_COMBO_BOX (assistant->priv->video_device));
1418
if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (assistant->priv->video_device), &citer))
1419
g_warn_if_reached ();
1420
gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (assistant->priv->video_device)), &citer, 0, &value, -1);
1413
1421
gtk_list_store_set (model, &iter,
1414
1422
SUMMARY_KEY_COLUMN, _("Video Input Device"),
1415
1423
SUMMARY_VALUE_COLUMN, value,
1540
1551
apply_audio_devices_page (assistant);
1541
1552
apply_video_devices_page (assistant);
1543
main_window = GnomeMeeting::Process ()->GetMainWindow ();
1545
/* Hide the druid and show the main Ekiga window */
1554
/* Hide the assistant and show the main Ekiga window */
1546
1555
gtk_widget_hide (GTK_WIDGET (assistant));
1547
1556
gtk_assistant_set_current_page (gtkassistant, 0);
1548
gtk_widget_show (main_window);
1550
/* Update the version number */
1551
gm_conf_set_int (GENERAL_KEY "version", schema_version);
1557
gtk_widget_show (GnomeMeeting::Process ()->GetMainWindow ());
1556
1562
ekiga_assistant_cancel (GtkAssistant *gtkassistant)
1558
GtkWidget *main_window;
1560
main_window = GnomeMeeting::Process ()->GetMainWindow ();
1564
gtk_assistant_set_current_page (gtkassistant, 0);
1562
1565
gtk_widget_hide (GTK_WIDGET (gtkassistant));
1563
gtk_assistant_set_current_page (gtkassistant, 0);
1564
gtk_widget_show (main_window);
1566
gtk_widget_show (GnomeMeeting::Process ()->GetMainWindow ());
1616
1618
assistant->priv->core = core;
1618
1620
/* FIXME: move this into the caller */
1619
g_signal_connect (assistant, "cancel",
1620
G_CALLBACK (gtk_widget_hide), NULL);
1621
1621
g_signal_connect (assistant, "key-press-event",
1622
1622
G_CALLBACK (ekiga_assistant_key_press_cb), NULL);
1624
sigc::connection conn;
1625
Ekiga::VideoInputCore *videoinput_core = dynamic_cast<Ekiga::VideoInputCore *> (core->get ("videoinput-core"));
1626
Ekiga::AudioInputCore *audioinput_core = dynamic_cast<Ekiga::AudioInputCore *> (core->get ("audioinput-core"));
1627
Ekiga::AudioOutputCore *audiooutput_core = dynamic_cast<Ekiga::AudioOutputCore *> (core->get ("audiooutput-core"));
1629
conn = videoinput_core->device_added.connect (sigc::bind (sigc::ptr_fun (on_videoinput_device_added_cb), assistant));
1630
assistant->priv->connections.push_back (conn);
1631
conn = videoinput_core->device_removed.connect (sigc::bind (sigc::ptr_fun (on_videoinput_device_removed_cb), assistant));
1632
assistant->priv->connections.push_back (conn);
1634
conn = audioinput_core->device_added.connect (sigc::bind (sigc::ptr_fun (on_audioinput_device_added_cb), assistant));
1635
assistant->priv->connections.push_back (conn);
1636
conn = audioinput_core->device_removed.connect (sigc::bind (sigc::ptr_fun (on_audioinput_device_removed_cb), assistant));
1637
assistant->priv->connections.push_back (conn);
1639
conn = audiooutput_core->device_added.connect (sigc::bind (sigc::ptr_fun (on_audiooutput_device_added_cb), assistant));
1640
assistant->priv->connections.push_back (conn);
1641
conn = audiooutput_core->device_removed.connect (sigc::bind (sigc::ptr_fun (on_audiooutput_device_removed_cb), assistant));
1642
assistant->priv->connections.push_back (conn);
1624
boost::signals::connection conn;
1625
assistant->priv->videoinput_core = core->get<Ekiga::VideoInputCore> ("videoinput-core");
1626
assistant->priv->audioinput_core = core->get<Ekiga::AudioInputCore> ("audioinput-core");
1627
assistant->priv->audiooutput_core = core->get<Ekiga::AudioOutputCore> ("audiooutput-core");
1628
assistant->priv->bank = core->get<Opal::Bank> ("opal-account-store");
1630
conn = assistant->priv->videoinput_core->device_added.connect (boost::bind (&on_videoinput_device_added_cb, _1, _2, assistant));
1631
assistant->priv->connections.push_back (conn);
1632
conn = assistant->priv->videoinput_core->device_removed.connect (boost::bind (&on_videoinput_device_removed_cb, _1, _2, assistant));
1633
assistant->priv->connections.push_back (conn);
1635
conn = assistant->priv->audioinput_core->device_added.connect (boost::bind (&on_audioinput_device_added_cb, _1, _2, assistant));
1636
assistant->priv->connections.push_back (conn);
1637
conn =assistant->priv-> audioinput_core->device_removed.connect (boost::bind (&on_audioinput_device_removed_cb, _1, _2, assistant));
1638
assistant->priv->connections.push_back (conn);
1640
conn = assistant->priv->audiooutput_core->device_added.connect (boost::bind (&on_audiooutput_device_added_cb, _1, _2, assistant));
1641
assistant->priv->connections.push_back (conn);
1642
conn = assistant->priv->audiooutput_core->device_removed.connect (boost::bind (&on_audiooutput_device_removed_cb, _1, _2, assistant));
1643
assistant->priv->connections.push_back (conn);
1645
/* Notifiers for the VIDEO_CODECS_KEY keys */
1646
gm_conf_notifier_add (VIDEO_CODECS_KEY "maximum_video_tx_bitrate",
1647
kind_of_net_changed_nt, NULL);
1648
gm_conf_notifier_add (VIDEO_CODECS_KEY "temporal_spatial_tradeoff",
1649
kind_of_net_changed_nt, NULL);
1644
1651
return GTK_WIDGET (assistant);