[Libreoffice-commits] .: vcl/unx

2013-01-23 Thread Libreoffice Gerrit user
 vcl/unx/gtk/fpicker/SalGtkPicker.cxx |8 
 1 file changed, 8 deletions(-)

New commits:
commit 4aa908cf3a63bf4117357a8fbaeb2fd8dd5be310
Author: Stephan Bergmann 
Date:   Wed Jan 23 15:33:28 2013 +0100

Unused #includes

Change-Id: I624f35026b8ee847d70d429c61cd93d6a603d8b0

diff --git a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx 
b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx
index 9928143..6d5a9c6 100644
--- a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx
@@ -23,19 +23,11 @@
 #undef _LINUX_SOURCE_COMPAT
 #endif
 
-#include 
 #include 
 #include 
-#include 
-#include 
-#include 
-#include 
-#include 
 #include 
-#include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2013-01-23 Thread Libreoffice Gerrit user
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit e8e82bd2109b82ddd535cdac30303249c6b62942
Author: Abdulaziz A Alayed 
Date:   Tue Jan 22 11:43:30 2013 +0300

fdo#44582 fixing horizontal scroll bar in sub windows

Change-Id: Ifea57dec77c5b23771684a1e46267f8431478075
Reviewed-on: https://gerrit.libreoffice.org/1806
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx 
b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 736834a..e15fbfa 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -1041,7 +1041,12 @@ sal_Bool GtkSalGraphics::getNativeControlRegion(  
ControlType nType,
 rNativeContentRegion.Right() = rNativeContentRegion.Left() + 1;
 if (!rNativeContentRegion.GetHeight())
 rNativeContentRegion.Bottom() = rNativeContentRegion.Top() + 1;
-returnVal = sal_True;
+
+returnVal = true;
+
+//See fdo#44582, Horizontal scrollbar in navigator window is broken
+if ((nPart==PART_BUTTON_LEFT || nPart==PART_BUTTON_RIGHT) && 
Application::GetSettings().GetLayoutRTL())
+returnVal = false;
 }
 if( (nType == CTRL_MENUBAR) && (nPart == PART_ENTIRE_CONTROL) )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2013-01-22 Thread Libreoffice Gerrit user
 vcl/unx/generic/app/keysymnames.cxx |   37 
 1 file changed, 37 insertions(+)

New commits:
commit 67eaa6c9f1cb599c158df008ccb75afb60bb8bef
Author: Aurimas Fišeras 
Date:   Sat Jan 19 22:08:10 2013 +0200

