|
|
|
|
@ -88,8 +88,7 @@ void yon_main_section_setup_apps(main_section *cur_section, const char *target){
|
|
|
|
|
Image = gtk_image_new_from_pixbuf(gtk_icon_info_load_icon(info,NULL));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
char *name = yon_char_wrap_to_length_str(cur_app->Name,20);
|
|
|
|
|
char *name = cur_app->Name;
|
|
|
|
|
|
|
|
|
|
GtkWidget *Row = gtk_flow_box_child_new();
|
|
|
|
|
GtkWidget *Box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5);
|
|
|
|
|
@ -97,23 +96,26 @@ void yon_main_section_setup_apps(main_section *cur_section, const char *target){
|
|
|
|
|
GtkWidget *Icon = Image;
|
|
|
|
|
|
|
|
|
|
gtk_box_pack_start(GTK_BOX(Box),Icon,0,0,0);
|
|
|
|
|
gtk_box_pack_start(GTK_BOX(Box),Label,0,0,0);
|
|
|
|
|
gtk_box_pack_start(GTK_BOX(Box),Label,1,1,0);
|
|
|
|
|
gtk_container_add(GTK_CONTAINER(Row),Box);
|
|
|
|
|
gtk_flow_box_insert(GTK_FLOW_BOX(cur_section->AppsList),Row,-1);
|
|
|
|
|
|
|
|
|
|
gtk_widget_set_size_request(Row,50,50);
|
|
|
|
|
|
|
|
|
|
gtk_widget_set_halign(Box,GTK_ALIGN_START);
|
|
|
|
|
gtk_widget_set_halign(Box,GTK_ALIGN_FILL);
|
|
|
|
|
gtk_widget_set_valign(Box,GTK_ALIGN_CENTER);
|
|
|
|
|
|
|
|
|
|
gtk_label_set_line_wrap_mode(GTK_LABEL(Label),PANGO_WRAP_WORD);
|
|
|
|
|
gtk_label_set_line_wrap_mode(GTK_LABEL(Label),PANGO_WRAP_WORD_CHAR);
|
|
|
|
|
gtk_label_set_line_wrap(GTK_LABEL(Label),1);
|
|
|
|
|
gtk_label_set_xalign(GTK_LABEL(Label),0);
|
|
|
|
|
gtk_label_set_max_width_chars(GTK_LABEL(Label),15);
|
|
|
|
|
gtk_label_set_xalign(GTK_LABEL(Label), GTK_ALIGN_FILL);
|
|
|
|
|
|
|
|
|
|
g_object_set_data(G_OBJECT(Row),"main_section",cur_section);
|
|
|
|
|
g_object_set_data(G_OBJECT(Row),"apps",cur_app);
|
|
|
|
|
g_object_set_data(G_OBJECT(Row),"Label",Label);
|
|
|
|
|
|
|
|
|
|
// gtk_style_context_add_class(gtk_widget_get_style_context(Row),"bggrey");
|
|
|
|
|
|
|
|
|
|
gtk_widget_show_all(Row);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|