From 78ab72b19f927aae7439786b568ee7a923121394 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Mon, 9 Jul 2001 15:37:31 +0000 Subject: [PATCH] * gdesktop-prefs.c (create_mini_icons): Warning fix. * gdialogs.c (file_mask_dialog): Likewise. * gdnd.c (gdnd_validate_action): Likewise. * gscreen.c (panel_drag_data_delete): Likewise. (panel_tree_check_auto_expand): Likewise. --- gnome/ChangeLog | 8 ++++++++ gnome/gdesktop-prefs.c | 6 ++---- gnome/gdialogs.c | 11 +++++++++-- gnome/gdnd.c | 4 ++-- gnome/gscreen.c | 7 ++++--- 5 files changed, 25 insertions(+), 11 deletions(-) diff --git a/gnome/ChangeLog b/gnome/ChangeLog index 76c45126f..124fa446b 100644 --- a/gnome/ChangeLog +++ b/gnome/ChangeLog @@ -1,3 +1,11 @@ +2001-07-09 Pavel Roskin + + * gdesktop-prefs.c (create_mini_icons): Warning fix. + * gdialogs.c (file_mask_dialog): Likewise. + * gdnd.c (gdnd_validate_action): Likewise. + * gscreen.c (panel_drag_data_delete): Likewise. + (panel_tree_check_auto_expand): Likewise. + 2001-07-06 Pavel Roskin * Makefile.in: Move here gnome-specific definitions from diff --git a/gnome/gdesktop-prefs.c b/gnome/gdesktop-prefs.c index 5f74204db..d03437208 100644 --- a/gnome/gdesktop-prefs.c +++ b/gnome/gdesktop-prefs.c @@ -116,10 +116,8 @@ create_mini_icons (GDesktopPrefs *dp, int r2l, int b2t, int rows) dy = ICON_POS_INTERVAL; } - if (dp->rows_not_columns) - y = oy; - else - x = ox; + x = ox; + y = oy; for (i = 0; i < 2; i++) { if (dp->rows_not_columns) { diff --git a/gnome/gdialogs.c b/gnome/gdialogs.c index 52d124f64..ad7e32abf 100644 --- a/gnome/gdialogs.c +++ b/gnome/gdialogs.c @@ -564,12 +564,19 @@ file_mask_dialog (FileOpContext *ctx, FileOperation operation, char *text, char ctx->stable_symlinks = 0; /* Basic window */ - if (operation == OP_COPY) + switch (operation) { + case OP_COPY: fmd_win = gnome_dialog_new (_("Copy"), GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL, NULL); - else if (operation == OP_MOVE) + break; + case OP_MOVE: fmd_win = gnome_dialog_new (_("Move"), GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL, NULL); + break; + default: + g_assert_not_reached (); + return NULL; /* keep -Wall happy */ + } gtk_window_set_position (GTK_WINDOW (fmd_win), GTK_WIN_POS_MOUSE); diff --git a/gnome/gdnd.c b/gnome/gdnd.c index 260ecef49..c8894cd9b 100644 --- a/gnome/gdnd.c +++ b/gnome/gdnd.c @@ -534,8 +534,8 @@ gdnd_validate_action (GdkDragContext *context, int on_desktop, int same_process, int same_source, char *dest_full_name, file_entry *dest_fe, int dest_selected) { - int on_directory; - int on_exe; + int on_directory = 0; + int on_exe = 0; g_return_val_if_fail (context != NULL, 0); g_return_val_if_fail (dest_full_name != NULL, 0); diff --git a/gnome/gscreen.c b/gnome/gscreen.c index 9dbabdc09..1395bc5a2 100644 --- a/gnome/gscreen.c +++ b/gnome/gscreen.c @@ -696,10 +696,10 @@ panel_drag_data_delete (GtkWidget *widget, GdkDragContext *context, WPanel *pane static void drop_on_panel (WPanel *panel, int idx, GdkDragContext *context, GtkSelectionData *selection_data) { - char *file; - file_entry *fe; int drop_on_dir; int reload; + char *file = NULL; + file_entry *fe = NULL; g_assert (panel != NULL); g_assert (idx == -1 || idx < panel->count); @@ -1853,7 +1853,6 @@ panel_tree_check_auto_expand (WPanel *panel, GtkCTreeNode *current) GtkCList *clist; GList *free_list; GList *tmp_list; - gint row, old_y, new_y; dtree = GTK_DTREE (panel->tree); ctree = GTK_CTREE (panel->tree); @@ -1869,6 +1868,8 @@ panel_tree_check_auto_expand (WPanel *panel, GtkCTreeNode *current) * "current" stays the same place on the screen. */ if (tmp_list) { + gint row, new_y; + gint old_y = 0; if (current) { row = g_list_position (clist->row_list, (GList *) current); old_y = row * clist->row_height - clist->vadjustment->value;