ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
* [sisyphus] Есть тут спецы по GTK+ ?
@ 2003-02-06 13:00 Korshunov Ilya
  2003-02-06 14:54 ` Someone Unknown
  0 siblings, 1 reply; 5+ messages in thread
From: Korshunov Ilya @ 2003-02-06 13:00 UTC (permalink / raw)
  To: sisyphus

[-- Attachment #1: Type: text/plain, Size: 1365 bytes --]

Не собирается софтинка. 
Сама софтинка есть в сизифе (gtknw2), сорцы взяты оттуда. Внес небольшие 
изменения , ошибки которые кажет компайлер моих изменений не касаются. 
Может кто подскажет в чем затык - 

gcc -DHAVE_CONFIG_H -I. -I. -I.. -DPACKAGE_DATA_DIR=\""/usr/share"\" 
-DPACKAGE_LOCALE_DIR=\""/usr/share/locale"\" -I/usr/include/gtk-2.0 
-I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 
-I/usr/include/pango-1.0 -I/usr/include/Xft2 -I/usr/include/freetype2 
-I/usr/X11R6/include -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include      -pipe -Wall -O2 
-fexpensive-optimizations -march=i686 -c `test -f 'callbacks.c' || echo 
'./'`callbacks.c
callbacks.c: In function `on_entry_username_focus_out_event':
callbacks.c:31: warning: implicit declaration of function `strcpy'
callbacks.c: In function `on_login_button_clicked':
callbacks.c:91: warning: implicit declaration of function `strlen'
callbacks.c:119: too many arguments to function `create_quick_dialog'
callbacks.c:123: warning: implicit declaration of function 
`write_config'
make[2]: *** [callbacks.o] Error 1
make[2]: Leaving directory `/usr/src/RPM/BUILD/gtknw2-0.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/RPM/BUILD/gtknw2-0.2'
make: *** [all] Error 2
ошибка: Неверный код возврата из /var/tmp/rpm-tmp.61258 (%build)

callback.c и .h прилагается. 





