Visual studio build

This commit is contained in:
Yevgen Muntyan 2009-11-24 20:57:57 -08:00
parent 0532aff42a
commit d1311e312b
28 changed files with 1886 additions and 1678 deletions

View File

@ -16,6 +16,8 @@ Makefile.in
*.ncb
*.suo
*.vcproj.*
vs/Debug/
vs/Release/
syntax: regexp
^po(-gsv)?/(Makefile\.in\.in|dist|missing|notexist|pot|intltool-update)$

View File

@ -187,18 +187,21 @@ ENDIF(NOT MOO_ENABLE_EXCEPTIONS)
MOO_ADD_COMPILE_DEFINITIONS(WIN32 -D__WIN32__ -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE)
MOO_ADD_COMPILER_FLAGS(MSVC /W4 /Wp64 /Za /GS-)
MOO_ADD_COMPILER_FLAGS(MSVC RELEASE /analyze)
MOO_ADD_COMPILER_FLAGS(MSVC CXX RELEASE /Zc:wchar_t- /GR)
MOO_ADD_COMPILER_FLAGS(MSVC /W4 /GS)
MOO_ADD_COMPILER_FLAGS(MSVC CXX /Zc:wchar_t,forScope /GR)
MOO_ADD_COMPILER_FLAGS(MSVC /wd4996 /wd4244 /wd4055 /wd4127 /wd4100 /wd4054 /wd4152 /wd4706 /wd4125 /wd4389 /wd4132 /wd4018)
MOO_ADD_COMPILER_FLAGS(MSVC
/wd4221 /wd4204 /wd4996 /wd4244 /wd4055 /wd4127 /wd4100
/wd4054 /wd4152 /wd4706 /wd4125 /wd4389 /wd4132 /wd4018
)
IF(MOO_DEV_MODE)
MOO_ADD_COMPILER_FLAGS(MSVC /WX)
MOO_ADD_COMPILER_FLAGS(MSVC DEBUG /RTCsu /RTCc)
ENDIF(MOO_DEV_MODE)
IF(MOO_ENABLE_EXCEPTIONS)
MOO_ADD_COMPILER_FLAGS(MSVC CXX /EHsc)
MOO_ADD_COMPILER_FLAGS(MSVC CXX /EHc /EHsc)
ENDIF(MOO_ENABLE_EXCEPTIONS)

View File

@ -70,6 +70,23 @@ IF(WIN32)
LIST(APPEND moo_all_sources moo-dll.c)
ENDIF(WIN32)
IF(MSVC)
SET(moo_gendef_args)
IF(MOO_ENABLE_UNIT_TESTS)
LIST(APPEND moo_gendef_args test)
ENDIF(MOO_ENABLE_UNIT_TESTS)
MOO_ADD_GENERATED_FILE(moo
${CMAKE_CURRENT_BINARY_DIR}/moo.def.stamp
${CMAKE_CURRENT_BINARY_DIR}/moo.def
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/gendef.py ${CMAKE_CURRENT_BINARY_DIR}/moo.def.tmp ${moo_gendef_args}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/moo.def.tmp ${CMAKE_CURRENT_BINARY_DIR}/moo.def
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_BINARY_DIR}/moo.def.tmp
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/moo.def.stamp
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gendef.py
)
LIST(APPEND moo_all_sources ${CMAKE_CURRENT_BINARY_DIR}/moo.def)
ENDIF(MSVC)
MOO_ADD_SOURCE_FILE_SET(moo "")
IF(MOO_BUILD_SHARED_LIB)

322
moo/gendef.py Normal file
View File

@ -0,0 +1,322 @@
exports = {}
exports['base'] = """\
moo_set_log_func_file
moo_set_log_func_file
moo_set_log_func_window
_moo_normalize_file_path
_moo_normalize_file_path
moo_win_plugin_get_type
moo_win_plugin_get_type
moo_edit_window_remove_pane
moo_edit_window_remove_pane
moo_edit_window_remove_pane
moo_cmd_view_abort
moo_line_view_end_line
moo_line_view_end_line
moo_line_view_write
moo_line_view_write
moo_line_view_start_line
moo_line_view_start_line
moo_line_view_set_data
moo_line_view_write_line
moo_line_view_write_line
moo_ui_xml_add_item
moo_ui_xml_new_merge_id
moo_ui_xml_new_merge_id
moo_ui_xml_new_merge_id
moo_window_class_new_action
moo_window_class_new_action
moo_editor_get_ui_xml
moo_editor_get_ui_xml
moo_editor_instance
moo_editor_instance
moo_editor_instance
moo_edit_window_get_type
moo_edit_window_get_type
moo_edit_window_get_type
moo_edit_window_get_type
moo_edit_window_get_type
moo_win_plugin_lookup
moo_ui_xml_remove_ui
moo_ui_xml_remove_ui
moo_window_class_remove_action
moo_window_class_remove_action
moo_combo_set_active
moo_combo_get_type
moo_help_connect_keys
moo_help_connect_keys
moo_help_set_id
moo_help_set_id
moo_help_set_id
moo_help_set_id
moo_window_set_parent
moo_window_set_parent
moo_glade_xml_set_property
moo_glade_xml_parse_memory
moo_glade_xml_parse_memory
moo_glade_xml_parse_memory
moo_glade_xml_get_widget
moo_glade_xml_get_widget
moo_glade_xml_get_widget
moo_glade_xml_get_widget
moo_glade_xml_get_widget
moo_glade_xml_new_empty
moo_glade_xml_new_empty
moo_glade_xml_new_empty
moo_glade_xml_new_empty
moo_glade_xml_new_empty
_moo_file_entry_completion_set_entry
_moo_file_entry_completion_get_type
moo_history_list_add
moo_history_list_is_empty
moo_history_list_get
moo_text_view_get_selection
moo_text_view_get_type
moo_edit_window_get_active_doc
moo_edit_window_get_active_doc
moo_edit_window_get_active_doc
_moo_file_entry_completion_set_path
moo_edit_get_filename
moo_edit_get_filename
moo_edit_get_filename
moo_big_paned_present_pane
moo_line_view_clear
moo_line_view_get_type
moo_history_combo_commit
moo_edit_window_get_pane
moo_edit_window_get_pane
moo_pane_label_free
moo_pane_label_free
moo_pane_label_free
moo_edit_window_add_pane
moo_edit_window_add_pane
moo_edit_window_add_pane
moo_text_view_lookup_tag
moo_line_view_create_tag
moo_line_view_create_tag
moo_edit_window_add_stop_client
moo_cmd_view_get_type
moo_pane_label_new
moo_pane_label_new
moo_pane_label_new
moo_history_combo_get_list
_moo_file_entry_completion_get_path
moo_cmd_view_run_command
moo_editor_open_file_line
moo_edit_window_get_editor
moo_edit_window_get_editor
moo_line_view_get_data
moo_plugin_register
moo_plugin_register
moo_plugin_register
moo_plugin_register
moo_plugin_get_type
moo_plugin_get_type
moo_plugin_get_type
moo_plugin_get_type
moo_pane_set_drag_dest
moo_pane_set_drag_dest
moo_big_paned_find_pane
moo_big_paned_find_pane
moo_get_named_user_data_file
_moo_tree_view_setup_expander
moo_editor_open_uri
moo_editor_set_active_doc
moo_markup_doc_unref
moo_markup_doc_unref
moo_markup_get_prop
moo_markup_get_prop
moo_markup_get_prop
moo_markup_get_root_element
moo_markup_get_root_element
moo_markup_parse_file
moo_markup_parse_file
moo_atom_uri_list
moo_edit_get_uri
moo_edit_get_display_basename
moo_edit_get_display_basename
moo_edit_get_display_name
moo_edit_window_list_docs
moo_edit_window_list_docs
moo_edit_get_type
moo_edit_get_type
moo_edit_get_type
moo_edit_get_type
_moo_tree_view_select_first
_moo_tree_view_select_first
_moo_tree_view_select_first
moo_save_config_file
moo_unlink
moo_unlink
moo_file_view_get_type
_moo_signal_new_cb
_moo_file_view_add_target
moo_prefs_set_filename
moo_open_file
moo_editor_open_file
moo_mime_type_is_subclass
moo_get_mime_type_for_filename
moo_get_mime_type_for_file
moo_file_view_chdir
moo_action_collection_get_action
moo_file_view_get_actions
moo_ui_xml_insert_markup_before
_moo_file_view_setup_button_drag_dest
moo_ui_xml_insert_markup
moo_ui_xml_insert_markup
moo_action_group_add_action
moo_file_view_get_ui_xml
moo_action_collection_get_group
moo_prefs_get_string
moo_edit_save
moo_edit_save
moo_editor_new_file
_moo_file_view_get_filenames
moo_error_dialog
moo_bind_bool_property
moo_entry_clear_undo
_moo_file_view_drag_finish
moo_selection_data_get_pointer
_moo_file_view_select_name
_moo_get_modifiers
moo_edit_is_untitled
moo_edit_is_untitled
moo_edit_is_untitled
moo_edit_save_as
moo_overwrite_file_dialog
moo_entry_get_type
moo_edit_get_encoding
moo_edit_save_copy
_moo_menu_item_set_accel_label
moo_menu_new
_moo_menu_item_set_label
_moo_file_view_tools_load
moo_prefs_create_key
_moo_bookmark_mgr_new
moo_plugin_method_new
_moo_marshal_OBJECT__OBJECT
moo_edit_class_remove_action
moo_edit_class_new_action
moo_edit_window_set_action_filter
moo_edit_window_set_action_check
moo_window_class_new_group
moo_window_class_find_group
moo_edit_action_get_type
moo_editor_get_doc_ui_xml
moo_ui_xml_insert
moo_ui_xml_get_node
moo_get_data_subdirs
moo_get_data_subdirs
moo_get_data_subdirs
_moo_strv_reverse
_moo_strv_reverse
moo_save_user_data_file
_moo_action_get_window
moo_edit_get_window
moo_edit_get_window
moo_edit_action_get_doc
_moo_get_pid_string
moo_get_user_data_dir
moo_text_view_get_cursor_line
_moo_tree_helper_new
moo_prefs_page_new
moo_prefs_page_new
moo_glade_xml_fill_widget
moo_glade_xml_fill_widget
_moo_tree_helper_update_model
_moo_tree_helper_update_model
moo_markup_set_prop
moo_markup_create_text_element
moo_markup_create_element
moo_markup_delete_node
moo_markup_get_element
moo_prefs_get_markup
_moo_tree_helper_set_modified
_moo_tree_helper_get_modified
_moo_tree_helper_update_widgets
_moo_tree_helper_update_widgets
moo_markup_get_content
_moo_tree_helper_set
_moo_message
moo_edit_get_status
_moo_convert_string_to_bool
moo_line_reader_get_line
moo_line_reader_init
_moo_tree_helper_get_type
_moo_tree_helper_get_type
moo_output_filter_get_type
moo_file_line_data_free
moo_line_view_set_boxed
moo_file_line_data_get_type
moo_output_filter_get_view
_moo_convert_string_to_int
moo_file_line_data_new
moo_output_filter_get_active_file
moo_output_filter_get_active_dirs
_moo_text_style_apply_to_tag
_moo_text_style_scheme_lookup_style
moo_lang_mgr_get_active_scheme
moo_lang_mgr_default
moo_line_view_lookup_tag
lua_close
_moo_edit_lua_cleanup
lua_pcall
_moo_edit_lua_set_doc
lua_settop
lua_tolstring
luaL_loadstring
_moo_edit_lua_add_api
luaL_openlibs
luaL_newstate
lua_addpath
moo_text_view_set_lang_by_id
moo_text_view_set_font_from_string
moo_text_view_get_text
_moo_tree_helper_connect
moo_gettext
moo_app_run
moo_app_open_files
moo_app_load_session
moo_app_init
moo_app_get_type
moo_app_send_files
moo_app_send_msg
moo_plugin_read_dirs
moo_win32_get_app_dir
_moo_str_equal
moo_editor_new_window
moo_editor_get_active_window
moo_app_get_editor
"""
exports['test'] = """\
moo_test_get_result
moo_test_cleanup
moo_test_run_tests
moo_test_editor
moo_test_mooedit_lua_api
moo_test_lua
moo_test_mooutils_win32
moo_test_mooutils_misc
moo_test_moo_file_writer
moo_test_mooutils_fs
moo_test_mooaccel
moo_test_gobject
moo_test_suite_add_test
moo_test_suite_new
moo_test_assert_impl
moo_test_assert_msg
"""
import sys
all_exports = [exports['base']]
if len(sys.argv) > 2:
for a in sys.argv[2:]:
all_exports.append(exports[a])
out = open(sys.argv[1], 'w')
print >> out, "EXPORTS"
for s in all_exports:
out.write(s)
out.close()

