[EGIT] [core/efl] efl-1.15 01/01: Evas textblock: fix case of own_closer in style_set

2015-08-30 Thread Daniel Hirt
herdsman pushed a commit to branch efl-1.15.

http://git.enlightenment.org/core/efl.git/commit/?id=6521c4128c9ec7015333e0c81487902e0ca7b4db

commit 6521c4128c9ec7015333e0c81487902e0ca7b4db
Author: Daniel Hirt daniel.h...@samsung.com
Date:   Thu Aug 27 18:20:47 2015 +0300

Evas textblock: fix case of own_closer in style_set

Looks like it was assumed that an fnode-orig_format always ends with a
'/' character if the fnode is an own_closer.
The problem is that a paragraph separator (ps and br - the latter in
legacy newline mode) is also an own_closer, but might not have '/' at the
end, so decrementing the length is wrong.

This fixes T2654. The example markup had br read as b, which led to
a mismatch with the font_weight=Bold tag. Coincidentally, ps was not
affected as there was no matching p in the style.

@fix
---
 src/lib/evas/canvas/evas_object_textblock.c | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index d992cd6..ce419c2 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -6168,8 +6168,11 @@ _textblock_style_generic_set(Evas_Object *eo_obj, 
Evas_Textblock_Style *ts,
 size_t format_len = eina_stringshare_strlen(fnode-orig_format);
 /* Is this safe to use alloca here? Strings might possibly get large */
 
-if (fnode-own_closer)
-  format_len--;
+if (fnode-own_closer 
+   (format_len  0)  (fnode-orig_format[format_len - 1] == '/'))
+  {
+ format_len--;
+  }
 
 match = _textblock_format_node_from_style_tag(o, fnode, 
fnode-orig_format,
   format_len);

-- 




[EGIT] [enlightenment/modules/edgar] master 01/01: Add a new Dropbox gadget

2015-08-30 Thread Dave Andreoli
davemds pushed a commit to branch master.

http://git.enlightenment.org/enlightenment/modules/edgar.git/commit/?id=fb1afc286b81d4a60580aed566258f4c555aeb62

commit fb1afc286b81d4a60580aed566258f4c555aeb62
Author: Dave Andreoli d...@gurumeditation.it
Date:   Sun Aug 30 13:56:03 2015 +0200

Add a new Dropbox gadget

It show the dropbox status and enable to start/stop the daemon
---
 GADGETS/dropbox/Makefile |  36 
 GADGETS/dropbox/__init__.py  | 252 +++
 GADGETS/dropbox/docs/dropboxd-protocol   |  97 +++
 GADGETS/dropbox/dropbox.edc  |  98 +++
 GADGETS/dropbox/images/dropbox.png   | Bin 0 - 8219 bytes
 GADGETS/dropbox/images/dropbox_gray.png  | Bin 0 - 8463 bytes
 GADGETS/dropbox/images/emblem-syncing.png| Bin 0 - 6708 bytes
 GADGETS/dropbox/images/emblem-unsyncable.png | Bin 0 - 3584 bytes
 GADGETS/dropbox/images/emblem-uptodate.png   | Bin 0 - 4358 bytes
 9 files changed, 483 insertions(+)

diff --git a/GADGETS/dropbox/Makefile b/GADGETS/dropbox/Makefile
new file mode 100644
index 000..50b1f27
--- /dev/null
+++ b/GADGETS/dropbox/Makefile
@@ -0,0 +1,36 @@
+# Simple Makefile for Enlightenment (edgar) gadgets
+
+# gadget specific config
+GADGET_NAME = dropbox
+EXTRA_FILES = 
+
+
+# nothing  should be changed below this point
+GADGET_FILES = __init__.pyc $(GADGET_NAME).edj
+prefix = $(shell pkg-config --variable=libdir enlightenment)
+gadget_folder = ${prefix}/enlightenment/gadgets/$(GADGET_NAME)
+
+.PHONY: all install clean
+
+all: $(GADGET_FILES) $(EXTRA_FILES)
+
+install: all
+   @mkdir -p -v ${gadget_folder}
+   @cp --preserve=mode -v $(GADGET_FILES) $(EXTRA_FILES) $(gadget_folder)
+
+uninstall: all
+   @rm -rfv ${gadget_folder}
+
+clean:
+   @rm -fv *.edj *.pyc
+
+
+EDJE_CC = edje_cc
+EDJE_FLAGS = -v -id images/ -fd fonts/
+
+%.edj: %.edc images/*
+   $(EDJE_CC) $(EDJE_FLAGS) $
+   @chmod -v og+r $@
+
+%.pyc: %.py
+   python3 -c from py_compile import compile; compile('$', '$@')
diff --git a/GADGETS/dropbox/__init__.py b/GADGETS/dropbox/__init__.py
new file mode 100644
index 000..fdfb415
--- /dev/null
+++ b/GADGETS/dropbox/__init__.py
@@ -0,0 +1,252 @@
+# This python file use the following encoding: utf-8
+
+import os
+import sys
+import socket
+
+import e
+
+from efl import ecore
+from efl import evas
+from efl import edje
+from efl.elementary.label import Label
+from efl.elementary.entry import utf8_to_markup
+from efl.elementary.button import Button
+
+
+__gadget_name__ = 'Dropbox'
+__gadget_vers__ = '0.1'
+__gadget_auth__ = 'DaveMDS'
+__gadget_mail__ = 'd...@gurumeditation.it'
+__gadget_desc__ = 'Dropbox info gadget.'
+__gadget_vapi__ = 1
+__gadget_opts__ = { 'popup_on_desktop': False }
+
+
+#def DBG(msg):
+#print(DB:  + msg)
+#sys.stdout.flush()
+
+
+class Gadget(e.Gadget):
+
+def __init__(self):
+super().__init__()
+self.db = Dropbox(self.db_status_changed_cb)
+
+def instance_created(self, obj, site):
+super().instance_created(obj, site)
+obj.size_hint_aspect = evas.EVAS_ASPECT_CONTROL_BOTH , 16, 16
+
+def instance_destroyed(self, obj):
+super().instance_destroyed(obj)
+
+def popup_created(self, popup):
+super().popup_created(popup)
+
+popup.data['lb'] = Label(popup)
+popup.part_box_append('popup.box', popup.data['lb'])
+popup.data['lb'].show()
+
+popup.data['bt'] = Button(popup)
+popup.data['bt'].callback_clicked_add(self.start_stop_clicked_cb)
+popup.part_box_append('popup.box', popup.data['bt'])
+popup.data['bt'].show()
+
+self.popup_update(popup)
+
+def popup_destroyed(self, popup):
+super().popup_destroyed(popup)
+
+def db_status_changed_cb(self):
+for icon in self._instances:
+if self.db.is_running:
+icon.signal_emit('daemon,running', '')
+icon.signal_emit('state,'+self.db.status, '')
+else:
+icon.signal_emit('daemon,not_running', '')
+icon.signal_emit('state,unwatched', '')
+
+for popup in self._popups:
+self.popup_update(popup)
+
+def popup_update(self, popup):
+if self.db.is_running:
+popup.data['lb'].text = utf8_to_markup(self.db.status_msg)
+popup.data['bt'].text = 'Stop Dropbox'
+popup.data['bt'].disabled = False
+elif self.db.is_installed:
+popup.data['lb'].text = Dropbox isn't running!
+popup.data['bt'].text = 'Start Dropbox'
+popup.data['bt'].disabled = False
+else:
+popup.data['lb'].text = Dropbox isn't installed!
+popup.data['bt'].text = 'Install Dropbox'
+popup.data['bt'].disabled = True
+
+# force the popup to recalculate it's size
+popup.size_hint_min = popup.size_min
+
+def start_stop_clicked_cb(self, 

[EGIT] [enlightenment/modules/edgar] master 01/01: Update readme

2015-08-30 Thread Dave Andreoli
davemds pushed a commit to branch master.

http://git.enlightenment.org/enlightenment/modules/edgar.git/commit/?id=c1f84281993b79019ffbb705ff6f548193869e56

commit c1f84281993b79019ffbb705ff6f548193869e56
Author: Dave Andreoli d...@gurumeditation.it
Date:   Sun Aug 30 14:49:53 2015 +0200

Update readme
---
 README | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/README b/README
index 96a5903..9cf476d 100644
--- a/README
+++ b/README
@@ -48,7 +48,14 @@ Usage tips:
   * middle-click on the speaker or any slider to toggle mute.
 
 
-The led-clock gadget
+The Dropbox gadget
+==
+
+A simple gadget that show the dropbox daemon status, it also have the ability
+to start/stop the daemon.
+
+
+The LedClock gadget
 
 
 Usage tips:

--