Code cleanup

This commit is contained in:
Pierre Pronchery 2011-11-02 01:46:02 +00:00
parent 082f046f05
commit 6b592b294a
2 changed files with 83 additions and 79 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Phone 0.0.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-11-02 01:39+0100\n"
"POT-Creation-Date: 2011-11-02 02:39+0100\n"
"PO-Revision-Date: 2010-04-24 02:07+0200\n"
"Last-Translator: Pierre Pronchery <khorben@defora.org>\n"
"Language-Team: DeforaOS development (French) <devel-fr@lists.defora.org>\n"
@ -47,11 +47,11 @@ msgstr "Brouillons"
msgid "Trash"
msgstr "Corbeille"
#: ../src/phone.c:507 ../src/phone.c:2628
#: ../src/phone.c:507 ../src/phone.c:2631
msgid "System preferences"
msgstr "Préférences système"
#: ../src/phone.c:518 ../src/phone.c:2054
#: ../src/phone.c:518 ../src/phone.c:2055
msgid "Plug-ins"
msgstr "Greffons"
@ -142,7 +142,7 @@ msgid "Contacts"
msgstr "Contacts"
#: ../src/phone.c:1680 ../src/phone.c:1799 ../src/phone.c:1835
#: ../src/phone.c:1950 ../src/phone.c:2306
#: ../src/phone.c:1950 ../src/phone.c:2308
msgid "Call"
msgstr "Appeler"
@ -150,7 +150,7 @@ msgstr "Appeler"
msgid "Write"
msgstr "Écrire"
#: ../src/phone.c:1728 ../src/phone.c:2085 ../src/phone.c:2417
#: ../src/phone.c:1728 ../src/phone.c:2086 ../src/phone.c:2419
msgid "Name"
msgstr "Nom"
@ -190,150 +190,150 @@ msgstr "Messages"
msgid "New message"
msgstr "Nouveau message"
#: ../src/phone.c:1961 ../src/phone.c:2312
#: ../src/phone.c:1961 ../src/phone.c:2314
msgid "Reply"
msgstr "Répondre"
#: ../src/phone.c:2073
#: ../src/phone.c:2074
msgid "Enabled"
msgstr "Activé"
#: ../src/phone.c:2300
#: ../src/phone.c:2302
msgid "Read message"
msgstr "Lire le message"
#: ../src/phone.c:2318
#: ../src/phone.c:2320
msgid "Forward"
msgstr "Transmettre"
#: ../src/phone.c:2392
#: ../src/phone.c:2394
msgid "Phone settings"
msgstr "Paramètres du téléphone"
#: ../src/phone.c:2469
#: ../src/phone.c:2471
msgid "missed calls"
msgstr "appels manqués"
#: ../src/phone.c:2469
#: ../src/phone.c:2471
msgid "missed call"
msgstr "appel manqué"
#: ../src/phone.c:2478
#: ../src/phone.c:2480
msgid "new messages"
msgstr "nouveaux messages"
#: ../src/phone.c:2479
#: ../src/phone.c:2481
msgid "new message"
msgstr "nouveau message"
#: ../src/phone.c:2497 ../src/phone.c:3435 ../src/phone.c:3439
#: ../src/phone.c:2499 ../src/phone.c:3439 ../src/phone.c:3443
msgid "Information"
msgstr "Information"
#: ../src/phone.c:2507
#: ../src/phone.c:2509
msgid "Status"
msgstr "État"
#: ../src/phone.c:2531
#: ../src/phone.c:2533
msgid "_View"
msgstr "_Vue"
#: ../src/phone.c:2550
#: ../src/phone.c:2552
msgid "_Read"
msgstr "_Lire"
#: ../src/phone.c:2682
#: ../src/phone.c:2685
msgid "Open file..."
msgstr "Ouvrir fichier..."
#: ../src/phone.c:2854
#: ../src/phone.c:2858
msgid "Write message"
msgstr "Écrire un message"
#: ../src/phone.c:2860
#: ../src/phone.c:2864
msgid "Send"
msgstr "Envoyer"
#: ../src/phone.c:2866
#: ../src/phone.c:2870
msgid "Attach"
msgstr "Joindre"
#: ../src/phone.c:2982
#: ../src/phone.c:2986
msgid "Attach file..."
msgstr "Joindre un fichier..."
#: ../src/phone.c:3054
#: ../src/phone.c:3058
#, c-format
msgid "%d message%s, %d/%d characters"
msgstr "%d message%s, %d/%d caractères"
#: ../src/phone.c:3055
#: ../src/phone.c:3059
msgid "s"
msgstr "s"
#: ../src/phone.c:3119
#: ../src/phone.c:3123
msgid "Sending message..."
msgstr "Envoi du message..."
#: ../src/phone.c:3154
#: ../src/phone.c:3158
msgid "Outgoing"
msgstr "Sortant"
#: ../src/phone.c:3340
#: ../src/phone.c:3344
msgid "Operation in progress..."
msgstr "Opération en cours..."
#: ../src/phone.c:3380 ../src/phone.c:3384
#: ../src/phone.c:3384 ../src/phone.c:3388
msgid "Question"
msgstr "Question"
#: ../src/phone.c:3404 ../src/phone.c:3408
#: ../src/phone.c:3408 ../src/phone.c:3412
msgid "Error"
msgstr "Erreur"
#: ../src/phone.c:3637
#: ../src/phone.c:3641
msgid "Name: "
msgstr "Nom: "
#: ../src/phone.c:3646
#: ../src/phone.c:3650
msgid "Number: "
msgstr "Numéro: "
#: ../src/phone.c:3662
#: ../src/phone.c:3666
msgid "New contact"
msgstr "Nouveau contact"
#: ../src/phone.c:3664
#: ../src/phone.c:3668
msgid "Edit contact: "
msgstr "Modifier contact: "
#: ../src/phone.c:3691
#: ../src/phone.c:3695
msgid "The name cannot be empty"
msgstr "Le nom ne peut être vide"
#: ../src/phone.c:3696
#: ../src/phone.c:3700
msgid "The number cannot be empty"
msgstr "Le numéro ne peut être vide"
#: ../src/phone.c:3830
#: ../src/phone.c:3834
msgid "Message sent"
msgstr "Message envoyé"
#: ../src/phone.c:3856
#: ../src/phone.c:3860
#, c-format
msgid "Wrong %s"
msgstr "Mauvais %s"
#: ../src/phone.c:3865
#: ../src/phone.c:3869
#, c-format
msgid "%s is valid"
msgstr "%s valide"
#: ../src/phone.c:3931
#: ../src/phone.c:3935
msgid "Raw data (not shown)"
msgstr "Données brutes (non affichées)"
#: ../src/phone.c:3967
#: ../src/phone.c:3971
msgid "Message deleted"
msgstr "Message effacé"

