-
Notifications
You must be signed in to change notification settings - Fork 578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
search engine can be set to preference #2125
Conversation
why's that failing? |
It should be possible to run actions on your own repo so that you don't need to wait for me to come round and hit the approve button on this for CI, I'll look back some time later when I remember to to see the result of this next run |
Ok thanks looks like I just had to run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about the delay, tab got lost in the thicket for a while. The code builds and the feature works as expected, just some details in the comments. I'll let the unrelated modified files slide since that's black and you seperated that into its own commit already. Might be good to give a way for the user to add their own search engine as well, but this probably works.
guake/data/prefs.glade
Outdated
@@ -135,7 +135,7 @@ | |||
<property name="can-focus">False</property> | |||
<property name="halign">start</property> | |||
<property name="margin-top">6</property> | |||
<property name="label" translatable="yes"><span size="18000"><b>Guake properties</b></span></property> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo introduced?
guake/data/prefs.glade
Outdated
<object class="GtkLabel" id="lb_search_engine"> | ||
<property name="visible">True</property> | ||
<property name="can-focus">False</property> | ||
<property name="label" translatable="yes">Search Engine: </property> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally don't want to do spacing by just adding a bunch of spaces when doing UI work. I assume you did this to make a UI element line up somewhere, but if you want to do that you should use columns. The spaces are difficult for the translators to understand and match, just strip the spaces and if you want to do a re-layout that can be another pr
guake/prefs.py
Outdated
@@ -296,6 +296,10 @@ def on_prompt_on_close_tab_changed(self, combo): | |||
"""Set the `prompt_on_close_tab' property in dconf""" | |||
self.settings.general.set_int("prompt-on-close-tab", combo.get_active()) | |||
|
|||
def on_search_engine_changed(self, combo): | |||
print("VALUE: ", combo.get_active()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to use the logging functions over prints so that users can control log levels
guake/callbacks.py
Outdated
@@ -53,8 +53,18 @@ def on_search_on_web(self, *args): | |||
clipboard = Gtk.Clipboard.get_default(self.window.get_display()) | |||
query = clipboard.wait_for_text() | |||
query = quote_plus(query) | |||
|
|||
# the urls of the search engine options | |||
ENGINES = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This dict should probably be declared outside of this function, don't need to recreate this dict every time we open a link
Added a release note file, the patch works, for the future it could do with a way for the user to add their own search engine but this'll do for now I think |
For issue #2088