Code cleanup
This commit is contained in:
parent
082f046f05
commit
6b592b294a
82
po/fr.po
82
po/fr.po
@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Phone 0.0.0\n"
|
"Project-Id-Version: Phone 0.0.0\n"
|
||||||
"Report-Msgid-Bugs-To: \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"
|
"PO-Revision-Date: 2010-04-24 02:07+0200\n"
|
||||||
"Last-Translator: Pierre Pronchery <khorben@defora.org>\n"
|
"Last-Translator: Pierre Pronchery <khorben@defora.org>\n"
|
||||||
"Language-Team: DeforaOS development (French) <devel-fr@lists.defora.org>\n"
|
"Language-Team: DeforaOS development (French) <devel-fr@lists.defora.org>\n"
|
||||||
@ -47,11 +47,11 @@ msgstr "Brouillons"
|
|||||||
msgid "Trash"
|
msgid "Trash"
|
||||||
msgstr "Corbeille"
|
msgstr "Corbeille"
|
||||||
|
|
||||||
#: ../src/phone.c:507 ../src/phone.c:2628
|
#: ../src/phone.c:507 ../src/phone.c:2631
|
||||||
msgid "System preferences"
|
msgid "System preferences"
|
||||||
msgstr "Préférences système"
|
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"
|
msgid "Plug-ins"
|
||||||
msgstr "Greffons"
|
msgstr "Greffons"
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ msgid "Contacts"
|
|||||||
msgstr "Contacts"
|
msgstr "Contacts"
|
||||||
|
|
||||||
#: ../src/phone.c:1680 ../src/phone.c:1799 ../src/phone.c:1835
|
#: ../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"
|
msgid "Call"
|
||||||
msgstr "Appeler"
|
msgstr "Appeler"
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ msgstr "Appeler"
|
|||||||
msgid "Write"
|
msgid "Write"
|
||||||
msgstr "Écrire"
|
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"
|
msgid "Name"
|
||||||
msgstr "Nom"
|
msgstr "Nom"
|
||||||
|
|
||||||
@ -190,150 +190,150 @@ msgstr "Messages"
|
|||||||
msgid "New message"
|
msgid "New message"
|
||||||
msgstr "Nouveau message"
|
msgstr "Nouveau message"
|
||||||
|
|
||||||
#: ../src/phone.c:1961 ../src/phone.c:2312
|
#: ../src/phone.c:1961 ../src/phone.c:2314
|
||||||
msgid "Reply"
|
msgid "Reply"
|
||||||
msgstr "Répondre"
|
msgstr "Répondre"
|
||||||
|
|
||||||
#: ../src/phone.c:2073
|
#: ../src/phone.c:2074
|
||||||
msgid "Enabled"
|
msgid "Enabled"
|
||||||
msgstr "Activé"
|
msgstr "Activé"
|
||||||
|
|
||||||
#: ../src/phone.c:2300
|
#: ../src/phone.c:2302
|
||||||
msgid "Read message"
|
msgid "Read message"
|
||||||
msgstr "Lire le message"
|
msgstr "Lire le message"
|
||||||
|
|
||||||
#: ../src/phone.c:2318
|
#: ../src/phone.c:2320
|
||||||
msgid "Forward"
|
msgid "Forward"
|
||||||
msgstr "Transmettre"
|
msgstr "Transmettre"
|
||||||
|
|
||||||
#: ../src/phone.c:2392
|
#: ../src/phone.c:2394
|
||||||
msgid "Phone settings"
|
msgid "Phone settings"
|
||||||
msgstr "Paramètres du téléphone"
|
msgstr "Paramètres du téléphone"
|
||||||
|
|
||||||
#: ../src/phone.c:2469
|
#: ../src/phone.c:2471
|
||||||
msgid "missed calls"
|
msgid "missed calls"
|
||||||
msgstr "appels manqués"
|
msgstr "appels manqués"
|
||||||
|
|
||||||
#: ../src/phone.c:2469
|
#: ../src/phone.c:2471
|
||||||
msgid "missed call"
|
msgid "missed call"
|
||||||
msgstr "appel manqué"
|
msgstr "appel manqué"
|
||||||
|
|
||||||
#: ../src/phone.c:2478
|
#: ../src/phone.c:2480
|
||||||
msgid "new messages"
|
msgid "new messages"
|
||||||
msgstr "nouveaux messages"
|
msgstr "nouveaux messages"
|
||||||
|
|
||||||
#: ../src/phone.c:2479
|
#: ../src/phone.c:2481
|
||||||
msgid "new message"
|
msgid "new message"
|
||||||
msgstr "nouveau 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"
|
msgid "Information"
|
||||||
msgstr "Information"
|
msgstr "Information"
|
||||||
|
|
||||||
#: ../src/phone.c:2507
|
#: ../src/phone.c:2509
|
||||||
msgid "Status"
|
msgid "Status"
|
||||||
msgstr "État"
|
msgstr "État"
|
||||||
|
|
||||||
#: ../src/phone.c:2531
|
#: ../src/phone.c:2533
|
||||||
msgid "_View"
|
msgid "_View"
|
||||||
msgstr "_Vue"
|
msgstr "_Vue"
|
||||||
|
|
||||||
#: ../src/phone.c:2550
|
#: ../src/phone.c:2552
|
||||||
msgid "_Read"
|
msgid "_Read"
|
||||||
msgstr "_Lire"
|
msgstr "_Lire"
|
||||||
|
|
||||||
#: ../src/phone.c:2682
|
#: ../src/phone.c:2685
|
||||||
msgid "Open file..."
|
msgid "Open file..."
|
||||||
msgstr "Ouvrir fichier..."
|
msgstr "Ouvrir fichier..."
|
||||||
|
|
||||||
#: ../src/phone.c:2854
|
#: ../src/phone.c:2858
|
||||||
msgid "Write message"
|
msgid "Write message"
|
||||||
msgstr "Écrire un message"
|
msgstr "Écrire un message"
|
||||||
|
|
||||||
#: ../src/phone.c:2860
|
#: ../src/phone.c:2864
|
||||||
msgid "Send"
|
msgid "Send"
|
||||||
msgstr "Envoyer"
|
msgstr "Envoyer"
|
||||||
|
|
||||||
#: ../src/phone.c:2866
|
#: ../src/phone.c:2870
|
||||||
msgid "Attach"
|
msgid "Attach"
|
||||||
msgstr "Joindre"
|
msgstr "Joindre"
|
||||||
|
|
||||||
#: ../src/phone.c:2982
|
#: ../src/phone.c:2986
|
||||||
msgid "Attach file..."
|
msgid "Attach file..."
|
||||||
msgstr "Joindre un fichier..."
|
msgstr "Joindre un fichier..."
|
||||||
|
|
||||||
#: ../src/phone.c:3054
|
#: ../src/phone.c:3058
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%d message%s, %d/%d characters"
|
msgid "%d message%s, %d/%d characters"
|
||||||
msgstr "%d message%s, %d/%d caractères"
|
msgstr "%d message%s, %d/%d caractères"
|
||||||
|
|
||||||
#: ../src/phone.c:3055
|
#: ../src/phone.c:3059
|
||||||
msgid "s"
|
msgid "s"
|
||||||
msgstr "s"
|
msgstr "s"
|
||||||
|
|
||||||
#: ../src/phone.c:3119
|
#: ../src/phone.c:3123
|
||||||
msgid "Sending message..."
|
msgid "Sending message..."
|
||||||
msgstr "Envoi du message..."
|
msgstr "Envoi du message..."
|
||||||
|
|
||||||
#: ../src/phone.c:3154
|
#: ../src/phone.c:3158
|
||||||
msgid "Outgoing"
|
msgid "Outgoing"
|
||||||
msgstr "Sortant"
|
msgstr "Sortant"
|
||||||
|
|
||||||
#: ../src/phone.c:3340
|
#: ../src/phone.c:3344
|
||||||
msgid "Operation in progress..."
|
msgid "Operation in progress..."
|
||||||
msgstr "Opération en cours..."
|
msgstr "Opération en cours..."
|
||||||
|
|
||||||
#: ../src/phone.c:3380 ../src/phone.c:3384
|
#: ../src/phone.c:3384 ../src/phone.c:3388
|
||||||
msgid "Question"
|
msgid "Question"
|
||||||
msgstr "Question"
|
msgstr "Question"
|
||||||
|
|
||||||
#: ../src/phone.c:3404 ../src/phone.c:3408
|
#: ../src/phone.c:3408 ../src/phone.c:3412
|
||||||
msgid "Error"
|
msgid "Error"
|
||||||
msgstr "Erreur"
|
msgstr "Erreur"
|
||||||
|
|
||||||
#: ../src/phone.c:3637
|
#: ../src/phone.c:3641
|
||||||
msgid "Name: "
|
msgid "Name: "
|
||||||
msgstr "Nom: "
|
msgstr "Nom: "
|
||||||
|
|
||||||
#: ../src/phone.c:3646
|
#: ../src/phone.c:3650
|
||||||
msgid "Number: "
|
msgid "Number: "
|
||||||
msgstr "Numéro: "
|
msgstr "Numéro: "
|
||||||
|
|
||||||
#: ../src/phone.c:3662
|
#: ../src/phone.c:3666
|
||||||
msgid "New contact"
|
msgid "New contact"
|
||||||
msgstr "Nouveau contact"
|
msgstr "Nouveau contact"
|
||||||
|
|
||||||
#: ../src/phone.c:3664
|
#: ../src/phone.c:3668
|
||||||
msgid "Edit contact: "
|
msgid "Edit contact: "
|
||||||
msgstr "Modifier contact: "
|
msgstr "Modifier contact: "
|
||||||
|
|
||||||
#: ../src/phone.c:3691
|
#: ../src/phone.c:3695
|
||||||
msgid "The name cannot be empty"
|
msgid "The name cannot be empty"
|
||||||
msgstr "Le nom ne peut être vide"
|
msgstr "Le nom ne peut être vide"
|
||||||
|
|
||||||
#: ../src/phone.c:3696
|
#: ../src/phone.c:3700
|
||||||
msgid "The number cannot be empty"
|
msgid "The number cannot be empty"
|
||||||
msgstr "Le numéro ne peut être vide"
|
msgstr "Le numéro ne peut être vide"
|
||||||
|
|
||||||
#: ../src/phone.c:3830
|
#: ../src/phone.c:3834
|
||||||
msgid "Message sent"
|
msgid "Message sent"
|
||||||
msgstr "Message envoyé"
|
msgstr "Message envoyé"
|
||||||
|
|
||||||
#: ../src/phone.c:3856
|
#: ../src/phone.c:3860
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Wrong %s"
|
msgid "Wrong %s"
|
||||||
msgstr "Mauvais %s"
|
msgstr "Mauvais %s"
|
||||||
|
|
||||||
#: ../src/phone.c:3865
|
#: ../src/phone.c:3869
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s is valid"
|
msgid "%s is valid"
|
||||||
msgstr "%s valide"
|
msgstr "%s valide"
|
||||||
|
|
||||||
#: ../src/phone.c:3931
|
#: ../src/phone.c:3935
|
||||||
msgid "Raw data (not shown)"
|
msgid "Raw data (not shown)"
|
||||||
msgstr "Données brutes (non affichées)"
|
msgstr "Données brutes (non affichées)"
|
||||||
|
|
||||||
#: ../src/phone.c:3967
|
#: ../src/phone.c:3971
|
||||||
msgid "Message deleted"
|
msgid "Message deleted"
|
||||||
msgstr "Message effacé"
|
msgstr "Message effacé"
|
||||||
|
|
||||||
|
80
src/phone.c
80
src/phone.c
@ -2026,13 +2026,14 @@ static void _show_messages_window(Phone * phone)
|
|||||||
|
|
||||||
|
|
||||||
/* phone_show_plugins */
|
/* phone_show_plugins */
|
||||||
static void _on_plugins_cancel(gpointer data);
|
/* callbacks */
|
||||||
static void _on_plugins_activated(GtkTreeView * view, GtkTreePath * path,
|
static void _plugins_on_cancel(gpointer data);
|
||||||
|
static void _plugins_on_activated(GtkTreeView * view, GtkTreePath * path,
|
||||||
GtkTreeViewColumn * column, gpointer data);
|
GtkTreeViewColumn * column, gpointer data);
|
||||||
static gboolean _on_plugins_closex(gpointer data);
|
static gboolean _plugins_on_closex(gpointer data);
|
||||||
static void _on_plugins_enabled_toggle(GtkCellRendererToggle * renderer,
|
static void _plugins_on_enabled_toggle(GtkCellRendererToggle * renderer,
|
||||||
char * path, gpointer data);
|
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)
|
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");
|
gtk_window_set_icon_name(GTK_WINDOW(widget), "gnome-settings");
|
||||||
#endif
|
#endif
|
||||||
gtk_window_set_title(GTK_WINDOW(widget), _("Plug-ins"));
|
gtk_window_set_title(GTK_WINDOW(widget), _("Plug-ins"));
|
||||||
g_signal_connect(widget, "delete-event", G_CALLBACK(
|
g_signal_connect_swapped(widget, "delete-event", G_CALLBACK(
|
||||||
_on_plugins_closex), phone);
|
_plugins_on_closex), phone);
|
||||||
vbox = gtk_vbox_new(FALSE, 4);
|
vbox = gtk_vbox_new(FALSE, 4);
|
||||||
/* view */
|
/* view */
|
||||||
widget = gtk_scrolled_window_new(NULL, NULL);
|
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),
|
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(phone->pl_view),
|
||||||
FALSE);
|
FALSE);
|
||||||
g_signal_connect(phone->pl_view, "row-activated",
|
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();
|
renderer = gtk_cell_renderer_toggle_new();
|
||||||
g_signal_connect(renderer, "toggled", G_CALLBACK(
|
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"),
|
column = gtk_tree_view_column_new_with_attributes(_("Enabled"),
|
||||||
renderer, "active",
|
renderer, "active",
|
||||||
PHONE_PLUGINS_COLUMN_ENABLED, NULL);
|
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);
|
gtk_box_set_spacing(GTK_BOX(bbox), 4);
|
||||||
widget = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
|
widget = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
|
||||||
g_signal_connect_swapped(G_OBJECT(widget), "clicked",
|
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);
|
gtk_container_add(GTK_CONTAINER(bbox), widget);
|
||||||
widget = gtk_button_new_from_stock(GTK_STOCK_OK);
|
widget = gtk_button_new_from_stock(GTK_STOCK_OK);
|
||||||
g_signal_connect_swapped(G_OBJECT(widget), "clicked",
|
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_container_add(GTK_CONTAINER(bbox), widget);
|
||||||
gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, TRUE, 0);
|
gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, TRUE, 0);
|
||||||
gtk_container_add(GTK_CONTAINER(phone->pl_window), vbox);
|
gtk_container_add(GTK_CONTAINER(phone->pl_window), vbox);
|
||||||
_on_plugins_cancel(phone);
|
_plugins_on_cancel(phone);
|
||||||
gtk_widget_show_all(vbox);
|
gtk_widget_show_all(vbox);
|
||||||
}
|
}
|
||||||
if(show)
|
if(show)
|
||||||
@ -2118,7 +2119,8 @@ void phone_show_plugins(Phone * phone, gboolean show)
|
|||||||
gtk_widget_hide(phone->pl_window);
|
gtk_widget_hide(phone->pl_window);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _on_plugins_cancel(gpointer data)
|
/* callbacks */
|
||||||
|
static void _plugins_on_cancel(gpointer data)
|
||||||
{
|
{
|
||||||
Phone * phone = data;
|
Phone * phone = data;
|
||||||
DIR * dir;
|
DIR * dir;
|
||||||
@ -2178,7 +2180,7 @@ static void _on_plugins_cancel(gpointer data)
|
|||||||
closedir(dir);
|
closedir(dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _on_plugins_activated(GtkTreeView * view, GtkTreePath * path,
|
static void _plugins_on_activated(GtkTreeView * view, GtkTreePath * path,
|
||||||
GtkTreeViewColumn * column, gpointer data)
|
GtkTreeViewColumn * column, gpointer data)
|
||||||
{
|
{
|
||||||
Phone * phone = data;
|
Phone * phone = data;
|
||||||
@ -2192,15 +2194,15 @@ static void _on_plugins_activated(GtkTreeView * view, GtkTreePath * path,
|
|||||||
!active, -1);
|
!active, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean _on_plugins_closex(gpointer data)
|
static gboolean _plugins_on_closex(gpointer data)
|
||||||
{
|
{
|
||||||
Phone * phone = data;
|
Phone * phone = data;
|
||||||
|
|
||||||
_on_plugins_cancel(phone);
|
_plugins_on_cancel(phone);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _on_plugins_enabled_toggle(GtkCellRendererToggle * renderer,
|
static void _plugins_on_enabled_toggle(GtkCellRendererToggle * renderer,
|
||||||
char * path, gpointer data)
|
char * path, gpointer data)
|
||||||
{
|
{
|
||||||
Phone * phone = data;
|
Phone * phone = data;
|
||||||
@ -2212,7 +2214,7 @@ static void _on_plugins_enabled_toggle(GtkCellRendererToggle * renderer,
|
|||||||
!gtk_cell_renderer_toggle_get_active(renderer), -1);
|
!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;
|
Phone * phone = data;
|
||||||
GtkTreeModel * model = GTK_TREE_MODEL(phone->pl_store);
|
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)
|
if(_phone_config_set_type(phone, NULL, NULL, "plugins", value) == 0)
|
||||||
_phone_config_save(phone);
|
_phone_config_save(phone);
|
||||||
string_delete(value);
|
string_delete(value);
|
||||||
_on_plugins_cancel(phone);
|
_plugins_on_cancel(phone);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2298,8 +2300,8 @@ void phone_show_read(Phone * phone, gboolean show, ...)
|
|||||||
#endif
|
#endif
|
||||||
gtk_window_set_title(GTK_WINDOW(phone->re_window),
|
gtk_window_set_title(GTK_WINDOW(phone->re_window),
|
||||||
_("Read message"));
|
_("Read message"));
|
||||||
g_signal_connect(phone->re_window, "delete-event",
|
g_signal_connect(phone->re_window, "delete-event", G_CALLBACK(
|
||||||
G_CALLBACK(on_phone_closex), phone->re_window);
|
on_phone_closex), NULL);
|
||||||
vbox = gtk_vbox_new(FALSE, 0);
|
vbox = gtk_vbox_new(FALSE, 0);
|
||||||
/* toolbar */
|
/* toolbar */
|
||||||
widget = gtk_toolbar_new();
|
widget = gtk_toolbar_new();
|
||||||
@ -2390,8 +2392,8 @@ void phone_show_settings(Phone * phone, gboolean show)
|
|||||||
#endif
|
#endif
|
||||||
gtk_window_set_title(GTK_WINDOW(phone->se_window),
|
gtk_window_set_title(GTK_WINDOW(phone->se_window),
|
||||||
_("Phone settings"));
|
_("Phone settings"));
|
||||||
g_signal_connect(phone->se_window, "delete-event",
|
g_signal_connect(phone->se_window, "delete-event", G_CALLBACK(
|
||||||
G_CALLBACK(on_phone_closex), phone->se_window);
|
on_phone_closex), NULL);
|
||||||
/* view */
|
/* view */
|
||||||
widget = gtk_scrolled_window_new(NULL, NULL);
|
widget = gtk_scrolled_window_new(NULL, NULL);
|
||||||
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(widget),
|
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(widget),
|
||||||
@ -2591,9 +2593,10 @@ static void _status_on_response(gpointer data)
|
|||||||
/* phone_show_system */
|
/* phone_show_system */
|
||||||
static GtkWidget * _system_widget(Phone * phone, ModemConfig * config,
|
static GtkWidget * _system_widget(Phone * phone, ModemConfig * config,
|
||||||
GtkSizeGroup * group);
|
GtkSizeGroup * group);
|
||||||
static void _on_system_cancel(gpointer data);
|
/* callbacks */
|
||||||
static gboolean _on_system_closex(gpointer data);
|
static void _system_on_cancel(gpointer data);
|
||||||
static void _on_system_ok(gpointer data);
|
static gboolean _system_on_closex(gpointer data);
|
||||||
|
static void _system_on_ok(gpointer data);
|
||||||
|
|
||||||
void phone_show_system(Phone * phone, gboolean show)
|
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),
|
gtk_window_set_title(GTK_WINDOW(phone->sy_window),
|
||||||
_("System preferences"));
|
_("System preferences"));
|
||||||
g_signal_connect_swapped(G_OBJECT(phone->sy_window), "delete-event",
|
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);
|
vbox = gtk_vbox_new(FALSE, 4);
|
||||||
config = modem_get_config(phone->modem);
|
config = modem_get_config(phone->modem);
|
||||||
for(i = 0; config != NULL && config[i].name != NULL; i++)
|
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);
|
gtk_box_set_spacing(GTK_BOX(bbox), 4);
|
||||||
widget = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
|
widget = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
|
||||||
g_signal_connect_swapped(G_OBJECT(widget), "clicked", G_CALLBACK(
|
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);
|
gtk_container_add(GTK_CONTAINER(bbox), widget);
|
||||||
widget = gtk_button_new_from_stock(GTK_STOCK_OK);
|
widget = gtk_button_new_from_stock(GTK_STOCK_OK);
|
||||||
g_signal_connect_swapped(G_OBJECT(widget), "clicked", G_CALLBACK(
|
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_container_add(GTK_CONTAINER(bbox), widget);
|
||||||
gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, TRUE, 0);
|
gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, TRUE, 0);
|
||||||
gtk_container_add(GTK_CONTAINER(phone->sy_window), vbox);
|
gtk_container_add(GTK_CONTAINER(phone->sy_window), vbox);
|
||||||
gtk_widget_show_all(vbox);
|
gtk_widget_show_all(vbox);
|
||||||
_on_system_cancel(phone);
|
_system_on_cancel(phone);
|
||||||
gtk_window_present(GTK_WINDOW(phone->sy_window));
|
gtk_window_present(GTK_WINDOW(phone->sy_window));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2703,7 +2706,8 @@ static GtkWidget * _system_widget(Phone * phone, ModemConfig * config,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _on_system_cancel(gpointer data)
|
/* callbacks */
|
||||||
|
static void _system_on_cancel(gpointer data)
|
||||||
{
|
{
|
||||||
Phone * phone = data;
|
Phone * phone = data;
|
||||||
ModemConfig * config;
|
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;
|
Phone * phone = data;
|
||||||
|
|
||||||
_on_system_cancel(phone);
|
_system_on_cancel(phone);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _on_system_ok(gpointer data)
|
static void _system_on_ok(gpointer data)
|
||||||
{
|
{
|
||||||
Phone * phone = data;
|
Phone * phone = data;
|
||||||
ModemConfig * config;
|
ModemConfig * config;
|
||||||
@ -2852,8 +2856,8 @@ void phone_show_write(Phone * phone, gboolean show, ...)
|
|||||||
#endif
|
#endif
|
||||||
gtk_window_set_title(GTK_WINDOW(phone->wr_window),
|
gtk_window_set_title(GTK_WINDOW(phone->wr_window),
|
||||||
_("Write message"));
|
_("Write message"));
|
||||||
g_signal_connect(phone->wr_window, "delete-event",
|
g_signal_connect(phone->wr_window, "delete-event", G_CALLBACK(
|
||||||
G_CALLBACK(on_phone_closex), phone->wr_window);
|
on_phone_closex), NULL);
|
||||||
vbox = gtk_vbox_new(FALSE, 0);
|
vbox = gtk_vbox_new(FALSE, 0);
|
||||||
/* toolbar */
|
/* toolbar */
|
||||||
widget = gtk_toolbar_new();
|
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..."),
|
dialog = gtk_dialog_new_with_buttons(_("Operation in progress..."),
|
||||||
GTK_WINDOW(parent), flags, GTK_STOCK_CLOSE,
|
GTK_WINDOW(parent), flags, GTK_STOCK_CLOSE,
|
||||||
GTK_RESPONSE_CLOSE, NULL);
|
GTK_RESPONSE_CLOSE, NULL);
|
||||||
g_signal_connect(dialog, "delete-event", G_CALLBACK(
|
g_signal_connect(dialog, "delete-event", G_CALLBACK(on_phone_closex),
|
||||||
on_phone_closex), NULL);
|
NULL);
|
||||||
#if GTK_CHECK_VERSION(2, 14, 0)
|
#if GTK_CHECK_VERSION(2, 14, 0)
|
||||||
vbox = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
|
vbox = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user