View File

@ -1,5 +1,6 @@
#include <glib.h>
#include <windows.h>
#include <mooutils/mooutils-macros.h>
HINSTANCE _moo_hinst_dll = NULL;
@ -8,289 +9,3 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, G_GNUC_UNUSED DWORD fdwReason, G_GNUC_U
_moo_hinst_dll = hinstDLL;
return TRUE;
}
#ifdef _MSC_VER
// #pragma comment(linker, "/EXPORT:_moo_set_log_func_file")
// #pragma comment(linker, "/EXPORT:_moo_set_log_func_window")
// #pragma comment(linker, "/EXPORT:__moo_normalize_file_path")
// #pragma comment(linker, "/EXPORT:__moo_normalize_file_path")
// #pragma comment(linker, "/EXPORT:_moo_win_plugin_get_type")
// #pragma comment(linker, "/EXPORT:_moo_win_plugin_get_type")
// #pragma comment(linker, "/EXPORT:_moo_edit_window_remove_pane")
// #pragma comment(linker, "/EXPORT:_moo_edit_window_remove_pane")
// #pragma comment(linker, "/EXPORT:_moo_edit_window_remove_pane")
// #pragma comment(linker, "/EXPORT:_moo_cmd_view_abort")
// #pragma comment(linker, "/EXPORT:_moo_line_view_end_line")
// #pragma comment(linker, "/EXPORT:_moo_line_view_end_line")
// #pragma comment(linker, "/EXPORT:_moo_line_view_write")
// #pragma comment(linker, "/EXPORT:_moo_line_view_write")
// #pragma comment(linker, "/EXPORT:_moo_line_view_start_line")
// #pragma comment(linker, "/EXPORT:_moo_line_view_start_line")
// #pragma comment(linker, "/EXPORT:_moo_line_view_set_data")
// #pragma comment(linker, "/EXPORT:_moo_line_view_write_line")
// #pragma comment(linker, "/EXPORT:_moo_line_view_write_line")
// #pragma comment(linker, "/EXPORT:_moo_ui_xml_add_item")
// #pragma comment(linker, "/EXPORT:_moo_ui_xml_new_merge_id")
// #pragma comment(linker, "/EXPORT:_moo_ui_xml_new_merge_id")
// #pragma comment(linker, "/EXPORT:_moo_ui_xml_new_merge_id")
// #pragma comment(linker, "/EXPORT:_moo_window_class_new_action")
// #pragma comment(linker, "/EXPORT:_moo_window_class_new_action")
// #pragma comment(linker, "/EXPORT:_moo_editor_get_ui_xml")
// #pragma comment(linker, "/EXPORT:_moo_editor_get_ui_xml")
// #pragma comment(linker, "/EXPORT:_moo_editor_instance")
// #pragma comment(linker, "/EXPORT:_moo_editor_instance")
// #pragma comment(linker, "/EXPORT:_moo_editor_instance")
// #pragma comment(linker, "/EXPORT:_moo_edit_window_get_type")
// #pragma comment(linker, "/EXPORT:_moo_edit_window_get_type")
// #pragma comment(linker, "/EXPORT:_moo_edit_window_get_type")
// #pragma comment(linker, "/EXPORT:_moo_edit_window_get_type")
// #pragma comment(linker, "/EXPORT:_moo_edit_window_get_type")
// #pragma comment(linker, "/EXPORT:_moo_win_plugin_lookup")
// #pragma comment(linker, "/EXPORT:_moo_ui_xml_remove_ui")
// #pragma comment(linker, "/EXPORT:_moo_ui_xml_remove_ui")
// #pragma comment(linker, "/EXPORT:_moo_window_class_remove_action")
// #pragma comment(linker, "/EXPORT:_moo_window_class_remove_action")
// #pragma comment(linker, "/EXPORT:_moo_combo_set_active")
// #pragma comment(linker, "/EXPORT:_moo_combo_get_type")
// #pragma comment(linker, "/EXPORT:_moo_help_connect_keys")
// #pragma comment(linker, "/EXPORT:_moo_help_connect_keys")
// #pragma comment(linker, "/EXPORT:_moo_help_set_id")
// #pragma comment(linker, "/EXPORT:_moo_help_set_id")
// #pragma comment(linker, "/EXPORT:_moo_help_set_id")
// #pragma comment(linker, "/EXPORT:_moo_help_set_id")
// #pragma comment(linker, "/EXPORT:_moo_window_set_parent")
// #pragma comment(linker, "/EXPORT:_moo_window_set_parent")
// #pragma comment(linker, "/EXPORT:_moo_glade_xml_set_property")
// #pragma comment(linker, "/EXPORT:_moo_glade_xml_parse_memory")
// #pragma comment(linker, "/EXPORT:_moo_glade_xml_parse_memory")
// #pragma comment(linker, "/EXPORT:_moo_glade_xml_parse_memory")
// #pragma comment(linker, "/EXPORT:_moo_glade_xml_get_widget")
// #pragma comment(linker, "/EXPORT:_moo_glade_xml_get_widget")
// #pragma comment(linker, "/EXPORT:_moo_glade_xml_get_widget")
// #pragma comment(linker, "/EXPORT:_moo_glade_xml_get_widget")
// #pragma comment(linker, "/EXPORT:_moo_glade_xml_get_widget")
// #pragma comment(linker, "/EXPORT:_moo_glade_xml_new_empty")
// #pragma comment(linker, "/EXPORT:_moo_glade_xml_new_empty")
// #pragma comment(linker, "/EXPORT:_moo_glade_xml_new_empty")
// #pragma comment(linker, "/EXPORT:_moo_glade_xml_new_empty")
// #pragma comment(linker, "/EXPORT:_moo_glade_xml_new_empty")
// #pragma comment(linker, "/EXPORT:__moo_file_entry_completion_set_entry")
// #pragma comment(linker, "/EXPORT:__moo_file_entry_completion_get_type")
// #pragma comment(linker, "/EXPORT:_moo_history_list_add")
// #pragma comment(linker, "/EXPORT:_moo_history_list_is_empty")
// #pragma comment(linker, "/EXPORT:_moo_history_list_get")
// #pragma comment(linker, "/EXPORT:_moo_text_view_get_selection")
// #pragma comment(linker, "/EXPORT:_moo_text_view_get_type")
// #pragma comment(linker, "/EXPORT:_moo_edit_window_get_active_doc")
// #pragma comment(linker, "/EXPORT:_moo_edit_window_get_active_doc")
// #pragma comment(linker, "/EXPORT:_moo_edit_window_get_active_doc")
// #pragma comment(linker, "/EXPORT:__moo_file_entry_completion_set_path")
// #pragma comment(linker, "/EXPORT:_moo_edit_get_filename")
// #pragma comment(linker, "/EXPORT:_moo_edit_get_filename")
// #pragma comment(linker, "/EXPORT:_moo_edit_get_filename")
// #pragma comment(linker, "/EXPORT:_moo_big_paned_present_pane")
// #pragma comment(linker, "/EXPORT:_moo_line_view_clear")
// #pragma comment(linker, "/EXPORT:_moo_line_view_get_type")
// #pragma comment(linker, "/EXPORT:_moo_history_combo_commit")
// #pragma comment(linker, "/EXPORT:_moo_edit_window_get_pane")
// #pragma comment(linker, "/EXPORT:_moo_edit_window_get_pane")
// #pragma comment(linker, "/EXPORT:_moo_pane_label_free")
// #pragma comment(linker, "/EXPORT:_moo_pane_label_free")
// #pragma comment(linker, "/EXPORT:_moo_pane_label_free")
// #pragma comment(linker, "/EXPORT:_moo_edit_window_add_pane")
// #pragma comment(linker, "/EXPORT:_moo_edit_window_add_pane")
// #pragma comment(linker, "/EXPORT:_moo_edit_window_add_pane")
// #pragma comment(linker, "/EXPORT:_moo_text_view_lookup_tag")
// #pragma comment(linker, "/EXPORT:_moo_line_view_create_tag")
// #pragma comment(linker, "/EXPORT:_moo_line_view_create_tag")
// #pragma comment(linker, "/EXPORT:_moo_edit_window_add_stop_client")
// #pragma comment(linker, "/EXPORT:_moo_cmd_view_get_type")
// #pragma comment(linker, "/EXPORT:_moo_pane_label_new")
// #pragma comment(linker, "/EXPORT:_moo_pane_label_new")
// #pragma comment(linker, "/EXPORT:_moo_pane_label_new")
// #pragma comment(linker, "/EXPORT:_moo_history_combo_get_list")
// #pragma comment(linker, "/EXPORT:__moo_file_entry_completion_get_path")
// #pragma comment(linker, "/EXPORT:_moo_cmd_view_run_command")
// #pragma comment(linker, "/EXPORT:_moo_editor_open_file_line")
// #pragma comment(linker, "/EXPORT:_moo_edit_window_get_editor")
// #pragma comment(linker, "/EXPORT:_moo_edit_window_get_editor")
// #pragma comment(linker, "/EXPORT:_moo_line_view_get_data")
// #pragma comment(linker, "/EXPORT:_moo_plugin_register")
// #pragma comment(linker, "/EXPORT:_moo_plugin_register")
// #pragma comment(linker, "/EXPORT:_moo_plugin_register")
// #pragma comment(linker, "/EXPORT:_moo_plugin_register")
// #pragma comment(linker, "/EXPORT:_moo_plugin_get_type")
// #pragma comment(linker, "/EXPORT:_moo_plugin_get_type")
// #pragma comment(linker, "/EXPORT:_moo_plugin_get_type")
// #pragma comment(linker, "/EXPORT:_moo_plugin_get_type")
// #pragma comment(linker, "/EXPORT:_moo_pane_set_drag_dest")
// #pragma comment(linker, "/EXPORT:_moo_pane_set_drag_dest")
// #pragma comment(linker, "/EXPORT:_moo_big_paned_find_pane")
// #pragma comment(linker, "/EXPORT:_moo_big_paned_find_pane")
// #pragma comment(linker, "/EXPORT:_moo_get_named_user_data_file")
// #pragma comment(linker, "/EXPORT:__moo_tree_view_setup_expander")
// #pragma comment(linker, "/EXPORT:_moo_editor_open_uri")
// #pragma comment(linker, "/EXPORT:_moo_editor_set_active_doc")
// #pragma comment(linker, "/EXPORT:_moo_markup_doc_unref")
// #pragma comment(linker, "/EXPORT:_moo_markup_doc_unref")
// #pragma comment(linker, "/EXPORT:_moo_markup_get_prop")
// #pragma comment(linker, "/EXPORT:_moo_markup_get_prop")
// #pragma comment(linker, "/EXPORT:_moo_markup_get_prop")
// #pragma comment(linker, "/EXPORT:_moo_markup_get_root_element")
// #pragma comment(linker, "/EXPORT:_moo_markup_get_root_element")
// #pragma comment(linker, "/EXPORT:_moo_markup_parse_file")
// #pragma comment(linker, "/EXPORT:_moo_markup_parse_file")
// #pragma comment(linker, "/EXPORT:_moo_atom_uri_list")
// #pragma comment(linker, "/EXPORT:_moo_edit_get_uri")
// #pragma comment(linker, "/EXPORT:_moo_edit_get_display_basename")
// #pragma comment(linker, "/EXPORT:_moo_edit_get_display_basename")
// #pragma comment(linker, "/EXPORT:_moo_edit_get_display_name")
// #pragma comment(linker, "/EXPORT:_moo_edit_window_list_docs")
// #pragma comment(linker, "/EXPORT:_moo_edit_window_list_docs")
// #pragma comment(linker, "/EXPORT:_moo_edit_get_type")
// #pragma comment(linker, "/EXPORT:_moo_edit_get_type")
// #pragma comment(linker, "/EXPORT:_moo_edit_get_type")
// #pragma comment(linker, "/EXPORT:_moo_edit_get_type")
// #pragma comment(linker, "/EXPORT:__moo_tree_view_select_first")
// #pragma comment(linker, "/EXPORT:__moo_tree_view_select_first")
// #pragma comment(linker, "/EXPORT:__moo_tree_view_select_first")
// #pragma comment(linker, "/EXPORT:_moo_save_config_file")
// #pragma comment(linker, "/EXPORT:_moo_unlink")
// #pragma comment(linker, "/EXPORT:_moo_unlink")
// #pragma comment(linker, "/EXPORT:_moo_file_view_get_type")
// #pragma comment(linker, "/EXPORT:__moo_signal_new_cb")
// #pragma comment(linker, "/EXPORT:__moo_file_view_add_target")
// #pragma comment(linker, "/EXPORT:_moo_prefs_set_filename")
// #pragma comment(linker, "/EXPORT:_moo_open_file")
// #pragma comment(linker, "/EXPORT:_moo_editor_open_file")
// #pragma comment(linker, "/EXPORT:_moo_mime_type_is_subclass")
// #pragma comment(linker, "/EXPORT:_moo_get_mime_type_for_filename")
// #pragma comment(linker, "/EXPORT:_moo_get_mime_type_for_file")
// #pragma comment(linker, "/EXPORT:_moo_file_view_chdir")
// #pragma comment(linker, "/EXPORT:_moo_action_collection_get_action")
// #pragma comment(linker, "/EXPORT:_moo_file_view_get_actions")
// #pragma comment(linker, "/EXPORT:_moo_ui_xml_insert_markup_before")
// #pragma comment(linker, "/EXPORT:__moo_file_view_setup_button_drag_dest")
// #pragma comment(linker, "/EXPORT:_moo_ui_xml_insert_markup")
// #pragma comment(linker, "/EXPORT:_moo_ui_xml_insert_markup")
// #pragma comment(linker, "/EXPORT:_moo_action_group_add_action")
// #pragma comment(linker, "/EXPORT:_moo_file_view_get_ui_xml")
// #pragma comment(linker, "/EXPORT:_moo_action_collection_get_group")
// #pragma comment(linker, "/EXPORT:_moo_prefs_get_string")
// #pragma comment(linker, "/EXPORT:_moo_edit_save")
// #pragma comment(linker, "/EXPORT:_moo_edit_save")
// #pragma comment(linker, "/EXPORT:_moo_editor_new_file")
// #pragma comment(linker, "/EXPORT:__moo_file_view_get_filenames")
// #pragma comment(linker, "/EXPORT:_moo_error_dialog")
// #pragma comment(linker, "/EXPORT:_moo_bind_bool_property")
// #pragma comment(linker, "/EXPORT:_moo_entry_clear_undo")
// #pragma comment(linker, "/EXPORT:__moo_file_view_drag_finish")
// #pragma comment(linker, "/EXPORT:_moo_selection_data_get_pointer")
// #pragma comment(linker, "/EXPORT:__moo_file_view_select_name")
// #pragma comment(linker, "/EXPORT:__moo_get_modifiers")
// #pragma comment(linker, "/EXPORT:_moo_edit_is_untitled")
// #pragma comment(linker, "/EXPORT:_moo_edit_is_untitled")
// #pragma comment(linker, "/EXPORT:_moo_edit_is_untitled")
// #pragma comment(linker, "/EXPORT:_moo_edit_save_as")
// #pragma comment(linker, "/EXPORT:_moo_overwrite_file_dialog")
// #pragma comment(linker, "/EXPORT:_moo_entry_get_type")
// #pragma comment(linker, "/EXPORT:_moo_edit_get_encoding")
// #pragma comment(linker, "/EXPORT:_moo_edit_save_copy")
// #pragma comment(linker, "/EXPORT:__moo_menu_item_set_accel_label")
// #pragma comment(linker, "/EXPORT:_moo_menu_new")
// #pragma comment(linker, "/EXPORT:__moo_menu_item_set_label")
// #pragma comment(linker, "/EXPORT:__moo_file_view_tools_load")
// #pragma comment(linker, "/EXPORT:_moo_prefs_create_key")
// #pragma comment(linker, "/EXPORT:__moo_bookmark_mgr_new")
// #pragma comment(linker, "/EXPORT:_moo_plugin_method_new")
// #pragma comment(linker, "/EXPORT:__moo_marshal_OBJECT__OBJECT")
// #pragma comment(linker, "/EXPORT:_moo_edit_class_remove_action")
// #pragma comment(linker, "/EXPORT:_moo_edit_class_new_action")
// #pragma comment(linker, "/EXPORT:_moo_edit_window_set_action_filter")
// #pragma comment(linker, "/EXPORT:_moo_edit_window_set_action_check")
// #pragma comment(linker, "/EXPORT:_moo_window_class_new_group")
// #pragma comment(linker, "/EXPORT:_moo_window_class_find_group")
// #pragma comment(linker, "/EXPORT:_moo_edit_action_get_type")
// #pragma comment(linker, "/EXPORT:_moo_editor_get_doc_ui_xml")
// #pragma comment(linker, "/EXPORT:_moo_ui_xml_insert")
// #pragma comment(linker, "/EXPORT:_moo_ui_xml_get_node")
// #pragma comment(linker, "/EXPORT:_moo_get_data_subdirs")
// #pragma comment(linker, "/EXPORT:_moo_get_data_subdirs")
// #pragma comment(linker, "/EXPORT:_moo_get_data_subdirs")
// #pragma comment(linker, "/EXPORT:__moo_strv_reverse")
// #pragma comment(linker, "/EXPORT:__moo_strv_reverse")
// #pragma comment(linker, "/EXPORT:_moo_save_user_data_file")
// #pragma comment(linker, "/EXPORT:__moo_action_get_window")
// #pragma comment(linker, "/EXPORT:_moo_edit_get_window")
// #pragma comment(linker, "/EXPORT:_moo_edit_get_window")
// #pragma comment(linker, "/EXPORT:_moo_edit_action_get_doc")
// #pragma comment(linker, "/EXPORT:__moo_get_pid_string")
// #pragma comment(linker, "/EXPORT:_moo_get_user_data_dir")
// #pragma comment(linker, "/EXPORT:_moo_text_view_get_cursor_line")
// #pragma comment(linker, "/EXPORT:__moo_tree_helper_new")
// #pragma comment(linker, "/EXPORT:_moo_prefs_page_new")
// #pragma comment(linker, "/EXPORT:_moo_prefs_page_new")
// #pragma comment(linker, "/EXPORT:_moo_glade_xml_fill_widget")
// #pragma comment(linker, "/EXPORT:_moo_glade_xml_fill_widget")
// #pragma comment(linker, "/EXPORT:__moo_tree_helper_update_model")
// #pragma comment(linker, "/EXPORT:__moo_tree_helper_update_model")
// #pragma comment(linker, "/EXPORT:_moo_markup_set_prop")
// #pragma comment(linker, "/EXPORT:_moo_markup_create_text_element")
// #pragma comment(linker, "/EXPORT:_moo_markup_create_element")
// #pragma comment(linker, "/EXPORT:_moo_markup_delete_node")
// #pragma comment(linker, "/EXPORT:_moo_markup_get_element")
// #pragma comment(linker, "/EXPORT:_moo_prefs_get_markup")
// #pragma comment(linker, "/EXPORT:__moo_tree_helper_set_modified")
// #pragma comment(linker, "/EXPORT:__moo_tree_helper_get_modified")
// #pragma comment(linker, "/EXPORT:__moo_tree_helper_update_widgets")
// #pragma comment(linker, "/EXPORT:__moo_tree_helper_update_widgets")
// #pragma comment(linker, "/EXPORT:_moo_markup_get_content")
// #pragma comment(linker, "/EXPORT:__moo_tree_helper_set")
// #pragma comment(linker, "/EXPORT:__moo_message")
// #pragma comment(linker, "/EXPORT:_moo_edit_get_status")
// #pragma comment(linker, "/EXPORT:__moo_convert_string_to_bool")
// #pragma comment(linker, "/EXPORT:_moo_line_reader_get_line")
// #pragma comment(linker, "/EXPORT:_moo_line_reader_init")
// #pragma comment(linker, "/EXPORT:__moo_tree_helper_get_type")
// #pragma comment(linker, "/EXPORT:__moo_tree_helper_get_type")
// #pragma comment(linker, "/EXPORT:_moo_output_filter_get_type")
// #pragma comment(linker, "/EXPORT:_moo_file_line_data_free")
// #pragma comment(linker, "/EXPORT:_moo_line_view_set_boxed")
// #pragma comment(linker, "/EXPORT:_moo_file_line_data_get_type")
// #pragma comment(linker, "/EXPORT:_moo_output_filter_get_view")
// #pragma comment(linker, "/EXPORT:__moo_convert_string_to_int")
// #pragma comment(linker, "/EXPORT:_moo_file_line_data_new")
// #pragma comment(linker, "/EXPORT:_moo_output_filter_get_active_file")
// #pragma comment(linker, "/EXPORT:_moo_output_filter_get_active_dirs")
// #pragma comment(linker, "/EXPORT:__moo_text_style_apply_to_tag")
// #pragma comment(linker, "/EXPORT:__moo_text_style_scheme_lookup_style")
// #pragma comment(linker, "/EXPORT:_moo_lang_mgr_get_active_scheme")
// #pragma comment(linker, "/EXPORT:_moo_lang_mgr_default")
// #pragma comment(linker, "/EXPORT:_moo_line_view_lookup_tag")
// #pragma comment(linker, "/EXPORT:_lua_close")
// #pragma comment(linker, "/EXPORT:__moo_edit_lua_cleanup")
// #pragma comment(linker, "/EXPORT:_lua_pcall")
// #pragma comment(linker, "/EXPORT:__moo_edit_lua_set_doc")
// #pragma comment(linker, "/EXPORT:_lua_settop")
// #pragma comment(linker, "/EXPORT:_lua_tolstring")
// #pragma comment(linker, "/EXPORT:_luaL_loadstring")
// #pragma comment(linker, "/EXPORT:__moo_edit_lua_add_api")
// #pragma comment(linker, "/EXPORT:_luaL_openlibs")
// #pragma comment(linker, "/EXPORT:_luaL_newstate")
// #pragma comment(linker, "/EXPORT:_lua_addpath")
// #pragma comment(linker, "/EXPORT:_moo_text_view_set_lang_by_id")
// #pragma comment(linker, "/EXPORT:_moo_text_view_set_font_from_string")
// #pragma comment(linker, "/EXPORT:_moo_text_view_get_text")
// #pragma comment(linker, "/EXPORT:__moo_tree_helper_connect")
// #pragma comment(linker, "/EXPORT:_moo_gettext")
// #pragma comment(linker, "/EXPORT:_moo_app_run")
// #pragma comment(linker, "/EXPORT:_moo_app_open_files")
// #pragma comment(linker, "/EXPORT:_moo_app_ensure_editor_window")
// #pragma comment(linker, "/EXPORT:_moo_app_load_session")
// #pragma comment(linker, "/EXPORT:_moo_app_init")
// #pragma comment(linker, "/EXPORT:_moo_app_get_type")
// #pragma comment(linker, "/EXPORT:_moo_app_send_files")
// #pragma comment(linker, "/EXPORT:_moo_app_send_msg")
// #pragma comment(linker, "/EXPORT:_moo_plugin_read_dirs")
// #pragma comment(linker, "/EXPORT:_moo_win32_get_app_dir")
#endif /* _MSC_VER */

