ui/gtk/text.c

changeset 1016
ccde46662db7
parent 975
e0ac49797a30
equal deleted inserted replaced
1015:b459361d98ad 1016:ccde46662db7
754 // ----------------------- path textfield ----------------------- 754 // ----------------------- path textfield -----------------------
755 755
756 // TODO: move to common 756 // TODO: move to common
757 static UiPathElm* default_pathelm_func(const char* full_path, size_t len, size_t* ret_nelm, void* data) { 757 static UiPathElm* default_pathelm_func(const char* full_path, size_t len, size_t* ret_nelm, void* data) {
758 cxstring *pathelms; 758 cxstring *pathelms;
759 size_t nelm = cx_strsplit_a(cxDefaultAllocator, cx_strn(full_path, len), CX_STR("/"), 4096, &pathelms); 759 size_t nelm = cx_strsplit_a(cxDefaultAllocator, cx_strn(full_path, len), cx_str("/"), 4096, &pathelms);
760 760
761 if (nelm == 0) { 761 if (nelm == 0) {
762 *ret_nelm = 0; 762 *ret_nelm = 0;
763 return NULL; 763 return NULL;
764 } 764 }
1040 GtkWidget *button = ui_path_elm_button(pathtf, elm, i); 1040 GtkWidget *button = ui_path_elm_button(pathtf, elm, i);
1041 gtk_widget_add_css_class(button, "flat"); 1041 gtk_widget_add_css_class(button, "flat");
1042 1042
1043 gtk_box_append(GTK_BOX(pathtf->hbox), button); 1043 gtk_box_append(GTK_BOX(pathtf->hbox), button);
1044 1044
1045 if(i+1 < pathtf->current_nelm && cx_strcmp(cx_strn(elm->name, elm->name_len), CX_STR("/"))) { 1045 if(i+1 < pathtf->current_nelm && cx_strcmp(cx_strn(elm->name, elm->name_len), cx_str("/"))) {
1046 GtkWidget *path_separator = gtk_label_new("/"); 1046 GtkWidget *path_separator = gtk_label_new("/");
1047 gtk_widget_add_css_class(path_separator, "pathbar-button-inactive"); 1047 gtk_widget_add_css_class(path_separator, "pathbar-button-inactive");
1048 gtk_box_append(GTK_BOX(pathtf->hbox), path_separator); 1048 gtk_box_append(GTK_BOX(pathtf->hbox), path_separator);
1049 } 1049 }
1050 } 1050 }

mercurial