summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk/window
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-11-14 10:58:40 +0000
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2012-11-14 13:53:02 +0100
commite5e55d450d674bdfde6c86992274d8e22f949eb6 (patch)
tree7131f38a6f32d5d6975aec47142632426a0b981d /vcl/unx/gtk/window
parentf5804cddbc2d103cabf7054905dc1bd59512b9b6 (diff)
gbooleans are true if non-zero, bin == TRUE comparisons.
Change-Id: Ieb6c73993b3ef3854d81fdeb81661d75f1fe954f
Diffstat (limited to 'vcl/unx/gtk/window')
-rw-r--r--vcl/unx/gtk/window/gloactiongroup.cxx6
-rw-r--r--vcl/unx/gtk/window/gtksalmenu.cxx10
2 files changed, 8 insertions, 8 deletions
diff --git a/vcl/unx/gtk/window/gloactiongroup.cxx b/vcl/unx/gtk/window/gloactiongroup.cxx
index 756779a559ca..ac1686589b6a 100644
--- a/vcl/unx/gtk/window/gloactiongroup.cxx
+++ b/vcl/unx/gtk/window/gloactiongroup.cxx
@@ -192,7 +192,7 @@ g_lo_action_group_perform_submenu_action (GLOActionGroup *group,
if (pSalMenu != NULL) {
gboolean bState = g_variant_get_boolean (state);
- if (bState == TRUE)
+ if (bState)
pSalMenu->Activate (action_name);
else
pSalMenu->Deactivate (action_name);
@@ -215,7 +215,7 @@ g_lo_action_group_change_state (GActionGroup *group,
if (action != NULL)
{
- if (action->submenu == TRUE)
+ if (action->submenu)
g_lo_action_group_perform_submenu_action (lo_group, action_name, value);
else
{
@@ -229,7 +229,7 @@ g_lo_action_group_change_state (GActionGroup *group,
is_new = TRUE;
}
- if (g_variant_is_of_type (value, action->state_type) == TRUE)
+ if (g_variant_is_of_type (value, action->state_type))
{
if (action->state)
g_variant_unref(action->state);
diff --git a/vcl/unx/gtk/window/gtksalmenu.cxx b/vcl/unx/gtk/window/gtksalmenu.cxx
index 7c1517e994b1..fa4f2283421d 100644
--- a/vcl/unx/gtk/window/gtksalmenu.cxx
+++ b/vcl/unx/gtk/window/gtksalmenu.cxx
@@ -533,11 +533,11 @@ void GtkSalMenu::NativeCheckItem( unsigned nSection, unsigned nItemPos, MenuItem
GVariant *pCurrentState = g_action_group_get_action_state( mpActionGroup, aCommand );
if ( bits & MIB_RADIOCHECK )
- pCheckValue = ( bCheck == TRUE ) ? g_variant_new_string( aCommand ) : g_variant_new_string( "" );
+ pCheckValue = bCheck ? g_variant_new_string( aCommand ) : g_variant_new_string( "" );
else
{
// By default, all checked items are checkmark buttons.
- if ( bCheck == TRUE || ( ( bCheck == FALSE ) && pCurrentState != NULL ) )
+ if ( bCheck || ( !bCheck && pCurrentState != NULL ) )
pCheckValue = g_variant_new_boolean( bCheck );
}
@@ -614,7 +614,7 @@ void GtkSalMenu::NativeSetItemCommand( unsigned nSection,
GVariant *pTarget = NULL;
if ( g_action_group_has_action( mpActionGroup, aCommand ) == FALSE ) {
- if ( ( nBits & MIB_CHECKABLE ) || ( bIsSubmenu == TRUE ) )
+ if ( ( nBits & MIB_CHECKABLE ) || bIsSubmenu )
{
// Item is a checkmark button.
GVariantType* pStateType = g_variant_type_new( (gchar*) G_VARIANT_TYPE_BOOLEAN );
@@ -650,7 +650,7 @@ void GtkSalMenu::NativeSetItemCommand( unsigned nSection,
gchar* aItemCommand = g_strconcat("win.", aCommand, NULL );
- if ( bIsSubmenu == TRUE )
+ if ( bIsSubmenu )
g_lo_menu_set_submenu_action_to_item_in_section( pMenu, nSection, nItemPos, aItemCommand );
else
g_lo_menu_set_action_and_target_value_to_item_in_section( pMenu, nSection, nItemPos, aItemCommand, pTarget );
@@ -676,7 +676,7 @@ GtkSalMenu* GtkSalMenu::GetMenuForItemCommand( gchar* aCommand, gboolean bGetSub
if ( g_strcmp0( aItemCommandStr, aCommand ) == 0 )
{
- pMenu = ( bGetSubmenu == TRUE ) ? pSalItem->mpSubMenu : this;
+ pMenu = bGetSubmenu ? pSalItem->mpSubMenu : this;
break;
}
else