diff --git a/applets/core/launchbar/config.ui b/applets/core/launchbar/config.ui index 3bf37b2a..fc579999 100644 --- a/applets/core/launchbar/config.ui +++ b/applets/core/launchbar/config.ui @@ -59,17 +59,18 @@ - - Add all displayed files after one is selected + + Add all displayed files True True - False - 0 - True + True + center + none + False - True + False 0 diff --git a/applets/core/launchbar/launchbar-config.vala b/applets/core/launchbar/launchbar-config.vala index e9626930..1644e1d2 100644 --- a/applets/core/launchbar/launchbar-config.vala +++ b/applets/core/launchbar/launchbar-config.vala @@ -17,8 +17,6 @@ namespace LaunchBar AppChooserWidget choose_desktop; [GtkChild (name = "choose-file")] FileChooserWidget choose_file; - [GtkChild (name = "check-folder")] - CheckButton check_folder; [GtkChild (name = "box-popover")] Box box_popover; public ConfigDialog(Bar launchbar) @@ -56,28 +54,7 @@ namespace LaunchBar private void on_file_activated() { var uri = choose_file.get_uri(); - if (check_folder.active) - { - uri = choose_file.get_current_folder_uri(); - var path = choose_file.get_current_folder(); - try - { - Dir dir = Dir.open(path); - for (var ch = dir.read_name(); ch!= null; ch = dir.read_name()) - { - var ch_uri = Filename.to_uri(path+"/"+ch); - add_uri(ch_uri,false); - } - return; - } catch (GLib.Error e) - { - print("%s %s\n",e.message, path); - show_error(_("Failed to add directory. Adding this file.")); - add_uri(uri); - } - } - else - add_uri(uri); + add_uri(uri); } [GtkCallback] private void on_application_activated() @@ -139,6 +116,27 @@ namespace LaunchBar } } } + [GtkCallback] + private void on_add_all_files_clicked() + { + var uri = choose_file.get_current_folder_uri(); + var path = choose_file.get_current_folder(); + try + { + Dir dir = Dir.open(path); + for (var ch = dir.read_name(); ch!= null; ch = dir.read_name()) + { + var ch_uri = Filename.to_uri(path+"/"+ch); + add_uri(ch_uri,false); + } + return; + } catch (GLib.Error e) + { + print("%s %s\n",e.message, path); + show_error(_("Failed to add directory content.\n Adding current directory as launcher.")); + add_uri(uri); + } + } private void update_ids_from_widget() { launchbar.ids = populate_ids_from_widget(); diff --git a/po/ru.po b/po/ru.po index 76735c2e..45b4ed82 100644 --- a/po/ru.po +++ b/po/ru.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: lxpanel\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-05-01 01:55+0600\n" -"PO-Revision-Date: 2015-05-01 01:55+0600\n" +"POT-Creation-Date: 2015-05-01 02:47+0600\n" +"PO-Revision-Date: 2015-05-01 02:48+0600\n" "Last-Translator: Andriy Grytsenko \n" "Language-Team: Russian \n" "Language: ru\n" @@ -226,6 +226,7 @@ msgstr "Центр управления" #: ../applets/core/menumodel/menu-maker.vala:156 #: ../applets/core/menumodel/menu-maker.vala:159 #: ../applets/core/launchbar/config.ui:39 +#: ../applets/core/launchbar/config.ui:38 msgid "Applications" msgstr "Приложения" @@ -296,6 +297,7 @@ msgstr "Показывать пассивные значки" #: ../applets/core/launchbar/launchbar.vala:188 #: ../applets/core/launchbar/launchbar-config.vala:95 #: ../applets/core/launchbar/launchbar-config.vala:97 +#: ../applets/core/launchbar/launchbar-config.vala:74 msgid "Quicklaunch already contains this application.\n" msgstr "На этом апплете уже есть такое приложение.\n" @@ -305,6 +307,7 @@ msgstr "Выберите файл для добавления на панель #: ../applets/core/launchbar/launchbar.vala:212 #: ../applets/core/launchbar/launchbar-config.vala:53 +#: ../applets/core/launchbar/launchbar-config.vala:51 msgid "Quicklaunch already contains this URI.\n" msgstr "Панель запуска уже содержит этот адрес.\n" @@ -864,6 +867,7 @@ msgid "Failed to add directory. Adding this file." msgstr "Ошибка добавления каталога. Добавляю только этот файл." #: ../applets/core/launchbar/config.ui:34 +#: ../applets/core/launchbar/config.ui:33 msgid "Add launcher from installed applications" msgstr "Добавить установленное приложение" @@ -887,6 +891,18 @@ msgstr "Имя" msgid "Add all displayed files after one is selected" msgstr "Добавить все показываемые файлы при выборе одного." +#: ../applets/core/launchbar/launchbar-config.vala:136 +msgid "" +"Failed to add directory content.\n" +" Adding current directory as launcher." +msgstr "" +"Ошибка добавления содержимого каталога.\n" +"Добавляется показываемая директория в качестве кнопки запуска." + +#: ../applets/core/launchbar/config.ui:63 +msgid "Add all displayed files" +msgstr "Добавить все показываемые файлы." + #~ msgid "SimplePanel" #~ msgstr "SimplePanel" diff --git a/po/vala-panel.pot b/po/vala-panel.pot index 90a80e10..233ed72c 100644 --- a/po/vala-panel.pot +++ b/po/vala-panel.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-05-01 01:55+0600\n" +"POT-Creation-Date: 2015-05-01 02:47+0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -218,6 +218,7 @@ msgstr "" #: ../applets/core/menumodel/menu-maker.vala:156 #: ../applets/core/menumodel/menu-maker.vala:159 #: ../applets/core/launchbar/config.ui:39 +#: ../applets/core/launchbar/config.ui:38 msgid "Applications" msgstr "" @@ -288,6 +289,7 @@ msgstr "" #: ../applets/core/launchbar/launchbar.vala:188 #: ../applets/core/launchbar/launchbar-config.vala:95 #: ../applets/core/launchbar/launchbar-config.vala:97 +#: ../applets/core/launchbar/launchbar-config.vala:74 msgid "Quicklaunch already contains this application.\n" msgstr "" @@ -297,6 +299,7 @@ msgstr "" #: ../applets/core/launchbar/launchbar.vala:212 #: ../applets/core/launchbar/launchbar-config.vala:53 +#: ../applets/core/launchbar/launchbar-config.vala:51 msgid "Quicklaunch already contains this URI.\n" msgstr "" @@ -852,6 +855,7 @@ msgid "Failed to add directory. Adding this file." msgstr "" #: ../applets/core/launchbar/config.ui:34 +#: ../applets/core/launchbar/config.ui:33 msgid "Add launcher from installed applications" msgstr "" @@ -874,3 +878,13 @@ msgstr "" #: ../applets/core/launchbar/config.ui:64 msgid "Add all displayed files after one is selected" msgstr "" + +#: ../applets/core/launchbar/launchbar-config.vala:136 +msgid "" +"Failed to add directory content.\n" +" Adding current directory as launcher." +msgstr "" + +#: ../applets/core/launchbar/config.ui:63 +msgid "Add all displayed files" +msgstr ""