Skip to content

Commit

Permalink
correcao bug posicoes colunas mysql correspondentes aos campos gtk entry
Browse files Browse the repository at this point in the history
  • Loading branch information
stdmedoth committed Jun 18, 2021
1 parent d2e0d72 commit 1d4f49a
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 44 deletions.
9 changes: 8 additions & 1 deletion data/desktop/style.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#sessao_infos{

padding: 5px;
border: solid 1px black;
color: Gainsboro;
Expand All @@ -24,6 +24,13 @@
background: Gainsboro;
}

#bar_buttons_notif_clean{
color: white;
padding: 5px;
background: green;
border-radius: 50%;
}

#bar_buttons_notif{
color: white;
padding: 5px;
Expand Down
15 changes: 10 additions & 5 deletions src/Gestao/Notificacao/notificacao.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ void notf_consultar_fun(GtkWidget *botao, struct _notf_strct *notf){
gchar id[12], parcela[12];
sprintf(id, "%i", notf->id);
sprintf(parcela, "%i", notf->id2);

if(notf->tipo == TP_TIT_PAG){
if(janelas_gerenciadas.vetor_janelas[CAD_TIT_PAG_WND].fun())
return ;
Expand Down Expand Up @@ -39,7 +39,7 @@ void notf_popupver_fun(GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewCo
STAT_COL,
N_COLUMNS
};

GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW(tree_view));
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
if(!gtk_tree_selection_get_selected(selection, &model, &iter))
Expand Down Expand Up @@ -119,11 +119,16 @@ int notificacoes_button_update(){
GtkWidget *evento = gtk_event_box_new();

gtk_box_pack_start(GTK_BOX(box), label,0,0,0);
gtk_widget_set_name(box,"bar_buttons_notif");

if(notificacao_pendencias){
gtk_widget_set_name(box,"bar_buttons_notif");
}else{
gtk_widget_set_name(box,"bar_buttons_notif_clean");
}


gtk_layout_put(GTK_LAYOUT(circle),box,20,20);
gtk_layout_put(GTK_LAYOUT(circle),image,0,0);

gtk_container_add(GTK_CONTAINER(evento),circle);
gtk_widget_set_events(evento,GDK_BUTTON_PRESS_MASK);

Expand Down
2 changes: 0 additions & 2 deletions src/Terceiros/altera.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,6 @@ int altera_ter()

gtk_widget_activate(transp_codigo_entry);



if(campo[PRAZ_TER_COL]){
if(atoi(campo[PRAZ_TER_COL])){
gtk_entry_set_text(GTK_ENTRY(prazo_ter_field),campo[PRAZ_TER_COL]);
Expand Down
42 changes: 14 additions & 28 deletions src/Terceiros/cadastro_terceiros.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,35 +73,21 @@ enum{
CID_TER_COL,
UF_TER_COL,
REND_TER_COL,
TRUA_TER_COL
TRUA_TER_COL,
TER_TRSP_COD_COL,
TER_TRSP_LOGR_COL,
TER_TRSP_NUM_COL,
TER_TRSP_BAIR_COL,
TER_TRSP_CID_COL,
TER_TRSP_UF_COL,
TER_TRSP_CEP_COL,
TER_TRSP_TEL_COL,
TER_TRSP_OBS_COL,
FLAG_MIN_FRT_PAG_COL,
VLR_MIN_FRT_PAG_COL,
PRAZ_TER_COL,
OBS_TER_COL
};
/*
#define TEL_TER_COL 16
#define CTEL_TER_COL 17
#define CEL_TER_COL 18
#define CCEL_TER_COL 19
#define EMAIL_TER_COL 20
#define CEMAIL_TER_COL 21
*/
enum {
TER_TRSP_COD_COL=16,
TER_TRSP_LOGR_COL=17,
TER_TRSP_NUM_COL=18,
TER_TRSP_BAIR_COL=19,
TER_TRSP_CID_COL=20,
TER_TRSP_UF_COL=21,
TER_TRSP_CEP_COL=22,
TER_TRSP_TEL_COL=23,
TER_TRSP_OBS_COL=24,
};


#define FLAG_MIN_FRT_PAG_COL 25
#define VLR_MIN_FRT_PAG_COL 26

#define PRAZ_TER_COL 27
#define OBS_TER_COL 28


#define TER_PAGE_ITENS 0
#define TER_PAGE_TRSP 1
Expand Down
9 changes: 1 addition & 8 deletions src/Terceiros/campos/contatos.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ int contatos_update(){
contatos_ter,
id);
}else{
sprintf(query,"insert into contatos(terceiro,nome, telefone, celular, email) values( %i, '%s', '%s', '%s', '%s')",
sprintf(query,"insert into contatos(terceiro, nome, telefone, celular, email) values( %i, '%s', '%s', '%s', '%s')",
contatos_ter,
nome,
telefone,
Expand All @@ -523,12 +523,5 @@ int contatos_update(){
}
}

//GtkListStore *contatos_model =(GtkListStore *) gtk_tree_view_get_model(GTK_TREE_VIEW( contatos_treeview ));
//if(contatos_model){
// g_object_ref(G_OBJECT(contatos_model));
// gtk_tree_view_set_model(GTK_TREE_VIEW(contatos_treeview),NULL);
// gtk_list_store_clear(contatos_model);
// gtk_tree_view_set_model(GTK_TREE_VIEW(contatos_treeview),GTK_TREE_MODEL(contatos_model));
//}
return 0;
}
1 change: 1 addition & 0 deletions src/Terceiros/campos/nome_fantasia.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
int ter_nome_fantasia_fun(){

ter_nome_fantasia_gchar = (gchar *) gtk_entry_get_text(GTK_ENTRY(ter_nome_fantasia_entry));
if(strlen(ter_nome_fantasia_gchar)<=0){
ter_nome_fantasia_gchar = strdup("");
Expand Down

0 comments on commit 1d4f49a

Please sign in to comment.