<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40675 >
Conflicts in the gtk2 city dialog shortcuts were reported by Susanna Björverud on freeciv-i18n. The attached patch fixes all conflicts I could find within the city dialog and its sub-tabs by re-assigning the mnemonic keys. ----------------------------------------------------------------------- 都市には、衝突がよくある。
client/gui-gtk-2.0/citydlg.c | 8 ++++---- client/gui-gtk-2.0/cma_fe.c | 15 +++++++++------ client/gui-gtk-2.0/wldlg.c | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/client/gui-gtk-2.0/citydlg.c b/client/gui-gtk-2.0/citydlg.c index 986a630..071afc9 100644 --- a/client/gui-gtk-2.0/citydlg.c +++ b/client/gui-gtk-2.0/citydlg.c @@ -842,7 +842,7 @@ static void create_and_append_overview_page(struct city_dialog *pdialog) label = g_object_new(GTK_TYPE_LABEL, "use-underline", TRUE, "mnemonic-widget", view, - "label", _("_Improvements:"), + "label", _("I_mprovements:"), "xalign", 0.0, "yalign", 0.5, NULL); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); @@ -901,7 +901,7 @@ target_drag_data_received(GtkWidget *w, GdkDragContext *context, *****************************************************************/ static void create_and_append_worklist_page(struct city_dialog *pdialog) { - const char *tab_title = _("_Production"); + const char *tab_title = _("P_roduction"); GtkWidget *label = gtk_label_new_with_mnemonic(tab_title); GtkWidget *page, *hbox, *editor, *bar; @@ -952,7 +952,7 @@ static void create_and_append_worklist_page(struct city_dialog *pdialog) static void create_and_append_happiness_page(struct city_dialog *pdialog) { GtkWidget *page, *vbox, *label, *table, *align; - const char *tab_title = _("_Happiness"); + const char *tab_title = _("Happ_iness"); page = gtk_hbox_new(FALSE, 6); gtk_container_set_border_width(GTK_CONTAINER(page), 8); @@ -1119,7 +1119,7 @@ static void create_and_append_settings_page(struct city_dialog *pdialog) vbox2 = gtk_vbox_new(TRUE, 0); gtk_container_add(GTK_CONTAINER(frame), vbox2); - button = gtk_button_new_with_mnemonic(_("_Rename...")); + button = gtk_button_new_with_mnemonic(_("R_ename...")); pdialog->misc.rename_command = button; gtk_container_add(GTK_CONTAINER(vbox2), button); g_signal_connect(button, "clicked", diff --git a/client/gui-gtk-2.0/cma_fe.c b/client/gui-gtk-2.0/cma_fe.c index 14af71a..9b740c4 100644 --- a/client/gui-gtk-2.0/cma_fe.c +++ b/client/gui-gtk-2.0/cma_fe.c @@ -209,7 +209,7 @@ struct cma_dialog *create_cma_dialog(struct city *pcity) struct cma_dialog *pdialog; struct cm_parameter param; GtkWidget *frame, *page, *hbox, *label, *table; - GtkWidget *vbox, *sw, *hscale, *button, *align; + GtkWidget *vbox, *sw, *hscale, *button, *align, *image; GtkListStore *store; GtkCellRenderer *rend; GtkWidget *view; @@ -268,7 +268,7 @@ struct cma_dialog *create_cma_dialog(struct city *pcity) label = g_object_new(GTK_TYPE_LABEL, "use-underline", TRUE, "mnemonic-widget", view, - "label", _("_Presets:"), + "label", _("Prese_ts:"), "xalign", 0.0, "yalign", 0.5, NULL); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); @@ -284,10 +284,13 @@ struct cma_dialog *create_cma_dialog(struct city *pcity) gtk_button_box_set_layout(GTK_BUTTON_BOX(hbox), GTK_BUTTONBOX_EDGE); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); - pdialog->add_preset_command = gtk_button_new_from_stock(GTK_STOCK_NEW); - gtk_container_add(GTK_CONTAINER(hbox), pdialog->add_preset_command); - g_signal_connect(pdialog->add_preset_command, "clicked", - G_CALLBACK(cma_add_preset_callback), pdialog); + button = gtk_button_new_with_mnemonic(_("Ne_w")); + image = gtk_image_new_from_stock(GTK_STOCK_NEW, GTK_ICON_SIZE_BUTTON); + gtk_button_set_image(GTK_BUTTON(button), image); + gtk_container_add(GTK_CONTAINER(hbox), button); + g_signal_connect(button, "clicked", + G_CALLBACK(cma_add_preset_callback), pdialog); + pdialog->add_preset_command = button; pdialog->del_preset_command = gtk_button_new_from_stock(GTK_STOCK_DELETE); gtk_container_add(GTK_CONTAINER(hbox), pdialog->del_preset_command); diff --git a/client/gui-gtk-2.0/wldlg.c b/client/gui-gtk-2.0/wldlg.c index d10ca04..8580ca1 100644 --- a/client/gui-gtk-2.0/wldlg.c +++ b/client/gui-gtk-2.0/wldlg.c @@ -1249,7 +1249,7 @@ GtkWidget *create_worklist(void) ptr->help_cmd = button; gtk_widget_set_sensitive(ptr->help_cmd, FALSE); - button = gtk_button_new_with_mnemonic(_("Chan_ge Production")); + button = gtk_button_new_with_mnemonic(_("Change Prod_uction")); gtk_container_add(GTK_CONTAINER(bbox), button); g_signal_connect(button, "clicked", G_CALLBACK(change_callback), ptr);
_______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev