[Libreoffice-commits] core.git: libreofficekit/qa
Miklos Vajna
vmiklos at collabora.co.uk
Fri Jun 10 16:44:01 UTC 2016
libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
New commits:
commit 65731b68bdc67d5be1b459eea7919ec6ca26c4bc
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Jun 10 17:17:03 2016 +0200
gtktiledviewer: fix runtime warnings caused by .uno:InsertAnnotation button
It's a GtkToolButton, but not a GtkToggleToolButton, so don't cast
command buttons down unconditionally.
Change-Id: Ie7c9bdf6fa8725363e40c1544f4e1e835a559f3a
Reviewed-on: https://gerrit.libreoffice.org/26171
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
index 8a3099e..1c68e81 100644
--- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
@@ -777,12 +777,15 @@ static void signalCommand(LOKDocView* pLOKDocView, char* pPayload, gpointer /*pD
{
GtkToolItem* pItem = rWindow.m_aCommandNameToolItems[aKey];
gboolean bEdit = aValue == "true";
- if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(pItem)) != bEdit)
+ if (GTK_IS_TOGGLE_TOOL_BUTTON(pItem))
{
- // Avoid invoking lok_doc_view_post_command().
- rWindow.m_bToolItemBroadcast = false;
- gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(pItem), bEdit);
- rWindow.m_bToolItemBroadcast = true;
+ if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(pItem)) != bEdit)
+ {
+ // Avoid invoking lok_doc_view_post_command().
+ rWindow.m_bToolItemBroadcast = false;
+ gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(pItem), bEdit);
+ rWindow.m_bToolItemBroadcast = true;
+ }
}
}
}
More information about the Libreoffice-commits
mailing list