From 0cebe028cbf4d2292740c2b4cfb71efe57b3087e Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Tue, 3 Apr 2001 14:50:38 +0000 Subject: Made this table model more consistent in the number of columns it has. 2001-04-03 Christopher James Lahey * gui/widgets/e-addressbook-model.c (COLS): Made this table model more consistent in the number of columns it has. (addressbook_append_row): Fixed this function. We removed the col offset. svn path=/trunk/; revision=9129 --- addressbook/ChangeLog | 7 +++++++ addressbook/gui/widgets/e-addressbook-model.c | 12 +++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 121ce5ec24..fb6d83ea05 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,10 @@ +2001-04-03 Christopher James Lahey + + * gui/widgets/e-addressbook-model.c (COLS): Made this table model + more consistent in the number of columns it has. + (addressbook_append_row): Fixed this function. We removed the col + offset. + 2001-04-02 Iain Holmes * backend/ebook/evolution-gnomecard-importer.c (importer_init): Shut diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c index 71c0db892c..abd97c8464 100644 --- a/addressbook/gui/widgets/e-addressbook-model.c +++ b/addressbook/gui/widgets/e-addressbook-model.c @@ -37,6 +37,8 @@ enum { LAST_SIGNAL }; +#define COLS (E_CARD_SIMPLE_FIELD_LAST - 5) + static guint e_addressbook_model_signals [LAST_SIGNAL] = {0, }; static void @@ -90,7 +92,7 @@ addressbook_destroy(GtkObject *object) static int addressbook_col_count (ETableModel *etc) { - return E_CARD_SIMPLE_FIELD_LAST - 4; + return COLS; } /* This function returns the number of rows in our ETableModel. */ @@ -107,7 +109,7 @@ addressbook_value_at (ETableModel *etc, int col, int row) { EAddressbookModel *addressbook = E_ADDRESSBOOK_MODEL(etc); const char *value; - if ( col >= E_CARD_SIMPLE_FIELD_LAST || row >= addressbook->data_count ) + if ( col >= COLS || row >= addressbook->data_count ) return NULL; value = e_card_simple_get_const(addressbook->data[row], @@ -122,7 +124,7 @@ addressbook_set_value_at (ETableModel *etc, int col, int row, const void *val) EAddressbookModel *addressbook = E_ADDRESSBOOK_MODEL(etc); ECard *card; if (addressbook->editable) { - if ( col >= E_CARD_SIMPLE_FIELD_LAST|| row >= addressbook->data_count ) + if ( col >= COLS|| row >= addressbook->data_count ) return; e_card_simple_set(addressbook->data[row], col, @@ -154,10 +156,10 @@ addressbook_append_row (ETableModel *etm, ETableModel *source, gint row) card = e_card_new(""); simple = e_card_simple_new(card); - for (col = 0; col < E_CARD_SIMPLE_FIELD_LAST - 1; col++) { + for (col = 0; col < COLS; col++) { const void *val = e_table_model_value_at(source, col, row); e_card_simple_set(simple, - col + 1, + col, val); } e_card_simple_sync_card(simple); -- cgit class='path'>path: root/macros/gnome-vfs.m4
blob: 6dce307783b94e0cb3f36a8188a8578b07bb8ac6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
dnl GNOME_VFS_CHECKS
dnl   Check for various functions needed by libvfs.
dnl   This has various effects:
dnl     Sets GNOME_VFS_LIBS to libraries required
dnl     Sets termnet  to true or false depending on whether it is required.
dnl        If yes, defines USE_TERMNET.
dnl     Sets vfs_flags to "pretty" list of vfs implementations we include.
dnl     Sets shell variable use_vfs to yes (default, --with-vfs) or
dnl        "no" (--without-vfs).
dnl     Calls AC_SUBST(mcserv), which is either empty or "mcserv".

dnl Private define
AC_DEFUN([GNOME_WITH_VFS],[
  dnl FIXME: network checks should probably be in their own macro.
  AC_CHECK_LIB(nsl, t_accept)
  AC_CHECK_LIB(socket, socket)

  have_socket=no
  AC_CHECK_FUNCS(socket, have_socket=yes)
  if test $have_socket = no; then
    # socket is not in the default libraries.  See if it's in some other.
    for lib in bsd socket inet; do
      AC_CHECK_LIB($lib, socket, [
      LIBS="$LIBS -l$lib"
      have_socket=yes
      AC_DEFINE(HAVE_SOCKET)
      break])
    done
  fi

  have_gethostbyname=no
  AC_CHECK_FUNC(gethostbyname, have_gethostbyname=yes)
  if test $have_gethostbyname = no; then
    # gethostbyname is not in the default libraries.  See if it's in some other.
    for lib in bsd socket inet; do
      AC_CHECK_LIB($lib, gethostbyname, [LIBS="$LIBS -l$lib"; have_gethostbyname=yes; break])
    done
  fi

  vfs_flags="tarfs"
  use_net_code=false
  if test $have_socket = yes; then
      AC_STRUCT_LINGER
      AC_CHECK_FUNCS(pmap_set, , [
     AC_CHECK_LIB(rpc, pmap_set, [
       LIBS="-lrpc $LIBS"
      AC_DEFINE(HAVE_PMAP_SET)
      ])])
      AC_CHECK_FUNCS(pmap_getport pmap_getmaps rresvport)
      dnl add for source routing support setsockopt
      AC_CHECK_HEADERS(rpc/pmap_clnt.h, , , [
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <rpc/rpc.h>
#include <rpc/pmap_prot.h>
                        ])
      vfs_flags="$vfs_flags, mcfs, ftpfs, fish"
      use_net_code=true
  fi

  dnl
  dnl Samba support
  dnl
  smbfs=""
  SAMBAFILES=""
  AC_ARG_WITH(samba,
      [--with-samba             Support smb virtual file system],[
      if test "x$withval" != "xno"; then
          AC_DEFINE(WITH_SMBFS)
              vfs_flags="$vfs_flags, smbfs"
          smbfs="smbfs.o"
          SAMBAFILES="\$(SAMBAFILES)"
      fi
  ])
  AC_SUBST(smbfs)
  AC_SUBST(SAMBAFILES)
  
  dnl
  dnl The termnet support
  dnl
  termnet=false
  AC_ARG_WITH(termnet,
      [--with-termnet             If you want a termified net support],[
      if test x$withval = xyes; then
          AC_DEFINE(USE_TERMNET)
          termnet=true      
      fi
  ])

  TERMNET=""
  AC_DEFINE(USE_VFS)
  if $use_net_code; then
     AC_DEFINE(USE_NETCODE)
  fi
  mcserv=
  if test $have_socket = yes; then
     mcserv="mcserv"