Ejemplo n.º 1
0
void  l_uosamort_knopka(GtkWidget *widget,class l_uosamort_data *data)
{

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("uosamort_knopka knop=%d\n",knop);

data->kl_shift=0; //Сбрасываем нажатый сшифт так как при после запуска нового меню он не сбрасывается

switch (knop)
 {
  case FK2:
    if(l_uosamort_v(data->innom,data->podr,"",data->hzt.ravno(),data->hna.ravno(),data->window) == 0)
     l_uosamort_create_list(data);
    return;  

  case SFK2:
    if(l_uosamort_v(data->innom,data->podr,data->data_v.ravno(),data->hzt.ravno(),data->hna.ravno(),data->window) == 0)
      l_uosamort_create_list(data);
    return;  

  case FK3:
    if(data->kolzap == 0)
      return;
    l_uosamort_udzap(data);
    l_uosamort_create_list(data);
    return;  


  case FK4:
    l_uosamort_ra(data);
    l_uosamort_create_list(data);
    return;  

  case FK5:
    l_uosamort_rasp(data);
    return;  

  case FK6:
    uosrsdw(data->innom,data->window);
    return;  

  case FK7:
    l_uosamort_ppr(data);
    return;  

  case FK8:
    l_uosamort_sd(data);
    return;  

    
  case FK10:
    gtk_widget_destroy(data->window);
    return;
 }
}
Ejemplo n.º 2
0
void  upl_pavt_v_e_knopka(GtkWidget *widget,class upl_pavt_m_data *data)
{
iceb_u_str kod("");
iceb_u_str naim("");

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
/*g_print("upl_pavt_v_e_knopka knop=%d\n",knop);*/

switch (knop)
 {
  case E_DATAN:

    if(iceb_calendar(&data->rk->datan,data->window) == 0)
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATAN]),data->rk->datan.ravno());
      
    return;  

  case E_DATAK:

    if(iceb_calendar(&data->rk->datak,data->window) == 0)
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATAK]),data->rk->datak.ravno());
      
    return;  

  case E_KOD_VOD:

    if(l_uplout(1,&kod,&naim,1,data->window) == 0)
     data->rk->kod_vod.z_plus(kod.ravno());

    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_VOD]),data->rk->kod_vod.ravno());
      
    return;  

  case E_KOD_AVT:

    if(l_uplavt(1,&kod,&naim,data->window) == 0)
     data->rk->kod_avt.z_plus(kod.ravno());

    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_AVT]),data->rk->kod_avt.ravno());
      
    return;  

  case E_KOD_POD:

    if(l_uplpod(1,&kod,&naim,data->window) == 0)
     data->rk->kod_pod.z_plus(kod.ravno());

    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_POD]),data->rk->kod_pod.ravno());
      
    return;  


 }
}
Ejemplo n.º 3
0
void  arz_m_e_knopka(GtkWidget *widget,class arz_m_data *data)
{
iceb_u_str kod("");
iceb_u_str naim("");

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("dvtmcf1_v_e_knopka knop=%d\n",knop);

switch (knop)
 {
  case E_DATA:
    iceb_calendar1(&data->rk->data,data->window);
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATA]),data->rk->data.ravno_toutf());
    return;
  case E_DATA_PER:

    if(iceb_calendar(&data->rk->data_per,data->window) == 0)
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATA_PER]),data->rk->data_per.ravno());
      
    return;  

   
  case E_TABNOM:
    if(l_sptbn(1,&kod,&naim,0,data->window) == 0)
     data->rk->tabnom.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_TABNOM]),data->rk->tabnom.ravno_toutf());
    return;
  
  case E_KOD_NAH:
    if(l_zarnah(1,&kod,&naim,data->window) == 0)
     data->rk->kod_nah.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_NAH]),data->rk->kod_nah.ravno_toutf());
    return;
  
  case E_PODR:
    if(l_zarpodr(1,&kod,&naim,data->window) == 0)
     data->rk->podr.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_PODR]),data->rk->podr.ravno_toutf());
    return;
  
  case E_KOD_GRUP_POD:
    if(l_gruppod(1,&kod,&naim,data->window) == 0)
     data->rk->kod_grup_pod.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_GRUP_POD]),data->rk->kod_grup_pod.ravno_toutf());
    return;

  case E_KOD_KAT:
    if(l_zarkateg(1,&kod,&naim,data->window) == 0)
     data->rk->kod_kat.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_KAT]),data->rk->kod_kat.ravno_toutf());
    return;
    
 }
}
Ejemplo n.º 4
0
void  ukrrpw_v_e_knopka(GtkWidget *widget,class ukrrpw_m_data *data)
{
iceb_u_str kod("");
iceb_u_str naim("");

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
/*g_print("ukrrpw_v_e_knopka knop=%d\n",knop);*/

switch (knop)
 {
  case E_DATAN:

    if(iceb_calendar(&data->rk->datan,data->window) == 0)
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATAN]),data->rk->datan.ravno());
      
    return;  

  case E_DATAK:

    if(iceb_calendar(&data->rk->datak,data->window) == 0)
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATAK]),data->rk->datak.ravno());
      
    return;  


  case E_SHETU:

    if(iceb_l_plansh(1,&kod,&naim,data->window) == 0)
      data->rk->shetu.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_SHETU]),data->rk->shetu.ravno_toutf());
      
    return;  

  case E_VIDKOM:

    if(l_ukrvk(1,&kod,&naim,data->window) == 0)
     data->rk->vidkom.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_VIDKOM]),data->rk->vidkom.ravno_toutf());
      
    return;  


  case E_KONTR:

    if(iceb_l_kontr(1,&kod,&naim,data->window) == 0)
     data->rk->kontr.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KONTR]),data->rk->kontr.ravno_toutf());
      
    return;  

   

 }
}
Ejemplo n.º 5
0
void   ras_kl_knopka(GtkWidget *widget,class ras_kl_data *data)
{


int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));

