forked from AuroraMiddleware/gtk
widget-factory: Add a pulsing progress bar
This commit is contained in:
parent
f08a9660c6
commit
3e9b58efe6
@ -107,6 +107,13 @@ dismiss (GtkWidget *button)
|
|||||||
gtk_revealer_set_reveal_child (GTK_REVEALER (w), FALSE);
|
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
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
@ -128,6 +135,9 @@ main (int argc, char *argv[])
|
|||||||
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
|
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
|
||||||
gtk_builder_connect_signals (builder, NULL);
|
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");
|
widget = (GtkWidget*) gtk_builder_get_object (builder, "darkmenuitem");
|
||||||
g_signal_connect (widget, "toggled", G_CALLBACK (dark_toggled), NULL);
|
g_signal_connect (widget, "toggled", G_CALLBACK (dark_toggled), NULL);
|
||||||
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (widget), dark);
|
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (widget), dark);
|
||||||
|
@ -1271,6 +1271,19 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
|||||||
<property name="position">1</property>
|
<property name="position">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</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>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
|
Loading…
Reference in New Issue
Block a user