2014-03-25 00:10:02 +00:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
|
|
|
int main (int argc, char **argv)
|
|
|
|
{
|
|
|
|
GtkWidget *window;
|
|
|
|
GtkWidget *button;
|
|
|
|
GtkWidget *grid;
|
|
|
|
GIcon *icon;
|
|
|
|
GIcon *icon2;
|
|
|
|
|
2016-12-28 13:53:22 +00:00
|
|
|
gtk_init ();
|
2014-03-25 00:10:02 +00:00
|
|
|
|
2020-02-14 19:55:36 +00:00
|
|
|
window = gtk_window_new ();
|
2014-03-25 00:10:02 +00:00
|
|
|
|
|
|
|
grid = gtk_grid_new ();
|
|
|
|
gtk_grid_set_row_spacing (GTK_GRID (grid), 12);
|
|
|
|
gtk_grid_set_column_spacing (GTK_GRID (grid), 12);
|
2020-05-02 21:26:54 +00:00
|
|
|
gtk_window_set_child (GTK_WINDOW (window), grid);
|
2014-03-25 00:10:02 +00:00
|
|
|
|
|
|
|
icon = g_themed_icon_new ("folder");
|
2017-11-15 00:43:13 +00:00
|
|
|
button = gtk_image_new_from_gicon (icon);
|
2014-03-25 00:10:02 +00:00
|
|
|
gtk_grid_attach (GTK_GRID (grid), button, 1, 1, 1, 1);
|
|
|
|
|
|
|
|
icon2 = g_themed_icon_new ("folder-symbolic");
|
2017-11-15 00:43:13 +00:00
|
|
|
button = gtk_image_new_from_gicon (icon2);
|
2014-03-25 00:10:02 +00:00
|
|
|
gtk_grid_attach (GTK_GRID (grid), button, 2, 1, 1, 1);
|
|
|
|
|
|
|
|
icon = g_emblemed_icon_new (icon, g_emblem_new (g_themed_icon_new ("emblem-new")));
|
2017-11-15 00:43:13 +00:00
|
|
|
button = gtk_image_new_from_gicon (icon);
|
2014-03-25 00:10:02 +00:00
|
|
|
gtk_grid_attach (GTK_GRID (grid), button, 1, 2, 1, 1);
|
|
|
|
|
|
|
|
icon2 = g_emblemed_icon_new (icon2, g_emblem_new (g_themed_icon_new ("emblem-new")));
|
2017-11-15 00:43:13 +00:00
|
|
|
button = gtk_image_new_from_gicon (icon2);
|
2014-03-25 00:10:02 +00:00
|
|
|
gtk_grid_attach (GTK_GRID (grid), button, 2, 2, 1, 1);
|
|
|
|
|
2017-01-19 09:02:04 +00:00
|
|
|
gtk_widget_show (window);
|
2014-03-25 00:10:02 +00:00
|
|
|
|
2020-02-10 03:24:47 +00:00
|
|
|
while (TRUE)
|
|
|
|
g_main_context_iteration (NULL, TRUE);
|
2014-03-25 00:10:02 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|