Fwd: Global Shortcuts
kde at michael-jansen.biz
Thu Mar 6 17:28:57 GMT 2008
On Thursday 06 March 2008 17:56:15 Andreas Hartmetz wrote:
> Am Donnerstag 06 März 2008 17:19:38 schrieb Michael Jansen:
> > If i understood Andreas implementation correctly all that will bring the
> > following behavior:
> > When editing shortcuts from the application itself utilizing
> > kshortcutseditor you will be able to assign a global shortcut to any
> > action. That's exactly what David meant.
> > When using the global shortcuts editor form kcmhotkeys you will NOT see
> > all shortcuts of all applications. globalaccel only stores shortcuts that
> > have currently a global shortcut assigned or are empty but have been
> > enabled either by calling enableGlobalShortcut or by calling
> > setGlobalShortcut with an empty KShortcut(). That what kwin is doing for
> > example. So you will only see those shortcut and not all.
> > So you have to use the application local shortcut editor to assign a
> > global shortcut for actions currently not known to globaccel.
> > That why i came to the conclusion an application developer would have to
> > enable an global shortcut for an action explicit.
> It's... complicated. I have done enough testing of the core of the new code
> to assume that it works :) and the KCM is next.
> Michael: It would be good if you didn't touch the KCM this week so I can
> port it without interference. Also, your code is just fine. Your coding
> style however made me shake my head in disbelief. While kdebase is not
> kdelibs, please try to use a standard-ish style. Things like
> foo, bar,
> baz, blah
Do the example correct
I prefer this because it's easier to read on my pov.
> if (stuff)
That only happens when i develop a completly new file. Else i try to mimic the
code layout that's used in the file i work in.
> foo(bar );
That's an oversight. I won't do that by purpose.
That's not mine. I didn't to templates.
> Q_FOREACH (blah, blarg) //it's not in a public header!
Explanation please. Q_FOREACH is an macro. Alternatives?
> void Foo::Bar(
> Thing thing,
> Stuff stuff
10 years of developing bring some habits. You think it's wrong and bad. I thin
kg it's ok and easiest to read. I have developed these habits over a long time
working in different projects and imho it's the right thing to do. I prefer
these to lines over 80 characters long. If it's under 80 all stays in one line
> and some weirdnesses with initializer lists bring tears to my eyes. Just
> don't do it. Please. I have changed these here in my local copy before
> making the other modifications. I can either check in those changes or you
> can do it or we can have an old-fashioned fist fight...
> Again, the code itself is just fine. The formatting is such that I cannot
> touch the code without compulsively changing the formatting everywhere.
If i had that way of working the code would look completely different. If
i changed every file i have touched according to my preferences there would
have been much more changes. But go ahead. I don't care enough for code
formatting to fight over it.
And judging from the code i stumbled over noone else in kde does to. I have se
en each and every style possible. Included using tabs. That's the only coding
style i care about. It's an absolute no.
Available for contract work ( Development / Configuration Management )
More information about the kde-core-devel