summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac1
-rw-r--r--panels/info/Makefile.am25
-rw-r--r--panels/info/cc-info-default-apps-panel.c3
-rw-r--r--panels/info/cc-info-default-apps-panel.h2
-rw-r--r--panels/info/cc-info-overview-panel.c5
-rw-r--r--panels/info/cc-info-overview-panel.h2
-rw-r--r--panels/info/cc-info-panel.c194
-rw-r--r--panels/info/cc-info-panel.h33
-rw-r--r--panels/info/cc-info-removable-media-panel.c3
-rw-r--r--panels/info/cc-info-removable-media-panel.h2
-rw-r--r--panels/info/gnome-info-panel.desktop.in.in20
-rw-r--r--panels/info/info.gresource.xml1
-rw-r--r--panels/info/info.ui125
-rw-r--r--shell/cc-panel-loader.c2
14 files changed, 22 insertions, 396 deletions
diff --git a/configure.ac b/configure.ac
index 582fb4bf7..5a5df003a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -515,7 +515,6 @@ panels/sound/data/icons/scalable/apps/Makefile
panels/sound/data/icons/scalable/devices/Makefile
panels/sound/data/sounds/Makefile
panels/info/Makefile
-panels/info/gnome-info-panel.desktop.in
panels/info/gnome-info-overview-panel.desktop.in
panels/info/gnome-default-apps-panel.desktop.in
panels/info/gnome-removable-media-panel.desktop.in
diff --git a/panels/info/Makefile.am b/panels/info/Makefile.am
index 5c7e9d73d..87cb6ad41 100644
--- a/panels/info/Makefile.am
+++ b/panels/info/Makefile.am
@@ -17,19 +17,17 @@ BUILT_SOURCES = \
cc-info-resources.c \
cc-info-resources.h
-libinfo_la_SOURCES = \
- $(BUILT_SOURCES) \
- cc-info-panel.c \
- cc-info-panel.h \
- cc-info-overview-panel.c \
- cc-info-overview-panel.h \
- cc-info-default-apps-panel.c \
- cc-info-default-apps-panel.h \
- cc-info-removable-media-panel.c \
- cc-info-removable-media-panel.h \
- gsd-disk-space-helper.h \
- gsd-disk-space-helper.c \
- info-cleanup.h \
+libinfo_la_SOURCES = \
+ $(BUILT_SOURCES) \
+ cc-info-overview-panel.c \
+ cc-info-overview-panel.h \
+ cc-info-default-apps-panel.c \
+ cc-info-default-apps-panel.h \
+ cc-info-removable-media-panel.c \
+ cc-info-removable-media-panel.h \
+ gsd-disk-space-helper.h \
+ gsd-disk-space-helper.c \
+ info-cleanup.h \
info-cleanup.c
libinfo_la_LIBADD = $(PANEL_LIBS) $(INFO_PANEL_LIBS)
@@ -53,7 +51,6 @@ cc-info-resources.h: info.gresource.xml $(resource_files)
desktopdir = $(datadir)/applications
desktop_in_files = \
- gnome-info-panel.desktop.in \
gnome-info-overview-panel.desktop.in \
gnome-default-apps-panel.desktop.in \
gnome-removable-media-panel.desktop.in
diff --git a/panels/info/cc-info-default-apps-panel.c b/panels/info/cc-info-default-apps-panel.c
index 1aa7404e1..86672e26b 100644
--- a/panels/info/cc-info-default-apps-panel.c
+++ b/panels/info/cc-info-default-apps-panel.c
@@ -21,7 +21,6 @@
#include <config.h>
-#include "cc-info-panel.h"
#include "cc-info-resources.h"
#include "info-cleanup.h"
@@ -201,6 +200,8 @@ cc_info_default_apps_panel_class_init (CcInfoDefaultAppsPanelClass *klass)
static void
cc_info_default_apps_panel_init (CcInfoDefaultAppsPanel *self)
{
+ g_resources_register (cc_info_get_resource ());
+
gtk_widget_init_template (GTK_WIDGET (self));
info_panel_setup_default_apps (self);
diff --git a/panels/info/cc-info-default-apps-panel.h b/panels/info/cc-info-default-apps-panel.h
index 7fb1d7274..031d25881 100644
--- a/panels/info/cc-info-default-apps-panel.h
+++ b/panels/info/cc-info-default-apps-panel.h
@@ -20,7 +20,7 @@
#ifndef CC_INFO_DEFAULT_APPS_PANEL_H
#define CC_INFO_DEFAULT_APPS_PANEL_H
-#include <gtk/gtk.h>
+#include <shell/cc-panel.h>
G_BEGIN_DECLS
diff --git a/panels/info/cc-info-overview-panel.c b/panels/info/cc-info-overview-panel.c
index 3af58be15..5c54f6295 100644
--- a/panels/info/cc-info-overview-panel.c
+++ b/panels/info/cc-info-overview-panel.c
@@ -21,7 +21,6 @@
#include <config.h>
-#include "cc-info-panel.h"
#include "cc-info-resources.h"
#include "info-cleanup.h"
@@ -36,6 +35,8 @@
#include <glibtop/mem.h>
#include <glibtop/sysinfo.h>
+#include <gdk/gdk.h>
+
#ifdef GDK_WINDOWING_WAYLAND
#include <gdk/gdkwayland.h>
#endif
@@ -937,6 +938,8 @@ cc_info_overview_panel_init (CcInfoOverviewPanel *self)
gtk_widget_init_template (GTK_WIDGET (self));
+ g_resources_register (cc_info_get_resource ());
+
priv->graphics_data = get_graphics_data ();
if (does_gnome_software_exist () || does_gpk_update_viewer_exist ())
diff --git a/panels/info/cc-info-overview-panel.h b/panels/info/cc-info-overview-panel.h
index d81fe587b..4d0c2f1d9 100644
--- a/panels/info/cc-info-overview-panel.h
+++ b/panels/info/cc-info-overview-panel.h
@@ -20,7 +20,7 @@
#ifndef CC_INFO_OVERVIEWPANEL_H
#define CC_INFO_OVERVIEWPANEL_H
-#include <gtk/gtk.h>
+#include <shell/cc-panel.h>
G_BEGIN_DECLS
diff --git a/panels/info/cc-info-panel.c b/panels/info/cc-info-panel.c
deleted file mode 100644
index 1addd16a4..000000000
--- a/panels/info/cc-info-panel.c
+++ /dev/null
@@ -1,194 +0,0 @@
-/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
- *
- * Copyright (C) 2010 Red Hat, Inc
- * Copyright (C) 2008 William Jon McCann <jmccann@redhat.com>
- *
- * This program 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 program 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, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include <config.h>
-
-#include "cc-info-panel.h"
-#include "cc-info-overview-panel.h"
-#include "cc-info-default-apps-panel.h"
-#include "cc-info-removable-media-panel.h"
-#include "cc-info-resources.h"
-#include "info-cleanup.h"
-
-#include <glib.h>
-#include <glib/gi18n.h>
-#include <gio/gio.h>
-#include <gio/gunixmounts.h>
-#include <gio/gdesktopappinfo.h>
-
-#include <glibtop/fsusage.h>
-#include <glibtop/mountlist.h>
-#include <glibtop/mem.h>
-#include <glibtop/sysinfo.h>
-
-#ifdef GDK_WINDOWING_WAYLAND
-#include <gdk/gdkwayland.h>
-#endif
-#ifdef GDK_WINDOWING_X11
-#include <gdk/gdkx.h>
-#endif
-
-#include "gsd-disk-space-helper.h"
-
-#define WID(w) (GtkWidget *) gtk_builder_get_object (self->builder, w)
-
-struct _CcInfoPanel
-{
- CcPanel parent_instance;
-
- GtkBuilder *builder;
-};
-
-CC_PANEL_REGISTER (CcInfoPanel, cc_info_panel)
-
-static void
-cc_info_panel_dispose (GObject *object)
-{
- CcInfoPanel *self = CC_INFO_PANEL (object);
-
- g_clear_object (&self->builder);
-
- G_OBJECT_CLASS (cc_info_panel_parent_class)->dispose (object);
-}
-
-static void
-cc_info_panel_class_init (CcInfoPanelClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- object_class->dispose = cc_info_panel_dispose;
-
- g_type_ensure (CC_TYPE_INFO_OVERVIEW_PANEL);
- g_type_ensure (CC_TYPE_INFO_DEFAULT_APPS_PANEL);
- g_type_ensure (CC_TYPE_INFO_REMOVABLE_MEDIA_PANEL);
-}
-
-static void
-on_section_changed (GtkTreeSelection *selection,
- gpointer data)
-{
- CcInfoPanel *self = CC_INFO_PANEL (data);
- GtkTreeIter iter;
- GtkTreeModel *model;
- GtkTreePath *path;
- gint *indices;
- int index;
-
- if (!gtk_tree_selection_get_selected (selection, &model, &iter))
- return;
-
- path = gtk_tree_model_get_path (model, &iter);
-
- indices = gtk_tree_path_get_indices (path);
- index = indices[0];
-
- if (index >= 0)
- {
- g_object_set (G_OBJECT (WID ("notebook")),
- "page", index, NULL);
- }
-
- gtk_tree_path_free (path);
-}
-
-static void
-info_panel_setup_selector (CcInfoPanel *self)
-{
- GtkTreeView *view;
- GtkListStore *model;
- GtkTreeSelection *selection;
- GtkTreeViewColumn *column;
- GtkCellRenderer *renderer;
- GtkTreeIter iter;
- int section_name_column = 0;
-
- view = GTK_TREE_VIEW (WID ("overview_treeview"));
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
-
- model = gtk_list_store_new (1, G_TYPE_STRING);
- gtk_tree_view_set_model (view, GTK_TREE_MODEL (model));
- g_object_unref (model);
-
- renderer = gtk_cell_renderer_text_new ();
- gtk_cell_renderer_set_padding (renderer, 4, 4);
- g_object_set (renderer,
- "width-chars", 20,
- "ellipsize", PANGO_ELLIPSIZE_END,
- NULL);
- column = gtk_tree_view_column_new_with_attributes (_("Section"),
- renderer,
- "text", section_name_column,
- NULL);
- gtk_tree_view_append_column (view, column);
-
-
- gtk_list_store_append (model, &iter);
- gtk_list_store_set (model, &iter, section_name_column,
- _("Overview"),
- -1);
- gtk_tree_selection_select_iter (selection, &iter);
-
- gtk_list_store_append (model, &iter);
- gtk_list_store_set (model, &iter, section_name_column,
- _("Default Applications"),
- -1);
-
- gtk_list_store_append (model, &iter);
- gtk_list_store_set (model, &iter, section_name_column,
- _("Removable Media"),
- -1);
-
- g_signal_connect (selection, "changed",
- G_CALLBACK (on_section_changed), self);
- on_section_changed (selection, self);
-
- gtk_widget_show_all (GTK_WIDGET (view));
-}
-
-static void
-info_panel_setup_overview (CcInfoPanel *self)
-{
- GtkWidget *widget;
-
- widget = WID ("info_vbox");
- gtk_container_add (GTK_CONTAINER (self), widget);
-}
-
-static void
-cc_info_panel_init (CcInfoPanel *self)
-{
- GError *error = NULL;
-
- g_resources_register (cc_info_get_resource ());
-
- self->builder = gtk_builder_new ();
-
- if (gtk_builder_add_from_resource (self->builder,
- "/org/gnome/control-center/info/info.ui",
- &error) == 0)
- {
- g_warning ("Could not load interface file: %s", error->message);
- g_error_free (error);
- return;
- }
-
- info_panel_setup_selector (self);
- info_panel_setup_overview (self);
-}
diff --git a/panels/info/cc-info-panel.h b/panels/info/cc-info-panel.h
deleted file mode 100644
index 48863f5e8..000000000
--- a/panels/info/cc-info-panel.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
- *
- * Copyright (C) 2010 Red Hat, Inc
- *
- * This program 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 program 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, see <http://www.gnu.org/licenses/>.
- *
- */
-
-
-#ifndef _CC_INFO_PANEL_H
-#define _CC_INFO_PANEL_H
-
-#include <shell/cc-panel.h>
-
-G_BEGIN_DECLS
-
-#define CC_TYPE_INFO_PANEL (cc_info_panel_get_type ())
-G_DECLARE_FINAL_TYPE (CcInfoPanel, cc_info_panel, CC, INFO_PANEL, CcPanel)
-
-G_END_DECLS
-
-#endif /* _CC_INFO_PANEL_H */
diff --git a/panels/info/cc-info-removable-media-panel.c b/panels/info/cc-info-removable-media-panel.c
index f6a3b52ac..27731cc0b 100644
--- a/panels/info/cc-info-removable-media-panel.c
+++ b/panels/info/cc-info-removable-media-panel.c
@@ -21,7 +21,6 @@
#include <config.h>
-#include "cc-info-panel.h"
#include "cc-info-resources.h"
#include "info-cleanup.h"
@@ -618,6 +617,8 @@ cc_info_removable_media_panel_class_init (CcInfoRemovableMediaPanelClass *klass)
static void
cc_info_removable_media_panel_init (CcInfoRemovableMediaPanel *self)
{
+ g_resources_register (cc_info_get_resource ());
+
gtk_widget_init_template (GTK_WIDGET (self));
self->media_settings = g_settings_new (MEDIA_HANDLING_SCHEMA);
diff --git a/panels/info/cc-info-removable-media-panel.h b/panels/info/cc-info-removable-media-panel.h
index d0d1660e6..c77d96367 100644
--- a/panels/info/cc-info-removable-media-panel.h
+++ b/panels/info/cc-info-removable-media-panel.h
@@ -20,7 +20,7 @@
#ifndef CC_INFO_REMOVABLE_MEDIA_PANEL_H
#define CC_INFO_REMOVABLE_MEDIA_PANEL_H
-#include <gtk/gtk.h>
+#include <shell/cc-panel.h>
G_BEGIN_DECLS
diff --git a/panels/info/gnome-info-panel.desktop.in.in b/panels/info/gnome-info-panel.desktop.in.in
deleted file mode 100644
index cb4f0a678..000000000
--- a/panels/info/gnome-info-panel.desktop.in.in
+++ /dev/null
@@ -1,20 +0,0 @@
-[Desktop Entry]
-# Translators: Add soft hyphens to your translations so that the icon view won't clip your translations. See https://bugzilla.gnome.org/show_bug.cgi?id=647087#c13 for details
-_Name=DeĀ­tails
-_Comment=View information about your system
-Exec=gnome-control-center info
-Icon=applications-system
-Terminal=false
-Type=Application
-NoDisplay=true
-StartupNotify=true
-Categories=GNOME;GTK;Settings;X-GNOME-Settings-Panel;X-GNOME-DetailsSettings;
-OnlyShowIn=GNOME;Unity;
-X-GNOME-Bugzilla-Bugzilla=GNOME
-X-GNOME-Bugzilla-Product=gnome-control-center
-X-GNOME-Bugzilla-Component=info
-X-GNOME-Bugzilla-Version=@VERSION@
-# Translators: those are keywords for the System Information panel
-# "Preferred Applications" is the old name for the preference, so make
-# sure that you use the same "translation" for those keywords
-_Keywords=device;system;information;memory;processor;version;default;application;preferred;cd;dvd;usb;audio;video;disc;removable;media;autorun;
diff --git a/panels/info/info.gresource.xml b/panels/info/info.gresource.xml
index ce49a67bd..c96722350 100644
--- a/panels/info/info.gresource.xml
+++ b/panels/info/info.gresource.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/control-center/info">
- <file preprocess="xml-stripblanks">info.ui</file>
<file preprocess="xml-stripblanks">info-overview.ui</file>
<file preprocess="xml-stripblanks">info-default-apps.ui</file>
<file preprocess="xml-stripblanks">info-removable-media.ui</file>
diff --git a/panels/info/info.ui b/panels/info/info.ui
deleted file mode 100644
index 4d8b3b210..000000000
--- a/panels/info/info.ui
+++ /dev/null
@@ -1,125 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface>
- <!-- interface-requires gtk+ 3.0 -->
- <object class="GtkBox" id="info_vbox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">10</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkBox" id="hbox1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">10</property>
- <property name="orientation">horizontal</property>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">never</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkTreeView" id="overview_treeview">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection"/>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="detail_vbox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">20</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkNotebook" id="notebook">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="show_tabs">False</property>
- <property name="show_border">False</property>
- <child>
- <object class="CcInfoOverviewPanel" id="overview_container">
- <property name="visible">true</property>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Overview</property>
- </object>
- <packing>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="CcInfoDefaultAppsPanel" id="default_apps_container">
- <property name="visible">true</property>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Default Applications</property>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="CcInfoRemovableMediaPanel" id="media_preferences_vbox">
- <property name="visible">true</property>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label16">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Removable Media</property>
- </object>
- <packing>
- <property name="position">2</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child type="tab">
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
-</interface>
diff --git a/shell/cc-panel-loader.c b/shell/cc-panel-loader.c
index a7b88cbd5..a9762d6ff 100644
--- a/shell/cc-panel-loader.c
+++ b/shell/cc-panel-loader.c
@@ -36,7 +36,6 @@ extern GType cc_bluetooth_panel_get_type (void);
extern GType cc_color_panel_get_type (void);
extern GType cc_date_time_panel_get_type (void);
extern GType cc_display_panel_get_type (void);
-extern GType cc_info_panel_get_type (void);
extern GType cc_info_overview_panel_get_type (void);
extern GType cc_info_default_apps_panel_get_type (void);
extern GType cc_info_removable_media_panel_get_type (void);
@@ -82,7 +81,6 @@ static struct {
PANEL_TYPE("color", cc_color_panel_get_type ),
PANEL_TYPE("datetime", cc_date_time_panel_get_type ),
PANEL_TYPE("display", cc_display_panel_get_type ),
- PANEL_TYPE("info", cc_info_panel_get_type ),
PANEL_TYPE("info-overview", cc_info_overview_panel_get_type),
PANEL_TYPE("default-apps", cc_info_default_apps_panel_get_type),
PANEL_TYPE("removable-media", cc_info_removable_media_panel_get_type),