diff options
author | mitchell <70453897+orbitalquark@users.noreply.github.com> | 2022-02-27 22:01:14 -0500 |
---|---|---|
committer | mitchell <70453897+orbitalquark@users.noreply.github.com> | 2022-02-27 22:01:14 -0500 |
commit | 6a6b7cccbb2fd21bf040729b99e18aa3a98fe8ad (patch) | |
tree | 55a6546a89a8c3a44f547349684b5e502f8bedf6 /core | |
parent | 35a77b009b2577b1e41e00f3b19cedb99597b5de (diff) |
Use icon names from the Free Desktop Icon Naming Specification.
Requires latest gtDialog.
Diffstat (limited to 'core')
-rw-r--r-- | core/.ui.dialogs.luadoc | 20 | ||||
-rw-r--r-- | core/file_io.lua | 6 | ||||
-rw-r--r-- | core/ui.lua | 2 |
3 files changed, 14 insertions, 14 deletions
diff --git a/core/.ui.dialogs.luadoc b/core/.ui.dialogs.luadoc index 498f2d11..bf96cd27 100644 --- a/core/.ui.dialogs.luadoc +++ b/core/.ui.dialogs.luadoc @@ -14,9 +14,9 @@ module('ui.dialogs') -- * `title`: The dialog's title text. -- * `text`: The dialog's main message text. -- * `informative_text`: The dialog's extra informative text. --- * `icon`: The dialog's GTK stock icon name. Examples are "gtk-dialog-error", --- "gtk-dialog-info", "gtk-dialog-question", and "gtk-dialog-warning". The dialog does not --- display an icon by default. +-- * `icon`: The dialog's icon name, according to the Free Desktop Icon Naming +-- Specification. Examples are "dialog-error", "dialog-information", "dialog-question", +-- and "dialog-warning". The dialog does not display an icon by default. -- * `icon_file`: The dialog's icon file path. This option has no effect when `icon` is set. -- * `button1`: The right-most button's label. The default value is `_L['OK']`. -- * `button2`: The middle button's label. @@ -31,7 +31,7 @@ module('ui.dialogs') -- before timing out. Dialogs do not time out by default. -- @return selected button or exit code -- @usage ui.dialogs.msgbox{title = 'EOL Mode', text = 'Which EOL?', --- icon = 'gtk-dialog-question', button1 = 'CRLF', button2 = 'CR', +-- icon = 'dialog-question', button1 = 'CRLF', button2 = 'CR', -- button3 = 'LF'} function msgbox(options) end @@ -45,9 +45,9 @@ function msgbox(options) end -- * `title`: The dialog's title text. -- * `text`: The dialog's main message text. -- * `informative_text`: The dialog's extra informative text. --- * `icon`: The dialog's GTK stock icon name. Examples are "gtk-dialog-error", --- "gtk-dialog-info", "gtk-dialog-question", and "gtk-dialog-warning". The dialog does not --- display an icon by default. +-- * `icon`: The dialog's icon name, according to the Free Desktop Icon Naming +-- Specification. Examples are "dialog-error", "dialog-information", "dialog-question", +-- and "dialog-warning". The dialog does not display an icon by default. -- * `icon_file`: The dialog's icon file path. This option has no effect when `icon` is set. -- * `no_cancel`: Do not display the "Cancel" button. The default value is `false`. -- * `string_output`: Return the selected button's label (instead of its index) or the dialog's @@ -71,9 +71,9 @@ function ok_msgbox(options) end -- * `title`: The dialog's title text. -- * `text`: The dialog's main message text. -- * `informative_text`: The dialog's extra informative text. --- * `icon`: The dialog's GTK stock icon name. Examples are "gtk-dialog-error", --- "gtk-dialog-info", "gtk-dialog-question", and "gtk-dialog-warning". The dialog does not --- display an icon by default. +-- * `icon`: The dialog's icon name, according to the Free Desktop Icon Naming +-- Specification. Examples are "dialog-error", "dialog-information", "dialog-question", +-- and "dialog-warning". The dialog does not display an icon by default. -- * `icon_file`: The dialog's icon file path. This option has no effect when `icon` is set. -- * `no_cancel`: Do not display the "Cancel" button. The default value is `false`. -- * `string_output`: Return the selected button's label (instead of its index) or the dialog's diff --git a/core/file_io.lua b/core/file_io.lua index 10e9b158..9bbef6cb 100644 --- a/core/file_io.lua +++ b/core/file_io.lua @@ -226,7 +226,7 @@ local function close(buffer, force) if buffer.filename then filename = filename:iconv('UTF-8', _CHARSET) end local button = ui.dialogs.msgbox{ title = _L['Close without saving?'], text = _L['There are unsaved changes in'], - informative_text = filename, icon = 'gtk-dialog-question', button1 = _L['Cancel'], + informative_text = filename, icon = 'dialog-question', button1 = _L['Cancel'], button2 = _L['Close without saving'], width = CURSES and #filename > 40 and ui.size[1] - 2 or nil } @@ -282,7 +282,7 @@ events.connect(events.FILE_CHANGED, function(filename) title = _L['Reload?'], text = _L['Reload modified file?'], informative_text = string.format('"%s"\n%s', filename:iconv('UTF-8', _CHARSET), _L['has been modified. Reload it?']), -- LuaFormatter - icon = 'gtk-dialog-question', button1 = _L['Yes'], button2 = _L['No'], + icon = 'dialog-question', button1 = _L['Yes'], button2 = _L['No'], width = CURSES and #filename > 40 and ui.size[1] - 2 or nil } if button == 1 then buffer:reload() end @@ -406,7 +406,7 @@ function io.quick_open(paths, filter, opts) ui.dialogs.msgbox{ title = _L['File Limit Exceeded'], text = string.format('%d %s %d', io.quick_open_max, _L['files or more were found. Showing the first'], io.quick_open_max), - icon = 'gtk-dialog-info' + icon = 'dialog-information' } end local options = { diff --git a/core/ui.lua b/core/ui.lua index 1a4d8992..6aa19a96 100644 --- a/core/ui.lua +++ b/core/ui.lua @@ -425,7 +425,7 @@ events.connect(events.QUIT, function() if #utf8_list == 0 then return end local button = ui.dialogs.msgbox{ title = _L['Quit without saving?'], text = _L['The following buffers are unsaved:'], - informative_text = table.concat(utf8_list, '\n'), icon = 'gtk-dialog-question', + informative_text = table.concat(utf8_list, '\n'), icon = 'dialog-question', button1 = _L['Cancel'], button2 = _L['Quit without saving'], width = CURSES and ui.size[1] - 2 or nil } |