Skip to content

search engine can be set to preference - #2125

Merged
Davidy22 merged 4 commits into
Guake:masterfrom
PhantomLel:master
Sep 21, 2022
Merged

search engine can be set to preference#2125
Davidy22 merged 4 commits into
Guake:masterfrom
PhantomLel:master

Conversation

@PhantomLel

Copy link
Copy Markdown
Contributor

For issue #2088

@PhantomLel

Copy link
Copy Markdown
Contributor Author

why's that failing?

@Davidy22

Davidy22 commented Sep 9, 2022

Copy link
Copy Markdown
Collaborator

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

@PhantomLel

Copy link
Copy Markdown
Contributor Author

Ok thanks looks like I just had to run black

@Davidy22 Davidy22 left a comment

Copy link
Copy Markdown
Collaborator

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.

Comment thread guake/data/prefs.glade
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="margin-top">6</property>
<property name="label" translatable="yes">&lt;span size="18000"&gt;&lt;b&gt;Guake properties&lt;/b&gt;&lt;/span&gt;</property>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo introduced?

Comment thread 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>

Copy link
Copy Markdown
Collaborator

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

Comment thread guake/prefs.py Outdated
self.settings.general.set_int("prompt-on-close-tab", combo.get_active())

def on_search_engine_changed(self, combo):
print("VALUE: ", combo.get_active())

Copy link
Copy Markdown
Collaborator

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

Comment thread guake/callbacks.py Outdated
query = quote_plus(query)

# the urls of the search engine options
ENGINES = {

Copy link
Copy Markdown
Collaborator

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

@Davidy22

Copy link
Copy Markdown
Collaborator

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

@Davidy22
Davidy22 merged commit 50c1944 into Guake:master Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants