Philipp Hörist pushed to branch master at gajim / gajim
Commits:
-
9058a28a
by lovetox at 2021-11-02T10:06:45+01:00
-
21b4f44b
by lovetox at 2021-11-02T10:07:23+01:00
-
aa5c2d9f
by lovetox at 2021-11-02T10:08:28+01:00
5 changed files:
- gajim/common/modules/bookmarks.py
- gajim/common/setting_values.py
- gajim/data/gui/bookmarks.ui
- gajim/gtk/bookmarks.py
- gajim/gui_menu_builder.py
Changes:
| ... | ... | @@ -223,22 +223,6 @@ def _bookmarks_received(self, task: Any) -> None: |
| 223 | 223 |
app.nec.push_incoming_event(
|
| 224 | 224 |
NetworkEvent('bookmarks-received', account=self._account))
|
| 225 | 225 |
|
| 226 |
- def store_difference(self, bookmarks: List) -> None:
|
|
| 227 |
- if self.nativ_bookmarks_used:
|
|
| 228 |
- retract, add_or_modify = self._determine_changed_bookmarks(
|
|
| 229 |
- bookmarks, self._bookmarks)
|
|
| 230 |
- |
|
| 231 |
- for bookmark in retract:
|
|
| 232 |
- self.remove(bookmark.jid)
|
|
| 233 |
- |
|
| 234 |
- if add_or_modify:
|
|
| 235 |
- self.store_bookmarks(add_or_modify)
|
|
| 236 |
- self._bookmarks = self._convert_to_dict(bookmarks)
|
|
| 237 |
- |
|
| 238 |
- else:
|
|
| 239 |
- self._bookmarks = self._convert_to_dict(bookmarks)
|
|
| 240 |
- self.store_bookmarks()
|
|
| 241 |
- |
|
| 242 | 226 |
def store_bookmarks(self, bookmarks: list = None) -> None:
|
| 243 | 227 |
if not app.account_is_available(self._account):
|
| 244 | 228 |
return
|
| ... | ... | @@ -311,27 +295,6 @@ def remove(self, jid: JID, publish: bool = True) -> None: |
| 311 | 295 |
else:
|
| 312 | 296 |
self.store_bookmarks()
|
| 313 | 297 |
|
| 314 |
- @staticmethod
|
|
| 315 |
- def _determine_changed_bookmarks(
|
|
| 316 |
- new_bookmarks: List[BookmarkData],
|
|
| 317 |
- old_bookmarks: Dict[str, BookmarkData]) -> Tuple[
|
|
| 318 |
- List[BookmarkData], List[BookmarkData]]:
|
|
| 319 |
- |
|
| 320 |
- new_jids = [bookmark.jid for bookmark in new_bookmarks]
|
|
| 321 |
- new_bookmarks = set(new_bookmarks)
|
|
| 322 |
- old_bookmarks = set(old_bookmarks.values())
|
|
| 323 |
- |
|
| 324 |
- retract = []
|
|
| 325 |
- add_or_modify = []
|
|
| 326 |
- changed_bookmarks = new_bookmarks.symmetric_difference(old_bookmarks)
|
|
| 327 |
- |
|
| 328 |
- for bookmark in changed_bookmarks:
|
|
| 329 |
- if bookmark.jid not in new_jids:
|
|
| 330 |
- retract.append(bookmark)
|
|
| 331 |
- if bookmark in new_bookmarks:
|
|
| 332 |
- add_or_modify.append(bookmark)
|
|
| 333 |
- return retract, add_or_modify
|
|
| 334 |
- |
|
| 335 | 298 |
def get_name_from_bookmark(self, jid: str) -> str:
|
| 336 | 299 |
bookmark = self._bookmarks.get(jid)
|
| 337 | 300 |
if bookmark is None:
|
| ... | ... | @@ -175,6 +175,7 @@ class _ACCOUNT_DEFAULT: |
| 175 | 175 |
'command_system_execute': False,
|
| 176 | 176 |
'groupchat_roster_width': 210,
|
| 177 | 177 |
'dev_force_bookmark_2': False,
|
| 178 |
+ 'developer_modus': False,
|
|
| 178 | 179 |
'show_help_start_chat': True,
|
| 179 | 180 |
'gc_notify_on_all_messages_private_default': True,
|
| 180 | 181 |
'gc_notify_on_all_messages_public_default': False,
|
| ... | ... | @@ -461,6 +462,7 @@ class _ACCOUNT_DEFAULT: |
| 461 | 462 |
'gc_notify_on_all_messages_private_default': '',
|
| 462 | 463 |
'gc_notify_on_all_messages_public_default': '',
|
| 463 | 464 |
'metacontacts_enabled': '',
|
| 465 |
+ 'developer_modus': '',
|
|
| 464 | 466 |
},
|
| 465 | 467 |
}
|
| 466 | 468 |
|
| 1 | 1 |
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
-<!-- Generated with glade 3.36.0 -->
|
|
| 2 |
+<!-- Generated with glade 3.38.2 -->
|
|
| 3 | 3 |
<interface>
|
| 4 | 4 |
<requires lib="gtk+" version="3.22"/>
|
| 5 | 5 |
<object class="GtkListStore" id="bookmarks_store">
|
| ... | ... | @@ -16,42 +16,39 @@ |
| 16 | 16 |
<column type="gboolean"/>
|
| 17 | 17 |
</columns>
|
| 18 | 18 |
</object>
|
| 19 |
+ <!-- n-columns=2 n-rows=1 -->
|
|
| 19 | 20 |
<object class="GtkGrid" id="bookmarks_grid">
|
| 20 | 21 |
<property name="visible">True</property>
|
| 21 |
- <property name="can_focus">False</property>
|
|
| 22 |
+ <property name="can-focus">False</property>
|
|
| 22 | 23 |
<child>
|
| 23 | 24 |
<object class="GtkScrolledWindow">
|
| 24 | 25 |
<property name="visible">True</property>
|
| 25 |
- <property name="can_focus">True</property>
|
|
| 26 |
+ <property name="can-focus">True</property>
|
|
| 26 | 27 |
<property name="hexpand">True</property>
|
| 27 | 28 |
<property name="vexpand">True</property>
|
| 28 |
- <property name="hscrollbar_policy">never</property>
|
|
| 29 |
- <property name="shadow_type">in</property>
|
|
| 29 |
+ <property name="hscrollbar-policy">never</property>
|
|
| 30 |
+ <property name="shadow-type">in</property>
|
|
| 30 | 31 |
<child>
|
| 31 | 32 |
<object class="GtkTreeView" id="bookmarks_view">
|
| 32 | 33 |
<property name="visible">True</property>
|
| 33 |
- <property name="can_focus">True</property>
|
|
| 34 |
+ <property name="can-focus">True</property>
|
|
| 34 | 35 |
<property name="model">bookmarks_store</property>
|
| 35 |
- <property name="search_column">0</property>
|
|
| 36 |
- <property name="enable_grid_lines">horizontal</property>
|
|
| 36 |
+ <property name="search-column">0</property>
|
|
| 37 |
+ <property name="enable-grid-lines">horizontal</property>
|
|
| 37 | 38 |
<child internal-child="selection">
|
| 38 |
- <object class="GtkTreeSelection">
|
|
| 39 |
- <signal name="changed" handler="_on_selection_changed" swapped="no"/>
|
|
| 40 |
- </object>
|
|
| 39 |
+ <object class="GtkTreeSelection"/>
|
|
| 41 | 40 |
</child>
|
| 42 | 41 |
<child>
|
| 43 | 42 |
<object class="GtkTreeViewColumn">
|
| 44 | 43 |
<property name="resizable">True</property>
|
| 45 | 44 |
<property name="title" translatable="yes">XMPP Address</property>
|
| 46 | 45 |
<property name="expand">True</property>
|
| 47 |
- <property name="sort_indicator">True</property>
|
|
| 48 |
- <property name="sort_column_id">0</property>
|
|
| 46 |
+ <property name="sort-indicator">True</property>
|
|
| 47 |
+ <property name="sort-column-id">0</property>
|
|
| 49 | 48 |
<child>
|
| 50 | 49 |
<object class="GtkCellRendererText" id="jid">
|
| 51 |
- <property name="editable">True</property>
|
|
| 52 | 50 |
<property name="ellipsize">end</property>
|
| 53 |
- <property name="placeholder_text">chat@conference.example.org</property>
|
|
| 54 |
- <signal name="edited" handler="_on_address_edited" swapped="no"/>
|
|
| 51 |
+ <property name="placeholder-text">chat@conference.example.org</property>
|
|
| 55 | 52 |
</object>
|
| 56 | 53 |
<attributes>
|
| 57 | 54 |
<attribute name="text">0</attribute>
|
| ... | ... | @@ -62,15 +59,13 @@ |
| 62 | 59 |
<child>
|
| 63 | 60 |
<object class="GtkTreeViewColumn">
|
| 64 | 61 |
<property name="resizable">True</property>
|
| 65 |
- <property name="min_width">100</property>
|
|
| 62 |
+ <property name="min-width">100</property>
|
|
| 66 | 63 |
<property name="title" translatable="yes">Name</property>
|
| 67 |
- <property name="sort_indicator">True</property>
|
|
| 68 |
- <property name="sort_column_id">1</property>
|
|
| 64 |
+ <property name="sort-indicator">True</property>
|
|
| 65 |
+ <property name="sort-column-id">1</property>
|
|
| 69 | 66 |
<child>
|
| 70 | 67 |
<object class="GtkCellRendererText" id="name">
|
| 71 |
- <property name="editable">True</property>
|
|
| 72 | 68 |
<property name="ellipsize">end</property>
|
| 73 |
- <signal name="edited" handler="_on_name_edited" swapped="no"/>
|
|
| 74 | 69 |
</object>
|
| 75 | 70 |
<attributes>
|
| 76 | 71 |
<attribute name="text">1</attribute>
|
| ... | ... | @@ -82,13 +77,11 @@ |
| 82 | 77 |
<object class="GtkTreeViewColumn">
|
| 83 | 78 |
<property name="resizable">True</property>
|
| 84 | 79 |
<property name="title" translatable="yes">Nickname</property>
|
| 85 |
- <property name="sort_indicator">True</property>
|
|
| 86 |
- <property name="sort_column_id">2</property>
|
|
| 80 |
+ <property name="sort-indicator">True</property>
|
|
| 81 |
+ <property name="sort-column-id">2</property>
|
|
| 87 | 82 |
<child>
|
| 88 | 83 |
<object class="GtkCellRendererText" id="nick">
|
| 89 |
- <property name="editable">True</property>
|
|
| 90 | 84 |
<property name="ellipsize">end</property>
|
| 91 |
- <signal name="edited" handler="_on_nick_edited" swapped="no"/>
|
|
| 92 | 85 |
</object>
|
| 93 | 86 |
<attributes>
|
| 94 | 87 |
<attribute name="text">2</attribute>
|
| ... | ... | @@ -100,13 +93,11 @@ |
| 100 | 93 |
<object class="GtkTreeViewColumn">
|
| 101 | 94 |
<property name="resizable">True</property>
|
| 102 | 95 |
<property name="title" translatable="yes">Password</property>
|
| 103 |
- <property name="sort_indicator">True</property>
|
|
| 104 |
- <property name="sort_column_id">3</property>
|
|
| 96 |
+ <property name="sort-indicator">True</property>
|
|
| 97 |
+ <property name="sort-column-id">3</property>
|
|
| 105 | 98 |
<child>
|
| 106 | 99 |
<object class="GtkCellRendererText" id="password">
|
| 107 |
- <property name="editable">True</property>
|
|
| 108 | 100 |
<property name="ellipsize">end</property>
|
| 109 |
- <signal name="edited" handler="_on_password_edited" swapped="no"/>
|
|
| 110 | 101 |
</object>
|
| 111 | 102 |
<attributes>
|
| 112 | 103 |
<attribute name="text">3</attribute>
|
| ... | ... | @@ -118,12 +109,10 @@ |
| 118 | 109 |
<object class="GtkTreeViewColumn">
|
| 119 | 110 |
<property name="sizing">fixed</property>
|
| 120 | 111 |
<property name="title" translatable="yes">Autojoin</property>
|
| 121 |
- <property name="sort_indicator">True</property>
|
|
| 122 |
- <property name="sort_column_id">4</property>
|
|
| 112 |
+ <property name="sort-indicator">True</property>
|
|
| 113 |
+ <property name="sort-column-id">4</property>
|
|
| 123 | 114 |
<child>
|
| 124 |
- <object class="GtkCellRendererToggle" id="autojoin">
|
|
| 125 |
- <signal name="toggled" handler="_on_autojoin_toggled" swapped="no"/>
|
|
| 126 |
- </object>
|
|
| 115 |
+ <object class="GtkCellRendererToggle" id="autojoin"/>
|
|
| 127 | 116 |
<attributes>
|
| 128 | 117 |
<attribute name="active">4</attribute>
|
| 129 | 118 |
</attributes>
|
| ... | ... | @@ -140,73 +129,11 @@ |
| 140 | 129 |
</style>
|
| 141 | 130 |
</object>
|
| 142 | 131 |
<packing>
|
| 143 |
- <property name="left_attach">0</property>
|
|
| 144 |
- <property name="top_attach">0</property>
|
|
| 132 |
+ <property name="left-attach">0</property>
|
|
| 133 |
+ <property name="top-attach">0</property>
|
|
| 145 | 134 |
<property name="width">2</property>
|
| 146 | 135 |
</packing>
|
| 147 | 136 |
</child>
|
| 148 |
- <child>
|
|
| 149 |
- <object class="GtkToolbar">
|
|
| 150 |
- <property name="visible">True</property>
|
|
| 151 |
- <property name="can_focus">False</property>
|
|
| 152 |
- <property name="halign">start</property>
|
|
| 153 |
- <property name="toolbar_style">icons</property>
|
|
| 154 |
- <property name="show_arrow">False</property>
|
|
| 155 |
- <property name="icon_size">4</property>
|
|
| 156 |
- <child>
|
|
| 157 |
- <object class="GtkToolButton">
|
|
| 158 |
- <property name="visible">True</property>
|
|
| 159 |
- <property name="can_focus">False</property>
|
|
| 160 |
- <property name="use_underline">True</property>
|
|
| 161 |
- <property name="icon_name">list-add-symbolic</property>
|
|
| 162 |
- <signal name="clicked" handler="_on_add_clicked" swapped="no"/>
|
|
| 163 |
- </object>
|
|
| 164 |
- <packing>
|
|
| 165 |
- <property name="expand">False</property>
|
|
| 166 |
- <property name="homogeneous">True</property>
|
|
| 167 |
- </packing>
|
|
| 168 |
- </child>
|
|
| 169 |
- <child>
|
|
| 170 |
- <object class="GtkToolButton" id="remove_button">
|
|
| 171 |
- <property name="visible">True</property>
|
|
| 172 |
- <property name="can_focus">False</property>
|
|
| 173 |
- <property name="use_underline">True</property>
|
|
| 174 |
- <property name="icon_name">list-remove-symbolic</property>
|
|
| 175 |
- <signal name="clicked" handler="_on_remove_clicked" swapped="no"/>
|
|
| 176 |
- </object>
|
|
| 177 |
- <packing>
|
|
| 178 |
- <property name="expand">False</property>
|
|
| 179 |
- <property name="homogeneous">True</property>
|
|
| 180 |
- </packing>
|
|
| 181 |
- </child>
|
|
| 182 |
- <style>
|
|
| 183 |
- <class name="inline-toolbar"/>
|
|
| 184 |
- </style>
|
|
| 185 |
- </object>
|
|
| 186 |
- <packing>
|
|
| 187 |
- <property name="left_attach">0</property>
|
|
| 188 |
- <property name="top_attach">1</property>
|
|
| 189 |
- </packing>
|
|
| 190 |
- </child>
|
|
| 191 |
- <child>
|
|
| 192 |
- <object class="GtkButton">
|
|
| 193 |
- <property name="label" translatable="yes">_Apply</property>
|
|
| 194 |
- <property name="visible">True</property>
|
|
| 195 |
- <property name="can_focus">True</property>
|
|
| 196 |
- <property name="receives_default">True</property>
|
|
| 197 |
- <property name="halign">end</property>
|
|
| 198 |
- <property name="valign">end</property>
|
|
| 199 |
- <property name="use_underline">True</property>
|
|
| 200 |
- <signal name="clicked" handler="_on_apply_clicked" swapped="no"/>
|
|
| 201 |
- <style>
|
|
| 202 |
- <class name="suggested-action"/>
|
|
| 203 |
- </style>
|
|
| 204 |
- </object>
|
|
| 205 |
- <packing>
|
|
| 206 |
- <property name="left_attach">1</property>
|
|
| 207 |
- <property name="top_attach">1</property>
|
|
| 208 |
- </packing>
|
|
| 209 |
- </child>
|
|
| 210 | 137 |
<style>
|
| 211 | 138 |
<class name="padding-18"/>
|
| 212 | 139 |
</style>
|
| ... | ... | @@ -13,16 +13,11 @@ |
| 13 | 13 |
# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
| 14 | 14 |
|
| 15 | 15 |
import logging
|
| 16 |
-from enum import IntEnum
|
|
| 17 | 16 |
|
| 18 | 17 |
from gi.repository import Gtk
|
| 19 | 18 |
from gi.repository import Gdk
|
| 20 |
-from nbxmpp.structs import BookmarkData
|
|
| 21 |
-from nbxmpp.protocol import validate_resourcepart
|
|
| 22 |
-from nbxmpp.protocol import JID
|
|
| 23 | 19 |
|
| 24 | 20 |
from gajim.common import app
|
| 25 |
-from gajim.common.helpers import validate_jid
|
|
| 26 | 21 |
from gajim.common.i18n import _
|
| 27 | 22 |
|
| 28 | 23 |
from .util import get_builder
|
| ... | ... | @@ -31,14 +26,6 @@ |
| 31 | 26 |
log = logging.getLogger('gajim.gui.bookmarks')
|
| 32 | 27 |
|
| 33 | 28 |
|
| 34 |
-class Column(IntEnum):
|
|
| 35 |
- ADDRESS = 0
|
|
| 36 |
- NAME = 1
|
|
| 37 |
- NICK = 2
|
|
| 38 |
- PASSWORD = 3
|
|
| 39 |
- AUTOJOIN = 4
|
|
| 40 |
- |
|
| 41 |
- |
|
| 42 | 29 |
class Bookmarks(Gtk.ApplicationWindow):
|
| 43 | 30 |
def __init__(self, account):
|
| 44 | 31 |
Gtk.ApplicationWindow.__init__(self)
|
| ... | ... | @@ -72,89 +59,6 @@ def _on_key_press(self, _widget, event): |
| 72 | 59 |
if event.keyval == Gdk.KEY_Escape:
|
| 73 | 60 |
self.destroy()
|
| 74 | 61 |
|
| 75 |
- def _on_selection_changed(self, selection):
|
|
| 76 |
- _, iter_ = selection.get_selected()
|
|
| 77 |
- self._ui.remove_button.set_sensitive(iter_ is not None)
|
|
| 78 |
- |
|
| 79 |
- def _on_address_edited(self, _renderer, path, new_value):
|
|
| 80 |
- iter_ = self._ui.bookmarks_store.get_iter(path)
|
|
| 81 |
- if not new_value:
|
|
| 82 |
- return
|
|
| 83 |
- |
|
| 84 |
- try:
|
|
| 85 |
- jid = validate_jid(new_value)
|
|
| 86 |
- except ValueError as error:
|
|
| 87 |
- log.warning('Invalid JID: %s (%s)', error, new_value)
|
|
| 88 |
- return
|
|
| 89 |
- |
|
| 90 |
- if not jid.is_bare:
|
|
| 91 |
- log.warning('Invalid JID: only bare JIDs allowed (%s)', jid)
|
|
| 92 |
- return
|
|
| 93 |
- |
|
| 94 |
- self._ui.bookmarks_store.set_value(iter_,
|
|
| 95 |
- Column.ADDRESS,
|
|
| 96 |
- new_value or None)
|
|
| 97 |
- |
|
| 98 |
- def _on_name_edited(self, _renderer, path, new_value):
|
|
| 99 |
- iter_ = self._ui.bookmarks_store.get_iter(path)
|
|
| 100 |
- self._ui.bookmarks_store.set_value(iter_,
|
|
| 101 |
- Column.NAME,
|
|
| 102 |
- new_value or None)
|
|
| 103 |
- |
|
| 104 |
- def _on_nick_edited(self, _renderer, path, new_value):
|
|
| 105 |
- iter_ = self._ui.bookmarks_store.get_iter(path)
|
|
| 106 |
- |
|
| 107 |
- if new_value:
|
|
| 108 |
- try:
|
|
| 109 |
- validate_resourcepart(new_value)
|
|
| 110 |
- except ValueError as error:
|
|
| 111 |
- log.warning('Invalid nickname: %s', error)
|
|
| 112 |
- return
|
|
| 113 |
- |
|
| 114 |
- self._ui.bookmarks_store.set_value(iter_,
|
|
| 115 |
- Column.NICK,
|
|
| 116 |
- new_value or None)
|
|
| 117 |
- |
|
| 118 |
- def _on_password_edited(self, _renderer, path, new_value):
|
|
| 119 |
- iter_ = self._ui.bookmarks_store.get_iter(path)
|
|
| 120 |
- self._ui.bookmarks_store.set_value(iter_,
|
|
| 121 |
- Column.PASSWORD,
|
|
| 122 |
- new_value or None)
|
|
| 123 |
- |
|
| 124 |
- def _on_autojoin_toggled(self, _renderer, path):
|
|
| 125 |
- iter_ = self._ui.bookmarks_store.get_iter(path)
|
|
| 126 |
- new_value = not self._ui.bookmarks_store[iter_][Column.AUTOJOIN]
|
|
| 127 |
- self._ui.bookmarks_store.set_value(iter_, Column.AUTOJOIN, new_value)
|
|
| 128 |
- |
|
| 129 |
- def _on_add_clicked(self, _button):
|
|
| 130 |
- iter_ = self._ui.bookmarks_store.append([None, None, None, None, False])
|
|
| 131 |
- self._ui.bookmarks_view.get_selection().select_iter(iter_)
|
|
| 132 |
- path = self._ui.bookmarks_store.get_path(iter_)
|
|
| 133 |
- self._ui.bookmarks_view.scroll_to_cell(path, None, False)
|
|
| 134 |
- |
|
| 135 |
- def _on_remove_clicked(self, _button):
|
|
| 136 |
- mod, paths = self._ui.bookmarks_view.get_selection().get_selected_rows()
|
|
| 137 |
- for path in paths:
|
|
| 138 |
- iter_ = mod.get_iter(path)
|
|
| 139 |
- self._ui.bookmarks_store.remove(iter_)
|
|
| 140 |
- |
|
| 141 |
- def _on_apply_clicked(self, _button):
|
|
| 142 |
- bookmarks = []
|
|
| 143 |
- for row in self._ui.bookmarks_store:
|
|
| 144 |
- if not row[Column.ADDRESS]:
|
|
| 145 |
- continue
|
|
| 146 |
- |
|
| 147 |
- bookmark = BookmarkData(jid=JID.from_string(row[Column.ADDRESS]),
|
|
| 148 |
- name=row[Column.NAME],
|
|
| 149 |
- autojoin=row[Column.AUTOJOIN],
|
|
| 150 |
- password=row[Column.PASSWORD],
|
|
| 151 |
- nick=row[Column.NICK])
|
|
| 152 |
- bookmarks.append(bookmark)
|
|
| 153 |
- |
|
| 154 |
- con = app.connections[self.account]
|
|
| 155 |
- con.get_module('Bookmarks').store_difference(bookmarks)
|
|
| 156 |
- self.destroy()
|
|
| 157 |
- |
|
| 158 | 62 |
@staticmethod
|
| 159 | 63 |
def _search_func(model, _column, search_text, iter_):
|
| 160 | 64 |
return search_text.lower() not in model[iter_][0].lower()
|
| ... | ... | @@ -636,7 +636,6 @@ def get_account_menu(account): |
| 636 | 636 |
(_('Advanced'), [
|
| 637 | 637 |
('-archive', _('Archiving Preferences')),
|
| 638 | 638 |
('-blocking', _('Blocking List')),
|
| 639 |
- ('-bookmarks', _('Bookmarks')),
|
|
| 640 | 639 |
('-pep-config', _('PEP Configuration')),
|
| 641 | 640 |
('-sync-history', _('Synchronise History…')),
|
| 642 | 641 |
]),
|
| ... | ... | @@ -648,6 +647,9 @@ def get_account_menu(account): |
| 648 | 647 |
]),
|
| 649 | 648 |
]
|
| 650 | 649 |
|
| 650 |
+ if app.settings.get('developer_modus'):
|
|
| 651 |
+ account_menu[5][1].append(('-bookmarks', _('Bookmarks')))
|
|
| 652 |
+ |
|
| 651 | 653 |
def build_menu(preset):
|
| 652 | 654 |
menu = Gio.Menu()
|
| 653 | 655 |
for item in preset:
|