Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

Commit

Permalink
Group settings rollback. Home button fixed. printf commented
Browse files Browse the repository at this point in the history
  • Loading branch information
PAXANDDOS committed Feb 14, 2021
1 parent 7afc36a commit cedefca
Show file tree
Hide file tree
Showing 19 changed files with 288 additions and 159 deletions.
1 change: 0 additions & 1 deletion client/data/css/leftbar.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#homebutton
{
border-radius: 50%;
transition: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
background-size: 100%;
}
Expand Down
8 changes: 5 additions & 3 deletions client/data/css/themes/dark/leftbar_dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@

#homebutton
{
background-image: url("../../../images/home.png");
background-image: url("../../../images/home-dark.png");
background-color: #e6e6e9;
border-radius: 13px;
}
#homebutton:hover
{
border-radius: 10px;
background-color: #333333;
background-color: rgba(230, 230, 233, 0.7);
}
#homebutton:link
{
border-radius: 10px;
background-color: #050505;
background-color: rgba(230, 230, 233, 0.7);
}

#msgbutton
Expand Down
6 changes: 4 additions & 2 deletions client/data/css/themes/default/leftbar_default.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@
#homebutton
{
background-image: url("../../../images/home.png");
background-color: #c1ceee;
border-radius: 13px;
}
#homebutton:hover
{
background-color: rgba(193, 206, 238, 0.7);
border-radius: 10px;
background-color: #39456d;
}
#homebutton:link
{
background-color: rgba(193, 206, 238, 0.7);
border-radius: 10px;
background-color: #39456d;
}

#msgbutton
Expand Down
9 changes: 6 additions & 3 deletions client/data/css/themes/light/leftbar_light.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@

#homebutton
{
border-radius: 13px;
background-color: #343740;
background-image: url("../../../images/logo.png");
background-image: url("../../../images/home-light.png");
}
#homebutton:hover
{
background-color: #dddddd;
border-radius: 10px;
background-color: rgba(52, 55, 64, 0.7);
}
#homebutton:link
{
background-color: #d6d6d6;
border-radius: 10px;
background-color: rgba(52, 55, 64, 0.7);
}

#msgbutton
Expand Down
Binary file added client/data/images/home-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/data/images/home-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified client/data/images/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion client/inc/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ void create_gallery(GtkWidget *main);
void create_stickerlist(GtkWidget *main);
void creator_group(GtkWidget *main);
void creator_userprofile(GtkWidget *main, t_user *user, int);
void creator_groupsettings(GtkWidget *main, char *name, int chat_id);
void creator_groupsettings(GtkWidget *main, char *name, bool admin); // void creator_groupsettings(GtkWidget *main, char *name, int chat_id);
void create_notification(GtkWidget *widget, char *text, short type, int x, int y, int w, int h);

char *get_avatar_by_number(int num);
Expand Down
2 changes: 1 addition & 1 deletion client/src/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static void before_exit_jobs() {
cJSON_AddNumberToObject(json_user_id, "user_id", t_account.id);
cJSON_AddItemToObject(json_offline, "update_user_offline", json_user_id);
char *json_offline_string = cJSON_PrintUnformatted(json_offline);
printf("%s\n", json_offline_string);
// printf("%s\n", json_offline_string);
char *result = NULL;
ssl_client(json_offline_string, &result);
mx_strdel(&json_offline_string);
Expand Down
4 changes: 2 additions & 2 deletions client/src/create_group.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ bool add_user_to_group(char *name, int *user_id, int *avatar) {
cJSON_AddStringToObject(json_get_user_id, "username", name);
cJSON_AddItemToObject(json, "get_user_id", json_get_user_id);
char *json_string = cJSON_PrintUnformatted(json);
printf("%s\n", json_string);
// printf("%s\n", json_string);
char *result = NULL;
ssl_client(json_string, &result);
cJSON *response = cJSON_Parse(result);
Expand Down Expand Up @@ -56,7 +56,7 @@ void create_group(int *chat_id) {
cJSON_AddNullToObject(json_create_chat, "title");
cJSON_AddItemToObject(json, "create_chat", json_create_chat);
char *json_string = cJSON_PrintUnformatted(json);
printf("%s\n", json_string);
// printf("%s\n", json_string);
char *result = NULL;
ssl_client(json_string, &result);
mx_strdel(&json_string);
Expand Down
14 changes: 3 additions & 11 deletions client/src/creator_group.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ static void add_person(GtkWidget *widget, GdkEventButton *event) {

g_list_free(g_steal_pointer(&children2));
g_list_free(g_steal_pointer(&children));
if(!strcmp(copy, name))
if(!strcmp(copy, name)) {
create_notification(t_application.messanger, "This user is already added!", 1, 461, 110, 420, 10);
return;
}
parent = parent->next;
}
g_list_free(g_steal_pointer(&parent));
Expand Down Expand Up @@ -107,16 +109,6 @@ static void create_group_button_click(GtkWidget *widget, gpointer group_name) {
return;
}

while(parent != NULL) {
GList *children = gtk_container_get_children(GTK_CONTAINER(parent->data));
GList *children2 = gtk_container_get_children(GTK_CONTAINER(children->data));
children2 = children2->next;
char* chosen = (char*)gtk_label_get_text(GTK_LABEL(children2->data));
printf("Found: %s\n", chosen);
g_list_free(g_steal_pointer(&children2));
g_list_free(g_steal_pointer(&children));
parent = parent->next;
}
new_group->title = strdup(name);
int chat_id = 0;
create_group(&chat_id);
Expand Down
Loading

0 comments on commit cedefca

Please sign in to comment.