data->knopka=(int)knop;

gtk_widget_destroy(data->window);


}
Ejemplo n.º 6
0
void  zvb_alfabank_v_e_knopka(GtkWidget *widget,class zvb_alfabank_v_data *data)
{

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("dvtmcf1_v_e_knopka knop=%d\n",knop);

switch (knop)
 {


 }
}
Ejemplo n.º 7
0
void  l_uosoppknopka(GtkWidget *widget,class l_uosoppdata *data)
{

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("uosopp_knopka knop=%d\n",knop);

data->kl_shift=0; //Сбрасываем нажатый сшифт так как при после запуска нового меню он не сбрасывается

switch (knop)
 {
  case FK2:
    data->kodtv.new_plus("");
    l_uosopp_v(&data->kodtv,data->window);
    l_uosoppcreate_list(data);
    return;  

  case SFK2:

    if(l_uosopp_v(&data->kodv,data->window) == 0)
     data->kodtv.new_plus(data->kodv.ravno());
    l_uosoppcreate_list(data);
    return;  

  case FK3:
    if(data->kolzap == 0)
      return;
//    printf("data->snanomer=%d\n",data->snanomer);
    l_uosoppudzap(data);
    l_uosoppcreate_list(data);
    return;  

  case SFK3:
    l_uosoppunk(data->window);
    l_uosoppcreate_list(data);
    return;  

  case FK4:
    l_uosopp_p(&data->poi,data->window);
    l_uosoppcreate_list(data);
    return;  

  case FK5:
   l_uosopprasp(data);
    return;  

    
  case FK10:
//    printf("uosopp_knopka F10\n");
    data->metka_voz=1;
    gtk_widget_destroy(data->window);
    return;
 }
}
Ejemplo n.º 8
0
	static void shape_motion (GtkWidget *widget, GdkEventMotion *event)
	{
		gint xp, yp;
		CursorOffset * p;
		GdkModifierType mask;

		p = gtk_object_get_user_data (GTK_OBJECT (widget));

		//取得绝对位置
		gdk_window_get_pointer (root_win, &xp, &yp, &mask);
		gtk_widget_set_uposition (widget, xp  - p->x, yp  - p->y);
	}
