Skip to content

Commit

Permalink
Fix minor bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
codeation committed May 21, 2024
1 parent 927e0f9 commit e220237
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions layout.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ void layout_raise(int id) {
g_object_ref(l->layout);
gtk_container_remove(GTK_CONTAINER(l->parent), l->layout);
gtk_container_add(GTK_CONTAINER(l->parent), l->layout);
g_object_unref(l->layout);
if (GTK_IS_LAYOUT(l->parent))
gtk_layout_move(GTK_LAYOUT(l->parent), l->layout, l->x, l->y);
else
Expand Down
5 changes: 2 additions & 3 deletions menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,9 @@ void menu_item_add(int id, int parent, char *label, char *action) {
m->action = action;
id_list_append(menu_item_list, id, m);
menu_elem *p = (menu_elem *)id_list_get_data(menu_list, parent);
g_menu_append_item(G_MENU(p->menu), m->item);
g_object_unref(m->item);
GSimpleAction *sa = g_simple_action_new(action + 4, NULL);
g_action_map_add_action(G_ACTION_MAP(app), G_ACTION(sa));
g_signal_connect(G_OBJECT(sa), "activate", G_CALLBACK(menu_item_click), m);
GMenuItem *item = g_menu_item_new(label, action);
g_menu_append_item(G_MENU(p->menu), item);
g_object_unref(item);
}
1 change: 1 addition & 0 deletions window.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ void window_raise(int id) {
g_object_ref(w->draw);
gtk_container_remove(GTK_CONTAINER(w->layout), w->draw);
gtk_container_add(GTK_CONTAINER(w->layout), w->draw);
g_object_unref(w->draw);
if (GTK_IS_LAYOUT(w->layout))
gtk_layout_move(GTK_LAYOUT(w->layout), w->draw, w->x, w->y);
else
Expand Down

0 comments on commit e220237

Please sign in to comment.