xiterm

simple vte terminal emulator
git clone https://git.ce9e.org/xiterm.git

commit
ab39c1fe37bcec2f49b17337fd752c0d1ee7894d
parent
c754f18f827dae999087f0414bbb53cbc5e4d5a7
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2025-11-01 05:00
refactor: use label parameter in gtk_notebook_insert_page

Diffstat

M xiterm.c 11 +++++------

1 files changed, 5 insertions, 6 deletions


diff --git a/xiterm.c b/xiterm.c

@@ -124,15 +124,14 @@ void add_tab(char **cmd) {
  124   124 	GtkWidget *page, *label;
  125   125 	int page_num;
  126   126 
  127    -1 	page = vte_terminal_new();
  128    -1 	page_num = gtk_notebook_get_current_page(notebook) + 1;
  129    -1 	page_num = gtk_notebook_insert_page(notebook, page, NULL, page_num);
  130    -1 	gtk_notebook_set_tab_reorderable(notebook, page, TRUE);
  131    -1 
  132   127 	label = gtk_label_new("");
  133   128 	gtk_widget_set_hexpand(label, TRUE);
  134   129 	gtk_label_set_ellipsize(GTK_LABEL(label), PANGO_ELLIPSIZE_END);
  135    -1 	gtk_notebook_set_tab_label(notebook, page, label);
   -1   130 
   -1   131 	page = vte_terminal_new();
   -1   132 	page_num = gtk_notebook_get_current_page(notebook) + 1;
   -1   133 	page_num = gtk_notebook_insert_page(notebook, page, label, page_num);
   -1   134 	gtk_notebook_set_tab_reorderable(notebook, page, TRUE);
  136   135 
  137   136 	update_show_tabs();
  138   137 	gtk_widget_show(page);