Backed out changeset a64b1b22fb0c

master
Yevgen Muntyan 2017-05-25 12:48:38 -07:00
parent ad3a9835d7
commit 63b563eee3
39 changed files with 48 additions and 229 deletions

View File

@ -116,7 +116,7 @@ if(NOT MOO_BUILD_FROM_MINGW AND NOT MOO_BUILD_FROM_MSVC)
OUTPUT_STRIP_TRAILING_WHITESPACE
RESULT_VARIABLE RESULT)
if(NOT RESULT EQUAL 0)
MESSAGE(FATAL_ERROR "Could not find glib-mkenums")
MESSAGE(FATAL_ERROR "Could not find glib-mkenums")
endif()
pkg_check_modules(XLIB x11 xext xrender ice sm)
@ -128,8 +128,8 @@ else()
set(MOO_GTK_DIST_DIR "C:/Projects/gtk/release/bdist" CACHE PATH "Gtk binary dir")
set(GTK_LIBRARIES libgtk-win32-2.0-0 libatk-1.0-0 libgdk-win32-2.0-0 libgdk_pixbuf-2.0-0
libpango-1.0-0 libpangocairo-1.0-0 libcairo-2
libgio-2.0-0 libgobject-2.0-0 libgmodule-2.0-0 libgthread-2.0-0 libglib-2.0-0 libintl-8
libpango-1.0-0 libpangocairo-1.0-0 libcairo-2
libgio-2.0-0 libgobject-2.0-0 libgmodule-2.0-0 libgthread-2.0-0 libglib-2.0-0 libintl-8
libmooglib-0)
set(LIBXML2_LIBRARIES "libxml2-2")
else()

View File

