Elm menu, slideshow and notify: remove warnings
SVN revision: 43993
This commit is contained in:
parent
dd5cb32961
commit
fca192b469
|
@ -4,7 +4,7 @@
|
|||
#include <Elementary.h>
|
||||
#ifndef ELM_LIB_QUICKLAUNCH
|
||||
|
||||
static Evas_Object *win, *bg, *notify, *menu, *rect, *ic;;
|
||||
static Evas_Object *win, *bg, *menu, *rect, *ic;;
|
||||
static char buf[PATH_MAX];
|
||||
|
||||
static void
|
||||
|
@ -139,8 +139,6 @@ _populate_1(Elm_Menu_Item *item)
|
|||
void
|
||||
test_menu(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
const Eina_List *l;
|
||||
const char *transition;
|
||||
Elm_Menu_Item *item;
|
||||
|
||||
win = elm_win_add(NULL, "Menu", ELM_WIN_BASIC);
|
||||
|
|
|
@ -22,7 +22,6 @@ void
|
|||
test_notify(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
Evas_Object *win, *bg, *bx, *tb, *notify, *bt, *lb;
|
||||
char buf[PATH_MAX];
|
||||
|
||||
win = elm_win_add(NULL, "Notify", ELM_WIN_BASIC);
|
||||
elm_win_title_set(win, "Notify");
|
||||
|
|
|
@ -80,7 +80,6 @@ _spin(void *data, Evas_Object *obj, void *event_info)
|
|||
static Evas_Object *
|
||||
_get(void *data, Evas_Object *obj)
|
||||
{
|
||||
int w, h;
|
||||
Evas_Object *photo = elm_photocam_add(obj);
|
||||
elm_photocam_file_set(photo, data);
|
||||
elm_photocam_zoom_mode_set(photo, ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT);
|
||||
|
@ -92,11 +91,9 @@ _get(void *data, Evas_Object *obj)
|
|||
void
|
||||
test_slideshow(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
Evas_Object *win, *bg, *notify, *bx, *bt, *hv, *spin, *photo;
|
||||
char buf[PATH_MAX];
|
||||
Evas_Object *win, *bg, *notify, *bx, *bt, *hv, *spin;
|
||||
const Eina_List *l;
|
||||
const char *transition;
|
||||
char *s;
|
||||
|
||||
win = elm_win_add(NULL, "Slideshow", ELM_WIN_BASIC);
|
||||
elm_win_title_set(win, "Slideshow");
|
||||
|
|
|
@ -550,7 +550,7 @@ elm_menu_item_add(Evas_Object *obj, Elm_Menu_Item *parent, Evas_Object *icon, co
|
|||
Elm_Menu_Item *subitem;
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
|
||||
if (!wd) return;
|
||||
if (!wd) return NULL;
|
||||
subitem = ELM_NEW(Elm_Menu_Item);
|
||||
if (!subitem) return NULL;
|
||||
subitem->func = func;
|
||||
|
@ -582,8 +582,6 @@ elm_menu_item_add(Evas_Object *obj, Elm_Menu_Item *parent, Evas_Object *icon, co
|
|||
EAPI void
|
||||
elm_menu_item_label_set(Elm_Menu_Item *item, const char *label)
|
||||
{
|
||||
Evas_Coord mw, mh;
|
||||
|
||||
if (item->label) eina_stringshare_del(item->label);
|
||||
if (label)
|
||||
{
|
||||
|
@ -603,7 +601,7 @@ elm_menu_item_label_set(Elm_Menu_Item *item, const char *label)
|
|||
EAPI const char *
|
||||
elm_menu_item_label_get(Elm_Menu_Item *item)
|
||||
{
|
||||
if (!item) return ;
|
||||
if (!item) return NULL;
|
||||
return item->label;
|
||||
}
|
||||
|
||||
|
@ -649,7 +647,7 @@ elm_menu_item_separator_add(Evas_Object *obj, Elm_Menu_Item *parent)
|
|||
Elm_Menu_Item *subitem;
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
|
||||
if (!wd) return;
|
||||
if (!wd) return NULL;
|
||||
subitem = ELM_NEW(Elm_Menu_Item);
|
||||
if (!subitem) return NULL;
|
||||
subitem->menu = obj;
|
||||
|
@ -677,7 +675,6 @@ elm_menu_item_separator_add(Evas_Object *obj, Elm_Menu_Item *parent)
|
|||
EAPI void
|
||||
elm_menu_item_del(Elm_Menu_Item *item)
|
||||
{
|
||||
Eina_List *l;
|
||||
Elm_Menu_Item *_item;
|
||||
|
||||
if (!item) return;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <Elementary.h>
|
||||
#include "elm_priv.h"
|
||||
|
||||
|
||||
/**
|
||||
* @defgroup Notify notify
|
||||
*
|
||||
|
@ -40,8 +41,6 @@ static void _resize(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
|||
static void
|
||||
_del_pre_hook(Evas_Object *obj)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
|
||||
evas_object_event_callback_del_full(obj, EVAS_CALLBACK_RESIZE, _resize, obj);
|
||||
evas_object_event_callback_del_full(obj, EVAS_CALLBACK_MOVE, _resize, obj);
|
||||
evas_object_event_callback_del_full(obj, EVAS_CALLBACK_SHOW, _show, obj);
|
||||
|
@ -307,7 +306,7 @@ elm_notify_content_set(Evas_Object *obj, Evas_Object *content)
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the notify parent
|
||||
* Set the notify parent
|
||||
*
|
||||
* @param obj The notify object
|
||||
* @param content The new parent
|
||||
|
@ -348,7 +347,7 @@ elm_notify_parent_set(Evas_Object *obj, Evas_Object *parent)
|
|||
_changed_size_hints, obj);
|
||||
evas_object_event_callback_add(parent, EVAS_CALLBACK_DEL,
|
||||
_parent_del, obj);
|
||||
evas_object_event_callback_add(parent, EVAS_CALLBACK_HIDE,
|
||||
evas_object_event_callback_add(parent, EVAS_CALLBACK_HIDE,
|
||||
_parent_hide, obj);
|
||||
_sizing_eval(obj);
|
||||
}
|
||||
|
@ -430,14 +429,14 @@ elm_notify_timer_init(Evas_Object *obj)
|
|||
}
|
||||
|
||||
/**
|
||||
* When true if the user clicks outside the window the events will be
|
||||
* When true if the user clicks outside the window the events will be
|
||||
* catch by the others widgets, else the events are block and the signal
|
||||
* dismiss will be sent when the user click outside the window.
|
||||
*
|
||||
* @note The default value is EINA_TRUE.
|
||||
*
|
||||
* @param obj The notify object
|
||||
* @param repeats EINA_TRUE Events are repeats, else no
|
||||
* @param repeats EINA_TRUE Events are repeats, else no
|
||||
*/
|
||||
EAPI void
|
||||
elm_notify_repeat_events_set(Evas_Object *obj, Eina_Bool repeat)
|
||||
|
@ -451,7 +450,7 @@ elm_notify_repeat_events_set(Evas_Object *obj, Eina_Bool repeat)
|
|||
{
|
||||
wd->block_events = edje_object_add(evas_object_evas_get(obj));
|
||||
_elm_theme_set(wd->block_events, "notify", "block_events", "default");
|
||||
elm_widget_resize_object_set(obj, wd->block_events);
|
||||
elm_widget_resize_object_set(obj, wd->block_events);
|
||||
}
|
||||
else
|
||||
evas_object_del(wd->block_events);
|
||||
|
|
|
@ -51,8 +51,6 @@ static void _del_hook(Evas_Object *obj);
|
|||
static void _theme_hook(Evas_Object *obj);
|
||||
static void _sizing_eval(Evas_Object *obj);
|
||||
static void _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
||||
static void _signal_clicked(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
||||
static void _signal_move(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
||||
static int _timer_cb(void *data);
|
||||
|
||||
static void
|
||||
|
@ -93,25 +91,19 @@ _sizing_eval(Evas_Object *obj)
|
|||
static void
|
||||
_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(data);
|
||||
|
||||
_sizing_eval(data);
|
||||
}
|
||||
|
||||
static void
|
||||
_sub_del(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
Evas_Object *sub = event_info;
|
||||
;
|
||||
}
|
||||
|
||||
static void
|
||||
_end(void *data, Evas_Object *obj, const char *emission, const char *source)
|
||||
{
|
||||
Evas_Object *o;
|
||||
Eina_List *l;
|
||||
Elm_Slideshow_Item *item;
|
||||
const char *part;
|
||||
Widget_Data *wd = elm_widget_data_get(data);
|
||||
|
||||
item = wd->previous;
|
||||
|
@ -241,6 +233,7 @@ elm_slideshow_add(Evas_Object *parent)
|
|||
edje_object_signal_callback_add(wd->slideshow, "end", "slideshow", _end, obj);
|
||||
|
||||
evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);
|
||||
evas_object_event_callback_add(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, obj);
|
||||
|
||||
_sizing_eval(obj);
|
||||
return obj;
|
||||
|
@ -260,7 +253,7 @@ elm_slideshow_item_add(Evas_Object *obj, const Elm_Slideshow_Item_Class *itc, co
|
|||
Elm_Slideshow_Item *item;
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
|
||||
if(!wd) return;
|
||||
if(!wd) return NULL;
|
||||
|
||||
item = calloc(1, sizeof(Elm_Slideshow_Item));
|
||||
item->data = data;
|
||||
|
@ -285,9 +278,6 @@ elm_slideshow_item_add(Evas_Object *obj, const Elm_Slideshow_Item_Class *itc, co
|
|||
EAPI void
|
||||
elm_slideshow_show(Elm_Slideshow_Item *item)
|
||||
{
|
||||
Evas_Object *o;
|
||||
Eina_List *l;
|
||||
const char *part;
|
||||
Widget_Data *wd = elm_widget_data_get(item->obj);
|
||||
|
||||
if (!wd) return;
|
||||
|
@ -311,10 +301,6 @@ EAPI void
|
|||
elm_slideshow_next(Evas_Object *obj)
|
||||
{
|
||||
char buf[1024];
|
||||
Eina_List *l;
|
||||
const char *part;
|
||||
Elm_Slideshow_Item *item;
|
||||
Evas_Object *o;
|
||||
Elm_Slideshow_Item *next = NULL;
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
|
||||
|
@ -354,9 +340,6 @@ elm_slideshow_next(Evas_Object *obj)
|
|||
elm_slideshow_previous(Evas_Object *obj)
|
||||
{
|
||||
char buf[1024];
|
||||
Eina_List *l;
|
||||
const char *part;
|
||||
Evas_Object *o;
|
||||
Elm_Slideshow_Item *prev;
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
|
||||
|
@ -398,7 +381,7 @@ elm_slideshow_transitions_get(Evas_Object *obj)
|
|||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
|
||||
if(!wd) return;
|
||||
if(!wd) return NULL;
|
||||
return wd->transitions;
|
||||
}
|
||||
|
||||
|
@ -449,7 +432,7 @@ elm_slideshow_timeout_get(Evas_Object *obj)
|
|||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
|
||||
if(!wd) return;
|
||||
if(!wd) return -1;
|
||||
return wd->timeout;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue