Column minimum size depends on its localised name label

pull/61/head
Ivan Yartsev 2 years ago
parent 8ea02f9f92
commit d48db37970

@ -1387,10 +1387,11 @@ int main(int argc, char *argv[]){
{"socket-ext-id", 1,0, 'e'}, {"socket-ext-id", 1,0, 'e'},
{"socket-trd-id", 1,0, 't'}, {"socket-trd-id", 1,0, 't'},
{"debug", 0,0, 'd'}, {"debug", 0,0, 'd'},
{"clean-config", 0,0, 'c'},
{ NULL, 0, NULL, 0 } { NULL, 0, NULL, 0 }
}; };
for (int i=0;i<argc;i++){ for (int i=0;i<argc;i++){
int argument=getopt_long(argc,argv,"hVvs:e:t:d",long_options,&option_index); int argument=getopt_long(argc,argv,"hVvs:e:t:dc",long_options,&option_index);
switch(argument){ switch(argument){
case 'h': case 'h':
show_help=1; show_help=1;
@ -1412,6 +1413,8 @@ int main(int argc, char *argv[]){
if(optarg) if(optarg)
main_config.load_socket_id=atoi(optarg); main_config.load_socket_id=atoi(optarg);
break; break;
case 'c': rmdir(yon_char_unite(yon_ubl_user_get_home_directory(),"/",LocaleName,"/",LocaleName,".conf",NULL));
break;
case 1: case 1:
main_config.lock_help=1; main_config.lock_help=1;
break; break;
@ -1456,6 +1459,12 @@ int main(int argc, char *argv[]){
yon_window_config_setup(GTK_WINDOW(widgets->Window)); yon_window_config_setup(GTK_WINDOW(widgets->Window));
yon_window_config_load(config_path); yon_window_config_load(config_path);
on_config_load_local(); on_config_load_local();
GList *list = gtk_tree_view_get_columns(GTK_TREE_VIEW(widgets->MainTree));
for (int i = 0; i < g_list_length(list); i++){
yon_gtk_column_minimal_fixed_size_set((GtkTreeViewColumn*)g_list_nth_data(list,i));
}
g_list_free(list);
GtkCssProvider *css=gtk_css_provider_new(); GtkCssProvider *css=gtk_css_provider_new();
gtk_css_provider_load_from_resource(css,CssPath); gtk_css_provider_load_from_resource(css,CssPath);
gtk_style_context_add_provider_for_screen(gdk_screen_get_default(), gtk_style_context_add_provider_for_screen(gdk_screen_get_default(),

@ -1811,6 +1811,11 @@ int yon_gtk_combo_box_text_find(GtkWidget *combo_box, char *text_to_find){
} return -1; } return -1;
} }
void yon_gtk_column_minimal_fixed_size_set(GtkTreeViewColumn *column){
int width= gtk_tree_view_column_get_width(column);
gtk_tree_view_column_set_min_width(column,width);
}
/**yon_dictionary_gtk_pack_start_multiple_widgets(GtkBox *destination, gboolean expand, gboolean fill, int padding, ...) /**yon_dictionary_gtk_pack_start_multiple_widgets(GtkBox *destination, gboolean expand, gboolean fill, int padding, ...)
* [EN] * [EN]
* *

@ -277,6 +277,8 @@ int yon_gtk_combo_box_fill(GtkWidget *combo, char **parameters,int size);
int yon_gtk_combo_box_text_find(GtkWidget *combo_box, char *text_to_find); int yon_gtk_combo_box_text_find(GtkWidget *combo_box, char *text_to_find);
void yon_gtk_column_minimal_fixed_size_set(GtkTreeViewColumn *column);
int yon_gtk_icon_view_hide_empty(dictionary *icon_view_segment); int yon_gtk_icon_view_hide_empty(dictionary *icon_view_segment);
int yon_dictionary_gtk_pack_start_multiple_widgets(GtkBox *destination, gboolean expand, gboolean fill, int padding, ...); int yon_dictionary_gtk_pack_start_multiple_widgets(GtkBox *destination, gboolean expand, gboolean fill, int padding, ...);

Loading…
Cancel
Save