Ejemplo n.º 9
0
void
on_mailboxdeleteok_clicked (GtkButton * button, gpointer UNUSED(user_data))
{
    char *m;

    m = ((mboxs *)
	gtk_object_get_user_data(GTK_OBJECT
	    (lookup_widget (GTK_WIDGET (button), "delete_mbox"))))->name;
    db_dropmbox (m);
    gtk_widget_destroy (lookup_widget (GTK_WIDGET (button), "delete_mbox"));
    set_mboxlist ();
}
Ejemplo n.º 10
0
void  zagotkl_v_e_knopka(GtkWidget *widget,class zagotkl_data *data)
{
iceb_u_str kod;
iceb_u_str naim;
kod.new_plus("");
naim.new_plus("");

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));

switch (knop)
 {
  case E_DATAO:

    if(iceb_calendar(&data->rk->datao,data->window) == 0)
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATAO]),data->rk->datao.ravno());
      
    return;  

   
  case E_SHET:

    iceb_vibrek(0,"Plansh",&data->rk->shet,data->window);
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_SHET]),data->rk->shet.ravno_toutf());

    return;  

  case E_SKLAD:

    iceb_vibrek(0,"Sklad",&data->rk->sklad,data->window);
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_SKLAD]),data->rk->sklad.ravno_toutf());

    return;  


  case E_KODMAT:

    if(l_mater(1,&kod,&naim,0,0,data->window) == 0)
     {
      data->rk->kodmat.z_plus(kod.ravno());
      gtk_entry_set_text(GTK_ENTRY(data->entry[E_KODMAT]),data->rk->kodmat.ravno_toutf());
     }

    return;  

  case E_KODGR:

    iceb_vibrek(0,"Grup",&data->rk->grupa,data->window);
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KODGR]),data->rk->grupa.ravno_toutf());

    return;  

 }
}
Ejemplo n.º 11
0
void  vrshet_v_knopka(GtkWidget *widget,class vrshet_v_data *data)
{
char strsql[300];
iceb_u_str shet;
iceb_u_str naim;

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));