[-- Attachment #2: callbacks.c --]
[-- Type: text/x-csrc, Size: 4195 bytes --]

#ifdef HAVE_CONFIG_H
#  include <config.h>
#endif

#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <gtk/gtk.h>

#include "callbacks.h"
#include "interface.h"
#include "support.h"

extern char iusername[1024], iserver[1024], icontext[1024], imountpoint[1024];
char ipassword[1024];

void
on_main_window_destroy                 (GtkObject       *object,
                                        gpointer         user_data)
{
 exit (0);
}


gboolean
on_entry_username_focus_out_event      (GtkWidget       *widget,
                                        GdkEventFocus   *event,
                                        gpointer         user_data)
{
  bzero( iusername, 1024 );
  strcpy( iusername, (char *)gtk_entry_get_text( (GtkEntry*)widget ) );
  return FALSE;
}


gboolean
on_entry_password_focus_out_event      (GtkWidget       *widget,
                                        GdkEventFocus   *event,
                                        gpointer         user_data)
{
  bzero (ipassword, 1024);
  strcpy (ipassword, (char *) gtk_entry_get_text ((GtkEntry*)widget));
  return FALSE;
}


gboolean
on_entry_context_focus_out_event       (GtkWidget       *widget,
                                        GdkEventFocus   *event,
                                        gpointer         user_data)
{
  bzero (icontext, 1024);
  strcpy (icontext, (char *) gtk_entry_get_text ((GtkEntry*)widget));
  return FALSE;
}


gboolean
on_entry_mountpoint_focus_out_event    (GtkWidget       *widget,
                                        GdkEventFocus   *event,
                                        gpointer         user_data)
{
  bzero (imountpoint, 1024);
  strcpy (imountpoint, (char *) gtk_entry_get_text ((GtkEntry*)widget));
  return FALSE;
}


gboolean
on_combo_entry_server_focus_out_event  (GtkWidget       *widget,
                                        GdkEventFocus   *event,
                                        gpointer         user_data)
{
  bzero (iserver, 1024);
  strcpy (iserver, (char *) gtk_entry_get_text((GtkEntry*)widget));
  return FALSE;
}


void
on_login_button_clicked                (GtkButton       *button,
                                        gpointer         user_data)
{ GtkWidget *dialog_warning;
  gchar command[1024], *buffout, *bufferr;
  gint exitstatus;
  GError *error;

  bzero (command, 1024);
  strcpy (command, "ncpmount ");

  if (strlen(iserver) > 0)
     sprintf(command + strlen(command), "-S %s ", iserver);

  if (strlen(iusername) > 0)
     sprintf(command + strlen(command), "-U %s", iusername);

  if (strlen(icontext) > 0)
     sprintf(command + strlen(command), ".%s ", icontext);
  else
     *(command + strlen(command)) = ' ';

  if (strlen(ipassword) > 0)
     sprintf(command + strlen(command), "-P %s ", ipassword);
  else
     strcpy(command + strlen(command), "-n ");

  if (strlen(imountpoint) > 0)
     strcpy(command + strlen(command), imountpoint);

  g_spawn_command_line_sync(command,&buffout,&bufferr,&exitstatus,&error);
  if (exitstatus)
     { strcpy (command, _("Ncpmount reports following error:\n\n"));
       if (strlen(bufferr) > 0)
          { strcpy(command + strlen(command), bufferr);
	    strcpy (command + strlen(command), "\n");
	   }
       if (strlen(buffout) > 0)
          strcpy(command + strlen(command), buffout);
       dialog_warning = create_quick_dialog(_("Warning!"), command);
       gtk_widget_show(dialog_warning);
      }
  else
     { write_config();
       exit(0);
      }
}


void
on_cancel_button_clicked               (GtkButton       *button,
                                        gpointer         user_data)
{
  exit(0);
}


void
on_about_button_clicked                (GtkButton       *button,
                                        gpointer         user_data)
{
  /* Temporatly removed by KOSHA - errors mothefucker GtkWidget *dialog_about;
  dialog_about = create_quick_dialog(_("About gtknw2"),
     _("gtk+2 Netware Client 0.2\n\n"
     "written by\n"
     "Chris Ross <chris@darkrock.co.uk>\n"
     "Grigory Batalov <bga@altlinux.ru>\n"
     "http://www.lrn.ru/~bga/gtknw2/\n\n"
     "Distributed under the GPL") );
  gtk_widget_show(dialog_about);
*/
}


[-- Attachment #3: callbacks.h --]
[-- Type: text/x-chdr, Size: 1622 bytes --]

#include <gtk/gtk.h>


void
on_main_window_destroy                 (GtkObject       *object,
                                        gpointer         user_data);

gboolean
on_entry_username_focus_out_event      (GtkWidget       *widget,
                                        GdkEventFocus   *event,
                                        gpointer         user_data);

gboolean
on_entry_password_focus_out_event      (GtkWidget       *widget,
                                        GdkEventFocus   *event,
                                        gpointer         user_data);

gboolean
on_entry_context_focus_out_event       (GtkWidget       *widget,
                                        GdkEventFocus   *event,
                                        gpointer         user_data);

gboolean
on_entry_mountpoint_focus_out_event    (GtkWidget       *widget,
                                        GdkEventFocus   *event,
                                        gpointer         user_data);

gboolean
on_combo_entry_server_focus_out_event  (GtkWidget       *widget,
                                        GdkEventFocus   *event,
                                        gpointer         user_data);

void
on_login_button_clicked                (GtkButton       *button,
                                        gpointer         user_data);

void
on_cancel_button_clicked               (GtkButton       *button,
                                        gpointer         user_data);

void
on_about_button_clicked                (GtkButton       *button,
                                        gpointer         user_data);

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [sisyphus] Есть тут спецы по GTK+ ?
  2003-02-06 13:00 [sisyphus] Есть тут спецы по GTK+ ? Korshunov Ilya
@ 2003-02-06 14:54 ` Someone Unknown
  2003-02-06 15:13   ` Korshunov Ilya
  2003-02-06 15:18   ` Aleksey Novodvorsky
  0 siblings, 2 replies; 5+ messages in thread
From: Someone Unknown @ 2003-02-06 14:54 UTC (permalink / raw)
  To: sisyphus

В сообщении от 6 Февраль 2003 16:00 Korshunov Ilya написал:
> Не собирается софтинка.
> Сама софтинка есть в сизифе (gtknw2), сорцы взяты оттуда. Внес
> небольшие изменения , ошибки которые кажет компайлер моих изменений
> не касаются. Может кто подскажет в чем затык -
>
> gcc -DHAVE_CONFIG_H -I. -I. -I.. -DPACKAGE_DATA_DIR=\""/usr/share"\"
> -DPACKAGE_LOCALE_DIR=\""/usr/share/locale"\" -I/usr/include/gtk-2.0
> -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0
> -I/usr/include/pango-1.0 -I/usr/include/Xft2 -I/usr/include/freetype2
> -I/usr/X11R6/include -I/usr/include/glib-2.0
> -I/usr/lib/glib-2.0/include      -pipe -Wall -O2
> -fexpensive-optimizations -march=i686 -c `test -f 'callbacks.c' ||
> echo './'`callbacks.c
> callbacks.c: In function `on_entry_username_focus_out_event':
> callbacks.c:31: warning: implicit declaration of function `strcpy'
> callbacks.c: In function `on_login_button_clicked':
> callbacks.c:91: warning: implicit declaration of function `strlen'
> callbacks.c:119: too many arguments to function `create_quick_dialog'
> callbacks.c:123: warning: implicit declaration of function
> `write_config'
> make[2]: *** [callbacks.o] Error 1
> make[2]: Leaving directory `/usr/src/RPM/BUILD/gtknw2-0.2/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/usr/src/RPM/BUILD/gtknw2-0.2'
> make: *** [all] Error 2
> ошибка: Неверный код возврата из /var/tmp/rpm-tmp.61258 (%build)
>
> callback.c и .h прилагается.

Неплохо бы добавить в callbacks.c
#include <string.h>

Именно string, а не strings.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [sisyphus] Есть тут спецы по GTK+ ?
  2003-02-06 14:54 ` Someone Unknown
@ 2003-02-06 15:13   ` Korshunov Ilya
  2003-02-06 15:18   ` Aleksey Novodvorsky
  1 sibling, 0 replies; 5+ messages in thread
From: Korshunov Ilya @ 2003-02-06 15:13 UTC (permalink / raw)
  To: sisyphus

> Неплохо бы добавить в callbacks.c
> #include <string.h>
>
> Именно string, а не strings.

Ага , пошли дальше. 
Замечу - я не вносил сюда изменений. Это src rpm из сизифа :))

gcc -DHAVE_CONFIG_H -I. -I. -I.. -DPACKAGE_DATA_DIR=\""/usr/share"\" 
-DPACKAGE_LOCALE_DIR=\""/usr/share/locale"\" -I/usr/include/gtk-2.0 
-I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 
-I/usr/include/pango-1.0 -I/usr/include/Xft2 -I/usr/include/freetype2 
-I/usr/X11R6/include -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include      -pipe -Wall -O2 
-fexpensive-optimizations -march=i686 -c `test -f 'callbacks.c' || echo 
'./'`callbacks.c
callbacks.c: In function `on_login_button_clicked':
callbacks.c:120: too many arguments to function `create_quick_dialog'
callbacks.c:124: warning: implicit declaration of function 
`write_config'
make[2]: *** [callbacks.o] Error 1
make[2]: Leaving directory `/usr/src/RPM/BUILD/gtknw2-0.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/RPM/BUILD/gtknw2-0.2'
make: *** [all] Error 2
ошибка: Неверный код возврата из /var/tmp/rpm-tmp.20561 (%build)



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [sisyphus] Есть тут спецы по GTK+ ?
  2003-02-06 14:54 ` Someone Unknown
  2003-02-06 15:13   ` Korshunov Ilya
@ 2003-02-06 15:18   ` Aleksey Novodvorsky
  2003-02-06 15:22     ` Korshunov Ilya
  1 sibling, 1 reply; 5+ messages in thread
From: Aleksey Novodvorsky @ 2003-02-06 15:18 UTC (permalink / raw)
  To: sisyphus

Someone Unknown пишет:

>В сообщении от 6 Февраль 2003 16:00 Korshunov Ilya написал:
>  
>
>>Не собирается софтинка.
>>Сама софтинка есть в сизифе (gtknw2), сорцы взяты оттуда. Внес
>>небольшие изменения , ошибки которые кажет компайлер моих изменений
>>не касаются. Может кто подскажет в чем затык -
>>
>>gcc -DHAVE_CONFIG_H -I. -I. -I.. -DPACKAGE_DATA_DIR=\""/usr/share"\"
>>-DPACKAGE_LOCALE_DIR=\""/usr/share/locale"\" -I/usr/include/gtk-2.0
>>-I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0
>>-I/usr/include/pango-1.0 -I/usr/include/Xft2 -I/usr/include/freetype2
>>-I/usr/X11R6/include -I/usr/include/glib-2.0
>>-I/usr/lib/glib-2.0/include      -pipe -Wall -O2
>>-fexpensive-optimizations -march=i686 -c `test -f 'callbacks.c' ||
>>echo './'`callbacks.c
>>callbacks.c: In function `on_entry_username_focus_out_event':
>>callbacks.c:31: warning: implicit declaration of function `strcpy'
>>callbacks.c: In function `on_login_button_clicked':
>>callbacks.c:91: warning: implicit declaration of function `strlen'
>>callbacks.c:119: too many arguments to function `create_quick_dialog'
>>callbacks.c:123: warning: implicit declaration of function
>>`write_config'
>>make[2]: *** [callbacks.o] Error 1
>>make[2]: Leaving directory `/usr/src/RPM/BUILD/gtknw2-0.2/src'
>>make[1]: *** [all-recursive] Error 1
>>make[1]: Leaving directory `/usr/src/RPM/BUILD/gtknw2-0.2'
>>make: *** [all] Error 2
>>ошибка: Неверный код возврата из /var/tmp/rpm-tmp.61258 (%build)
>>
>>callback.c и .h прилагается.
>>    
>>
В BTS, пожалуйста!

Rgrds, AEN



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [sisyphus] Есть тут спецы по GTK+ ?
  2003-02-06 15:18   ` Aleksey Novodvorsky
@ 2003-02-06 15:22     ` Korshunov Ilya
  0 siblings, 0 replies; 5+ messages in thread
From: Korshunov Ilya @ 2003-02-06 15:22 UTC (permalink / raw)
  To: sisyphus

В сообщении от 6 Февраль 2003 18:18 Aleksey Novodvorsky написал:
> В BTS, пожалуйста!

Майтейнер в курсе событий. imho не стоит захламдять BTS.



-- 
Best Regards
Korshunov Ilya
JID: koshakp@jabber.org


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-02-06 15:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-06 13:00 [sisyphus] Есть тут спецы по GTK+ ? Korshunov Ilya
2003-02-06 14:54 ` Someone Unknown
2003-02-06 15:13   ` Korshunov Ilya
2003-02-06 15:18   ` Aleksey Novodvorsky
2003-02-06 15:22     ` Korshunov Ilya

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git