forked from enlightenment/ecrire
separate out ecore-x stuff for vtorri, also fix config.h inclusion
SVN revision: 66718
This commit is contained in:
parent
49df9d26e5
commit
fc4ea0c622
|
@ -53,9 +53,16 @@ PKG_CHECK_MODULES([EFL],
|
||||||
elementary >= 0.7.0
|
elementary >= 0.7.0
|
||||||
edje >= 1.1.0
|
edje >= 1.1.0
|
||||||
ecore >= 1.0.0
|
ecore >= 1.0.0
|
||||||
ecore-x >= 1.0.0
|
|
||||||
])
|
])
|
||||||
|
|
||||||
|
PKG_CHECK_MODULES([ECORE_X], [ecore-x >= 1.0.0],
|
||||||
|
[
|
||||||
|
AC_DEFINE(HAVE_ECORE_X, 1, [X11 support])
|
||||||
|
],
|
||||||
|
[]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
AC_OUTPUT([
|
AC_OUTPUT([
|
||||||
Makefile
|
Makefile
|
||||||
src/Makefile
|
src/Makefile
|
||||||
|
|
|
@ -5,7 +5,8 @@ AM_CPPFLAGS = \
|
||||||
-I$(top_srcdir)/src/lib \
|
-I$(top_srcdir)/src/lib \
|
||||||
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
|
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
|
||||||
-DLOCALE_DIR=\"$(datadir)/locale\" \
|
-DLOCALE_DIR=\"$(datadir)/locale\" \
|
||||||
@EFL_CFLAGS@
|
@EFL_CFLAGS@ \
|
||||||
|
@ECORE_X_CFLAGS@
|
||||||
|
|
||||||
bin_PROGRAMS = ecrire
|
bin_PROGRAMS = ecrire
|
||||||
|
|
||||||
|
@ -18,7 +19,7 @@ ecrire_SOURCES = \
|
||||||
ui/font_dialog.c \
|
ui/font_dialog.c \
|
||||||
ui/alerts.c
|
ui/alerts.c
|
||||||
|
|
||||||
ecrire_LDADD = @EFL_LIBS@ @LTLIBINTL@
|
ecrire_LDADD = @EFL_LIBS@ @ECORE_X_LIBS@ @LTLIBINTL@
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
mess_header.h \
|
mess_header.h \
|
||||||
|
|
|
@ -1,7 +1,13 @@
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <Elementary.h>
|
#include <Elementary.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <Ecore_X.h>
|
#ifdef HAVE_ECORE_X
|
||||||
|
# include <Ecore_X.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "mess_header.h"
|
#include "mess_header.h"
|
||||||
#include "cfg.h"
|
#include "cfg.h"
|
||||||
|
@ -530,6 +536,7 @@ editor_font_choose(Evas_Object *ent, const char *font, int size)
|
||||||
ecrire_cfg_save();
|
ecrire_cfg_save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_ECORE_X
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_selection_notify(void *data __UNUSED__, int type __UNUSED__, void *_event)
|
_selection_notify(void *data __UNUSED__, int type __UNUSED__, void *_event)
|
||||||
{
|
{
|
||||||
|
@ -547,6 +554,7 @@ _selection_notify(void *data __UNUSED__, int type __UNUSED__, void *_event)
|
||||||
|
|
||||||
return ECORE_CALLBACK_PASS_ON;
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
|
@ -672,6 +680,7 @@ main(int argc, char *argv[])
|
||||||
elm_toolbar_item_append(tbar, "preferences-system", _("Settings"),
|
elm_toolbar_item_append(tbar, "preferences-system", _("Settings"),
|
||||||
_font_settings, entry);
|
_font_settings, entry);
|
||||||
|
|
||||||
|
#ifdef HAVE_ECORE_X
|
||||||
if (!ecore_x_selection_owner_get(ECORE_X_ATOM_SELECTION_CLIPBOARD))
|
if (!ecore_x_selection_owner_get(ECORE_X_ATOM_SELECTION_CLIPBOARD))
|
||||||
{
|
{
|
||||||
elm_object_item_disabled_set(paste_item, EINA_TRUE);
|
elm_object_item_disabled_set(paste_item, EINA_TRUE);
|
||||||
|
@ -680,6 +689,7 @@ main(int argc, char *argv[])
|
||||||
ecore_x_fixes_selection_notification_request(ECORE_X_ATOM_SELECTION_CLIPBOARD);
|
ecore_x_fixes_selection_notification_request(ECORE_X_ATOM_SELECTION_CLIPBOARD);
|
||||||
ecore_event_handler_add(ECORE_X_EVENT_FIXES_SELECTION_NOTIFY,
|
ecore_event_handler_add(ECORE_X_EVENT_FIXES_SELECTION_NOTIFY,
|
||||||
_selection_notify, NULL);
|
_selection_notify, NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* We don't have a selection when we start, make the items disabled */
|
/* We don't have a selection when we start, make the items disabled */
|
||||||
elm_object_item_disabled_set(copy_item, EINA_TRUE);
|
elm_object_item_disabled_set(copy_item, EINA_TRUE);
|
||||||
|
|
Loading…
Reference in New Issue