iceb_sql_flag flagg;
switch ((gint)knop)
 {
  case FK2:
    for(int i=0; i < KOLENTER; i++)
      gtk_signal_emit_by_name(GTK_OBJECT(data->entry[i]),"activate");
    iceb_refresh();
    printf("kodkl=%s\n",data->rekh.kodkl.ravno());    

    memset(strsql,'\0',sizeof(strsql));
    if(data->rekh.kodkl.getdlinna() > 1)
     {
      //Проверяем есть код клиента в списке клиентов
      sprintf(strsql,"select kod from Taxiklient where kod='%s'",data->rekh.kodkl.ravno());
      if(iceb_sql_readkey(strsql,data->window) != 1)
       {
        sprintf(strsql,"%s %s !",gettext("Не найден код клиента"),data->rekh.kodkl.ravno());
        iceb_menu_soob(strsql,data->window);
        return;
        
       }
     }
    if(data->rekh.metka == 0 && data->rekh.kodkl.getdlinna() > 1)
      if(rest_flag_kl(&flagg,data->rekh.kodkl.ravno(),data->window) != 0)
       return;
      
    if(vrshet_zaph(&data->rekh,data->window) != 0)
     return;  
      

    if(data->timer != 0)
        gtk_timeout_remove(data->timer);
    gtk_widget_destroy(data->window);
    data->window=NULL;
    data->voz=0;
    return;  


  case FK10:
    gtk_widget_destroy(data->window);
    data->window=NULL;
    data->voz=1;
    return;
 }
}
Ejemplo n.º 12
0
void    dvtmcf3_v_vvod(GtkWidget *widget,class dvtmcf3_data *data)
{
//short d,m,g;

    int enter=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("dvtmcf3_v_vvod enter=%d\n",enter);

    switch (enter)
    {
    case E_DATAN:
        data->rk->datan.new_plus(iceb_u_fromutf((char*)gtk_entry_get_text(GTK_ENTRY(widget))));
        break;

    case E_DATAK:
        data->rk->datak.new_plus(iceb_u_fromutf((char*)gtk_entry_get_text(GTK_ENTRY(widget))));
        break;

    case E_SHET:
        data->rk->shet.new_plus(iceb_u_fromutf((char*)gtk_entry_get_text(GTK_ENTRY(widget))));
        break;

    case E_SKLAD:
        data->rk->sklad.new_plus(iceb_u_fromutf((char*)gtk_entry_get_text(GTK_ENTRY(widget))));
        break;

    case E_KODGR:
        data->rk->grupa_mat.new_plus(iceb_u_fromutf((char*)gtk_entry_get_text(GTK_ENTRY(widget))));
        break;

    case E_KODMAT:
        data->rk->kodmat.new_plus(iceb_u_fromutf((char*)gtk_entry_get_text(GTK_ENTRY(widget))));
        break;

    case E_GRUPA_KONTR:
        data->rk->grupa_kontr.new_plus(iceb_u_fromutf((char*)gtk_entry_get_text(GTK_ENTRY(widget))));
        break;

    case E_VCENA:
        data->rk->vcena.new_plus(iceb_u_fromutf((char*)gtk_entry_get_text(GTK_ENTRY(widget))));
        break;

    }

    enter+=1;

    if(enter >= KOLENTER)
        enter=0;

    gtk_widget_grab_focus(data->entry[enter]);

}
Ejemplo n.º 13
0
void  admin_user_knopka(GtkWidget *widget,class admin_user_data *data)
{

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("admin_usern_knopka knop=%d\n",knop);
data->kl_shift=0; //Сбрасываем нажатый сшифт так как при после запуска нового меню он не сбрасывается
char strsql[512];
switch (knop)
 {

  case FK3: /*Удалить запись в таблице*/
    if(iceb_menu_danet("Удалить запись? Вы уверены?",2,data->window) == 2)
     return;

    sprintf(strsql,"delete from db where Host='%s' and Db='%s' and User='******'",
    data->host.ravno(),data->imabaz.ravno(),data->login.ravno());

    iceb_sql_zapis(strsql,1,1,data->window);    

    iceb_sql_zapis("FLUSH PRIVILEGES",1,1,data->window);    

    /*если нет больше записей с этим логином то проверям возможность удаления в icebuser*/
    sprintf(strsql,"select User from db where Db='%s' and User='******'",data->imabaz.ravno(),data->login.ravno());
    if(sql_readkey(&bd,strsql) > 0) /*Запись есть*/
     {
      admin_user_create_list(data);
      return;
     }
    if(prov_uduserw(data->login.ravno(),data->imabaz.ravno(),0,data->window) != 0)
     {
      admin_user_create_list(data);
      return;
     }
    sprintf(strsql,"delete from %s.icebuser where login='******'",data->imabaz.ravno(),data->login.ravno());
    iceb_sql_zapis(strsql,1,0,data->window);

    admin_user_create_list(data);
    return;  

  case FK4: /*Поиск записей*/
    admin_user_p(&data->rp,data->window);

    admin_user_create_list(data);
    return;  
   
  case FK10:
    gtk_widget_destroy(data->window);
    return;
 }
}
Ejemplo n.º 14
0
void  iceb_l_ei_knopka(GtkWidget *widget,class iceb_l_ei_data *data)
{
//char    bros[512];
iceb_u_str repl;

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("iceb_l_ei_knopka knop=%d\n",knop);

switch (knop)
 {
  case FK2:
    iceb_l_ei_v(&data->ei_tv,data->window);
    iceb_l_ei_create_list(data);
    return;  

  case SFK2:
    if(data->kolzap == 0)
      return;
    iceb_l_ei_v(&data->kodv,data->window);
    iceb_l_ei_create_list(data);
    return;  

  case FK3:
    if(data->kolzap == 0)
      return;
    iceb_l_ei_udzap(data);
    iceb_l_ei_create_list(data);
    return;  


  case FK4:
    if(iceb_l_ei_p(&data->poisk,data->window) == 0)
     data->metka_poi=1;
    else
     data->metka_poi=0;
    iceb_l_ei_create_list(data);
    return;  

  case FK5:
    iceb_l_ei_rasp(data);
    return;  

    
  case FK10:
//    printf("iceb_l_ei_knopka F10\n");
    data->metka_voz=1;
    gtk_widget_destroy(data->window);
    return;
 }
}
Ejemplo n.º 15
0
static void ok_clicked(GtkWidget * widget, GtkWidget * tree)
{
    GtkCTreeNode *node;
    DirNode *dirnode;
    GList *list_node;
    GtkWidget *window;
    void (*handler) (gchar *);

    window = gtk_object_get_user_data(GTK_OBJECT(widget));
    gtk_widget_hide(window);
    list_node = GTK_CLIST(tree)->selection;
    while (list_node)
    {
        node = list_node->data;
        dirnode = gtk_ctree_node_get_row_data(GTK_CTREE(tree), node);
        handler = (void (*)(gchar *)) gtk_object_get_user_data(GTK_OBJECT(tree));
        if (handler)
            handler(dirnode->path);
        list_node = g_list_next(list_node);
    }
    gtk_widget_destroy(window);

}
Ejemplo n.º 16
0
Archivo: xqf-ui.c Proyecto: IR4T4/xqf
void progress_bar_reset (GtkWidget *pbar) {
	struct pbarinfo *info;

	info = gtk_object_get_user_data (GTK_OBJECT (pbar));

	if (info->activity_mode) {
		gtk_timeout_remove (info->timeout_id);
		info->activity_mode = FALSE;
	}

	gtk_progress_set_activity_mode (GTK_PROGRESS (pbar), FALSE);
	gtk_progress_set_show_text (GTK_PROGRESS (pbar), FALSE);
	gtk_progress_set_percentage (GTK_PROGRESS (pbar), 0.0);
}
Ejemplo n.º 17
0
void  zar_otrsh_m_e_knopka(GtkWidget *widget,class zar_otrsh_m_data *data)
{
iceb_u_str kod("");
iceb_u_str naim("");

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("dvtmcf1_v_e_knopka knop=%d\n",knop);

switch (knop)
 {
  case E_DATAN:
    iceb_calendar1(&data->rk->datan,data->window);
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATAN]),data->rk->datan.ravno_toutf());
    return;

  case E_DATAK:
    iceb_calendar1(&data->rk->datak,data->window);
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATAK]),data->rk->datak.ravno_toutf());
    return;

   
  case E_TABNOM:
    if(l_sptbn(1,&kod,&naim,0,data->window) == 0)
     data->rk->tabnom.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_TABNOM]),data->rk->tabnom.ravno_toutf());
    return;
  
  case E_PODR:
    if(l_zarpodr(1,&kod,&naim,data->window) == 0)
     data->rk->podr.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_PODR]),data->rk->podr.ravno_toutf());
    return;
  

  case E_KOD_KAT:
    if(l_zarkateg(1,&kod,&naim,data->window) == 0)
     data->rk->kod_kat.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_KAT]),data->rk->kod_kat.ravno_toutf());
    return;

  case E_KOD_TAB:

    if(l_zarvidtab(1,&kod,&naim,data->window) == 0)
     data->rk->kod_tab.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_TAB]),data->rk->kod_tab.ravno_toutf());

    return;  
    
 }
}
Ejemplo n.º 18
0
/**
 * Test whether we can move off format page.
 * \return <i>TRUE</i> if OK to move off page.
 */