@ -44,8 +44,8 @@ SET(source_files
../moo/mooapp/moolinklabel.h
../moo/mooedit/mooedit-accels.h
../moo/mooedit/mooeditaction.c
../moo/mooedit/native/mooeditaction-factory.cpp
../moo/mooedit/native/mooeditaction-factory.h
../moo/mooedit/mooeditaction-factory.c
../moo/mooedit/mooeditaction-factory.h
../moo/mooedit/mooeditaction.h
../moo/mooedit/native/mooeditbookmark.cpp
../moo/mooedit/native/mooeditbookmark.h

View File

@ -1,11 +1,11 @@
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/genmarshals_h.cmake
"EXECUTE_PROCESS(COMMAND ${GLIB_GENMARSHAL} --prefix=_moo_marshal --header ${CMAKE_CURRENT_SOURCE_DIR}/marshals.list
RESULT_VARIABLE result
OUTPUT_VARIABLE output
ERROR_VARIABLE error
OUTPUT_FILE marshals.h.tmp)
OUTPUT_VARIABLE output
ERROR_VARIABLE error
OUTPUT_FILE marshals.h.tmp)
if(NOT result EQUAL 0)
MESSAGE(FATAL_ERROR \"Error generating marshals.h: \${output} \${error}\")
MESSAGE(FATAL_ERROR \"Error generating marshals.h: \${output} \${error}\")
endif()
file(RENAME marshals.h.tmp marshals.h)
")

View File

@ -19,12 +19,6 @@ SET(mooedit_gtksourceview_sources
mooedit/native/mootextsearch.h
mooedit/native/mootextfind.c
mooedit/native/mootextfind.h
mooedit/native/mooeditview-impl.h
mooedit/native/mooeditview-priv.h
mooedit/native/mooeditview.cpp
mooedit/native/mooeditview.h
mooedit/native/mooeditaction-factory.cpp
mooedit/native/mooeditaction-factory.h
)
SET(mooedit_sci_sources
@ -45,6 +39,8 @@ SET(mooedit_sources
mooedit/mooedit-script.h
mooedit/mooedit.cpp
mooedit/mooedit.h
mooedit/mooeditaction-factory.cpp
mooedit/mooeditaction-factory.h
mooedit/mooeditaction.cpp
mooedit/mooeditaction.h
mooedit/mooeditconfig.cpp
@ -74,6 +70,12 @@ SET(mooedit_sources
mooedit/mooedittab.cpp
mooedit/mooedittab.h
mooedit/mooedittypes.h
mooedit/mooeditview-impl.h
mooedit/mooeditview-priv.h
mooedit/mooeditview-script.cpp
mooedit/mooeditview-script.h
mooedit/mooeditview.cpp
mooedit/mooeditview.h
mooedit/mooeditwindow-impl.h
mooedit/mooeditwindow.cpp
mooedit/mooeditwindow.h

View File

@ -35,13 +35,11 @@
* @MOO_EDIT_STATUS_CLEAN: doesn't prompt on close, even if it's modified.
**/
#include "mooedit/mooeditaction-factory.h"
#include "mooedit/mooedit-private.h"
#include "mooedit/mooeditview-impl.h"
#ifndef MOO_USE_SCI
#include "mooedit/native/mooeditaction-factory.h"
#include "mooedit/native/mooeditview-impl.h"
#include "mooedit/native/mooeditbookmark.h"
#else
#include "mooedit/sci/mooeditview-impl.h"
#endif
#include "mooedit/mooeditdialogs.h"
#include "mooedit/mooeditprefs.h"
@ -486,7 +484,6 @@ _moo_edit_set_active_view (MooEdit *doc,
buffer = moo_edit_get_buffer (doc);
#ifndef MOO_USE_SCI
if (doc->priv->active_view != NULL && doc->priv->active_view != view)
{
GtkTextIter iter;
@ -504,7 +501,6 @@ _moo_edit_set_active_view (MooEdit *doc,
gtk_text_buffer_get_iter_at_mark (buffer, &iter, mark);
gtk_text_buffer_place_cursor (buffer, &iter);
}
#endif // !MOO_USE_SCI
doc->priv->active_view = view;
doc->priv->dead_active_view = FALSE;

View File

@ -13,7 +13,7 @@
* License along with medit. If not, see <http://www.gnu.org/licenses/>.
*/
#include "mooedit/native/mooeditaction-factory.h"
#include "mooedit/mooeditaction-factory.h"
#include "mooedit/mooeditaction.h"
#include "mooedit/mooedit-private.h"
#include "mooutils/mooutils-gobject.h"

View File

@ -16,10 +16,6 @@
#ifndef MOO_EDIT_ACTION_FACTORY_H
#define MOO_EDIT_ACTION_FACTORY_H
#ifdef MOO_USE_SCI
#error "This header must not be used"
#endif
#include <mooutils/mooaction.h>
#include <mooedit/mooedit.h>

View File

@ -18,9 +18,7 @@
**/
#include "mooedit/mooeditaction.h"
#ifndef MOO_USE_SCI
#include "mooedit/native/mooeditaction-factory.h"
#endif
#include "mooedit/mooeditaction-factory.h"
#include "mooedit/mooeditfiltersettings.h"
#include "mooedit/mooedit-impl.h"
#include "mooutils/mooutils.h"
@ -369,8 +367,6 @@ moo_edit_action_check_state (MooEditAction *action)
}
#ifndef MOO_USE_SCI
void
_moo_edit_check_actions (MooEdit *edit,
MooEditView *view)
@ -389,8 +385,6 @@ _moo_edit_check_actions (MooEdit *edit,
}
}
#endif // !MOO_USE_SCI
static void
regex_ref_free (RegexRef *ref)

View File

@ -25,11 +25,7 @@
#include "mooedit/mooplugin.h"
#include "mooedit/mooeditprefs.h"
#include "mooedit/mooedit-impl.h"
#ifndef MOO_USE_SCI
#include "mooedit/native/mooeditview-impl.h"
#else
#include "mooedit/sci/mooeditview-impl.h"
#endif
#include "mooedit/mooeditview-impl.h"
#include "mooedit/mooedit-accels.h"
#include "mooedit/mooeditfiltersettings.h"
#include "mooedit/mooeditfileinfo-impl.h"

View File

@ -17,9 +17,7 @@
#define MOO_EDITOR_H
#include <mooedit/mooedit.h>
#ifndef MOO_USE_SCI
#include <mooedit/native/mooeditview.h>
#endif
#include <mooedit/mooeditview.h>
#include <mooedit/mooeditwindow.h>
#include <mooedit/mooeditfileinfo.h>
#include <mooutils/moouixml.h>

View File

@ -15,11 +15,7 @@
#include "mooedit/mooeditprefs.h"
#include "mooedit/mooedit-impl.h"
#ifndef MOO_USE_SCI
#include "mooedit/native/mooeditview-impl.h"
#else
#include "mooedit/sci/mooeditview.h"
#endif
#include "mooedit/mooeditview-impl.h"
#include "mooedit/mooedit-fileops.h"
#include "mooedit/mootextview-private.h"
#include "mooedit/mooedit-enums.h"

View File

@ -3,11 +3,7 @@
**/
#include "mooedittab-impl.h"
#ifndef MOO_USE_SCI
#include "native/mooeditview-impl.h"
#else
#include "sci/mooeditview-impl.h"
#endif
#include "mooeditview-impl.h"
#include "mooeditwindow-impl.h"
#include "mooedit-impl.h"
#include <mooutils/moocompat.h>

View File

@ -1,11 +1,7 @@
#ifndef MOO_EDIT_VIEW_IMPL_H
#define MOO_EDIT_VIEW_IMPL_H
#ifdef MOO_USE_SCI
#error "This header must not be used"
#endif
#include "mooedit/native/mooeditview.h"
#include "mooedit/mooeditview.h"
G_BEGIN_DECLS

View File

@ -1,11 +1,7 @@
#ifndef MOO_EDIT_VIEW_PRIV_H
#define MOO_EDIT_VIEW_PRIV_H
#ifdef MOO_USE_SCI
#error "This header must not be used"
#endif
#include "mooedit/native/mooeditview-impl.h"
#include "mooedit/mooeditview-impl.h"
G_BEGIN_DECLS

View File

@ -0,0 +1,2 @@
#include "mooedit/mooeditview-script.h"

View File

@ -0,0 +1,12 @@
#ifndef MOO_EDIT_VIEW_SCRIPT_H
#define MOO_EDIT_VIEW_SCRIPT_H
#include <mooedit/mooeditview.h>
G_BEGIN_DECLS
G_END_DECLS
#endif /* MOO_EDIT_VIEW_SCRIPT_H */

View File

@ -2,7 +2,7 @@
* class:MooEditView: (parent MooTextView) (moo.doc-object-name view): document view object
**/
#include "mooedit/native/mooeditview-priv.h"
#include "mooedit/mooeditview-priv.h"
#include "mooedit/mooedit-impl.h"
#include "mooedit/mooeditwindow-impl.h"
#include "mooedit/mooedittab-impl.h"

View File

@ -15,10 +15,6 @@
#pragma once
#ifdef MOO_USE_SCI
#error "This header must not be used"
#endif
#include <mooedit/mootextview.h>
#include <mooedit/mooedit.h>

View File

@ -26,11 +26,7 @@
#include "mooedit/mooeditwindow-impl.h"
#include "mooedit/mooedit-accels.h"
#include "mooedit/mooeditor-impl.h"
#ifndef MOO_USE_SCI
#include "mooedit/native/mooeditview-impl.h"
#else
#include "mooedit/sci/mooeditview-impl.h"
#endif
#include "mooedit/mooeditview-impl.h"
#include "mooedit/mooedittab-impl.h"
#include "mooedit/mooeditfiltersettings.h"
#ifndef MOO_USE_SCI

View File

@ -14,9 +14,7 @@
*/
#include "mooedit/mootextview-private.h"
#ifndef MOO_USE_SCI
#include "mooedit/native/mooeditview-impl.h"
#endif
#include "mooedit/mooeditview-impl.h"
#include "mooedit/mootextiter.h"
#include "mooedit/mootextbuffer.h"
#include "mooutils/mooutils-misc.h"
@ -817,13 +815,11 @@ _moo_text_view_button_press_event (GtkWidget *widget,
else
view->priv->dnd.type = MOO_TEXT_VIEW_DRAG_SELECT_LINES;
}
#ifndef MOO_USE_SCI
else if (event->button == 3 && MOO_IS_EDIT_VIEW (widget))
{
_moo_edit_view_do_popup (MOO_EDIT_VIEW (widget), event);
return TRUE;
}
#endif // !MOO_USE_SCI
else if (event->button == 2 || event->button == 3)
{
return GTK_WIDGET_CLASS (_moo_text_view_parent_class)->

View File

@ -16,10 +16,6 @@
#ifndef MOO_EDIT_BOOKMARK_H
#define MOO_EDIT_BOOKMARK_H
#ifdef MOO_USE_SCI
#error "This header must not be used"
#endif
#include <mooedit/mooedit.h>
#include <mooedit/moolinemark.h>

View File

@ -16,10 +16,6 @@
#ifndef MOO_LANG_PRIVATE_H
#define MOO_LANG_PRIVATE_H
#ifdef MOO_USE_SCI
#error "This header must not be used"
#endif
#include "gtksourceview/gtksourceview-api.h"
#ifndef MOO_USE_SCI
#include "mooedit/native/moolang.h"

View File

@ -16,10 +16,6 @@
#ifndef MOO_LANG_H
#define MOO_LANG_H
#ifdef MOO_USE_SCI
#error "This header must not be used"
#endif
#include <glib-object.h>
G_BEGIN_DECLS

View File

@ -16,10 +16,6 @@
#ifndef MOO_LANG_MGR_PRIVATE_H
#define MOO_LANG_MGR_PRIVATE_H
#ifdef MOO_USE_SCI
#error "This header must not be used"
#endif
#ifndef MOO_USE_SCI
#include "mooedit/native/moolangmgr.h"
#endif // !MOO_USE_SCI

View File

@ -16,10 +16,6 @@
#ifndef MOO_LANG_MGR_H
#define MOO_LANG_MGR_H
#ifdef MOO_USE_SCI
#error "This header must not be used"
#endif
#ifndef MOO_USE_SCI
#include "mooedit/native/moolang.h"
#include <mooedit/native/mootextstylescheme.h>

View File

@ -16,10 +16,6 @@
#ifndef MOO_TEXT_FIND_H
#define MOO_TEXT_FIND_H
#ifdef MOO_USE_SCI
#error "This header must not be used"
#endif
#include <gtk/gtk.h>
#include <mooedit/mooedit-enums.h>
#include <mooutils/moohistorylist.h>

View File

@ -16,10 +16,6 @@
#ifndef MOO_TEXT_PRINT_PRIVATE_H
#define MOO_TEXT_PRINT_PRIVATE_H
#ifdef MOO_USE_SCI
#error "This header must not be used"
#endif
#include <mooedit/native/mootextprint.h>
G_BEGIN_DECLS

View File

@ -16,9 +16,7 @@
#include "mooedit/native/mootextprint-private.h"
#include "mooedit/mooedit.h"
#include "mooedit/mooedit-impl.h"
#ifndef MOO_USE_SCI
#include "mooedit/native/mooeditview-impl.h"
#endif
#include "mooedit/mooeditview-impl.h"
#include "mooedit/mooeditprefs.h"
#include "mooedit/mootext-private.h"
#include "mooutils/moodialogs.h"

View File

@ -16,10 +16,6 @@
#ifndef MOO_TEXT_PRINT_H
#define MOO_TEXT_PRINT_H
#ifdef MOO_USE_SCI
#error "This header must not be used"
#endif
#include <gtk/gtk.h>
G_BEGIN_DECLS

View File

@ -16,10 +16,6 @@
#ifndef MOO_TEXT_SEARCH_PRIVATE_H
#define MOO_TEXT_SEARCH_PRIVATE_H
#ifdef MOO_USE_SCI
#error "This header must not be used"
#endif
#include <mooedit/native/mootextsearch.h>
#include <mooglib/moo-glib.h>

View File

@ -16,10 +16,6 @@
#ifndef MOO_TEXT_SEARCH_H
#define MOO_TEXT_SEARCH_H
#ifdef MOO_USE_SCI
#error "This header must not be used"
#endif
#include <mooedit/mootextiter.h>
#include <mooedit/mooedit-enums.h>

View File

@ -16,10 +16,6 @@
#ifndef MOO_TEXT_STYLE_SCHEME_H
#define MOO_TEXT_STYLE_SCHEME_H
#ifdef MOO_USE_SCI
#error "This header must not be used"
#endif
#include <gtk/gtk.h>
G_BEGIN_DECLS

View File

@ -1,25 +0,0 @@
#pragma once
#ifndef MOO_USE_SCI
#error "This header must not be used"
#endif
#include "mooedit/sci/mooeditview.h"
MooEditView *_moo_edit_view_new (MooEdit *doc);
void _moo_edit_view_unset_doc (MooEditView *view);
void _moo_edit_view_set_tab (MooEditView *view,
MooEditTab *tab);
//GtkTextMark *_moo_edit_view_get_fake_cursor_mark (MooEditView *view);
void _moo_edit_view_apply_prefs (MooEditView *view);
void _moo_edit_view_apply_config (MooEditView *view);
void _moo_edit_view_ui_set_line_wrap (MooEditView *view,
gboolean enabled);
void _moo_edit_view_ui_set_show_line_numbers (MooEditView *view,
gboolean show);
//void _moo_edit_view_do_popup (MooEditView *view,
// GdkEventButton *event);

View File

@ -1,60 +0,0 @@
/*
* mooeditview.h
*
* Copyright (C) 2004-2016 by Yevgen Muntyan <emuntyan@users.sourceforge.net>
*
* This file is part of medit. medit is free software; you can
* redistribute it and/or modify it under the terms of the
* GNU Lesser General Public License as published by the
* Free Software Foundation; either version 2.1 of the License,
* or (at your option) any later version.
*
* You should have received a copy of the GNU Lesser General Public
* License along with medit. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#ifndef MOO_USE_SCI
#error "This header must not be used"
#endif
#include <mooedit/mooedit.h>
G_BEGIN_DECLS
#define MOO_TYPE_EDIT_VIEW (moo_edit_view_get_type ())
#define MOO_EDIT_VIEW(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), MOO_TYPE_EDIT_VIEW, MooEditView))
#define MOO_EDIT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MOO_TYPE_EDIT_VIEW, MooEditViewClass))
#define MOO_IS_EDIT_VIEW(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), MOO_TYPE_EDIT_VIEW))
#define MOO_IS_EDIT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MOO_TYPE_EDIT_VIEW))
#define MOO_EDIT_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MOO_TYPE_EDIT_VIEW, MooEditViewClass))
typedef struct MooEditViewPrivate MooEditViewPrivate;
typedef struct MooEditViewClass MooEditViewClass;
struct MooEditView
{
GtkWidget parent;
MooEditViewPrivate *priv;
};
struct MooEditViewClass
{
GtkWidgetClass parent_class;
};
GType moo_edit_view_get_type (void) G_GNUC_CONST;
MooEdit *moo_edit_view_get_doc (MooEditView *view);
MooEditTab *moo_edit_view_get_tab (MooEditView *view);
MooEditWindow *moo_edit_view_get_window (MooEditView *view);
MooEditor *moo_edit_view_get_editor (MooEditView *view);
G_END_DECLS
#ifdef __cplusplus
MOO_DEFINE_GOBJ_TRAITS(MooEditView, MOO_TYPE_EDIT_VIEW);
#endif // __cplusplus

View File

@ -30,16 +30,14 @@
#include "mooedit/mooeditwindow.h"
#ifndef MOO_USE_SCI
#include "mooedit/native/mooeditbookmark.h"
#else
#include "mooedit/sci/mooeditview.h"
#endif
#include "mooedit/mooplugin.h"
#include "mooedit/mooedit-enums.h"
#include "mooedit/mooeditprefs.h"
#include "mooedit/mooeditaction.h"
#include "mooedit/mooeditaction-factory.h"
#include "mooedit/mootextbuffer.h"
#ifndef MOO_USE_SCI
#include "mooedit/native/mooeditaction-factory.h"
#include "mooedit/native/moolangmgr.h"
#endif // !MOO_USE_SCI
#include "mooedit/mooeditfileinfo.h"

View File

@ -58,16 +58,12 @@ G_END_DECLS
#ifndef MOO_USE_SCI
#include "mooedit/native/mooeditbookmark.h"
#include "mooedit/native/moolangmgr.h"
#else
#include "mooedit/sci/mooeditview.h"
#endif
#include "mooedit/mooplugin.h"
#include "mooedit/mooedit-enums.h"
#include "mooedit/mooeditprefs.h"
#include "mooedit/mooeditaction.h"
#ifndef MOO_USE_SCI
#include "mooedit/native/mooeditaction-factory.h"
#endif
#include "mooedit/mooeditaction-factory.h"
#include "mooedit/mootextbuffer.h"
#include "mooedit/mooeditfileinfo.h"
#include "mooedit/mooedit-script.h"

View File

@ -21,9 +21,6 @@
#include "mooedit/mooplugin-macro.h"
#include "mooedit/mooeditwindow.h"
#include "mooedit/mooedittab.h"
#ifdef MOO_USE_SCI
#include "mooedit/sci/mooeditview.h"
#endif
#include "moofileview/moobookmarkmgr.h"
#include "moofileview/moofileview-tools.h"
#include "plugins/mooplugin-builtin.h"

View File

@ -19,9 +19,6 @@
#include "mooedit/mooplugin-macro.h"
#include "mooedit/mooedit-script.h"
#ifdef MOO_USE_SCI
#include "mooedit/sci/mooeditview.h"
#endif
#include "plugins/mooplugin-builtin.h"
#include "moofileview/moofileentry.h"
#include "support/moocmdview.h"

View File

@ -19,9 +19,7 @@
#include "plugins/mooplugin-builtin.h"
#include "mooedit/mooeditor.h"
#include "mooedit/mooeditaction.h"
#ifndef MOO_USE_SCI
#include "mooedit/native/mooeditaction-factory.h"
#endif
#include "mooedit/mooeditaction-factory.h"
#include "mooedit/mooplugin-macro.h"
#include "mooutils/mooutils-misc.h"
#include "mooutils/mooutils-debug.h"
@ -123,10 +121,8 @@ unload_user_tools (int type)
if (type == MOO_USER_TOOL_MENU)
moo_window_class_remove_action ((MooWindowClass*) klass, info->id);
#ifndef MOO_USE_SCI
else
moo_edit_class_remove_action ((MooEditClass*) klass, info->id);
#endif
g_free (info->id);
g_free (info);
@ -412,7 +408,6 @@ load_tool (MooUserToolInfo *info)
break;
#ifndef MOO_USE_SCI
case MOO_USER_TOOL_CONTEXT:
klass = g_type_class_peek (MOO_TYPE_EDIT);
moo_edit_class_new_action ((MooEditClass*) klass, info->id,
@ -424,7 +419,6 @@ load_tool (MooUserToolInfo *info)
"file-filter", info->filter,
NULL);
break;
#endif
}
if (tool_info->xml)