static void toggle_all (GtkButton *button, PnlDockBin *dock) { GtkRevealer *edge; edge = GTK_REVEALER (pnl_dock_bin_get_left_edge (dock)); gtk_revealer_set_reveal_child (edge, !gtk_revealer_get_reveal_child (edge)); edge = GTK_REVEALER (pnl_dock_bin_get_right_edge (dock)); gtk_revealer_set_reveal_child (edge, !gtk_revealer_get_reveal_child (edge)); edge = GTK_REVEALER (pnl_dock_bin_get_bottom_edge (dock)); gtk_revealer_set_reveal_child (edge, !gtk_revealer_get_reveal_child (edge)); }
static void gtk_revealer_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { GtkRevealer *revealer = GTK_REVEALER (object); switch (property_id) { case PROP_TRANSITION_TYPE: g_value_set_enum (value, gtk_revealer_get_transition_type (revealer)); break; case PROP_TRANSITION_DURATION: g_value_set_uint (value, gtk_revealer_get_transition_duration (revealer)); break; case PROP_REVEAL_CHILD: g_value_set_boolean (value, gtk_revealer_get_reveal_child (revealer)); break; case PROP_CHILD_REVEALED: g_value_set_boolean (value, gtk_revealer_get_child_revealed (revealer)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; } }
static void gb_editor_view__buffer_changed_on_volume (GbEditorView *self, GParamSpec *pspec, IdeBuffer *buffer) { g_assert (GB_IS_EDITOR_VIEW (self)); g_assert (IDE_IS_BUFFER (buffer)); if (ide_buffer_get_changed_on_volume (buffer)) gtk_revealer_set_reveal_child (self->modified_revealer, TRUE); else if (gtk_revealer_get_reveal_child (self->modified_revealer)) { GtkTextIter iter; gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (buffer), &iter); gtk_text_buffer_select_range (GTK_TEXT_BUFFER (buffer), &iter, &iter); /* * FIXME: * * Without this delay, I see a condition with split view where the * non-focused split will just render blank. Well that isn't totally * correct, it renders empty gutters and proper line grid background. But * no textual content. And the adjustment is way out of sync. Even * changing the adjustment manually doesn't help. So whatever, I'll * insert a short delay and we'll pick up after the textview has * stablized. */ g_timeout_add (10, no_really_scroll_to_the_top, g_object_ref (self)); gtk_revealer_set_reveal_child (self->modified_revealer, FALSE); } }
static void header_bar_term_beeped (VteTerminal *vtterm, GtkRevealer *revealer) { /* If already shown, do nothing */ if (gtk_revealer_get_reveal_child (revealer)) return; gtk_revealer_set_reveal_child (revealer, TRUE); g_timeout_add_seconds (3, beeped_revealer_timeout, revealer); }
/** * gtk_revealer_get_child_revealed: * @revealer: a #GtkRevealer * * Returns whether the child is fully revealed, ie wether * the transition to the revealed state is completed. * * Return value: %TRUE if the child is fully revealed * * Since: 3.10 */ gboolean gtk_revealer_get_child_revealed (GtkRevealer *revealer) { gboolean animation_finished = (revealer->priv->target_pos == revealer->priv->current_pos); gboolean reveal_child = gtk_revealer_get_reveal_child (revealer); if (animation_finished) return reveal_child; else return !reveal_child; }
/** * gtk_revealer_get_child_revealed: * @revealer: a #GtkRevealer * * Returns whether the child is fully revealed, ie wether * the transition to the revealed state is completed. * * Return value: %TRUE if the child is fully revealed * * Since: 3.10 */ gboolean gtk_revealer_get_child_revealed (GtkRevealer *revealer) { GtkRevealerPrivate *priv = gtk_revealer_get_instance_private (revealer); gboolean animation_finished = (priv->target_pos == priv->current_pos); gboolean reveal_child = gtk_revealer_get_reveal_child (revealer); if (animation_finished) return reveal_child; else return !reveal_child; }
void gt_win_show_info_message(GtWin* self, const gchar* msg) { GtWinPrivate* priv = gt_win_get_instance_private(self); QueuedInfoData* data = g_new0(QueuedInfoData, 1); data->msg = g_strdup(msg); g_queue_push_tail(priv->info_queue, data); if (!gtk_revealer_get_reveal_child(GTK_REVEALER(priv->info_revealer))) show_info_bar(self); }
static void gtk_message_row_expand (GtkMessageRow *row) { GtkMessageRowPrivate *priv = row->priv; gboolean expand; expand = !gtk_revealer_get_reveal_child (priv->details_revealer); gtk_revealer_set_reveal_child (priv->details_revealer, expand); if (expand) gtk_button_set_label (priv->expand_button, "Hide"); else gtk_button_set_label (priv->expand_button, "Expand"); }
static void update_operations (NautilusToolbar *self) { GList *progress_infos; GList *l; GtkWidget *progress; gboolean should_show_progress_button = FALSE; gtk_container_foreach (GTK_CONTAINER (self->priv->operations_container), (GtkCallback) gtk_widget_destroy, NULL); disconnect_progress_infos (self); progress_infos = get_filtered_progress_infos (self); for (l = progress_infos; l != NULL; l = l->next) { should_show_progress_button = should_show_progress_button || should_show_progress_info (l->data); g_signal_connect_swapped (l->data, "finished", G_CALLBACK (on_progress_info_finished), self); g_signal_connect_swapped (l->data, "cancelled", G_CALLBACK (on_progress_info_cancelled), self); g_signal_connect_swapped (l->data, "progress-changed", G_CALLBACK (on_progress_info_progress_changed), self); progress = nautilus_progress_info_widget_new (l->data); gtk_box_pack_start (GTK_BOX (self->priv->operations_container), progress, FALSE, FALSE, 0); } g_list_free (progress_infos); /* Either we are already showing the button, so keep showing it until the user * toggle it to hide the operations popover, or, if we want now to show it, * we have to have at least one operation that its total stimated time * is longer than OPERATION_MINIMUM_TIME seconds, or if we failed to get * a correct stimated time and it's around OPERATION_MINIMUM_TIME, * showing the button for just for a moment because now we realized the * estimated time is longer than a OPERATION_MINIMUM_TIME is odd, so show * it only if the remaining time is bigger than again OPERATION_MINIMUM_TIME. */ if (should_show_progress_button && !gtk_revealer_get_reveal_child (GTK_REVEALER (self->priv->operations_revealer))) { add_operations_button_attention_style (self); gtk_revealer_set_reveal_child (GTK_REVEALER (self->priv->operations_revealer), TRUE); gtk_widget_queue_draw (self->priv->operations_icon); } }
void gt_win_ask_question(GtWin* self, const gchar* msg, GCallback cb, gpointer udata) { GtWinPrivate* priv = gt_win_get_instance_private(self); QueuedInfoData* data = g_new(QueuedInfoData, 1); data->msg = g_strdup(msg); data->cb = cb; data->udata = udata; g_queue_push_tail(priv->info_queue, data); if (!gtk_revealer_get_reveal_child(GTK_REVEALER(priv->info_revealer))) show_info_bar(self); }
static void toggle_reveal (GtkRevealer *revealer) { gtk_revealer_set_reveal_child (revealer, !gtk_revealer_get_reveal_child (revealer)); }
gboolean cb_reply_indicator_get_replies_available (CbReplyIndicator *self) { return gtk_revealer_get_reveal_child (GTK_REVEALER (self->revealer)); }