static gboolean exp_html_move_format( void ) {
	gboolean retVal = FALSE;
	GtkWidget *menu, *menuItem;
	gint id;

	/* Set stylesheet */
	menu = gtk_option_menu_get_menu( GTK_OPTION_MENU( exphtml_dlg.optmenuCSS ) );
	menuItem = gtk_menu_get_active( GTK_MENU( menu ) );
	id = GPOINTER_TO_INT( gtk_object_get_user_data(GTK_OBJECT(menuItem)) );
	exporthtml_set_stylesheet( _exportCtl_, id );

	/* Set name format */
	menu = gtk_option_menu_get_menu( GTK_OPTION_MENU( exphtml_dlg.optmenuName ) );
	menuItem = gtk_menu_get_active( GTK_MENU( menu ) );
	id = GPOINTER_TO_INT( gtk_object_get_user_data(GTK_OBJECT(menuItem)) );
	exporthtml_set_name_format( _exportCtl_, id );

	exporthtml_set_banding( _exportCtl_,
		gtk_toggle_button_get_active(
			GTK_TOGGLE_BUTTON( exphtml_dlg.checkBanding ) ) );
	exporthtml_set_link_email( _exportCtl_,
		gtk_toggle_button_get_active(
			GTK_TOGGLE_BUTTON( exphtml_dlg.checkLinkEMail ) ) );
	exporthtml_set_attributes( _exportCtl_,
		gtk_toggle_button_get_active(
			GTK_TOGGLE_BUTTON( exphtml_dlg.checkAttributes ) ) );

	/* Process export */
	exporthtml_process( _exportCtl_, _addressCache_ );
	if( _exportCtl_->retVal == MGU_SUCCESS ) {
		retVal = TRUE;
	}
	else {
		export_html_status_show( _( "Error creating HTML file" ) );
	}
	return retVal;
}
Ejemplo n.º 19
0
Archivo: xqf-ui.c Proyecto: IR4T4/xqf
void progress_bar_start (GtkWidget *pbar, int activity_mode) {
	struct pbarinfo *info;

	progress_bar_reset (pbar);

	if (activity_mode) {
		info = gtk_object_get_user_data (GTK_OBJECT (pbar));
		info->activity_mode = TRUE;
		info->timeout_id = gtk_timeout_add (100, (GtkFunction) progress_bar_timeout_callback, pbar);
		gtk_progress_set_activity_mode (GTK_PROGRESS (pbar), TRUE);
	}
	else {
		gtk_progress_set_show_text (GTK_PROGRESS (pbar), TRUE);
	}
}
Ejemplo n.º 20
0
void    impmatdok_m_v_vvod(GtkWidget *widget,class impmatdok_m_data *data)
{

int enter=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("impmatdok_m_v_vvod enter=%d\n",enter);

switch (enter)
 {
  case E_IMAF:
    data->imafz->new_plus(iceb_u_fromutf((char*)gtk_entry_get_text(GTK_ENTRY(widget))));
    break;

 }
 
}
Ejemplo n.º 21
0
void  zar_kateg_m_knopka(GtkWidget *widget,class zar_kateg_m_data *data)
{

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("zar_kateg_m_knopka knop=%d\n",knop);

switch (knop)
 {
  case FK2:

    data->rk->metka_ras=0;

fk2:;
    data->read_rek();
    if(data->rk->datan.prov_dat1() != 0)
     {
      iceb_menu_soob(gettext("Неправильно введена дата начала !"),data->window);
      return;
     }

    if(data->rk->datak.prov_dat1() != 0)
     {
      iceb_menu_soob(gettext("Неправильно введена дата конца !"),data->window);
      return;
     }

    data->voz=0;
    gtk_widget_destroy(data->window);
    return;  

  case FK3:
    data->rk->metka_ras=1;
    goto fk2;
    
  case FK4:
    data->clear_rek();
    return;

  case FK5:
    iceb_f_redfil("zarpodrk.alx",0,data->window);
    return;
      
  case FK10:
    data->voz=1;
    gtk_widget_destroy(data->window);
    return;
 }
}
Ejemplo n.º 22
0
void  vmat_mc_v_knopka(GtkWidget *widget,class vmat_mc_data *data)
{
short dn,mn,gn;
char bros[512];

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));

