Revision: 1461
          http://geeqie.svn.sourceforge.net/geeqie/?rev=1461&view=rev
Author:   zas_
Date:     2009-03-01 21:06:55 +0000 (Sun, 01 Mar 2009)

Log Message:
-----------
When g_new0() is used, drop redundant initializations to NULL, FALSE or 0.

Modified Paths:
--------------
    trunk/src/image.c
    trunk/src/layout.c
    trunk/src/slideshow.c
    trunk/src/thumb.c
    trunk/src/thumb_standard.c
    trunk/src/ui_pathsel.c
    trunk/src/ui_tabcomp.c
    trunk/src/view_dir.c
    trunk/src/view_dir_list.c
    trunk/src/view_dir_tree.c
    trunk/src/view_file.c
    trunk/src/view_file_icon.c
    trunk/src/view_file_list.c

Modified: trunk/src/image.c
===================================================================
--- trunk/src/image.c   2009-03-01 19:48:38 UTC (rev 1460)
+++ trunk/src/image.c   2009-03-01 21:06:55 UTC (rev 1461)
@@ -1711,49 +1711,17 @@
 
        imd = g_new0(ImageWindow, 1);
 
-       imd->top_window = NULL;
-       imd->title = NULL;
-       imd->title_right = NULL;
-       imd->title_show_zoom = FALSE;
-
        imd->unknown = TRUE;
-
        imd->has_frame = -1; /* not initialized; for image_set_frame */
-       imd->top_window_sync = FALSE;
-
        imd->delay_alter_type = ALTER_NONE;
-
-       imd->read_ahead_il = NULL;
-       imd->read_ahead_fd = NULL;
-
-       imd->completed = FALSE;
        imd->state = IMAGE_STATE_NONE;
-
-       imd->color_profile_enable = FALSE;
-       imd->color_profile_input = 0;
-       imd->color_profile_screen = 0;
-       imd->color_profile_use_image = FALSE;
        imd->color_profile_from_image = COLOR_PROFILE_NONE;
-
-       imd->auto_refresh = FALSE;
-
-       imd->delay_flip = FALSE;
-
-       imd->func_update = NULL;
-       imd->func_complete = NULL;
-       imd->func_tile_request = NULL;
-       imd->func_tile_dispose = NULL;
-
-       imd->func_button = NULL;
-       imd->func_scroll = NULL;
-
        imd->orientation = 1;
 
        imd->pr = GTK_WIDGET(pixbuf_renderer_new());
 
        image_options_set(imd);
 
-
        imd->widget = gtk_vbox_new(0, 0);
 
        image_set_frame(imd, frame);

Modified: trunk/src/layout.c
===================================================================
--- trunk/src/layout.c  2009-03-01 19:48:38 UTC (rev 1460)
+++ trunk/src/layout.c  2009-03-01 21:06:55 UTC (rev 1461)
@@ -2016,15 +2016,9 @@
 
 //     lw->options.tools_float = popped;
 //     lw->options.tools_hidden = hidden;
-
-       lw->utility_box = NULL;
-       lw->bar_sort = NULL;
 //     lw->bar_sort_enabled = options->panels.sort.enabled;
-
-       lw->bar = NULL;
 //     lw->bar_enabled = options->panels.info.enabled;
 
