Moved MooCmdView to plugins/support/
This commit is contained in:
parent
e15db76a6a
commit
6f04877a11
@ -26,7 +26,6 @@
|
||||
#include "mooedit/mootextbuffer.h"
|
||||
#include "mooedit/mooeditprefs.h"
|
||||
#include "mooedit/mooplugin.h"
|
||||
#include "mooedit/moocmdview.h"
|
||||
#include "mooedit/mooeditaction.h"
|
||||
#include "mooedit/mooedit-bookmarks.h"
|
||||
#include "mooedit/moolangmgr.h"
|
||||
@ -3584,69 +3583,6 @@ moo_edit_window_job_finished (MooEditWindow *window,
|
||||
}
|
||||
|
||||
|
||||
GtkWidget *
|
||||
moo_edit_window_get_output (MooEditWindow *window)
|
||||
{
|
||||
MooPaneLabel *label;
|
||||
GtkWidget *cmd_view;
|
||||
GtkWidget *scrolled_window;
|
||||
|
||||
g_return_val_if_fail (MOO_IS_EDIT_WINDOW (window), NULL);
|
||||
|
||||
scrolled_window = moo_edit_window_get_pane (window, "moo-edit-window-output");
|
||||
|
||||
if (!scrolled_window)
|
||||
{
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
GTK_SHADOW_ETCHED_IN);
|
||||
|
||||
cmd_view = moo_cmd_view_new ();
|
||||
moo_text_view_set_font_from_string (MOO_TEXT_VIEW (cmd_view), "Monospace");
|
||||
gtk_container_add (GTK_CONTAINER (scrolled_window), cmd_view);
|
||||
gtk_widget_show_all (scrolled_window);
|
||||
g_object_set_data (G_OBJECT (scrolled_window), "moo-output", cmd_view);
|
||||
|
||||
label = moo_pane_label_new (MOO_STOCK_TERMINAL, NULL, "Output", "Output");
|
||||
|
||||
if (!moo_edit_window_add_pane (window, "moo-edit-window-output",
|
||||
scrolled_window, label, MOO_PANE_POS_BOTTOM))
|
||||
{
|
||||
g_critical ("%s: oops", G_STRLOC);
|
||||
moo_pane_label_free (label);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
moo_edit_window_add_stop_client (window, cmd_view);
|
||||
|
||||
moo_pane_label_free (label);
|
||||
return cmd_view;
|
||||
}
|
||||
|
||||
return g_object_get_data (G_OBJECT (scrolled_window), "moo-output");
|
||||
}
|
||||
|
||||
|
||||
GtkWidget *
|
||||
moo_edit_window_get_output_pane (MooEditWindow *window)
|
||||
{
|
||||
g_return_val_if_fail (MOO_IS_EDIT_WINDOW (window), NULL);
|
||||
return moo_edit_window_get_pane (window, "moo-edit-window-output");
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
moo_edit_window_present_output (MooEditWindow *window)
|
||||
{
|
||||
g_return_if_fail (MOO_IS_EDIT_WINDOW (window));
|
||||
moo_edit_window_get_output (window);
|
||||
moo_big_paned_present_pane (window->paned,
|
||||
moo_edit_window_get_output_pane (window));
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* Doc list
|
||||
*/
|
||||
|
@ -106,10 +106,6 @@ void moo_edit_window_remove_stop_client (MooEditWindow *window,
|
||||
gpointer client);
|
||||
void moo_edit_window_abort_jobs (MooEditWindow *window);
|
||||
|
||||
void moo_edit_window_present_output (MooEditWindow *window);
|
||||
GtkWidget *moo_edit_window_get_output (MooEditWindow *window);
|
||||
GtkWidget *moo_edit_window_get_output_pane (MooEditWindow *window);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@ -31,3 +31,4 @@ lua-module-setup.h: plugins/lua-module-setup.lua $(top_srcdir)/tools/xml2h.py
|
||||
|
||||
include plugins/ctags/Makefile.incl
|
||||
include plugins/usertools/Makefile.incl
|
||||
include plugins/support/Makefile.incl
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "mooedit/mooplugin-macro.h"
|
||||
#include "mooeditplugins.h"
|
||||
#include "moofileview/moofileentry.h"
|
||||
#include "mooedit/moocmdview.h"
|
||||
#include "moocmdview.h"
|
||||
#include "mooedit/mooedit-accels.h"
|
||||
#include "mooedit/mootextbuffer.h"
|
||||
#include "mooutils/moostock.h"
|
||||
|
7
moo/plugins/support/Makefile.incl
Normal file
7
moo/plugins/support/Makefile.incl
Normal file
@ -0,0 +1,7 @@
|
||||
AM_CPPFLAGS += -I$(srcdir)/plugins/support
|
||||
|
||||
plugins_sources += \
|
||||
plugins/support/moocmdview.h \
|
||||
plugins/support/moocmdview.c \
|
||||
plugins/support/mooeditwindowoutput.h \
|
||||
plugins/support/mooeditwindowoutput.c
|
@ -13,7 +13,7 @@
|
||||
* License along with medit. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "mooedit/moocmdview.h"
|
||||
#include "moocmdview.h"
|
||||
#include "mooedit/mooeditwindow.h"
|
||||
#include "marshals.h"
|
||||
#include "mooutils/moospawn.h"
|
65
moo/plugins/support/mooeditwindowoutput.c
Normal file
65
moo/plugins/support/mooeditwindowoutput.c
Normal file
@ -0,0 +1,65 @@
|
||||
#include "mooeditwindowoutput.h"
|
||||
#include "moocmdview.h"
|
||||
#include "mooutils/moostock.h"
|
||||
|
||||
GtkWidget *
|
||||
moo_edit_window_get_output (MooEditWindow *window)
|
||||
{
|
||||
MooPaneLabel *label;
|
||||
GtkWidget *cmd_view;
|
||||
GtkWidget *scrolled_window;
|
||||
|
||||
g_return_val_if_fail (MOO_IS_EDIT_WINDOW (window), NULL);
|
||||
|
||||
scrolled_window = moo_edit_window_get_pane (window, "moo-edit-window-output");
|
||||
|
||||
if (!scrolled_window)
|
||||
{
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
GTK_SHADOW_ETCHED_IN);
|
||||
|
||||
cmd_view = moo_cmd_view_new ();
|
||||
moo_text_view_set_font_from_string (MOO_TEXT_VIEW (cmd_view), "Monospace");
|
||||
gtk_container_add (GTK_CONTAINER (scrolled_window), cmd_view);
|
||||
gtk_widget_show_all (scrolled_window);
|
||||
g_object_set_data (G_OBJECT (scrolled_window), "moo-output", cmd_view);
|
||||
|
||||
label = moo_pane_label_new (MOO_STOCK_TERMINAL, NULL, "Output", "Output");
|
||||
|
||||
if (!moo_edit_window_add_pane (window, "moo-edit-window-output",
|
||||
scrolled_window, label, MOO_PANE_POS_BOTTOM))
|
||||
{
|
||||
g_critical ("%s: oops", G_STRLOC);
|
||||
moo_pane_label_free (label);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
moo_edit_window_add_stop_client (window, cmd_view);
|
||||
|
||||
moo_pane_label_free (label);
|
||||
return cmd_view;
|
||||
}
|
||||
|
||||
return g_object_get_data (G_OBJECT (scrolled_window), "moo-output");
|
||||
}
|
||||
|
||||
|
||||
GtkWidget *
|
||||
moo_edit_window_get_output_pane (MooEditWindow *window)
|
||||
{
|
||||
g_return_val_if_fail (MOO_IS_EDIT_WINDOW (window), NULL);
|
||||
return moo_edit_window_get_pane (window, "moo-edit-window-output");
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
moo_edit_window_present_output (MooEditWindow *window)
|
||||
{
|
||||
g_return_if_fail (MOO_IS_EDIT_WINDOW (window));
|
||||
moo_edit_window_get_output (window);
|
||||
moo_big_paned_present_pane (window->paned,
|
||||
moo_edit_window_get_output_pane (window));
|
||||
}
|
14
moo/plugins/support/mooeditwindowoutput.h
Normal file
14
moo/plugins/support/mooeditwindowoutput.h
Normal file
@ -0,0 +1,14 @@
|
||||
#ifndef MOO_EDIT_WINDOW_OUTPUT_H
|
||||
#define MOO_EDIT_WINDOW_OUTPUT_H
|
||||
|
||||
#include <mooedit/mooeditwindow.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
void moo_edit_window_present_output (MooEditWindow *window);
|
||||
GtkWidget *moo_edit_window_get_output (MooEditWindow *window);
|
||||
GtkWidget *moo_edit_window_get_output_pane (MooEditWindow *window);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* MOO_EDIT_WINDOW_OUTPUT_H */
|
@ -18,7 +18,8 @@
|
||||
#endif
|
||||
#include "moocommand-exe.h"
|
||||
#include "mooedit/mooeditor.h"
|
||||
#include "mooedit/moocmdview.h"
|
||||
#include "moocmdview.h"
|
||||
#include "mooeditwindowoutput.h"
|
||||
#include "mooutils/mooi18n.h"
|
||||
#include "mooutils/mooutils-fs.h"
|
||||
#include "mooutils/mooutils-misc.h"
|
||||
|
@ -16,7 +16,7 @@
|
||||
#define MOOEDIT_COMPILATION
|
||||
#include "moooutputfilterregex.h"
|
||||
#include "moocommand.h"
|
||||
#include "mooedit/moocmdview.h"
|
||||
#include "moocmdview.h"
|
||||
#include "mooedit/mooeditprefs.h"
|
||||
#include "mooedit/moolangmgr.h"
|
||||
#include "mooutils/mooutils-gobject.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user