forked from AuroraMiddleware/gtk
Remove most of the stock API usage from the tests
With the exception of GtkActions and the tests for stock items.
This commit is contained in:
parent
c79a21e1dd
commit
fc71cbe5a6
@ -74,7 +74,6 @@ noinst_PROGRAMS = $(TEST_PROGS) \
|
||||
testkineticscrolling \
|
||||
testlist \
|
||||
testlockbutton \
|
||||
testmenubars \
|
||||
testmenubutton \
|
||||
testmountoperation \
|
||||
testmultidisplay \
|
||||
@ -203,7 +202,6 @@ testimage_DEPENDENCIES = $(TEST_DEPS)
|
||||
testkineticscrolling_DEPENDENCIES = $(TEST_DEPS)
|
||||
testlist_DEPENDENCIES = $(TEST_DEPS)
|
||||
testlockbutton_DEPENDENCIES = $(TEST_DEPS)
|
||||
testmenubars_DEPENDENCIES = $(TEST_DEPS)
|
||||
testmenubutton_DEPENDENCIES = $(TEST_DEPS)
|
||||
testmountoperation_DEPENDENCIES = $(TEST_DEPS)
|
||||
testmultidisplay_DEPENDENCIES = $(TEST_DEPS)
|
||||
|
@ -154,8 +154,8 @@ do_open (GtkAction *action)
|
||||
dialog = gtk_file_chooser_dialog_new ("Select file",
|
||||
GTK_WINDOW (main_window),
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN,
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_OPEN, GTK_RESPONSE_OK,
|
||||
"_Cancel", GTK_RESPONSE_CANCEL,
|
||||
"_Open", GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
|
||||
response = gtk_dialog_run (GTK_DIALOG (dialog));
|
||||
@ -216,8 +216,8 @@ do_save_as (GtkAction *action)
|
||||
dialog = gtk_file_chooser_dialog_new ("Select file",
|
||||
GTK_WINDOW (main_window),
|
||||
GTK_FILE_CHOOSER_ACTION_SAVE,
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_SAVE, GTK_RESPONSE_OK,
|
||||
"_Cancel", GTK_RESPONSE_CANCEL,
|
||||
"_Save", GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
|
||||
response = gtk_dialog_run (GTK_DIALOG (dialog));
|
||||
@ -572,7 +572,7 @@ preview_cb (GtkPrintOperation *op,
|
||||
page = gtk_spin_button_new_with_range (1, 100, 1);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), page, FALSE, FALSE, 0);
|
||||
|
||||
close = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
|
||||
close = gtk_button_new_with_label ("Close");
|
||||
gtk_box_pack_start (GTK_BOX (hbox), close, FALSE, FALSE, 0);
|
||||
|
||||
da = gtk_drawing_area_new ();
|
||||
|
@ -37,8 +37,8 @@ static GtkWidget *test_widgets[TEST_WIDGET_LAST];
|
||||
static GtkWidget*
|
||||
create_image (void)
|
||||
{
|
||||
return gtk_image_new_from_stock (GTK_STOCK_OPEN,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
return gtk_image_new_from_icon_name ("document-open",
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
}
|
||||
|
||||
static GtkWidget*
|
||||
|
@ -135,8 +135,8 @@ button_clicked (GtkButton *b,
|
||||
w = gtk_file_chooser_dialog_new ("Select file",
|
||||
GTK_WINDOW (toplevel),
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN,
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
|
||||
"_Cancel", GTK_RESPONSE_CANCEL,
|
||||
"_Open", GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
|
||||
gtk_dialog_run (GTK_DIALOG (w));
|
||||
|
@ -542,7 +542,7 @@ create_full_featured_assistant (GtkWidget *widget)
|
||||
assistant = gtk_assistant_new ();
|
||||
gtk_window_set_default_size (GTK_WINDOW (assistant), 400, 300);
|
||||
|
||||
button = gtk_button_new_from_stock (GTK_STOCK_STOP);
|
||||
button = gtk_button_new_with_label ("_Stop");
|
||||
gtk_widget_show (button);
|
||||
gtk_assistant_add_action_widget (GTK_ASSISTANT (assistant), button);
|
||||
g_signal_connect (button, "clicked",
|
||||
|
@ -104,7 +104,7 @@ add_button (GtkBox *box)
|
||||
char *text;
|
||||
|
||||
text = g_strdup_printf ("Remove %d", ++count);
|
||||
button = (GtkWidget *)gtk_button_new_from_stock (text);
|
||||
button = (GtkWidget *)gtk_button_new_with_label (text);
|
||||
g_free (text);
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (button), "play");
|
||||
g_signal_connect_swapped (button,
|
||||
|
@ -104,7 +104,7 @@ int main (int argc, char *argv[])
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (box), hbox);
|
||||
button = gtk_button_new_with_label ("_Save");
|
||||
gtk_button_set_image (GTK_BUTTON (button), gtk_image_new_from_stock (GTK_STOCK_ABOUT, GTK_ICON_SIZE_BUTTON));
|
||||
gtk_button_set_image (GTK_BUTTON (button), gtk_image_new_from_icon_name ("help-about", GTK_ICON_SIZE_BUTTON));
|
||||
gtk_container_add (GTK_CONTAINER (hbox), button);
|
||||
|
||||
g_object_get (button,
|
||||
@ -121,7 +121,7 @@ int main (int argc, char *argv[])
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (box), hbox);
|
||||
button = gtk_button_new_with_mnemonic ("_Save");
|
||||
gtk_button_set_image (GTK_BUTTON (button), gtk_image_new_from_stock (GTK_STOCK_ABOUT, GTK_ICON_SIZE_BUTTON));
|
||||
gtk_button_set_image (GTK_BUTTON (button), gtk_image_new_from_icon_name ("help-about", GTK_ICON_SIZE_BUTTON));
|
||||
gtk_container_add (GTK_CONTAINER (hbox), button);
|
||||
g_object_get (button,
|
||||
"label", &text,
|
||||
|
@ -25,7 +25,7 @@ simple_list_model (void)
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
SIMPLE_COLUMN_NAME, "Alice in wonderland",
|
||||
SIMPLE_COLUMN_ICON, "gtk-execute",
|
||||
SIMPLE_COLUMN_ICON, "system-run",
|
||||
SIMPLE_COLUMN_DESCRIPTION,
|
||||
"Twas brillig, and the slithy toves "
|
||||
"did gyre and gimble in the wabe; "
|
||||
@ -36,14 +36,14 @@ simple_list_model (void)
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
SIMPLE_COLUMN_NAME, "Marry Poppins",
|
||||
SIMPLE_COLUMN_ICON, "gtk-yes",
|
||||
SIMPLE_COLUMN_ICON, "dialog-information",
|
||||
SIMPLE_COLUMN_DESCRIPTION, "Supercalifragilisticexpialidocious",
|
||||
-1);
|
||||
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
SIMPLE_COLUMN_NAME, "George Bush",
|
||||
SIMPLE_COLUMN_ICON, "gtk-dialog-warning",
|
||||
SIMPLE_COLUMN_ICON, "dialog-warning",
|
||||
SIMPLE_COLUMN_DESCRIPTION, "It's a very good question, very direct, "
|
||||
"and I'm not going to answer it",
|
||||
-1);
|
||||
@ -51,7 +51,7 @@ simple_list_model (void)
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
SIMPLE_COLUMN_NAME, "Whinnie the pooh",
|
||||
SIMPLE_COLUMN_ICON, "gtk-stop",
|
||||
SIMPLE_COLUMN_ICON, "process-stop",
|
||||
SIMPLE_COLUMN_DESCRIPTION, "The most wonderful thing about tiggers, "
|
||||
"is tiggers are wonderful things",
|
||||
-1);
|
||||
@ -59,7 +59,7 @@ simple_list_model (void)
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
SIMPLE_COLUMN_NAME, "Aleister Crowley",
|
||||
SIMPLE_COLUMN_ICON, "gtk-about",
|
||||
SIMPLE_COLUMN_ICON, "help-about",
|
||||
SIMPLE_COLUMN_DESCRIPTION,
|
||||
"Thou shalt do what thou wilt shall be the whole of the law",
|
||||
-1);
|
||||
@ -67,7 +67,7 @@ simple_list_model (void)
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
SIMPLE_COLUMN_NAME, "Mark Twain",
|
||||
SIMPLE_COLUMN_ICON, "gtk-quit",
|
||||
SIMPLE_COLUMN_ICON, "application-exit",
|
||||
SIMPLE_COLUMN_DESCRIPTION,
|
||||
"Giving up smoking is the easiest thing in the world. "
|
||||
"I know because I've done it thousands of times.",
|
||||
@ -102,7 +102,7 @@ simple_iconview (void)
|
||||
cell_2 = renderer = gtk_cell_renderer_pixbuf_new ();
|
||||
g_object_set (G_OBJECT (renderer), "xalign", 0.0F, NULL);
|
||||
gtk_cell_area_box_pack_start (GTK_CELL_AREA_BOX (area), renderer, TRUE, FALSE, FALSE);
|
||||
gtk_cell_area_attribute_connect (area, renderer, "stock-id", SIMPLE_COLUMN_ICON);
|
||||
gtk_cell_area_attribute_connect (area, renderer, "icon-name", SIMPLE_COLUMN_ICON);
|
||||
|
||||
cell_3 = renderer = gtk_cell_renderer_text_new ();
|
||||
g_object_set (G_OBJECT (renderer),
|
||||
|
@ -114,7 +114,7 @@ main (int argc, char **argv)
|
||||
0,
|
||||
"Copy Large", 0,
|
||||
"Copy Small", 1,
|
||||
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
|
||||
"_Close", GTK_RESPONSE_CLOSE,
|
||||
NULL);
|
||||
|
||||
image = gtk_image_new ();
|
||||
|
@ -153,48 +153,39 @@ create_combo_box_grid_demo (void)
|
||||
static GtkTreeModel *
|
||||
create_tree_blaat (void)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
GtkWidget *cellview;
|
||||
GtkTreeIter iter, iter2;
|
||||
GtkTreeStore *store;
|
||||
|
||||
cellview = gtk_cell_view_new ();
|
||||
|
||||
store = gtk_tree_store_new (3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_BOOLEAN);
|
||||
store = gtk_tree_store_new (3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN);
|
||||
|
||||
pixbuf = gtk_widget_render_icon_pixbuf (cellview, GTK_STOCK_DIALOG_WARNING,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_tree_store_append (store, &iter, NULL);
|
||||
gtk_tree_store_set (store, &iter,
|
||||
0, pixbuf,
|
||||
1, "gtk-stock-dialog-warning",
|
||||
0, "dialog-warning",
|
||||
1, "dialog-warning",
|
||||
2, FALSE,
|
||||
-1);
|
||||
|
||||
pixbuf = gtk_widget_render_icon_pixbuf (cellview, GTK_STOCK_STOP,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_tree_store_append (store, &iter2, &iter);
|
||||
gtk_tree_store_set (store, &iter2,
|
||||
0, pixbuf,
|
||||
1, "gtk-stock-stop",
|
||||
0, "process-stop",
|
||||
1, "process-stop",
|
||||
2, FALSE,
|
||||
-1);
|
||||
|
||||
pixbuf = gtk_widget_render_icon_pixbuf (cellview, GTK_STOCK_NEW,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_tree_store_append (store, &iter2, &iter);
|
||||
gtk_tree_store_set (store, &iter2,
|
||||
0, pixbuf,
|
||||
1, "gtk-stock-new",
|
||||
0, "document-new",
|
||||
1, "document-new",
|
||||
2, FALSE,
|
||||
-1);
|
||||
|
||||
pixbuf = gtk_widget_render_icon_pixbuf (cellview, GTK_STOCK_CLEAR,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_tree_store_append (store, &iter, NULL);
|
||||
gtk_tree_store_set (store, &iter,
|
||||
0, pixbuf,
|
||||
1, "gtk-stock-clear",
|
||||
0, "edit-clear",
|
||||
1, "edit-clear",
|
||||
2, FALSE,
|
||||
-1);
|
||||
|
||||
@ -207,12 +198,10 @@ create_tree_blaat (void)
|
||||
-1);
|
||||
#endif
|
||||
|
||||
pixbuf = gtk_widget_render_icon_pixbuf (cellview, GTK_STOCK_OPEN,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_tree_store_append (store, &iter, NULL);
|
||||
gtk_tree_store_set (store, &iter,
|
||||
0, pixbuf,
|
||||
1, "gtk-stock-open",
|
||||
0, "document-open",
|
||||
1, "document-open",
|
||||
2, FALSE,
|
||||
-1);
|
||||
|
||||
@ -224,21 +213,18 @@ create_tree_blaat (void)
|
||||
static GtkTreeModel *
|
||||
create_empty_list_blaat (void)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
GtkWidget *cellview;
|
||||
GtkTreeIter iter;
|
||||
GtkListStore *store;
|
||||
|
||||
cellview = gtk_cell_view_new ();
|
||||
|
||||
store = gtk_list_store_new (2, GDK_TYPE_PIXBUF, G_TYPE_STRING);
|
||||
store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
|
||||
|
||||
pixbuf = gtk_widget_render_icon_pixbuf (cellview, GTK_STOCK_DIALOG_WARNING,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
0, pixbuf,
|
||||
1, "gtk-stock-dialog-warning",
|
||||
0, "dialog-warning",
|
||||
1, "dialog-warning",
|
||||
-1);
|
||||
|
||||
gtk_widget_destroy (cellview);
|
||||
@ -251,7 +237,6 @@ populate_list_blaat (gpointer data)
|
||||
{
|
||||
GtkComboBox *combo_box = GTK_COMBO_BOX (data);
|
||||
GtkListStore *store;
|
||||
GdkPixbuf *pixbuf;
|
||||
GtkWidget *cellview;
|
||||
GtkTreeIter iter;
|
||||
|
||||
@ -264,28 +249,22 @@ populate_list_blaat (gpointer data)
|
||||
|
||||
cellview = gtk_cell_view_new ();
|
||||
|
||||
pixbuf = gtk_widget_render_icon_pixbuf (cellview, GTK_STOCK_STOP,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
0, pixbuf,
|
||||
1, "gtk-stock-stop",
|
||||
0, "process-stop",
|
||||
1, "process-stop",
|
||||
-1);
|
||||
|
||||
pixbuf = gtk_widget_render_icon_pixbuf (cellview, GTK_STOCK_NEW,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
0, pixbuf,
|
||||
1, "gtk-stock-new",
|
||||
0, "document-new",
|
||||
1, "document-new",
|
||||
-1);
|
||||
|
||||
pixbuf = gtk_widget_render_icon_pixbuf (cellview, GTK_STOCK_CLEAR,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
0, pixbuf,
|
||||
1, "gtk-stock-clear",
|
||||
0, "edit-clear",
|
||||
1, "edit-clear",
|
||||
-1);
|
||||
|
||||
gtk_list_store_append (store, &iter);
|
||||
@ -294,12 +273,10 @@ populate_list_blaat (gpointer data)
|
||||
1, "separator",
|
||||
-1);
|
||||
|
||||
pixbuf = gtk_widget_render_icon_pixbuf (cellview, GTK_STOCK_OPEN,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
0, pixbuf,
|
||||
1, "gtk-stock-open",
|
||||
0, "document-open",
|
||||
1, "document-open",
|
||||
-1);
|
||||
|
||||
gtk_widget_destroy (cellview);
|
||||
@ -308,45 +285,36 @@ populate_list_blaat (gpointer data)
|
||||
static GtkTreeModel *
|
||||
create_list_blaat (void)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
GtkWidget *cellview;
|
||||
GtkTreeIter iter;
|
||||
GtkListStore *store;
|
||||
|
||||
cellview = gtk_cell_view_new ();
|
||||
|
||||
store = gtk_list_store_new (2, GDK_TYPE_PIXBUF, G_TYPE_STRING);
|
||||
store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
|
||||
|
||||
pixbuf = gtk_widget_render_icon_pixbuf (cellview, GTK_STOCK_DIALOG_WARNING,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
0, pixbuf,
|
||||
1, "gtk-stock-dialog-warning",
|
||||
0, "dialog-warning",
|
||||
1, "dialog-warning",
|
||||
-1);
|
||||
|
||||
pixbuf = gtk_widget_render_icon_pixbuf (cellview, GTK_STOCK_STOP,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
0, pixbuf,
|
||||
1, "gtk-stock-stop",
|
||||
0, "process-stop",
|
||||
1, "process-stop",
|
||||
-1);
|
||||
|
||||
pixbuf = gtk_widget_render_icon_pixbuf (cellview, GTK_STOCK_NEW,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
0, pixbuf,
|
||||
1, "gtk-stock-new",
|
||||
0, "document-new",
|
||||
1, "document-new",
|
||||
-1);
|
||||
|
||||
pixbuf = gtk_widget_render_icon_pixbuf (cellview, GTK_STOCK_CLEAR,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
0, pixbuf,
|
||||
1, "gtk-stock-clear",
|
||||
0, "edit-clear",
|
||||
1, "edit-clear",
|
||||
-1);
|
||||
|
||||
gtk_list_store_append (store, &iter);
|
||||
@ -355,12 +323,10 @@ create_list_blaat (void)
|
||||
1, "separator",
|
||||
-1);
|
||||
|
||||
pixbuf = gtk_widget_render_icon_pixbuf (cellview, GTK_STOCK_OPEN,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
0, pixbuf,
|
||||
1, "gtk-stock-open",
|
||||
0, "document-open",
|
||||
1, "document-open",
|
||||
-1);
|
||||
|
||||
gtk_widget_destroy (cellview);
|
||||
@ -1086,7 +1052,6 @@ main (int argc, char **argv)
|
||||
GtkWidget *combobox, *comboboxtext, *comboboxgrid;
|
||||
GtkWidget *tmp, *boom;
|
||||
GtkCellRenderer *renderer;
|
||||
GdkPixbuf *pixbuf;
|
||||
GtkTreeModel *model;
|
||||
GtkTreePath *path;
|
||||
GtkTreeIter iter;
|
||||
@ -1129,13 +1094,10 @@ main (int argc, char **argv)
|
||||
|
||||
cellview = gtk_cell_view_new ();
|
||||
renderer = gtk_cell_renderer_pixbuf_new ();
|
||||
pixbuf = gtk_widget_render_icon_pixbuf (cellview, GTK_STOCK_DIALOG_WARNING,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
|
||||
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (cellview),
|
||||
renderer,
|
||||
FALSE);
|
||||
g_object_set (renderer, "pixbuf", pixbuf, NULL);
|
||||
g_object_set (renderer, "icon-name", "dialog-warning", NULL);
|
||||
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (cellview),
|
||||
@ -1163,7 +1125,7 @@ main (int argc, char **argv)
|
||||
renderer,
|
||||
FALSE);
|
||||
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combobox), renderer,
|
||||
"pixbuf", 0,
|
||||
"icon-name", 0,
|
||||
NULL);
|
||||
gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combobox),
|
||||
renderer,
|
||||
@ -1208,7 +1170,7 @@ main (int argc, char **argv)
|
||||
renderer,
|
||||
FALSE);
|
||||
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combobox), renderer,
|
||||
"pixbuf", 0,
|
||||
"icon-name", 0,
|
||||
NULL);
|
||||
gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combobox),
|
||||
renderer,
|
||||
@ -1251,7 +1213,7 @@ main (int argc, char **argv)
|
||||
renderer,
|
||||
FALSE);
|
||||
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combobox), renderer,
|
||||
"pixbuf", 0,
|
||||
"icon-name", 0,
|
||||
NULL);
|
||||
gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combobox),
|
||||
renderer,
|
||||
@ -1312,7 +1274,7 @@ main (int argc, char **argv)
|
||||
renderer,
|
||||
FALSE);
|
||||
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combobox), renderer,
|
||||
"pixbuf", 0,
|
||||
"icon-name", 0,
|
||||
NULL);
|
||||
gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combobox),
|
||||
renderer,
|
||||
|
@ -254,7 +254,7 @@ main (int argc, char **argv)
|
||||
|
||||
dialog = gtk_dialog_new_with_buttons ("GtkComboBox model changes",
|
||||
NULL, 0,
|
||||
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
|
||||
"_Close", GTK_RESPONSE_CLOSE,
|
||||
NULL);
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
||||
|
@ -49,7 +49,7 @@ drag_begin_cb (GtkWidget *widget,
|
||||
|
||||
pos = gtk_entry_get_current_icon_drag_source (GTK_ENTRY (widget));
|
||||
if (pos != -1)
|
||||
gtk_drag_set_icon_stock (context, GTK_STOCK_INFO, 2, 2);
|
||||
gtk_drag_set_icon_name (context, "dialog-info", 2, 2);
|
||||
|
||||
g_print ("drag begin %d\n", pos);
|
||||
}
|
||||
@ -121,8 +121,8 @@ main (int argc, char **argv)
|
||||
gtk_widget_set_hexpand (entry, TRUE);
|
||||
gtk_grid_attach (GTK_GRID (grid), entry, 1, 0, 1, 1);
|
||||
|
||||
icon = g_themed_icon_new ("folder");
|
||||
g_themed_icon_append_name (G_THEMED_ICON (icon), "folder");
|
||||
icon = g_themed_icon_new ("folder-symbolic");
|
||||
g_themed_icon_append_name (G_THEMED_ICON (icon), "folder-symbolic");
|
||||
|
||||
gtk_entry_set_icon_from_gicon (GTK_ENTRY (entry),
|
||||
GTK_ENTRY_ICON_PRIMARY,
|
||||
@ -142,7 +142,7 @@ main (int argc, char **argv)
|
||||
|
||||
|
||||
/*
|
||||
* Save File - sets the icon using a stock id.
|
||||
* Save File - sets the icon using an icon name.
|
||||
*/
|
||||
label = gtk_label_new ("Save File:");
|
||||
gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
|
||||
@ -154,9 +154,9 @@ main (int argc, char **argv)
|
||||
gtk_entry_set_text (GTK_ENTRY (entry), "Right-to-left");
|
||||
gtk_widget_set_direction (entry, GTK_TEXT_DIR_RTL);
|
||||
|
||||
gtk_entry_set_icon_from_stock (GTK_ENTRY (entry),
|
||||
GTK_ENTRY_ICON_PRIMARY,
|
||||
GTK_STOCK_SAVE);
|
||||
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry),
|
||||
GTK_ENTRY_ICON_PRIMARY,
|
||||
"document-save-symbolic");
|
||||
gtk_entry_set_icon_tooltip_text (GTK_ENTRY (entry),
|
||||
GTK_ENTRY_ICON_PRIMARY,
|
||||
"Save a file");
|
||||
@ -187,13 +187,13 @@ main (int argc, char **argv)
|
||||
gtk_widget_set_hexpand (entry, TRUE);
|
||||
gtk_grid_attach (GTK_GRID (grid), entry, 1, 2, 1, 1);
|
||||
|
||||
gtk_entry_set_icon_from_stock (GTK_ENTRY (entry),
|
||||
GTK_ENTRY_ICON_PRIMARY,
|
||||
GTK_STOCK_FIND);
|
||||
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry),
|
||||
GTK_ENTRY_ICON_PRIMARY,
|
||||
"edit-find-symbolic");
|
||||
|
||||
gtk_entry_set_icon_from_stock (GTK_ENTRY (entry),
|
||||
GTK_ENTRY_ICON_SECONDARY,
|
||||
GTK_STOCK_CLEAR);
|
||||
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry),
|
||||
GTK_ENTRY_ICON_SECONDARY,
|
||||
"edit-clear-symbolic");
|
||||
|
||||
g_signal_connect (entry, "icon-press", G_CALLBACK (clear_pressed), NULL);
|
||||
|
||||
@ -203,7 +203,7 @@ main (int argc, char **argv)
|
||||
G_CALLBACK (properties_cb), entry);
|
||||
|
||||
/*
|
||||
* Password - Sets the icon using a stock id
|
||||
* Password - Sets the icon using an icon name
|
||||
*/
|
||||
label = gtk_label_new ("Password:");
|
||||
gtk_grid_attach (GTK_GRID (grid), label, 0, 3, 1, 1);
|
||||
@ -214,9 +214,9 @@ main (int argc, char **argv)
|
||||
gtk_grid_attach (GTK_GRID (grid), entry, 1, 3, 1, 1);
|
||||
gtk_entry_set_visibility (GTK_ENTRY (entry), FALSE);
|
||||
|
||||
gtk_entry_set_icon_from_stock (GTK_ENTRY (entry),
|
||||
GTK_ENTRY_ICON_PRIMARY,
|
||||
GTK_STOCK_DIALOG_AUTHENTICATION);
|
||||
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry),
|
||||
GTK_ENTRY_ICON_PRIMARY,
|
||||
"dialog-password-symbolic");
|
||||
|
||||
gtk_entry_set_icon_activatable (GTK_ENTRY (entry),
|
||||
GTK_ENTRY_ICON_PRIMARY,
|
||||
|
@ -586,16 +586,16 @@ main (int argc, char **argv)
|
||||
case GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER:
|
||||
gtk_window_set_title (GTK_WINDOW (dialog), "Select a file");
|
||||
gtk_dialog_add_buttons (GTK_DIALOG (dialog),
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_OPEN, GTK_RESPONSE_OK,
|
||||
_("_Cancel"), GTK_RESPONSE_CANCEL,
|
||||
_("_Open"), GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
break;
|
||||
case GTK_FILE_CHOOSER_ACTION_SAVE:
|
||||
case GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER:
|
||||
gtk_window_set_title (GTK_WINDOW (dialog), "Save a file");
|
||||
gtk_dialog_add_buttons (GTK_DIALOG (dialog),
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_SAVE, GTK_RESPONSE_OK,
|
||||
_("_Cancel"), GTK_RESPONSE_CANCEL,
|
||||
_("_Open"), GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
break;
|
||||
}
|
||||
|
@ -285,7 +285,7 @@ main (int argc,
|
||||
g_free (cwd);
|
||||
|
||||
win = gtk_dialog_new_with_buttons ("TestFileChooserButton", NULL, 0,
|
||||
GTK_STOCK_QUIT, GTK_RESPONSE_CLOSE, NULL);
|
||||
"_Quit", GTK_RESPONSE_CLOSE, NULL);
|
||||
g_signal_connect (win, "style-set", G_CALLBACK (win_style_set_cb), NULL);
|
||||
g_signal_connect (win, "response", G_CALLBACK (gtk_main_quit), NULL);
|
||||
|
||||
@ -327,7 +327,7 @@ main (int argc,
|
||||
g_signal_connect (chooser, "update-preview", G_CALLBACK (chooser_update_preview_cb), NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), chooser, TRUE, TRUE, 0);
|
||||
|
||||
button = gtk_button_new_from_stock (GTK_STOCK_PROPERTIES);
|
||||
button = gtk_button_new_with_label ("_Properties");
|
||||
g_signal_connect (button, "clicked", G_CALLBACK (properties_button_clicked_cb), chooser);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
|
||||
@ -357,7 +357,7 @@ main (int argc,
|
||||
g_signal_connect (chooser, "update-preview", G_CALLBACK (chooser_update_preview_cb), NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), chooser, TRUE, TRUE, 0);
|
||||
|
||||
button = gtk_button_new_from_stock (GTK_STOCK_PROPERTIES);
|
||||
button = gtk_button_new_with_label ("_Properties");
|
||||
g_signal_connect (button, "clicked", G_CALLBACK (properties_button_clicked_cb), chooser);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
|
||||
|
@ -258,7 +258,7 @@ create_alpha_window (GtkWidget *widget)
|
||||
|
||||
window = gtk_dialog_new_with_buttons ("Alpha Window",
|
||||
GTK_WINDOW (gtk_widget_get_toplevel (widget)), 0,
|
||||
GTK_STOCK_CLOSE, 0,
|
||||
"_Close", 0,
|
||||
NULL);
|
||||
|
||||
gtk_widget_set_app_paintable (window, TRUE);
|
||||
@ -553,7 +553,7 @@ create_big_windows (GtkWidget *widget)
|
||||
|
||||
window = gtk_dialog_new_with_buttons ("Big Windows",
|
||||
NULL, 0,
|
||||
GTK_STOCK_CLOSE,
|
||||
"_Close",
|
||||
GTK_RESPONSE_NONE,
|
||||
NULL);
|
||||
|
||||
@ -845,7 +845,7 @@ create_check_buttons (GtkWidget *widget)
|
||||
{
|
||||
window = gtk_dialog_new_with_buttons ("Check Buttons",
|
||||
NULL, 0,
|
||||
GTK_STOCK_CLOSE,
|
||||
"_Close",
|
||||
GTK_RESPONSE_NONE,
|
||||
NULL);
|
||||
|
||||
@ -910,7 +910,7 @@ create_radio_buttons (GtkWidget *widget)
|
||||
{
|
||||
window = gtk_dialog_new_with_buttons ("Radio Buttons",
|
||||
NULL, 0,
|
||||
GTK_STOCK_CLOSE,
|
||||
"_Close",
|
||||
GTK_RESPONSE_NONE,
|
||||
NULL);
|
||||
|
||||
@ -1923,7 +1923,7 @@ create_rotated_label (GtkWidget *widget)
|
||||
{
|
||||
window = gtk_dialog_new_with_buttons ("Rotated Label",
|
||||
GTK_WINDOW (gtk_widget_get_toplevel (widget)), 0,
|
||||
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
|
||||
"_Close", GTK_RESPONSE_CLOSE,
|
||||
NULL);
|
||||
|
||||
gtk_window_set_resizable (GTK_WINDOW (window), TRUE);
|
||||
@ -2054,7 +2054,7 @@ create_rotated_text (GtkWidget *widget)
|
||||
|
||||
window = gtk_dialog_new_with_buttons ("Rotated Text",
|
||||
GTK_WINDOW (gtk_widget_get_toplevel (widget)), 0,
|
||||
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
|
||||
"_Close", GTK_RESPONSE_CLOSE,
|
||||
NULL);
|
||||
|
||||
gtk_window_set_resizable (GTK_WINDOW (window), TRUE);
|
||||
@ -2785,8 +2785,8 @@ create_image (GtkWidget *widget)
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
pack_image (vbox, "Stock Warning Dialog",
|
||||
gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,
|
||||
GTK_ICON_SIZE_DIALOG));
|
||||
gtk_image_new_from_icon_name ("dialog-warning",
|
||||
GTK_ICON_SIZE_DIALOG));
|
||||
|
||||
pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) openfile);
|
||||
|
||||
@ -2993,8 +2993,8 @@ create_menu (GdkScreen *screen, gint depth, gint length)
|
||||
|
||||
group = NULL;
|
||||
|
||||
image = gtk_image_new_from_stock (GTK_STOCK_OPEN,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
image = gtk_image_new_from_icon_name ("document-open",
|
||||
GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image);
|
||||
menuitem = gtk_image_menu_item_new_with_label ("Image item");
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image);
|
||||
@ -3050,8 +3050,8 @@ create_table_menu (GdkScreen *screen, gint cols, gint rows)
|
||||
j++;
|
||||
|
||||
/* now fill the items submenu */
|
||||
image = gtk_image_new_from_stock (GTK_STOCK_HELP,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
image = gtk_image_new_from_icon_name ("help-broswer",
|
||||
GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image);
|
||||
menuitem = gtk_image_menu_item_new_with_label ("Image");
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image);
|
||||
@ -3066,8 +3066,8 @@ create_table_menu (GdkScreen *screen, gint cols, gint rows)
|
||||
gtk_menu_attach (GTK_MENU (submenu), menuitem, 0, 1, 1, 2);
|
||||
gtk_widget_show (menuitem);
|
||||
|
||||
image = gtk_image_new_from_stock (GTK_STOCK_HELP,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
image = gtk_image_new_from_icon_name ("help-browser",
|
||||
GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image);
|
||||
menuitem = gtk_image_menu_item_new_with_label ("Image");
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image);
|
||||
@ -3271,8 +3271,8 @@ create_menus (GtkWidget *widget)
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
|
||||
image = gtk_image_new_from_stock (GTK_STOCK_HELP,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
image = gtk_image_new_from_icon_name ("help-browser",
|
||||
GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image);
|
||||
menuitem = gtk_image_menu_item_new_with_label ("Help");
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image);
|
||||
@ -3506,7 +3506,7 @@ create_key_lookup (GtkWidget *widget)
|
||||
GtkWidget *content_area;
|
||||
|
||||
window = gtk_dialog_new_with_buttons ("Key Lookup", NULL, 0,
|
||||
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
|
||||
"_Close", GTK_RESPONSE_CLOSE,
|
||||
NULL);
|
||||
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
@ -3599,10 +3599,11 @@ cmw_file (GtkWidget *widget, GtkWidget *parent)
|
||||
GtkWidget *fs;
|
||||
|
||||
fs = gtk_file_chooser_dialog_new ("This is a modal file selection dialog",
|
||||
GTK_WINDOW (parent), GTK_FILE_CHOOSER_ACTION_OPEN,
|
||||
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
NULL);
|
||||
GTK_WINDOW (parent),
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN,
|
||||
"_Open", GTK_RESPONSE_ACCEPT,
|
||||
"_Cancel", GTK_RESPONSE_CANCEL,
|
||||
NULL);
|
||||
gtk_window_set_screen (GTK_WINDOW (fs), gtk_widget_get_screen (parent));
|
||||
gtk_window_set_modal (GTK_WINDOW (fs), TRUE);
|
||||
|
||||
@ -4291,7 +4292,7 @@ create_size_group_window (GdkScreen *screen,
|
||||
|
||||
window = gtk_dialog_new_with_buttons ("GtkSizeGroup",
|
||||
NULL, 0,
|
||||
GTK_STOCK_CLOSE,
|
||||
"_Close",
|
||||
GTK_RESPONSE_NONE,
|
||||
NULL);
|
||||
|
||||
@ -5188,8 +5189,8 @@ create_forward_back (const char *title,
|
||||
{
|
||||
GtkWidget *frame = gtk_frame_new (title);
|
||||
GtkWidget *bbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
GtkWidget *back_button = gtk_button_new_from_stock (GTK_STOCK_GO_BACK);
|
||||
GtkWidget *forward_button = gtk_button_new_from_stock (GTK_STOCK_GO_FORWARD);
|
||||
GtkWidget *back_button = gtk_button_new_with_label ("Back");
|
||||
GtkWidget *forward_button = gtk_button_new_with_label ("Forward");
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (bbox), 5);
|
||||
|
||||
@ -5320,7 +5321,7 @@ create_focus (GtkWidget *widget)
|
||||
|
||||
window = gtk_dialog_new_with_buttons ("Keyboard focus navigation",
|
||||
NULL, 0,
|
||||
GTK_STOCK_CLOSE,
|
||||
"_Close",
|
||||
GTK_RESPONSE_NONE,
|
||||
NULL);
|
||||
|
||||
@ -5599,8 +5600,8 @@ create_display_screen (GtkWidget *widget)
|
||||
gtk_grid_attach (GTK_GRID (grid), combo_dpy, 0, 1, 1, 1);
|
||||
|
||||
bbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
applyb = gtk_button_new_from_stock (GTK_STOCK_APPLY);
|
||||
cancelb = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
|
||||
applyb = gtk_button_new_with_label ("_Apply");
|
||||
cancelb = gtk_button_new_with_label ("_Cancel");
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (vbox), bbox);
|
||||
|
||||
|
@ -28,7 +28,7 @@ on_bookmark_clicked (GtkButton *button, gpointer data)
|
||||
chooser = gtk_file_chooser_dialog_new ("File Chooser Test",
|
||||
window,
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN,
|
||||
GTK_STOCK_CLOSE,
|
||||
"_Close",
|
||||
GTK_RESPONSE_CLOSE,
|
||||
NULL);
|
||||
|
||||
@ -120,7 +120,7 @@ change_header (GtkButton *button, gpointer data)
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (header), "titlebar");
|
||||
gtk_header_bar_set_title (GTK_HEADER_BAR (header), "Example header");
|
||||
|
||||
widget = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
|
||||
widget = gtk_button_new_with_label ("_Close");
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (widget), "suggested-action");
|
||||
g_signal_connect (widget, "clicked", G_CALLBACK (gtk_main_quit), NULL);
|
||||
|
||||
|
@ -719,7 +719,7 @@ TestInterface interfaces[] = {
|
||||
" <child>"
|
||||
" <object class=\"GtkCellRendererPixbuf\" id=\"cellrenderertext1\"/>"
|
||||
" <attributes>"
|
||||
" <attribute name=\"stock-id\">1</attribute>"
|
||||
" <attribute name=\"icon-name\">1</attribute>"
|
||||
" </attributes>"
|
||||
" </child>"
|
||||
" <child>"
|
||||
@ -820,7 +820,7 @@ TestInterface interfaces[] = {
|
||||
" <child>"
|
||||
" <object class=\"GtkCellRendererPixbuf\" id=\"cellrenderertext3\"/>"
|
||||
" <attributes>"
|
||||
" <attribute name=\"stock-id\">1</attribute>"
|
||||
" <attribute name=\"icon-name\">1</attribute>"
|
||||
" </attributes>"
|
||||
" </child>"
|
||||
" <child>"
|
||||
@ -883,27 +883,27 @@ TestInterface interfaces[] = {
|
||||
" <data>"
|
||||
" <row>"
|
||||
" <col id=\"0\" translatable=\"yes\">Montreal, Quebec Canada</col>"
|
||||
" <col id=\"1\" translatable=\"yes\">gtk-yes</col>"
|
||||
" <col id=\"1\" translatable=\"yes\">edit-undo</col>"
|
||||
" </row>"
|
||||
" <row>"
|
||||
" <col id=\"0\" translatable=\"yes\">Sao Paulo, SP Brazil</col>"
|
||||
" <col id=\"1\" translatable=\"yes\">gtk-no</col>"
|
||||
" <col id=\"1\" translatable=\"yes\">edit-redo</col>"
|
||||
" </row>"
|
||||
" <row>"
|
||||
" <col id=\"0\" translatable=\"yes\">Buenos Aires, Argentina</col>"
|
||||
" <col id=\"1\" translatable=\"yes\">gtk-stop</col>"
|
||||
" <col id=\"1\" translatable=\"yes\">process-stop</col>"
|
||||
" </row>"
|
||||
" <row>"
|
||||
" <col id=\"0\" translatable=\"yes\">Los Angelos, California USA</col>"
|
||||
" <col id=\"1\" translatable=\"yes\">gtk-media-record</col>"
|
||||
" <col id=\"1\" translatable=\"yes\">media-record</col>"
|
||||
" </row>"
|
||||
" <row>"
|
||||
" <col id=\"0\" translatable=\"yes\">Rio de Janeiro, RJ Brazil</col>"
|
||||
" <col id=\"1\" translatable=\"yes\">gtk-dialog-error</col>"
|
||||
" <col id=\"1\" translatable=\"yes\">dialog-error</col>"
|
||||
" </row>"
|
||||
" <row>"
|
||||
" <col id=\"0\" translatable=\"yes\">Seoul, South Korea</col>"
|
||||
" <col id=\"1\" translatable=\"yes\">gtk-info</col>"
|
||||
" <col id=\"1\" translatable=\"yes\">dialog-information</col>"
|
||||
" </row>"
|
||||
" </data>"
|
||||
" </object>"
|
||||
|
@ -1,50 +0,0 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static void scale_moved(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
g_print("%.1f\n", gtk_adjustment_get_value(GTK_ADJUSTMENT(data)));
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
GtkWidget *window, *vbox, *toolbar, *scale;
|
||||
GtkAdjustment *adjustment;
|
||||
GtkStyleContext *context;
|
||||
GtkToolItem *boxitem, *button;
|
||||
|
||||
gtk_init(&argc, &argv);
|
||||
|
||||
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
|
||||
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_default_size(GTK_WINDOW(window), 300, 200);
|
||||
|
||||
toolbar = gtk_toolbar_new();
|
||||
context = gtk_widget_get_style_context(toolbar);
|
||||
gtk_style_context_add_class(context, GTK_STYLE_CLASS_PRIMARY_TOOLBAR);
|
||||
|
||||
adjustment = gtk_adjustment_new(0, 0, 10, 1, 2, 0);
|
||||
scale = gtk_scale_new(GTK_ORIENTATION_HORIZONTAL, adjustment);
|
||||
gtk_scale_set_value_pos(GTK_SCALE(scale), GTK_POS_RIGHT);
|
||||
gtk_widget_set_size_request(scale, 255, -1);
|
||||
|
||||
button = gtk_tool_button_new_from_stock(GTK_STOCK_QUIT);
|
||||
|
||||
boxitem = gtk_tool_item_new();
|
||||
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), button, 0);
|
||||
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), boxitem, 1);
|
||||
|
||||
gtk_container_add(GTK_CONTAINER(vbox), toolbar);
|
||||
gtk_container_add(GTK_CONTAINER(boxitem), scale);
|
||||
gtk_container_add(GTK_CONTAINER(window), vbox);
|
||||
|
||||
g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL);
|
||||
g_signal_connect(button, "clicked", G_CALLBACK(gtk_main_quit), NULL);
|
||||
g_signal_connect(scale, "value-changed", G_CALLBACK(scale_moved), adjustment);
|
||||
|
||||
gtk_widget_show_all(window);
|
||||
|
||||
gtk_main();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ int main (int argc, char **argv)
|
||||
GtkWidget *item;
|
||||
|
||||
if (i == 3) {
|
||||
item = gtk_image_menu_item_new_from_stock (GTK_STOCK_COPY, accel_group);
|
||||
item = gtk_menu_item_new_with_mnemonic ("_Copy");
|
||||
} else {
|
||||
char *label;
|
||||
|
||||
|
@ -85,8 +85,8 @@ make_selection_dialog (GdkScreen * screen,
|
||||
gtk_widget_grab_focus (entry);
|
||||
|
||||
gtk_dialog_add_buttons (GTK_DIALOG (window),
|
||||
GTK_STOCK_APPLY, GTK_RESPONSE_APPLY,
|
||||
GTK_STOCK_QUIT, GTK_RESPONSE_DELETE_EVENT,
|
||||
"_Apply", GTK_RESPONSE_APPLY,
|
||||
"_Quit", GTK_RESPONSE_DELETE_EVENT,
|
||||
NULL);
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (window), GTK_RESPONSE_APPLY);
|
||||
|
||||
@ -116,7 +116,7 @@ main (int argc, char *argv[])
|
||||
dialog = gtk_dialog_new_with_buttons ("Second Display Selection",
|
||||
NULL,
|
||||
GTK_DIALOG_MODAL,
|
||||
GTK_STOCK_OK,
|
||||
"_OK",
|
||||
GTK_RESPONSE_OK, NULL);
|
||||
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
|
||||
|
@ -103,9 +103,16 @@ on_notebook_drag_begin (GtkWidget *widget,
|
||||
|
||||
if (page_num > 2)
|
||||
{
|
||||
pixbuf = gtk_widget_render_icon_pixbuf (widget,
|
||||
(page_num % 2) ? GTK_STOCK_HELP : GTK_STOCK_STOP,
|
||||
GTK_ICON_SIZE_DND);
|
||||
GtkIconTheme *icon_theme;
|
||||
int width;
|
||||
|
||||
icon_theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (widget));
|
||||
gtk_icon_size_lookup (GTK_ICON_SIZE_DND, &width, NULL);
|
||||
pixbuf = gtk_icon_theme_load_icon (icon_theme,
|
||||
(page_num % 2) ? "help-browser" : "process-stop",
|
||||
width,
|
||||
GTK_ICON_LOOKUP_GENERIC_FALLBACK,
|
||||
NULL);
|
||||
|
||||
gtk_drag_set_icon_pixbuf (context, pixbuf, 0, 0);
|
||||
g_object_unref (pixbuf);
|
||||
@ -219,7 +226,7 @@ create_trash_button (void)
|
||||
{
|
||||
GtkWidget *button;
|
||||
|
||||
button = gtk_button_new_from_stock (GTK_STOCK_DELETE);
|
||||
button = gtk_button_new_with_label ("_Delete");
|
||||
|
||||
gtk_drag_dest_set (button,
|
||||
GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP,
|
||||
|
@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include "gtkoffscreenbox.h"
|
||||
|
||||
@ -143,8 +144,9 @@ create_treeview (GtkWidget *vbox)
|
||||
GtkWidget *scrolledwindow;
|
||||
GtkListStore *store;
|
||||
GtkWidget *tree_view;
|
||||
GSList *stock_ids;
|
||||
GSList *list;
|
||||
GtkIconTheme *icon_theme;
|
||||
GList *icon_names;
|
||||
GList *list;
|
||||
|
||||
scrolledwindow = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow),
|
||||
@ -161,7 +163,7 @@ create_treeview (GtkWidget *vbox)
|
||||
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (tree_view), -1,
|
||||
"Icon",
|
||||
gtk_cell_renderer_pixbuf_new (),
|
||||
"stock-id", 0,
|
||||
"icon-name", 0,
|
||||
NULL);
|
||||
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (tree_view), -1,
|
||||
"Label",
|
||||
@ -169,24 +171,21 @@ create_treeview (GtkWidget *vbox)
|
||||
"text", 1,
|
||||
NULL);
|
||||
|
||||
stock_ids = gtk_stock_list_ids ();
|
||||
icon_theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (vbox));
|
||||
icon_names = gtk_icon_theme_list_icons (icon_theme, NULL);
|
||||
icon_names = g_list_sort (icon_names, (GCompareFunc) strcmp);
|
||||
|
||||
for (list = stock_ids; list; list = g_slist_next (list))
|
||||
for (list = icon_names; list; list = g_list_next (list))
|
||||
{
|
||||
const gchar *stock_id = list->data;
|
||||
GtkStockItem item;
|
||||
const gchar *name = list->data;
|
||||
|
||||
if (gtk_stock_lookup (stock_id, &item))
|
||||
{
|
||||
gtk_list_store_insert_with_values (store, NULL, -1,
|
||||
0, item.stock_id,
|
||||
1, item.label,
|
||||
-1);
|
||||
}
|
||||
gtk_list_store_insert_with_values (store, NULL, -1,
|
||||
0, name,
|
||||
1, name,
|
||||
-1);
|
||||
}
|
||||
|
||||
g_slist_foreach (stock_ids, (GFunc) g_free, NULL);
|
||||
g_slist_free (stock_ids);
|
||||
g_list_free_full (icon_names, g_free);
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
|
@ -132,8 +132,8 @@ main (int argc,
|
||||
NULL);
|
||||
gtk_window_set_title (GTK_WINDOW (dialog), "Select a file");
|
||||
gtk_dialog_add_buttons (GTK_DIALOG (dialog),
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_OPEN, GTK_RESPONSE_OK,
|
||||
"_Cancel", GTK_RESPONSE_CANCEL,
|
||||
"_Open", GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
|
||||
|
@ -95,7 +95,7 @@ create_recent_chooser_menu (gint limit)
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
|
||||
menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_CLEAR, NULL);
|
||||
menuitem = gtk_menu_item_new_with_mnemonic ("Clear");
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
|
||||
@ -113,11 +113,11 @@ create_file_menu (GtkAccelGroup *accelgroup)
|
||||
|
||||
menu = gtk_menu_new ();
|
||||
|
||||
menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_NEW, accelgroup);
|
||||
menuitem = gtk_menu_item_new_with_mnemonic ("_New");
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
|
||||
menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_OPEN, accelgroup);
|
||||
menuitem = gtk_image_menu_item_new_with_mnemonic ("_Open");
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
|
||||
@ -131,7 +131,7 @@ create_file_menu (GtkAccelGroup *accelgroup)
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
|
||||
menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_QUIT, accelgroup);
|
||||
menuitem = gtk_menu_item_new_with_mnemonic ("_Quit");
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
|
||||
|
@ -170,12 +170,12 @@ create_menubar (GtkWindow *window)
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
|
||||
menu = gtk_menu_new ();
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu);
|
||||
menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_NEW, NULL);
|
||||
menuitem = gtk_menu_item_new_with_mnemonic ("_New");
|
||||
g_signal_connect (menuitem, "activate", G_CALLBACK (print_hello), window);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
||||
menuitem = gtk_separator_menu_item_new ();
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
||||
menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_QUIT, NULL);
|
||||
menuitem = gtk_menu_item_new_with_mnemonic ("_Quit");
|
||||
g_signal_connect (menuitem, "activate", G_CALLBACK (gtk_main_quit), window);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
||||
|
||||
@ -186,7 +186,7 @@ create_menubar (GtkWindow *window)
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
|
||||
menu = gtk_menu_new ();
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu);
|
||||
menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_ABOUT, NULL);
|
||||
menuitem = gtk_menu_item_new_with_mnemonic ("_About");
|
||||
g_signal_connect (menuitem, "activate", G_CALLBACK (print_hello), window);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
||||
|
||||
|
@ -229,7 +229,7 @@ popup_menu (GtkStatusIcon *icon,
|
||||
gtk_menu_set_screen (GTK_MENU (menu),
|
||||
gtk_status_icon_get_screen (icon));
|
||||
|
||||
menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_PROPERTIES, NULL);
|
||||
menuitem = gtk_menu_item_new_with_mnemonic ("_Properties");
|
||||
g_signal_connect (menuitem, "activate", G_CALLBACK (do_properties), icon);
|
||||
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
||||
|
@ -573,9 +573,9 @@ main (gint argc, gchar **argv)
|
||||
store = create_items_list (&treeview);
|
||||
gtk_container_add (GTK_CONTAINER (scrolled_window), treeview);
|
||||
|
||||
item = gtk_tool_button_new_from_stock (GTK_STOCK_NEW);
|
||||
item = gtk_tool_button_new (NULL, NULL);
|
||||
gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), "document-new");
|
||||
gtk_tool_button_set_label (GTK_TOOL_BUTTON (item), "Custom label");
|
||||
gtk_tool_button_set_label (GTK_TOOL_BUTTON (item), NULL);
|
||||
add_item_to_list (store, item, "New");
|
||||
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
|
||||
gdk_threads_add_timeout (3000, (GSourceFunc) timeout_cb, item);
|
||||
@ -592,7 +592,9 @@ main (gint argc, gchar **argv)
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
||||
}
|
||||
|
||||
item = gtk_menu_tool_button_new_from_stock (GTK_STOCK_OPEN);
|
||||
item = gtk_menu_tool_button_new (NULL, NULL);
|
||||
gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), "document-open");
|
||||
gtk_tool_button_set_label (GTK_TOOL_BUTTON (item), "Open");
|
||||
gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (item), menu);
|
||||
add_item_to_list (store, item, "Open");
|
||||
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
|
||||
@ -609,7 +611,9 @@ main (gint argc, gchar **argv)
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
||||
}
|
||||
|
||||
item = gtk_menu_tool_button_new_from_stock (GTK_STOCK_GO_BACK);
|
||||
item = gtk_menu_tool_button_new (NULL, NULL);
|
||||
gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), "go-previous");
|
||||
gtk_tool_button_set_label (GTK_TOOL_BUTTON (item), "Back");
|
||||
gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (item), menu);
|
||||
add_item_to_list (store, item, "BackWithHistory");
|
||||
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
|
||||
@ -618,14 +622,16 @@ main (gint argc, gchar **argv)
|
||||
add_item_to_list (store, item, "-----");
|
||||
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
|
||||
|
||||
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_DIALOG);
|
||||
image = gtk_image_new_from_icon_name ("dialog-warning", GTK_ICON_SIZE_DIALOG);
|
||||
item = gtk_tool_item_new ();
|
||||
gtk_widget_show (image);
|
||||
gtk_container_add (GTK_CONTAINER (item), image);
|
||||
add_item_to_list (store, item, "(Custom Item)");
|
||||
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
|
||||
|
||||
item = gtk_tool_button_new_from_stock (GTK_STOCK_GO_BACK);
|
||||
item = gtk_tool_button_new (NULL, NULL);
|
||||
gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), "go-previous");
|
||||
gtk_tool_button_set_label (GTK_TOOL_BUTTON (item), "Back");
|
||||
add_item_to_list (store, item, "Back");
|
||||
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
|
||||
|
||||
@ -633,11 +639,14 @@ main (gint argc, gchar **argv)
|
||||
add_item_to_list (store, item, "-----");
|
||||
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
|
||||
|
||||
item = gtk_tool_button_new_from_stock (GTK_STOCK_GO_FORWARD);
|
||||
item = gtk_tool_button_new (NULL, NULL);
|
||||
gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), "go-next");
|
||||
gtk_tool_button_set_label (GTK_TOOL_BUTTON (item), "Forward");
|
||||
add_item_to_list (store, item, "Forward");
|
||||
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
|
||||
|
||||
item = gtk_toggle_tool_button_new_from_stock (GTK_STOCK_BOLD);
|
||||
item = gtk_toggle_tool_button_new ();
|
||||
gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), "format-text-bold");
|
||||
g_signal_connect (item, "toggled", G_CALLBACK (bold_toggled), NULL);
|
||||
add_item_to_list (store, item, "Bold");
|
||||
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
|
||||
@ -650,20 +659,23 @@ main (gint argc, gchar **argv)
|
||||
gtk_separator_tool_item_set_draw (GTK_SEPARATOR_TOOL_ITEM (item), FALSE);
|
||||
g_assert (gtk_toolbar_get_nth_item (GTK_TOOLBAR (toolbar), 0) != 0);
|
||||
|
||||
item = gtk_radio_tool_button_new_from_stock (NULL, GTK_STOCK_JUSTIFY_LEFT);
|
||||
item = gtk_radio_tool_button_new (NULL);
|
||||
gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), "format-justify-left");
|
||||
group = gtk_radio_tool_button_get_group (GTK_RADIO_TOOL_BUTTON (item));
|
||||
add_item_to_list (store, item, "Left");
|
||||
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
|
||||
|
||||
|
||||
item = gtk_radio_tool_button_new_from_stock (group, GTK_STOCK_JUSTIFY_CENTER);
|
||||
item = gtk_radio_tool_button_new (group);
|
||||
gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), "format-justify-center");
|
||||
make_prop_editor (G_OBJECT (item));
|
||||
|
||||
group = gtk_radio_tool_button_get_group (GTK_RADIO_TOOL_BUTTON (item));
|
||||
add_item_to_list (store, item, "Center");
|
||||
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
|
||||
|
||||
item = gtk_radio_tool_button_new_from_stock (group, GTK_STOCK_JUSTIFY_RIGHT);
|
||||
item = gtk_radio_tool_button_new (group);
|
||||
gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), "format-justify-right");
|
||||
add_item_to_list (store, item, "Right");
|
||||
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
|
||||
|
||||
|
@ -32,8 +32,8 @@ query_tooltip_cb (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
gtk_tooltip_set_markup (tooltip, gtk_button_get_label (GTK_BUTTON (widget)));
|
||||
gtk_tooltip_set_icon_from_stock (tooltip, GTK_STOCK_DELETE,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
gtk_tooltip_set_icon_from_icon_name (tooltip, "edit-delete",
|
||||
GTK_ICON_SIZE_MENU);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ create_tab_label (GtkWidget *toplevel)
|
||||
GtkWidget *box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
|
||||
GtkWidget *label = gtk_label_new (G_OBJECT_TYPE_NAME (toplevel));
|
||||
GtkWidget *button = gtk_button_new ();
|
||||
GtkWidget *image = gtk_image_new_from_stock (GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
|
||||
GtkWidget *image = gtk_image_new_from_icon_name ("window-close", GTK_ICON_SIZE_MENU);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (button), image);
|
||||
gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0);
|
||||
@ -86,8 +86,8 @@ main (gint argc, gchar **argv)
|
||||
g_signal_connect (widget, "delete-event", G_CALLBACK (toplevel_delete_event), NULL);
|
||||
|
||||
widget = gtk_recent_chooser_dialog_new ("the recent chooser", NULL,
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
|
||||
"_Cancel", GTK_RESPONSE_CANCEL,
|
||||
"_Open", GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
toplevel_delete_event (widget, NULL, NULL);
|
||||
g_signal_connect (widget, "delete-event", G_CALLBACK (toplevel_delete_event), NULL);
|
||||
|
@ -30,8 +30,8 @@ enum {
|
||||
STRING_COLUMN,
|
||||
IS_EDITABLE_COLUMN,
|
||||
IS_SENSITIVE_COLUMN,
|
||||
PIXBUF_COLUMN,
|
||||
LAST_PIXBUF_COLUMN,
|
||||
ICON_NAME_COLUMN,
|
||||
LAST_ICON_NAME_COLUMN,
|
||||
PROGRESS_COLUMN,
|
||||
NUM_COLUMNS
|
||||
};
|
||||
@ -53,20 +53,13 @@ create_model (void)
|
||||
GtkTreeStore *model;
|
||||
GtkTreeIter iter;
|
||||
gint i;
|
||||
GdkPixbuf *foo, *bar;
|
||||
GtkWidget *blah;
|
||||
|
||||
blah = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
foo = gtk_widget_render_icon_pixbuf (blah, GTK_STOCK_NEW, GTK_ICON_SIZE_MENU);
|
||||
bar = gtk_widget_render_icon_pixbuf (blah, GTK_STOCK_DELETE, GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_destroy (blah);
|
||||
|
||||
model = gtk_tree_store_new (NUM_COLUMNS,
|
||||
G_TYPE_STRING,
|
||||
G_TYPE_BOOLEAN,
|
||||
G_TYPE_BOOLEAN,
|
||||
GDK_TYPE_PIXBUF,
|
||||
GDK_TYPE_PIXBUF,
|
||||
G_TYPE_STRING,
|
||||
G_TYPE_STRING,
|
||||
G_TYPE_INT);
|
||||
|
||||
for (i = 0; model_strings[i].string != NULL; i++)
|
||||
@ -77,8 +70,8 @@ create_model (void)
|
||||
STRING_COLUMN, model_strings[i].string,
|
||||
IS_EDITABLE_COLUMN, model_strings[i].is_editable,
|
||||
IS_SENSITIVE_COLUMN, model_strings[i].is_sensitive,
|
||||
PIXBUF_COLUMN, foo,
|
||||
LAST_PIXBUF_COLUMN, bar,
|
||||
ICON_NAME_COLUMN, "document-new",
|
||||
LAST_ICON_NAME_COLUMN, "edit-delete",
|
||||
PROGRESS_COLUMN, model_strings[i].progress,
|
||||
-1);
|
||||
}
|
||||
@ -269,7 +262,7 @@ main (gint argc, gchar **argv)
|
||||
renderer = gtk_cell_renderer_pixbuf_new ();
|
||||
gtk_tree_view_column_pack_start (column, renderer, FALSE);
|
||||
gtk_tree_view_column_set_attributes (column, renderer,
|
||||
"pixbuf", PIXBUF_COLUMN,
|
||||
"icon-name", ICON_NAME_COLUMN,
|
||||
"sensitive", IS_SENSITIVE_COLUMN,
|
||||
NULL);
|
||||
callback[0].area = area;
|
||||
@ -311,7 +304,7 @@ main (gint argc, gchar **argv)
|
||||
NULL);
|
||||
gtk_tree_view_column_pack_start (column, renderer, FALSE);
|
||||
gtk_tree_view_column_set_attributes (column, renderer,
|
||||
"pixbuf", LAST_PIXBUF_COLUMN,
|
||||
"icon-name", LAST_ICON_NAME_COLUMN,
|
||||
"sensitive", IS_SENSITIVE_COLUMN,
|
||||
NULL);
|
||||
callback[3].area = area;
|
||||
|
@ -155,7 +155,7 @@ simple_tree_model (void)
|
||||
gtk_tree_store_append (store, &parent, NULL);
|
||||
gtk_tree_store_set (store, &parent,
|
||||
SIMPLE_COLUMN_NAME, "Alice in wonderland",
|
||||
SIMPLE_COLUMN_ICON, "gtk-execute",
|
||||
SIMPLE_COLUMN_ICON, "system-run",
|
||||
SIMPLE_COLUMN_DESCRIPTION,
|
||||
"Twas brillig, and the slithy toves "
|
||||
"did gyre and gimble in the wabe",
|
||||
@ -164,35 +164,35 @@ simple_tree_model (void)
|
||||
gtk_tree_store_append (store, &iter, &parent);
|
||||
gtk_tree_store_set (store, &iter,
|
||||
SIMPLE_COLUMN_NAME, "Go ask",
|
||||
SIMPLE_COLUMN_ICON, "gtk-zoom-out",
|
||||
SIMPLE_COLUMN_ICON, "zoom-out",
|
||||
SIMPLE_COLUMN_DESCRIPTION, "One pill makes you shorter",
|
||||
-1);
|
||||
|
||||
gtk_tree_store_append (store, &iter, &parent);
|
||||
gtk_tree_store_set (store, &iter,
|
||||
SIMPLE_COLUMN_NAME, "Alice",
|
||||
SIMPLE_COLUMN_ICON, "gtk-zoom-in",
|
||||
SIMPLE_COLUMN_ICON, "zoom-in",
|
||||
SIMPLE_COLUMN_DESCRIPTION, "Another one makes you tall",
|
||||
-1);
|
||||
|
||||
gtk_tree_store_append (store, &iter, &parent);
|
||||
gtk_tree_store_set (store, &iter,
|
||||
SIMPLE_COLUMN_NAME, "Jefferson Airplane",
|
||||
SIMPLE_COLUMN_ICON, "gtk-zoom-fit",
|
||||
SIMPLE_COLUMN_ICON, "zoom-fit-best",
|
||||
SIMPLE_COLUMN_DESCRIPTION, "The one's that mother gives you dont do anything at all",
|
||||
-1);
|
||||
|
||||
gtk_tree_store_append (store, &iter, NULL);
|
||||
gtk_tree_store_set (store, &iter,
|
||||
SIMPLE_COLUMN_NAME, "Marry Poppins",
|
||||
SIMPLE_COLUMN_ICON, "gtk-yes",
|
||||
SIMPLE_COLUMN_ICON, "dialog-information",
|
||||
SIMPLE_COLUMN_DESCRIPTION, "Supercalifragilisticexpialidocious",
|
||||
-1);
|
||||
|
||||
gtk_tree_store_append (store, &iter, NULL);
|
||||
gtk_tree_store_set (store, &iter,
|
||||
SIMPLE_COLUMN_NAME, "George Bush",
|
||||
SIMPLE_COLUMN_ICON, "gtk-dialog-question",
|
||||
SIMPLE_COLUMN_ICON, "dialog-question",
|
||||
SIMPLE_COLUMN_DESCRIPTION, "It's a very good question, very direct, "
|
||||
"and I'm not going to answer it",
|
||||
-1);
|
||||
@ -200,7 +200,7 @@ simple_tree_model (void)
|
||||
gtk_tree_store_append (store, &parent, NULL);
|
||||
gtk_tree_store_set (store, &parent,
|
||||
SIMPLE_COLUMN_NAME, "Whinnie the pooh",
|
||||
SIMPLE_COLUMN_ICON, "gtk-stop",
|
||||
SIMPLE_COLUMN_ICON, "process-stop",
|
||||
SIMPLE_COLUMN_DESCRIPTION, "The most wonderful thing about tiggers, "
|
||||
"is tiggers are wonderful things",
|
||||
-1);
|
||||
@ -208,56 +208,56 @@ simple_tree_model (void)
|
||||
gtk_tree_store_append (store, &iter, &parent);
|
||||
gtk_tree_store_set (store, &iter,
|
||||
SIMPLE_COLUMN_NAME, "Tigger",
|
||||
SIMPLE_COLUMN_ICON, "gtk-yes",
|
||||
SIMPLE_COLUMN_ICON, "dialog-information",
|
||||
SIMPLE_COLUMN_DESCRIPTION, "Eager",
|
||||
-1);
|
||||
|
||||
gtk_tree_store_append (store, &child, &iter);
|
||||
gtk_tree_store_set (store, &child,
|
||||
SIMPLE_COLUMN_NAME, "Jump",
|
||||
SIMPLE_COLUMN_ICON, "gtk-yes",
|
||||
SIMPLE_COLUMN_ICON, "dialog-information",
|
||||
SIMPLE_COLUMN_DESCRIPTION, "Very High",
|
||||
-1);
|
||||
|
||||
gtk_tree_store_append (store, &child, &iter);
|
||||
gtk_tree_store_set (store, &child,
|
||||
SIMPLE_COLUMN_NAME, "Pounce",
|
||||
SIMPLE_COLUMN_ICON, "gtk-no",
|
||||
SIMPLE_COLUMN_ICON, "dialog-question",
|
||||
SIMPLE_COLUMN_DESCRIPTION, "On Pooh",
|
||||
-1);
|
||||
|
||||
gtk_tree_store_append (store, &child, &iter);
|
||||
gtk_tree_store_set (store, &child,
|
||||
SIMPLE_COLUMN_NAME, "Bounce",
|
||||
SIMPLE_COLUMN_ICON, "gtk-cancel",
|
||||
SIMPLE_COLUMN_ICON, "dialog-error",
|
||||
SIMPLE_COLUMN_DESCRIPTION, "Around",
|
||||
-1);
|
||||
|
||||
gtk_tree_store_append (store, &iter, &parent);
|
||||
gtk_tree_store_set (store, &iter,
|
||||
SIMPLE_COLUMN_NAME, "Owl",
|
||||
SIMPLE_COLUMN_ICON, "gtk-stop",
|
||||
SIMPLE_COLUMN_ICON, "process-stop",
|
||||
SIMPLE_COLUMN_DESCRIPTION, "Wise",
|
||||
-1);
|
||||
|
||||
gtk_tree_store_append (store, &iter, &parent);
|
||||
gtk_tree_store_set (store, &iter,
|
||||
SIMPLE_COLUMN_NAME, "Eor",
|
||||
SIMPLE_COLUMN_ICON, "gtk-no",
|
||||
SIMPLE_COLUMN_ICON, "dialog-question",
|
||||
SIMPLE_COLUMN_DESCRIPTION, "Depressed",
|
||||
-1);
|
||||
|
||||
gtk_tree_store_append (store, &iter, &parent);
|
||||
gtk_tree_store_set (store, &iter,
|
||||
SIMPLE_COLUMN_NAME, "Piglet",
|
||||
SIMPLE_COLUMN_ICON, "gtk-media-play",
|
||||
SIMPLE_COLUMN_ICON, "media-playback-start",
|
||||
SIMPLE_COLUMN_DESCRIPTION, "Insecure",
|
||||
-1);
|
||||
|
||||
gtk_tree_store_append (store, &iter, NULL);
|
||||
gtk_tree_store_set (store, &iter,
|
||||
SIMPLE_COLUMN_NAME, "Aleister Crowley",
|
||||
SIMPLE_COLUMN_ICON, "gtk-about",
|
||||
SIMPLE_COLUMN_ICON, "help-about",
|
||||
SIMPLE_COLUMN_DESCRIPTION,
|
||||
"Thou shalt do what thou wilt shall be the whole of the law",
|
||||
-1);
|
||||
@ -265,7 +265,7 @@ simple_tree_model (void)
|
||||
gtk_tree_store_append (store, &iter, NULL);
|
||||
gtk_tree_store_set (store, &iter,
|
||||
SIMPLE_COLUMN_NAME, "Mark Twain",
|
||||
SIMPLE_COLUMN_ICON, "gtk-quit",
|
||||
SIMPLE_COLUMN_ICON, "application-exit",
|
||||
SIMPLE_COLUMN_DESCRIPTION,
|
||||
"Giving up smoking is the easiest thing in the world. "
|
||||
"I know because I've done it thousands of times.",
|
||||
@ -290,7 +290,7 @@ create_cell_area (void)
|
||||
cell_2 = renderer = gtk_cell_renderer_pixbuf_new ();
|
||||
g_object_set (G_OBJECT (renderer), "xalign", 0.0F, NULL);
|
||||
gtk_cell_area_box_pack_start (GTK_CELL_AREA_BOX (area), renderer, TRUE, FALSE, FALSE);
|
||||
gtk_cell_area_attribute_connect (area, renderer, "stock-id", SIMPLE_COLUMN_ICON);
|
||||
gtk_cell_area_attribute_connect (area, renderer, "icon-name", SIMPLE_COLUMN_ICON);
|
||||
|
||||
cell_3 = renderer = gtk_cell_renderer_text_new ();
|
||||
g_object_set (G_OBJECT (renderer),
|
||||
|
@ -114,7 +114,7 @@ int main (int argc, char *argv[])
|
||||
|
||||
cell = gtk_cell_renderer_pixbuf_new ();
|
||||
gtk_tree_view_column_pack_start (col, cell, FALSE);
|
||||
gtk_tree_view_column_add_attribute (col, cell, "stock-id", 2);
|
||||
gtk_tree_view_column_add_attribute (col, cell, "icon-name", 2);
|
||||
|
||||
cell = gtk_cell_renderer_toggle_new ();
|
||||
gtk_tree_view_column_pack_start (col, cell, FALSE);
|
||||
@ -123,9 +123,9 @@ int main (int argc, char *argv[])
|
||||
gtk_tree_view_append_column (GTK_TREE_VIEW (tv), col);
|
||||
|
||||
store = gtk_tree_store_new (3, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_STRING);
|
||||
gtk_tree_store_insert_with_values (store, NULL, NULL, 0, 0, "One row", 1, FALSE, 2, "gtk-open", -1);
|
||||
gtk_tree_store_insert_with_values (store, &iter, NULL, 1, 0, "Two row", 1, FALSE, 2, "gtk-file", -1);
|
||||
gtk_tree_store_insert_with_values (store, NULL, &iter, 0, 0, "Three row", 1, FALSE, 2, "gtk-file", -1);
|
||||
gtk_tree_store_insert_with_values (store, NULL, NULL, 0, 0, "One row", 1, FALSE, 2, "document-open", -1);
|
||||
gtk_tree_store_insert_with_values (store, &iter, NULL, 1, 0, "Two row", 1, FALSE, 2, "dialog-warning", -1);
|
||||
gtk_tree_store_insert_with_values (store, NULL, &iter, 0, 0, "Three row", 1, FALSE, 2, "dialog-error", -1);
|
||||
|
||||
gtk_tree_view_set_model (GTK_TREE_VIEW (tv), GTK_TREE_MODEL (store));
|
||||
|
||||
|
@ -48,7 +48,7 @@ enum {
|
||||
static TreeEntry info_entries[] =
|
||||
{
|
||||
{
|
||||
"gtk-execute",
|
||||
"system-run",
|
||||
"Will you\n"
|
||||
"run this ?",
|
||||
"Currently executing that thing... you might want to abort",
|
||||
@ -58,7 +58,7 @@ static TreeEntry info_entries[] =
|
||||
NULL
|
||||
},
|
||||
{
|
||||
"gtk-dialog-authentication",
|
||||
"dialog-password",
|
||||
"This is the\n"
|
||||
"realest of the real",
|
||||
"We are about to authenticate the actual realness, this could take some time",
|
||||
@ -73,7 +73,7 @@ static TreeEntry info_entries[] =
|
||||
static TreeEntry directory_entries[] =
|
||||
{
|
||||
{
|
||||
"gtk-edit",
|
||||
"document-open",
|
||||
"We can edit\n"
|
||||
"things in here",
|
||||
"Time to edit your directory, almost finished now",
|
||||
@ -83,7 +83,7 @@ static TreeEntry directory_entries[] =
|
||||
NULL
|
||||
},
|
||||
{
|
||||
"gtk-file",
|
||||
"text-x-generic",
|
||||
"You have a\n"
|
||||
"file here",
|
||||
"Who would of thought there would be a file in the directory ?",
|
||||
@ -93,7 +93,7 @@ static TreeEntry directory_entries[] =
|
||||
NULL
|
||||
},
|
||||
{
|
||||
"gtk-dialog-question",
|
||||
"dialog-question",
|
||||
"Any questions ?",
|
||||
"This file would like to ask you a question",
|
||||
"so he decided that the fine print underneath the progress bar probably made no sense at all",
|
||||
@ -107,7 +107,7 @@ static TreeEntry directory_entries[] =
|
||||
static TreeEntry other_entries[] =
|
||||
{
|
||||
{
|
||||
"gtk-zoom-fit",
|
||||
"zoom-fit-best",
|
||||
"Thats the\n"
|
||||
"perfect fit",
|
||||
"Now fitting foo into bar using frobnicator",
|
||||
@ -118,7 +118,7 @@ static TreeEntry other_entries[] =
|
||||
NULL
|
||||
},
|
||||
{
|
||||
"gtk-underline",
|
||||
"format-text-underline",
|
||||
"Under the\n"
|
||||
"line",
|
||||
"Now underlining that this demo would look alot niftier with some real content",
|
||||
@ -133,18 +133,18 @@ static TreeEntry other_entries[] =
|
||||
static TreeEntry add_entries[] =
|
||||
{
|
||||
{
|
||||
"gtk-about",
|
||||
"help-about",
|
||||
"its about\n"
|
||||
"to start",
|
||||
"This is what it's all about",
|
||||
"so he went ahead and added the 'gtk-about' icon to his story, thinking 'mint cream' would be the "
|
||||
"so he went ahead and added the 'help-about' icon to his story, thinking 'mint cream' would be the "
|
||||
"right color for something like that",
|
||||
"dark violet",
|
||||
1,
|
||||
NULL
|
||||
},
|
||||
{
|
||||
"gtk-zoom-in",
|
||||
"zoom-in",
|
||||
"Watch it\n"
|
||||
"Zoom !",
|
||||
"Now zooming into something",
|
||||
@ -154,7 +154,7 @@ static TreeEntry add_entries[] =
|
||||
NULL
|
||||
},
|
||||
{
|
||||
"gtk-zoom-out",
|
||||
"zoom-out",
|
||||
"Zoom Zoom\n"
|
||||
"Zoom !",
|
||||
"Now zooming out of something else",
|
||||
@ -171,7 +171,7 @@ static TreeEntry add_entries[] =
|
||||
static TreeEntry main_entries[] =
|
||||
{
|
||||
{
|
||||
"gtk-info",
|
||||
"dialog-information",
|
||||
"This is all\n"
|
||||
"the info",
|
||||
"We are currently informing you",
|
||||
@ -181,7 +181,7 @@ static TreeEntry main_entries[] =
|
||||
info_entries
|
||||
},
|
||||
{
|
||||
"gtk-dialog-warning",
|
||||
"dialog-warning",
|
||||
"This is a\n"
|
||||
"warning",
|
||||
"We would like to warn you that your laptop might explode after we're done",
|
||||
@ -191,7 +191,7 @@ static TreeEntry main_entries[] =
|
||||
NULL
|
||||
},
|
||||
{
|
||||
"gtk-dialog-error",
|
||||
"dialog-error",
|
||||
"An error will\n"
|
||||
"occur",
|
||||
"Once we're done here, dont worry... an error will surely occur.",
|
||||
@ -201,7 +201,7 @@ static TreeEntry main_entries[] =
|
||||
NULL
|
||||
},
|
||||
{
|
||||
"gtk-directory",
|
||||
"folder",
|
||||
"The directory",
|
||||
"Currently scanning your directories.",
|
||||
"jill didnt know what to make of the barking pigs either so she fed him sleeping pills",
|
||||
@ -210,7 +210,7 @@ static TreeEntry main_entries[] =
|
||||
directory_entries
|
||||
},
|
||||
{
|
||||
"gtk-delete",
|
||||
"edit-delete",
|
||||
"Now deleting\n"
|
||||
"the whole thing",
|
||||
"Time to delete the sucker",
|
||||
@ -220,7 +220,7 @@ static TreeEntry main_entries[] =
|
||||
NULL
|
||||
},
|
||||
{
|
||||
"gtk-add",
|
||||
"list-add",
|
||||
"Anything\n"
|
||||
"to add ?",
|
||||
"Now adding stuff... please be patient",
|
||||
@ -230,7 +230,7 @@ static TreeEntry main_entries[] =
|
||||
add_entries
|
||||
},
|
||||
{
|
||||
"gtk-redo",
|
||||
"edit-redo",
|
||||
"Time to\n"
|
||||
"do it again",
|
||||
"For the hell of it, lets add the content to the treeview over and over again !",
|
||||
@ -325,7 +325,7 @@ main (gint argc, gchar **argv)
|
||||
g_object_set (renderer, "stock-size", GTK_ICON_SIZE_DIALOG, NULL);
|
||||
gtk_tree_view_column_pack_start (column, renderer, TRUE);
|
||||
gtk_tree_view_column_set_attributes (column, renderer,
|
||||
"stock-id", ICON_COLUMN, NULL);
|
||||
"icon-name", ICON_COLUMN, NULL);
|
||||
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
g_object_set (renderer, "scale", 1.2F, "weight", PANGO_WEIGHT_BOLD, NULL);
|
||||
|
@ -296,8 +296,8 @@ save_clicked (GtkWidget *button,
|
||||
dialog = gtk_file_chooser_dialog_new ("Filename for window data",
|
||||
NULL,
|
||||
GTK_FILE_CHOOSER_ACTION_SAVE,
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
|
||||
"_Cancel", GTK_RESPONSE_CANCEL,
|
||||
"_Save", GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
|
||||
gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
|
||||
@ -455,7 +455,7 @@ manual_clicked (GtkWidget *button,
|
||||
dialog = gtk_dialog_new_with_buttons ("Select new position and size",
|
||||
GTK_WINDOW (main_window),
|
||||
GTK_DIALOG_MODAL,
|
||||
GTK_STOCK_OK, GTK_RESPONSE_OK,
|
||||
"_OK", GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
|
||||
|
||||
@ -896,8 +896,8 @@ main (int argc, char **argv)
|
||||
|
||||
button = gtk_button_new ();
|
||||
gtk_button_set_image (GTK_BUTTON (button),
|
||||
gtk_image_new_from_stock (GTK_STOCK_GO_BACK,
|
||||
GTK_ICON_SIZE_BUTTON));
|
||||
gtk_image_new_from_icon_name ("go-previous-symbolic",
|
||||
GTK_ICON_SIZE_BUTTON));
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (move_window_clicked),
|
||||
GINT_TO_POINTER (GTK_DIR_LEFT));
|
||||
@ -906,8 +906,8 @@ main (int argc, char **argv)
|
||||
|
||||
button = gtk_button_new ();
|
||||
gtk_button_set_image (GTK_BUTTON (button),
|
||||
gtk_image_new_from_stock (GTK_STOCK_GO_UP,
|
||||
GTK_ICON_SIZE_BUTTON));
|
||||
gtk_image_new_from_icon_name ("go-up-symbolic",
|
||||
GTK_ICON_SIZE_BUTTON));
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (move_window_clicked),
|
||||
GINT_TO_POINTER (GTK_DIR_UP));
|
||||
@ -916,8 +916,8 @@ main (int argc, char **argv)
|
||||
|
||||
button = gtk_button_new ();
|
||||
gtk_button_set_image (GTK_BUTTON (button),
|
||||
gtk_image_new_from_stock (GTK_STOCK_GO_FORWARD,
|
||||
GTK_ICON_SIZE_BUTTON));
|
||||
gtk_image_new_from_icon_name ("go-next-symbolic",
|
||||
GTK_ICON_SIZE_BUTTON));
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (move_window_clicked),
|
||||
GINT_TO_POINTER (GTK_DIR_RIGHT));
|
||||
@ -926,8 +926,8 @@ main (int argc, char **argv)
|
||||
|
||||
button = gtk_button_new ();
|
||||
gtk_button_set_image (GTK_BUTTON (button),
|
||||
gtk_image_new_from_stock (GTK_STOCK_GO_DOWN,
|
||||
GTK_ICON_SIZE_BUTTON));
|
||||
gtk_image_new_from_icon_name ("go-down-symbolic",
|
||||
GTK_ICON_SIZE_BUTTON));
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (move_window_clicked),
|
||||
GINT_TO_POINTER (GTK_DIR_DOWN));
|
||||
@ -974,8 +974,8 @@ main (int argc, char **argv)
|
||||
|
||||
button = gtk_button_new_with_label ("scroll");
|
||||
gtk_button_set_image (GTK_BUTTON (button),
|
||||
gtk_image_new_from_stock (GTK_STOCK_GO_UP,
|
||||
GTK_ICON_SIZE_BUTTON));
|
||||
gtk_image_new_from_icon_name ("go-up-symbolic",
|
||||
GTK_ICON_SIZE_BUTTON));
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (scroll_window_clicked),
|
||||
GINT_TO_POINTER (GTK_DIR_UP));
|
||||
@ -984,8 +984,8 @@ main (int argc, char **argv)
|
||||
|
||||
button = gtk_button_new_with_label ("scroll");
|
||||
gtk_button_set_image (GTK_BUTTON (button),
|
||||
gtk_image_new_from_stock (GTK_STOCK_GO_DOWN,
|
||||
GTK_ICON_SIZE_BUTTON));
|
||||
gtk_image_new_from_icon_name ("go-down-symbolic",
|
||||
GTK_ICON_SIZE_BUTTON));
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (scroll_window_clicked),
|
||||
GINT_TO_POINTER (GTK_DIR_DOWN));
|
||||
|
@ -36,7 +36,7 @@ show_dialog (void)
|
||||
|
||||
dialog = gtk_dialog_new_with_buttons ("Test", GTK_WINDOW (window),
|
||||
GTK_DIALOG_MODAL,
|
||||
GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL,
|
||||
"_Close", GTK_RESPONSE_CANCEL,
|
||||
NULL);
|
||||
|
||||
label = gtk_label_new ("Lorem ipsum dolor sit amet, consectetur adipiscing elit. "
|
||||
|
Loading…
Reference in New Issue
Block a user