-       lw->exif_window = NULL;
        /* default layout */
 
        layout_config_parse(lw->options.style, lw->options.order,

Modified: trunk/src/slideshow.c
===================================================================
--- trunk/src/slideshow.c       2009-03-01 19:48:38 UTC (rev 1460)
+++ trunk/src/slideshow.c       2009-03-01 21:06:55 UTC (rev 1461)
@@ -358,21 +358,10 @@
        ss = g_new0(SlideShowData, 1);
 
        ss->imd = imd;
-
        ss->filelist = filelist;
        ss->cd = cd;
        ss->layout = lw;
-       ss->dir_fd = NULL;
-
-       ss->list = NULL;
-       ss->list_done = NULL;
-
-       ss->from_selection = FALSE;
-
-       ss->stop_func = NULL;
-
        ss->timeout_id = -1;
-       ss->paused = FALSE;
 
        if (ss->filelist)
                {

Modified: trunk/src/thumb.c
===================================================================
--- trunk/src/thumb.c   2009-03-01 19:48:38 UTC (rev 1460)
+++ trunk/src/thumb.c   2009-03-01 21:06:55 UTC (rev 1461)
@@ -475,16 +475,11 @@
                }
 
        tl = g_new0(ThumbLoader, 1);
-       tl->standard_loader = FALSE;
-       tl->fd = NULL;
+       
        tl->cache_enable = options->thumbnails.enable_caching;
-       tl->cache_hit = FALSE;
        tl->percent_done = 0.0;
        tl->max_w = width;
        tl->max_h = height;
-
-       tl->il = NULL;
-
        tl->idle_done_id = -1;
 
        return tl;

Modified: trunk/src/thumb_standard.c
===================================================================
--- trunk/src/thumb_standard.c  2009-03-01 19:48:38 UTC (rev 1460)
+++ trunk/src/thumb_standard.c  2009-03-01 21:06:55 UTC (rev 1461)
@@ -76,16 +76,9 @@
        tl = g_new0(ThumbLoaderStd, 1);
 
        tl->standard_loader = TRUE;
-
        tl->requested_width = width;
        tl->requested_height = height;
-
-       tl->il = NULL;
-       tl->fd = NULL;
-
        tl->cache_enable = options->thumbnails.enable_caching;
-       tl->cache_local = FALSE;
-       tl->cache_retry = FALSE;
 
        return tl;
 }

Modified: trunk/src/ui_pathsel.c
===================================================================
--- trunk/src/ui_pathsel.c      2009-03-01 19:48:38 UTC (rev 1460)
+++ trunk/src/ui_pathsel.c      2009-03-01 21:06:55 UTC (rev 1461)
@@ -1033,10 +1033,6 @@
        GtkCellRenderer *renderer;
 
        dd = g_new0(Dest_Data, 1);
-       dd->show_hidden = FALSE;
-       dd->select_func = NULL;
-       dd->select_data = NULL;
-       dd->gd = NULL;
 
        table = gtk_table_new(4, (filter != NULL) ? 3 : 1, FALSE);
        gtk_table_set_col_spacings(GTK_TABLE(table), PREF_PAD_GAP);

Modified: trunk/src/ui_tabcomp.c
===================================================================
--- trunk/src/ui_tabcomp.c      2009-03-01 19:48:38 UTC (rev 1460)
+++ trunk/src/ui_tabcomp.c      2009-03-01 21:06:55 UTC (rev 1461)
@@ -798,18 +798,11 @@
                }
 
        td = g_new0(TabCompData, 1);
+
        td->entry = entry;
-       td->dir_path = NULL;
-       td->file_list = NULL;
        td->enter_func = enter_func;
        td->enter_data = data;
-       td->tab_func = NULL;
-       td->tab_data = NULL;
 
-       td->has_history = FALSE;
-       td->history_key = NULL;
-       td->history_levels = 0;
-
        g_object_set_data(G_OBJECT(td->entry), "tab_completion_data", td);
 
        g_signal_connect(G_OBJECT(entry), "key_press_event",

Modified: trunk/src/view_dir.c
===================================================================
--- trunk/src/view_dir.c        2009-03-01 19:48:38 UTC (rev 1460)
+++ trunk/src/view_dir.c        2009-03-01 21:06:55 UTC (rev 1461)
@@ -67,19 +67,8 @@
 
        ViewDir *vd = g_new0(ViewDir, 1);
 
-       vd->dir_fd = NULL;
-       vd->click_fd = NULL;
-
-       vd->drop_fd = NULL;
-       vd->drop_list = NULL;
        vd->drop_scroll_id = -1;
-       vd->drop_list = NULL;
 
-       vd->popup = NULL;
-
-       vd->dnd_drop_leave_func = NULL;
-       vd->dnd_drop_update_func = NULL;
-
        vd->widget = gtk_scrolled_window_new(NULL, NULL);
        gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(vd->widget), 
GTK_SHADOW_IN);
        gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(vd->widget),

