diff options
Diffstat (limited to 'baobab/src')
-rw-r--r-- | baobab/src/Makefile.am | 17 | ||||
-rw-r--r-- | baobab/src/baobab-cell-renderer-progress.c | 30 | ||||
-rw-r--r-- | baobab/src/baobab-cell-renderer-progress.h | 25 | ||||
-rw-r--r-- | baobab/src/baobab-chart.c | 26 | ||||
-rw-r--r-- | baobab/src/baobab-chart.h | 16 | ||||
-rw-r--r-- | baobab/src/baobab-prefs.c | 20 | ||||
-rw-r--r-- | baobab/src/baobab-prefs.h | 17 | ||||
-rw-r--r-- | baobab/src/baobab-remote-connect-dialog.c | 58 | ||||
-rw-r--r-- | baobab/src/baobab-remote-connect-dialog.h | 36 | ||||
-rw-r--r-- | baobab/src/baobab-ringschart.c | 23 | ||||
-rw-r--r-- | baobab/src/baobab-ringschart.h | 16 | ||||
-rw-r--r-- | baobab/src/baobab-scan.c | 23 | ||||
-rw-r--r-- | baobab/src/baobab-scan.h | 17 | ||||
-rw-r--r-- | baobab/src/baobab-treemap.c | 16 | ||||
-rw-r--r-- | baobab/src/baobab-treemap.h | 16 | ||||
-rw-r--r-- | baobab/src/baobab-treeview.c | 19 | ||||
-rw-r--r-- | baobab/src/baobab-treeview.h | 17 | ||||
-rw-r--r-- | baobab/src/baobab-utils.c | 32 | ||||
-rw-r--r-- | baobab/src/baobab-utils.h | 17 | ||||
-rw-r--r-- | baobab/src/baobab.c | 41 | ||||
-rw-r--r-- | baobab/src/baobab.h | 17 | ||||
-rw-r--r-- | baobab/src/callbacks.c | 25 | ||||
-rw-r--r-- | baobab/src/callbacks.h | 19 |
23 files changed, 253 insertions, 290 deletions
diff --git a/baobab/src/Makefile.am b/baobab/src/Makefile.am index e0d56b23..e6e34268 100644 --- a/baobab/src/Makefile.am +++ b/baobab/src/Makefile.am @@ -1,3 +1,18 @@ +# This file is part of MATE Utils. +# +# MATE Utils is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# MATE Utils is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with MATE Utils. If not, see <https://www.gnu.org/licenses/>. + NULL = AM_CPPFLAGS = \ @@ -47,6 +62,7 @@ mate_disk_usage_analyzer_CFLAGS = \ $(GIO_CFLAGS) \ $(GTK_CFLAGS) \ $(LIBGTOP_CFLAGS) \ + $(MATE_DESKTOP_CFLAGS) \ $(WARN_CFLAGS) \ $(NULL) @@ -57,6 +73,7 @@ mate_disk_usage_analyzer_LDADD = \ $(GIO_LIBS) \ $(GTK_LIBS) \ $(LIBGTOP_LIBS) \ + $(MATE_DESKTOP_LIBS) \ $(NULL) CLEANFILES = $(BUILT_SOURCES) diff --git a/baobab/src/baobab-cell-renderer-progress.c b/baobab/src/baobab-cell-renderer-progress.c index c8bf3ee9..de7bb733 100644 --- a/baobab/src/baobab-cell-renderer-progress.c +++ b/baobab/src/baobab-cell-renderer-progress.c @@ -1,24 +1,26 @@ -/* baobab-cell-renderer-progress.c +/* Copyright (C) 2006 Paolo Borelli + * Copyright (C) 2012-2021 MATE Developers * - * Copyright (C) 2006 Paolo Borelli + * This file is part of MATE Utils. * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * MATE Utils is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. * - * This library is distributed in the hope that it will be useful, + * MATE Utils is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. + * You should have received a copy of the GNU General Public License + * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <stdlib.h> #include "baobab-cell-renderer-progress.h" diff --git a/baobab/src/baobab-cell-renderer-progress.h b/baobab/src/baobab-cell-renderer-progress.h index 4fd2ca64..2b79d682 100644 --- a/baobab/src/baobab-cell-renderer-progress.h +++ b/baobab/src/baobab-cell-renderer-progress.h @@ -1,21 +1,20 @@ -/* baobab-cell-renderer-progress.h +/* Copyright (C) 2006 Paolo Borelli + * Copyright (C) 2012-2021 MATE Developers * - * Copyright (C) 2006 Paolo Borelli + * This file is part of MATE Utils. * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * MATE Utils is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. * - * This library is distributed in the hope that it will be useful, + * MATE Utils is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. + * You should have received a copy of the GNU General Public License + * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>. */ #ifndef __BAOBAB_CELL_RENDERER_PROGRESS_H__ diff --git a/baobab/src/baobab-chart.c b/baobab/src/baobab-chart.c index 97dc2c77..d8350511 100644 --- a/baobab/src/baobab-chart.c +++ b/baobab/src/baobab-chart.c @@ -1,22 +1,20 @@ -/* - * baobab-chart.c +/* Copyright (C) 2006, 2007, 2008 Igalia + * Copyright (C) 2012-2021 MATE Developers * - * Copyright (C) 2006, 2007, 2008 Igalia + * This file is part of MATE Utils. * - * This program is free software; you can redistribute it and/or modify + * MATE Utils is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * MATE Utils is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301 USA + * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>. * * Authors: * Felipe Erias <[email protected]> @@ -31,7 +29,10 @@ * Alejandro Garcia <[email protected]> */ +#ifdef HAVE_CONFIG_H #include <config.h> +#endif + #include <gtk/gtk.h> #include <glib/gi18n.h> @@ -166,7 +167,6 @@ static gboolean baobab_chart_query_tooltip (GtkWidget *widget, GtkTooltip *tooltip, gpointer user_data); - static void baobab_chart_class_init (BaobabChartClass *class) { @@ -522,8 +522,6 @@ baobab_chart_get_items (GtkWidget *chart, GtkTreePath *root) return; } - - model_root_path = gtk_tree_path_new_first (); gtk_tree_model_get_iter (priv->model, &model_root_iter, model_root_path); gtk_tree_path_free (model_root_path); @@ -656,7 +654,6 @@ baobab_chart_update_draw (BaobabChart* chart, if (priv->root == NULL) root_path = gtk_tree_path_new_first (); - root_depth = gtk_tree_path_get_depth (root_path); node_depth = gtk_tree_path_get_depth (path); @@ -1170,7 +1167,7 @@ baobab_chart_query_tooltip (GtkWidget *widget, return TRUE; } -GdkPixbuf* +static GdkPixbuf* baobab_chart_get_pixbuf (GtkWidget *widget) { gint w, h; @@ -1181,7 +1178,6 @@ baobab_chart_get_pixbuf (GtkWidget *widget) w = gdk_window_get_width(gtk_widget_get_window(widget)); h = gdk_window_get_height(gtk_widget_get_window(widget)); - pixbuf = gdk_pixbuf_get_from_window ( gtk_widget_get_window (widget), 0, 0, diff --git a/baobab/src/baobab-chart.h b/baobab/src/baobab-chart.h index 24f2a0eb..ad82a429 100644 --- a/baobab/src/baobab-chart.h +++ b/baobab/src/baobab-chart.h @@ -1,22 +1,20 @@ -/* - * baobab-chart.h +/* Copyright (C) 2006, 2007, 2008 Igalia + * Copyright (C) 2012-2021 MATE Developers * - * Copyright (C) 2006, 2007, 2008 Igalia + * This file is part of MATE Utils. * - * This program is free software; you can redistribute it and/or modify + * MATE Utils is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * MATE Utils is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301 USA + * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>. * * Authors: * Felipe Erias <[email protected]> diff --git a/baobab/src/baobab-prefs.c b/baobab/src/baobab-prefs.c index 56e37e51..ef40e96f 100644 --- a/baobab/src/baobab-prefs.c +++ b/baobab/src/baobab-prefs.c @@ -1,27 +1,25 @@ -/* - * baobab-prefs.c - * This file is part of baobab +/* Copyright (C) 2005-2006 Fabio Marzocca <[email protected]> + * Copyright (C) 2012-2021 MATE Developers * - * Copyright (C) 2005-2006 Fabio Marzocca <[email protected]> + * This file is part of MATE Utils. * - * This program is free software; you can redistribute it and/or modify + * MATE Utils is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * MATE Utils is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301 USA + * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>. */ - +#ifdef HAVE_CONFIG_H #include <config.h> +#endif #include <string.h> #include <sys/stat.h> diff --git a/baobab/src/baobab-prefs.h b/baobab/src/baobab-prefs.h index 73893ae8..cb90a545 100644 --- a/baobab/src/baobab-prefs.h +++ b/baobab/src/baobab-prefs.h @@ -1,23 +1,20 @@ -/* - * baobab-prefs.h - * This file is part of baobab +/* Copyright (C) 2005-2006 Fabio Marzocca <[email protected]> + * Copyright (C) 2012-2021 MATE Developers * - * Copyright (C) 2005-2006 Fabio Marzocca <[email protected]> + * This file is part of MATE Utils. * - * This program is free software; you can redistribute it and/or modify + * MATE Utils is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * MATE Utils is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301 USA + * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>. */ #ifndef __BAOBAB_PROPS_H__ diff --git a/baobab/src/baobab-remote-connect-dialog.c b/baobab/src/baobab-remote-connect-dialog.c index 9557fb2c..484ffbf5 100644 --- a/baobab/src/baobab-remote-connect-dialog.c +++ b/baobab/src/baobab-remote-connect-dialog.c @@ -1,32 +1,30 @@ -/* Baobab - (C) 2005 Fabio Marzocca - - baobab-remote-connect-dialog.c - - Modified module from caja-connect-server-dialog.c - Released under same licence - */ -/* - * Caja +/* Copyright (C) 2005 Fabio Marzocca + * Copyright (C) 2012-2021 MATE Developers * + * Modified module from caja-connect-server-dialog.c. + * Released under same licence. * Copyright (C) 2003 Red Hat, Inc. * - * Caja is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. + * This file is part of MATE Utils. + * + * MATE Utils is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. * - * Caja is distributed in the hope that it will be useful, + * MATE Utils is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public - * License along with this program; see the file COPYING. If not, - * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. + * You should have received a copy of the GNU General Public License + * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>. */ +#ifdef HAVE_CONFIG_H #include <config.h> +#endif + #include "baobab-remote-connect-dialog.h" #include <string.h> @@ -36,7 +34,6 @@ #include "baobab.h" - /* Translators: all the strings in this file are meant to map the similar strings inside caja-connect-server and should be translated the same way @@ -58,7 +55,6 @@ G_DEFINE_TYPE(BaobabRemoteConnectDialog, baobab_remote_connect_dialog, GTK_TYPE_ #define RESPONSE_CONNECT GTK_RESPONSE_OK - static void display_error_dialog (GError *error, GFile *location, @@ -66,24 +62,18 @@ display_error_dialog (GError *error, { GtkWidget *dlg; char *parse_name; - char *error_message; parse_name = g_file_get_parse_name (location); - error_message = g_strdup_printf (_("Cannot scan location \"%s\""), - parse_name); - g_free (parse_name); - dlg = gtk_message_dialog_new (parent, - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, - GTK_BUTTONS_OK, - error_message, NULL); + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + _("Cannot scan location \"%s\""), parse_name); + g_free (parse_name); gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dlg), "%s", error->message); - g_free (error_message); - gtk_dialog_run (GTK_DIALOG (dlg)); gtk_widget_destroy (dlg); } @@ -655,7 +645,6 @@ baobab_remote_connect_dialog_init (BaobabRemoteConnectDialog *dialog) 1, get_method_description (&(methods[i])), -1); - if (methods[i].flags & DEFAULT_METHOD) { gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combo), &iter); } @@ -684,7 +673,6 @@ baobab_remote_connect_dialog_init (BaobabRemoteConnectDialog *dialog) gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); - dialog->details->grid = grid = gtk_grid_new (); gtk_grid_set_row_spacing (GTK_GRID (grid), 6); gtk_grid_set_column_spacing (GTK_GRID (grid), 12); diff --git a/baobab/src/baobab-remote-connect-dialog.h b/baobab/src/baobab-remote-connect-dialog.h index 05dbcdfc..06e4e9d9 100644 --- a/baobab/src/baobab-remote-connect-dialog.h +++ b/baobab/src/baobab-remote-connect-dialog.h @@ -1,30 +1,24 @@ -/* Baobab - (C) 2005 Fabio Marzocca - - baobab-remote-connect-dialog.h - - Modified module from BaobabRemoteConnectDialog.h - Released under same licence - */ - -/* - * Caja +/* Copyright (C) 2005 Fabio Marzocca + * Copyright (C) 2012-2021 MATE Developers * + * Modified module from BaobabRemoteConnectDialog.h. + * Released under same licence. * Copyright (C) 2003 Red Hat, Inc. * - * Caja is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. + * This file is part of MATE Utils. + * + * MATE Utils is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. * - * Caja is distributed in the hope that it will be useful, + * MATE Utils is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public - * License along with this program; see the file COPYING. If not, - * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. + * You should have received a copy of the GNU General Public License + * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>. */ #ifndef BAOBAB_REMOTE_CONNECT_DIALOG_H diff --git a/baobab/src/baobab-ringschart.c b/baobab/src/baobab-ringschart.c index 3408ecd5..7b568673 100644 --- a/baobab/src/baobab-ringschart.c +++ b/baobab/src/baobab-ringschart.c @@ -1,22 +1,20 @@ -/* - * baobab-ringschart.c +/* Copyright (C) 2008 Igalia + * Copyright (C) 2012-2021 MATE Developers * - * Copyright (C) 2008 Igalia + * This file is part of MATE Utils. * - * This program is free software; you can redistribute it and/or modify + * MATE Utils is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * MATE Utils is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301 USA + * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>. * * Authors: * Felipe Erias <[email protected]> @@ -98,7 +96,6 @@ static void baobab_ringschart_get_item_rectangle (GtkWidget *chart, static void baobab_ringschart_pre_draw (GtkWidget *chart, cairo_t *cr); static void baobab_ringschart_post_draw (GtkWidget *chart, cairo_t *cr); - static void baobab_ringschart_class_init (BaobabRingschartClass *class) { @@ -366,7 +363,7 @@ baobab_ringschart_get_item_rectangle (GtkWidget *chart, item->rect = rect; } -gboolean +static gboolean baobab_ringschart_subfolder_tips_timeout (gpointer data) { BaobabRingschartPrivate *priv; @@ -380,7 +377,7 @@ baobab_ringschart_subfolder_tips_timeout (gpointer data) return FALSE; } -void +static void baobab_ringschart_clean_subforlder_tips_state (GtkWidget *chart) { BaobabRingschartPrivate *priv; @@ -520,7 +517,7 @@ baobab_ringschart_draw_subfolder_tips (GtkWidget *chart, cairo_t *cr) /* get the GdkRectangle of the tooltip (with a little padding) */ _rect.x = (int) (tooltip_rect.x - 1.0); _rect.y = (int) (tooltip_rect.y - 1.0); - _rect.width = (int) (tooltip_rect.width + 2,0); + _rect.width = (int) (tooltip_rect.width + 2.0); _rect.height = (int) (tooltip_rect.height + 2.0); /* Check if tooltip overlaps */ diff --git a/baobab/src/baobab-ringschart.h b/baobab/src/baobab-ringschart.h index f63d4fff..1e257778 100644 --- a/baobab/src/baobab-ringschart.h +++ b/baobab/src/baobab-ringschart.h @@ -1,22 +1,20 @@ -/* - * baobab-ringschart.h +/* Copyright (C) 2008 igalia + * Copyright (C) 2012-2021 MATE Developers * - * Copyright (C) 2008 igalia + * This file is part of MATE Utils. * - * This program is free software; you can redistribute it and/or modify + * MATE Utils is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * MATE Utils is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301 USA + * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>. * * Authors: * Felipe Erias <[email protected]> diff --git a/baobab/src/baobab-scan.c b/baobab/src/baobab-scan.c index 369186df..f79b9223 100644 --- a/baobab/src/baobab-scan.c +++ b/baobab/src/baobab-scan.c @@ -1,27 +1,25 @@ -/* - * baobab-scan.c - * This file is part of baobab +/* Copyright (C) 2005-2006 Fabio Marzocca <[email protected]> + * Copyright (C) 2012-2021 MATE Developers * - * Copyright (C) 2005-2006 Fabio Marzocca <[email protected]> + * This file is part of MATE Utils. * - * This program is free software; you can redistribute it and/or modify + * MATE Utils is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * MATE Utils is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301 USA + * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>. */ - +#ifdef HAVE_CONFIG_H #include <config.h> +#endif #include <string.h> @@ -31,7 +29,7 @@ #include "baobab.h" #include "baobab-utils.h" - +#include "baobab-scan.h" /* Hardlinks handling. @@ -144,7 +142,6 @@ static const char *dir_attributes = \ G_FILE_ATTRIBUTE_UNIX_DEVICE "," \ G_FILE_ATTRIBUTE_ACCESS_CAN_READ; - static gboolean is_in_dot_gvfs (GFile *file) { diff --git a/baobab/src/baobab-scan.h b/baobab/src/baobab-scan.h index 2ef8ab1f..c687944a 100644 --- a/baobab/src/baobab-scan.h +++ b/baobab/src/baobab-scan.h @@ -1,23 +1,20 @@ -/* - * baobab-scan.h - * This file is part of baobab +/* Copyright (C) 2005-2006 Fabio Marzocca <[email protected]> + * Copyright (C) 2012-2021 MATE Developers * - * Copyright (C) 2005-2006 Fabio Marzocca <[email protected]> + * This file is part of MATE Utils. * - * This program is free software; you can redistribute it and/or modify + * MATE Utils is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * MATE Utils is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301 USA + * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>. */ #ifndef __BAOBAB_SCAN_H__ diff --git a/baobab/src/baobab-treemap.c b/baobab/src/baobab-treemap.c index c86a584a..966caddf 100644 --- a/baobab/src/baobab-treemap.c +++ b/baobab/src/baobab-treemap.c @@ -1,22 +1,20 @@ -/* - * baobab-treemap.c +/* Copyright (C) 2008 Igalia + * Copyright (C) 2012-2021 MATE Developers * - * Copyright (C) 2008 Igalia + * This file is part of MATE Utils. * - * This program is free software; you can redistribute it and/or modify + * MATE Utils is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * MATE Utils is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301 USA + * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>. * * Authors: * Fabio Marzocca <[email protected]> diff --git a/baobab/src/baobab-treemap.h b/baobab/src/baobab-treemap.h index 734bc272..f2b38d84 100644 --- a/baobab/src/baobab-treemap.h +++ b/baobab/src/baobab-treemap.h @@ -1,22 +1,20 @@ -/* - * baobab-treemap.h +/* Copyright (C) 2008 igalia + * Copyright (C) 2012-2021 MATE Developers * - * Copyright (C) 2008 igalia + * This file is part of MATE Utils. * - * This program is free software; you can redistribute it and/or modify + * MATE Utils is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * MATE Utils is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301 USA + * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>. * * Authors: * Fabio Marzocca <[email protected]> diff --git a/baobab/src/baobab-treeview.c b/baobab/src/baobab-treeview.c index ed132656..50794773 100644 --- a/baobab/src/baobab-treeview.c +++ b/baobab/src/baobab-treeview.c @@ -1,26 +1,25 @@ -/* - * baobab-treeview.c - * This file is part of baobab +/* Copyright (C) 2005-2006 Fabio Marzocca <[email protected]> + * Copyright (C) 2012-2021 MATE Developers * - * Copyright (C) 2005-2006 Fabio Marzocca <[email protected]> + * This file is part of MATE Utils. * - * This program is free software; you can redistribute it and/or modify + * MATE Utils is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * MATE Utils is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301 USA + * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>. */ +#ifdef HAVE_CONFIG_H #include <config.h> +#endif #include <gtk/gtk.h> #include <glib.h> diff --git a/baobab/src/baobab-treeview.h b/baobab/src/baobab-treeview.h index 998e88e4..62e85384 100644 --- a/baobab/src/baobab-treeview.h +++ b/baobab/src/baobab-treeview.h @@ -1,23 +1,20 @@ -/* - * baobab-treeview.h - * This file is part of baobab +/* Copyright (C) 2005-2006 Fabio Marzocca <[email protected]> + * Copyright (C) 2012-2021 MATE Developers * - * Copyright (C) 2005-2006 Fabio Marzocca <[email protected]> + * This file is part of MATE Utils. * - * This program is free software; you can redistribute it and/or modify + * MATE Utils is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * MATE Utils is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301 USA + * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>. */ #ifndef __BAOBAB_TV_H__ diff --git a/baobab/src/baobab-utils.c b/baobab/src/baobab-utils.c index 5aaec321..43efd3fb 100644 --- a/baobab/src/baobab-utils.c +++ b/baobab/src/baobab-utils.c @@ -1,26 +1,25 @@ -/* - * baobab-utils.c - * This file is part of baobab +/* Copyright (C) 2005-2006 Fabio Marzocca <[email protected]> + * Copyright (C) 2012-2021 MATE Developers * - * Copyright (C) 2005-2006 Fabio Marzocca <[email protected]> + * This file is part of MATE Utils. * - * This program is free software; you can redistribute it and/or modify + * MATE Utils is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * MATE Utils is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301 USA + * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>. */ +#ifdef HAVE_CONFIG_H #include <config.h> +#endif #include <glib.h> #include <glib/gstdio.h> @@ -34,6 +33,8 @@ #include <glibtop/mountlist.h> #include <glibtop/fsusage.h> +#include <libmate-desktop/mate-image-menu-item.h> + #include "baobab.h" #include "baobab-treeview.h" #include "baobab-utils.h" @@ -71,7 +72,7 @@ baobab_get_filesystem (BaobabFS *fs) g_free (mountentries); } -void +static void filechooser_cb (GtkWidget *chooser, gint response, gpointer data) @@ -324,9 +325,9 @@ add_popupmenu_item (GtkMenu *pmenu, const gchar *label, const gchar *icon_name, GtkWidget *item; GtkWidget *image; - item = gtk_image_menu_item_new_with_mnemonic (label); + item = mate_image_menu_item_new_with_mnemonic (label); image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); + mate_image_menu_item_set_image (MATE_IMAGE_MENU_ITEM (item), image); g_signal_connect (item, "activate", item_cb, NULL); @@ -499,8 +500,9 @@ baobab_help_display (GtkWindow *parent, gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s", error->message); - g_signal_connect (G_OBJECT (dialog), "response", - G_CALLBACK (gtk_widget_destroy), NULL); + g_signal_connect (dialog, "response", + G_CALLBACK (gtk_widget_destroy), + NULL); gtk_widget_show (dialog); diff --git a/baobab/src/baobab-utils.h b/baobab/src/baobab-utils.h index d47ba798..679d530b 100644 --- a/baobab/src/baobab-utils.h +++ b/baobab/src/baobab-utils.h @@ -1,23 +1,20 @@ -/* - * baobab-utils.h - * This file is part of baobab +/* Copyright (C) 2005-2006 Fabio Marzocca <[email protected]> + * Copyright (C) 2012-2021 MATE Developers * - * Copyright (C) 2005-2006 Fabio Marzocca <[email protected]> + * This file is part of MATE Utils. * - * This program is free software; you can redistribute it and/or modify + * MATE Utils is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * MATE Utils is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301 USA + * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>. */ #ifndef __BAOBAB_UTILS_H__ diff --git a/baobab/src/baobab.c b/baobab/src/baobab.c index 78c56901..380f5407 100644 --- a/baobab/src/baobab.c +++ b/baobab/src/baobab.c @@ -1,32 +1,33 @@ -/* - * baobab.c - * This file is part of baobab +/* Copyright (C) 2005-2006 Fabio Marzocca <[email protected]> + * Copyright (C) 2012-2021 MATE Developers * - * Copyright (C) 2005-2006 Fabio Marzocca <[email protected]> + * This file is part of MATE Utils. * - * This program is free software; you can redistribute it and/or modify + * MATE Utils is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * MATE Utils is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301 USA + * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>. */ +#ifdef HAVE_CONFIG_H #include <config.h> +#endif #include <gtk/gtk.h> #include <glib/gi18n.h> #include <gio/gio.h> #include <glibtop.h> +#include <libmate-desktop/mate-image-menu-item.h> + #include "baobab.h" #include "baobab-scan.h" #include "baobab-treeview.h" @@ -911,20 +912,20 @@ create_context_menu (void) menu->widget = gtk_menu_new (); - menu->up_item = gtk_image_menu_item_new_with_label (_("Move to parent folder")); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu->up_item), + menu->up_item = mate_image_menu_item_new_with_label (_("Move to parent folder")); + mate_image_menu_item_set_image (MATE_IMAGE_MENU_ITEM (menu->up_item), gtk_image_new_from_icon_name("go-up", GTK_ICON_SIZE_MENU)); - menu->zoom_in_item = gtk_image_menu_item_new_with_label (_("Zoom in")) ; - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu->zoom_in_item), + menu->zoom_in_item = mate_image_menu_item_new_with_label (_("Zoom in")) ; + mate_image_menu_item_set_image (MATE_IMAGE_MENU_ITEM (menu->zoom_in_item), gtk_image_new_from_icon_name("list-add", GTK_ICON_SIZE_MENU)); - menu->zoom_out_item = gtk_image_menu_item_new_with_label (_("Zoom out")); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu->zoom_out_item), + menu->zoom_out_item = mate_image_menu_item_new_with_label (_("Zoom out")); + mate_image_menu_item_set_image (MATE_IMAGE_MENU_ITEM (menu->zoom_out_item), gtk_image_new_from_icon_name("list-remove", GTK_ICON_SIZE_MENU)); - menu->snapshot_item = gtk_image_menu_item_new_with_label (_("Save screenshot")); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu->snapshot_item), + menu->snapshot_item = mate_image_menu_item_new_with_label (_("Save screenshot")); + mate_image_menu_item_set_image (MATE_IMAGE_MENU_ITEM (menu->snapshot_item), gtk_image_new_from_icon_name ("applets-screenshooter", GTK_ICON_SIZE_MENU)); gtk_menu_shell_append (GTK_MENU_SHELL (menu->widget), @@ -1224,14 +1225,16 @@ main (int argc, char *argv[]) const GOptionEntry options[] = { {"version", 'V', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, show_version, N_("Show version"), NULL}, {G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &directories, NULL, N_("[DIRECTORY]")}, - {NULL} + { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL } }; GOptionContext *context; GError *error = NULL; +#ifdef ENABLE_NLS bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); +#endif /* ENABLE_NLS */ g_set_application_name (_("Disk Usage Analyzer")); diff --git a/baobab/src/baobab.h b/baobab/src/baobab.h index 97a10de6..a84c9334 100644 --- a/baobab/src/baobab.h +++ b/baobab/src/baobab.h @@ -1,23 +1,20 @@ -/* - * baobab.h - * This file is part of baobab +/* Copyright (C) 2005-2006 Fabio Marzocca <[email protected]> + * Copyright (C) 2012-2021 MATE Developers * - * Copyright (C) 2005-2006 Fabio Marzocca <[email protected]> + * This file is part of MATE Utils. * - * This program is free software; you can redistribute it and/or modify + * MATE Utils is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * MATE Utils is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301 USA + * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>. */ #ifndef __BAOBAB_H__ diff --git a/baobab/src/callbacks.c b/baobab/src/callbacks.c index 5c48aebb..7e8ad638 100644 --- a/baobab/src/callbacks.c +++ b/baobab/src/callbacks.c @@ -1,27 +1,24 @@ -/* - * callbacks.c - * This file is part of baobab +/* Copyright (C) 2005-2006 Fabio Marzocca <[email protected]> + * Copyright (C) 2012-2021 MATE Developers * - * Copyright (C) 2005-2006 Fabio Marzocca <[email protected]> + * This file is part of MATE Utils. * - * This program is free software; you can redistribute it and/or modify + * MATE Utils is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * MATE Utils is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301 USA. + * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>. */ #ifdef HAVE_CONFIG_H -# include <config.h> +#include <config.h> #endif #include <string.h> @@ -90,11 +87,9 @@ on_about_activate (GtkMenuItem *menuitem, gpointer user_data) "General Public License for more details."), N_("You should have received a copy of the GNU General Public License " - "along with this program; if not, write to the Free Software Foundation, Inc., 51 " - "Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.") + "along with this program. If not, see <https://www.gnu.org/licenses/>.") }; - gchar* license_trans = g_strjoin("\n\n", _(license[0]), _(license[1]), _(license[2]), NULL); #ifdef ENABLE_NLS @@ -109,7 +104,7 @@ on_about_activate (GtkMenuItem *menuitem, gpointer user_data) "title", _("About Disk Usage Analyzer"), "comments", _("Analyze your disk usage through a graphical tool."), "copyright", _("Copyright \xc2\xa9 2005-2010 Fabio Marzocca\n" - "Copyright \xc2\xa9 2011-2020 MATE developers"), + "Copyright \xc2\xa9 2011-2021 MATE developers"), "logo-icon-name", "mate-disk-usage-analyzer", "license", license_trans, "authors", authors, diff --git a/baobab/src/callbacks.h b/baobab/src/callbacks.h index d823cc32..e120aa35 100644 --- a/baobab/src/callbacks.h +++ b/baobab/src/callbacks.h @@ -1,23 +1,20 @@ -/* - * callbacks.h - * This file is part of baobab +/* Copyright (C) 2005-2006 Fabio Marzocca <[email protected]> + * Copyright (C) 2012-2021 MATE Developers * - * Copyright (C) 2005-2006 Fabio Marzocca <[email protected]> + * This file is part of MATE Utils. * - * This program is free software; you can redistribute it and/or modify + * MATE Utils is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * MATE Utils is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301 USA + * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>. */ #ifndef __BAOBAB_CALLBACKS_H__ @@ -31,6 +28,8 @@ void on_about_activate (GtkMenuItem *menuitem, gpointer user_data); void on_menuscanhome_activate (GtkMenuItem *menuitem, gpointer user_data); void on_menuallfs_activate (GtkMenuItem *menuitem, gpointer user_data); void on_menuscandir_activate (GtkMenuItem *menuitem, gpointer user_data); +void on_menu_collapse_activate (GtkMenuItem *menuitem, gpointer user_data); +void on_menu_expand_activate (GtkMenuItem *menuitem, gpointer user_data); void on_menu_stop_activate (GtkMenuItem *menuitem, gpointer user_data); void on_menu_rescan_activate (GtkMenuItem *menuitem, gpointer user_data); void on_tbscandir_clicked (GtkToolButton *toolbutton, gpointer user_data); |