After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 234901 - Create a new view without name
Create a new view without name
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Contacts
pre-1.5 (obsolete)
Other All
: Normal major
: ---
Assigned To: Gilbert Fang
Evolution QA team
Depends on:
Blocks: 258118
 
 
Reported: 2002-12-03 03:33 UTC by Patrick
Modified: 2004-09-29 20:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
In gal/menus/gal-define-views-dialog.c , checking the returned "name" when the new view dialog closed. (923 bytes, patch)
2002-12-05 09:42 UTC, Gilbert Fang
none Details | Review
new patch after lewing's suggestions (922 bytes, patch)
2002-12-06 09:03 UTC, Gilbert Fang
none Details | Review
no dup string patch (1.56 KB, patch)
2002-12-14 09:53 UTC, Gilbert Fang
none Details | Review

Description Patrick 2002-12-03 03:33:01 UTC
Please fill in this template when reporting a bug, unless you know what you
are doing.
Description of Problem:
I could create a new view without name.I think it shouldn't be not to allow
to do it.

Steps to reproduce the problem:
1.Top Menu->View->Current View->Define views 
2.Click "New" button 
3.Select "Card View" 
4.Input nothing on Name area
5.Click "OK" 

Actual Results:
I can create a view without name

Expected Results:
Not allow to do that

How often does this happen? 
Every time

Additional Information:
Comment 1 Gilbert Fang 2002-12-04 08:24:49 UTC
I found it is very possibly a bug of gal.
gal-define-views-dialog -->(button_new) -->gal_view_new_dialog_new
and the callback for "click" is gdvd_button_new_callback. 
I think it is that which do not check whether the view's name is blank. 

Could I file a bug on gal ?
Comment 2 Gilbert Fang 2002-12-05 09:28:48 UTC
I have written a patch for this bug. 
It is in gal/menus/gal-define-views-dialog.c
My codes checks the returned "name" when the new view dialog closed. 
Comment 3 Gilbert Fang 2002-12-05 09:42:15 UTC
Created attachment 41819 [details] [review]
In gal/menus/gal-define-views-dialog.c , checking  the returned "name" when the new view dialog closed.
Comment 4 Gilbert Fang 2002-12-06 09:03:28 UTC
Created attachment 41823 [details] [review]
new patch after lewing's suggestions
Comment 5 Gilbert Fang 2002-12-09 09:10:22 UTC
escalating because of the memory leak. my new patch has fixed that and
been sent to evolution-patcher@ximian.com
Comment 6 Mike Kestner 2002-12-11 05:52:52 UTC
committed Gilbert's patch to 1.2 branch and trunk
Comment 7 Gilbert Fang 2002-12-12 03:34:41 UTC
thanks to Mike Kestner
Comment 8 Gilbert Fang 2002-12-14 09:53:19 UTC
Created attachment 41863 [details] [review]
no dup string patch
Comment 9 Gilbert Fang 2002-12-14 10:06:04 UTC
Hi, Mike
I checked  the cvs and  found in the lastest code you still dup the
"name". 
Actually I do not think that is right. In glib header files, the
author says that when using g_object_get the caller should be
responsible for the freeing  the string if the arg->type is
G_TYPE_STRING. 

If you get the patch "new patch after lewing's suggestions" here, that
is not my lastest one. I have just upload the new one. This  lastest
patch is in the mail that I have sent to evolution-patches@ximian.com
and got your reply. Because I am not sure where to put the patch more
officially and it seems that the mailinglists is more active, I do not
upload the lastest patch in time. 
If this got you confused, I am sorry. 

Anyway, I think the "no dup string patch" is the right one, the "new
patch after lewing's suggestions" patch still has mem leak. 
Comment 10 Peter Pouliot 2003-01-28 18:26:04 UTC
Attempted to create a view w/o naming it.  No view get's created.  And
no error message.  Create view dialog disappears.
Comment 11 Gerardo Marin 2003-01-29 17:57:50 UTC
Can still reproduce in 1.2.1.99, sorry to disagree.
You have to follow these steps:
1. View->current view-Define views
2. Select new, leave name blank, select table view (if you don't do
this, no view will be created).Click Ok.
3. click ok.
4. Scroll down. There's an empty cell.
Comment 12 Gilbert Fang 2003-01-30 02:09:52 UTC
Hi,  Gerardo Marin , in fact, the fix is in gal. So, whether it is
evo1.2.1.99 or evo 1.2.2  does not make sense. Please update you gal
library to the lastest one . 
Comment 13 Gerardo Marin 2003-01-30 16:55:27 UTC
Do you know which GAL version?
I'm using libgal21-0.22.0.99-snap.ximian.200301290701 (yesterday's).
So keeping this open until this makes to snapshots.
Comment 14 Gilbert Fang 2003-01-31 07:25:40 UTC
oh, for libgal21-0.22.0.99-snap.ximian.200301290701,sorry, I do not
know ximian snap the gal . I know that now the
evo-evoltuion-1-2-branch has the fix , and from that ChangeLog, I can
say after 2002-12-17 it is fixed. I just checked it out and exam it. 

Also I check out the GAL_1_99_1 and the HEAD. They both have a half fix.
(  gal/gal/menu/gal-define-views-dialog.c r=1.20). That is to say,
operation should be right -- a view with a blank name would not be
created, but there will be mem leak inside the gal.  

Another reminder is to be sure to dynamically linked the right version
of gal. I sometime carelessly set the wrong LD_LIBRARY_PATH and that
waste me the whole day. 
 
Comment 15 André Klapper 2004-05-03 22:12:53 UTC
well, nowaadays it just works fine: ok-button is greyed out and only 
works if i entered at least one letter as name. using evolution-1.4.6.
0.200404140531-0.snap.ximian.8.1, "rpm -qa | grep libgal" says: 
libgal2.0_5-1.99.10.99.0.200402190630-0.snap.ximian.8.1 and libgal2.
0_6-1.99.11.0.200404140531-0.snap.ximian.8.1. closing it.