switch (knop)
 {
  case FK2:
    data->read_rek(); //Читаем реквизиты меню
    if(data->datan.getdlinna() > 1);
    if(iceb_u_rsdat(&dn,&mn,&gn,data->datan.ravno(),1) != 0)
     {
      iceb_u_str repl;
      repl.plus(gettext("Не верно введена дата !"));
      iceb_menu_soob(&repl,data->window);
      return;
     }
    if(iceb_provinnom(data->innom.ravno(),data->window) != 0)
     return;
    
    gtk_widget_destroy(data->window);
    data->window=NULL;
    data->voz=0;
    return;  
/********
  case FK3:
    return;
***************/
  case FK4:
    data->clear_rek();
    return;

  case FK5:
    sprintf(bros,"%d",iceb_invnomer(data->window));
    data->innom.new_plus(bros);
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_INNOM]),data->innom.ravno());
    
    return;
    
  case FK10:
    gtk_widget_destroy(data->window);
    data->window=NULL;
    data->voz=1;
    return;
 }
}
Ejemplo n.º 23
0
/*---------------------------------------------------------------------*/
obj_t
bglk_gtk_glist_objs( GList *slist ) {
   obj_t res = BNIL;
   
   while( slist ) {
      GtkWidget *item;
      
      item = slist->data;
      res = make_pair( BREF( gtk_object_get_user_data( GTK_OBJECT( item ) ) ),
		       res );
      
      slist = slist->next;
   }

   return res;
}
Ejemplo n.º 24
0
void  iceb_copfil_v_e_knopka(GtkWidget *widget,class iceb_copfil_data *data)
{
class iceb_u_str kod("");

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("dvtmcf1_v_e_knopka knop=%d\n",knop);

switch (knop)
 {
  case E_PUT:
     if(iceb_dir_select(&kod,gettext("Поиск нужного каталога"),data->window) == 0)
      gtk_entry_set_text(GTK_ENTRY(data->entry[E_PUT]),kod.ravno_toutf());
      
    return;  
 }
}
Ejemplo n.º 25
0
void get_value( GtkWidget *widget,
		gpointer data )
{
  gchar buf[32];
  GtkLabel *label;
  GtkSpinButton *spin;

  spin = GTK_SPIN_BUTTON (spinner1);
  label = GTK_LABEL (gtk_object_get_user_data (GTK_OBJECT (widget)));
  if (GPOINTER_TO_INT (data) == 1)
    sprintf (buf, "%d", gtk_spin_button_get_value_as_int (spin));
  else
    sprintf (buf, "%0.*f", spin->digits,
             gtk_spin_button_get_value_as_float (spin));
  gtk_label_set_text (label, buf);
}
Ejemplo n.º 26
0
void  l_uosindm_knopka(GtkWidget *widget,class l_uosindm_data *data)
{
//char    bros[512];
iceb_u_str repl;

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("l_uosindm_knopka knop=%d\n",knop);

switch (knop)
 {
  case FK2:
    l_uosindm_v(data->innom,&data->kod_kat_tv,data->window);

    l_uosindm_create_list(data);
    return;  

  case SFK2:
    if(data->kolzap == 0)
      return;
    l_uosindm_v(data->innom,&data->kodv,data->window);

    l_uosindm_create_list(data);
    return;  

  case FK3:
    if(data->kolzap == 0)
      return;
    if(iceb_menu_danet(gettext("Удалить запись ? Вы уверены ?"),2,data->window) != 1)
     return;
    l_uosindm_udzap(data);
    l_uosindm_create_list(data);
    return;  
  



  case FK5:
    l_uosindm_rasp(data);
    return;  

    
  case FK10:
    data->metka_voz=1;
    gtk_widget_destroy(data->window);
    return;
 }
}
Ejemplo n.º 27
0
void  doksmat_knopka(GtkWidget *widget,class doksmat_data *data)
{
//char    bros[512];
iceb_u_str repl;

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
data->kl_shift=0; //Сбрасываем нажатый сшифт так как при после запуска нового меню он не сбрасывается

switch (knop)
 {

  case FK2:
    if(data->kolzap == 0)
     return;
    l_dokmat(&data->datav,data->tipzv,&data->skladv,&data->nomdokv,data->window);
    /*При выходе из документа устанвливаются метки на документ*/
    doksmat_create_list(data);
    return;  

  case FK4:
    l_doksmat_p(&data->rk,data->window);
    doksmat_create_list(data);
    return;  

  case FK5:
    if(data->kolzap == 0)
     return;
    doksmat_ras(data);
    return;  

  case FK6:
    l_dokmat_eko(data);
    return;  

  case FK9:
    data->rk.metka_opl++;
    if(data->rk.metka_opl > 2)
     data->rk.metka_opl=0;    
    doksmat_create_list(data);
    return;  
    
  case FK10:
//    printf("doksmat_knopka F10\n");
    gtk_widget_destroy(data->window);
    return;
 }
}
Ejemplo n.º 28
0
void  kasothkcn_v_e_knopka(GtkWidget *widget,class kasothkcn_data *data)
{
class iceb_u_str kod("");
class iceb_u_str naim("");

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));

