rendered paste bodystatic void action_fullscreen(GtkToggleAction *_action, GtkWindow *_window){ if(gtk_toggle_action_get_active(_action))gtk_window_fullscreen(_window); else gtk_window_unfullscreen(_window);}static const gchar *fullscreen_ui_desc= "<ui>\ <menubar name='MainMenu'>\ <separator/>\ <menuitem action='Fullscreen'/>\ </menubar>\ </ui>";static GtkToggleActionEntry fullscreen_toggle_actions[]={ {"Fullscreen",NULL,N_("Fullscreen"),"F6",NULL, G_CALLBACK(action_fullscreen),FALSE},};void gjiten_add_fullscreen_action(GtkUIManager *_manager,GtkWindow *_window){ GtkActionGroup *actions; actions=gtk_action_group_new("fullscreen"); gtk_action_group_set_translation_domain(actions,GETTEXT_PACKAGE); gtk_action_group_add_toggle_actions(actions,fullscreen_toggle_actions, G_N_ELEMENTS(fullscreen_toggle_actions),_window); gtk_ui_manager_add_ui_from_string(_manager,fullscreen_ui_desc,-1,NULL); gtk_ui_manager_insert_action_group(_manager,actions,0); if(!gdk_net_wm_supports(gdk_atom_intern("_NET_WM_STATE_FULLSCREEN",FALSE))){ GtkAction *action; action=gtk_action_group_get_action(actions,"Fullscreen"); gtk_action_set_sensitive(action,FALSE); }}