View File

@ -2026,13 +2026,14 @@ static void _show_messages_window(Phone * phone)
/* phone_show_plugins */
static void _on_plugins_cancel(gpointer data);
static void _on_plugins_activated(GtkTreeView * view, GtkTreePath * path,
/* callbacks */
static void _plugins_on_cancel(gpointer data);
static void _plugins_on_activated(GtkTreeView * view, GtkTreePath * path,
GtkTreeViewColumn * column, gpointer data);
static gboolean _on_plugins_closex(gpointer data);
static void _on_plugins_enabled_toggle(GtkCellRendererToggle * renderer,
static gboolean _plugins_on_closex(gpointer data);
static void _plugins_on_enabled_toggle(GtkCellRendererToggle * renderer,
char * path, gpointer data);
static void _on_plugins_ok(gpointer data);
static void _plugins_on_ok(gpointer data);
void phone_show_plugins(Phone * phone, gboolean show)
{
@ -2052,8 +2053,8 @@ void phone_show_plugins(Phone * phone, gboolean show)
gtk_window_set_icon_name(GTK_WINDOW(widget), "gnome-settings");
#endif
gtk_window_set_title(GTK_WINDOW(widget), _("Plug-ins"));
g_signal_connect(widget, "delete-event", G_CALLBACK(
_on_plugins_closex), phone);
g_signal_connect_swapped(widget, "delete-event", G_CALLBACK(
_plugins_on_closex), phone);
vbox = gtk_vbox_new(FALSE, 4);
/* view */
widget = gtk_scrolled_window_new(NULL, NULL);
@ -2066,10 +2067,10 @@ void phone_show_plugins(Phone * phone, gboolean show)
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(phone->pl_view),
FALSE);
g_signal_connect(phone->pl_view, "row-activated",
G_CALLBACK(_on_plugins_activated), phone);
G_CALLBACK(_plugins_on_activated), phone);
renderer = gtk_cell_renderer_toggle_new();
g_signal_connect(renderer, "toggled", G_CALLBACK(
_on_plugins_enabled_toggle), phone);
_plugins_on_enabled_toggle), phone);
column = gtk_tree_view_column_new_with_attributes(_("Enabled"),
renderer, "active",
PHONE_PLUGINS_COLUMN_ENABLED, NULL);
@ -2101,15 +2102,15 @@ void phone_show_plugins(Phone * phone, gboolean show)
gtk_box_set_spacing(GTK_BOX(bbox), 4);
widget = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
g_signal_connect_swapped(G_OBJECT(widget), "clicked",
G_CALLBACK(_on_plugins_cancel), phone);
G_CALLBACK(_plugins_on_cancel), phone);
gtk_container_add(GTK_CONTAINER(bbox), widget);
widget = gtk_button_new_from_stock(GTK_STOCK_OK);
g_signal_connect_swapped(G_OBJECT(widget), "clicked",
G_CALLBACK(_on_plugins_ok), phone);
G_CALLBACK(_plugins_on_ok), phone);
gtk_container_add(GTK_CONTAINER(bbox), widget);
gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, TRUE, 0);
gtk_container_add(GTK_CONTAINER(phone->pl_window), vbox);
_on_plugins_cancel(phone);
_plugins_on_cancel(phone);
gtk_widget_show_all(vbox);
}
if(show)
@ -2118,7 +2119,8 @@ void phone_show_plugins(Phone * phone, gboolean show)
gtk_widget_hide(phone->pl_window);
}
static void _on_plugins_cancel(gpointer data)
/* callbacks */
static void _plugins_on_cancel(gpointer data)
{
Phone * phone = data;
DIR * dir;
@ -2178,7 +2180,7 @@ static void _on_plugins_cancel(gpointer data)
closedir(dir);
}
static void _on_plugins_activated(GtkTreeView * view, GtkTreePath * path,
static void _plugins_on_activated(GtkTreeView * view, GtkTreePath * path,
GtkTreeViewColumn * column, gpointer data)
{
Phone * phone = data;
@ -2192,15 +2194,15 @@ static void _on_plugins_activated(GtkTreeView * view, GtkTreePath * path,
!active, -1);
}
static gboolean _on_plugins_closex(gpointer data)
static gboolean _plugins_on_closex(gpointer data)
{
Phone * phone = data;
_on_plugins_cancel(phone);
_plugins_on_cancel(phone);
return TRUE;
}
static void _on_plugins_enabled_toggle(GtkCellRendererToggle * renderer,
static void _plugins_on_enabled_toggle(GtkCellRendererToggle * renderer,
char * path, gpointer data)
{
Phone * phone = data;
@ -2212,7 +2214,7 @@ static void _on_plugins_enabled_toggle(GtkCellRendererToggle * renderer,
!gtk_cell_renderer_toggle_get_active(renderer), -1);
}
static void _on_plugins_ok(gpointer data)
static void _plugins_on_ok(gpointer data)
{
Phone * phone = data;
GtkTreeModel * model = GTK_TREE_MODEL(phone->pl_store);
@ -2250,7 +2252,7 @@ static void _on_plugins_ok(gpointer data)
if(_phone_config_set_type(phone, NULL, NULL, "plugins", value) == 0)
_phone_config_save(phone);
string_delete(value);
_on_plugins_cancel(phone);
_plugins_on_cancel(phone);
}
@ -2298,8 +2300,8 @@ void phone_show_read(Phone * phone, gboolean show, ...)
#endif
gtk_window_set_title(GTK_WINDOW(phone->re_window),
_("Read message"));
g_signal_connect(phone->re_window, "delete-event",
G_CALLBACK(on_phone_closex), phone->re_window);
g_signal_connect(phone->re_window, "delete-event", G_CALLBACK(
on_phone_closex), NULL);
vbox = gtk_vbox_new(FALSE, 0);
/* toolbar */
widget = gtk_toolbar_new();
@ -2390,8 +2392,8 @@ void phone_show_settings(Phone * phone, gboolean show)
#endif
gtk_window_set_title(GTK_WINDOW(phone->se_window),
_("Phone settings"));
g_signal_connect(phone->se_window, "delete-event",
G_CALLBACK(on_phone_closex), phone->se_window);
g_signal_connect(phone->se_window, "delete-event", G_CALLBACK(
on_phone_closex), NULL);
/* view */
widget = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(widget),
@ -2591,9 +2593,10 @@ static void _status_on_response(gpointer data)
/* phone_show_system */
static GtkWidget * _system_widget(Phone * phone, ModemConfig * config,
GtkSizeGroup * group);
static void _on_system_cancel(gpointer data);
static gboolean _on_system_closex(gpointer data);
static void _on_system_ok(gpointer data);
/* callbacks */
static void _system_on_cancel(gpointer data);
static gboolean _system_on_closex(gpointer data);
static void _system_on_ok(gpointer data);
void phone_show_system(Phone * phone, gboolean show)
{
@ -2627,7 +2630,7 @@ void phone_show_system(Phone * phone, gboolean show)
gtk_window_set_title(GTK_WINDOW(phone->sy_window),
_("System preferences"));
g_signal_connect_swapped(G_OBJECT(phone->sy_window), "delete-event",
G_CALLBACK(_on_system_closex), phone);
G_CALLBACK(_system_on_closex), phone);
vbox = gtk_vbox_new(FALSE, 4);
config = modem_get_config(phone->modem);
for(i = 0; config != NULL && config[i].name != NULL; i++)
@ -2642,16 +2645,16 @@ void phone_show_system(Phone * phone, gboolean show)
gtk_box_set_spacing(GTK_BOX(bbox), 4);
widget = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
g_signal_connect_swapped(G_OBJECT(widget), "clicked", G_CALLBACK(
_on_system_cancel), phone);
_system_on_cancel), phone);
gtk_container_add(GTK_CONTAINER(bbox), widget);
widget = gtk_button_new_from_stock(GTK_STOCK_OK);
g_signal_connect_swapped(G_OBJECT(widget), "clicked", G_CALLBACK(
_on_system_ok), phone);
_system_on_ok), phone);
gtk_container_add(GTK_CONTAINER(bbox), widget);
gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, TRUE, 0);
gtk_container_add(GTK_CONTAINER(phone->sy_window), vbox);
gtk_widget_show_all(vbox);
_on_system_cancel(phone);
_system_on_cancel(phone);
gtk_window_present(GTK_WINDOW(phone->sy_window));
}
@ -2703,7 +2706,8 @@ static GtkWidget * _system_widget(Phone * phone, ModemConfig * config,
return ret;
}
static void _on_system_cancel(gpointer data)
/* callbacks */
static void _system_on_cancel(gpointer data)
{
Phone * phone = data;
ModemConfig * config;
@ -2752,15 +2756,15 @@ static void _on_system_cancel(gpointer data)
}
}
static gboolean _on_system_closex(gpointer data)
static gboolean _system_on_closex(gpointer data)
{
Phone * phone = data;
_on_system_cancel(phone);
_system_on_cancel(phone);
return TRUE;
}
static void _on_system_ok(gpointer data)
static void _system_on_ok(gpointer data)
{
Phone * phone = data;
ModemConfig * config;
@ -2852,8 +2856,8 @@ void phone_show_write(Phone * phone, gboolean show, ...)
#endif
gtk_window_set_title(GTK_WINDOW(phone->wr_window),
_("Write message"));
g_signal_connect(phone->wr_window, "delete-event",
G_CALLBACK(on_phone_closex), phone->wr_window);
g_signal_connect(phone->wr_window, "delete-event", G_CALLBACK(
on_phone_closex), NULL);
vbox = gtk_vbox_new(FALSE, 0);
/* toolbar */
widget = gtk_toolbar_new();
@ -3340,8 +3344,8 @@ static GtkWidget * _phone_create_progress(GtkWidget * parent, char const * text)
dialog = gtk_dialog_new_with_buttons(_("Operation in progress..."),
GTK_WINDOW(parent), flags, GTK_STOCK_CLOSE,
GTK_RESPONSE_CLOSE, NULL);
g_signal_connect(dialog, "delete-event", G_CALLBACK(
on_phone_closex), NULL);
g_signal_connect(dialog, "delete-event", G_CALLBACK(on_phone_closex),
NULL);
#if GTK_CHECK_VERSION(2, 14, 0)
vbox = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
#else