Add Lithuanian translations of keyboard shortcuts (related to fdo#50415)

Change-Id: Ie5df8819c59135625f504f7d5b6736ddab7aab53
Reviewed-on: https://gerrit.libreoffice.org/1774
Reviewed-by: Petr Mladek 
Tested-by: Petr Mladek 

diff --git a/vcl/unx/generic/app/keysymnames.cxx 
b/vcl/unx/generic/app/keysymnames.cxx
index 7fd127b..b733c73 100644
--- a/vcl/unx/generic/app/keysymnames.cxx
+++ b/vcl/unx/generic/app/keysymnames.cxx
@@ -406,6 +406,42 @@ namespace vcl_sal {
 { SunXK_Cut,   "Retalla" },
 };
 
+static const struct KeysymNameReplacement aImplReplacements_Lithuanian[] =
+{
+{ XK_Control_L, "Vald" },
+{ XK_Control_R, "Vald" },
+{ XK_Shift_L, "Lyg2" },
+{ XK_Shift_R, "Lyg2" },
+{ XK_Alt_L, "Alt" },
+{ XK_Alt_R, "Lyg3" },
+{ XK_Page_Up, "Psl↑" },
+{ XK_Page_Down, "Psl↓" },
+{ XK_End, "Pab" },
+{ XK_Home, "Prad" },
+{ XK_Insert, "Įterpti" },
+{ XK_Delete, "Å al" },
+{ XK_Escape, "Gr" },
+{ XK_Right, "Dešinėn" },
+{ XK_Left, "Kairėn" },
+{ XK_Up, "Aukštyn" },
+{ XK_Down, "Žemyn" },
+{ XK_BackSpace, "Naikinti" },
+{ XK_Return, "Įvesti" },
+{ XK_asterisk, "Žvaigždutė" },
+{ XK_slash, "Dešininis brūkšnys" },
+{ XK_space, "Tarpas" },
+{ SunXK_Stop,  "Stabdyti" },
+{ SunXK_Again, "Kartoti" },
+{ SunXK_Props, "Savybės" },
+{ SunXK_Undo,  "Atšaukti" },
+{ SunXK_Front, "Priekinis planas" },
+{ SunXK_Copy,  "Kopijuoti" },
+{ SunXK_Open,  "Atverti" },
+{ SunXK_Paste, "Įdėti" },
+{ SunXK_Find,  "Ieškoti" },
+{ SunXK_Cut,   "IÅ¡kirpti" },
+};
+
 static const struct KeyboardReplacements aKeyboards[] =
 {
 { "ca", aImplReplacements_Catalan, 
SAL_N_ELEMENTS(aImplReplacements_Catalan) },
@@ -415,6 +451,7 @@ namespace vcl_sal {
 { "et", aImplReplacements_Estonian, 
SAL_N_ELEMENTS(aImplReplacements_Estonian) },
 { "fr", aImplReplacements_French, 
SAL_N_ELEMENTS(aImplReplacements_French) },
 { "it", aImplReplacements_Italian, 
SAL_N_ELEMENTS(aImplReplacements_Italian) },
+{ "lt", aImplReplacements_Lithuanian, 
SAL_N_ELEMENTS(aImplReplacements_Lithuanian) },
 { "nl", aImplReplacements_Dutch, 
SAL_N_ELEMENTS(aImplReplacements_Dutch) },
 { "no", aImplReplacements_Norwegian, 
SAL_N_ELEMENTS(aImplReplacements_Norwegian) },
 { "pt", aImplReplacements_Portuguese, 
SAL_N_ELEMENTS(aImplReplacements_Portuguese) },
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2013-01-22 Thread Libreoffice Gerrit user
 vcl/unx/generic/app/keysymnames.cxx |   36 
 1 file changed, 36 insertions(+)

New commits:
commit b35b7f8285b60271eeae257ea350a615523391a4
Author: Martin Srebotnjak 
Date:   Tue Jan 22 13:21:46 2013 +0100

Translate keyboard shortcuts also for Linux

Change-Id: I4d2f85106045a22be61c6b42fad941e4d4cf88d5

diff --git a/vcl/unx/generic/app/keysymnames.cxx 
b/vcl/unx/generic/app/keysymnames.cxx
index 05c37d4..7fd127b 100644
--- a/vcl/unx/generic/app/keysymnames.cxx
+++ b/vcl/unx/generic/app/keysymnames.cxx
@@ -281,6 +281,41 @@ namespace vcl_sal {
 { SunXK_Cut,   "Cut" },
 };
 
+static const struct KeysymNameReplacement aImplReplacements_Slovenian[] =
+{
+{ XK_Control_L, "Krmilka" },
+{ XK_Control_R, "Krmilka" },
+{ XK_Shift_L, "Dvigalka" },
+{ XK_Shift_R, "Dvigalka" },
+{ XK_Alt_L, "Izmenjalka" },
+{ XK_Alt_R, "Desna izmenjalka" },
+{ XK_Page_Up, "Prejšnja stranf" },
+{ XK_Page_Down, "Naslednja stran" },
+{ XK_End, "Konec" },
+{ XK_Home, "Začetek" },
+{ XK_Insert, "Vstavljalka" },
+{ XK_Delete, "Brisalka" },
+{ XK_Escape, "Ubežnica" },
+{ XK_Right, "Desno" },
+{ XK_Left, "Levo" },
+{ XK_Up, "Navzgor" },
+{ XK_Down, "Navzdol" },
+{ XK_BackSpace, "Vračalka" },
+{ XK_Return, "Vnašalka" },
+{ XK_slash, "Poševnica" },
+{ XK_space, "Preslednica" },
+{ SunXK_Stop,  "Ustavi" },
+{ SunXK_Again, "Ponovi" },
+{ SunXK_Props, "Lastnosti" },
+{ SunXK_Undo,  "Razveljavi" },
+{ SunXK_Front, "Ospredje" },
+{ SunXK_Copy,  "Kopiraj" },
+{ SunXK_Open,  "Odpri" },
+{ SunXK_Paste, "Prilepi" },
+{ SunXK_Find,  "Najdi" },
+{ SunXK_Cut,   "Izreži" },
+};
+
 static const struct KeysymNameReplacement aImplReplacements_Spanish[] =
 {
 { XK_Shift_L, "Mayús" },
@@ -375,6 +410,7 @@ namespace vcl_sal {
 {
 { "ca", aImplReplacements_Catalan, 
SAL_N_ELEMENTS(aImplReplacements_Catalan) },
 { "de", aImplReplacements_German, 
SAL_N_ELEMENTS(aImplReplacements_German) },
+{ "sl", aImplReplacements_Slovenian, 
SAL_N_ELEMENTS(aImplReplacements_Slovenian) },
 { "es", aImplReplacements_Spanish, 
SAL_N_ELEMENTS(aImplReplacements_Spanish) },
 { "et", aImplReplacements_Estonian, 
SAL_N_ELEMENTS(aImplReplacements_Estonian) },
 { "fr", aImplReplacements_French, 
SAL_N_ELEMENTS(aImplReplacements_French) },
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2013-01-04 Thread Libreoffice Gerrit user
 vcl/unx/generic/app/keysymnames.cxx |   31 +++
 1 file changed, 31 insertions(+)

New commits:
commit 5dcb323352b175bfdcd994c4941433df98ffd4dd
Author: Jesús Corrius 
Date:   Fri Jan 4 16:17:23 2013 +0100

fdo#50415: Add Catalan translations of keyboard shortcuts

Change-Id: Ieeab5b84674d26e4d29324614641813d8b65c517
Reviewed-on: https://gerrit.libreoffice.org/1543
Reviewed-by: Tor Lillqvist 
Tested-by: Tor Lillqvist 

diff --git a/vcl/unx/generic/app/keysymnames.cxx 
b/vcl/unx/generic/app/keysymnames.cxx
index 69aee0d..05c37d4 100644
--- a/vcl/unx/generic/app/keysymnames.cxx
+++ b/vcl/unx/generic/app/keysymnames.cxx
@@ -341,8 +341,39 @@ namespace vcl_sal {
 { SunXK_Cut,   "Lõika" },
 };
 
+static const struct KeysymNameReplacement aImplReplacements_Catalan[] =
+{
+{ XK_Shift_L, "Maj" },
+{ XK_Shift_R, "Maj" },
+{ XK_Page_Up, "Re Pàg" },
+{ XK_Page_Down, "Av Pàg" },
+{ XK_End, "Fi" },
+{ XK_Home, "Inici" },
+{ XK_Delete, "Supr" },
+{ XK_Escape, "Esc" },
+{ XK_Right, "Dreta" },
+{ XK_Left, "Esquerra" },
+{ XK_Up, "Amunt" },
+{ XK_Down, "Avall" },
+{ XK_BackSpace, "Retrocés" },
+{ XK_Return, "Retorn" },
+{ XK_space, "Espai" },
+{ XK_KP_Enter, "Retorn" },
+{ SunXK_Stop,  "Atura" },
+{ SunXK_Again, "Repeteix" },
+{ SunXK_Props, "Props" },
+{ SunXK_Undo,  "Desfés" },
+{ SunXK_Front, "Davant" },
+{ SunXK_Copy,  "Còpia" },
+{ SunXK_Open,  "Obre" },
+{ SunXK_Paste, "Enganxa" },
+{ SunXK_Find,  "Cerca" },
+{ SunXK_Cut,   "Retalla" },
+};
+
 static const struct KeyboardReplacements aKeyboards[] =
 {
+{ "ca", aImplReplacements_Catalan, 
SAL_N_ELEMENTS(aImplReplacements_Catalan) },
 { "de", aImplReplacements_German, 
SAL_N_ELEMENTS(aImplReplacements_German) },
 { "es", aImplReplacements_Spanish, 
SAL_N_ELEMENTS(aImplReplacements_Spanish) },
 { "et", aImplReplacements_Estonian, 
SAL_N_ELEMENTS(aImplReplacements_Estonian) },
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-12-19 Thread Libreoffice Gerrit user
 vcl/unx/kde4/KDE4FilePicker.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 28e4c0250e67a344b4d6088bdca2e680a4bffad0
Author: Luboš Luňák 
Date:   Wed Dec 19 13:33:15 2012 +0100

fix KDE file dialog setting checkboxes to true

No idea how long this has been broken, or if it ever worked,
but inserting a picture sets the 'link' and 'preview' checkboxes to true
for the next time (as getValue() returns void*, which gets silently
converted to bool *sigh*).

Change-Id: I6af0e09ac5e475fc9ff04cd7f937af0bc7aeea77

diff --git a/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx
index 95f9de3..5759414 100644
--- a/vcl/unx/kde4/KDE4FilePicker.cxx
+++ b/vcl/unx/kde4/KDE4FilePicker.cxx
@@ -362,7 +362,7 @@ void SAL_CALL KDE4FilePicker::setValue( sal_Int16 
controlId, sal_Int16, const un
 case ExtendedFilePickerElementIds::CHECKBOX_SELECTION:
 {
 QCheckBox* cb = dynamic_cast(widget);
-cb->setChecked(value.getValue());
+cb->setChecked(value.get());
 break;
 }
 case ExtendedFilePickerElementIds::PUSHBUTTON_PLAY:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-11-28 Thread Libreoffice Gerrit user
 vcl/unx/gtk/gdi/salprn-gtk.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 6bfc84d14c056818345320b2918963a39cceafba
Author: Caolán McNamara 
Date:   Wed Nov 28 20:09:05 2012 +

get vcl building on RHEL-5

Change-Id: I01dc490d09fbe4bd0cce34b7e93afd36dd517f25

diff --git a/vcl/unx/gtk/gdi/salprn-gtk.cxx b/vcl/unx/gtk/gdi/salprn-gtk.cxx
index e51c552..79a9432 100644
--- a/vcl/unx/gtk/gdi/salprn-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salprn-gtk.cxx
@@ -347,9 +347,15 @@ lcl_setHelpText(
 const uno::Sequence& i_rHelpTexts,
 const sal_Int32 i_nIndex)
 {
+#if GTK_CHECK_VERSION(2,12,0)
 if (i_nIndex >= 0 && i_nIndex < i_rHelpTexts.getLength())
 gtk_widget_set_tooltip_text(io_pWidget,
 rtl::OUStringToOString(i_rHelpTexts.getConstArray()[i_nIndex], 
RTL_TEXTENCODING_UTF8).getStr());
+#else
+(void)io_pWidget;
+(void)i_rHelpTexts;
+(void)i_nIndex;
+#endif
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-11-22 Thread Libreoffice Gerrit user
 vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx |2 +-
 vcl/unx/kde/salnativewidgets-kde.cxx  |8 
 vcl/unx/kde4/KDESalFrame.cxx  |   10 +-
 3 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 6344b00ea1d0ceed64212172f7f2b7c7a77cdabf
Author: Stephan Bergmann 
Date:   Thu Nov 22 13:06:17 2012 +0100

Adapt some GetUILocale leftovers

Change-Id: I0400858249d4722a3b5583febd82200e62a64b20

diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx 
b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index 1037d9d..7d99c32 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -1304,7 +1304,7 @@ void GtkSalGraphics::updateSettings( AllSettings& 
rSettings )
 
 fprintf( stderr, "font name BEFORE system match: \"%s\"\n", 
aFamily.getStr() );
 // match font to e.g. resolve "Sans"
-psp::PrintFontManager::get().matchFont( aInfo, rSettings.GetUILocale() );
+psp::PrintFontManager::get().matchFont( aInfo, 
rSettings.GetUILanguageTag().getLocale() );
 fprintf( stderr, "font match %s, name AFTER: \"%s\"\n",
   aInfo.m_nID != 0 ? "succeeded" : "failed",
   rtl::OUStringToOString( aInfo.m_aStyleName, 
RTL_TEXTENCODING_ISO_8859_1 ).getStr() );
diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx 
b/vcl/unx/kde/salnativewidgets-kde.cxx
index ea8cbc4..1440b84 100644
--- a/vcl/unx/kde/salnativewidgets-kde.cxx
+++ b/vcl/unx/kde/salnativewidgets-kde.cxx
@@ -1873,7 +1873,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
 pKey = "titleFont";
 if ( pConfig->hasKey( pKey ) )
 {
-Font aFont = toFont( pConfig->readFontEntry( pKey ), 
rSettings.GetUILocale() );
+Font aFont = toFont( pConfig->readFontEntry( pKey ), 
rSettings.GetUILanguageTag().getLocale() );
 aStyleSettings.SetTitleFont( aFont );
 bSetTitleFont = true;
 }
@@ -1934,7 +1934,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
 aStyleSettings.SetHighlightTextColor( toColor( 
qColorGroup.highlightedText() ) );
 
 // Font
-Font aFont = toFont( kapp->font(), rSettings.GetUILocale() );
+Font aFont = toFont( kapp->font(), 
rSettings.GetUILanguageTag().getLocale() );
 
 aStyleSettings.SetAppFont( aFont );
 aStyleSettings.SetHelpFont( aFont );
@@ -2005,7 +2005,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
 ImplGetSVData()->maNWFData.maMenuBarHighlightTextColor = aMenuFore;
 
 // Font
-aFont = toFont( pMenuBar->font(), rSettings.GetUILocale() );
+aFont = toFont( pMenuBar->font(), 
rSettings.GetUILanguageTag().getLocale() );
 aStyleSettings.SetMenuFont( aFont );
 }
 
@@ -2013,7 +2013,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
 KToolBar *pToolBar = qMainWindow.toolBar();
 if ( pToolBar )
 {
-aFont = toFont( pToolBar->font(), rSettings.GetUILocale() );
+aFont = toFont( pToolBar->font(), 
rSettings.GetUILanguageTag().getLocale() );
 aStyleSettings.SetToolFont( aFont );
 }
 
diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx
index 1242a3c..6f3fe53 100644
--- a/vcl/unx/kde4/KDESalFrame.cxx
+++ b/vcl/unx/kde4/KDESalFrame.cxx
@@ -192,7 +192,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
 pKey = "titleFont";
 if ( aGroup.hasKey( pKey ) )
 {
-Font aFont = toFont( aGroup.readEntry( pKey, QFont() ), 
rSettings.GetUILocale() );
+Font aFont = toFont( aGroup.readEntry( pKey, QFont() ), 
rSettings.GetUILanguageTag().getLocale() );
 style.SetTitleFont( aFont );
 bSetTitleFont = true;
 }
@@ -207,7 +207,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
 pKey = "toolbarFont";
 if ( aGroup.hasKey( pKey ) )
 {
-Font aFont = toFont( aGroup.readEntry( pKey, QFont() ), 
rSettings.GetUILocale() );
+Font aFont = toFont( aGroup.readEntry( pKey, QFont() ), 
rSettings.GetUILanguageTag().getLocale() );
 style.SetToolFont( aFont );
 }
 }
@@ -263,7 +263,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
 style.SetHelpTextColor( toColor( QToolTip::palette().color( 
QPalette::Active, QPalette::ToolTipText )));
 
 // Font
-Font aFont = toFont( kapp->font(), rSettings.GetUILocale() );
+Font aFont = toFont( kapp->font(), 
rSettings.GetUILanguageTag().getLocale() );
 
 style.SetAppFont( aFont );
 
@@ -284,7 +284,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
 }
 style.SetFloatTitleFont( aFont );
 
-style.SetHelpFont( toFont( QToolTip::font(), rSettings.GetUILocale()));
+style.SetHelpFont( toFont( QToolTip::font(), 
rSettings.GetUILanguageTag().getLocale()));
 
 int flash_time = QApplication::cursorFlashTime();
 style

[Libreoffice-commits] .: vcl/unx

2012-11-21 Thread Libreoffice Gerrit user
 vcl/unx/gtk/window/gloactiongroup.cxx |2 ++
 vcl/unx/gtk/window/glomenu.cxx|6 --
 vcl/unx/gtk/window/gtksalmenu.cxx |4 ++--
 vcl/unx/gtk/window/hudawareness.cxx   |5 -
 4 files changed, 12 insertions(+), 5 deletions(-)

New commits:
commit f5cc79a1202f3c8933d846756cf0a9fe8df49682
Author: Thorsten Behrens 
Date:   Wed Nov 21 14:10:40 2012 +0100

UnityMenu: ensure ENABLE_GMENU_INTEGRATION is actually ever set

Change-Id: I6b7dfd5dd80f45c216c9ec240a390b6434a12672

diff --git a/vcl/unx/gtk/window/gloactiongroup.cxx 
b/vcl/unx/gtk/window/gloactiongroup.cxx
index 0d253ef..f8132a0 100644
--- a/vcl/unx/gtk/window/gloactiongroup.cxx
+++ b/vcl/unx/gtk/window/gloactiongroup.cxx
@@ -7,6 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
+
 #ifdef ENABLE_GMENU_INTEGRATION
 
 #include 
diff --git a/vcl/unx/gtk/window/glomenu.cxx b/vcl/unx/gtk/window/glomenu.cxx
index c5a0126..8227fb1 100644
--- a/vcl/unx/gtk/window/glomenu.cxx
+++ b/vcl/unx/gtk/window/glomenu.cxx
@@ -7,11 +7,13 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifdef ENABLE_GMENU_INTEGRATION
-
 #include 
 #include 
 
+#include 
+
+#ifdef ENABLE_GMENU_INTEGRATION
+
 #include 
 
 struct _GLOMenu
diff --git a/vcl/unx/gtk/window/gtksalmenu.cxx 
b/vcl/unx/gtk/window/gtksalmenu.cxx
index 5474c7b..d3c20a2 100644
--- a/vcl/unx/gtk/window/gtksalmenu.cxx
+++ b/vcl/unx/gtk/window/gtksalmenu.cxx
@@ -7,10 +7,10 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifdef ENABLE_GMENU_INTEGRATION
-
 #include 
 
+#ifdef ENABLE_GMENU_INTEGRATION
+
 #include 
 #include 
 #include 
diff --git a/vcl/unx/gtk/window/hudawareness.cxx 
b/vcl/unx/gtk/window/hudawareness.cxx
index 1ca2ffa..1f2e56f 100644
--- a/vcl/unx/gtk/window/hudawareness.cxx
+++ b/vcl/unx/gtk/window/hudawareness.cxx
@@ -7,9 +7,12 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
+
+#include 
+
 #ifdef ENABLE_GMENU_INTEGRATION
 
-#include 
 #include 
 
 typedef struct
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-11-21 Thread Libreoffice Gerrit user
 vcl/unx/gtk/window/gloactiongroup.cxx |4 
 vcl/unx/gtk/window/glomenu.cxx|4 
 vcl/unx/gtk/window/gtksalmenu.cxx |4 
 vcl/unx/gtk/window/hudawareness.cxx   |7 ++-
 4 files changed, 18 insertions(+), 1 deletion(-)

New commits:
commit 463f34737e01ca277a7b87741aed8daad9bc45cf
Author: Thorsten Behrens 
Date:   Wed Nov 21 13:03:26 2012 +0100

UnityMenu: don't build when ENABLE_GMENU_INTEGRATION is not on

Change-Id: Iba9e6c3d2483a20ed3ec33b85b4c5f78830fd2f6

diff --git a/vcl/unx/gtk/window/gloactiongroup.cxx 
b/vcl/unx/gtk/window/gloactiongroup.cxx
index ade8551..0d253ef 100644
--- a/vcl/unx/gtk/window/gloactiongroup.cxx
+++ b/vcl/unx/gtk/window/gloactiongroup.cxx
@@ -7,6 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#ifdef ENABLE_GMENU_INTEGRATION
+
 #include 
 
 #include 
@@ -404,4 +406,6 @@ g_lo_action_group_clear (GLOActionGroup  *group)
 }
 }
 
+#endif
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/gtk/window/glomenu.cxx b/vcl/unx/gtk/window/glomenu.cxx
index a712979..c5a0126 100644
--- a/vcl/unx/gtk/window/glomenu.cxx
+++ b/vcl/unx/gtk/window/glomenu.cxx
@@ -7,6 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#ifdef ENABLE_GMENU_INTEGRATION
+
 #include 
 #include 
 
@@ -649,4 +651,6 @@ g_lo_menu_class_init (GLOMenuClass *klass)
 model_class->get_item_links = g_lo_menu_get_item_links;
 }
 
+#endif
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/gtk/window/gtksalmenu.cxx 
b/vcl/unx/gtk/window/gtksalmenu.cxx
index 30c9399..5474c7b 100644
--- a/vcl/unx/gtk/window/gtksalmenu.cxx
+++ b/vcl/unx/gtk/window/gtksalmenu.cxx
@@ -7,6 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#ifdef ENABLE_GMENU_INTEGRATION
+
 #include 
 
 #include 
@@ -797,4 +799,6 @@ GtkSalMenuItem::~GtkSalMenuItem()
 {
 }
 
+#endif
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/gtk/window/hudawareness.cxx 
b/vcl/unx/gtk/window/hudawareness.cxx
index 69261c6..1ca2ffa 100644
--- a/vcl/unx/gtk/window/hudawareness.cxx
+++ b/vcl/unx/gtk/window/hudawareness.cxx
@@ -1,5 +1,4 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-
 /*
  * This file is part of the LibreOffice project.
  *
@@ -8,6 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#ifdef ENABLE_GMENU_INTEGRATION
+
 #include 
 #include 
 
@@ -102,3 +103,7 @@ hud_awareness_unregister (GDBusConnection *connection,
 {
   g_dbus_connection_unregister_object (connection, subscription_id);
 }
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-11-19 Thread Libreoffice Gerrit user
 vcl/unx/generic/app/saldisp.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fe71e7bd0c7630b6452e418df14d780dd87ba946
Author: Michael Stahl 
Date:   Mon Nov 19 12:39:56 2012 +0100

SalColormap: -Werror=conversion-null

That is actually XID, not a pointer.

Change-Id: I9fa807fc4f33c07b2b4ebbb5e1b7163eb53411c3

diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index b010359..3310e6d 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -2687,7 +2687,7 @@ SalColormap::SalColormap( sal_uInt16 nDepth )
 SalColormap::~SalColormap()
 {
 #ifdef DBG_UTIL
-m_hColormap  = NULL;
+m_hColormap  = None;
 m_pDisplay   = NULL;
 #endif
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-11-17 Thread Libreoffice Gerrit user
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e059883fb343471fa651f4601f59acc5f37333b6
Author: Ivan Timofeev 
Date:   Sat Nov 17 23:51:48 2012 +0400

gtk: don't make editboxes taller than needed

Change-Id: I248d6668d1e9c5ec834cd8268d853ec03a2f859b

diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx 
b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index d8c1f69..5a1d376 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -1144,7 +1144,7 @@ sal_Bool GtkSalGraphics::getNativeControlRegion(  
ControlType nType,
 GtkRequisition aReq;
 gtk_widget_size_request( widget, &aReq );
 Rectangle aEditRect = rControlRegion;
-long nHeight = (aEditRect.GetHeight() > aReq.height+1) ? 
aEditRect.GetHeight() : aReq.height+1;
+long nHeight = (aEditRect.GetHeight() > aReq.height) ? 
aEditRect.GetHeight() : aReq.height;
 aEditRect = Rectangle( aEditRect.TopLeft(),
Size( aEditRect.GetWidth(), nHeight ) );
 rNativeBoundingRegion = aEditRect;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-11-14 Thread Libreoffice Gerrit user
 vcl/unx/gtk/window/gtkframe.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 14ad313a242ec8791956e3e4a9460f743c0c8d7a
Author: Caolán McNamara 
Date:   Wed Nov 14 13:40:55 2012 +

hud_activated here surely should have been hud_active

Change-Id: Id324a31295b0c6836a1e9516ac070d4042c5c3f2

diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index c4fa0df..88ac7f2 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -518,7 +518,7 @@ static void ObjectDestroyedNotify( gpointer data )
 
 static void hud_activated( gboolean hud_active, gpointer user_data )
 {
-if ( hud_activated )
+if ( hud_active )
 {
 SolarMutexGuard aGuard;
 GtkSalFrame* pSalFrame = reinterpret_cast< GtkSalFrame* >( user_data );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-11-13 Thread Libreoffice Gerrit user
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit a4053378b7a98d8a18415ba5acd8b69ba28793a2
Author: Fridrich Å trba 
Date:   Tue Nov 13 14:04:58 2012 +0100

Solve scope issues with older gtk

Change-Id: Icceb9586b4051009a8843b4672b79daf22e07830

diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx 
b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index c1bdf3c..d8c1f69 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -4028,9 +4028,14 @@ void GtkSalGraphics::updateSettings( AllSettings& 
rSettings )
 static cairo_font_options_t* (*gdk_screen_get_font_options)(GdkScreen*) =
 (cairo_font_options_t*(*)(GdkScreen*))osl_getAsciiFunctionSymbol( 
GetSalData()->m_pPlugin, "gdk_screen_get_font_options" );
 if( gdk_screen_get_font_options != NULL )
-#endif
+{
 const cairo_font_options_t* pNewOptions = gdk_screen_get_font_options( 
pScreen );
+aStyleSet.SetCairoFontOptions( pNewOptions );
+}
+#else
+const cairo_font_options_t* pNewOptions = gdk_screen_get_font_options( 
pScreen );
 aStyleSet.SetCairoFontOptions( pNewOptions );
+#endif
 
 // finally update the collected settings
 rSettings.SetStyleSettings( aStyleSet );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-11-12 Thread Libreoffice Gerrit user
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |   10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 776f0184d11965ccf8232ff47206d1e1566a6fd2
Author: Ivan Timofeev 
Date:   Mon Nov 12 18:53:52 2012 +0400

Related: fdo#56198 avoid gtk warning, take 3

We need to check at run time, not at compile.
Thanks to Michael Meeks for spotting!

Change-Id: Ic8175d6af0bb8ec167f108925aaaf31f970fbd05

diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx 
b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 4455c2b..c1bdf3c 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -3990,10 +3990,14 @@ void GtkSalGraphics::updateSettings( AllSettings& 
rSettings )
 gboolean showmenuicons = true, primarybuttonwarps = false;
 g_object_get( pSettings,
 "gtk-menu-images", &showmenuicons,
-#if GTK_CHECK_VERSION(2,24,13)
-"gtk-primary-button-warps-slider", &primarybuttonwarps,
-#endif
 (char *)NULL );
+if( g_object_class_find_property(
+G_OBJECT_GET_CLASS(pSettings), "gtk-primary-button-warps-slider") )
+{
+g_object_get( pSettings,
+"gtk-primary-button-warps-slider", &primarybuttonwarps,
+(char *)NULL );
+}
 aStyleSet.SetPreferredUseImagesInMenus(showmenuicons);
 aStyleSet.SetPrimaryButtonWarpsSlider(primarybuttonwarps);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-11-11 Thread Libreoffice Gerrit user
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1e3e415dbe877666e1575128a7ec3d5d9c076ffa
Author: Ivan Timofeev 
Date:   Sun Nov 11 16:36:14 2012 +0400

Related: fdo#56198 avoid gtk warning, take 2

from http://developer.gnome.org/gtk/2.24/GtkSettings.html

  The "gtk-primary-button-warps-slider" property
  ...
  Since: 2.24

but it is 2.24.13 indeed:


https://mail.gnome.org/archives/ftp-release-list/2012-September/msg00195.html

  News
  

  * Implement a gtk-primary-button-warps-slider setting
that lets us adjust scale and scrollbar behaviour
according to platform.

Change-Id: I4d3170801973e3e6101736971de58d70b673fd58

diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx 
b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index da3c181..4455c2b 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -3990,7 +3990,7 @@ void GtkSalGraphics::updateSettings( AllSettings& 
rSettings )
 gboolean showmenuicons = true, primarybuttonwarps = false;
 g_object_get( pSettings,
 "gtk-menu-images", &showmenuicons,
-#if GTK_CHECK_VERSION(2,24,0)
+#if GTK_CHECK_VERSION(2,24,13)
 "gtk-primary-button-warps-slider", &primarybuttonwarps,
 #endif
 (char *)NULL );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-11-11 Thread Libreoffice Gerrit user
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 0292fbde1763e4a406be15b1771780a6a0c9aa47
Author: Ivan Timofeev 
Date:   Sun Nov 11 15:17:19 2012 +0400

Related: fdo#56198 avoid gtk warning

Change-Id: I230c2923960862f7e705f03a5c8a5763c002256b

diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx 
b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 1451476..da3c181 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -3990,7 +3990,9 @@ void GtkSalGraphics::updateSettings( AllSettings& 
rSettings )
 gboolean showmenuicons = true, primarybuttonwarps = false;
 g_object_get( pSettings,
 "gtk-menu-images", &showmenuicons,
+#if GTK_CHECK_VERSION(2,24,0)
 "gtk-primary-button-warps-slider", &primarybuttonwarps,
+#endif
 (char *)NULL );
 aStyleSet.SetPreferredUseImagesInMenus(showmenuicons);
 aStyleSet.SetPrimaryButtonWarpsSlider(primarybuttonwarps);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-11-06 Thread Libreoffice Gerrit user
 vcl/unx/kde/kdedata.cxx  |2 +-
 vcl/unx/kde4/KDEXLib.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6e4d4adc5638d8d51d1df05e22def0c8a32c679f
Author: Luboš Luňák 
Date:   Tue Nov 6 15:52:47 2012 +0100

use the generic LO claim from the about dialog for KDE's internal data

It's not really visible anywhere anyway.

diff --git a/vcl/unx/kde/kdedata.cxx b/vcl/unx/kde/kdedata.cxx
index e521c37..e66475d 100644
--- a/vcl/unx/kde/kdedata.cxx
+++ b/vcl/unx/kde/kdedata.cxx
@@ -122,7 +122,7 @@ void KDEXLib::Init()
 "3.4.0",
 I18N_NOOP( "LibreOffice with KDE Native Widget Support." ),
 KAboutData::License_File,
-"(c) 2003, 2004 Novell, Inc and Apache Software Foundation",
+I18N_NOOP( "Copyright (C) 2000 - 2012 LibreOffice contributors 
and/or their affiliates" ),
 I18N_NOOP( "LibreOffice is an office suite.\n" ),
 "http://libreoffice.org";,
 "libreoffice@lists.freedesktop.org");
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index fc3eafd..dbd6664 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -99,7 +99,7 @@ void KDEXLib::Init()
 "3.6.0",
 ki18n( "LibreOffice with KDE Native Widget Support." ),
 KAboutData::License_File,
-ki18n(" (c) 2003-2012 Novell, Inc and Apache Software Foundation" 
),
+ki18n("Copyright (c) 2000 - 2012 LibreOffice contributors and/or 
their affiliates" ),
 ki18n( "LibreOffice is an office suite.\n" ),
 "http://libreoffice.org";,
 "libreoffice@lists.freedesktop.org");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-11-06 Thread Libreoffice Gerrit user
 vcl/unx/kde4/KDEXLib.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7b32f67d1ab25905fd8866ba10ce39a287b86381
Author: Michael Meeks 
Date:   Tue Nov 6 13:16:02 2012 +

add missing ki18n helper.

diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index 3fc53a0..fc3eafd 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -99,7 +99,7 @@ void KDEXLib::Init()
 "3.6.0",
 ki18n( "LibreOffice with KDE Native Widget Support." ),
 KAboutData::License_File,
-"(c) 2003-2012 Novell, Inc and Apache Software Foundation",
+ki18n(" (c) 2003-2012 Novell, Inc and Apache Software Foundation" 
),
 ki18n( "LibreOffice is an office suite.\n" ),
 "http://libreoffice.org";,
 "libreoffice@lists.freedesktop.org");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-10-25 Thread Libreoffice Gerrit user
 vcl/unx/gtk/app/gtkinst.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b0ec8d8683c800b689a208ca2d44128e2cecefb8
Author: Miklos Vajna 
Date:   Thu Oct 25 17:08:57 2012 +0200

vcl: don't print gtk version on startup

All the other messages are already > 1, makes no sense to have this as
> 0.

Change-Id: I816239903cef650f34d9c57446018843e2acb64a

diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
index 845e2fc..5d67fa1 100644
--- a/vcl/unx/gtk/app/gtkinst.cxx
+++ b/vcl/unx/gtk/app/gtkinst.cxx
@@ -140,7 +140,7 @@ extern "C"
 
 VCLPLUG_GTK_PUBLIC SalInstance* create_SalInstance( oslModule pModule )
 {
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 1
 fprintf( stderr, "create vcl plugin instance with gtk version %d %d 
%d\n",
  (int) gtk_major_version, (int) gtk_minor_version,
  (int) gtk_micro_version );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-10-21 Thread Libreoffice Gerrit user
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit b339e4e2ba2b833903956cbcebf64a2a99dba176
Author: Julien Nabet 
Date:   Sun Oct 21 12:29:58 2012 +0200

Fix Variable 'eState' is reassigned a value before the old one has been used

See 
http://nabble.documentfoundation.org/Cppcheck-report-in-vcl-unx-gtk-gdi-salnativewidgets-gtk-cxx-td4014513.html

Change-Id: I9f59ed1fa0cd325d65f5574332b19625b27f8900

diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx 
b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 5870070..56a9b0a 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -3448,7 +3448,6 @@ sal_Bool GtkSalGraphics::NWPaintGTKSlider(
  : GTK_WIDGET(gWidgetData[m_nXScreen].gVScale);
 const gchar* pDetail = (nPart == PART_TRACK_HORZ_AREA) ? "hscale" : 
"vscale";
 GtkOrientation eOri = (nPart == PART_TRACK_HORZ_AREA) ? 
GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL;
-GtkStateType eState = (nState & CTRL_STATE_ENABLED) ? GTK_STATE_ACTIVE : 
GTK_STATE_INSENSITIVE;
 gint slider_width = 10;
 gint slider_length = 10;
 gint trough_border = 0;
@@ -3458,7 +3457,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKSlider(
   "trough-border", &trough_border,
   NULL);
 
-eState = (nState & CTRL_STATE_ENABLED) ? GTK_STATE_NORMAL : 
GTK_STATE_INSENSITIVE;
+GtkStateType eState = (nState & CTRL_STATE_ENABLED) ? GTK_STATE_NORMAL : 
GTK_STATE_INSENSITIVE;
 if( nPart == PART_TRACK_HORZ_AREA )
 {
 gtk_paint_box( pWidget->style,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-10-13 Thread Libreoffice Gerrit user
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 681e894b1ffa536ea3ccb5071465fbd1b0e34cc3
Author: Ivan Timofeev 
Date:   Sat Oct 13 14:09:45 2012 +0400

brain fog: logic error

Change-Id: I1ebfad03dca16b7530a44dfc7576ff5b73f681aa

diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx 
b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 0b0c0a0..945ae0b 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -2243,7 +2243,7 @@ static void NWPaintOneEditBox(SalX11Screen nScreen,
 "interior-focus",   &bInteriorFocus,
 "focus-line-width", &nFocusLineWidth,
 (char *)NULL);
-if ( bInteriorFocus )
+if ( !bInteriorFocus )
 {
 xborder += nFocusLineWidth;
 yborder += nFocusLineWidth;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-10-11 Thread Libreoffice Gerrit user
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit b19ff316441fb2d1f0537e008ea8b6fdec307224
Author: Ivan Timofeev 
Date:   Thu Oct 11 15:01:52 2012 +0400

fdo#45651: gtk: fix text color with dark themes

Change-Id: I959b7791151fd345c250016ae8ad315a4615a871

diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx 
b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index ce14634..6fd600b 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -3736,13 +3736,14 @@ void GtkSalGraphics::updateSettings( AllSettings& 
rSettings )
 // text colors
 Color aTextColor = getColor( pStyle->text[GTK_STATE_NORMAL] );
 aStyleSet.SetDialogTextColor( aTextColor );
+aStyleSet.SetWindowTextColor( aTextColor );
+aStyleSet.SetFieldTextColor( aTextColor );
+aTextColor = getColor( pStyle->fg[GTK_STATE_NORMAL] );
 aStyleSet.SetButtonTextColor( aTextColor );
 aStyleSet.SetRadioCheckTextColor( aTextColor );
 aStyleSet.SetGroupTextColor( aTextColor );
 aStyleSet.SetLabelTextColor( aTextColor );
 aStyleSet.SetInfoTextColor( aTextColor );
-aStyleSet.SetWindowTextColor( aTextColor );
-aStyleSet.SetFieldTextColor( aTextColor );
 
 // Tooltip colors
 GtkStyle* pTooltipStyle = gtk_widget_get_style( 
gWidgetData[m_nXScreen].gTooltipPopup );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-09-17 Thread Libreoffice Gerrit user
 vcl/unx/generic/app/wmadaptor.cxx |8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 72411fca4852f4395cf4bf206016a041bee6c53a
Author: Christian Lohmaier 
Date:   Mon Sep 17 02:36:51 2012 +0200

don't add invalid UTF-8 to _NET_WM_NAME and _NET_WM_ICON_NAME

time to get rid of workarounds for broken window managers that were
introduced more than 10 years ago.

Change-Id: I43b4c7aeab1b86b3d4a290a1d1d64c6fcb9a57ef
Reviewed-on: https://gerrit.libreoffice.org/633
Reviewed-by: Miklos Vajna 
Tested-by: Miklos Vajna 

diff --git a/vcl/unx/generic/app/wmadaptor.cxx 
b/vcl/unx/generic/app/wmadaptor.cxx
index 784cf10..e920ae7 100644
--- a/vcl/unx/generic/app/wmadaptor.cxx
+++ b/vcl/unx/generic/app/wmadaptor.cxx
@@ -1124,7 +1124,7 @@ void NetWMAdaptor::setWMName( X11SalFrame* pFrame, const 
String& rWMName ) const
  8,
  PropModeReplace,
  (unsigned char*)aTitle.getStr(),
- aTitle.getLength()+1 );
+ aTitle.getLength() );
 if( m_aWMAtoms[ NET_WM_ICON_NAME ] )
 XChangeProperty( m_pDisplay,
  (XLIB_Window)pEnv->aShellWindow,
@@ -1133,11 +1133,7 @@ void NetWMAdaptor::setWMName( X11SalFrame* pFrame, const 
String& rWMName ) const
  8,
  PropModeReplace,
  (unsigned char*)aTitle.getStr(),
- aTitle.getLength()+1 );
-// The +1 copies the terminating null byte. Although
-// the spec says, this should not be necessary
-// at least the kwin implementation seems to depend
-// on the null byte
+ aTitle.getLength() );
 }
 
 /*
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-09-12 Thread Libreoffice Gerrit user
 vcl/unx/generic/app/saldata.cxx |6 ++
 vcl/unx/gtk/app/gtkdata.cxx |   14 ++
 2 files changed, 20 insertions(+)

New commits:
commit b0759366fc6cdda2db2f2cb4208df36c1b1fe8fc
Author: Caolán McNamara 
Date:   Wed Sep 12 13:44:09 2012 +0100

Resolves: rhbz#855541 XIOError handler multithread woes

We have two threads using X, on an XIOError both
threads call their XIOError handlers and two
calls to exit trample all over eachother.

Change-Id: I20defc6f84cc6ea2372a0d6c979e8078fe920a88

diff --git a/vcl/unx/generic/app/saldata.cxx b/vcl/unx/generic/app/saldata.cxx
index 1fb6a7a..0596dce 100644
--- a/vcl/unx/generic/app/saldata.cxx
+++ b/vcl/unx/generic/app/saldata.cxx
@@ -322,6 +322,12 @@ int X11SalData::XErrorHdl( Display *pDisplay, XErrorEvent 
*pEvent )
 
 int X11SalData::XIOErrorHdl( Display * )
 {
+if (::osl::Thread::getCurrentIdentifier() != 
Application::GetMainThreadIdentifier())
+{
+pthread_exit(NULL);
+return 0;
+}
+
 /*  #106197# hack: until a real shutdown procedure exists
  *  _exit ASAP
  */
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index 8f3151c..867883f 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -526,6 +526,18 @@ GtkData::GtkData( SalInstance *pInstance )
 m_aDispatchCondition = osl_createCondition();
 }
 
+XIOErrorHandler aOrigXIOErrorHandler = NULL;
+
+int XIOErrorHdl(Display *pDisplay)
+{
+if (::osl::Thread::getCurrentIdentifier() != 
Application::GetMainThreadIdentifier())
+{
+pthread_exit(NULL);
+return 0;
+}
+return aOrigXIOErrorHandler ? aOrigXIOErrorHandler(pDisplay) : 0;
+}
+
 GtkData::~GtkData()
 {
 Yield( true, true );
@@ -545,6 +557,7 @@ GtkData::~GtkData()
 osl_destroyCondition( m_aDispatchCondition );
 osl_releaseMutex( m_aDispatchMutex );
 osl_destroyMutex( m_aDispatchMutex );
+XSetIOErrorHandler(aOrigXIOErrorHandler);
 }
 
 void GtkData::Dispose()
@@ -664,6 +677,7 @@ void GtkData::Init()
 // init gtk/gdk
 gtk_init_check( &nParams, &pCmdLineAry );
 gdk_error_trap_push();
+aOrigXIOErrorHandler = XSetIOErrorHandler(XIOErrorHdl);
 
 for (i = 0; i < nParams; i++ )
 g_free( pCmdLineAry[i] );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-08-28 Thread Libreoffice Gerrit user
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx  |   17 +
 vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx |   14 ++
 2 files changed, 27 insertions(+), 4 deletions(-)

New commits:
commit 58d757fd295d48bcd2eef51c2f41f5014c1cda21
Author: Ivan Timofeev 
Date:   Tue Aug 28 14:58:34 2012 +0400

gtk: sumulate native insensitivity of scrollbar buttons

Change-Id: I13ac2c43aadd494389586166771b1d0e6bfb9ea6

diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx 
b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index f28cb0a..011e755 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -1948,11 +1948,17 @@ sal_Bool GtkSalGraphics::NWPaintGTKScrollbar( 
ControlType, ControlPart nPart,
 GTK_WIDGET(scrollbarWidget)->allocation.width = w;
 GTK_WIDGET(scrollbarWidget)->allocation.height = h;
 
+bool backwardButtonInsensitive =
+pScrollbarVal->mnCur == pScrollbarVal->mnMin;
+bool forwardButtonInsensitive = pScrollbarVal->mnMax == 0 ||
+pScrollbarVal->mnCur + pScrollbarVal->mnVisibleSize >= 
pScrollbarVal->mnMax;
+
 // - BUTTON 1 //
 if ( has_backward )
 {
 NWConvertVCLStateToGTKState( pScrollbarVal->mnButton1State, 
&stateType, &shadowType );
-if ( stateType == GTK_STATE_INSENSITIVE )stateType = 
GTK_STATE_NORMAL;
+if ( backwardButtonInsensitive )
+stateType = GTK_STATE_INSENSITIVE;
 gtk_paint_box( style, gdkDrawable, stateType, shadowType,
gdkRect, GTK_WIDGET(scrollbarWidget), scrollbarTag,
x+hShim+button11BoundRect.Left(), 
y+vShim+button11BoundRect.Top(),
@@ -1967,7 +1973,8 @@ sal_Bool GtkSalGraphics::NWPaintGTKScrollbar( 
ControlType, ControlPart nPart,
 if ( has_forward2 )
 {
 NWConvertVCLStateToGTKState( pScrollbarVal->mnButton2State, 
&stateType, &shadowType );
-if ( stateType == GTK_STATE_INSENSITIVE )stateType = 
GTK_STATE_NORMAL;
+if ( forwardButtonInsensitive )
+stateType = GTK_STATE_INSENSITIVE;
 gtk_paint_box( style, gdkDrawable, stateType, shadowType,
gdkRect, GTK_WIDGET(scrollbarWidget), scrollbarTag,
x+hShim+button12BoundRect.Left(), 
y+vShim+button12BoundRect.Top(),
@@ -1983,7 +1990,8 @@ sal_Bool GtkSalGraphics::NWPaintGTKScrollbar( 
ControlType, ControlPart nPart,
 if ( has_backward2 )
 {
 NWConvertVCLStateToGTKState( pScrollbarVal->mnButton1State, 
&stateType, &shadowType );
-if ( stateType == GTK_STATE_INSENSITIVE )stateType = 
GTK_STATE_NORMAL;
+if ( backwardButtonInsensitive )
+stateType = GTK_STATE_INSENSITIVE;
 gtk_paint_box( style, gdkDrawable, stateType, shadowType, gdkRect,
GTK_WIDGET(scrollbarWidget), scrollbarTag,
x+hShim+button21BoundRect.Left(), 
y+vShim+button21BoundRect.Top(),
@@ -1998,7 +2006,8 @@ sal_Bool GtkSalGraphics::NWPaintGTKScrollbar( 
ControlType, ControlPart nPart,
 if ( has_forward )
 {
 NWConvertVCLStateToGTKState( pScrollbarVal->mnButton2State, 
&stateType, &shadowType );
-if ( stateType == GTK_STATE_INSENSITIVE )stateType = 
GTK_STATE_NORMAL;
+if ( forwardButtonInsensitive )
+stateType = GTK_STATE_INSENSITIVE;
 gtk_paint_box( style, gdkDrawable, stateType, shadowType, gdkRect,
GTK_WIDGET(scrollbarWidget), scrollbarTag,
x+hShim+button22BoundRect.Left(), 
y+vShim+button22BoundRect.Top(),
diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx 
b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index 45e8977..0774699 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -431,10 +431,18 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext 
*context,
 
 gtk_style_context_restore(context);
 }
+
+bool backwardButtonInsensitive =
+pScrollbarVal->mnCur == pScrollbarVal->mnMin;
+bool forwardButtonInsensitive = pScrollbarVal->mnMax == 0 ||
+pScrollbarVal->mnCur + pScrollbarVal->mnVisibleSize >= 
pScrollbarVal->mnMax;
+
 // - BUTTON 1 //
 if ( has_backward )
 {
 NWConvertVCLStateToGTKState( pScrollbarVal->mnButton1State, 
&stateFlags, &shadowType );
+if ( backwardButtonInsensitive )
+stateFlags = GTK_STATE_FLAG_INSENSITIVE;
 
 gtk_style_context_save(context);
 gtk_style_context_set_state(context, stateFlags);
@@ -459,6 +467,8 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext 
*context,
 if ( has_forward2 )
 {
 NWConvertVCLStateToGTKState( pScrollbarVal->mnButton2State, 
&stateFlags, &shadowType );
+if ( forwardButtonInsensitive )
+stateFlags = GTK_STATE_FLAG_INSENSITIVE;
 
 gtk_style_context_save(context);
 gtk_style_context

[Libreoffice-commits] .: vcl/unx

2012-08-20 Thread Libreoffice Gerrit user
 vcl/unx/generic/plugadapt/salplug.cxx |3 -
 vcl/unx/kde/UnxFilePicker.cxx |8 ++
 vcl/unx/kde/fpicker/kdefilepicker.cxx |   27 -
 vcl/unx/kde/fpicker/kdefilepicker.hxx |4 +
 vcl/unx/kde/salnativewidgets-kde.cxx  |   92 --
 5 files changed, 101 insertions(+), 33 deletions(-)

New commits:
commit af4ca5a8c6e2848cb855a15986d5c4c9991140bf
Author: Timothy Pearson 
Date:   Mon Aug 20 12:40:33 2012 +0100

Fix TDE VCL interface

Change-Id: Ifd28ab758ba8be89a57c152d3fb9d361715bb33f

diff --git a/vcl/unx/generic/plugadapt/salplug.cxx 
b/vcl/unx/generic/plugadapt/salplug.cxx
index 4af49cd..67b806e 100644
--- a/vcl/unx/generic/plugadapt/salplug.cxx
+++ b/vcl/unx/generic/plugadapt/salplug.cxx
@@ -189,10 +189,7 @@ static SalInstance* autodetect_plugin()
 else if ( desktop == DESKTOP_GNOME )
 pList = pStandardFallbackList;
 else if( desktop == DESKTOP_TDE )
-{
 pList = pTDEFallbackList;
-nListEntry = 1;
-}
 else if( desktop == DESKTOP_KDE )
 {
 pList = pKDEFallbackList;
diff --git a/vcl/unx/kde/UnxFilePicker.cxx b/vcl/unx/kde/UnxFilePicker.cxx
index f217720..5c06e25 100644
--- a/vcl/unx/kde/UnxFilePicker.cxx
+++ b/vcl/unx/kde/UnxFilePicker.cxx
@@ -81,7 +81,11 @@ namespace
 uno::Sequence aRet(3);
 aRet[0] = 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.dialogs.FilePicker"));
 aRet[1] = 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.dialogs.SystemFilePicker"));
+#ifdef ENABLE_TDE
+aRet[2] = 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.dialogs.TDEFilePicker"));
+#else // ENABLE_TDE
 aRet[2] = 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.dialogs.KDEFilePicker"));
+#endif // ENABLE_TDE
 return aRet;
 }
 }
@@ -717,7 +721,11 @@ void UnxFilePicker::initFilePicker()
 #endif
 
 // The executable name
+#ifdef ENABLE_TDE
+rtl::OUString helperurl( 
RTL_CONSTASCII_USTRINGPARAM("${ORIGIN}/tdefilepicker"));
+#else // ENABLE_TDE
 rtl::OUString helperurl( 
RTL_CONSTASCII_USTRINGPARAM("${ORIGIN}/kdefilepicker"));
+#endif // ENABLE_TDE
 rtl::Bootstrap::expandMacros( helperurl );
 rtl::OUString helperpath;
 osl::FileBase::getSystemPathFromFileURL( helperurl, helperpath );
diff --git a/vcl/unx/kde/fpicker/kdefilepicker.cxx 
b/vcl/unx/kde/fpicker/kdefilepicker.cxx
index d52a6a7..6b5bba1 100644
--- a/vcl/unx/kde/fpicker/kdefilepicker.cxx
+++ b/vcl/unx/kde/fpicker/kdefilepicker.cxx
@@ -85,6 +85,14 @@
 
 #endif // ENABLE_TDE
 
+#ifdef ENABLE_TDE
+#define QCheckBox_String"TQCheckBox"
+#define QComboBox_String"TQComboBox"
+#else // ENABLE_TDE
+#define QCheckBox_String"QCheckBox"
+#define QComboBox_String"QComboBox"
+#endif // ENABLE_TDE
+
 #include 
 #include 
 
@@ -104,8 +112,13 @@ KDEFileDialog::KDEFileDialog( const QString &startDir, 
const QString &filter,
   m_bIsExecuting( false ),
   m_bCanNotifySelection( true )
 {
+#ifdef ENABLE_TDE
+connect( this, SIGNAL( fileHighlighted( const TQString & ) ),
+ this, SLOT( fileHighlightedCommand( const TQString & ) ) );
+#else // ENABLE_TDE
 connect( this, SIGNAL( fileHighlighted( const QString & ) ),
  this, SLOT( fileHighlightedCommand( const QString & ) ) );
+#endif // ENABLE_TDE
 
 connect( this, SIGNAL( selectionChanged() ),
  this, SLOT( selectionChangedCommand() ) );
@@ -434,7 +447,7 @@ void KDEFileDialog::getValue( const QString &rId, const 
QString &rAction )
 if ( pWidget )
 {
 QCString qClassName = pWidget->className();
-if ( qClassName == "QCheckBox" )
+if ( qClassName == QCheckBox_String )
 {
 QCheckBox *pCheckBox = static_cast< QCheckBox* >( pWidget );
 
@@ -443,7 +456,7 @@ void KDEFileDialog::getValue( const QString &rId, const 
QString &rAction )
 else
 qString.append( " bool false" );
 }
-else if ( qClassName == "QComboBox" )
+else if ( qClassName == QComboBox_String )
 {
 QComboBox *pComboBox = static_cast< QComboBox* >( pWidget );
 if ( rAction == "getItems" )
@@ -480,14 +493,14 @@ void KDEFileDialog::setValue( const QString &rId, const 
QString &rAction, const
 if ( pWidget )
 {
 QCString qClassName = pWidget->className();
-if ( qClassName == "QCheckBox" )
+if ( qClassName == QCheckBox_String )
 {
 QCheckBox *pCheckBox = static_cast< QCheckBox* >( pWidget );
 
 bool bValue = ( !rValue.isEmpty() ) && ( rValue.front().lower() == 
"true" );
 pCheckBox->setChecked( bValue );
 }
-else if ( qClassName == "QComboBox" )
+else if ( qClassName == QComboBox_String )
 {
 QComboBox *pComboBox = static_cast< QComboBox* >( pWidget );
 if ( rAction == "addItem" )
@@ -562,7 +575,7 @@ QStr

[Libreoffice-commits] .: vcl/unx

2012-08-05 Thread Julien Nabet
 vcl/unx/generic/app/i18n_wrp.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4de603d28ce884fb2a3720b6d132465b6dcc98a9
Author: Julien Nabet 
Date:   Sun Aug 5 13:49:37 2012 +0200

Clang:Null pointer passed as an argument to a 'nonnull' parameter

Change-Id: Ia07c50f4822af256b3b35f39f46dc442750c8439

diff --git a/vcl/unx/generic/app/i18n_wrp.cxx b/vcl/unx/generic/app/i18n_wrp.cxx
index 05dfd10..e152135 100644
--- a/vcl/unx/generic/app/i18n_wrp.cxx
+++ b/vcl/unx/generic/app/i18n_wrp.cxx
@@ -235,7 +235,7 @@ Status XvaCloseIM(XIM)
 {
   Status s = False;
 
-if (!g_dlmodule)
+if (g_dlmodule)
 {
 /* assuming one XvaOpenIM call */
 dlclose(g_dlmodule);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-08-02 Thread Ivan Timofeev
 vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 92e00f2e536ce0458961d329a3c676acc86249e6
Author: Ivan Timofeev 
Date:   Thu Aug 2 16:06:33 2012 +0400

cairo uses pre-multiplied alpha

Change-Id: I6cf04b10bfdd6c7b16761b2aa2f31c1392c49546

diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx 
b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index 5e0972f..4298493 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -972,9 +972,9 @@ void GtkSalGraphics::renderAreaToPix( cairo_t *cr,
 for (int x = 0; x < awidth && y < aheight; ++x)
 {
 double alpha = ((float)cairo_data[x*4 + 3])/255.0;
-src[x*3 + 0] = src[x*3 + 0] * (1.0 - alpha) + cairo_data[x*4+0] * 
alpha;
-src[x*3 + 1] = src[x*3 + 1] * (1.0 - alpha) + cairo_data[x*4+1] * 
alpha;
-src[x*3 + 2] = src[x*3 + 2] * (1.0 - alpha) + cairo_data[x*4+2] * 
alpha;
+src[x*3 + 0] = src[x*3 + 0] * (1.0 - alpha) + cairo_data[x*4+0];
+src[x*3 + 1] = src[x*3 + 1] * (1.0 - alpha) + cairo_data[x*4+1];
+src[x*3 + 2] = src[x*3 + 2] * (1.0 - alpha) + cairo_data[x*4+2];
 }
 src += nStride;
 cairo_data += cairo_stride;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-08-01 Thread Lubos Lunak
 vcl/unx/kde4/KDE4FilePicker.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 78f1e95df4b8bd1fbc32ed4192676fd4f176f5bf
Author: Luboš Luňák 
Date:   Wed Aug 1 12:08:03 2012 +0200

workaround for KFileDialog remembering its settings

Change-Id: I6f473c246408684c5d952a2161645e4fe76873ea

diff --git a/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx
index 4917bf7..4bd2836 100644
--- a/vcl/unx/kde4/KDE4FilePicker.cxx
+++ b/vcl/unx/kde4/KDE4FilePicker.cxx
@@ -200,6 +200,11 @@ sal_Int16 SAL_CALL KDE4FilePicker::execute()
 mutexrelease = Application::ReleaseSolarMutex();
 //block and wait for user input
 int result = _dialog->exec();
+// HACK: KFileDialog uses KConfig("kdeglobals") for saving some settings
+// (such as the auto-extension flag), but that doesn't update 
KGlobal::config()
+// (which is probably a KDE bug), so force reading the new configuration,
+// otherwise the next opening of the dialog would use the old settings.
+KGlobal::config()->reparseConfiguration();
 if( !qApp->clipboard()->property( "useEventLoopWhenWaiting" ).toBool())
 Application::AcquireSolarMutex( mutexrelease );
 if( result == KFileDialog::Accepted)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-08-01 Thread Lubos Lunak
 vcl/unx/kde4/KDE4FilePicker.cxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit e62c67d8d47231e3ff0df440642dfcabac4f3f81
Author: Luboš Luňák 
Date:   Wed Aug 1 11:11:44 2012 +0200

do not let LO's autoextension handling interfere with 
KFileDialog's(fdo#52546)

Change-Id: I73263a74d7b9bbf4a99e86773854e69f747e19d5

diff --git a/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx
index df08ed7..4917bf7 100644
--- a/vcl/unx/kde4/KDE4FilePicker.cxx
+++ b/vcl/unx/kde4/KDE4FilePicker.cxx
@@ -398,9 +398,12 @@ uno::Any SAL_CALL KDE4FilePicker::getValue( sal_Int16 
controlId, sal_Int16 )
 switch (controlId)
 {
 case ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION:
-// we ignore this one and rely on KFileDialog to provide the 
function,
-// always return true, here meaning "it's been taken care of"
-res = uno::Any( true );
+// We ignore this one and rely on KFileDialog to provide the 
function.
+// Always return false, to pretend we do not support this, 
otherwise
+// LO core would try to be smart and cut the extension in some 
places,
+// interfering with KFileDialog's handling of it. KFileDialog also
+// saves the value of the setting, so LO core is not needed for 
that either.
+res = uno::Any( false );
 break;
 case ExtendedFilePickerElementIds::CHECKBOX_PASSWORD:
 case ExtendedFilePickerElementIds::CHECKBOX_FILTEROPTIONS:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-07-10 Thread Petr Mladek
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 18e48959de7774f0e2bf194594809b74ee26ab93
Author: Petr Mladek 
Date:   Tue Jul 10 15:15:45 2012 +0200

correctly paint toolbar separators with gtk-2.8 (bnc#770013)

wide_separators = 0 would be enough because the value was not modified if 
the
property did not exist.

Anyway, I added also #if GTK_CHECK_VERSION(2,10,0) because it helps to avoid
the GTK warning about non-existing property 'wide-separators'.

Change-Id: If93928821d951dc15da967519cb207efdaa30cf7

diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx 
b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 7735a74..96b702b 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -2865,7 +2865,10 @@ sal_Bool GtkSalGraphics::NWPaintGTKToolbar(
 }
 else if( nPart == PART_SEPARATOR_HORZ || nPart == 
PART_SEPARATOR_VERT )
 {
-gint separator_height, separator_width, wide_separators;
+const double shim = 0.2;
+
+#if GTK_CHECK_VERSION(2,10,0)
+gint separator_height, separator_width, wide_separators = 0;
 
 gtk_widget_style_get (gWidgetData[m_nXScreen].gSeparator,
   "wide-separators",  &wide_separators,
@@ -2873,8 +2876,6 @@ sal_Bool GtkSalGraphics::NWPaintGTKToolbar(
   "separator-height", &separator_height,
   NULL);
 
-const double shim = 0.2;
-
 if (wide_separators)
 {
 if (nPart == PART_SEPARATOR_VERT)
@@ -2891,6 +2892,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKToolbar(
w * (1 - 2*shim), separator_width);
 }
 else
+#endif
 {
 if (nPart == PART_SEPARATOR_VERT)
 gtk_paint_vline 
(gWidgetData[m_nXScreen].gSeparator->style, gdkDrawable,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-06-18 Thread Fridrich Strba
 vcl/unx/gtk/app/gtkdata.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit a7f69caf25662d72b685a2c3412f3a352a0c5a88
Author: Ruslan Kabatsayev 
Date:   Mon Jun 18 17:23:46 2012 +0400

GTK: don't crash on X errors

Change-Id: I5b1353b409bc7043d2d1c313a3606ed807eced4b

Signed-off-by: Fridrich Å trba 

diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index 4d58110..07beacc 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -668,6 +668,7 @@ void GtkData::Init()
 
 // init gtk/gdk
 gtk_init_check( &nParams, &pCmdLineAry );
+gdk_error_trap_push();
 
 for (i = 0; i < nParams; i++ )
 g_free( pCmdLineAry[i] );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-06-10 Thread Thomas Arnhold
 vcl/unx/generic/app/saldisp.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 2432083b50ea7481247c303187bb3922714f93d5
Author: Thomas Arnhold 
Date:   Sun Jun 10 17:36:05 2012 +0200

Remove bogus header

Thanks to Rene Engelhard for pointing this out.

Change-Id: I6a6c91f6675ec8034c0af85dcb89bcbfaa7a18d8

diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 2c34fd0..90bdf83 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -66,9 +66,7 @@ Status XineramaGetInfo(Display*, int, XRectangle*, unsigned 
char*, int*);
 
 #include 
 
-#include 
 #include 
-
 #include 
 #include 
 #include "unx/i18n_im.hxx"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-06-01 Thread Michael Meeks
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 4ba8147f61fadb4e8ae7abc0ad5c9e928edf4baa
Author: Ruslan Kabatsayev 
Date:   Thu May 31 16:59:16 2012 +0400

Gtk theming: pass tab prelight state to theme

Change-Id: I9b924d83d4da638d17af14a66a618ce7128968e7

diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx 
b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index b86e91f..e9101bf 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -46,6 +46,7 @@
 #include "vcl/vclenum.hxx"
 #include "vcl/fontmanager.hxx"
 typedef struct _cairo_font_options cairo_font_options_t;
+const char* const tabPrelitDataName="libreoffice-tab-is-prelit";
 
 // initialize statics
 sal_Bool GtkSalGraphics::bThemeChanged = sal_True;
@@ -2461,10 +2462,15 @@ sal_Bool GtkSalGraphics::NWPaintGTKTabItem( ControlType 
nType, ControlPart,
 case CTRL_TAB_ITEM:
 stateType = ( nState & CTRL_STATE_SELECTED ) ? GTK_STATE_NORMAL : 
GTK_STATE_ACTIVE;
 
+if( nState & CTRL_STATE_ROLLOVER )
+
g_object_set_data(G_OBJECT(pixmap),tabPrelitDataName,(gpointer)TRUE);
+
 gtk_paint_extension( 
gWidgetData[m_nXScreen].gNotebookWidget->style, pixmap, stateType, 
GTK_SHADOW_OUT, NULL, gWidgetData[m_nXScreen].gNotebookWidget,
 (char *)"tab", (tabRect.Left() - pixmapRect.Left()), 
(tabRect.Top() - pixmapRect.Top()),
 tabRect.GetWidth(), tabRect.GetHeight(), GTK_POS_BOTTOM );
 
+g_object_steal_data(G_OBJECT(pixmap),tabPrelitDataName);
+
 if ( nState & CTRL_STATE_SELECTED )
 {
 gtk_paint_flat_box( m_pWindow->style, pixmap, stateType, 
GTK_SHADOW_NONE, NULL, m_pWindow,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-06-01 Thread Michael Meeks
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |  161 ---
 1 file changed, 87 insertions(+), 74 deletions(-)

New commits:
commit 71daa69351f6903d6a94b7af15fce53361f79c6d
Author: Ruslan Kabatsayev 
Date:   Thu May 31 23:47:19 2012 +0400

GTK theming plugin: convert big if statement to switch structure

Change-Id: I1220d80bdba4835db3674271f8a060af50af998f

diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx 
b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 9d9dee6..b86e91f 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -544,81 +544,94 @@ void GtkSalGraphics::copyBits( const SalTwoRect* pPosAry,
  */
 sal_Bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, 
ControlPart nPart )
 {
-if (
-((nType==CTRL_PUSHBUTTON)  && (nPart==PART_ENTIRE_CONTROL)) ||
- ((nType==CTRL_RADIOBUTTON) && (nPart==PART_ENTIRE_CONTROL))||
-((nType==CTRL_CHECKBOX)&& (nPart==PART_ENTIRE_CONTROL))||
-((nType==CTRL_SCROLLBAR) &&
-(  (nPart==PART_DRAW_BACKGROUND_HORZ)
-|| (nPart==PART_DRAW_BACKGROUND_VERT)
-|| (nPart==PART_ENTIRE_CONTROL)
-|| (nPart==HAS_THREE_BUTTONS) )  )||
-((nType==CTRL_EDITBOX) &&
-(  (nPart==PART_ENTIRE_CONTROL)
-|| (nPart==HAS_BACKGROUND_TEXTURE) ) )||
-((nType==CTRL_MULTILINE_EDITBOX) &&
-(  (nPart==PART_ENTIRE_CONTROL)
-|| (nPart==HAS_BACKGROUND_TEXTURE) ) )||
-((nType==CTRL_SPINBOX) &&
-(  (nPart==PART_ENTIRE_CONTROL)
-|| (nPart==PART_ALL_BUTTONS)
-|| (nPart==HAS_BACKGROUND_TEXTURE) ))||
-((nType==CTRL_SPINBUTTONS) &&
-(  (nPart==PART_ENTIRE_CONTROL)
-|| (nPart==PART_ALL_BUTTONS)))||
-((nType==CTRL_COMBOBOX) &&
-(  (nPart==PART_ENTIRE_CONTROL)
-|| (nPart==HAS_BACKGROUND_TEXTURE)))||
-(((nType==CTRL_TAB_ITEM) || (nType==CTRL_TAB_PANE) ||
-  (nType==CTRL_TAB_BODY) || (nType==CTRL_FIXEDBORDER)) &&
-(  (nPart==PART_ENTIRE_CONTROL)
-|| (nPart==PART_TABS_DRAW_RTL) ))||
-((nType==CTRL_LISTBOX) &&
-(  (nPart==PART_ENTIRE_CONTROL)
-|| (nPart==PART_WINDOW)
-|| (nPart==HAS_BACKGROUND_TEXTURE) ))   ||
-((nType == CTRL_TOOLBAR) &&
- ((nPart==PART_ENTIRE_CONTROL)
-||  (nPart==PART_DRAW_BACKGROUND_HORZ)
-||  (nPart==PART_DRAW_BACKGROUND_VERT)
-||  (nPart==PART_THUMB_HORZ)
-||  (nPart==PART_THUMB_VERT)
-||  (nPart==PART_BUTTON)
-||  (nPart==PART_SEPARATOR_HORZ)
-||  (nPart==PART_SEPARATOR_VERT)
-)
-)   ||
-((nType == CTRL_MENUBAR) &&
-(   (nPart==PART_ENTIRE_CONTROL)
-||  (nPart==PART_MENU_ITEM)
-)
-)   ||
-((nType == CTRL_TOOLTIP) &&
-(   (nPart==PART_ENTIRE_CONTROL) )  )   ||
-((nType == CTRL_MENU_POPUP) &&
-(   (nPart==PART_ENTIRE_CONTROL)
-||  (nPart==PART_MENU_ITEM)
-||  (nPart==PART_MENU_ITEM_CHECK_MARK)
-||  (nPart==PART_MENU_ITEM_RADIO_MARK)
-||  (nPart==PART_MENU_SEPARATOR)
-||  (nPart==PART_MENU_SUBMENU_ARROW)
-)
-)   ||
-((nType == CTRL_PROGRESS) &&
-(   (nPart == PART_ENTIRE_CONTROL) )
-)   ||
-((nType == CTRL_LISTNODE || nType == CTRL_LISTNET) &&
-(   (nPart == PART_ENTIRE_CONTROL) )
-)   ||
-((nType == CTRL_SLIDER) &&
-(   (nPart == PART_TRACK_HORZ_AREA)
-||  (nPart == PART_TRACK_VERT_AREA)
+switch(nType)
+{
+case CTRL_PUSHBUTTON:
+case CTRL_RADIOBUTTON:
+case CTRL_CHECKBOX:
+case CTRL_TOOLTIP:
+case CTRL_PROGRESS:
+case CTRL_LISTNODE:
+case CTRL_LISTNET:
+if(nPart==PART_ENTIRE_CONTROL)
+return true;
+break;
+
+case CTRL_SCROLLBAR:
+if(nPart==PART_DRAW_BACKGROUND_HORZ || 
nPart==PART_DRAW_BACKGROUND_VERT ||
+   nPart==PART_ENTIRE_CONTROL   || nPart==HAS_THREE_BUTTONS)
+return true;
+break;
+
+case CT

[Libreoffice-commits] .: vcl/unx

2012-05-21 Thread Bjoern Michaelsen
 vcl/unx/gtk/window/gtkframe.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 21f8ec1c49efd716669ca55ab946fadd5c97bb7e
Author: Bjoern Michaelsen 
Date:   Sun May 20 00:25:07 2012 +0200

fdo#50173: fix Styles and Formatting gtk crasher

- when using the gtk vcl plugin, pressing F11 in writer crashes
  libreoffice on some systems with an X error
- related: fdo#46687

Change-Id: I235cf327d812b606a357de859b1a959be728d2a1

diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index eb77e75..36be0b2 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -3248,6 +3248,7 @@ gboolean GtkSalFrame::signalMap( GtkWidget *pWidget, 
GdkEvent*, gpointer frame )
 XSetInputFocus( pThis->getDisplay()->GetDisplay(),
 widget_get_xid(pWidget),
 RevertToParent, CurrentTime );
+XSync( pThis->getDisplay()->GetDisplay(), False );
 GetGenericData()->ErrorTrapPop();
 }
 #else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-05-18 Thread Stephan Bergmann
 vcl/unx/generic/printer/cupsmgr.cxx |   76 +++-
 1 file changed, 15 insertions(+), 61 deletions(-)

New commits:
commit ef48b58387fdc04050c3362440ffe3ca0037d8d0
Author: Stephan Bergmann 
Date:   Fri May 18 20:52:15 2012 +0200

Revert fix for "#i86306# prepare against really broken CUPS 
installations..."

...from 8046a87ecc879651ee9cf344211cdd198a419cab.  At least sometimes in
sw_complex test (with various bundled Java extensions enabled) under load, 
this
code reports "Signal 11 during cups initialization called, ignoring cups" 
and
in-process JVM aborts in panic.  Looks like a legitimate SIGSEGV (to be
translated into java.lang.NullPointerException) from JVM code is erroneously
caught by the temporary lcl_signal_action in cupsmgr.cxx instead.  As there 
is
no non-cooperative way to have different signal handlers for different 
threads
(at least under POSIX), and
 "office crashes at 
startup
on Solaris Intel" suggests this signal-catching business is only there to 
work
around a completely broken machine, I think it is best to simply remove it
again.

Change-Id: I55b95a71d622f83c975989a4ffb1d95ef5737075

diff --git a/vcl/unx/generic/printer/cupsmgr.cxx 
b/vcl/unx/generic/printer/cupsmgr.cxx
index a0e020a..0f45b46 100644
--- a/vcl/unx/generic/printer/cupsmgr.cxx
+++ b/vcl/unx/generic/printer/cupsmgr.cxx
@@ -43,8 +43,6 @@
 #include "rtl/ustrbuf.hxx"
 
 #include 
-#include 
-#include 
 
 #define CUPS_LIB_NAME "libcups.so.2"
 
@@ -442,17 +440,6 @@ void CUPSManager::runDestThread( void* pThis )
 ((CUPSManager*)pThis)->runDests();
 }
 
-static sigjmp_buf aViolationBuffer;
-
-extern "C"
-{
-static void lcl_signal_action(int nSignal)
-{
-fprintf( stderr, "Signal %d during cups initialization called, 
ignoring cups\n", nSignal );
-siglongjmp( aViolationBuffer, 1 );
-}
-}
-
 void CUPSManager::runDests()
 {
 #if OSL_DEBUG_LEVEL > 1
@@ -460,62 +447,29 @@ void CUPSManager::runDests()
 #endif
 cups_dest_t* pDests = NULL;
 
-// #i86306# prepare against really broken CUPS installations / missing 
servers
-
-// install signal handler for SEGV, BUS and ABRT
-struct sigaction act;
-struct sigaction oact[3];
-
-act.sa_handler = lcl_signal_action;
-act.sa_flags   = 0;
-sigemptyset(&(act.sa_mask));
-
-int nSegvSignalInstalled = sigaction(SIGSEGV, &act, &oact[0]);
-int nBusSignalInstalled = sigaction(SIGBUS, &act, &oact[1]);
-int nAbortSignalInstalled = sigaction(SIGABRT, &act, &oact[2]);
-
-// prepare against a signal during FcInit or FcConfigGetCurrent
-if( sigsetjmp( aViolationBuffer, ~0 ) == 0 )
+// n#722902 - do a fast-failing check for cups working *at all* first
+http_t* p_http;
+if( (p_http=m_pCUPSWrapper->httpConnectEncrypt(
+ m_pCUPSWrapper->cupsServer(),
+ m_pCUPSWrapper->ippPort(),
+ m_pCUPSWrapper->cupsEncryption())) != NULL )
 {
-// n#722902 - do a fast-failing check for cups working *at
-// all* first
-http_t* p_http;
-if( (p_http=m_pCUPSWrapper->httpConnectEncrypt(
- m_pCUPSWrapper->cupsServer(),
- m_pCUPSWrapper->ippPort(),
- m_pCUPSWrapper->cupsEncryption())) != NULL )
-{
-// neat, cups is up, clean up the canary
-m_pCUPSWrapper->httpClose(p_http);
+// neat, cups is up, clean up the canary
+m_pCUPSWrapper->httpClose(p_http);
 
-int nDests = m_pCUPSWrapper->cupsGetDests( &pDests );
+int nDests = m_pCUPSWrapper->cupsGetDests( &pDests );
 #if OSL_DEBUG_LEVEL > 1
-fprintf( stderr, "came out of cupsGetDests\n" );
+fprintf( stderr, "came out of cupsGetDests\n" );
 #endif
 
-osl::MutexGuard aGuard( m_aCUPSMutex );
-m_nDests = nDests;
-m_pDests = pDests;
-m_bNewDests = true;
+osl::MutexGuard aGuard( m_aCUPSMutex );
+m_nDests = nDests;
+m_pDests = pDests;
+m_bNewDests = true;
 #if OSL_DEBUG_LEVEL > 1
-fprintf( stderr, "finished cupsGetDests\n" );
+fprintf( stderr, "finished cupsGetDests\n" );
 #endif
-}
 }
-else
-{
-#if OSL_DEBUG_LEVEL > 1
-fprintf( stderr, "cupsGetDests crashed, not using CUPS\n" );
-#endif
-}
-
-// restore old signal handlers
-if( nSegvSignalInstalled == 0 )
-sigaction( SIGSEGV, &oact[0], NULL );
-if( nBusSignalInstalled == 0 )
-sigaction( SIGBUS, &oact[1], NULL );
-if( nAbortSignalInstalled == 0 )
-sigaction( SIGABRT, &oact[2], NULL );
 }
 
 void CUPSManager::initialize()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-05-14 Thread Julien Nabet
 vcl/unx/generic/app/saldisp.cxx  |6 +++---
 vcl/unx/generic/dtrans/X11_selection.cxx |2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 18e6e7d929c2be209407ed2e56b8ec4d5e6c4900
Author: Julien Nabet 
Date:   Mon May 14 18:59:35 2012 +0200

WaE : XKeycodeToKeysym deprecated

Replaced by XkbKeycodeToKeysym
(cf 
http://nabble.documentfoundation.org/PATCH-Proposed-patch-for-XKeycodeToKeysym-deprecated-td3978158.html)

Change-Id: Ide8331705369d0c38e72bfe693102625e62a87e1

diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index d6060d5..ee4f094 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -782,9 +782,9 @@ inline KeySym sal_XModifier2Keysym( Display 
*pDisplay,
 XModifierKeymap *pXModMap,
 int  n )
 {
-return XKeycodeToKeysym( pDisplay,
+return XkbKeycodeToKeysym( pDisplay,
  pXModMap->modifiermap[n*pXModMap->max_keypermod],
- 0 );
+ 0,0 );
 }
 
 void SalDisplay::ModifierMapping()
@@ -1483,7 +1483,7 @@ KeySym SalDisplay::GetKeySym( XKeyEvent*pEvent,
 
 // Now get the unmodified KeySym for KeyCode retrieval
 // try to strip off modifiers, e.g. Ctrl-$ becomes Ctrl-Shift-4
-*pUnmodifiedKeySym  = XKeycodeToKeysym( GetDisplay(), pEvent->keycode, 0);
+*pUnmodifiedKeySym  = XkbKeycodeToKeysym( GetDisplay(), pEvent->keycode, 
0, 0);
 
 return nKeySym;
 }
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx 
b/vcl/unx/generic/dtrans/X11_selection.cxx
index 0bb3527..1c4faae 100644
--- a/vcl/unx/generic/dtrans/X11_selection.cxx
+++ b/vcl/unx/generic/dtrans/X11_selection.cxx
@@ -2731,7 +2731,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
 else if( rMessage.type == XLIB_KeyPress || rMessage.type == KeyRelease )
 {
 bHandled = true;
-KeySym aKey = XKeycodeToKeysym( m_pDisplay, rMessage.xkey.keycode, 0 );
+KeySym aKey = XkbKeycodeToKeysym( m_pDisplay, rMessage.xkey.keycode, 
0, 0 );
 if( aKey == XK_Escape )
 {
 // abort drag
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-05-10 Thread Lubos Lunak
 vcl/unx/kde4/KDE4FilePicker.cxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 5df9e10d27a071f878ed160f99129a7f3c34f5ed
Author: Luboš Luňák 
Date:   Thu May 10 18:29:12 2012 +0200

do not prepend \n twice, it confuses KFileDialog (rhbz#820439)

Draw -> Export -> filetype combo was broken.

Change-Id: I9349749274498d5834dd63e73f3856434b1ab8d9

diff --git a/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx
index 140af9c..3537bfe 100644
--- a/vcl/unx/kde4/KDE4FilePicker.cxx
+++ b/vcl/unx/kde4/KDE4FilePicker.cxx
@@ -342,9 +342,6 @@ rtl::OUString SAL_CALL KDE4FilePicker::getCurrentFilter()
 void SAL_CALL KDE4FilePicker::appendFilterGroup( const rtl::OUString& , const 
uno::Sequence& filters)
 throw( lang::IllegalArgumentException, uno::RuntimeException )
 {
-if (!_filter.isNull())
-_filter.append(QString("\n"));
-
 const sal_uInt16 length = filters.getLength();
 for (sal_uInt16 i = 0; i < length; ++i)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-05-05 Thread Ivan Timofeev
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |   20 ++--
 1 file changed, 6 insertions(+), 14 deletions(-)

New commits:
commit c1ac12f52776c625c7a091ab864b9e99e3bc3d67
Author: Ivan Timofeev 
Date:   Sat May 5 14:34:47 2012 +0400

gtk: fix drawing of disabled menu-item checkmarks and submenu arrows

Change-Id: Ic9929de974b1dd806dee294e574ad9f561468eb4

diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx 
b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 447ca92..7c06d6a 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -2851,19 +2851,15 @@ sal_Bool GtkSalGraphics::NWPaintGTKPopupMenu(
  
gWidgetData[m_nXScreen].gMenuItemCheckMenuWidget :
  
gWidgetData[m_nXScreen].gMenuItemRadioMenuWidget;
 
-GtkStateType nStateType = GTK_STATE_NORMAL;
+GtkStateType nStateType;
 GtkShadowType nShadowType;
+NWConvertVCLStateToGTKState( nState, &nStateType, &nShadowType );
 
-if ( nState & CTRL_STATE_SELECTED )
+if ( (nState & CTRL_STATE_SELECTED) && (nState & 
CTRL_STATE_ENABLED) )
 nStateType = GTK_STATE_PRELIGHT;
 
 NWSetWidgetState( pWidget, nState, nStateType );
 
-if ( nState & CTRL_STATE_PRESSED )
-nShadowType = GTK_SHADOW_IN;
-else
-nShadowType = GTK_SHADOW_OUT;
-
 if ( nPart == PART_MENU_ITEM_CHECK_MARK )
 {
 gtk_paint_check( pWidget->style,
@@ -2899,20 +2895,16 @@ sal_Bool GtkSalGraphics::NWPaintGTKPopupMenu(
 }
 else if( nPart == PART_MENU_SUBMENU_ARROW )
 {
-GtkStateType nStateType = GTK_STATE_NORMAL;
+GtkStateType nStateType;
 GtkShadowType nShadowType;
+NWConvertVCLStateToGTKState( nState, &nStateType, &nShadowType );
 
-if ( nState & CTRL_STATE_SELECTED )
+if ( (nState & CTRL_STATE_SELECTED) && (nState & 
CTRL_STATE_ENABLED) )
 nStateType = GTK_STATE_PRELIGHT;
 
 NWSetWidgetState( gWidgetData[m_nXScreen].gMenuItemMenuWidget,
   nState, nStateType );
 
-if ( nState & CTRL_STATE_PRESSED )
-nShadowType = GTK_SHADOW_IN;
-else
-nShadowType = GTK_SHADOW_OUT;
-
 GtkArrowType eArrow;
 if( Application::GetSettings().GetLayoutRTL() )
 eArrow = GTK_ARROW_LEFT;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-05-02 Thread David Tardon
 vcl/unx/gtk/app/gtksys.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 85211f1ef30b07927d768348ce28ac34ade62f03
Author: David Tardon 
Date:   Wed May 2 14:26:11 2012 +0200

fdo#49365 correctly map monitor index back to screen

Change-Id: I396b34119a2686011640d5f15de616fe2a166237

diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx
index 3927dbf..538107f 100644
--- a/vcl/unx/gtk/app/gtksys.cxx
+++ b/vcl/unx/gtk/app/gtksys.cxx
@@ -92,7 +92,7 @@ GtkSalSystem::getScreenMonitorFromIdx (GdkDisplay *pDisplay, 
int nIdx, gint &nMo
 pScreen = gdk_display_get_screen (pDisplay, i);
 if (!pScreen)
 break;
-if (nIdx > gdk_screen_get_n_monitors (pScreen))
+if (nIdx >= gdk_screen_get_n_monitors (pScreen))
 nIdx -= gdk_screen_get_n_monitors (pScreen);
 else
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2012-04-30 Thread Caolán McNamara
 vcl/unx/gtk/app/gtkdata.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit bb36072c92687a954a38aeca7fb9945f8e7cca13
Author: Caolán McNamara 
Date:   Mon Apr 30 13:54:01 2012 +0100

g_source_get_current_time has been deprecated since version 2.28

g_source_get_current_time has been deprecated since version 2.28 and should 
not
be used in newly-written code. ... This function ignores source and is
otherwise the same as g_get_current_time()

not using g_source_get_time seeing as our baseline isn't there yet

Change-Id: I9f389cbb8d23353c0a12eacb215d61256b28f643

diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index 776313b..5189174 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -770,7 +770,7 @@ extern "C" {
 
 static void sal_gtk_timeout_defer( SalGtkTimeoutSource *pTSource )
 {
-g_source_get_current_time( (GSource *) pTSource, &pTSource->aFireTime 
);
+g_get_current_time( &pTSource->aFireTime );
 g_time_val_add( &pTSource->aFireTime, 
pTSource->pInstance->m_nTimeoutMS * 1000 );
 }
 
@@ -806,7 +806,7 @@ extern "C" {
 SalGtkTimeoutSource *pTSource = (SalGtkTimeoutSource *)pSource;
 
 GTimeVal aTimeNow;
-g_source_get_current_time( pSource, &aTimeNow );
+g_get_current_time( &aTimeNow );
 
 return sal_gtk_timeout_expired( pTSource, nTimeoutMS, &aTimeNow );
 }
@@ -816,7 +816,7 @@ extern "C" {
 SalGtkTimeoutSource *pTSource = (SalGtkTimeoutSource *)pSource;
 
 GTimeVal aTimeNow;
-g_source_get_current_time( pSource, &aTimeNow );
+g_get_current_time( &aTimeNow );
 
 return ( pTSource->aFireTime.tv_sec < aTimeNow.tv_sec ||
  ( pTSource->aFireTime.tv_sec == aTimeNow.tv_sec &&
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits