Question about GtkActionEntry.



I saw in an example that entries of type GtkActionEntry are defined like this:


static GtkActionEntry entries[] = {
 { "Menu1Action", NULL, "Menu _1" },
 { "Menu2Action", NULL, "Menu _2" },
 { "Menu3Action", NULL, "_Dynamic Menu" },

 { "cut", GTK_STOCK_CUT, "C_ut", "<control>X",
"Cut the selected text to the clipboard", G_CALLBACK (activate_action) },
 { "copy", GTK_STOCK_COPY, "_Copy", "<control>C",
"Copy the selected text to the clipboard", G_CALLBACK (activate_action) },
 { "paste", GTK_STOCK_PASTE, "_Paste", "<control>V",
   "Paste the text from the clipboard", G_CALLBACK (activate_action) },
 { "quit", GTK_STOCK_QUIT,  NULL, "<control>Q",
   "Quit the application", G_CALLBACK (gtk_main_quit) },
 { "customise-accels", NULL, "Customise _Accels", NULL,
   "Customise keyboard shortcuts", G_CALLBACK (show_accel_dialog) },
 { "toolbar-small-icons", NULL, "Small Icons", NULL,
   NULL, G_CALLBACK (toolbar_size_small) },
 { "toolbar-large-icons", NULL, "Large Icons", NULL,
   NULL, G_CALLBACK (toolbar_size_large) }
};




First three lines are for menus. In api it is stated that GtkActionEntry has 6 fields. How is that the last three of them for "Menu*Action" are skipped? Why NULL keyword wasn't being used instead?

Thanks.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]