diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-09-22 17:31:05 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-09-22 17:31:05 (EDT) |
commit | 0c4e4eca805c367247b250ee1a227f330bb4107f (patch) | |
tree | d79e61b1247e99e091d7d19a0f934138a8a30e68 | |
parent | 2c5ca98496d22c004042c525a82e18cee13434f6 (diff) | |
download | marquee-0c4e4eca805c367247b250ee1a227f330bb4107f.zip marquee-0c4e4eca805c367247b250ee1a227f330bb4107f.tar.gz marquee-0c4e4eca805c367247b250ee1a227f330bb4107f.tar.bz2 |
MqTab: Add some comments
-rw-r--r-- | src/tab.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -161,15 +161,19 @@ mq_tab_populate_tab(MqTab *tab) GtkWidget *box; tab->title = "New tab"; + + /* Set up tab image. */ tab->tab_image = gtk_image_new_from_icon_name("text-x-generic", GTK_ICON_SIZE_BUTTON); + /* Set up tab label. */ tab->tab_label = gtk_label_new(NULL); gtk_label_set_ellipsize(GTK_LABEL(tab->tab_label), PANGO_ELLIPSIZE_END); gtk_widget_set_hexpand(tab->tab_label, TRUE); gtk_widget_set_size_request(tab->tab_label, 50, 1); + /* Pack tab box. */ box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); gtk_box_pack_start(GTK_BOX(box), tab->tab_image, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(box), tab->tab_label, TRUE, TRUE, 0); @@ -177,6 +181,7 @@ mq_tab_populate_tab(MqTab *tab) "window-close", GTK_ICON_SIZE_BUTTON), FALSE, FALSE, 0); gtk_widget_show_all(box); + /* Set up event box. */ tab->tab = gtk_event_box_new(); g_signal_connect(tab->tab, "button-press-event", G_CALLBACK(tab_label_button_press_cb), tab); |