/* * a log handler that we install when in development mode in order to be * able to log plugin runtime * * enabling log in the plugin menu at runtime requires a Caja restart * (because we need to run in the code, which embeds g_debug instructions, * and we have to do so before the log handler be set, or we will run * into a deep stack recursion) */ static void set_log_handler( void ) { gboolean is_log_enabled; #ifdef NA_MAINTAINER_MODE is_log_enabled = TRUE; #else is_log_enabled = g_getenv( CAJA_ACTIONS_DEBUG ) || na_settings_get_boolean( NA_IPREFS_PLUGIN_MENU_LOG, NULL, NULL ); #endif st_default_log_func = g_log_set_default_handler(( GLogFunc ) log_handler, GUINT_TO_POINTER( is_log_enabled )); }
static void init_toolbar( BaseWindow *window, GtkActionGroup *group, int toolbar_id ) { ToolbarProps *props; gboolean is_active; GtkToggleAction *action; props = get_toolbar_properties( toolbar_id ); if( props ){ is_active = na_settings_get_boolean( props->prefs_key, NULL, NULL ); if( is_active ){ action = GTK_TOGGLE_ACTION( gtk_action_group_get_action( group, props->ui_item )); gtk_toggle_action_set_active( action, TRUE ); } } }