Commit 42974a3c authored by William Jon McCann's avatar William Jon McCann Committed by Bastien Nocera

shell: Rename shell window to CcWindow

This avoids the confusion of the name gnome-control-center.c and
is consistent with all the other classes/files in the project.

https://bugzilla.gnome.org/show_bug.cgi?id=692174
parent 408ae4a8
......@@ -27,8 +27,8 @@ gnome_control_center_SOURCES = \
cc-application.h \
cc-shell-log.c \
cc-shell-log.h \
gnome-control-center.c \
gnome-control-center.h \
cc-window.c \
cc-window.h \
cc-shell-category-view.c \
cc-shell-category-view.h \
cc-shell-item-view.c \
......
......@@ -30,7 +30,7 @@
#include "cc-application.h"
#include "cc-panel-loader.h"
#include "cc-shell-log.h"
#include "gnome-control-center.h"
#include "cc-window.h"
#ifdef HAVE_CHEESE
#include <cheese-gtk.h>
......@@ -38,7 +38,7 @@
struct _CcApplicationPrivate
{
GnomeControlCenter *window;
CcWindow *window;
};
G_DEFINE_TYPE (CcApplication, cc_application, GTK_TYPE_APPLICATION)
......@@ -166,15 +166,15 @@ cc_application_command_line (GApplication *application,
cc_shell_log_set_debug (verbose);
gnome_control_center_show (self->priv->window);
cc_window_show (self->priv->window);
if (search_str)
{
gnome_control_center_set_search_item (self->priv->window, search_str);
cc_window_set_search_item (self->priv->window, search_str);
}
else if (show_overview)
{
gnome_control_center_set_overview_page (self->priv->window);
cc_window_set_overview_page (self->priv->window);
}
else if (start_panels != NULL && start_panels[0] != NULL)
{
......@@ -231,7 +231,7 @@ cc_application_activate (GApplication *application)
{
CcApplication *self = CC_APPLICATION (application);
gnome_control_center_present (self->priv->window);
cc_window_present (self->priv->window);
}
static void
......@@ -281,7 +281,7 @@ cc_application_startup (GApplication *application)
gtk_application_add_accelerator (GTK_APPLICATION (application),
"F1", "app.help", NULL);
self->priv->window = gnome_control_center_new (GTK_APPLICATION (application));
self->priv->window = cc_window_new (GTK_APPLICATION (application));
}
static GObject *
......
......@@ -18,64 +18,49 @@
* Author: Thomas Wood <thos@gnome.org>
*/
#ifndef _GNOME_CONTROL_CENTER_H
#define _GNOME_CONTROL_CENTER_H
#ifndef _CC_WINDOW_H
#define _CC_WINDOW_H
#include <glib-object.h>
#include "cc-shell.h"
G_BEGIN_DECLS
#define GNOME_TYPE_CONTROL_CENTER gnome_control_center_get_type()
#define CC_TYPE_WINDOW cc_window_get_type()
#define CC_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CC_TYPE_WINDOW, CcWindow))
#define CC_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CC_TYPE_WINDOW, CcWindowClass))
#define CC_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CC_TYPE_WINDOW))
#define CC_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CC_TYPE_WINDOW))
#define CC_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CC_TYPE_WINDOW, CcWindowClass))
#define GNOME_CONTROL_CENTER(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
GNOME_TYPE_CONTROL_CENTER, GnomeControlCenter))
typedef struct _CcWindow CcWindow;
typedef struct _CcWindowClass CcWindowClass;
typedef struct _CcWindowPrivate CcWindowPrivate;
#define GNOME_CONTROL_CENTER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), \
GNOME_TYPE_CONTROL_CENTER, GnomeControlCenterClass))
#define GNOME_IS_CONTROL_CENTER(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
GNOME_TYPE_CONTROL_CENTER))
#define GNOME_IS_CONTROL_CENTER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), \
GNOME_TYPE_CONTROL_CENTER))
#define GNOME_CONTROL_CENTER_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), \
GNOME_TYPE_CONTROL_CENTER, GnomeControlCenterClass))
typedef struct _GnomeControlCenter GnomeControlCenter;
typedef struct _GnomeControlCenterClass GnomeControlCenterClass;
typedef struct _GnomeControlCenterPrivate GnomeControlCenterPrivate;
struct _GnomeControlCenter
struct _CcWindow
{
GtkApplicationWindow parent;
GnomeControlCenterPrivate *priv;
CcWindowPrivate *priv;
};
struct _GnomeControlCenterClass
struct _CcWindowClass
{
GtkApplicationWindowClass parent_class;
};
GType gnome_control_center_get_type (void) G_GNUC_CONST;
GType cc_window_get_type (void) G_GNUC_CONST;
GnomeControlCenter *gnome_control_center_new (GtkApplication *application);
CcWindow *cc_window_new (GtkApplication *application);
void gnome_control_center_present (GnomeControlCenter *center);
void cc_window_present (CcWindow *center);
void gnome_control_center_show (GnomeControlCenter *center);
void cc_window_show (CcWindow *center);
void gnome_control_center_set_overview_page (GnomeControlCenter *center);
void cc_window_set_overview_page (CcWindow *center);
void gnome_control_center_set_search_item (GnomeControlCenter *center,
const char *search);
void cc_window_set_search_item (CcWindow *center,
const char *search);
G_END_DECLS
#endif /* _GNOME_CONTROL_CENTER_H */
#endif /* _CC_WINDOW_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment