app: rename selection member "hidden" to "show_selection"
and invert its meaning. This has confused me long enough now...
This commit is contained in:
@ -232,7 +232,7 @@ gimp_display_shell_set_show_selection (GimpDisplayShell *shell,
|
|||||||
|
|
||||||
g_object_set (options, "show-selection", show, NULL);
|
g_object_set (options, "show-selection", show, NULL);
|
||||||
|
|
||||||
gimp_display_shell_selection_set_hidden (shell, ! show);
|
gimp_display_shell_selection_set_show (shell, show);
|
||||||
|
|
||||||
appearance_set_action_active (shell, "view-show-selection", show);
|
appearance_set_action_active (shell, "view-show-selection", show);
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ struct _Selection
|
|||||||
guint index; /* index of current stipple pattern */
|
guint index; /* index of current stipple pattern */
|
||||||
gint paused; /* count of pause requests */
|
gint paused; /* count of pause requests */
|
||||||
gboolean shell_visible; /* visility of the display shell */
|
gboolean shell_visible; /* visility of the display shell */
|
||||||
gboolean hidden; /* is the selection hidden? */
|
gboolean show_selection; /* is the selection visible? */
|
||||||
guint timeout; /* timer for successive draws */
|
guint timeout; /* timer for successive draws */
|
||||||
cairo_pattern_t *segs_in_mask; /* cache for rendered segments */
|
cairo_pattern_t *segs_in_mask; /* cache for rendered segments */
|
||||||
};
|
};
|
||||||
@ -103,9 +103,9 @@ gimp_display_shell_selection_init (GimpDisplayShell *shell)
|
|||||||
|
|
||||||
selection = g_slice_new0 (Selection);
|
selection = g_slice_new0 (Selection);
|
||||||
|
|
||||||
selection->shell = shell;
|
selection->shell = shell;
|
||||||
selection->shell_visible = TRUE;
|
selection->shell_visible = TRUE;
|
||||||
selection->hidden = ! gimp_display_shell_get_show_selection (shell);
|
selection->show_selection = gimp_display_shell_get_show_selection (shell);
|
||||||
|
|
||||||
shell->selection = selection;
|
shell->selection = selection;
|
||||||
|
|
||||||
@ -180,8 +180,8 @@ gimp_display_shell_selection_control (GimpDisplayShell *shell,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gimp_display_shell_selection_set_hidden (GimpDisplayShell *shell,
|
gimp_display_shell_selection_set_show (GimpDisplayShell *shell,
|
||||||
gboolean hidden)
|
gboolean show)
|
||||||
{
|
{
|
||||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||||
|
|
||||||
@ -189,11 +189,11 @@ gimp_display_shell_selection_set_hidden (GimpDisplayShell *shell,
|
|||||||
{
|
{
|
||||||
Selection *selection = shell->selection;
|
Selection *selection = shell->selection;
|
||||||
|
|
||||||
if (hidden != selection->hidden)
|
if (show != selection->show_selection)
|
||||||
{
|
{
|
||||||
selection_undraw (selection);
|
selection_undraw (selection);
|
||||||
|
|
||||||
selection->hidden = hidden;
|
selection->show_selection = show;
|
||||||
|
|
||||||
selection_start (selection);
|
selection_start (selection);
|
||||||
}
|
}
|
||||||
@ -425,7 +425,7 @@ selection_start_timeout (Selection *selection)
|
|||||||
selection->index = 0;
|
selection->index = 0;
|
||||||
|
|
||||||
/* Draw the ants */
|
/* Draw the ants */
|
||||||
if (! selection->hidden)
|
if (selection->show_selection)
|
||||||
{
|
{
|
||||||
GimpDisplayConfig *config = selection->shell->display->config;
|
GimpDisplayConfig *config = selection->shell->display->config;
|
||||||
|
|
||||||
|
@ -19,14 +19,14 @@
|
|||||||
#define __GIMP_DISPLAY_SHELL_SELECTION_H__
|
#define __GIMP_DISPLAY_SHELL_SELECTION_H__
|
||||||
|
|
||||||
|
|
||||||
void gimp_display_shell_selection_init (GimpDisplayShell *shell);
|
void gimp_display_shell_selection_init (GimpDisplayShell *shell);
|
||||||
void gimp_display_shell_selection_free (GimpDisplayShell *shell);
|
void gimp_display_shell_selection_free (GimpDisplayShell *shell);
|
||||||
|
|
||||||
void gimp_display_shell_selection_control (GimpDisplayShell *shell,
|
void gimp_display_shell_selection_control (GimpDisplayShell *shell,
|
||||||
GimpSelectionControl control);
|
GimpSelectionControl control);
|
||||||
|
|
||||||
void gimp_display_shell_selection_set_hidden (GimpDisplayShell *shell,
|
void gimp_display_shell_selection_set_show (GimpDisplayShell *shell,
|
||||||
gboolean hidden);
|
gboolean show);
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GIMP_DISPLAY_SHELL_SELECTION_H__ */
|
#endif /* __GIMP_DISPLAY_SHELL_SELECTION_H__ */
|
||||||
|
Reference in New Issue
Block a user