Commit d4127a5b authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

SFLphone gets international :D

Use of gettext (libintl.h)
For now it should work if you install the sflphone.mo file ( binary which contains the translations )
in your /usr/share/locale/fr/LC_MESSAGES

TODO: put only the .po file in the git repository and compile it at the build time
parent 34c2a314
......@@ -18,6 +18,7 @@
*/
#include <config.h>
#include <actions.h>
#include <mainwindow.h>
#include <accountlist.h>
#include <string.h>
......@@ -76,7 +77,6 @@ change_protocol (account_t * currentAccount)
is_iax_enabled(void)
{
int res = dbus_is_iax2_enabled();
printf("%d\n" , res);
if(res == 1)
return TRUE;
else
......@@ -129,7 +129,7 @@ show_account_window (account_t * a)
curAccountID = "test";
}
dialog = GTK_DIALOG(gtk_dialog_new_with_buttons ("Account settings",
dialog = GTK_DIALOG(gtk_dialog_new_with_buttons (_("Account settings"),
GTK_WINDOW(get_main_window()),
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_OK,
......@@ -154,7 +154,7 @@ show_account_window (account_t * a)
gtk_table_attach ( GTK_TABLE( table ), entryID, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
#endif
entryEnabled = gtk_check_button_new_with_mnemonic("_Enabled");
entryEnabled = gtk_check_button_new_with_mnemonic(_("_Enabled"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(entryEnabled),
strcmp(curAccountEnabled,"TRUE") == 0 ? TRUE: FALSE);
gtk_table_attach ( GTK_TABLE( table ), entryEnabled, 0, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
......@@ -164,7 +164,7 @@ show_account_window (account_t * a)
// strcmp(g_hash_table_lookup(currentAccount->properties, ACCOUNT_REGISTER),"TRUE") == 0 ? TRUE: FALSE);
//gtk_table_attach ( GTK_TABLE( table ), entryRegister, 0, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
label = gtk_label_new_with_mnemonic ("_Alias:");
label = gtk_label_new_with_mnemonic (_("_Alias:"));
gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
entryName = gtk_entry_new();
......@@ -172,7 +172,7 @@ show_account_window (account_t * a)
gtk_entry_set_text(GTK_ENTRY(entryName), g_hash_table_lookup(currentAccount->properties, ACCOUNT_ALIAS));
gtk_table_attach ( GTK_TABLE( table ), entryName, 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
label = gtk_label_new_with_mnemonic ("_Protocol:");
label = gtk_label_new_with_mnemonic (_("_Protocol"));
gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
entryProtocol = gtk_combo_box_new_text();
......@@ -191,7 +191,7 @@ show_account_window (account_t * a)
else
{
/* Should never come here, add debug message. */
gtk_combo_box_append_text(GTK_COMBO_BOX(entryProtocol), "Unknown");
gtk_combo_box_append_text(GTK_COMBO_BOX(entryProtocol), _("Unknown"));
gtk_combo_box_set_active(GTK_COMBO_BOX(entryProtocol),2);
}
gtk_table_attach ( GTK_TABLE( table ), entryProtocol, 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
......@@ -201,7 +201,7 @@ show_account_window (account_t * a)
G_CALLBACK (change_protocol),
currentAccount);
label = gtk_label_new_with_mnemonic ("_Full Name:");
label = gtk_label_new_with_mnemonic (_("_Full Name"));
gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
entryFullName = gtk_entry_new();
......@@ -209,7 +209,7 @@ show_account_window (account_t * a)
gtk_entry_set_text(GTK_ENTRY(entryFullName), curFullName);
gtk_table_attach ( GTK_TABLE( table ), entryFullName, 1, 2, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
label = gtk_label_new_with_mnemonic ("_User part:");
label = gtk_label_new_with_mnemonic (_("_User part"));
gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 6, 7, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
entryUserPart = gtk_entry_new();
......@@ -217,7 +217,7 @@ show_account_window (account_t * a)
gtk_entry_set_text(GTK_ENTRY(entryUserPart), curUserPart);
gtk_table_attach ( GTK_TABLE( table ), entryUserPart, 1, 2, 6, 7, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
label = gtk_label_new_with_mnemonic ("_Host part:");
label = gtk_label_new_with_mnemonic (_("_Host part"));
gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 7, 8, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
entryHostPart = gtk_entry_new();
......@@ -225,7 +225,7 @@ show_account_window (account_t * a)
gtk_entry_set_text(GTK_ENTRY(entryHostPart), curHostPart);
gtk_table_attach ( GTK_TABLE( table ), entryHostPart, 1, 2, 7, 8, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
label = gtk_label_new_with_mnemonic ("U_sername:");
label = gtk_label_new_with_mnemonic (_("U_sername"));
gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 8, 9, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
entryUsername = gtk_entry_new();
......@@ -233,7 +233,7 @@ show_account_window (account_t * a)
gtk_entry_set_text(GTK_ENTRY(entryUsername), curUsername);
gtk_table_attach ( GTK_TABLE( table ), entryUsername, 1, 2, 8, 9, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
label = gtk_label_new_with_mnemonic ("_Password:");
label = gtk_label_new_with_mnemonic (_("_Password"));
gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 9, 10, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
entryPassword = gtk_entry_new();
......
......@@ -222,6 +222,9 @@ sflphone_pick_up()
case CALL_STATE_CURRENT:
sflphone_new_call();
break;
case CALL_STATE_RINGING:
sflphone_new_call();
break;
default:
g_warning("Should not happen in sflphone_pick_up()!");
break;
......
......@@ -21,6 +21,11 @@
#ifndef __ACTIONS_H__
#define __ACTIONS_H__
#define _(STRING) gettext( STRING )
#include <libintl.h>
#include <locale.h>
#include <calllist.h>
#include <accountlist.h>
#include <codeclist.h>
......
......@@ -230,7 +230,7 @@ select_active_output_audio_device()
// Select active output device on server
devices = dbus_get_current_audio_devices_index();
currentDeviceIndex = atoi(devices[0]);
printf("audio device index for output = %d\n", currentDeviceIndex);
printf(_("audio device index for output = %d\n"), currentDeviceIndex);
model = gtk_combo_box_get_model(GTK_COMBO_BOX(outputDeviceComboBox));
// Find the currently set output device
......@@ -796,22 +796,22 @@ create_codec_table()
// Name column
renderer = gtk_cell_renderer_text_new();
treeViewColumn = gtk_tree_view_column_new_with_attributes("Name", renderer, "markup", COLUMN_CODEC_NAME, NULL);
treeViewColumn = gtk_tree_view_column_new_with_attributes(_("Name"), renderer, "markup", COLUMN_CODEC_NAME, NULL);
gtk_tree_view_append_column(GTK_TREE_VIEW(codecTreeView), treeViewColumn);
// Bit rate column
renderer = gtk_cell_renderer_text_new();
treeViewColumn = gtk_tree_view_column_new_with_attributes("Frequency", renderer, "text", COLUMN_CODEC_FREQUENCY, NULL);
treeViewColumn = gtk_tree_view_column_new_with_attributes(_("Frequency"), renderer, "text", COLUMN_CODEC_FREQUENCY, NULL);
gtk_tree_view_append_column(GTK_TREE_VIEW(codecTreeView), treeViewColumn);
// Bandwith column
renderer = gtk_cell_renderer_text_new();
treeViewColumn = gtk_tree_view_column_new_with_attributes("Bitrate", renderer, "text", COLUMN_CODEC_BITRATE, NULL);
treeViewColumn = gtk_tree_view_column_new_with_attributes(_("Bitrate"), renderer, "text", COLUMN_CODEC_BITRATE, NULL);
gtk_tree_view_append_column(GTK_TREE_VIEW(codecTreeView), treeViewColumn);
// Frequency column
renderer = gtk_cell_renderer_text_new();
treeViewColumn = gtk_tree_view_column_new_with_attributes("Bandwidth", renderer, "text", COLUMN_CODEC_BANDWIDTH, NULL);
treeViewColumn = gtk_tree_view_column_new_with_attributes(_("Bandwidth"), renderer, "text", COLUMN_CODEC_BANDWIDTH, NULL);
gtk_tree_view_append_column(GTK_TREE_VIEW(codecTreeView), treeViewColumn);
g_object_unref(G_OBJECT(codecStore));
......@@ -857,7 +857,7 @@ create_accounts_tab()
ret = gtk_vbox_new(FALSE, 10);
gtk_container_set_border_width(GTK_CONTAINER (ret), 10);
label = gtk_label_new("This is the list of accounts previously setup.");
label = gtk_label_new(_("Accounts previously setup."));
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
......@@ -900,7 +900,7 @@ create_accounts_tab()
g_signal_connect( G_OBJECT( treeView ) , "row-activated" , G_CALLBACK( edit_account ) , NULL );
renderer = gtk_cell_renderer_text_new();
treeViewColumn = gtk_tree_view_column_new_with_attributes ("Protocol",
treeViewColumn = gtk_tree_view_column_new_with_attributes (_("Protocol"),
renderer,
"markup", 1,
NULL);
......@@ -908,7 +908,7 @@ create_accounts_tab()
gtk_tree_view_column_set_cell_data_func(treeViewColumn, renderer, bold_if_default_account, NULL,NULL);
renderer = gtk_cell_renderer_text_new();
treeViewColumn = gtk_tree_view_column_new_with_attributes ("Status",
treeViewColumn = gtk_tree_view_column_new_with_attributes (_("Status"),
renderer,
"markup", 2,
NULL);
......@@ -942,7 +942,7 @@ create_accounts_tab()
gtk_box_pack_start(GTK_BOX(buttonBox), deleteButton, FALSE, FALSE, 0);
gtk_widget_show(deleteButton);
defaultButton = gtk_button_new_with_mnemonic("Set as Default");
defaultButton = gtk_button_new_with_mnemonic(_("Set as Default"));
g_signal_connect_swapped(G_OBJECT(defaultButton), "clicked",
G_CALLBACK(default_account), NULL);
gtk_box_pack_start(GTK_BOX(buttonBox), defaultButton, FALSE, FALSE, 0);
......@@ -984,7 +984,7 @@ create_audio_tab ()
// Device section label
deviceLabel = gtk_label_new(NULL);
gtk_label_set_markup(GTK_LABEL(deviceLabel), "<b>Devices</b>");
gtk_label_set_markup(GTK_LABEL(deviceLabel), _("<b>Devices</b>"));
gtk_label_set_line_wrap(GTK_LABEL(deviceLabel), TRUE);
gtk_misc_set_alignment(GTK_MISC(deviceLabel), 0, 0.5);
gtk_label_set_justify(GTK_LABEL(deviceLabel), GTK_JUSTIFY_LEFT);
......@@ -1025,7 +1025,7 @@ create_audio_tab ()
gtk_widget_show(comboBox);
*/
// Create title label
titleLabel = gtk_label_new("Alsa plug-OUT:");
titleLabel = gtk_label_new(_("ALSA plugin"));
gtk_misc_set_alignment(GTK_MISC(titleLabel), 0, 0.5);
gtk_table_attach(GTK_TABLE(deviceTable), titleLabel, 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0);
gtk_widget_show(titleLabel);
......@@ -1046,7 +1046,7 @@ create_audio_tab ()
// Device : Output device
// Create title label
titleLabel = gtk_label_new("Output peripheral:");
titleLabel = gtk_label_new(_("Output peripheral"));
gtk_misc_set_alignment(GTK_MISC(titleLabel), 0, 0.5);
gtk_table_attach(GTK_TABLE(deviceTable), titleLabel, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0);
gtk_widget_show(titleLabel);
......@@ -1067,7 +1067,7 @@ create_audio_tab ()
// Device : Input device
// Create title label
titleLabel = gtk_label_new("Input peripheral:");
titleLabel = gtk_label_new(_("Input peripheral"));
gtk_misc_set_alignment(GTK_MISC(titleLabel), 0, 0.5);
gtk_table_attach(GTK_TABLE(deviceTable), titleLabel, 1, 2, 2, 3, GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0);
gtk_widget_show(titleLabel);
......@@ -1087,7 +1087,7 @@ create_audio_tab ()
gtk_widget_show(inputDeviceComboBox);
// Create detect button
refreshButton = gtk_button_new_with_label("Detect all");
refreshButton = gtk_button_new_with_label(_("Detect all"));
gtk_button_set_image(GTK_BUTTON(refreshButton), gtk_image_new_from_stock(GTK_STOCK_REFRESH, GTK_ICON_SIZE_BUTTON));
gtk_table_attach(GTK_TABLE(deviceTable), refreshButton, 3, 4, 3, 4, GTK_EXPAND, GTK_EXPAND, 0, 0);
// Set event on selection
......@@ -1116,17 +1116,17 @@ create_audio_tab ()
// check button to enable ringtones
GtkWidget* box = gtk_hbox_new( TRUE , 1);
gtk_box_pack_start( GTK_BOX(ret) , box , FALSE , FALSE , 1);
enableTone = gtk_check_button_new_with_mnemonic( "_Enable ringtones");
enableTone = gtk_check_button_new_with_mnemonic( _("_Enable ringtones"));
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(enableTone), dbus_is_ringtone_enabled() );
gtk_box_pack_start( GTK_BOX(box) , enableTone , TRUE , TRUE , 1);
g_signal_connect(G_OBJECT( enableTone) , "clicked" , G_CALLBACK( ringtone_enabled ) , NULL);
// file chooser button
fileChooser = gtk_file_chooser_button_new("Choose a ringtone", GTK_FILE_CHOOSER_ACTION_OPEN);
fileChooser = gtk_file_chooser_button_new(_("Choose a ringtone"), GTK_FILE_CHOOSER_ACTION_OPEN);
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER( fileChooser) , g_get_home_dir());
gtk_file_chooser_set_filename(GTK_FILE_CHOOSER( fileChooser) , get_ringtone_choice());
g_signal_connect( G_OBJECT( fileChooser ) , "selection_changed" , G_CALLBACK( ringtone_changed ) , NULL );
GtkFileFilter *filter = gtk_file_filter_new();
gtk_file_filter_set_name( filter , "Audio Files" );
gtk_file_filter_set_name( filter , _("Audio Files") );
gtk_file_filter_add_pattern(filter , "*.wav" );
gtk_file_filter_add_pattern(filter , "*.ul" );
gtk_file_filter_add_pattern(filter , "*.au" );
......@@ -1151,7 +1151,7 @@ show_config_window ()
dialogOpen = TRUE;
dialog = GTK_DIALOG(gtk_dialog_new_with_buttons ("Preferences",
dialog = GTK_DIALOG(gtk_dialog_new_with_buttons (_("Preferences"),
GTK_WINDOW(get_main_window()),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_CLOSE,
......@@ -1171,12 +1171,12 @@ show_config_window ()
// Accounts tab
tab = create_accounts_tab();
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), tab, gtk_label_new("Accounts"));
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), tab, gtk_label_new(_("Accounts")));
gtk_notebook_page_num(GTK_NOTEBOOK(notebook), tab);
// Audio tab
tab = create_audio_tab();
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), tab, gtk_label_new("Audio Settings"));
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), tab, gtk_label_new(_("Audio Settings")));
gtk_notebook_page_num(GTK_NOTEBOOK(notebook), tab);
gtk_dialog_run(dialog);
......
......@@ -40,6 +40,11 @@ There is NO WARRANTY, to the extent permitted by law.\n\n");
srand ( time(NULL) );
// Internationalization
g_print("%s\n",setlocale( LC_ALL , "" ));
bindtextdomain( "sflphone" , "/usr/share/locale" );
textdomain( "sflphone" );
if(sflphone_init())
{
show_status_icon();
......
......@@ -115,12 +115,12 @@ help_about ( void * foo)
gtk_show_about_dialog( GTK_WINDOW(get_main_window()),
"name", PACKAGE,
"title", "About SFLphone",
"title", _("About SFLphone"),
"version", VERSION,
"website", "http://www.sflphone.org",
"copyright", "Copyright © 2004-2007 Savoir-faire Linux Inc.",
"translator-credits", "",
"comments", "SFLphone is a VoIP client compatible with SIP and IAX protocols.",
"comments", _("SFLphone is a VoIP client compatible with SIP and IAX2 protocols."),
"artists", artists,
"authors", authors,
NULL);
......@@ -146,7 +146,7 @@ create_help_menu()
NULL);
gtk_widget_show (menu_items);
root_menu = gtk_menu_item_new_with_mnemonic ("_Help");
root_menu = gtk_menu_item_new_with_mnemonic (_("_Help"));
gtk_menu_item_set_submenu (GTK_MENU_ITEM (root_menu), menu);
return root_menu;
......@@ -203,7 +203,7 @@ create_call_menu()
menu = gtk_menu_new ();
newCallMenu = gtk_image_menu_item_new_with_mnemonic("_New call...");
newCallMenu = gtk_image_menu_item_new_with_mnemonic(_("_New call"));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), newCallMenu);
g_signal_connect_swapped (G_OBJECT (newCallMenu), "activate",
G_CALLBACK (call_new_call),
......@@ -213,7 +213,7 @@ create_call_menu()
menu_items = gtk_separator_menu_item_new ();
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
pickUpMenu = gtk_image_menu_item_new_with_mnemonic("_Pick up");
pickUpMenu = gtk_image_menu_item_new_with_mnemonic(_("_Pick up"));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), pickUpMenu);
gtk_widget_set_sensitive( GTK_WIDGET(pickUpMenu), FALSE);
g_signal_connect_swapped (G_OBJECT (pickUpMenu), "activate",
......@@ -221,7 +221,7 @@ create_call_menu()
NULL);
gtk_widget_show (pickUpMenu);
hangUpMenu = gtk_image_menu_item_new_with_mnemonic("_Hang up");
hangUpMenu = gtk_image_menu_item_new_with_mnemonic(_("_Hang up"));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), hangUpMenu);
gtk_widget_set_sensitive( GTK_WIDGET(hangUpMenu), FALSE);
g_signal_connect_swapped (G_OBJECT (hangUpMenu), "activate",
......@@ -229,7 +229,7 @@ create_call_menu()
NULL);
gtk_widget_show (hangUpMenu);
holdMenu = gtk_check_menu_item_new_with_mnemonic ("On _Hold");
holdMenu = gtk_check_menu_item_new_with_mnemonic (_("On _Hold"));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), holdMenu);
gtk_widget_set_sensitive( GTK_WIDGET(holdMenu), FALSE);
//Here we connect only to activate
......@@ -250,7 +250,7 @@ create_call_menu()
gtk_widget_show (menu_items);
root_menu = gtk_menu_item_new_with_mnemonic ("_Call");
root_menu = gtk_menu_item_new_with_mnemonic (_("_Call"));
gtk_menu_item_set_submenu (GTK_MENU_ITEM (root_menu), menu);
return root_menu;
......@@ -421,7 +421,7 @@ create_edit_menu()
gtk_widget_show (menu_items);
root_menu = gtk_menu_item_new_with_mnemonic ("_Edit");
root_menu = gtk_menu_item_new_with_mnemonic (_("_Edit"));
gtk_menu_item_set_submenu (GTK_MENU_ITEM (root_menu), menu);
return root_menu;
......@@ -443,14 +443,14 @@ create_view_menu()
menu = gtk_menu_new ();
menu_items = gtk_check_menu_item_new_with_mnemonic ("_Dialpad");
menu_items = gtk_check_menu_item_new_with_mnemonic (_("_Dialpad"));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
g_signal_connect(G_OBJECT (menu_items), "toggled",
G_CALLBACK (view_dial_pad),
NULL);
gtk_widget_show (menu_items);
menu_items = gtk_check_menu_item_new_with_mnemonic ("_Volume controls");
menu_items = gtk_check_menu_item_new_with_mnemonic (_("_Volume controls"));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
gtk_widget_set_sensitive( GTK_WIDGET(menu_items), FALSE);
g_signal_connect(G_OBJECT (menu_items), "toggled",
......@@ -458,7 +458,7 @@ create_view_menu()
NULL);
gtk_widget_show (menu_items);
menu_items = gtk_check_menu_item_new_with_mnemonic ("_Toolbar");
menu_items = gtk_check_menu_item_new_with_mnemonic (_("_Toolbar"));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
gtk_widget_set_sensitive( GTK_WIDGET(menu_items), FALSE);
g_signal_connect(G_OBJECT (menu_items), "toggled",
......@@ -466,7 +466,7 @@ create_view_menu()
NULL);
gtk_widget_show (menu_items);
root_menu = gtk_menu_item_new_with_mnemonic ("_View");
root_menu = gtk_menu_item_new_with_mnemonic (_("_View"));
gtk_menu_item_set_submenu (GTK_MENU_ITEM (root_menu), menu);
return root_menu;
......@@ -579,7 +579,7 @@ show_popup_menu (GtkWidget *my_widget, GdkEventButton *event)
if(pickup)
{
menu_items = gtk_image_menu_item_new_with_mnemonic("_Pick up");
menu_items = gtk_image_menu_item_new_with_mnemonic(_("_Pick up"));
//image = gtk_image_new_from_file( ICONS_DIR "/accept.svg");
//gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_items), image);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
......@@ -591,7 +591,7 @@ show_popup_menu (GtkWidget *my_widget, GdkEventButton *event)
if(hangup)
{
menu_items = gtk_image_menu_item_new_with_mnemonic("_Hang up");
menu_items = gtk_image_menu_item_new_with_mnemonic(_("_Hang up"));
//image = gtk_image_new_from_file( ICONS_DIR "/hang_up.svg");
//gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_items), image);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
......@@ -603,7 +603,7 @@ show_popup_menu (GtkWidget *my_widget, GdkEventButton *event)
if(hold)
{
menu_items = gtk_check_menu_item_new_with_mnemonic ("On _Hold");
menu_items = gtk_check_menu_item_new_with_mnemonic (_("On _Hold"));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_items),
(selectedCall->state == CALL_STATE_HOLD ? TRUE : FALSE));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment