widget-factory: Add a pulsing progress bar

This commit is contained in:
William Jon McCann 2013-11-02 16:13:33 -04:00
parent f08a9660c6
commit 3e9b58efe6
2 changed files with 23 additions and 0 deletions

View File

@ -107,6 +107,13 @@ dismiss (GtkWidget *button)
gtk_revealer_set_reveal_child (GTK_REVEALER (w), FALSE);
}
static gboolean
pulse_it (GtkWidget *widget)
{
gtk_progress_bar_pulse (GTK_PROGRESS_BAR (widget));
return TRUE;
}
int
main (int argc, char *argv[])
{
@ -128,6 +135,9 @@ main (int argc, char *argv[])
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
gtk_builder_connect_signals (builder, NULL);
widget = (GtkWidget*) gtk_builder_get_object (builder, "progressbar3");
g_timeout_add (250, (GSourceFunc)pulse_it, widget);
widget = (GtkWidget*) gtk_builder_get_object (builder, "darkmenuitem");
g_signal_connect (widget, "toggled", G_CALLBACK (dark_toggled), NULL);
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (widget), dark);

View File

@ -1271,6 +1271,19 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkProgressBar" id="progressbar3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="fraction">0.5</property>
<property name="show_text">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>