This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository exclaim.

View the commit online.

commit c6cecf9117d77c08f3b16f19deb5b2d90ccccb0a
Author: Nekobit <m...@ow.nekobit.net>
AuthorDate: Thu Sep 21 23:27:38 2023 -0400

    Hover menus, add timestamps and such
---
 .gitignore   |   1 +
 src/main.c   |  12 +++--
 src/status.c | 152 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 3 files changed, 156 insertions(+), 9 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..05469bc
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*.core
diff --git a/src/main.c b/src/main.c
index c51c49d..affe17f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -19,9 +19,13 @@ create_sidebar(Evas_Object* parent)
 	elm_toolbar_shrink_mode_set(sb, ELM_TOOLBAR_SHRINK_MENU);
 	
 	o = elm_toolbar_item_append(sb, "home", "Home", NULL, NULL);
-	elm_toolbar_item_priority_set(o, -100);
-	o = elm_toolbar_item_append(sb, "mail-unread", "Unread", NULL, NULL);
-	elm_toolbar_item_priority_set(o, 100);
+	elm_toolbar_item_priority_set(o, 0);
+	o = elm_toolbar_item_append(sb, "mail-unread", "Notifications", NULL, NULL);
+	elm_toolbar_item_priority_set(o, 1);
+	o = elm_toolbar_item_append(sb, "view-list-compact", "Lists", NULL, NULL);
+	elm_toolbar_item_priority_set(o, 1);
+	o = elm_toolbar_item_append(sb, "mail-send", "Direct", NULL, NULL);
+	elm_toolbar_item_priority_set(o, 1);
 	
 	return sb;
 }
@@ -69,7 +73,7 @@ elm_main(int argc, char** argv)
 					elm_box_pack_end(status_content, status);
 				}
 				Evas_Object* lol = E_SHOW(elm_label_add(status_content));
-				elm_object_text_set(lol, "sdfjkfhjkahgkljsghklfjghdsjkghsdf");
+				elm_object_text_set(lol, "¯\\_(ツ)_/¯");
 				elm_box_pack_end(status_content, lol);
 			E_END(status_content);
 
diff --git a/src/status.c b/src/status.c
index c5d9c81..9563766 100644
--- a/src/status.c
+++ b/src/status.c
@@ -5,6 +5,14 @@
 #define PFP_ICON_SIZE 48
 #define INTERACT_ICON_SIZE 18
 
