Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

criado funcionalidade geração de planilha; criador funcionalidade ver… #9

Merged
merged 1 commit into from
Jul 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed Pedidos.o
Binary file not shown.
Binary file added data/icones_opc/planilha.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/icones_opc/planilha_movimentos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/icones_opc/planilha_prods.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/icones_opc/planilha_terceiros.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/icones_opc/planilhas.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed pedidos
Binary file not shown.
7 changes: 7 additions & 0 deletions src/Canones/gerenciador_janelas/gerenciador_janelas.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,17 @@ void gerenciador_load_funcs(){
janelas_gerenciadas.vetor_janelas[REG_REL_FIX_FINPAG_WIN].fun = rel_fix_fin_pag;
janelas_gerenciadas.vetor_janelas[CAD_TRSP_WND].fun = trsp_cad_fun;

//relatórios planilhas
janelas_gerenciadas.vetor_janelas[REG_REL_PLANL_ICONS_WIN].fun = planilha_icon_view_wnd;
janelas_gerenciadas.vetor_janelas[REG_REL_PLANL_PRODS_WIN].fun = planilha_init_export; //module PLANL_MOD_PRODUTOS
janelas_gerenciadas.vetor_janelas[REG_REL_PLANL_TER_WIN].fun = planilha_init_export; //module PLANL_MOD_TERCEIROS
janelas_gerenciadas.vetor_janelas[REG_REL_PLANL_MOV_WIN].fun = planilha_init_export; //module PLANL_MOD_MOVIMENTOS

//opcoes tecnicas
janelas_gerenciadas.vetor_janelas[REG_CAD_EMPRESA].fun = cadastro_empresa;
janelas_gerenciadas.vetor_janelas[REG_CAD_CNTRATS].fun = cad_contratos;
janelas_gerenciadas.vetor_janelas[REG_TNCLOG_WND].fun = tecn_logger_wnd;
janelas_gerenciadas.vetor_janelas[REG_BACKUP_WND].fun = backup_fun;


}
17 changes: 16 additions & 1 deletion src/Canones/gerenciador_janelas/gerenciador_janelas.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ REG_CAD_CNTRATS,
REG_TNCLOG_WND,
REG_BACKUP_WND,

REG_REL_PLANL_ICONS_WIN,
REG_PLANL_CONF_ICONS_WIN,
REG_REL_PLANL_TER_WIN,
REG_REL_PLANL_PRODS_WIN,
REG_REL_PLANL_MOV_WIN,

REG_WIN_QNT,
};

Expand Down Expand Up @@ -135,7 +141,16 @@ static const char *janelas_nomes[] = {
"Cadastro da Empresa",
"Cadastro de Contratos",
"Visualizador de Logs",
"Gerador de Backups"
"Gerador de Backups",

//planilhas
"Relatório de Planilhas",
"Gerador de Planilhas",
"Planilha de Clientes",
"Planilha de Produtos",
"Planilha de Movimentos",


};

