Hi Ruslan,
On Sat, 2013-01-05 at 22:59 +0300, Ruslan Kabatsayev wrote:
What about such a simple change, which will let us set LibO version
once and for all GTK theme calls:
I guess we could do; we'd want to produce a real version string for a
patch though :-)
The reason why I put it on the top-level windows was so that it can be
avoided for native widgets (eg. the gtk+ file selector) - but if that's
not an issue then fine :-)
// init gtk/gdk
gtk_init_check( &nParams, &pCmdLineAry );
+ g_setenv("LibreOffice_Version","4.0.0.0",true);
gdk_error_trap_push();
aOrigXIOErrorHandler = XSetIOErrorHandler(XIOErrorHdl);
--------------------------------
Of course, "4.0.0.0" should be replaced by some variable, name of
which I currently don't know. But how do you like this idea? It seems
the easiest and most efficient compared to any g_object_set_data()
way.
The g_object_set_data stuff is already in:
+ static char pVersion[16] = "";
+ if( pVersion[0] == '\0' )
+ g_sprintf( pVersion, "%d", SUPD );
+ g_object_set_data( G_OBJECT( m_pWindow ), "libo-version", pVersion );
+
should be in 4.0 and master.
I wonder if we get problems from the (un-parented) fake widgets that
are used in the salnativewidgets-gtk pile [ could that be why it doesn't
work for you ? ].
If that's the issue (and most likely it is) - then we'd want to add a
similar chunk of version code to the above to:
static void NWAddWidgetToCacheWindow( GtkWidget* widget, SalX11Screen nScreen )
Where we construct and realize the cache window (I guess).
Using SUPD is reasonably easy - it is a 4.0.0 -> 400 thing: not
terribly robust over big versions, but easy enough to parse I guess.
If you propose a patch, we can get it into 4.0.1rc2 !
Thanks :-)
Michael.
--
michael.meeks@suse.com <><, Pseudo Engineer, itinerant idiot
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.