Skip to content

Commit

Permalink
quickfix nocsd problem
Browse files Browse the repository at this point in the history
  • Loading branch information
ItzSelenux authored and ItzSelenux committed Sep 6, 2024
1 parent 7ad5f29 commit 2880629
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
9 changes: 6 additions & 3 deletions keyhandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,22 @@ static void on_entry_changed(GtkEntry *entry, FilterData *filter_data)
snprintf(buffer, 256, "%g", result);
}
gtk_label_set_text(GTK_LABEL(manswer), buffer);
gtk_widget_show(mathtext);
gtk_widget_show(math);
gtk_widget_show(manswer);
gtk_widget_hide(pr);
}
else if (strlen(filter_data->filter_text) > 0 && !isdigit(filter_data->filter_text[0]))
{
gtk_widget_hide(mathtext);
gtk_widget_show(mathtext);
gtk_widget_hide(math);
gtk_widget_hide(manswer);
gtk_widget_show(pr);
gtk_widget_show(listbox2);
}

}
}


gboolean on_key_release(GtkWidget *widget, GdkEventKey *event, gpointer user_data)
{
const char *text = gtk_entry_get_text(GTK_ENTRY(entry));
Expand Down
4 changes: 2 additions & 2 deletions mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ void create_window()
grid = gtk_grid_new();
gtk_container_add(GTK_CONTAINER(window), grid);
mathtext = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
GtkWidget *math = gtk_label_new("Math Answer: ");
math = gtk_label_new("Math Answer: ");
manswer = gtk_label_new("");
gtk_label_set_selectable(GTK_LABEL(manswer), TRUE);
pr = gtk_label_new("Press Enter to Run first item, or down to select another item");
Expand All @@ -195,6 +195,7 @@ void create_window()
{
gtk_box_pack_start(GTK_BOX(mathtext), math, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(mathtext), manswer, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(mathtext), pr, TRUE, TRUE, 0);
}

gtk_widget_set_vexpand(scrolled_window, TRUE);
Expand Down Expand Up @@ -224,7 +225,6 @@ void create_window()
gtk_widget_set_size_request(listbox2, -1, -1);
gtk_widget_set_size_request(scrolled_window, -1, 256);
gtk_grid_attach(GTK_GRID(grid), entry, 0, 1, 1, 1);
gtk_grid_attach(GTK_GRID(grid), pr, 0, 1, 1, 1);
gtk_grid_attach(GTK_GRID(grid), mathtext, 0, 2, 1, 1);

if (sgcfg)
Expand Down
1 change: 1 addition & 0 deletions settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ void readconf()
//READ THE CONF
if (home_dir == NULL)
{
nohome = 1;
return;
}
else
Expand Down
2 changes: 1 addition & 1 deletion sglauncher.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ GtkWidget *window, *grid, *button, *cmd_row, *dialog, *web_row, *entry, *manswer
*pr, *row, *headerbar, *button, *image, *wtitle, *submenu, *submenu_item1, *submenu_item2,
*submenu_item3, *submenu_item4, *submenu_item5, *weblabel, *webcombo, *webctm, *worder,
*wshowcmd, *wshowweb, *wshowcalc, *wshowscientific, *wexitwhenunfocused, *defbtn, *applybtn,
*treeview, *web_box, *wshowda, *scrolled_window;
*treeview, *web_box, *wshowda, *scrolled_window, *math;

GtkIconTheme *theme;
GtkIconInfo *info;
Expand Down

0 comments on commit 2880629

Please sign in to comment.