From 4542644e81dceb94ec22fda8f2c7a0dcd6784853 Mon Sep 17 00:00:00 2001 From: ChunEon Park Date: Wed, 29 Jan 2014 22:28:02 +0900 Subject: [PATCH] implementing hotkey menu --- data/themes/default/layout.edc | 16 ++++++++++++++-- src/bin/Makefile.am | 9 +++++---- src/bin/main.c | 3 +++ src/include/Makefile.am | 3 ++- src/include/common.h | 1 + 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/data/themes/default/layout.edc b/data/themes/default/layout.edc index 8b8c3bf..ca4f21d 100644 --- a/data/themes/default/layout.edc +++ b/data/themes/default/layout.edc @@ -261,12 +261,24 @@ group { name: "main_layout"; min: 640 440; } } + part { name: "elm.swallow.hotkeys"; + type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + rel1.relative: 0 0; + rel2.relative: 1 0; + min: 0 30; + fixed: 0 1; + align: 0.5 0; + } + } part { name: "elm.swallow.panes"; type: SWALLOW; scale: 1; - description { - rel1.relative: 0 0; + description { state: "default" 0.0; + rel1.relative: 0 1; rel2.relative: 1 0; + rel1.to_y: "elm.swallow.hotkeys"; rel2.to_y: "elm.swallow.statusbar"; } } diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am index 6d1a76c..33d4697 100644 --- a/src/bin/Makefile.am +++ b/src/bin/Makefile.am @@ -7,7 +7,7 @@ AM_CPPFLAGS = -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -I$(top_srcdir)/src/bin \ -I$(top_srcdir)/src/include \ - @ENVENTOR_CFLAGS@ + @ENVENTOR_CFLAGS@ enventor_SOURCES = \ config_data.c \ @@ -23,9 +23,10 @@ enventor_SOURCES = \ ctxpopup.c \ syntax_helper.c \ indent.c \ - edj_mgr.c \ - build.c \ - globals.c + edj_mgr.c \ + build.c \ + hotkeys.c \ + globals.c enventor_LDADD = @ENVENTOR_LIBS@ enventor_LDFLAGS = $(LTLIBINTL) diff --git a/src/bin/main.c b/src/bin/main.c index fdc11e1..859bee4 100644 --- a/src/bin/main.c +++ b/src/bin/main.c @@ -605,6 +605,9 @@ init(app_data *ad, int argc, char **argv) edc_view_set(ad, ad->cd, ad->sd, stats_group_name_get(ad->sd)); ad->md = menu_init(ad->win, ad->ed, ad->cd); + Evas_Object *hotkeys = hotkeys_create(ad->layout, ad->md); + elm_object_part_content_set(ad->layout, "elm.swallow.hotkeys", hotkeys); + ad->edc_monitor = eio_monitor_add(config_edc_path_get(ad->cd)); ecore_event_handler_add(EIO_MONITOR_FILE_MODIFIED, edc_changed_cb, ad); diff --git a/src/include/Makefile.am b/src/include/Makefile.am index b2cbf3c..7f79d22 100644 --- a/src/include/Makefile.am +++ b/src/include/Makefile.am @@ -16,4 +16,5 @@ EXTRA_DIST = common.h \ globals.h \ indent.h \ syntax_helper.h \ - template_code.h + template_code.h \ + hotkeys.h diff --git a/src/include/common.h b/src/include/common.h index d67f7f8..8e36c2e 100644 --- a/src/include/common.h +++ b/src/include/common.h @@ -30,5 +30,6 @@ typedef struct edj_mgr_s edj_mgr; #include "edj_mgr.h" #include "globals.h" #include "build.h" +#include "hotkeys.h" #endif