Modified: trunk/src/view_dir_list.c
===================================================================
--- trunk/src/view_dir_list.c   2009-03-01 19:48:38 UTC (rev 1460)
+++ trunk/src/view_dir_list.c   2009-03-01 21:06:55 UTC (rev 1461)
@@ -438,10 +438,9 @@
        GtkCellRenderer *renderer;
 
        vd->info = g_new0(ViewDirInfoList, 1);
+
        vd->type = DIRVIEW_LIST;
 
-       VDLIST(vd)->list = NULL;
-
        store = gtk_list_store_new(5, G_TYPE_POINTER, GDK_TYPE_PIXBUF, 
G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_STRING);
        vd->view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
        g_object_unref(store);

Modified: trunk/src/view_dir_tree.c
===================================================================
--- trunk/src/view_dir_tree.c   2009-03-01 19:48:38 UTC (rev 1460)
+++ trunk/src/view_dir_tree.c   2009-03-01 21:06:55 UTC (rev 1461)
@@ -957,10 +957,9 @@
        GtkCellRenderer *renderer;
 
        vd->info = g_new0(ViewDirInfoTree, 1);
-       vd->type = DIRVIEW_TREE;
 
+       vd->type = DIRVIEW_TREE;
        VDTREE(vd)->drop_expand_id = -1;
-       VDTREE(vd)->busy_ref = 0;
 
        vd->dnd_drop_leave_func = vdtree_dnd_drop_expand_cancel;
        vd->dnd_drop_update_func = vdtree_dnd_drop_expand;

Modified: trunk/src/view_file.c
===================================================================
--- trunk/src/view_file.c       2009-03-01 19:48:38 UTC (rev 1460)
+++ trunk/src/view_file.c       2009-03-01 21:06:55 UTC (rev 1461)
@@ -679,21 +679,10 @@
        ViewFile *vf;
 
        vf = g_new0(ViewFile, 1);
+       
        vf->type = type;
-
-       vf->info = NULL;
-       vf->dir_fd = NULL;
-       vf->list = NULL;
-
        vf->sort_method = SORT_NAME;
        vf->sort_ascend = TRUE;
-       
-       vf->thumbs_running = FALSE;
-       vf->thumbs_loader = NULL;
-       vf->thumbs_filedata = NULL;
-
-       vf->popup = NULL;
-
        vf->refresh_idle_id = -1;
 
        vf->scrolled = gtk_scrolled_window_new(NULL, NULL);

Modified: trunk/src/view_file_icon.c
===================================================================
--- trunk/src/view_file_icon.c  2009-03-01 19:48:38 UTC (rev 1460)
+++ trunk/src/view_file_icon.c  2009-03-01 21:06:55 UTC (rev 1461)
@@ -2475,16 +2475,7 @@
 
        vf->info = g_new0(ViewFileInfoIcon, 1);
 
-       VFICON(vf)->selection = NULL;
-       VFICON(vf)->prev_selection = NULL;
-
-       VFICON(vf)->tip_window = NULL;
        VFICON(vf)->tip_delay_id = -1;
-
-       VFICON(vf)->focus_row = 0;
-       VFICON(vf)->focus_column = 0;
-       VFICON(vf)->focus_id = NULL;
-
        VFICON(vf)->show_text = options->show_icon_names;
 
        store = gtk_list_store_new(1, G_TYPE_POINTER);

Modified: trunk/src/view_file_list.c
===================================================================
--- trunk/src/view_file_list.c  2009-03-01 19:48:38 UTC (rev 1460)
+++ trunk/src/view_file_list.c  2009-03-01 21:06:55 UTC (rev 1461)
@@ -1936,17 +1936,12 @@
 {
        GtkTreeStore *store;
        GtkTreeSelection *selection;
-
        GType flist_types[FILE_COLUMN_COUNT];
        gint i;
        gint column;
 
        vf->info = g_new0(ViewFileInfoList, 1);
        
-       VFLIST(vf)->click_fd = NULL;
-       VFLIST(vf)->select_fd = NULL;
-       VFLIST(vf)->thumbs_enabled = FALSE;
-
        VFLIST(vf)->select_idle_id = -1;
 
        flist_types[FILE_COLUMN_POINTER] = G_TYPE_POINTER;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn

Reply via email to