diff options
author | Michael Meeks <michael.meeks@suse.com> | 2013-01-10 17:38:18 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-01-10 17:39:04 +0000 |
commit | 0260f0b256c3675bb6d836c0a2babb7626577b7a (patch) | |
tree | f0ce69f105e10bcf7927b01aed6798dd2cdfc302 /vcl | |
parent | 364cce0a511d3e7a3bbc51e09895999fbdf0dbe1 (diff) |
export cleaned up dotted version in environment and GtkWindow user-data.
Change-Id: If865127a9a5560f4b3636fb870699e2f3bac0e83
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/svdata.hxx | 5 | ||||
-rw-r--r-- | vcl/source/app/svapp.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/gtk/window/gtkframe.cxx | 6 |
4 files changed, 14 insertions, 5 deletions
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index ff87f290c70a..515bcbc7fdff 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -45,6 +45,11 @@ #include <boost/unordered_map.hpp> +#include <config_version.h> + +#define LIBO_VERSION_DOTTED (LIBO_VERSION_MAJOR "." LIBO_VERSION_MINOR "." \ + LIBO_VERSION_MICRO "." LIBO_VERSION_PATCH) + struct ImplTimerData; struct ImplConfigData; class ImplDirectFontSubstitution; diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 1a799876bb0a..c6c6c5abd53f 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -205,6 +205,10 @@ Application* GetpApp() Application::Application() { + // useful for themes at least, perhaps extensions too + rtl::OUString aVar("LIBO_VERSION"), aValue(LIBO_VERSION_DOTTED); + osl_setEnvironment(aVar.pData, aValue.pData); + if( ! ImplGetSVData() ) ImplInitSVData(); ImplGetSVData()->mpApp = this; diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index 46a4c01e49f7..736834ac2a22 100644 --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_version.h> #include "vcl/svapp.hxx" @@ -4173,6 +4174,9 @@ static void NWAddWidgetToCacheWindow( GtkWidget* widget, SalX11Screen nScreen ) if ( !rData.gCacheWindow ) { rData.gCacheWindow = gtk_window_new( GTK_WINDOW_TOPLEVEL ); + g_object_set_data( G_OBJECT( rData.gCacheWindow ), "libo-version", + (gpointer)LIBO_VERSION_DOTTED ); + GdkScreen* pScreen = gdk_display_get_screen( gdk_display_get_default(), nScreen.getXScreen() ); if( pScreen ) diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx index 6bba14123185..398ece4c300a 100644 --- a/vcl/unx/gtk/window/gtkframe.cxx +++ b/vcl/unx/gtk/window/gtkframe.cxx @@ -1071,11 +1071,7 @@ void GtkSalFrame::Init( SalFrame* pParent, sal_uLong nStyle ) m_pWindow = gtk_widget_new( GTK_TYPE_WINDOW, "type", eWinType, "visible", FALSE, NULL ); g_object_set_data( G_OBJECT( m_pWindow ), "SalFrame", this ); - - static char pVersion[16] = ""; - if( pVersion[0] == '\0' ) - g_sprintf( pVersion, "%d", SUPD ); - g_object_set_data( G_OBJECT( m_pWindow ), "libo-version", pVersion ); + g_object_set_data( G_OBJECT( m_pWindow ), "libo-version", (gpointer)LIBO_VERSION_DOTTED); // force wm class hint m_nExtStyle = ~0; |