diff --git a/Makefile b/Makefile index 38ba376..5e780ac 100755 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ uninstall: @$(MAKE_M) $(LIBMX_DIR) $@ @$(MAKE_M) $(LIBCJSON_DIR) $@ @$(MAKE_M) $(LIBSQLITE_DIR) $@ - rm database.db + @rm database.db reinstall: uninstall all diff --git a/client/data/chat-background/dark/dratini.png b/client/data/chat-background/dark/dratini.png old mode 100755 new mode 100644 index a096c43..1db35f8 Binary files a/client/data/chat-background/dark/dratini.png and b/client/data/chat-background/dark/dratini.png differ diff --git a/client/data/chat-background/dark/pikachu.png b/client/data/chat-background/dark/pikachu.png old mode 100755 new mode 100644 index 4be4b9e..9715800 Binary files a/client/data/chat-background/dark/pikachu.png and b/client/data/chat-background/dark/pikachu.png differ diff --git a/client/data/chat-background/default/magikarp.png b/client/data/chat-background/default/magikarp.png old mode 100755 new mode 100644 index 8a5a182..6da0950 Binary files a/client/data/chat-background/default/magikarp.png and b/client/data/chat-background/default/magikarp.png differ diff --git a/client/data/chat-background/default/pokeball.png b/client/data/chat-background/default/pokeball.png old mode 100755 new mode 100644 index b63f283..abaa8b6 Binary files a/client/data/chat-background/default/pokeball.png and b/client/data/chat-background/default/pokeball.png differ diff --git a/client/data/chat-background/light/lapras.png b/client/data/chat-background/light/lapras.png old mode 100755 new mode 100644 index d01c5f5..5f98990 Binary files a/client/data/chat-background/light/lapras.png and b/client/data/chat-background/light/lapras.png differ diff --git a/client/data/chat-background/light/magnemite.png b/client/data/chat-background/light/magnemite.png old mode 100755 new mode 100644 index 6007d3f..801737a Binary files a/client/data/chat-background/light/magnemite.png and b/client/data/chat-background/light/magnemite.png differ diff --git a/client/data/css/chat_bg/chatbg2.css b/client/data/css/chat_bg/chatbg2.css index fda3383..30d213b 100644 --- a/client/data/css/chat_bg/chatbg2.css +++ b/client/data/css/chat_bg/chatbg2.css @@ -1,10 +1,11 @@ #scrollable_msg { - background-color: #273255; + background-color: #1c2e55; background-image: url("../../chat-background/default/pikachu.png"); background-size: 100%; + background-repeat: no-repeat; } #messanger { - background-color: #273255; + background-color: #1c2e55; } diff --git a/client/data/css/chat_bg/chatbg3.css b/client/data/css/chat_bg/chatbg3.css index 885e4b1..ad79b16 100644 --- a/client/data/css/chat_bg/chatbg3.css +++ b/client/data/css/chat_bg/chatbg3.css @@ -1,10 +1,11 @@ #scrollable_msg { - background-color: #1e2442; + background-color: #142042; background-image: url("../../chat-background/default/pokeball.png"); background-size: 100%; + background-repeat: no-repeat; } #messanger { - background-color: #1e2442; + background-color: #142042; } \ No newline at end of file diff --git a/client/data/css/chat_bg/chatbg4.css b/client/data/css/chat_bg/chatbg4.css index c20245f..5d7208d 100644 --- a/client/data/css/chat_bg/chatbg4.css +++ b/client/data/css/chat_bg/chatbg4.css @@ -1,10 +1,11 @@ #scrollable_msg { - background-color: #538dcb; + background-color: #178fce; background-image: url("../../chat-background/default/magikarp.png"); background-size: 100%; + background-repeat: no-repeat; } #messanger { - background-color: #538dcb; + background-color: #178fce; } \ No newline at end of file diff --git a/client/data/css/chat_bg_dark/chatbg2.css b/client/data/css/chat_bg_dark/chatbg2.css index 1cdd59a..79979f0 100644 --- a/client/data/css/chat_bg_dark/chatbg2.css +++ b/client/data/css/chat_bg_dark/chatbg2.css @@ -1,10 +1,11 @@ #scrollable_msg { - background-color: #141414; + background-color: #0c0c0c; background-image: url("../../chat-background/dark/umbreon.png"); background-size: 100%; + background-repeat: no-repeat; } #messanger { - background-color: #141414; + background-color: #0c0c0c; } diff --git a/client/data/css/chat_bg_dark/chatbg3.css b/client/data/css/chat_bg_dark/chatbg3.css index 68facd0..1bdebfc 100644 --- a/client/data/css/chat_bg_dark/chatbg3.css +++ b/client/data/css/chat_bg_dark/chatbg3.css @@ -1,10 +1,11 @@ #scrollable_msg { - background-color: #2b2b2b; + background-color: #272727; background-image: url("../../chat-background/dark/dratini.png"); background-size: 100%; + background-repeat: no-repeat; } #messanger { - background-color: #2b2b2b; + background-color: #272727; } \ No newline at end of file diff --git a/client/data/css/chat_bg_dark/chatbg4.css b/client/data/css/chat_bg_dark/chatbg4.css index 7695c25..42458c3 100644 --- a/client/data/css/chat_bg_dark/chatbg4.css +++ b/client/data/css/chat_bg_dark/chatbg4.css @@ -1,10 +1,11 @@ #scrollable_msg { - background-color: #272525; + background-color: #231f20; background-image: url("../../chat-background/dark/pikachu.png"); background-size: 100%; + background-repeat: no-repeat; } #messanger { - background-color: #272525; + background-color: #231f20; } \ No newline at end of file diff --git a/client/data/css/chat_bg_light/chatbg2.css b/client/data/css/chat_bg_light/chatbg2.css index da25c99..eefa561 100644 --- a/client/data/css/chat_bg_light/chatbg2.css +++ b/client/data/css/chat_bg_light/chatbg2.css @@ -1,10 +1,11 @@ #scrollable_msg { - background-color: #ddf0f6; + background-color: #d6f0f7; background-image: url("../../chat-background/light/lapras.png"); background-size: 100%; + background-repeat: no-repeat; } #messanger { - background-color: #ddf0f6; + background-color: #d6f0f7; } diff --git a/client/data/css/chat_bg_light/chatbg3.css b/client/data/css/chat_bg_light/chatbg3.css index de24bcd..3e4403a 100644 --- a/client/data/css/chat_bg_light/chatbg3.css +++ b/client/data/css/chat_bg_light/chatbg3.css @@ -1,10 +1,11 @@ #scrollable_msg { - background-color: #d7eff9; + background-color: #ceeffa; background-image: url("../../chat-background/light/starter.png"); background-size: 100%; + background-repeat: no-repeat; } #messanger { - background-color: #d7eff9; + background-color: #ceeffa; } \ No newline at end of file diff --git a/client/data/css/chat_bg_light/chatbg4.css b/client/data/css/chat_bg_light/chatbg4.css index 4bd22a4..69b5c01 100644 --- a/client/data/css/chat_bg_light/chatbg4.css +++ b/client/data/css/chat_bg_light/chatbg4.css @@ -1,10 +1,11 @@ #scrollable_msg { - background-color: #86bff4; + background-color: #64c0f6; background-image: url("../../chat-background/light/magnemite.png"); background-size: 100%; + background-repeat: no-repeat; } #messanger { - background-color: #86bff4; + background-color: #64c0f6; } \ No newline at end of file diff --git a/client/data/css/home_screen.css b/client/data/css/home_screen.css index 9145cf1..0cb6e62 100644 --- a/client/data/css/home_screen.css +++ b/client/data/css/home_screen.css @@ -62,7 +62,7 @@ border-radius: 13px; background-size: 100%; transition: 0.1s cubic-bezier(0.18,0.62,0.71,0.5); - opacity: 1; + opacity: 0.3; } #togroup_inner { @@ -98,6 +98,7 @@ #active { border-radius: 10px; + padding: 4px; transition: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94); } #active:hover diff --git a/client/data/css/msg_screen.css b/client/data/css/msg_screen.css index 10cbd43..540237f 100644 --- a/client/data/css/msg_screen.css +++ b/client/data/css/msg_screen.css @@ -16,7 +16,7 @@ #adduser { background-repeat: no-repeat; - background-size: 22px; + background-size: 100%; } #dm_text { diff --git a/client/data/css/themes/dark/msg_dark.css b/client/data/css/themes/dark/msg_dark.css index aea77df..84c4666 100644 --- a/client/data/css/themes/dark/msg_dark.css +++ b/client/data/css/themes/dark/msg_dark.css @@ -118,12 +118,12 @@ { background-image: url("../../../images/create-group-dark.png"); background-size: 100%; - background-color: #353535; - box-shadow: inset 0 0 0 1.5px rgba(240, 240, 240, 0); + background-color: #202020; } #msggroup:hover { - box-shadow: inset 0 0 0 2.5px #f0f0f0; + background-image: url("../../../images/create-group-dark-hover.png"); + background-color: #e6e6e9; } #crgroup_box { diff --git a/client/data/css/themes/default/msg_default.css b/client/data/css/themes/default/msg_default.css index d96a2c6..0445868 100644 --- a/client/data/css/themes/default/msg_default.css +++ b/client/data/css/themes/default/msg_default.css @@ -123,11 +123,11 @@ background-image: url("../../../images/create-group.png"); background-size: 100%; background-color: #18254e; - box-shadow: inset 0 0 0 1.5px rgba(69, 100, 167, 0); } #msggroup:hover { - box-shadow: inset 0 0 0 2.5px #4564a7; + background-image: url("../../../images/create-group-hover.png"); + background-color: #c1ceee; } #crgroup_box { diff --git a/client/data/css/themes/light/msg_light.css b/client/data/css/themes/light/msg_light.css index 080419a..39f0b0a 100644 --- a/client/data/css/themes/light/msg_light.css +++ b/client/data/css/themes/light/msg_light.css @@ -119,11 +119,11 @@ background-image: url("../../../images/create-group-light.png"); background-size: 100%; background-color: #ebebeb; - box-shadow: inset 0 0 0 1.5px rgba(52, 55, 64, 0); } #msggroup:hover { - box-shadow: inset 0 0 0 2.5px #343740; + background-image: url("../../../images/create-group-light-hover.png"); + background-color: #343740; } #crgroup_box { diff --git a/client/data/images/add-user-dark.png b/client/data/images/add-user-dark.png index db90d13..f1ac04f 100644 Binary files a/client/data/images/add-user-dark.png and b/client/data/images/add-user-dark.png differ diff --git a/client/data/images/add-user-hover-dark.png b/client/data/images/add-user-hover-dark.png index 5a2375b..fda32b1 100644 Binary files a/client/data/images/add-user-hover-dark.png and b/client/data/images/add-user-hover-dark.png differ diff --git a/client/data/images/add-user-hover-light.png b/client/data/images/add-user-hover-light.png index a1e1f86..cfb9b97 100644 Binary files a/client/data/images/add-user-hover-light.png and b/client/data/images/add-user-hover-light.png differ diff --git a/client/data/images/add-user-hover.png b/client/data/images/add-user-hover.png index ce6699f..24af6f9 100644 Binary files a/client/data/images/add-user-hover.png and b/client/data/images/add-user-hover.png differ diff --git a/client/data/images/add-user-light.png b/client/data/images/add-user-light.png index 5a4441b..32d349c 100644 Binary files a/client/data/images/add-user-light.png and b/client/data/images/add-user-light.png differ diff --git a/client/data/images/add-user.png b/client/data/images/add-user.png index fd49c2a..4895e88 100644 Binary files a/client/data/images/add-user.png and b/client/data/images/add-user.png differ diff --git a/client/data/images/create-group-dark-hover.png b/client/data/images/create-group-dark-hover.png new file mode 100644 index 0000000..168f8b7 Binary files /dev/null and b/client/data/images/create-group-dark-hover.png differ diff --git a/client/data/images/create-group-dark.png b/client/data/images/create-group-dark.png index cf3fe91..b3ff020 100644 Binary files a/client/data/images/create-group-dark.png and b/client/data/images/create-group-dark.png differ diff --git a/client/data/images/create-group-hover.png b/client/data/images/create-group-hover.png new file mode 100644 index 0000000..f315328 Binary files /dev/null and b/client/data/images/create-group-hover.png differ diff --git a/client/data/images/create-group-light-hover.png b/client/data/images/create-group-light-hover.png new file mode 100644 index 0000000..a15e13f Binary files /dev/null and b/client/data/images/create-group-light-hover.png differ diff --git a/client/data/images/create-group-light.png b/client/data/images/create-group-light.png index 9726d8b..7758877 100644 Binary files a/client/data/images/create-group-light.png and b/client/data/images/create-group-light.png differ diff --git a/client/data/images/create-group.png b/client/data/images/create-group.png index a128a56..b7b80d9 100644 Binary files a/client/data/images/create-group.png and b/client/data/images/create-group.png differ diff --git a/client/data/images/old/add-user-dark.png b/client/data/images/old/add-user-dark.png new file mode 100644 index 0000000..db90d13 Binary files /dev/null and b/client/data/images/old/add-user-dark.png differ diff --git a/client/data/images/old/add-user-hover-dark.png b/client/data/images/old/add-user-hover-dark.png new file mode 100644 index 0000000..5a2375b Binary files /dev/null and b/client/data/images/old/add-user-hover-dark.png differ diff --git a/client/data/images/old/add-user-hover-light.png b/client/data/images/old/add-user-hover-light.png new file mode 100644 index 0000000..a1e1f86 Binary files /dev/null and b/client/data/images/old/add-user-hover-light.png differ diff --git a/client/data/images/old/add-user-hover.png b/client/data/images/old/add-user-hover.png new file mode 100644 index 0000000..ce6699f Binary files /dev/null and b/client/data/images/old/add-user-hover.png differ diff --git a/client/data/images/old/add-user-light.png b/client/data/images/old/add-user-light.png new file mode 100644 index 0000000..5a4441b Binary files /dev/null and b/client/data/images/old/add-user-light.png differ diff --git a/client/data/images/old/add-user.png b/client/data/images/old/add-user.png new file mode 100644 index 0000000..fd49c2a Binary files /dev/null and b/client/data/images/old/add-user.png differ diff --git a/client/data/images/old/create-group-dark.png b/client/data/images/old/create-group-dark.png new file mode 100644 index 0000000..cf3fe91 Binary files /dev/null and b/client/data/images/old/create-group-dark.png differ diff --git a/client/data/images/old/create-group-light.png b/client/data/images/old/create-group-light.png new file mode 100644 index 0000000..9726d8b Binary files /dev/null and b/client/data/images/old/create-group-light.png differ diff --git a/client/data/images/old/create-group.png b/client/data/images/old/create-group.png new file mode 100644 index 0000000..a128a56 Binary files /dev/null and b/client/data/images/old/create-group.png differ diff --git a/client/inc/client.h b/client/inc/client.h index a6c6a4b..413ed2d 100755 --- a/client/inc/client.h +++ b/client/inc/client.h @@ -338,11 +338,7 @@ void events_click(GtkWidget *widget, GdkEventButton *event); void status_click(GtkWidget *widget, GdkEventButton *event); void settings_click(GtkWidget *widget, GdkEventButton *event); -void active1_click(GtkWidget *widget, GdkEventButton *event); -void active2_click(GtkWidget *widget, GdkEventButton *event); -void active3_click(GtkWidget *widget, GdkEventButton *event); -void active4_click(GtkWidget *widget, GdkEventButton *event); -void active5_click(GtkWidget *widget, GdkEventButton *event); +void active_click(GtkWidget *widget, GdkEventButton *event); void adduser_click(GtkWidget *widget, GdkEventButton *event, gpointer search_field); void attach_click(GtkWidget *widget, GdkEventButton *event); diff --git a/client/src/events_home.c b/client/src/events_home.c index 5c20502..3e6d940 100644 --- a/client/src/events_home.c +++ b/client/src/events_home.c @@ -16,27 +16,8 @@ void event_leave_notify(GtkWidget *widget) { //--//--//--// //--//--//--// -void active1_click(GtkWidget *widget, GdkEventButton *event) { +void active_click(GtkWidget *widget, GdkEventButton *event) { if(widget) {} if(event) {} } -void active2_click(GtkWidget *widget, GdkEventButton *event) { - if(widget) {} - if(event) {} -} - -void active3_click(GtkWidget *widget, GdkEventButton *event) { - if(widget) {} - if(event) {} -} - -void active4_click(GtkWidget *widget, GdkEventButton *event) { - if(widget) {} - if(event) {} -} - -void active5_click(GtkWidget *widget, GdkEventButton *event) { - if(widget) {} - if(event) {} -} diff --git a/client/src/events_leftbar.c b/client/src/events_leftbar.c index 388017c..e390694 100755 --- a/client/src/events_leftbar.c +++ b/client/src/events_leftbar.c @@ -42,6 +42,7 @@ void messages_click(GtkWidget *widget, GdkEventButton *event) { void group_click(GtkWidget *widget, GdkEventButton *event) { if(t_leftbar.active == 3) return; if(event->type == GDK_BUTTON_PRESS && event->button == 1) { + create_notification(t_application.messanger, "Not available at the moment!", 1, LEFTBAR_W, 160, 0, 30); // gtk_widget_unset_state_flags(GTK_WIDGET(t_leftbar.home_box), GTK_STATE_FLAG_LINK); // gtk_widget_unset_state_flags(GTK_WIDGET(t_leftbar.msg_box), GTK_STATE_FLAG_LINK); // gtk_widget_unset_state_flags(GTK_WIDGET(t_leftbar.events_box), GTK_STATE_FLAG_LINK); @@ -55,6 +56,7 @@ void group_click(GtkWidget *widget, GdkEventButton *event) { void events_click(GtkWidget *widget, GdkEventButton *event) { if(t_leftbar.active == 4) return; if(event->type == GDK_BUTTON_PRESS && event->button == 1) { + create_notification(t_application.messanger, "Not available at the moment!", 1, LEFTBAR_W, 230, 0, 30); // gtk_widget_unset_state_flags(GTK_WIDGET(t_leftbar.home_box), GTK_STATE_FLAG_LINK); // gtk_widget_unset_state_flags(GTK_WIDGET(t_leftbar.group_box), GTK_STATE_FLAG_LINK); // gtk_widget_unset_state_flags(GTK_WIDGET(t_leftbar.msg_box), GTK_STATE_FLAG_LINK); diff --git a/client/src/screen_home.c b/client/src/screen_home.c index 8d6da8b..7349530 100644 --- a/client/src/screen_home.c +++ b/client/src/screen_home.c @@ -13,130 +13,32 @@ static void build_activity(GtkWidget *main) gtk_widget_set_halign(active_text, GTK_ALIGN_START); // Позиция текста gtk_box_pack_start(GTK_BOX(activity_block), active_text, FALSE, FALSE, 0); - // ACTIVE PERSON 1 - GtkWidget *active1_box = gtk_event_box_new(); - gtk_event_box_set_above_child(GTK_EVENT_BOX(active1_box), TRUE); - gtk_widget_set_name(GTK_WIDGET(active1_box), "active"); - GtkWidget *active1 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); - gtk_widget_set_size_request(GTK_WIDGET(active1), ACTIVE_PERSON_W, ACTIVE_PERSON_H); - gtk_widget_set_halign(active1, GTK_ALIGN_START); - gtk_container_add(GTK_CONTAINER(active1_box), active1); - gtk_box_pack_start(GTK_BOX(activity_block), active1_box, FALSE, FALSE, 0); - GtkWidget *avatar_container = gtk_fixed_new(); - gtk_widget_set_halign(avatar_container, GTK_ALIGN_START); + // ACTIVE PEOPLE + GtkWidget *active_box = gtk_event_box_new(); + gtk_event_box_set_above_child(GTK_EVENT_BOX(active_box), TRUE); + gtk_widget_set_name(GTK_WIDGET(active_box), "active"); + gtk_box_pack_start(GTK_BOX(activity_block), active_box, FALSE, FALSE, 0); + + GtkWidget *active = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + gtk_widget_set_size_request(GTK_WIDGET(active), ACTIVE_PERSON_W, ACTIVE_PERSON_H); + gtk_widget_set_halign(active, GTK_ALIGN_START); + gtk_container_add(GTK_CONTAINER(active_box), active); + GtkWidget *avatar = gtk_drawing_area_new(); gtk_widget_set_size_request(GTK_WIDGET(avatar), 35, 35); + gtk_widget_set_halign(avatar, GTK_ALIGN_START); + gtk_widget_set_valign(avatar, GTK_ALIGN_START); g_signal_connect(G_OBJECT(avatar), "draw", G_CALLBACK(draw_event_avatar), (int*)35); - gtk_box_pack_start(GTK_BOX(active1), avatar_container, FALSE, FALSE, 0); - gtk_fixed_put(GTK_FIXED(avatar_container), avatar, 3, 2); - GtkWidget *active1_name = gtk_label_new("Gazaris"); // Получить имя - gtk_widget_set_name(GTK_WIDGET(active1_name), "active_name"); - gtk_widget_set_halign(active1_name, GTK_ALIGN_START); - gtk_box_pack_start(GTK_BOX(active1), active1_name, FALSE, FALSE, 5); - - // ACTIVE PERSON 2 - GtkWidget *active2_box = gtk_event_box_new(); - gtk_event_box_set_above_child (GTK_EVENT_BOX(active2_box), TRUE); - gtk_widget_set_name(GTK_WIDGET(active2_box), "active"); - GtkWidget *active2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3); - gtk_widget_set_size_request(GTK_WIDGET(active2), ACTIVE_PERSON_W, ACTIVE_PERSON_H); - gtk_widget_set_halign(active2, GTK_ALIGN_START); - gtk_container_add(GTK_CONTAINER(active2_box), active2); - gtk_box_pack_start(GTK_BOX(activity_block), active2_box, FALSE, FALSE, 3); - GtkWidget *avatar_container2 = gtk_fixed_new(); - gtk_widget_set_halign(avatar_container2, GTK_ALIGN_START); - GtkWidget *avatar2 = gtk_drawing_area_new(); - gtk_widget_set_size_request(GTK_WIDGET(avatar2), 35, 35); - g_signal_connect(G_OBJECT(avatar2), "draw", G_CALLBACK(draw_event_avatar), (int*)35); - gtk_box_pack_start(GTK_BOX(active2), avatar_container2, FALSE, FALSE, 0); - gtk_fixed_put(GTK_FIXED(avatar_container2), avatar2, 3, 2); - GtkWidget *active2_name = gtk_label_new("leosh1d"); // Получить имя - gtk_widget_set_name(GTK_WIDGET(active2_name), "active_name"); - gtk_widget_set_halign(active2_name, GTK_ALIGN_START); - gtk_box_pack_start(GTK_BOX(active2), active2_name, FALSE, FALSE, 5); - // - // - GtkWidget *active3_box = gtk_event_box_new(); - gtk_event_box_set_above_child (GTK_EVENT_BOX(active3_box), TRUE); - gtk_widget_set_name(GTK_WIDGET(active3_box), "active"); - GtkWidget *active3 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3); - gtk_widget_set_size_request(GTK_WIDGET(active3), ACTIVE_PERSON_W, ACTIVE_PERSON_H); - gtk_widget_set_halign(active3, GTK_ALIGN_START); - gtk_container_add(GTK_CONTAINER(active3_box), active3); - gtk_box_pack_start(GTK_BOX(activity_block), active3_box, FALSE, FALSE, 3); - GtkWidget *avatar_container3 = gtk_fixed_new(); - gtk_widget_set_halign(avatar_container3, GTK_ALIGN_START); - GtkWidget *avatar3 = gtk_drawing_area_new(); - gtk_widget_set_size_request(GTK_WIDGET(avatar3), 35, 35); - g_signal_connect(G_OBJECT(avatar3), "draw", G_CALLBACK(draw_event_avatar), (int*)35); - gtk_box_pack_start(GTK_BOX(active3), avatar_container3, FALSE, FALSE, 0); - gtk_fixed_put(GTK_FIXED(avatar_container3), avatar3, 3, 2); - GtkWidget *active3_name = gtk_label_new("Overwolf94"); // Получить имя - gtk_widget_set_name(GTK_WIDGET(active3_name), "active_name"); - gtk_widget_set_halign(active3_name, GTK_ALIGN_START); - gtk_box_pack_start(GTK_BOX(active3), active3_name, FALSE, FALSE, 5); - // - GtkWidget *active4_box = gtk_event_box_new(); - gtk_event_box_set_above_child (GTK_EVENT_BOX(active4_box), TRUE); - gtk_widget_set_name(GTK_WIDGET(active4_box), "active"); - GtkWidget *active4 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3); - gtk_widget_set_size_request(GTK_WIDGET(active4), ACTIVE_PERSON_W, ACTIVE_PERSON_H); - gtk_widget_set_halign(active4, GTK_ALIGN_START); - gtk_container_add(GTK_CONTAINER(active4_box), active4); - gtk_box_pack_start(GTK_BOX(activity_block), active4_box, FALSE, FALSE, 3); - GtkWidget *avatar_container4 = gtk_fixed_new(); - gtk_widget_set_halign(avatar_container4, GTK_ALIGN_START); - GtkWidget *avatar4 = gtk_drawing_area_new(); - gtk_widget_set_size_request(GTK_WIDGET(avatar4), 35, 35); - g_signal_connect(G_OBJECT(avatar4), "draw", G_CALLBACK(draw_event_avatar), (int*)35); - gtk_box_pack_start(GTK_BOX(active4), avatar_container4, FALSE, FALSE, 0); - gtk_fixed_put(GTK_FIXED(avatar_container4), avatar4, 3, 2); - GtkWidget *active4_name = gtk_label_new("dashbug"); // Получить имя - gtk_widget_set_name(GTK_WIDGET(active4_name), "active_name"); - gtk_widget_set_halign(active4_name, GTK_ALIGN_START); - gtk_box_pack_start(GTK_BOX(active4), active4_name, FALSE, FALSE, 5); - // - GtkWidget *active5_box = gtk_event_box_new(); - gtk_event_box_set_above_child (GTK_EVENT_BOX(active5_box), TRUE); - gtk_widget_set_name(GTK_WIDGET(active5_box), "active"); - GtkWidget *active5 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3); - gtk_widget_set_size_request(GTK_WIDGET(active5), ACTIVE_PERSON_W, ACTIVE_PERSON_H); - gtk_widget_set_halign(active5, GTK_ALIGN_START); - gtk_container_add(GTK_CONTAINER(active5_box), active5); - gtk_box_pack_start(GTK_BOX(activity_block), active5_box, FALSE, FALSE, 3); - GtkWidget *avatar_container5 = gtk_fixed_new(); - gtk_widget_set_halign(avatar_container5, GTK_ALIGN_START); - GtkWidget *avatar5 = gtk_drawing_area_new(); - gtk_widget_set_size_request(GTK_WIDGET(avatar5), 35, 35); - g_signal_connect(G_OBJECT(avatar5), "draw", G_CALLBACK(draw_event_avatar), (int*)35); - gtk_box_pack_start(GTK_BOX(active5), avatar_container5, FALSE, FALSE, 0); - gtk_fixed_put(GTK_FIXED(avatar_container5), avatar5, 3, 2); - GtkWidget *active5_name = gtk_label_new("Neulen"); // Получить имя - gtk_widget_set_name(GTK_WIDGET(active5_name), "active_name"); - gtk_widget_set_halign(active5_name, GTK_ALIGN_START); - gtk_box_pack_start(GTK_BOX(active5), active5_name, FALSE, FALSE, 5); - // - - // ACTIVITY EVENTS - g_signal_connect(G_OBJECT(active1_box), "enter-notify-event", G_CALLBACK(event_enter_notify), NULL); - g_signal_connect(G_OBJECT(active1_box), "leave-notify-event", G_CALLBACK(event_leave_notify), NULL); - g_signal_connect(G_OBJECT(active1_box), "button_press_event", G_CALLBACK(active1_click), NULL); - - g_signal_connect(G_OBJECT(active2_box), "enter-notify-event", G_CALLBACK(event_enter_notify), NULL); - g_signal_connect(G_OBJECT(active2_box), "leave-notify-event", G_CALLBACK(event_leave_notify), NULL); - g_signal_connect(G_OBJECT(active2_box), "button_press_event", G_CALLBACK(active2_click), NULL); - - g_signal_connect(G_OBJECT(active3_box), "enter-notify-event", G_CALLBACK(event_enter_notify), NULL); - g_signal_connect(G_OBJECT(active3_box), "leave-notify-event", G_CALLBACK(event_leave_notify), NULL); - g_signal_connect(G_OBJECT(active3_box), "button_press_event", G_CALLBACK(active3_click), NULL); + gtk_box_pack_start(GTK_BOX(active), avatar, FALSE, FALSE, 0); - g_signal_connect(G_OBJECT(active4_box), "enter-notify-event", G_CALLBACK(event_enter_notify), NULL); - g_signal_connect(G_OBJECT(active4_box), "leave-notify-event", G_CALLBACK(event_leave_notify), NULL); - g_signal_connect(G_OBJECT(active4_box), "button_press_event", G_CALLBACK(active4_click), NULL); + GtkWidget *active_name = gtk_label_new("Gazaris"); // Получить имя + gtk_widget_set_name(GTK_WIDGET(active_name), "active_name"); + gtk_widget_set_halign(active_name, GTK_ALIGN_START); + gtk_box_pack_start(GTK_BOX(active), active_name, FALSE, FALSE, 0); - g_signal_connect(G_OBJECT(active5_box), "enter-notify-event", G_CALLBACK(event_enter_notify), NULL); - g_signal_connect(G_OBJECT(active5_box), "leave-notify-event", G_CALLBACK(event_leave_notify), NULL); - g_signal_connect(G_OBJECT(active5_box), "button_press_event", G_CALLBACK(active5_click), NULL); + g_signal_connect(G_OBJECT(active_box), "enter-notify-event", G_CALLBACK(event_enter_notify), NULL); + g_signal_connect(G_OBJECT(active_box), "leave-notify-event", G_CALLBACK(event_leave_notify), NULL); + g_signal_connect(G_OBJECT(active_box), "button_press_event", G_CALLBACK(active_click), NULL); } static void build_fact(GtkWidget *main) @@ -218,7 +120,7 @@ static void build_welcome(GtkWidget *main) g_signal_connect(G_OBJECT(togroup), "leave-notify-event", G_CALLBACK(event_leave_notify), NULL); g_signal_connect(G_OBJECT(togroup_inner), "enter-notify-event", G_CALLBACK(event_enter_notify), NULL); g_signal_connect(G_OBJECT(togroup_inner), "leave-notify-event", G_CALLBACK(event_leave_notify), NULL); - g_signal_connect(G_OBJECT(togroup), "button_press_event", G_CALLBACK(messages_click), NULL); + g_signal_connect(G_OBJECT(togroup), "button_press_event", G_CALLBACK(group_click), NULL); g_signal_connect(G_OBJECT(tosettings), "enter-notify-event", G_CALLBACK(event_enter_notify), NULL); g_signal_connect(G_OBJECT(tosettings), "leave-notify-event", G_CALLBACK(event_leave_notify), NULL); diff --git a/client/src/screen_messanger.c b/client/src/screen_messanger.c index c1656df..060d154 100644 --- a/client/src/screen_messanger.c +++ b/client/src/screen_messanger.c @@ -45,7 +45,7 @@ static void build_list(GtkWidget *main) GtkWidget *search_block = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2); gtk_widget_set_name(GTK_WIDGET(search_block), "search_block"); gtk_widget_set_size_request(GTK_WIDGET(search_block), 350, 40); - gtk_box_pack_start(GTK_BOX(list_block), search_block, FALSE, TRUE, 15); + gtk_box_pack_start(GTK_BOX(list_block), search_block, FALSE, FALSE, 15); GtkWidget *search_field = gtk_entry_new(); gtk_widget_set_name(GTK_WIDGET(search_field), "search_field"); g_signal_connect(G_OBJECT(search_field), "insert-text", G_CALLBACK(all_input_event), NULL); @@ -54,8 +54,8 @@ static void build_list(GtkWidget *main) gtk_box_pack_start(GTK_BOX(search_block), search_field, TRUE, TRUE, 0); GtkWidget *adduser = gtk_event_box_new(); gtk_widget_set_name(GTK_WIDGET(adduser), "adduser"); - gtk_widget_set_size_request(GTK_WIDGET(adduser), 22, 22); - gtk_box_pack_start(GTK_BOX(search_block), adduser, FALSE, FALSE, 10); + gtk_widget_set_size_request(GTK_WIDGET(adduser), 30, 30); + gtk_box_pack_end(GTK_BOX(search_block), adduser, FALSE, FALSE, 10); gtk_widget_set_halign(GTK_WIDGET(adduser), GTK_ALIGN_END); gtk_widget_set_valign(GTK_WIDGET(adduser), GTK_ALIGN_CENTER); tooltip("Add",adduser); @@ -68,8 +68,8 @@ static void build_list(GtkWidget *main) GtkWidget *group = gtk_event_box_new(); gtk_widget_set_name(GTK_WIDGET(group), "msggroup"); - gtk_widget_set_size_request(GTK_WIDGET(group), 50, 50); - gtk_fixed_put(GTK_FIXED(main), group, LIST_W-68, LIST_H-66); + gtk_widget_set_size_request(GTK_WIDGET(group), 40, 40); + gtk_fixed_put(GTK_FIXED(main), group, LIST_W-50, LIST_H-50); tooltip("Create group",group); //GtkAdjustment *vadjustment = gtk_adjustment_new(0, 0, LIST_H-100, 100, 100, LIST_H-100); // Параметры скролла @@ -77,13 +77,6 @@ static void build_list(GtkWidget *main) gtk_widget_set_size_request(scrollable, LIST_W, LIST_H-104); gtk_widget_set_name(GTK_WIDGET(scrollable), "chatlist"); - // chat_push_back(&tchatlist, "Neulen", 25, false); - // chat_push_back(&tchatlist, "Gazaris", 36, true); - // chat_push_back(&tchatlist, "dashbug", 40, true); - // chat_push_back(&tchatlist, "Savolus", 89, false); - // chat_push_back(&tchatlist, "Overwolf", 5, false); - // chat_push_back(&tchatlist, "sp", 99, true); - // chat_push_back(&tchatlist, "if", 65, false); t_msg.chatlist = create_chatlist(); gtk_container_add(GTK_CONTAINER(scrollable), t_msg.chatlist);