Namespace the enum values properly. Sorry about the resize grip trouble,

2003-08-25  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkactiongroup.h (GtkActionGroupEntryType): Namespace the enum
	values properly. Sorry about the resize grip trouble, Owen.  (#120621)

	* gtk/gtkactiongroup.c:
	* demos/gtk-demo/appwindow.c:
	* tests/testmerge.c:
	* tests/testactions.c: Use new GtkActionGroupEntryType enum.
This commit is contained in:
Matthias Clasen 2003-08-24 22:06:52 +00:00 committed by Matthias Clasen
parent b374ae3fb4
commit 32c6a944cf
10 changed files with 77 additions and 27 deletions

View File

@ -1,3 +1,13 @@
2003-08-25 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.h (GtkActionGroupEntryType): Namespace the enum
values properly. Sorry about the resize grip trouble, Owen. (#120621)
* gtk/gtkactiongroup.c:
* demos/gtk-demo/appwindow.c:
* tests/testmerge.c:
* tests/testactions.c: Use new GtkActionGroupEntryType enum.
Sun Aug 24 17:14:44 2003 Owen Taylor <otaylor@redhat.com> Sun Aug 24 17:14:44 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtk.h: Remove reference to gtkresizegrip.h. * gtk/gtk.h: Remove reference to gtkresizegrip.h.

View File

@ -1,3 +1,13 @@
2003-08-25 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.h (GtkActionGroupEntryType): Namespace the enum
values properly. Sorry about the resize grip trouble, Owen. (#120621)
* gtk/gtkactiongroup.c:
* demos/gtk-demo/appwindow.c:
* tests/testmerge.c:
* tests/testactions.c: Use new GtkActionGroupEntryType enum.
Sun Aug 24 17:14:44 2003 Owen Taylor <otaylor@redhat.com> Sun Aug 24 17:14:44 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtk.h: Remove reference to gtkresizegrip.h. * gtk/gtk.h: Remove reference to gtkresizegrip.h.

View File

@ -1,3 +1,13 @@
2003-08-25 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.h (GtkActionGroupEntryType): Namespace the enum
values properly. Sorry about the resize grip trouble, Owen. (#120621)
* gtk/gtkactiongroup.c:
* demos/gtk-demo/appwindow.c:
* tests/testmerge.c:
* tests/testactions.c: Use new GtkActionGroupEntryType enum.
Sun Aug 24 17:14:44 2003 Owen Taylor <otaylor@redhat.com> Sun Aug 24 17:14:44 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtk.h: Remove reference to gtkresizegrip.h. * gtk/gtk.h: Remove reference to gtkresizegrip.h.

View File

@ -1,3 +1,13 @@
2003-08-25 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.h (GtkActionGroupEntryType): Namespace the enum
values properly. Sorry about the resize grip trouble, Owen. (#120621)
* gtk/gtkactiongroup.c:
* demos/gtk-demo/appwindow.c:
* tests/testmerge.c:
* tests/testactions.c: Use new GtkActionGroupEntryType enum.
Sun Aug 24 17:14:44 2003 Owen Taylor <otaylor@redhat.com> Sun Aug 24 17:14:44 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtk.h: Remove reference to gtkresizegrip.h. * gtk/gtk.h: Remove reference to gtkresizegrip.h.

View File

@ -1,3 +1,13 @@
2003-08-25 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.h (GtkActionGroupEntryType): Namespace the enum
values properly. Sorry about the resize grip trouble, Owen. (#120621)
* gtk/gtkactiongroup.c:
* demos/gtk-demo/appwindow.c:
* tests/testmerge.c:
* tests/testactions.c: Use new GtkActionGroupEntryType enum.
Sun Aug 24 17:14:44 2003 Owen Taylor <otaylor@redhat.com> Sun Aug 24 17:14:44 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtk.h: Remove reference to gtkresizegrip.h. * gtk/gtk.h: Remove reference to gtkresizegrip.h.

View File

@ -50,13 +50,13 @@ static GtkActionGroupEntry entries[] = {
{ "SaveAs", N_("Save _As..."), GTK_STOCK_SAVE, NULL, N_("Save to a file"), G_CALLBACK (activate_action), NULL }, { "SaveAs", N_("Save _As..."), GTK_STOCK_SAVE, NULL, N_("Save to a file"), G_CALLBACK (activate_action), NULL },
{ "Quit", N_("_Quit"), GTK_STOCK_QUIT, "<control>Q", N_("Quit"), G_CALLBACK (activate_action), NULL }, { "Quit", N_("_Quit"), GTK_STOCK_QUIT, "<control>Q", N_("Quit"), G_CALLBACK (activate_action), NULL },
{ "Red", N_("_Red"), NULL, "<control>R", N_("Blood"), G_CALLBACK (activate_action), NULL, RADIO_ACTION }, { "Red", N_("_Red"), NULL, "<control>R", N_("Blood"), G_CALLBACK (activate_action), NULL, GTK_ACTION_RADIO },
{ "Green", N_("_Green"), NULL, "<control>G", N_("Grass"), G_CALLBACK (activate_action), NULL, RADIO_ACTION, "Red" }, { "Green", N_("_Green"), NULL, "<control>G", N_("Grass"), G_CALLBACK (activate_action), NULL, GTK_ACTION_RADIO, "Red" },
{ "Blue", N_("_Blue"), NULL, "<control>B", N_("Sky"), G_CALLBACK (activate_action), NULL, RADIO_ACTION, "Red" }, { "Blue", N_("_Blue"), NULL, "<control>B", N_("Sky"), G_CALLBACK (activate_action), NULL, GTK_ACTION_RADIO, "Red" },
{ "Square", N_("_Square"), NULL, "<control>S", N_("Square"), G_CALLBACK (activate_action), NULL, RADIO_ACTION }, { "Square", N_("_Square"), NULL, "<control>S", N_("Square"), G_CALLBACK (activate_action), NULL, GTK_ACTION_RADIO },
{ "Rectangle", N_("_Rectangle"), NULL, "<control>R", N_("Rectangle"), G_CALLBACK (activate_action), NULL, RADIO_ACTION, "Square" }, { "Rectangle", N_("_Rectangle"), NULL, "<control>R", N_("Rectangle"), G_CALLBACK (activate_action), NULL, GTK_ACTION_RADIO, "Square" },
{ "Oval", N_("_Oval"), NULL, "<control>O", N_("Egg"), G_CALLBACK (activate_action), NULL, RADIO_ACTION, "Square" }, { "Oval", N_("_Oval"), NULL, "<control>O", N_("Egg"), G_CALLBACK (activate_action), NULL, GTK_ACTION_RADIO, "Square" },
{ "About", N_("_About"), NULL, "<control>A", N_("About"), G_CALLBACK (activate_action), NULL }, { "About", N_("_About"), NULL, "<control>A", N_("About"), G_CALLBACK (activate_action), NULL },
{ "Logo", NULL, "demo-gtk-logo", NULL, N_("GTK+"), G_CALLBACK (activate_action), NULL }, { "Logo", NULL, "demo-gtk-logo", NULL, N_("GTK+"), G_CALLBACK (activate_action), NULL },
}; };

View File

@ -290,13 +290,13 @@ gtk_action_group_add_actions (GtkActionGroup *action_group,
gchar *accel_path; gchar *accel_path;
switch (entries[i].entry_type) { switch (entries[i].entry_type) {
case NORMAL_ACTION: case GTK_ACTION_NORMAL:
action_type = GTK_TYPE_ACTION; action_type = GTK_TYPE_ACTION;
break; break;
case TOGGLE_ACTION: case GTK_ACTION_TOGGLE:
action_type = GTK_TYPE_TOGGLE_ACTION; action_type = GTK_TYPE_TOGGLE_ACTION;
break; break;
case RADIO_ACTION: case GTK_ACTION_RADIO:
action_type = GTK_TYPE_RADIO_ACTION; action_type = GTK_TYPE_RADIO_ACTION;
break; break;
default: default:
@ -311,7 +311,7 @@ gtk_action_group_add_actions (GtkActionGroup *action_group,
"stock_id", entries[i].stock_id, "stock_id", entries[i].stock_id,
NULL); NULL);
if (entries[i].entry_type == RADIO_ACTION && if (entries[i].entry_type == GTK_ACTION_RADIO &&
entries[i].extra_data != NULL) entries[i].extra_data != NULL)
{ {
GtkAction *radio_action; GtkAction *radio_action;

View File

@ -69,9 +69,9 @@ struct _GtkActionGroupClass
typedef enum typedef enum
{ {
NORMAL_ACTION, GTK_ACTION_NORMAL,
TOGGLE_ACTION, GTK_ACTION_TOGGLE,
RADIO_ACTION GTK_ACTION_RADIO
} GtkActionGroupEntryType; } GtkActionGroupEntryType;
struct _GtkActionGroupEntry struct _GtkActionGroupEntry

View File

@ -94,41 +94,41 @@ static GtkActionGroupEntry entries[] = {
G_CALLBACK (activate_action), NULL }, G_CALLBACK (activate_action), NULL },
{ "bold", N_("_Bold"), GTK_STOCK_BOLD, "<control>B", { "bold", N_("_Bold"), GTK_STOCK_BOLD, "<control>B",
N_("Change to bold face"), N_("Change to bold face"),
G_CALLBACK (toggle_action), NULL, TOGGLE_ACTION }, G_CALLBACK (toggle_action), NULL, GTK_ACTION_TOGGLE },
{ "justify-left", N_("_Left"), GTK_STOCK_JUSTIFY_LEFT, "<control>L", { "justify-left", N_("_Left"), GTK_STOCK_JUSTIFY_LEFT, "<control>L",
N_("Left justify the text"), N_("Left justify the text"),
G_CALLBACK (toggle_action), NULL, RADIO_ACTION }, G_CALLBACK (toggle_action), NULL, GTK_ACTION_RADIO },
{ "justify-center", N_("C_enter"), GTK_STOCK_JUSTIFY_CENTER, "<control>E", { "justify-center", N_("C_enter"), GTK_STOCK_JUSTIFY_CENTER, "<control>E",
N_("Center justify the text"), N_("Center justify the text"),
G_CALLBACK (toggle_action), NULL, RADIO_ACTION, "justify-left" }, G_CALLBACK (toggle_action), NULL, GTK_ACTION_RADIO, "justify-left" },
{ "justify-right", N_("_Right"), GTK_STOCK_JUSTIFY_RIGHT, "<control>R", { "justify-right", N_("_Right"), GTK_STOCK_JUSTIFY_RIGHT, "<control>R",
N_("Right justify the text"), N_("Right justify the text"),
G_CALLBACK (toggle_action), NULL, RADIO_ACTION, "justify-left" }, G_CALLBACK (toggle_action), NULL, GTK_ACTION_RADIO, "justify-left" },
{ "justify-fill", N_("_Fill"), GTK_STOCK_JUSTIFY_FILL, "<control>J", { "justify-fill", N_("_Fill"), GTK_STOCK_JUSTIFY_FILL, "<control>J",
N_("Fill justify the text"), N_("Fill justify the text"),
G_CALLBACK (toggle_action), NULL, RADIO_ACTION, "justify-left" }, G_CALLBACK (toggle_action), NULL, GTK_ACTION_RADIO, "justify-left" },
{ "quit", NULL, GTK_STOCK_QUIT, "<control>Q", { "quit", NULL, GTK_STOCK_QUIT, "<control>Q",
N_("Quit the application"), N_("Quit the application"),
G_CALLBACK (gtk_main_quit), NULL }, G_CALLBACK (gtk_main_quit), NULL },
{ "toggle-cnp", N_("Enable Cut/Copy/Paste"), NULL, NULL, { "toggle-cnp", N_("Enable Cut/Copy/Paste"), NULL, NULL,
N_("Change the sensitivity of the cut, copy and paste actions"), N_("Change the sensitivity of the cut, copy and paste actions"),
G_CALLBACK (toggle_cnp_actions), NULL, TOGGLE_ACTION }, G_CALLBACK (toggle_cnp_actions), NULL, GTK_ACTION_TOGGLE },
{ "customise-accels", N_("Customise _Accels"), NULL, NULL, { "customise-accels", N_("Customise _Accels"), NULL, NULL,
N_("Customise keyboard shortcuts"), N_("Customise keyboard shortcuts"),
G_CALLBACK (show_accel_dialog), NULL }, G_CALLBACK (show_accel_dialog), NULL },
{ "toolbar-icons", N_("Icons"), NULL, NULL, { "toolbar-icons", N_("Icons"), NULL, NULL,
NULL, G_CALLBACK (toolbar_style), GINT_TO_POINTER (GTK_TOOLBAR_ICONS), NULL, G_CALLBACK (toolbar_style), GINT_TO_POINTER (GTK_TOOLBAR_ICONS),
RADIO_ACTION, NULL }, GTK_ACTION_RADIO, NULL },
{ "toolbar-text", N_("Text"), NULL, NULL, { "toolbar-text", N_("Text"), NULL, NULL,
NULL, G_CALLBACK (toolbar_style), GINT_TO_POINTER (GTK_TOOLBAR_TEXT), NULL, G_CALLBACK (toolbar_style), GINT_TO_POINTER (GTK_TOOLBAR_TEXT),
RADIO_ACTION, "toolbar-icons" }, GTK_ACTION_RADIO, "toolbar-icons" },
{ "toolbar-both", N_("Both"), NULL, NULL, { "toolbar-both", N_("Both"), NULL, NULL,
NULL, G_CALLBACK (toolbar_style), GINT_TO_POINTER (GTK_TOOLBAR_BOTH), NULL, G_CALLBACK (toolbar_style), GINT_TO_POINTER (GTK_TOOLBAR_BOTH),
RADIO_ACTION, "toolbar-icons" }, GTK_ACTION_RADIO, "toolbar-icons" },
{ "toolbar-both-horiz", N_("Both Horizontal"), NULL, NULL, { "toolbar-both-horiz", N_("Both Horizontal"), NULL, NULL,
NULL, G_CALLBACK (toolbar_style), GINT_TO_POINTER(GTK_TOOLBAR_BOTH_HORIZ), NULL, G_CALLBACK (toolbar_style), GINT_TO_POINTER(GTK_TOOLBAR_BOTH_HORIZ),
RADIO_ACTION, "toolbar-icons" }, GTK_ACTION_RADIO, "toolbar-icons" },
{ "toolbar-small-icons", N_("Small Icons"), NULL, NULL, { "toolbar-small-icons", N_("Small Icons"), NULL, NULL,
NULL, NULL,
G_CALLBACK (toolbar_size), GINT_TO_POINTER (GTK_ICON_SIZE_SMALL_TOOLBAR) }, G_CALLBACK (toolbar_size), GINT_TO_POINTER (GTK_ICON_SIZE_SMALL_TOOLBAR) },

View File

@ -66,16 +66,16 @@ static GtkActionGroupEntry entries[] = {
G_CALLBACK (activate_action), NULL }, G_CALLBACK (activate_action), NULL },
{ "justify-left", NULL, GTK_STOCK_JUSTIFY_LEFT, "<control>L", { "justify-left", NULL, GTK_STOCK_JUSTIFY_LEFT, "<control>L",
N_("Left justify the text"), N_("Left justify the text"),
G_CALLBACK (toggle_action), NULL, RADIO_ACTION, NULL }, G_CALLBACK (toggle_action), NULL, GTK_ACTION_RADIO, NULL },
{ "justify-center", NULL, GTK_STOCK_JUSTIFY_CENTER, "<control>E", { "justify-center", NULL, GTK_STOCK_JUSTIFY_CENTER, "<control>E",
N_("Center justify the text"), N_("Center justify the text"),
G_CALLBACK (toggle_action), NULL, RADIO_ACTION, "justify-left" }, G_CALLBACK (toggle_action), NULL, GTK_ACTION_RADIO, "justify-left" },
{ "justify-right", NULL, GTK_STOCK_JUSTIFY_RIGHT, "<control>R", { "justify-right", NULL, GTK_STOCK_JUSTIFY_RIGHT, "<control>R",
N_("Right justify the text"), N_("Right justify the text"),
G_CALLBACK (toggle_action), NULL, RADIO_ACTION, "justify-left" }, G_CALLBACK (toggle_action), NULL, GTK_ACTION_RADIO, "justify-left" },
{ "justify-fill", NULL, GTK_STOCK_JUSTIFY_FILL, "<control>J", { "justify-fill", NULL, GTK_STOCK_JUSTIFY_FILL, "<control>J",
N_("Fill justify the text"), N_("Fill justify the text"),
G_CALLBACK (toggle_action), NULL, RADIO_ACTION, "justify-left" }, G_CALLBACK (toggle_action), NULL, GTK_ACTION_RADIO, "justify-left" },
{ "AboutAction", N_("_About"), NULL, NULL, NULL, { "AboutAction", N_("_About"), NULL, NULL, NULL,
G_CALLBACK (activate_action), NULL }, G_CALLBACK (activate_action), NULL },
}; };