Adjust use of ellipsis (...) in menus according to Gnome HIG (#2035)

* Adjust use of ellipses (...) in menus according to Gnome HIG

https://developer.gnome.org/hig/stable/writing-style.html.en
This commit is contained in:
torhus 2017-08-18 21:59:31 +02:00 committed by TingPing
parent c6f3fbd15c
commit da0635c960
3 changed files with 34 additions and 32 deletions

View File

@ -883,9 +883,9 @@ xchat_init (void)
"NAME ENDSUB\n" "CMD \n\n", "NAME ENDSUB\n" "CMD \n\n",
_("_Open Dialog Window"), "gtk-go-up", _("_Open Dialog Window"), "gtk-go-up",
_("_Send a File"), "gtk-floppy", _("_Send a File" ELLIPSIS), "gtk-floppy",
_("_User Info (WhoIs)"), "gtk-info", _("_User Info (WhoIs)"), "gtk-info",
_("_Add to Friends List"), "gtk-add", _("_Add to Friends List" ELLIPSIS), "gtk-add",
_("_Ignore"), "gtk-stop", _("_Ignore"), "gtk-stop",
_("O_perator Actions"), _("O_perator Actions"),

View File

@ -35,6 +35,8 @@
#define rfc_tolower(c) (rfc_tolowertab[(unsigned char)(c)]) #define rfc_tolower(c) (rfc_tolowertab[(unsigned char)(c)])
#define ELLIPSIS "\xe2\x80\xa6"
extern const unsigned char rfc_tolowertab[]; extern const unsigned char rfc_tolowertab[];
char *expand_homedir (char *file); char *expand_homedir (char *file);

View File

@ -1143,7 +1143,7 @@ usermenu_create (GtkWidget *menu)
{ {
menu_create (menu, usermenu_list, "", FALSE); menu_create (menu, usermenu_list, "", FALSE);
menu_quick_item (0, 0, menu, XCMENU_SHADED, 0, 0); /* sep */ menu_quick_item (0, 0, menu, XCMENU_SHADED, 0, 0); /* sep */
menu_quick_item_with_callback (menu_usermenu, _("Edit This Menu..."), menu, 0); menu_quick_item_with_callback (menu_usermenu, _("Edit This Menu" ELLIPSIS), menu, 0);
} }
static void static void
@ -1392,7 +1392,7 @@ menu_join (GtkWidget * wid, gpointer none)
dialog = gtk_dialog_new_with_buttons (_("Join Channel"), dialog = gtk_dialog_new_with_buttons (_("Join Channel"),
GTK_WINDOW (parent_window), 0, GTK_WINDOW (parent_window), 0,
_("Retrieve channel list..."), GTK_RESPONSE_HELP, _("Retrieve channel list"), GTK_RESPONSE_HELP,
GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
NULL); NULL);
@ -1745,18 +1745,18 @@ menu_about (GtkWidget *wid, gpointer sess)
static struct mymenu mymenu[] = { static struct mymenu mymenu[] = {
{N_("He_xChat"), 0, 0, M_NEWMENU, MENU_ID_HEXCHAT, 0, 1}, {N_("He_xChat"), 0, 0, M_NEWMENU, MENU_ID_HEXCHAT, 0, 1},
{N_("Network Li_st..."), menu_open_server_list, (char *)&pix_book, M_MENUPIX, 0, 0, 1, GDK_KEY_s}, {N_("Network Li_st"), menu_open_server_list, (char *)&pix_book, M_MENUPIX, 0, 0, 1, GDK_KEY_s},
{0, 0, 0, M_SEP, 0, 0, 0}, {0, 0, 0, M_SEP, 0, 0, 0},
{N_("_New"), 0, GTK_STOCK_NEW, M_MENUSUB, 0, 0, 1}, {N_("_New"), 0, GTK_STOCK_NEW, M_MENUSUB, 0, 0, 1},
{N_("Server Tab..."), menu_newserver_tab, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_t}, {N_("Server Tab"), menu_newserver_tab, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_t},
{N_("Channel Tab..."), menu_newchannel_tab, 0, M_MENUITEM, 0, 0, 1}, {N_("Channel Tab"), menu_newchannel_tab, 0, M_MENUITEM, 0, 0, 1},
{N_("Server Window..."), menu_newserver_window, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_n}, {N_("Server Window"), menu_newserver_window, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_n},
{N_("Channel Window..."), menu_newchannel_window, 0, M_MENUITEM, 0, 0, 1}, {N_("Channel Window"), menu_newchannel_window, 0, M_MENUITEM, 0, 0, 1},
{0, 0, 0, M_END, 0, 0, 0}, {0, 0, 0, M_END, 0, 0, 0},
{0, 0, 0, M_SEP, 0, 0, 0}, {0, 0, 0, M_SEP, 0, 0, 0},
{N_("_Load Plugin or Script..."), menu_loadplugin, GTK_STOCK_REVERT_TO_SAVED, M_MENUSTOCK, 0, 0, 1}, {N_("_Load Plugin or Script" ELLIPSIS), menu_loadplugin, GTK_STOCK_REVERT_TO_SAVED, M_MENUSTOCK, 0, 0, 1},
{0, 0, 0, M_SEP, 0, 0, 0}, /* 11 */ {0, 0, 0, M_SEP, 0, 0, 0}, /* 11 */
#define DETACH_OFFSET (12) #define DETACH_OFFSET (12)
{0, menu_detach, GTK_STOCK_REDO, M_MENUSTOCK, 0, 0, 1}, /* 12 */ {0, menu_detach, GTK_STOCK_REDO, M_MENUSTOCK, 0, 0, 1}, /* 12 */
@ -1791,8 +1791,8 @@ static struct mymenu mymenu[] = {
{N_("_Server"), 0, 0, M_NEWMENU, 0, 0, 1}, {N_("_Server"), 0, 0, M_NEWMENU, 0, 0, 1},
{N_("_Disconnect"), menu_disconnect, GTK_STOCK_DISCONNECT, M_MENUSTOCK, MENU_ID_DISCONNECT, 0, 1}, {N_("_Disconnect"), menu_disconnect, GTK_STOCK_DISCONNECT, M_MENUSTOCK, MENU_ID_DISCONNECT, 0, 1},
{N_("_Reconnect"), menu_reconnect, GTK_STOCK_CONNECT, M_MENUSTOCK, MENU_ID_RECONNECT, 0, 1}, {N_("_Reconnect"), menu_reconnect, GTK_STOCK_CONNECT, M_MENUSTOCK, MENU_ID_RECONNECT, 0, 1},
{N_("_Join a Channel..."), menu_join, GTK_STOCK_JUMP_TO, M_MENUSTOCK, MENU_ID_JOIN, 0, 1}, {N_("_Join a Channel" ELLIPSIS), menu_join, GTK_STOCK_JUMP_TO, M_MENUSTOCK, MENU_ID_JOIN, 0, 1},
{N_("_List of Channels..."), menu_chanlist, GTK_STOCK_INDEX, M_MENUITEM, 0, 0, 1}, {N_("_List of Channels"), menu_chanlist, GTK_STOCK_INDEX, M_MENUITEM, 0, 0, 1},
{0, 0, 0, M_SEP, 0, 0, 0}, {0, 0, 0, M_SEP, 0, 0, 0},
#define AWAY_OFFSET (41) #define AWAY_OFFSET (41)
{N_("Marked _Away"), menu_away, 0, M_MENUTOG, MENU_ID_AWAY, 0, 1, GDK_KEY_a}, {N_("Marked _Away"), menu_away, 0, M_MENUTOG, MENU_ID_AWAY, 0, 1, GDK_KEY_a},
@ -1802,35 +1802,35 @@ static struct mymenu mymenu[] = {
{N_("S_ettings"), 0, 0, M_NEWMENU, 0, 0, 1}, {N_("S_ettings"), 0, 0, M_NEWMENU, 0, 0, 1},
{N_("_Preferences"), menu_settings, GTK_STOCK_PREFERENCES, M_MENUSTOCK, 0, 0, 1}, {N_("_Preferences"), menu_settings, GTK_STOCK_PREFERENCES, M_MENUSTOCK, 0, 0, 1},
{0, 0, 0, M_SEP, 0, 0, 0}, {0, 0, 0, M_SEP, 0, 0, 0},
{N_("Auto Replace..."), menu_rpopup, 0, M_MENUITEM, 0, 0, 1}, {N_("Auto Replace"), menu_rpopup, 0, M_MENUITEM, 0, 0, 1},
{N_("CTCP Replies..."), menu_ctcpguiopen, 0, M_MENUITEM, 0, 0, 1}, {N_("CTCP Replies"), menu_ctcpguiopen, 0, M_MENUITEM, 0, 0, 1},
{N_("Dialog Buttons..."), menu_dlgbuttons, 0, M_MENUITEM, 0, 0, 1}, {N_("Dialog Buttons"), menu_dlgbuttons, 0, M_MENUITEM, 0, 0, 1},
{N_("Keyboard Shortcuts..."), menu_keypopup, 0, M_MENUITEM, 0, 0, 1}, {N_("Keyboard Shortcuts"), menu_keypopup, 0, M_MENUITEM, 0, 0, 1},
{N_("Text Events..."), menu_evtpopup, 0, M_MENUITEM, 0, 0, 1}, {N_("Text Events"), menu_evtpopup, 0, M_MENUITEM, 0, 0, 1},
{N_("URL Handlers..."), menu_urlhandlers, 0, M_MENUITEM, 0, 0, 1}, {N_("URL Handlers"), menu_urlhandlers, 0, M_MENUITEM, 0, 0, 1},
{N_("User Commands..."), menu_usercommands, 0, M_MENUITEM, 0, 0, 1}, {N_("User Commands"), menu_usercommands, 0, M_MENUITEM, 0, 0, 1},
{N_("Userlist Buttons..."), menu_ulbuttons, 0, M_MENUITEM, 0, 0, 1}, {N_("Userlist Buttons"), menu_ulbuttons, 0, M_MENUITEM, 0, 0, 1},
{N_("Userlist Popup..."), menu_ulpopup, 0, M_MENUITEM, 0, 0, 1}, /* 52 */ {N_("Userlist Popup"), menu_ulpopup, 0, M_MENUITEM, 0, 0, 1}, /* 52 */
{N_("_Window"), 0, 0, M_NEWMENU, 0, 0, 1}, {N_("_Window"), 0, 0, M_NEWMENU, 0, 0, 1},
{N_("_Ban List..."), menu_banlist, 0, M_MENUITEM, 0, 0, 1}, {N_("_Ban List"), menu_banlist, 0, M_MENUITEM, 0, 0, 1},
{N_("Character Chart..."), ascii_open, 0, M_MENUITEM, 0, 0, 1}, {N_("Character Chart"), ascii_open, 0, M_MENUITEM, 0, 0, 1},
{N_("Direct Chat..."), menu_dcc_chat_win, 0, M_MENUITEM, 0, 0, 1}, {N_("Direct Chat"), menu_dcc_chat_win, 0, M_MENUITEM, 0, 0, 1},
{N_("File _Transfers..."), menu_dcc_win, 0, M_MENUITEM, 0, 0, 1}, {N_("File _Transfers"), menu_dcc_win, 0, M_MENUITEM, 0, 0, 1},
{N_("Friends List..."), notify_opengui, 0, M_MENUITEM, 0, 0, 1}, {N_("Friends List"), notify_opengui, 0, M_MENUITEM, 0, 0, 1},
{N_("Ignore List..."), ignore_gui_open, 0, M_MENUITEM, 0, 0, 1}, {N_("Ignore List"), ignore_gui_open, 0, M_MENUITEM, 0, 0, 1},
{N_("_Plugins and Scripts..."), menu_pluginlist, 0, M_MENUITEM, 0, 0, 1}, {N_("_Plugins and Scripts"), menu_pluginlist, 0, M_MENUITEM, 0, 0, 1},
{N_("_Raw Log..."), menu_rawlog, 0, M_MENUITEM, 0, 0, 1}, /* 61 */ {N_("_Raw Log"), menu_rawlog, 0, M_MENUITEM, 0, 0, 1}, /* 61 */
{N_("_URL Grabber..."), url_opengui, 0, M_MENUITEM, 0, 0, 1}, {N_("_URL Grabber"), url_opengui, 0, M_MENUITEM, 0, 0, 1},
{0, 0, 0, M_SEP, 0, 0, 0}, {0, 0, 0, M_SEP, 0, 0, 0},
{N_("Reset Marker Line"), menu_resetmarker, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_m}, {N_("Reset Marker Line"), menu_resetmarker, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_m},
{N_("Move to Marker Line"), menu_movetomarker, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_M}, {N_("Move to Marker Line"), menu_movetomarker, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_M},
{N_("_Copy Selection"), menu_copy_selection, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_C}, {N_("_Copy Selection"), menu_copy_selection, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_C},
{N_("C_lear Text"), menu_flushbuffer, GTK_STOCK_CLEAR, M_MENUSTOCK, 0, 0, 1}, {N_("C_lear Text"), menu_flushbuffer, GTK_STOCK_CLEAR, M_MENUSTOCK, 0, 0, 1},
{N_("Save Text..."), menu_savebuffer, GTK_STOCK_SAVE, M_MENUSTOCK, 0, 0, 1}, {N_("Save Text" ELLIPSIS), menu_savebuffer, GTK_STOCK_SAVE, M_MENUSTOCK, 0, 0, 1},
#define SEARCH_OFFSET (70) #define SEARCH_OFFSET (70)
{N_("Search"), 0, GTK_STOCK_JUSTIFY_LEFT, M_MENUSUB, 0, 0, 1}, {N_("Search"), 0, GTK_STOCK_JUSTIFY_LEFT, M_MENUSUB, 0, 0, 1},
{N_("Search Text..."), menu_search, GTK_STOCK_FIND, M_MENUSTOCK, 0, 0, 1, GDK_KEY_f}, {N_("Search Text" ELLIPSIS), menu_search, GTK_STOCK_FIND, M_MENUSTOCK, 0, 0, 1, GDK_KEY_f},
{N_("Search Next" ), menu_search_next, GTK_STOCK_FIND, M_MENUSTOCK, 0, 0, 1, GDK_KEY_g}, {N_("Search Next" ), menu_search_next, GTK_STOCK_FIND, M_MENUSTOCK, 0, 0, 1, GDK_KEY_g},
{N_("Search Previous" ), menu_search_prev, GTK_STOCK_FIND, M_MENUSTOCK, 0, 0, 1, GDK_KEY_G}, {N_("Search Previous" ), menu_search_prev, GTK_STOCK_FIND, M_MENUSTOCK, 0, 0, 1, GDK_KEY_G},
{0, 0, 0, M_END, 0, 0, 0}, {0, 0, 0, M_END, 0, 0, 0},