+static void
+hover_btn_show(void* data, Evas_Object* obj EINA_UNUSED, void* ev_info EINA_UNUSED)
+{
+	Evas_Object* hover = data;
+	
+	evas_object_show(hover);
+}
+
 Evas_Object*
 exc_status_add(Evas_Object* parent, struct exc_status status)
 {
@@ -14,7 +22,7 @@ exc_status_add(Evas_Object* parent, struct exc_status status)
 		Evas_Object* root_evas = evas_object_rectangle_add(evas_object_evas_get(parent));
 		E_BEGIN(root_evas);
 			evas_object_size_hint_weight_set(root_evas, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-			evas_object_size_hint_min_set(root_evas, 400, 10);
+			evas_object_size_hint_min_set(root_evas, 440, 10);
 			elm_table_pack(root, root_evas, 0, 0, 1, 1);
 		E_END(root_evas);
 	E_END(root); // Returned and packed into later
@@ -22,7 +30,7 @@ exc_status_add(Evas_Object* parent, struct exc_status status)
 	Evas_Object* st_frame = E_SHOW(elm_frame_add(parent));
 	E_BEGIN(st_frame);
 	elm_table_pack(root, st_frame, 0, 0, 1, 1); // Pad hack
-	evas_object_size_hint_padding_set(st_frame, 3, 3, 3, 3);
+	evas_object_size_hint_padding_set(st_frame, 3, 3, 3, 1);
 	evas_object_fullsize(st_frame);
 
 	Evas_Object* st_box = E_SHOW(elm_box_add(st_frame));
@@ -47,15 +55,24 @@ exc_status_add(Evas_Object* parent, struct exc_status status)
 			evas_object_fullsize(st_box_rt);
 			//evas_object_size_hint_align_set(st_box_rt, 0.0, 0.0);
 			
+			Evas_Object* st_box_rt_info_root = E_SHOW(elm_box_add(st_box_rt));
+			evas_object_fullsize(st_box_rt_info_root);
+			elm_box_horizontal_set(st_box_rt_info_root, EINA_TRUE);
+			
 			Evas_Object* st_box_rt_info = E_SHOW(elm_box_add(st_box_rt));
 			E_BEGIN(st_box_rt_info);
+				evas_object_fullsize(st_box_rt_info);
 				evas_object_size_hint_align_set(st_box_rt_info, 0.0, 0.0);
 				elm_box_horizontal_set(st_box_rt_info, EINA_TRUE);
 				evas_object_size_hint_padding_set(st_box_rt_info, 4,4,2,4);
 				
 				Evas_Object* st_username = E_SHOW(elm_label_add(st_box));
 				E_BEGIN(st_username);
-					elm_object_text_set(st_username, "Average poster");
+					Eina_Strbuf* userstr = eina_strbuf_new();
+					eina_strbuf_append_printf(userstr, "<b>%s</b>",
+					                          "Average poster");
+					elm_object_text_set(st_username, eina_strbuf_string_get(userstr));
+					free(eina_strbuf_release(userstr));
 					
 					elm_box_pack_end(st_box_rt_info, st_username);
 				E_END(st_username);
@@ -72,9 +89,44 @@ exc_status_add(Evas_Object* parent, struct exc_status status)
 					elm_box_pack_end(st_box_rt_info, st_acct);
 				E_END(st_acct);
 				
-				elm_box_pack_end(st_box_rt, st_box_rt_info);
+				o = E_SHOW(elm_icon_add(st_box));
+				E_BEGIN(o);
+					elm_icon_standard_set(o, "computer");
+					evas_object_size_hint_min_set(o, 16, 16);
+					evas_object_size_hint_padding_set(o, 6, 0, 0, 0);
+					elm_box_pack_end(st_box_rt_info, o);
+				E_END(o);
+				
+				elm_box_pack_end(st_box_rt_info_root, st_box_rt_info);
 			E_END(st_box_rt_info);
 			
+			Evas_Object* st_box_rt_info_rt = E_SHOW(elm_box_add(st_box_rt));
+			E_BEGIN(st_box_rt_info_rt);
+				//evas_object_fullsize(st_box_rt_info_rt);
+				evas_object_size_hint_align_set(st_box_rt_info_rt, 0.95, 0.0);
+				elm_box_horizontal_set(st_box_rt_info_rt, EINA_TRUE);
+				evas_object_size_hint_padding_set(st_box_rt_info_rt, 4,16,2,4);
+				
+				o = E_SHOW(elm_label_add(st_box));
+				E_BEGIN(o);
+					evas_object_fullsize(o);
+					elm_object_text_set(o, "3min");
+					evas_object_size_hint_align_set(o, 1.0, 0.0);
+					elm_box_pack_end(st_box_rt_info_rt, o);
+				E_END(o);
+				
+				o = E_SHOW(elm_icon_add(st_box));
+				E_BEGIN(o);
+					elm_icon_standard_set(o, "system-lock-screen");
+					evas_object_size_hint_min_set(o, 16, 16);
+					evas_object_size_hint_padding_set(o, 4, 0, 0, 0);
+					elm_box_pack_end(st_box_rt_info_rt, o);
+				E_END(o);
+				
+				elm_box_pack_end(st_box_rt_info_root, st_box_rt_info_rt);
+			E_END(st_box_rt_info_rt);
+			elm_box_pack_end(st_box_rt, st_box_rt_info_root);
+			
 			Evas_Object* st_content = E_SHOW(elm_entry_add(st_box));
 			E_BEGIN(st_content);
 				evas_object_fullsize(st_content);
@@ -85,9 +137,14 @@ exc_status_add(Evas_Object* parent, struct exc_status status)
 				elm_box_pack_end(st_box_rt, st_content);
 			E_END(st_content);
 			
+			Evas_Object* st_interact_root = E_SHOW(elm_box_add(st_box));
+			elm_box_horizontal_set(st_interact_root, EINA_TRUE);
+			evas_object_fullsize(st_interact_root);
+
 			Evas_Object* st_interact = E_SHOW(elm_box_add(st_box));
 			E_BEGIN(st_interact);
 				elm_box_horizontal_set(st_interact, EINA_TRUE);
+				evas_object_fullsize(st_interact);
 				evas_object_size_hint_align_set(st_interact, 0, 0);
 				
 				o = E_SHOW(elm_button_add(st_interact));
@@ -138,8 +195,93 @@ exc_status_add(Evas_Object* parent, struct exc_status status)
 					elm_box_pack_end(st_interact, o);
 				E_END(o)
 
-				elm_box_pack_end(st_box_rt, st_interact);
+				elm_box_pack_end(st_interact_root, st_interact);
 			E_END(st_interact);
+			
+			Evas_Object* st_interact_rt = E_SHOW(elm_box_add(st_box));
+			E_BEGIN(st_interact);
+				elm_box_horizontal_set(st_interact_rt, EINA_TRUE);
+				evas_object_fullsize(st_interact_rt);
+				evas_object_size_hint_align_set(st_interact_rt, 0.92, 0);
+				
+				o = E_SHOW(elm_button_add(st_interact_rt));
+				E_BEGIN(o) // Reply
+					Evas_Object* hover = elm_hover_add(st_interact_rt);
+					elm_object_style_set(o, "blank");
+					
+					ico = E_SHOW(elm_icon_add(st_interact_rt));
+					elm_icon_standard_set(ico, "list-remove");
+					evas_object_size_hint_min_set(ico, INTERACT_ICON_SIZE, INTERACT_ICON_SIZE);
+					elm_object_content_set(o, ico);
+					evas_object_smart_callback_add(o, "clicked", hover_btn_show, hover);
+					elm_box_pack_end(st_interact_rt, o);
+					// End button...
+					
+					// ...Start hover
+					Evas_Object* p, * q, *r;
+					elm_object_style_set(hover, "popout");
+					elm_hover_parent_set(hover, parent);
+					// CREATE
+					p = elm_button_add(st_interact_rt);
+					ico = elm_icon_add(st_interact_rt);
+					elm_icon_standard_set(ico, "list-remove");
+					evas_object_size_hint_min_set(ico, INTERACT_ICON_SIZE, INTERACT_ICON_SIZE);
+					elm_object_content_set(p, ico);
+					// END CREATE
+					elm_hover_target_set(hover, o);
+					elm_object_part_content_set(hover, "middle", p);
+					
+					p = elm_button_add(st_interact_rt);
+					q = E_SHOW(elm_icon_add(st_interact_rt));
+					//elm_icon_standard_set(q, "mail-mark-junk");
+					elm_icon_standard_set(q, "audio-volume-muted");
+					elm_object_text_set(p, "Mute");
+					elm_object_content_set(p, q);
+					elm_object_part_content_set(hover, "bottom", p);
+					
+					p = elm_button_add(st_interact_rt);
+					q = E_SHOW(elm_icon_add(st_interact_rt));
+					elm_icon_standard_set(q, "edit-delete");
+					elm_object_content_set(p, q);
+					elm_object_part_content_set(hover, "right", p);
+
+					p = elm_button_add(st_interact_rt);
+					q = E_SHOW(elm_icon_add(st_interact_rt));
+					elm_icon_standard_set(q, "user-bookmarks");
+					elm_object_content_set(p, q);
+					elm_object_part_content_set(hover, "left", p);
+					
+					p = elm_box_add(st_interact_rt);
+					q = E_SHOW(elm_button_add(st_interact_rt));
+					//elm_object_text_set(q, "Report");
+					r = E_SHOW(elm_icon_add(st_interact_rt));
+					elm_icon_standard_set(r, "emblem-important");
+					elm_object_content_set(q, r);
+					elm_box_pack_end(p, q);
+					q = E_SHOW(elm_button_add(st_interact_rt));
+					elm_object_text_set(q, "Pin");
+					elm_box_pack_end(p, q);
+					q = E_SHOW(elm_button_add(st_interact_rt));
+					//elm_object_text_set(q, "Copy Link");
+					r = E_SHOW(elm_icon_add(st_interact_rt));
+					elm_icon_standard_set(r, "emblem-shared");
+					elm_object_content_set(q, r);
+					elm_box_pack_end(p, q);
+					elm_object_part_content_set(hover, "top", p);
+					// BEGIN items
+					//elm_hoversel_item_add(o, "Mute Conversation", NULL, ELM_ICON_NONE, NULL, NULL);
+					//elm_hoversel_item_add(o, "Pin on Profile", NULL, ELM_ICON_NONE, NULL, NULL);
+					//elm_hoversel_item_add(o, "Bookmark", NULL, ELM_ICON_NONE, NULL, NULL);
+					//elm_hoversel_item_add(o, "Delete Status", NULL, ELM_ICON_NONE, NULL, NULL);
+					//elm_hoversel_item_add(o, "Copy link", NULL, ELM_ICON_NONE, NULL, NULL);
+					//elm_hoversel_item_add(o, "Report", NULL, ELM_ICON_NONE, NULL, NULL);
+					// END items
+				E_END(o)
+				
+				elm_box_pack_end(st_interact_root, st_interact_rt);
+			E_END(st_interact_rt);
+			
+			elm_box_pack_end(st_box_rt, st_interact_root);
 
 			elm_box_pack_end(st_box, st_box_rt);
 		E_BEGIN(st_box_rt);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to