popup.h File Reference

#include <glib.h>
Include dependency graph for popup.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

G_BEGIN_DECLS gboolean popup_set_popup_show (const char *state)
 Set popup show mode.
void popup_set_popup_block (gboolean block)
gboolean popup_get_popup_block ()

Function Documentation

gboolean popup_get_popup_block (  ) 

Definition at line 161 of file popup.c.

References g_dont_show.

Referenced by set_busy_show_cb().

00162 {
00163     return g_dont_show;
00164 }

Here is the caller graph for this function:

void popup_set_popup_block ( gboolean  block  ) 

Definition at line 155 of file popup.c.

References g_dont_show.

Referenced by cb_sys_usb_state(), and set_busy_show_cb().

00156 {
00157     g_dont_show = block;
00158 }

Here is the caller graph for this function:

G_BEGIN_DECLS gboolean popup_set_popup_show ( const char *  state  ) 

Set popup show mode.

File Name : popup.h

Description: Copyright (C) 2008 iRex Technologies B.V. All rights reserved.---------------------------------------------------------------------------

Name : popup_set_popup_show

Parameters:
mode New mode (show/hide/toggle)
Returns:
Returns TRUE when state was changed, FALSE otherwise

--------------------------------------------------------------------------

Definition at line 114 of file popup.c.

References ERRORPRINTF, g_dont_show, ipc_set_enabled(), is_active, and set_active().

Referenced by set_busy_show_cb(), and set_popup_show_cb().

00115 {
00116     gboolean last_active = is_active;
00117 
00118     if (g_dont_show)
00119     {
00120         return FALSE;
00121     }
00122     
00123     if (g_ascii_strcasecmp(statestr, "show") == 0)
00124     {
00125         set_active(TRUE);
00126     }
00127     else if (g_ascii_strcasecmp(statestr, "hide") == 0)
00128     {
00129         set_active(FALSE);
00130     }
00131     else if (g_ascii_strcasecmp(statestr, "toggle") == 0)
00132     {
00133         set_active(!is_active);
00134     }
00135     else if (g_ascii_strcasecmp(statestr, "block") == 0)
00136     {
00137         // close and block popup
00138         set_active(FALSE);
00139         ipc_set_enabled(FALSE);
00140     }
00141     else if (g_ascii_strcasecmp(statestr, "unblock") == 0)
00142     {
00143         set_active(FALSE);
00144         ipc_set_enabled(TRUE);
00145     }
00146     else
00147     {
00148         ERRORPRINTF("state unknown: %s", statestr);
00149     }
00150 
00151     return (last_active != is_active);
00152 }

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  doxygen 1.6.2-20100208