Fix compiler warnings
src/shell-global.c src/shell-process.c: Remove dead code src/shell-texture-cache.c src/shell-status-menu.c: Remove <foo>_new() functions that weren't in the header file and not used anyways: src/shell-texture-cache.[ch]: Fix a prototype that used () when (void) was intended. http://bugzilla.gnome.org/show_bug.cgi?id=590998
This commit is contained in:
parent
e89d3c7b07
commit
d243634602
@ -271,49 +271,6 @@ shell_global_class_init (ShellGlobalClass *klass)
|
||||
G_PARAM_READABLE));
|
||||
}
|
||||
|
||||
/**
|
||||
* search_path_init:
|
||||
*
|
||||
* search_path_init and get_applications_search_path below were copied from glib/gio/gdesktopappinfo.c
|
||||
* copyright Red Hat, Inc., written by Alex Larsson, licensed under the LGPL
|
||||
*
|
||||
* Return value: location of an array with user and system application directories.
|
||||
*/
|
||||
static gpointer
|
||||
search_path_init (gpointer data)
|
||||
{
|
||||
char **args = NULL;
|
||||
const char * const *data_dirs;
|
||||
const char *user_data_dir;
|
||||
int i, length, j;
|
||||
|
||||
data_dirs = g_get_system_data_dirs ();
|
||||
length = g_strv_length ((char **)data_dirs);
|
||||
|
||||
args = g_new (char *, length + 2);
|
||||
|
||||
j = 0;
|
||||
user_data_dir = g_get_user_data_dir ();
|
||||
args[j++] = g_build_filename (user_data_dir, "applications", NULL);
|
||||
for (i = 0; i < length; i++)
|
||||
args[j++] = g_build_filename (data_dirs[i],
|
||||
"applications", NULL);
|
||||
args[j++] = NULL;
|
||||
|
||||
return args;
|
||||
}
|
||||
/**
|
||||
* get_applications_search_path:
|
||||
*
|
||||
* Return value: location of an array with user and system application directories.
|
||||
*/
|
||||
static const char * const *
|
||||
get_applications_search_path (void)
|
||||
{
|
||||
static GOnce once_init = G_ONCE_INIT;
|
||||
return g_once (&once_init, search_path_init, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* shell_clutter_texture_set_from_pixbuf:
|
||||
* texture: #ClutterTexture to be modified
|
||||
|
@ -181,7 +181,7 @@ shell_overflow_list_allocate (ClutterActor *actor,
|
||||
g_list_free (children);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
shell_overflow_list_paint (ClutterActor *actor)
|
||||
{
|
||||
ShellOverflowList *self = SHELL_OVERFLOW_LIST (actor);
|
||||
@ -403,15 +403,16 @@ shell_overflow_list_get_actor_index (ShellOverflowList *self,
|
||||
{
|
||||
GList *children, *iter;
|
||||
int i;
|
||||
int result;
|
||||
|
||||
children = clutter_container_get_children (CLUTTER_CONTAINER (self));
|
||||
|
||||
if (children == NULL)
|
||||
return NULL;
|
||||
return -1;
|
||||
|
||||
iter = g_list_nth (children, (self->priv->page) * self->priv->items_per_page);
|
||||
|
||||
int result = -1;
|
||||
result = -1;
|
||||
for (i = 0; iter; iter = iter->next, i++)
|
||||
if (iter->data == actor)
|
||||
{
|
||||
|
@ -52,8 +52,6 @@ static void shell_process_init (ShellProcess *self)
|
||||
|
||||
static void shell_process_dispose (GObject *object)
|
||||
{
|
||||
ShellProcess *self = (ShellProcess*)object;
|
||||
|
||||
G_OBJECT_CLASS (shell_process_parent_class)->dispose(object);
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,6 @@ shell_stack_allocate (ClutterActor *self,
|
||||
const ClutterActorBox *box,
|
||||
ClutterAllocationFlags flags)
|
||||
{
|
||||
ClutterGroupPrivate *priv = CLUTTER_GROUP (self)->priv;
|
||||
GList *children, *iter;
|
||||
|
||||
/* chain up to set actor->allocation */
|
||||
@ -138,7 +137,6 @@ shell_stack_get_preferred_width (ClutterActor *actor,
|
||||
static void
|
||||
shell_stack_class_init (ShellStackClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
|
||||
|
||||
actor_class->get_preferred_width = shell_stack_get_preferred_width;
|
||||
|
@ -338,7 +338,7 @@ gnome_session_save_command (const char *arg)
|
||||
if (args[0] == NULL)
|
||||
return;
|
||||
|
||||
args[1] = arg;
|
||||
args[1] = (char *)arg;
|
||||
args[2] = NULL;
|
||||
|
||||
screen = gdk_screen_get_default ();
|
||||
@ -635,12 +635,6 @@ shell_status_menu_class_init (ShellStatusMenuClass *klass)
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
ShellStatusMenu *
|
||||
shell_status_menu_new (void)
|
||||
{
|
||||
return g_object_new (SHELL_TYPE_STATUS_MENU, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
position_menu (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data)
|
||||
{
|
||||
|
@ -151,13 +151,6 @@ shell_texture_cache_finalize (GObject *object)
|
||||
G_OBJECT_CLASS (shell_texture_cache_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
ShellTextureCache*
|
||||
shell_texture_cache_new ()
|
||||
{
|
||||
return SHELL_TEXTURE_CACHE (g_object_new (SHELL_TYPE_TEXTURE_CACHE,
|
||||
NULL));
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
ShellTextureCache *cache;
|
||||
char *uri;
|
||||
@ -1030,7 +1023,7 @@ shell_texture_cache_load_recent_thumbnail (ShellTextureCache *cache,
|
||||
* created for a thumbnail.
|
||||
*/
|
||||
void
|
||||
shell_texture_cache_unref_thumbnail (ShellTextureCache *cache,
|
||||
shell_texture_cache_evict_thumbnail (ShellTextureCache *cache,
|
||||
int size,
|
||||
const char *uri)
|
||||
{
|
||||
@ -1074,7 +1067,7 @@ static ShellTextureCache *instance = NULL;
|
||||
* Return value: (transfer none): The global texture cache
|
||||
*/
|
||||
ShellTextureCache*
|
||||
shell_texture_cache_get_default ()
|
||||
shell_texture_cache_get_default (void)
|
||||
{
|
||||
if (instance == NULL)
|
||||
instance = g_object_new (SHELL_TYPE_TEXTURE_CACHE, NULL);
|
||||
|
@ -38,7 +38,7 @@ typedef enum {
|
||||
|
||||
GType shell_texture_cache_get_type (void) G_GNUC_CONST;
|
||||
|
||||
ShellTextureCache* shell_texture_cache_get_default();
|
||||
ShellTextureCache* shell_texture_cache_get_default (void);
|
||||
|
||||
ClutterActor *shell_texture_cache_load_gicon (ShellTextureCache *cache,
|
||||
GIcon *icon,
|
||||
|
Loading…
Reference in New Issue
Block a user