Made it compile on mingw

This commit is contained in:
Yevgen Muntyan 2005-07-31 06:20:59 +00:00
parent 0b11c486f5
commit fad14d8e5a
11 changed files with 47 additions and 28 deletions

View File

@ -34,10 +34,10 @@ fi
export ADDR2LINE="/usr/bin/i586-mingw32msvc-addr2line"
export AR="/usr/bin/i586-mingw32msvc-ar"
export AS="/usr/bin/i586-mingw32msvc-as"
export CC="/usr/bin/i586-mingw32msvc-gcc"
export CC="/usr/bin/i586-mingw32msvc-gcc -mms-bitfields -march=i686"
export CXX="/usr/bin/i586-mingw32msvc-g++ -mms-bitfields -march=i686"
export CPP="/usr/bin/i586-mingw32msvc-cpp"
export CPPFILT="/usr/bin/i586-mingw32msvc-c++filt"
export CXX="/usr/bin/i586-mingw32msvc-g++"
export DLLTOOL="/usr/bin/i586-mingw32msvc-dlltool"
export DLLWRAP="/usr/bin/i586-mingw32msvc-dllwrap"
export GCOV="/usr/bin/i586-mingw32msvc-gcov"
@ -52,15 +52,9 @@ export STRINGS="/usr/bin/i586-mingw32msvc-strings"
export STRIP="/usr/bin/i586-mingw32msvc-strip"
export WINDRES="/usr/bin/i586-mingw32msvc-windres"
if [ ! $CFLAGS ]; then
export CFLAGS="-O3 -g0 -mms-bitfields -march=i686 -I$GTK_PREFIX/include"
fi
if [ ! $CXXFLAGS ]; then
export CXXFLAGS="-O3 -g0 -mms-bitfields -march=i686 -I$GTK_PREFIX/include"
fi
if [ ! $LDFLAGS ]; then
export LDFLAGS="-L$GTK_PREFIX/lib"
fi
export CFLAGS="-O3 -g0 -I$GTK_PREFIX/include"
export CXXFLAGS="-O3 -g0 -I$GTK_PREFIX/include"
export LDFLAGS="$LDFLAGS -L$GTK_PREFIX/lib"
export PATH=$MINGW_BIN:/usr/i586-mingw32msvc/bin:$PATH

View File

@ -5,6 +5,9 @@ headers
#include "pygobject.h"
#include "mooapp/mooapp.h"
#include "mooapp/mooapp-python.h"
void moo_app_add_constants (PyObject *module, const gchar *strip_prefix);
void moo_app_register_classes (PyObject *d);
%%
modulename moo
%%

View File

@ -12,6 +12,9 @@ headers
#include "mooedit/mooeditsearch.h"
#include "mooedit/mooeditprefs.h"
#include "mooedit/mootextiter.h"
void moo_edit_add_constants (PyObject *module, const gchar *strip_prefix);
void moo_edit_register_classes (PyObject *d);
%%
modulename moo
%%

View File

@ -9,6 +9,8 @@ headers
#include "mooui/mootoggleaction.h"
#include "mooui/moowindow.h"
#include "mooui/mooshortcutsprefs.h"
void moo_ui_register_classes (PyObject *d);
%%
modulename moo
%%

View File

@ -101,6 +101,9 @@ gboolean moo_term_fork_argv (MooTerm *term,
gboolean moo_term_child_alive (MooTerm *term);
void moo_term_kill_child (MooTerm *term);
/* makes sense only for win32 */
void moo_term_set_helper_directory (const char *dir);
void moo_term_feed (MooTerm *term,
const char *data,
int len);

View File

@ -1189,46 +1189,32 @@ char *_moo_term_nice_char (guchar c)
return g_strdup ("<ESC>");
case 0x84:
return g_strdup ("<IND>");
break;
case 0x85:
return g_strdup ("<NEL>");
break;
case 0x88:
return g_strdup ("<HTS>");
break;
case 0x8D:
return g_strdup ("<RI>");
break;
case 0x8E:
return g_strdup ("<SS2>");
break;
case 0x8F:
return g_strdup ("<SS3>");
break;
case 0x90:
return g_strdup ("<DCS>");
break;
case 0x98:
return g_strdup ("<SOS>");
break;
case 0x9A:
return g_strdup ("<DECID>");
break;
case 0x9B:
return g_strdup ("<CSI>");
break;
case 0x9C:
return g_strdup ("<ST>");
break;
case 0x9D:
return g_strdup ("<OSC>");
break;
case 0x9E:
return g_strdup ("<PM>");
break;
case 0x9F:
return g_strdup ("<APC>");
break;
default:
if ('A' - 64 <= c && c <= ']' - 64)
return g_strdup_printf ("^%c", c + 64);

View File

@ -684,3 +684,10 @@ const char *get_default_shell (G_GNUC_UNUSED MooTermPt *pt)
return shell;
}
/* it's a win32 function */
void moo_term_set_helper_directory (G_GNUC_UNUSED const char *dir)
{
g_return_if_reached ();
}

View File

@ -14,3 +14,23 @@
#include "mooterm/mootermpt.h"
void moo_term_pt_send_intr (MooTermPt *pt)
{
}
char moo_term_pt_get_erase_char (MooTermPt *pt_gen)
{
return 127;
}
GType moo_term_pt_win_get_type (void)
{
return 0;
}
void moo_term_set_helper_directory (G_GNUC_UNUSED const char *dir)
{
}

View File

@ -75,7 +75,9 @@ MooTermPt *moo_term_pt_new (struct _MooTerm *term);
void moo_term_pt_set_size (MooTermPt *pt,
guint width,
guint height);
void moo_term_pt_set_helper_directory
(MooTermPt *pt,
const char *dir);
char moo_term_pt_get_erase_char (MooTermPt *pt);
void moo_term_pt_send_intr (MooTermPt *pt);

View File

@ -432,7 +432,6 @@ static void moo_window_set_property (GObject *object,
const char *name = NULL;
MooWindow *window = MOO_WINDOW (object);
MooUIObject *ui_obj = MOO_UI_OBJECT (object);
MooUIXML *xml;
switch (prop_id)
{

View File

@ -379,7 +379,7 @@ static void prefs_new_key (MooPrefs *prefs,
item_set_type (item, type);
if (default_value)
item_set_default (item, default_value);
if (!item_value && item_default_value (item))
if (!item_value (item) && item_default_value (item))
item_set (item, item_default_value (item));
emit_notify (prefs, key, item_value (item));
}