Extended input issues with later GTK2
by Jon Cruz
Just wanted to toss out a note that I think I've found a main problem with how Inkscape deals with extended input devices. The issue where they give no extended pressure, etc. on later GTK2, including that in Ubuntu 11.10, is due to missing event initialization.
I'm trying to narrow it down a bit. Of course, there are still some other bugs that appear to give random garbage in the middle of extended input. There's a good chance that a simple work-around could even filter those out.
So, the main thing now is to know if anyone is trying to use tablets currently and is tripping over GTK2 extended input problems. Speak on up and we might be able to get things at least passible soon.
Thanks.
11 years, 10 months
Re: [Inkscape-devel] Extended input issues with later GTK2
by Jasper van de Gronde
On 11-01-12 16:22, jbc.engelen@...2731... wrote:
> ---- Jasper van de Gronde <th.v.d.gronde@...528...> wrote:
>> I usually just download the latest TDM GCC from this site:
>> http://tdm-gcc.tdragon.net/download
>> I would recommend taking the 32 bit bundle installer.
>>
>> Any objections if I update the Wiki page to point to the site above
>> instead of the direct download?
>
> Not at all. We should always be able to build with latest TDM GCC.
>
Done.
11 years, 10 months
Re: [Inkscape-devel] NULL vs. 0
by Jon Cruz
On Jan 7, 2012, at 11:39 AM, Tomaz Canabrava wrote:
> Stroustrup answer to that:
>
> Should I use NULL or 0?
>
> In C++, the definition of NULL is 0, so there is only an aesthetic
> difference. I prefer to avoid macros, so I use 0. Another problem with
> NULL is that people sometimes mistakenly believe that it is different
> from 0 and/or not an integer.
Actually, for a modern compiler NULL is not an integer.
C++ did a bit of a change, and 0 gained special meaning. I believe that most of the systems where it made an actual difference are now gone, but it did.
However... the main reason I made the code change is that when I updated to gcc 4.5.2, it started warning on that constructor. It complained that we were setting a pointer value into a non-pointer variable.
So we probably have NULL defined as some pointerish macro or value and which should not be assigned to integer variables, while '0' is a magical constant that the compiler knows to just do the right thing with for both pointers and integers. '0' by the C++ language definition works in all cases, but NULL does not.
This and the associated warning start to become very important for 64-bit code. Mixing integers and pointers leads to major problems.
Bottom line, though, is that we need to remove warnings by fixing the code. The pointer assignments in that initializer could be changed to "NULL", but the integer ones need to stay changed to zero.
11 years, 10 months
Unweirdification of preferences button location in toolbar ; )
by Johan Engelen
Hi all,
With the unweirdification of the preferences dialog in place... shall we
exchange the locations of the document properties and inkscape
preferences buttons in the toolbar? I am always confused to see them in
the order they are in now.
Ciao,
Johan
11 years, 10 months
NULL vs. 0
by Johan Engelen
Hi all,
Before reading on, have a look at this code fragment, and ask yourself
the question "what type is _desktop, _verb_t, _css, _tool_obs, etc.?"
StyleSwatch::StyleSwatch(SPCSSAttr *css, gchar const *main_tip)
:
_desktop(0),
_verb_t(0),
_css(0),
_tool_obs(0),
_style_obs(0),
_table(2, 6),
_sw_unit(0)
The correct answer is:
_desktop is a pointer
_verb_t is an int
_css is a pointer
_tool_obs is a pointer
_style_obs is a pointer
_sw_unit is a pointer
Please STOP changing NULL into 0. It makes the code completely
unreadable and makes me want to quit Inkscape. I am not kidding.
Thanks,
Johan
11 years, 10 months
New: add nodes at extreme values
by Johan Engelen
Hi all,
To help font designers, I just added new functionality to the node tool.
It adds a node at the extreme values of a path, if there is not already
a node there.
(because of a bug in 2geom, it does not work for some special cases, we
are working on it)
At the moment, this new feature adds 4 buttons to the node tool. Way too
much of course. The plan is to move them into a submenu of the Add nodes
button. This should not be too hard, the first step is to rewrite in
/src/widget/toolbox.cpp:
" <toolitem action='NodeInsertAction' />"
" <toolitem action='NodeInsertActionMinX' />"
" <toolitem action='NodeInsertActionMaxX' />"
" <toolitem action='NodeInsertActionMinY' />"
" <toolitem action='NodeInsertActionMaxY' />"
to
" <toolitem action='NodeInsertAction'>"
" <menu action='NodeInsertActionMenu'>"
" <menuitem action='NodeInsertActionMinX' />"
" <menuitem action='NodeInsertActionMaxX' />"
" <menuitem action='NodeInsertActionMinY' />"
" <menuitem action='NodeInsertActionMaxY' />"
" </menu>"
" </toolitem>"
or so I learn from a gtk demo [1]. It uses a new GtkMenuToolButton [2].
But, alas, if you rewrite it, you get GTK errors and Inkscape terminates...
I hope someone can find the time and spirit to work on this. Thanks!
Cheers,
Johan
[1]
http://git.gnome.org/browse/gtk+/tree/demos/gtk-demo/appwindow.c?id=2.24.8
[2] http://developer.gnome.org/gtk/2.24/GtkMenuToolButton.html
11 years, 10 months
Deep Ungroup
by Matěj Cepl
Hi,
in view of https://bugs.launchpad.net/inkscape/+bug/171117 I have
created this small extension for recursive ungrouping
https://gitorious.org/various-small-stuff/inkscape-ungroup-deep/
(tarball should be available at
https://gitorious.org/various-small-stuff/inkscape-ungroup-deep/trees/0.1).
It is just proof-of-concept (version 0.1) but seems to work for me. Bug
reports, or (even better) patches and pull requests are more than welcome!
I was told on #inkscape IRC channel that I cannot add my extension on
http://wiki.inkscape.org/wiki/index.php/Extension_repository so if
anybody would be able and willing to put it there, I would really
appreciate it.
Thanks a lot (and happy New Year!)
Matěj
--
http://www.ceplovi.cz/matej/, Jabber: mcepl<at>ceplovi.cz
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC
"Anything essential is invisible to the eyes", the little prince
repeated, in order to remember.
"It's the time you spent on your rose that makes your rose so
important."
"It's the time I spent on my rose ...," the little prince
repeated, in order to remember.
"People have forgotten this truth." the fox said. "But you
mustn't forget it. You become responsible forever for what
you've tamed. You're responsible for your rose..."
"I'm responsible for my rose...," the little prince repeated, in
order to remember.
-- Antoine de Saint-Exup?ry: The Little Prince
11 years, 10 months