switch (knop)
 {
  case E_DATAN:

    if(iceb_calendar(&data->rk->datan,data->window) == 0)
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATAN]),data->rk->datan.ravno());
      
    return;  

  case E_DATAK:

    if(iceb_calendar(&data->rk->datak,data->window) == 0)
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATAK]),data->rk->datak.ravno());
      
    return;  

  case E_KODOP:
    vib_kodop_kas(&data->rk->kodop,data->window);
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KODOP]),data->rk->kodop.ravno_toutf());
    return;  


  case E_KASSA:
    if(l_spis_kas(1,&kod,&naim,data->window) == 0)
      data->rk->kassa.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KASSA]),data->rk->kassa.ravno_toutf());
    return;

  case E_SHET:
    iceb_vibrek(0,"Plansh",&data->rk->shet,data->window);
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_SHET]),data->rk->shet.ravno_toutf());
    return;

  case E_KOD_CN:
    if(l_kaskcn(1,&kod,&naim,data->window) == 0)
     data->rk->kod_cn.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_CN]),data->rk->kod_cn.ravno_toutf());
    return;
 }
}
Ejemplo n.º 29
0
void    l_upldok_vzr_vvod(GtkWidget *widget,class l_upldok_vzr_data *data)
{
int enter=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("l_upldok_vzr_vvod enter=%d\n",enter);
switch (enter)
 {

    

 }

enter+=1;
if(enter >= KOLENTER)
enter=0;
gtk_widget_grab_focus(data->entry[enter]);
 
}
Ejemplo n.º 30
0
void  iceb_l_smenabaz_v_knopka(GtkWidget *widget,class iceb_l_smenabaz_v_data *data)
{
SQL_baza bdhost;
struct  passwd  *ktor; /*Кто работает*/
int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("iceb_l_smenabaz_v_knopka knop=%d\n",knop);

switch (knop)
 {
  case FK2:
    data->read_rek();
    ktor=getpwuid(getuid());

    if(sql_openbaz(&bdhost,"",data->hostnabazu.ravno(),ktor->pw_name,data->parolnahost.ravno()) != 0)
     {
      iceb_eropbaz("",ktor->pw_uid,ktor->pw_name,1);
      return;
     }

    sql_closebaz(&bdhost);

    delete [] parol;
    delete [] host;    

    parol=new char[data->parolnahost.getdlinna()];
    strcpy(parol,data->parolnahost.ravno());

    host=new char[data->hostnabazu.getdlinna()];
    strcpy(host,data->hostnabazu.ravno());
//    printf("%s-host=%s parol=%s\n",__FUNCTION__,host,parol);    
    data->voz=0;
    gtk_widget_destroy(data->window);
    return;  

  case FK4:
    data->clear_data();
    return;  


  case FK10:
    data->voz=1;
    gtk_widget_destroy(data->window);

    return;
 }
}