View File

@ -253,7 +253,6 @@ moo_app_get_system_info (MooApp *app)
if (moo_python_running ())
{
char *string;
g_string_append (text, "Python support: yes\n");
string = get_python_info ();
g_string_append_printf (text, "Python: %s\n", string ? string : "None");

View File

@ -102,7 +102,11 @@ LIST(APPEND MOOEDIT_SOURCES ${printing_sources})
MOO_GEN_GXML(mooedit
glade/mooprintpreview.glade
glade/moopluginprefs.glade
glade/mooeditprefs.glade
glade/mooeditprefs-view.glade
glade/mooeditprefs-file.glade
glade/mooeditprefs-filters.glade
glade/mooeditprefs-general.glade
glade/mooeditprefs-langs.glade
glade/mooeditprogress.glade
glade/mooeditsavemult.glade
glade/mooprint.glade

View File

@ -0,0 +1,323 @@
<?xml version="1.0"?>
<glade-interface>
<!-- interface-requires gtk+ 2.8 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkWindow" id="window4">
<child>
<widget class="GtkVBox" id="PrefsFile">
<property name="visible">True</property>
<property name="border_width">12</property>
<property name="spacing">18</property>
<child>
<widget class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;b&gt;Loading&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="vbox2">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkLabel" id="label12">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Encodings to _autodetect:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">entry_encodings</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="entry_encodings">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Comma-separated list of encodings to try when opening a file. 'LOCALE' means current locale encoding.</property>
</widget>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="position">0</property>
</packing>
</child>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="vbox3">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;b&gt;Saving&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment4">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="vbox4">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkHBox" id="hbox2">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Encoding for _new files:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">encoding_save</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkComboBoxEntry" id="encoding_save">
<property name="visible">True</property>
</widget>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="check_strip">
<property name="label" translatable="yes">Remove trailing _spaces</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="focus_on_click">False</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="check_add_newline">
<property name="label" translatable="yes">Ensure trailing new_line</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="focus_on_click">False</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="check_make_backups">
<property name="label" translatable="yes">Make _backups</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="focus_on_click">False</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="vbox5">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;b&gt;Sessions&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment5">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="vbox6">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkCheckButton" id="check_save_session">
<property name="label" translatable="yes">Enable _session support</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="focus_on_click">False</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="vbox7">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;b&gt;Dialogs&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="vbox8">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkCheckButton" id="check_open_dialog_follows_doc">
<property name="label" translatable="yes">Open and Save As dialogs show current document _folder</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="focus_on_click">False</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
</widget>
</child>
</widget>
</glade-interface>

View File

@ -0,0 +1,167 @@
<?xml version="1.0"?>
<glade-interface>
<!-- interface-requires gtk+ 2.8 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkWindow" id="window3">
<child>
<widget class="GtkVBox" id="PrefsFilters">
<property name="visible">True</property>
<property name="border_width">12</property>
<property name="spacing">18</property>
<child>
<widget class="GtkVBox" id="vbox23">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkLabel" id="label20">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;b&gt;File filters&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment12">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="vbox24">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkVBox" id="vbox25">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">etched-in</property>
<child>
<widget class="GtkTreeView" id="filter_treeview">
<property name="width_request">400</property>
<property name="height_request">200</property>
<property name="visible">True</property>
<property name="reorderable">True</property>
<property name="rules_hint">True</property>
<property name="enable_search">False</property>
</widget>
</child>
</widget>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox4">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkButton" id="new_filter_setting">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="focus_on_click">False</property>
<child>
<widget class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="stock">gtk-new</property>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="delete_filter_setting">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="focus_on_click">False</property>
<child>
<widget class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="stock">gtk-delete</property>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="filter_setting_down">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<child>
<widget class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="stock">gtk-go-down</property>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="filter_setting_up">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<child>
<widget class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="stock">gtk-go-up</property>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="position">0</property>
</packing>
</child>
</widget>
</child>
</widget>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="position">0</property>
</packing>
</child>
</widget>
</child>
</widget>
</glade-interface>

View File

@ -0,0 +1,310 @@
<?xml version="1.0"?>
<glade-interface>
<!-- interface-requires gtk+ 2.8 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkWindow" id="window1">
<child>
<widget class="GtkVBox" id="PrefsGeneral">
<property name="visible">True</property>
<property name="border_width">12</property>
<property name="spacing">18</property>
<child>
<widget class="GtkVBox" id="vbox21">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkLabel" id="label15">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;b&gt;Keyboard&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment11">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="vbox22">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkCheckButton" id="smarthome">
<property name="label" translatable="yes">Smart Home and End</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="focus_on_click">False</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="enable_auto_indent">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<child>
<widget class="GtkLabel" id="label16">
<property name="visible">True</property>
<property name="label" translatable="yes">Enable auto indentation</property>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="usespaces">
<property name="label" translatable="yes">Do not use tabs for indentation</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="focus_on_click">False</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="backspace_indents">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<child>
<widget class="GtkLabel" id="label17">
<property name="visible">True</property>
<property name="label" translatable="yes">Backspace key unindents</property>
</widget>
</child>
</widget>
<packing>
<property name="position">3</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="tab_indents">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<child>
<widget class="GtkLabel" id="label18">
<property name="visible">True</property>
<property name="label" translatable="yes">Tab key indents</property>
</widget>
</child>
</widget>
<packing>
<property name="position">4</property>
</packing>
</child>
<child>
<widget class="GtkTable" id="table1">
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="column_spacing">6</property>
<property name="row_spacing">6</property>
<child>
<widget class="GtkSpinButton" id="indent_width">
<property name="visible">True</property>
<property name="adjustment">4 1 100 1 10 0</property>
<property name="climb_rate">1</property>
<property name="numeric">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label32">
<property name="visible">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Indent width:</property>
<property name="mnemonic_widget">indent_width</property>
</widget>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="tab_width">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="adjustment">8 1 100 1 10 0</property>
<property name="numeric">True</property>
<property name="update_policy">if-valid</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label19">
<property name="visible">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Tab width:</property>
<property name="mnemonic_widget">tab_width</property>
</widget>
<packing>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
</widget>
<packing>
<property name="position">5</property>
</packing>
</child>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="vbox19">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkLabel" id="label14">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;b&gt;Font and colors&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment10">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="vbox20">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkTable" id="table2">
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="column_spacing">6</property>
<property name="row_spacing">6</property>
<child>
<widget class="GtkLabel" id="label99">
<property name="visible">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Font:</property>
</widget>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkComboBox" id="color_scheme_combo">
<property name="visible">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label100">
<property name="visible">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Color scheme:</property>
</widget>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkFontButton" id="fontbutton:MooFontButton">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="use_font">True</property>
<property name="use_size">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
</child>
</widget>
</glade-interface>

View File

@ -0,0 +1,220 @@
<?xml version="1.0"?>
<glade-interface>
<!-- interface-requires gtk+ 2.8 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkWindow" id="window5">
<child>
<widget class="GtkVBox" id="PrefsLangs">
<property name="visible">True</property>
<property name="border_width">12</property>
<property name="spacing">18</property>
<child>
<widget class="GtkVBox" id="vbox15">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkLabel" id="label10">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;b&gt;Language-specific options&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment8">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="vbox16">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkTable" id="table">
<property name="visible">True</property>
<property name="n_rows">4</property>
<property name="n_columns">2</property>
<property name="column_spacing">6</property>
<property name="row_spacing">6</property>
<child>
<widget class="GtkEntry" id="config">
<property name="visible">True</property>
<property name="tooltip">strip: bool; add-newline:bool; use-tabs: bool; indent-width: integer; tab-width: integer</property>
<property name="activates_default">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label11">
<property name="visible">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Options:</property>
</widget>
<packing>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label_mimetypes">
<property name="visible">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Mime types:</property>
</widget>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label_extensions">
<property name="visible">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Extensions:</property>
</widget>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="mimetypes">
<property name="visible">True</property>
<property name="activates_default">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="extensions">
<property name="visible">True</property>
<property name="activates_default">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label768">
<property name="visible">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Language:</property>
</widget>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkComboBox" id="lang_combo">
<property name="visible">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="vbox17">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkLabel" id="label13">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;b&gt;Default language&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment9">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="vbox18">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkComboBox" id="default_lang_combo">
<property name="visible">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
</child>
</widget>
</glade-interface>

View File

@ -0,0 +1,329 @@
<?xml version="1.0"?>
<glade-interface>
<!-- interface-requires gtk+ 2.8 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkWindow" id="window2">
<child>
<widget class="GtkVBox" id="PrefsView">
<property name="visible">True</property>
<property name="border_width">12</property>
<property name="spacing">18</property>
<child>
<widget class="GtkVBox" id="vbox9">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;b&gt;Text wrapping&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="vbox10">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkCheckButton" id="enable_wrapping">
<property name="label" translatable="yes">Enable text wrapping</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="dont_split_words">
<property name="label" translatable="yes">Do not split words</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="vbox11">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;b&gt;Highlighting&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment6">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="vbox12">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkCheckButton" id="check_enable_highlighting">
<property name="label" translatable="yes">Enable syntax highlighting</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="check_highlight_matching_brackets">
<property name="label" translatable="yes">Highlight matching brackets</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="check_highlight_mismatching_brackets">
<property name="label" translatable="yes">Highlight mismatching brackets</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="check_highlight_current_line">
<property name="label" translatable="yes">Highlight current line</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="vbox13">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;b&gt;Misc&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment7">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkVBox" id="vbox14">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkCheckButton" id="show_line_numbers">
<property name="label" translatable="yes">Show line numbers</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="check_show_tabs">
<property name="label" translatable="yes">Show tabs</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="check_show_trailing_spaces">
<property name="label" translatable="yes">Show trailing spaces</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox3">
<property name="visible">True</property>
<child>
<widget class="GtkCheckButton" id="draw_rigth_margin">
<property name="label" translatable="yes" comments="Part of the phrase &quot;Draw right margin at column [XX]&quot;">Draw right margin</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="right_margin_box">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<widget class="GtkLabel" id="label9">
<property name="visible">True</property>
<property name="label" translatable="yes" comments="Part of the phrase &quot;Draw right margin at column [XX]&quot;">at column</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="spin_right_margin_offset">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="adjustment">80 1 1000 1 5 0</property>
<property name="numeric">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</widget>
</child>
</widget>
</glade-interface>

File diff suppressed because it is too large Load Diff

View File

@ -3352,7 +3352,8 @@ context_remove_child (Context *parent,
prev = ptr;
}
g_assert (ptr != NULL);
if (!ptr)
g_error ("error");
if (!ptr->fixed)
{

View File

@ -28,7 +28,11 @@
#include "mooutils/mooencodings.h"
#include "mooutils/mooi18n.h"
#include "mooutils/moohelp.h"
#include "glade/mooeditprefs-gxml.h"
#include "glade/mooeditprefs-file-gxml.h"
#include "glade/mooeditprefs-filters-gxml.h"
#include "glade/mooeditprefs-general-gxml.h"
#include "glade/mooeditprefs-langs-gxml.h"
#include "glade/mooeditprefs-view-gxml.h"
#include "help-sections.h"
#include <string.h>

View File

@ -247,7 +247,8 @@ _moo_text_btree_insert (BTree *tree,
{
BTNode *node, *tmp;
BTData *data;
G_GNUC_UNUSED guint index_orig = index_;
guint index_orig = index_;
(void) index_orig;
g_assert (tree != NULL);
g_assert (index_ <= tree->root->count);

View File

@ -231,7 +231,7 @@ G_STMT_START { \
#expr, ")", NULL); \
g_printerr ("**\n** %s\n", s); \
g_free (s); \
abort(); \
moo_abort(); \
} \
} G_STMT_END

View File

@ -16,6 +16,7 @@
#include "moo-test-macros.h"
#include "mooutils/mooutils-fs.h"
#include <stdio.h>
#include <stdlib.h>
typedef struct {
char *text;
@ -410,3 +411,9 @@ moo_test_load_data_file (const char *basename)
g_free (fullname);
return contents;
}
MOO_NORETURN void
moo_abort (void)
{
abort ();
}

View File

@ -19,6 +19,7 @@
#include <glib.h>
#include <string.h>
#include <stdarg.h>
#include <mooutils/mooutils-macros.h>
G_BEGIN_DECLS
@ -52,6 +53,8 @@ void moo_test_run_tests (const char *single_test,
void moo_test_cleanup (void);
gboolean moo_test_get_result (void);
MOO_NORETURN void moo_abort (void);
void moo_test_assert_impl (gboolean passed,
const char *text,
const char *filename,

View File

@ -165,8 +165,8 @@ public:
{
private:
friend class Vector;
typedef Vector::std_iterator std_iterator;
typedef Vector::std_const_iterator std_const_iterator;
typedef typename Vector::std_iterator std_iterator;
typedef typename Vector::std_const_iterator std_const_iterator;
std_iterator m_si;
@ -183,8 +183,8 @@ public:
{
private:
friend class Vector;
typedef Vector::std_iterator std_iterator;
typedef Vector::std_const_iterator std_const_iterator;
typedef typename Vector::std_iterator std_iterator;
typedef typename Vector::std_const_iterator std_const_iterator;
std_const_iterator m_si;

View File

@ -18,6 +18,8 @@ bool RefCount::unref()
return g_atomic_int_dec_and_test(&m_count) != 0;
}
#ifdef DEBUG
namespace _test {
#define MOO_CHECK_ERR 0
@ -65,7 +67,9 @@ inline void func()
#endif
}
}
} // namespace _test
#endif // DEBUG
} // namespace moo
// -%- strip:true -%-

View File

@ -1041,7 +1041,7 @@ fam_thread_add_path (FAMThread *thr,
{
gunichar2 *win_path;
if (thr->n_events == MAXIMUM_WAIT_OBJECTS)
if (thr->n_events >= MAXIMUM_WAIT_OBJECTS)
{
g_critical ("%s: too many folders watched", G_STRLOC);
return;
@ -1375,7 +1375,7 @@ fam_win32_init (void)
fam->running = FALSE;
fam->thread_data.n_events = 1;
fam->thread_data.events[0] = CreateEvent (NULL, TRUE, FALSE, NULL);;
fam->thread_data.events[0] = CreateEvent (NULL, TRUE, FALSE, NULL);
if (!fam->thread_data.events[0])
{

View File

@ -1216,6 +1216,9 @@ sync_xml (MooPrefsType prefs_type)
case MOO_PREFS_STATE:
xml_ptr = &prefs->xml_state;
break;
default:
g_return_if_reached ();
break;
}
if (!*xml_ptr)

View File

@ -40,17 +40,40 @@
# define MOO_STRFUNC ((const char*) (""))
#endif
#if defined(MOO_COMPILER_MSVC)
#define MOO_MSVC_WARNING_PUSH __pragma(warning(push))
#define MOO_MSVC_WARNING_POP __pragma(warning(push))
#define MOO_MSVC_WARNING_DISABLE(N) __pragma(warning(disable:N))
#define MOO_MSVC_WARNING_PUSH_DISABLE(N) MOO_MSVC_WARNING_PUSH MOO_MSVC_WARNING_DISABLE(N)
#else
#define MOO_MSVC_WARNING_PUSH
#define MOO_MSVC_WARNING_POP
#define MOO_MSVC_WARNING_DISABLE(N)
#define MOO_MSVC_WARNING_PUSH_DISABLE(N)
#endif
#if defined(MOO_COMPILER_GCC)
#define _MOO_GCC_PRAGMA(x) _Pragma (#x)
#define MOO_COMPILER_MESSAGE(x) _MOO_GCC_PRAGMA(message (#x))
#define MOO_TODO(x) _MOO_GCC_PRAGMA(message ("TODO: " #x))
#define MOO_IMPLEMENT_ME _MOO_GCC_PRAGMA(message ("IMPLEMENT ME"))
#elif defined(MOO_COMPILER_MSVC)
#define _MOO_MESSAGE_LOC __FILE__ "(" G_STRINGIFY(__LINE__) ") : "
#define MOO_COMPILER_MESSAGE(x) __pragma(message(_MOO_MESSAGE_LOC #x))
#define MOO_TODO(x) __pragma(message(_MOO_MESSAGE_LOC "TODO: " #x))
#define MOO_IMPLEMENT_ME __pragma(message(_MOO_MESSAGE_LOC "IMPLEMENT ME: " __FUNCTION__))
#else
#define MOO_COMPILER_MESSAGE(x)
#define MOO_TODO(x)
#define MOO_IMPLEMENT_ME
#endif
#if defined(MOO_COMPILER_MSVC)
#define MOO_NORETURN __declspec(noreturn)
#else
#define MOO_NORETURN G_GNUC_NORETURN
#endif
#ifdef __cplusplus
extern "C" {
#endif
@ -106,7 +129,7 @@ do { \
#define _MOO_CONCAT_(a, b) a##b
#define _MOO_CONCAT(a, b) _MOO_CONCAT_(a, b)
#define __MOO_STATIC_ASSERT_MACRO(cond, counter) enum { _MOO_CONCAT(_MooStaticAssert_##counter##_, __LINE__) = 1 / ((cond) != 0) }
#define __MOO_STATIC_ASSERT_MACRO(cond, counter) enum { _MOO_CONCAT(_MooStaticAssert_##counter##_, __LINE__) = 1 / ((cond) ? 1 : 0) }
#define _MOO_STATIC_ASSERT_MACRO(cond) __MOO_STATIC_ASSERT_MACRO(cond, 0)
#define MOO_STATIC_ASSERT(cond, message) _MOO_STATIC_ASSERT_MACRO(cond)
MOO_STATIC_ASSERT(sizeof(char) == 1, "test");

View File

@ -57,11 +57,13 @@ typedef struct {
GIOChannel *io;
GHashTable *data;
volatile gboolean init;
} EventQueue;
static GStaticMutex queue_lock = G_STATIC_MUTEX_INIT;
static volatile EventQueue *queue;
static EventQueue queue;
static QueueClient *
@ -69,9 +71,9 @@ get_event_client (guint id)
{
GSList *l;
g_return_val_if_fail (queue != NULL, NULL);
g_return_val_if_fail (queue.init, NULL);
for (l = queue->clients; l != NULL; l = l->next)
for (l = queue.clients; l != NULL; l = l->next)
{
QueueClient *s = l->data;
@ -131,8 +133,8 @@ got_data (GIOChannel *io)
char buf[1];
g_static_mutex_lock (&queue_lock);
data = queue->data;
queue->data = NULL;
data = queue.data;
queue.data = NULL;
g_io_channel_read_chars (io, buf, 1, NULL, NULL);
g_static_mutex_unlock (&queue_lock);
@ -148,16 +150,16 @@ _moo_event_queue_do_events (guint event_id)
{
GQueue *events = NULL;
g_return_if_fail (queue != NULL);
g_return_if_fail (queue.init);
g_static_mutex_lock (&queue_lock);
if (queue->data)
if (queue.data)
{
events = g_hash_table_lookup (queue->data, GUINT_TO_POINTER (event_id));
events = g_hash_table_lookup (queue.data, GUINT_TO_POINTER (event_id));
if (events)
g_hash_table_remove (queue->data, GUINT_TO_POINTER (event_id));
g_hash_table_remove (queue.data, GUINT_TO_POINTER (event_id));
}
g_static_mutex_unlock (&queue_lock);
@ -170,9 +172,12 @@ _moo_event_queue_do_events (guint event_id)
static void
init_queue (void)
{
if (g_atomic_int_get (&queue.init))
return;
g_static_mutex_lock (&queue_lock);
if (!queue)
if (!queue.init)
{
int fds[2];
GSource *source;
@ -183,25 +188,25 @@ init_queue (void)
goto out;
}
queue = g_new0 (EventQueue, 1);
queue.clients = NULL;
queue->clients = NULL;
queue->pipe_in = fds[1];
queue->pipe_out = fds[0];
queue.pipe_in = fds[1];
queue.pipe_out = fds[0];
#ifdef __WIN32__
queue->io = g_io_channel_win32_new_fd (queue->pipe_out);
queue.io = g_io_channel_win32_new_fd (queue.pipe_out);
#else
queue->io = g_io_channel_unix_new (queue->pipe_out);
queue.io = g_io_channel_unix_new (queue.pipe_out);
#endif
source = g_io_create_watch (queue->io, G_IO_IN);
source = g_io_create_watch (queue.io, G_IO_IN);
g_source_set_callback (source, (GSourceFunc) got_data, NULL, NULL);
g_source_set_can_recurse (source, TRUE);
g_source_attach (source, NULL);
queue->data = NULL;
queue.data = NULL;
queue.init = TRUE;
}
out:
@ -226,8 +231,8 @@ _moo_event_queue_connect (MooEventQueueCallback callback,
client->notify = notify;
g_static_mutex_lock (&queue_lock);
client->id = ++queue->last_id;
queue->clients = g_slist_prepend (queue->clients, client);
client->id = ++queue.last_id;
queue.clients = g_slist_prepend (queue.clients, client);
g_static_mutex_unlock (&queue_lock);
return client->id;
@ -240,7 +245,7 @@ _moo_event_queue_disconnect (guint event_id)
QueueClient *client;
g_return_if_fail (event_id != 0);
g_return_if_fail (queue != NULL);
g_return_if_fail (queue.init);
g_static_mutex_lock (&queue_lock);
@ -249,7 +254,7 @@ _moo_event_queue_disconnect (guint event_id)
if (!client)
g_warning ("%s: no client with id %d", G_STRLOC, event_id);
else
queue->clients = g_slist_remove (queue->clients, client);
queue.clients = g_slist_remove (queue.clients, client);
g_static_mutex_unlock (&queue_lock);
@ -277,18 +282,18 @@ _moo_event_queue_push (guint event_id,
g_static_mutex_lock (&queue_lock);
if (!queue->data)
if (!queue.data)
{
write (queue->pipe_in, &c, 1);
queue->data = g_hash_table_new (g_direct_hash, g_direct_equal);
(void) write (queue.pipe_in, &c, 1);
queue.data = g_hash_table_new (g_direct_hash, g_direct_equal);
}
events = g_hash_table_lookup (queue->data, GUINT_TO_POINTER (event_id));
events = g_hash_table_lookup (queue.data, GUINT_TO_POINTER (event_id));
if (!events)
{
events = g_queue_new ();
g_hash_table_insert (queue->data, GUINT_TO_POINTER (event_id), events);
g_hash_table_insert (queue.data, GUINT_TO_POINTER (event_id), events);
}
g_queue_push_tail (events, event_data);

View File

@ -560,7 +560,7 @@ _xdg_mime_glob_read_from_file (XdgGlobHash *glob_hash,
const char *file_name)
{
FILE *glob_file;
char line[255];
char line[256];
glob_file = fopen (file_name, "r");
@ -578,6 +578,7 @@ _xdg_mime_glob_read_from_file (XdgGlobHash *glob_hash,
if (line[0] == '#')
continue;
line[255] = 0;
colon = strchr (line, ':');
if (colon == NULL)
continue;

View File

@ -1458,12 +1458,13 @@ uri_is_directory (const char *uri)
}
static void
add_row_from_dir_uri (FileList *list,
const char *uri,
GtkTreeIter *iter,
GtkTreeIter *parent,
int index)
add_row_from_dir_uri (G_GNUC_UNUSED FileList *list,
G_GNUC_UNUSED const char *uri,
G_GNUC_UNUSED GtkTreeIter *iter,
G_GNUC_UNUSED GtkTreeIter *parent,
G_GNUC_UNUSED int index)
{
#if 0
/* TODO read files */
Group *grp;
char *basename;
@ -1477,6 +1478,7 @@ add_row_from_dir_uri (FileList *list,
item_unref (ITEM (grp));
g_free (basename);
#endif
}
static void

View File

@ -24,11 +24,11 @@
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="cd $(ProjectDir)..\build\vs-$(ConfigurationName)&#x0D;&#x0A;nmake&#x0D;&#x0A;XCOPY medit\medit.exe &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;XCOPY moo\moo.dll &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;XCOPY moo\moo.pdb &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;"
ReBuildCommandLine="cd $(ProjectDir)..\build\vs-$(ConfigurationName)&#x0D;&#x0A;nmake clean all&#x0D;&#x0A;XCOPY medit\medit.exe &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;XCOPY moo\moo.dll &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;XCOPY moo\moo.pdb &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;"
BuildCommandLine="cd $(ProjectDir)..\build\vs-$(ConfigurationName)&#x0D;&#x0A;nmake&#x0D;&#x0A;XCOPY medit\medit.exe &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;XCOPY medit\medit.pdb &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;XCOPY moo\moo.dll &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;XCOPY moo\moo.pdb &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;"
ReBuildCommandLine="cd $(ProjectDir)..\build\vs-$(ConfigurationName)&#x0D;&#x0A;nmake clean all&#x0D;&#x0A;XCOPY medit\medit.exe &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;XCOPY medit\medit.pdb &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;XCOPY moo\moo.dll &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;XCOPY moo\moo.pdb &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;"
CleanCommandLine="cd $(ProjectDir)..\build\vs-$(ConfigurationName)&#x0D;&#x0A;nmake clean&#x0D;&#x0A;"
Output="C:\Program Files\medit\bin\medit.exe"
PreprocessorDefinitions="WIN32;_DEBUG;__WIN32__;ENABLE_NLS"
PreprocessorDefinitions="WIN32;_DEBUG;__WIN32__;ENABLE_NLS;MOO_ENABLE_UNIT_TESTS"
IncludeSearchPath="&quot;$(ProjectDir)..\moo&quot;;&quot;$(ProjectDir)..\build\vs-$(ConfigurationName)&quot;;&quot;C:\Users\muntyan\Projects\gtk-bin\include&quot;;&quot;C:\Users\muntyan\Projects\gtk-bin\include\glib-2.0&quot;;&quot;C:\Users\muntyan\Projects\gtk-bin\lib\glib-2.0\include&quot;;&quot;C:\Users\muntyan\Projects\gtk-bin\lib\gtk-2.0\include&quot;;&quot;C:\Users\muntyan\Projects\gtk-bin\include\gtk-2.0&quot;;&quot;C:\Users\muntyan\Projects\gtk-bin\include\cairo&quot;;&quot;C:\Users\muntyan\Projects\gtk-bin\include\pango-1.0&quot;;&quot;C:\Qt\vs-2008\4.5.3\include&quot;;&quot;C:\Qt\vs-2008\4.5.3\include\Qt&quot;;&quot;C:\Qt\vs-2008\4.5.3\include\QtCore&quot;"
ForcedIncludes=""
AssemblySearchPath=""
@ -44,11 +44,11 @@
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="cd $(ProjectDir)..\build\vs-$(ConfigurationName)&#x0D;&#x0A;nmake&#x0D;&#x0A;XCOPY medit\medit.exe &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;XCOPY moo\moo.dll &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;XCOPY moo\moo.pdb &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;"
ReBuildCommandLine="cd $(ProjectDir)..\build\vs-$(ConfigurationName)&#x0D;&#x0A;nmake clean all&#x0D;&#x0A;XCOPY medit\medit.exe &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;XCOPY moo\moo.dll &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;XCOPY moo\moo.pdb &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;"
BuildCommandLine="cd $(ProjectDir)..\build\vs-$(ConfigurationName)&#x0D;&#x0A;nmake&#x0D;&#x0A;XCOPY medit\medit.exe &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;XCOPY medit\medit.pdb &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;XCOPY moo\moo.dll &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;XCOPY moo\moo.pdb &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;"
ReBuildCommandLine="cd $(ProjectDir)..\build\vs-$(ConfigurationName)&#x0D;&#x0A;nmake clean all&#x0D;&#x0A;XCOPY medit\medit.exe &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;XCOPY medit\medit.pdb &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;XCOPY moo\moo.dll &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;XCOPY moo\moo.pdb &quot;C:\Program Files\medit\bin\&quot; /Y&#x0D;&#x0A;"
CleanCommandLine="cd $(ProjectDir)..\build\vs-$(ConfigurationName)&#x0D;&#x0A;nmake clean&#x0D;&#x0A;"
Output="C:\Program Files\medit\bin\medit.exe"
PreprocessorDefinitions="WIN32;NDEBUG;__WIN32__;ENABLE_NLS"
PreprocessorDefinitions="WIN32;NDEBUG;__WIN32__;ENABLE_NLS;MOO_ENABLE_UNIT_TESTS"
IncludeSearchPath="&quot;$(ProjectDir)..\moo&quot;;&quot;$(ProjectDir)..\build\vs-$(ConfigurationName)&quot;;&quot;C:\Users\muntyan\Projects\gtk-bin\include&quot;;&quot;C:\Users\muntyan\Projects\gtk-bin\include\glib-2.0&quot;;&quot;C:\Users\muntyan\Projects\gtk-bin\lib\glib-2.0\include&quot;;&quot;C:\Users\muntyan\Projects\gtk-bin\lib\gtk-2.0\include&quot;;&quot;C:\Users\muntyan\Projects\gtk-bin\include\gtk-2.0&quot;;&quot;C:\Users\muntyan\Projects\gtk-bin\include\cairo&quot;;&quot;C:\Users\muntyan\Projects\gtk-bin\include\pango-1.0&quot;;&quot;C:\Qt\vs-2008\4.5.3\include&quot;;&quot;C:\Qt\vs-2008\4.5.3\include\Qt&quot;;&quot;C:\Qt\vs-2008\4.5.3\include\QtCore&quot;"
ForcedIncludes=""
AssemblySearchPath=""
@ -67,6 +67,10 @@
RelativePath="..\moo\CMakeLists.txt"
>
</File>
<File
RelativePath="..\moo\gendef.py"
>
</File>
<File
RelativePath="..\moo\gendummy.cmake"
>
@ -586,6 +590,10 @@
RelativePath="..\moo\mooutils\mooutils-gobject.h"
>
</File>
<File
RelativePath="..\moo\mooutils\mooutils-macros.h"
>
</File>
<File
RelativePath="..\moo\mooutils\mooutils-mem.h"
>
@ -1238,6 +1246,70 @@
</File>
</Filter>
</Filter>
<Filter
Name="glade"
>
<File
RelativePath="..\moo\mooedit\glade\mooeditprefs-file.glade"
>
</File>
<File
RelativePath="..\moo\mooedit\glade\mooeditprefs-filters.glade"
>
</File>
<File
RelativePath="..\moo\mooedit\glade\mooeditprefs-general.glade"
>
</File>
<File
RelativePath="..\moo\mooedit\glade\mooeditprefs-langs.glade"
>
</File>
<File
RelativePath="..\moo\mooedit\glade\mooeditprefs-view.glade"
>
</File>
<File
RelativePath="..\moo\mooedit\glade\mooeditprogress.glade"
>
</File>
<File
RelativePath="..\moo\mooedit\glade\mooeditsavemult.glade"
>
</File>
<File
RelativePath="..\moo\mooedit\glade\moopluginprefs.glade"
>
</File>
<File
RelativePath="..\moo\mooedit\glade\mooprint.glade"
>
</File>
<File
RelativePath="..\moo\mooedit\glade\mooprintpreview.glade"
>
</File>
<File
RelativePath="..\moo\mooedit\glade\mooquicksearch.glade"
>
</File>
<File
RelativePath="..\moo\mooedit\glade\moostatusbar.glade"
>
</File>
<File
RelativePath="..\moo\mooedit\glade\mootextfind-prompt.glade"
>
</File>
<File
RelativePath="..\moo\mooedit\glade\mootextfind.glade"
>
</File>
<File
RelativePath="..\moo\mooedit\glade\mootextgotoline.glade"
>
</File>
</Filter>
</Filter>
<Filter
Name="moofileview"
@ -1755,10 +1827,6 @@
<Filter
Name="cmake"
>
<File
RelativePath="..\cmake\compilers.cmake"
>
</File>
<File
RelativePath="..\cmake\dist.cmake"
>
@ -1790,6 +1858,10 @@
RelativePath="..\cmake\modules\FindMooCmakeUtils.cmake"
>
</File>
<File
RelativePath="..\cmake\modules\FindMooCompilers.cmake"
>
</File>
<File
RelativePath="..\cmake\modules\FindMooQt.cmake"
>