typedef struct _janelas_info{
Expand Down
2 changes: 1 addition & 1 deletion src/Menu/cad_ico.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ GtkWidget *cad_menu_get_icon_view(){
gtk_icon_view_set_margin(GTK_ICON_VIEW(icon_view),10);
//gtk_icon_view_set_activate_on_single_click(GTK_ICON_VIEW(icon_view),TRUE);

g_signal_connect(icon_view,"item-activated",G_CALLBACK(icon_view_select), modelo);
g_signal_connect(icon_view,"item-activated",G_CALLBACK(icon_view_select_caller), modelo);
g_signal_connect(icon_view,"item-activated",G_CALLBACK(menu_icon_view_select), janelas_gerenciadas.vetor_janelas[REG_MENU_WND].janela_pointer);

return icon_view;
Expand Down
2 changes: 1 addition & 1 deletion src/Menu/cmp_ico.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ GtkWidget *cmp_menu_get_icon_view(){
gtk_icon_view_set_margin(GTK_ICON_VIEW(icon_view),10);
//gtk_icon_view_set_activate_on_single_click(GTK_ICON_VIEW(icon_view),TRUE);

g_signal_connect(icon_view,"item-activated",G_CALLBACK(icon_view_select), modelo);
g_signal_connect(icon_view,"item-activated",G_CALLBACK(icon_view_select_caller), modelo);
g_signal_connect(icon_view,"item-activated",G_CALLBACK(menu_icon_view_select), janelas_gerenciadas.vetor_janelas[REG_MENU_WND].janela_pointer);

return icon_view;
Expand Down
2 changes: 1 addition & 1 deletion src/Menu/est_ico.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ GtkWidget *est_menu_get_icon_view(){
gtk_icon_view_set_margin(GTK_ICON_VIEW(icon_view),10);
//gtk_icon_view_set_activate_on_single_click(GTK_ICON_VIEW(icon_view),TRUE);

g_signal_connect(icon_view,"item-activated",G_CALLBACK(icon_view_select), modelo);
g_signal_connect(icon_view,"item-activated",G_CALLBACK(icon_view_select_caller), modelo);
g_signal_connect(icon_view,"item-activated",G_CALLBACK(menu_icon_view_select), janelas_gerenciadas.vetor_janelas[REG_MENU_WND].janela_pointer);

return icon_view;
Expand Down
2 changes: 1 addition & 1 deletion src/Menu/fin_ico.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ GtkWidget *fin_menu_get_icon_view(){
gtk_icon_view_set_margin(GTK_ICON_VIEW(icon_view),10);
//gtk_icon_view_set_activate_on_single_click(GTK_ICON_VIEW(icon_view),TRUE);

g_signal_connect(icon_view,"item-activated",G_CALLBACK(icon_view_select), modelo);
g_signal_connect(icon_view,"item-activated",G_CALLBACK(icon_view_select_caller), modelo);
g_signal_connect(icon_view,"item-activated",G_CALLBACK(menu_icon_view_select), janelas_gerenciadas.vetor_janelas[REG_MENU_WND].janela_pointer);

return icon_view;
Expand Down
10 changes: 0 additions & 10 deletions src/Menu/iconview.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,6 @@
#include "rel_ico.c"
#include "tcn_ico.c"

void menu_icon_view_select(GtkIconView *icon_view, GtkTreePath *path, gpointer data){

if(menu_notebook && GTK_IS_WIDGET(menu_notebook))
menu_notebook_atual_pos = gtk_notebook_get_current_page(GTK_NOTEBOOK(menu_notebook));
if(data && GTK_IS_WIDGET(data)){
gtk_widget_destroy(data);
}

}

gboolean desfocar_menu(GtkWidget *widget, GdkEventCrossing *event, gpointer user_data){

if((event->mode == GDK_CROSSING_UNGRAB) || (event->mode == GDK_CROSSING_GTK_UNGRAB) ){
Expand Down
2 changes: 0 additions & 2 deletions src/Menu/iconview.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

int menu_icon_views_wnd();

void menu_icon_view_select(GtkIconView *icon_view, GtkTreePath *path, gpointer data);

GtkWidget *menu_notebook;

static int menu_notebook_atual_pos=0;
Expand Down
2 changes: 1 addition & 1 deletion src/Menu/mkt_ico.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ GtkWidget *mkt_menu_get_icon_view(){
gtk_icon_view_set_margin(GTK_ICON_VIEW(icon_view),10);
//gtk_icon_view_set_activate_on_single_click(GTK_ICON_VIEW(icon_view),TRUE);

g_signal_connect(icon_view,"item-activated",G_CALLBACK(icon_view_select), modelo);
g_signal_connect(icon_view,"item-activated",G_CALLBACK(icon_view_select_caller), modelo);
g_signal_connect(icon_view,"item-activated",G_CALLBACK(menu_icon_view_select), janelas_gerenciadas.vetor_janelas[REG_MENU_WND].janela_pointer);

return icon_view;
Expand Down
9 changes: 8 additions & 1 deletion src/Menu/rel_ico.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ GtkWidget *rel_menu_get_icon_view(){
1,gtk_image_get_pixbuf(GTK_IMAGE(gtk_image_new_from_file(REL_ORC_PROD_IMG))),
2,REG_REL_FIX_ICONS_WIN,-1);

gtk_tree_store_append(modelo,&iter,NULL);
gtk_tree_store_set(modelo,
&iter,
0,janelas_nomes[REG_REL_PLANL_ICONS_WIN],
1,gtk_image_get_pixbuf(GTK_IMAGE(gtk_image_new_from_file(REL_PLANL_IMG))),
2,REG_REL_PLANL_ICONS_WIN,-1);


gtk_icon_view_set_model(GTK_ICON_VIEW(icon_view),GTK_TREE_MODEL(modelo));

Expand All @@ -50,7 +57,7 @@ GtkWidget *rel_menu_get_icon_view(){
gtk_icon_view_set_margin(GTK_ICON_VIEW(icon_view),10);
//gtk_icon_view_set_activate_on_single_click(GTK_ICON_VIEW(icon_view),TRUE);

g_signal_connect(icon_view,"item-activated",G_CALLBACK(icon_view_select), modelo);
g_signal_connect(icon_view,"item-activated",G_CALLBACK(icon_view_select_caller), modelo);
g_signal_connect(icon_view,"item-activated",G_CALLBACK(menu_icon_view_select), janelas_gerenciadas.vetor_janelas[REG_MENU_WND].janela_pointer);

return icon_view;
Expand Down
2 changes: 1 addition & 1 deletion src/Menu/tcn_ico.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ GtkWidget *tcn_menu_get_icon_view(){
gtk_icon_view_set_margin(GTK_ICON_VIEW(icon_view),10);
//gtk_icon_view_set_activate_on_single_click(GTK_ICON_VIEW(icon_view),TRUE);

g_signal_connect(icon_view,"item-activated",G_CALLBACK(icon_view_select), modelo);
g_signal_connect(icon_view,"item-activated",G_CALLBACK(icon_view_select_caller), modelo);
g_signal_connect(icon_view,"item-activated",G_CALLBACK(menu_icon_view_select), janelas_gerenciadas.vetor_janelas[REG_MENU_WND].janela_pointer);

return icon_view;
Expand Down
2 changes: 1 addition & 1 deletion src/Menu/vnd_ico.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ GtkWidget *vnd_menu_get_icon_view(){
gtk_icon_view_set_margin(GTK_ICON_VIEW(icon_view),10);
//gtk_icon_view_set_activate_on_single_click(GTK_ICON_VIEW(icon_view),TRUE);

g_signal_connect(icon_view,"item-activated",G_CALLBACK(icon_view_select), modelo);
g_signal_connect(icon_view,"item-activated",G_CALLBACK(icon_view_select_caller), modelo);
g_signal_connect(icon_view,"item-activated",G_CALLBACK(menu_icon_view_select), janelas_gerenciadas.vetor_janelas[REG_MENU_WND].janela_pointer);

return icon_view;
Expand Down
2 changes: 1 addition & 1 deletion src/Relatorios/fixados/estoques/gerar.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ int relat_fix_est_gerar_fun(){
GDir *dir;
if(!(dir = g_dir_open(REL_FIX_MOV_PATH,0,NULL))){
popup(NULL,"Diretorio sendo criado");
if(g_mkdir_with_parents(REL_FIX_MOV_PATH, 777)){
if(g_mkdir_with_parents(REL_FIX_FIN_PATH, 777) == -1){
popup(NULL,"Não foi possível criar diretorio de relatorios");
return 1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Relatorios/fixados/financeiro/pagar/gerar.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ int rel_fix_fin_pag_gerar(){

GDir *teste;
if(!(teste = g_dir_open(REL_FIX_FIN_PATH,0,NULL))){
if(g_mkdir_with_parents(REL_FIX_FIN_PATH, 777)){
if(g_mkdir_with_parents(REL_FIX_FIN_PATH, 777) == -1){
popup(NULL,"Não foi possível abrir/criar diretório do arquivo");
return 1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Relatorios/fixados/financeiro/receber/gerar.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ int rel_fix_fin_rec_gerar(){

GDir *teste;
if(!(teste = g_dir_open(REL_FIX_FIN_PATH,0,NULL))){
if(g_mkdir_with_parents(REL_FIX_FIN_PATH, 777)){
if(g_mkdir_with_parents(REL_FIX_FIN_PATH, 777) == -1){
popup(NULL,"Não foi possível abrir/criar diretório do arquivo");
return 1;
}
Expand Down
3 changes: 2 additions & 1 deletion src/Relatorios/fixados/iconview.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@ int relat_icon_view_wnd(){
gtk_icon_view_set_model(GTK_ICON_VIEW(icon_view),GTK_TREE_MODEL(modelo));
//gtk_icon_view_set_activate_on_single_click(GTK_ICON_VIEW(icon_view),TRUE);

g_signal_connect(icon_view,"item-activated",G_CALLBACK(icon_view_select), modelo);


gtk_icon_view_set_columns (GTK_ICON_VIEW(icon_view),2);
gtk_icon_view_set_text_column(GTK_ICON_VIEW(icon_view),0);
gtk_icon_view_set_pixbuf_column(GTK_ICON_VIEW(icon_view),1);

gtk_container_add(GTK_CONTAINER(fixed_relats_wnd),icon_view);
g_signal_connect(icon_view,"item-activated",G_CALLBACK(icon_view_select_caller), modelo);
g_signal_connect(fixed_relats_wnd,"destroy",G_CALLBACK(ger_janela_fechada),&janelas_gerenciadas.vetor_janelas[REG_REL_FIX_ICONS_WIN]);


Expand Down
1 change: 0 additions & 1 deletion src/Relatorios/fixados/produtos/principal.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ int relat_fix_prod(){
GTK_WINDOW(janelas_gerenciadas.vetor_janelas[REG_REL_FIX_ICONS_WIN].janela_pointer));

gtk_container_set_border_width (GTK_CONTAINER (janela), 10);
g_signal_connect(GTK_WINDOW(janela),"delete-event",G_CALLBACK(gtk_widget_destroy),&janela);

relat_fix_prod_ordem_combo = gtk_combo_box_text_new();
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(relat_fix_prod_ordem_combo),"Código");
Expand Down
4 changes: 1 addition & 3 deletions src/Relatorios/fixados/terceiros/principal.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ int relat_fix_prod(){
gtk_window_set_resizable(GTK_WINDOW(janela),FALSE);
gtk_window_set_title(GTK_WINDOW(janela),"Relatório Fixo de Produtos");
gtk_window_set_icon_name(GTK_WINDOW(janela),"system-software-install");
gtk_window_set_transient_for(GTK_WINDOW(janela),GTK_WINDOW(janela_principal));

if(personalizacao.janela_keep_above==1)
gtk_window_set_keep_above(GTK_WINDOW(janela), TRUE);
gtk_container_set_border_width (GTK_CONTAINER (janela), 10);
g_signal_connect(GTK_WINDOW(janela),"delete-event",G_CALLBACK(gtk_widget_destroy),&janela);

gtk_widget_set_size_request(janela,800,500);
g_signal_connect(janela,"destroy",G_CALLBACK(ger_janela_fechada),&janelas_gerenciadas.vetor_janelas[REG_REL_FIX_PROD_WIN]);
Expand Down
2 changes: 1 addition & 1 deletion src/Relatorios/fixados/vendas/gerar.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ int relat_fix_vnd_gerar_fun(){
GDir *dir;
if(!(dir = g_dir_open(REL_FIX_VND_PATH,0,NULL))){
popup(NULL,"Diretorio sendo criado");
if(g_mkdir_with_parents(REL_FIX_VND_PATH, 777)){
if(g_mkdir_with_parents(REL_FIX_FIN_PATH, 777) == -1){
popup(NULL,"Não foi possível criar diretorio de relatorios");
return 1;
}
Expand Down
54 changes: 54 additions & 0 deletions src/Relatorios/planilhas/gerar.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
int planilhas_gerar(){
gint module = gtk_combo_box_get_active(GTK_COMBO_BOX(planilha_export_module_combo));
const gchar *dirname = gtk_entry_get_text(GTK_ENTRY(planilha_export_path_entry));
MYSQL_RES *res;
MYSQL_ROW row;
char query[MAX_QUERY_LEN];
char filename[strlen(dirname) + 12];
srand(time(NULL));
int r = rand();
int planilha_gerada=0;
sprintf(filename, "%s/%i.csv", dirname, r);

FILE *pathcache = fopen(EXP_PTH_CACHE, "w");
if(pathcache){
fprintf(pathcache,"%s",dirname);
fclose(pathcache);
}else{
file_logger("Nâo foi possível salvar caminho no cache");
file_logger(strerror(errno));
}
for(int cont=0;cont<PLANL_MOD_QNT;cont++){
if( planilhas_gerar_querys[cont][0] && ( atoi(planilhas_gerar_querys[cont][0]) == module ) ) {
planilha_gerada = 1;
strcpy(query, planilhas_gerar_querys[cont][1]);
}
}
if(!planilha_gerada){
popup(NULL,"Objeto da planilha não encontrado");
return 1;
}

if(!(res = consultar(query))){
popup(NULL,"Não foi possível gerar planilha");
return 1;
}
if(!mysql_num_rows(res)){
popup(NULL,"Não há dados a gerar");
return 1;
}
if(mysql_res_to_cvs_file(filename, res)){
popup(NULL,"Não foi possível criar a planilha");
return 1;
}

GError *error = NULL;
char open_path[MAX_PATH_LEN];
sprintf(open_path, "file://%s",filename);
if (!g_app_info_launch_default_for_uri (open_path , NULL, &error)) {
popup(NULL, "Não foi possível abrir arquivo exportado");
file_logger(error->message);
}

return 0;
}
8 changes: 8 additions & 0 deletions src/Relatorios/planilhas/gerar.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
int planilhas_gerar();

const char *planilhas_gerar_querys[][2] = {
{ENUM_TO_STR(PLANL_MOD_TERCEIROS), "SELECT * FROM terceiros"},
{ENUM_TO_STR(PLANL_MOD_PRODUTOS), "SELECT * FROM produtos"},
{ENUM_TO_STR(PLANL_MOD_MOVIMENTOS), "SELECT * FROM movimento_estoque"},
{NULL, NULL}
};
64 changes: 64 additions & 0 deletions src/Relatorios/planilhas/iconview.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
int planilha_icon_view_wnd(){

int N_COLUMNS=4;
planilha_relats_wnd = gtk_window_new(GTK_WINDOW_TOPLEVEL);
GtkWidget *search_entry = gtk_search_entry_new() ;
GtkTreeIter iter;
GtkTreeStore *modelo = gtk_tree_store_new(N_COLUMNS,G_TYPE_STRING,GDK_TYPE_PIXBUF,G_TYPE_INT, G_TYPE_INT);
GtkWidget *icon_view = gtk_icon_view_new();

janelas_gerenciadas.vetor_janelas[REG_REL_PLANL_ICONS_WIN].reg_id = REG_REL_PLANL_ICONS_WIN;
janelas_gerenciadas.vetor_janelas[REG_REL_PLANL_ICONS_WIN].aberta = 1;
if(ger_janela_aberta(planilha_relats_wnd, &janelas_gerenciadas.vetor_janelas[REG_REL_PLANL_ICONS_WIN]))
return 1;
janelas_gerenciadas.vetor_janelas[REG_REL_PLANL_ICONS_WIN].janela_pointer = planilha_relats_wnd;

gtk_widget_set_name(planilha_relats_wnd,"relat-fixos");
gtk_window_set_position(GTK_WINDOW(planilha_relats_wnd),3);
gtk_window_set_resizable(GTK_WINDOW(planilha_relats_wnd),FALSE);
gtk_window_set_title(GTK_WINDOW(planilha_relats_wnd),"Relatórios Planilhas");
gtk_window_set_icon_name(GTK_WINDOW(planilha_relats_wnd),"text-x-generic");
gtk_window_set_transient_for(GTK_WINDOW(planilha_relats_wnd),GTK_WINDOW(janela_principal));

gtk_tree_store_append(modelo,&iter,NULL);
gtk_tree_store_set(modelo,
&iter,
0,janelas_nomes[REG_REL_PLANL_TER_WIN],
1,gtk_image_get_pixbuf(GTK_IMAGE(gtk_image_new_from_file(REL_PLANL_TER_IMG))),
2,REG_REL_PLANL_TER_WIN,
3,PLANL_MOD_TERCEIROS,
-1);

gtk_tree_store_append(modelo,&iter,NULL);
gtk_tree_store_set(modelo,
&iter,
0,janelas_nomes[REG_REL_PLANL_PRODS_WIN],
1,gtk_image_get_pixbuf(GTK_IMAGE(gtk_image_new_from_file(REL_PLANL_PROD_IMG))),
2,REG_REL_PLANL_PRODS_WIN,
3,PLANL_MOD_PRODUTOS,
-1);

gtk_tree_store_append(modelo,&iter,NULL);
gtk_tree_store_set(modelo,
&iter,
0,janelas_nomes[REG_REL_PLANL_MOV_WIN],
1,gtk_image_get_pixbuf(GTK_IMAGE(gtk_image_new_from_file(REL_PLANL_MOV_IMG))),
2,REG_REL_PLANL_MOV_WIN,
3,PLANL_MOD_MOVIMENTOS,
-1);

gtk_icon_view_set_model(GTK_ICON_VIEW(icon_view),GTK_TREE_MODEL(modelo));
//gtk_icon_view_set_activate_on_single_click(GTK_ICON_VIEW(icon_view),TRUE);

gtk_icon_view_set_columns (GTK_ICON_VIEW(icon_view),3);
gtk_icon_view_set_text_column(GTK_ICON_VIEW(icon_view),0);
gtk_icon_view_set_pixbuf_column(GTK_ICON_VIEW(icon_view),1);

gtk_container_add(GTK_CONTAINER(planilha_relats_wnd),icon_view);

g_signal_connect(icon_view,"item-activated",G_CALLBACK(icon_view_select_caller_with_intarg), modelo);
g_signal_connect(planilha_relats_wnd,"destroy",G_CALLBACK(ger_janela_fechada),&janelas_gerenciadas.vetor_janelas[REG_REL_PLANL_ICONS_WIN]);

gtk_widget_show_all(planilha_relats_wnd);
return 0;
}
2 changes: 2 additions & 0 deletions src/Relatorios/planilhas/iconview.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
static GtkWidget *planilha_relats_wnd;
int planilha_icon_view_wnd();
Loading