statusbar.c File Reference

#include "config.h"
#include <gtk/gtk.h>
#include <string.h>
#include <libergtk/ergtk.h>
#include "log.h"
#include "i18n.h"
#include "ipc.h"
#include "pixlist.h"
#include "statusbar.h"
#include "menustore.h"
Include dependency graph for statusbar.c:

Go to the source code of this file.

Data Structures

struct  statusEntry_t
struct  stateEntry_t

Functions

static stateEntry_tget_status_item_state (statusEntry_t *pStatusEntry, const char *statename, gint *entry)
static statusEntry_tget_status_item (const char *item)
static gboolean status_pressed_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
static gboolean on_popup_button_press (GtkWidget *widget, GdkEventButton *event, gpointer data)
static gboolean on_leftbutton_press (GtkWidget *widget, GdkEventButton *event, gpointer data)
static gboolean on_rightbutton_press (GtkWidget *widget, GdkEventButton *event, gpointer data)
static void handle_status_item (const char *item, const char *state)
static void add_system_status_items (void)
static void update_pagecounter (gint curpage, gint numpages)
static void fix_center_pagebar (int width)
static void on_size_allocate (GtkWidget *widget, GtkAllocation *allocation, gpointer data)
void statusbar_create (dialog_cb_t cb)
static gboolean statusbar_add_item (const char *item, const char *statename, gboolean is_visible, gboolean is_clickable)
 Add an item to the status bar.
static gboolean statusbar_add_item_state (const char *item, const char *statename)
 Add a state to a status bar item.
gboolean statusbar_item_set_state (const char *item, const char *statename)
 Set the state of a status bar item.
gboolean statusbar_item_show (const char *item, const char *mode)
 Show a status bar item.
gboolean statusbar_remove_item (const char *item)
 Remove and free a status bar item.
void statusbar_update_battery_state (gint level, const char *state)
 Update battery state icon.
void statusbar_update_signal_strength (const char *medium, gint strength)
static void enable_left (gboolean enabled)
static void enable_right (gboolean enabled)
void statusbar_update_pagecounter (gint curpage, gint numpages, gboolean boundary_check)
void statusbar_hide_pagecounter ()
void statusbar_set_text (void)
static void update_pagecounter (int curpage, int numpages)

Variables

static const int STATUSBAR_HEIGHT = 43
static const int TOOLBAR_MARGIN_LEFT = 4
static const int TOOLBAR_MARGIN_RIGHT = 6
static GtkWidget * statusbar = NULL
static GtkWidget * g_menu_button = NULL
static GtkWidget * g_right_spacer = NULL
static int g_status_width = 0
static GArray * statusArray = NULL
static GtkWidget * g_pagecounter = NULL
static GtkWidget * g_leftbutton = NULL
static GtkWidget * g_rightbutton = NULL
static gint g_curpage = 1
static gint g_numpages = 1
static gboolean g_pagecounter_shown = FALSE
static GtkWidget * g_icon_left_enabled = NULL
static GtkWidget * g_icon_left_disabled = NULL
static GtkWidget * g_icon_right_enabled = NULL
static GtkWidget * g_icon_right_disabled = NULL
static gboolean g_has_left = FALSE
static gboolean g_has_right = FALSE
static dialog_cb_t dialog_cb = NULL

Function Documentation

static void add_system_status_items ( void   )  [static]

Definition at line 905 of file statusbar.c.

References g_status_width, ipc_get_device_capabilities(), LOGPRINTF, statusbar_add_item(), and statusbar_add_item_state().

Referenced by statusbar_create().

00906 {
00907     LOGPRINTF("entry");
00908     
00909     const char *item = NULL;
00910     
00911     // NOTE: add items left to right
00912     // notifications go first to so they are leftmost
00913     
00914     static gboolean has_stylus    = FALSE;
00915     static gboolean has_wifi      = FALSE;
00916     static gboolean has_bluetooth = FALSE;
00917     static gboolean has_3g        = FALSE;
00918     ipc_get_device_capabilities(&has_stylus, &has_wifi, &has_bluetooth, &has_3g);
00919 
00920     int width = 0;
00921 
00922     // stylus selection mode - show only when stylus is available
00923     item = "statusbar_stylus";
00924     statusbar_add_item(      item, "none", has_stylus, TRUE);
00925     statusbar_add_item_state(item, "pointer");
00926     statusbar_add_item_state(item, "eraser");
00927     statusbar_add_item_state(item, "pan");
00928     statusbar_add_item_state(item, "pen");
00929     statusbar_add_item_state(item, "zoom");
00930     statusbar_add_item_state(item, "lookup");
00931     width += 50;    // NOTE hardcoded from icon
00932 
00933 #if MACHINE_IS_DR1000S || MACHINE_IS_DR1000SW
00934     // sensor lock status
00935     item = "statusbar_lock";
00936     statusbar_add_item(      item, "normal", TRUE, TRUE);
00937     statusbar_add_item_state(item, "locked");
00938     width += 50;    // NOTE hardcoded from icon
00939 #endif
00940 
00941     if (has_3g || has_wifi || has_bluetooth)
00942     {
00943         // download manager status
00944         item = "statusbar_downloadmgr";
00945         statusbar_add_item(      item, "normal", TRUE, TRUE);
00946         statusbar_add_item_state(item, "downloading");
00947         statusbar_add_item_state(item, "notify");
00948         statusbar_add_item_state(item, "error");
00949         width += 50;    // NOTE hardcoded from icon
00950     }
00951 
00952     if (has_3g)
00953     {
00954         // 3g connection status
00955         item = "statusbar_3g";
00956         statusbar_add_item(      item, "disconnected", TRUE, TRUE);
00957         statusbar_add_item_state(item, "connected");
00958         statusbar_add_item_state(item, "flightmode");
00959         statusbar_add_item_state(item, "disabled");
00960         statusbar_add_item_state(item, "connected_1b");
00961         statusbar_add_item_state(item, "connected_2b");
00962         statusbar_add_item_state(item, "connected_3b");
00963         statusbar_add_item_state(item, "connected_4b");
00964         statusbar_add_item_state(item, "connected_5b");
00965         width += 50;    // NOTE hardcoded from icon
00966     }
00967 
00968     // battery status
00969     item = "statusbar_battery";
00970     statusbar_add_item(      item, "normal", TRUE, TRUE);
00971     statusbar_add_item_state(item, "100_charging");
00972     statusbar_add_item_state(item, "75_charging");
00973     statusbar_add_item_state(item, "50_charging");
00974     statusbar_add_item_state(item, "25_charging");
00975     statusbar_add_item_state(item, "100");
00976     statusbar_add_item_state(item, "75");
00977     statusbar_add_item_state(item, "50");
00978     statusbar_add_item_state(item, "25");
00979     statusbar_add_item_state(item, "charging");
00980     statusbar_add_item_state(item, "verylow");
00981     width += 50;    // NOTE hardcoded from icon
00982 
00983     g_status_width = width;
00984 }

Here is the call graph for this function:

Here is the caller graph for this function:

static void enable_left ( gboolean  enabled  )  [static]

Definition at line 797 of file statusbar.c.

References g_has_left, g_icon_left_disabled, g_icon_left_enabled, and g_leftbutton.

Referenced by statusbar_update_pagecounter().

00798 {
00799     if (g_has_left == enabled) return;
00800     g_has_left = enabled;
00801     if (enabled) {
00802         gtk_tool_button_set_icon_widget(GTK_TOOL_BUTTON(g_leftbutton), g_icon_left_enabled);
00803     } else {
00804         gtk_tool_button_set_icon_widget(GTK_TOOL_BUTTON(g_leftbutton), g_icon_left_disabled);
00805     }
00806 }

Here is the caller graph for this function:

static void enable_right ( gboolean  enabled  )  [static]

Definition at line 809 of file statusbar.c.

References g_has_right, g_icon_right_disabled, g_icon_right_enabled, and g_rightbutton.

Referenced by statusbar_update_pagecounter().

00810 {
00811     if (g_has_right == enabled) return;
00812     g_has_right = enabled;
00813     if (enabled) {
00814         gtk_tool_button_set_icon_widget(GTK_TOOL_BUTTON(g_rightbutton), g_icon_right_enabled);
00815     } else {
00816         gtk_tool_button_set_icon_widget(GTK_TOOL_BUTTON(g_rightbutton), g_icon_right_disabled);
00817     }
00818 }

Here is the caller graph for this function:

static void fix_center_pagebar ( int  width  )  [static]

Definition at line 212 of file statusbar.c.

References g_pagecounter, g_right_spacer, g_status_width, and LOGPRINTF.

Referenced by on_size_allocate(), and statusbar_set_text().

00213 {
00214     LOGPRINTF("entry");
00215     int spacing = width / 2;
00216    // substract size of right hand icons
00217     spacing -= g_status_width;  
00218     GtkRequisition requisition;
00219     gtk_widget_size_request(g_pagecounter, &requisition);
00220     // substract half size of pagecounter widgets: button, text, button, margin
00221     spacing -= (32+requisition.width+32+40)/2; 
00222     if (spacing < 0) spacing = 0;
00223     gtk_widget_set_size_request(g_right_spacer, spacing, -1);
00224 }

Here is the caller graph for this function:

static statusEntry_t * get_status_item ( const char *  item  )  [static]

Definition at line 987 of file statusbar.c.

References statusEntry_t::itemname, and statusArray.

Referenced by statusbar_add_item_state(), statusbar_item_set_state(), statusbar_item_show(), and statusbar_remove_item().

00988 {
00989     if ((item == NULL) || (statusArray == NULL))
00990     {
00991         return NULL;
00992     }
00993     
00994     // lookup item
00995     guint i = 0;
00996     for (i=0; i < statusArray->len; i++)
00997     {
00998         statusEntry_t *pStatusEntry = g_array_index(statusArray, statusEntry_t*, i);
00999         if (strcmp(pStatusEntry->itemname, item) == 0)
01000         {
01001             return pStatusEntry;
01002         }
01003     }
01004     return NULL;
01005 }

Here is the caller graph for this function:

static stateEntry_t * get_status_item_state ( statusEntry_t pStatusEntry,
const char *  statename,
gint *  entry 
) [static]

Definition at line 1008 of file statusbar.c.

References statusEntry_t::stateArray, and stateEntry_t::statename.

Referenced by statusbar_add_item_state(), and statusbar_item_set_state().

01009 {
01010     guint i = 0;
01011     for (i=0; i < pStatusEntry->stateArray->len; i++)
01012     {
01013         stateEntry_t *pStateEntry = g_array_index(pStatusEntry->stateArray, stateEntry_t*, i);
01014         if (strcmp(pStateEntry->statename, statename) == 0)
01015         {
01016             if (entry != NULL)
01017             {
01018                 *entry = i;
01019             }
01020             return pStateEntry;
01021         }
01022     }
01023     return NULL;
01024 }

Here is the caller graph for this function:

static void handle_status_item ( const char *  item,
const char *  state 
) [static]

Definition at line 1115 of file statusbar.c.

References charge_state, DBUS_SERVICE_SYSTEM_CONTROL, dialog_cb, ipc_get_battery_state(), ipc_send_item_activated(), ipc_send_status_item_activated(), LOGPRINTF, menustore_get_current_menu(), menustore_get_current_service(), and service.

Referenced by status_pressed_event().

01116 {
01117     LOGPRINTF("entry: item [%s] state [%s]", item, state);
01118 
01119 #if MACHINE_IS_DR1000S || MACHINE_IS_DR1000SW
01120     if (strcmp(item, "statusbar_lock") == 0)
01121     {
01122         // toggle sensor lock
01123         //
01124         if (strcmp(state, "normal") == 0)
01125         {
01126           ipc_send_item_activated("lock", "general", menustore_get_current_menu(), "normal", DBUS_SERVICE_SYSTEM_CONTROL);
01127         }
01128         else if (strcmp(state, "locked") == 0)
01129         {
01130           ipc_send_item_activated("lock", "general", menustore_get_current_menu(), "selected", DBUS_SERVICE_SYSTEM_CONTROL);
01131         }
01132         else
01133         {
01134             LOGPRINTF("unknown state `%s` for %s", state, item);
01135         }
01136     } else
01137 #endif
01138     if (strcmp(item, "statusbar_stylus") == 0)
01139     {
01140         // send statusItemActivated message to application
01141         //
01142         const gchar *service = menustore_get_current_service();
01143         if (service && (service[0]!='\0'))
01144         {
01145             ipc_send_status_item_activated(item, state, service);
01146         }
01147     }        
01148     else if ( (strcmp(item, "statusbar_downloadmgr") == 0)
01149            || (strcmp(item, "statusbar_3g") == 0) )
01150     {
01151         // send statusItemActivated message to System Daemon
01152         //
01153         ipc_send_status_item_activated(item, state, DBUS_SERVICE_SYSTEM_CONTROL);
01154     }
01155     else if (strcmp(item, "statusbar_battery") == 0)
01156     {
01157         // get battery info and show dialog
01158         //
01159         gchar *charge_state = NULL;
01160         gchar *message      = NULL;
01161         gint  batt_level    = 0;
01162         
01163         if (ipc_get_battery_state(&batt_level, &charge_state, NULL))
01164         {
01165             if ((strcmp(charge_state, "charging")==0) || (strcmp(charge_state, "discharging")==0))
01166             {
01167                 if (batt_level == 100)
01168                 {
01169                     message = g_strdup_printf(_("Fully charged (100%%%%)"));
01170                 }
01171                 else
01172                 {
01173                     message = g_strdup_printf(_("%d%%%% available"), batt_level);
01174                 }
01175             }
01176             else if (strcmp(charge_state, "full")==0)
01177             {
01178                 message = g_strdup_printf(_("Fully charged (100%%%%)"));
01179             }
01180             else if (strcmp(charge_state, "low")==0)
01181             {
01182                 message = g_strdup_printf(_("Almost empty, %d%%%% remaining"), batt_level);
01183             }
01184             
01185             if (message)
01186             {
01187                 dialog_cb(GTK_MESSAGE_INFO, _("Battery"), message, NULL, NULL);
01188             }
01189             
01190             g_free(charge_state);
01191             g_free(message);
01192         }
01193     }
01194 }

Here is the call graph for this function:

Here is the caller graph for this function:

static gboolean on_leftbutton_press ( GtkWidget *  widget,
GdkEventButton *  event,
gpointer  data 
) [static]

Definition at line 1073 of file statusbar.c.

References g_has_left, ipc_is_enabled(), ipc_send_page_change(), and LOGPRINTF.

Referenced by statusbar_create().

01074 {
01075     LOGPRINTF("entry");
01076     
01077     if (ipc_is_enabled() && g_has_left)
01078     {
01079         ipc_send_page_change("prev");
01080     }
01081     // event handled
01082     return TRUE;
01083 }

Here is the call graph for this function:

Here is the caller graph for this function:

static gboolean on_popup_button_press ( GtkWidget *  widget,
GdkEventButton *  event,
gpointer  data 
) [static]

Definition at line 1063 of file statusbar.c.

References ipc_is_enabled(), ipc_send_request_popup(), and LOGPRINTF.

Referenced by statusbar_create().

01064 {
01065     LOGPRINTF("entry");
01066     if (ipc_is_enabled()) ipc_send_request_popup("toggle");
01067     LOGPRINTF("leave");
01068     // event handled
01069     return TRUE;
01070 }

Here is the call graph for this function:

Here is the caller graph for this function:

static gboolean on_rightbutton_press ( GtkWidget *  widget,
GdkEventButton *  event,
gpointer  data 
) [static]

Definition at line 1086 of file statusbar.c.

References g_has_right, ipc_is_enabled(), ipc_send_page_change(), and LOGPRINTF.

Referenced by statusbar_create().

01087 {
01088     LOGPRINTF("entry");
01089     
01090     if (ipc_is_enabled() && g_has_right)
01091     {
01092         ipc_send_page_change("next");
01093     }
01094     // event handled
01095     return TRUE;
01096 }

Here is the call graph for this function:

Here is the caller graph for this function:

static void on_size_allocate ( GtkWidget *  widget,
GtkAllocation *  allocation,
gpointer  data 
) [static]

Definition at line 227 of file statusbar.c.

References fix_center_pagebar().

Referenced by statusbar_create().

00228 {
00229     fix_center_pagebar(allocation->width);
00230 }

Here is the call graph for this function:

Here is the caller graph for this function:

static gboolean status_pressed_event ( GtkWidget *  widget,
GdkEventButton *  event,
gpointer  user_data 
) [static]

Definition at line 1027 of file statusbar.c.

References statusEntry_t::eventbox, handle_status_item(), ipc_is_enabled(), statusEntry_t::itemname, LOGPRINTF, statusEntry_t::state, statusEntry_t::stateArray, stateEntry_t::statename, and statusArray.

Referenced by statusbar_add_item().

01030 {
01031     LOGPRINTF("entry");
01032 
01033     if (!ipc_is_enabled()) return FALSE;
01034 
01035     statusEntry_t *pStatusEntry = NULL;
01036     
01037     if (statusArray != NULL)
01038     {
01039         guint i;
01040         for (i=0; i < statusArray->len; i++)
01041         {
01042             pStatusEntry = g_array_index(statusArray, statusEntry_t*, i);
01043              
01044             if (pStatusEntry->eventbox == widget)
01045             {
01046                 stateEntry_t *pStateEntry = NULL;
01047                 pStateEntry = g_array_index(pStatusEntry->stateArray, stateEntry_t*, pStatusEntry->state);
01048                 LOGPRINTF("pressed %s, state %d (%s)", pStatusEntry->itemname, pStatusEntry->state, pStateEntry->statename);
01049                 
01050                 handle_status_item(pStatusEntry->itemname, pStateEntry->statename);
01051                   
01052                 // don't propagate 
01053                 return TRUE;
01054             }
01055         }
01056     }
01057 
01058     // propagate further
01059     return FALSE;
01060 }

Here is the call graph for this function:

Here is the caller graph for this function:

static gboolean statusbar_add_item ( const char *  item,
const char *  statename,
gboolean  is_visible,
gboolean  is_clickable 
) [static]

Add an item to the status bar.

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

Name : statusbar_add_item

Parameters:
item Item name
statename Name of default state
is_visible Set to TRUE to show the item, FALSE to hide
is_clickable Set to TRUE to emit a signal when clicked, FALSE otherwise

NOTE: this function expects an icon image with the name _<statename>.png in the global icon directory; when <statename> is "normal", it loads .png

Returns:
Returns TRUE on success, FALSE otherwise

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

Definition at line 441 of file statusbar.c.

References statusEntry_t::eventbox, statusEntry_t::image, stateEntry_t::image, statusEntry_t::item, statusEntry_t::itemname, LOGPRINTF, pixlist_icon_state(), statusEntry_t::stateArray, stateEntry_t::statename, status_pressed_event(), statusArray, statusbar, and WARNPRINTF.

Referenced by add_system_status_items().

00442 {
00443     LOGPRINTF("entry");
00444     
00445     GtkWidget     *icon         = NULL;
00446     GtkWidget     *toolitem     = NULL;
00447     GtkWidget     *eventbox     = NULL;
00448     statusEntry_t *pStatusEntry = NULL;
00449 
00450     g_return_val_if_fail(item != NULL, FALSE);
00451     
00452     if (statusArray == NULL)
00453     {
00454         // first item, create array
00455         statusArray = g_array_new(FALSE, TRUE, sizeof(statusEntry_t*));
00456     }
00457     else 
00458     {
00459         // lookup item (if exist, error)
00460         guint i = 0;
00461         for (i=0; i < statusArray->len; i++)
00462         {
00463             pStatusEntry = g_array_index(statusArray, statusEntry_t*, i);
00464             if (strcmp(pStatusEntry->itemname, item) == 0)
00465             {
00466                 WARNPRINTF("`%s` already defined", item);
00467                 return FALSE;
00468             }
00469         }
00470     }
00471 
00472     //  (toolbar) from statusbar_create
00473     //    |
00474     //    +-- toolitem
00475     //          |
00476     toolitem = (GtkWidget *) gtk_tool_item_new();
00477     
00478     //          |
00479     //          +-- eventbox
00480     //                |
00481     eventbox = (GtkWidget *) gtk_event_box_new();
00482     gtk_container_add(GTK_CONTAINER(toolitem), eventbox);
00483     gtk_widget_show(eventbox);
00484     
00485     //                |  
00486     //                +-- icon
00487     //
00488     icon = gtk_image_new_from_pixbuf(pixlist_icon_state(item, statename));
00489     
00490     // increase reference to avoid it being removed on state change
00491     g_object_ref(icon); 
00492     
00493     gtk_container_add(GTK_CONTAINER(eventbox), icon);
00494     gtk_widget_show(icon);
00495     
00496     if (is_clickable)
00497     {
00498         gtk_widget_set_events(eventbox, GDK_BUTTON_PRESS_MASK);
00499         g_signal_connect(G_OBJECT(eventbox), "button_press_event",
00500                          G_CALLBACK(status_pressed_event), NULL);
00501     }
00502 
00503     // add to item to the end of the toolbar
00504     gtk_toolbar_insert(GTK_TOOLBAR(statusbar), GTK_TOOL_ITEM(toolitem), -1);
00505     
00506     if (is_visible)
00507     {
00508         gtk_widget_show(toolitem);
00509     }
00510 
00511     // create, prepare and add state entry
00512     statusEntry_t  *statusEntry = NULL;
00513     statusEntry = g_new0(statusEntry_t, 1);
00514     statusEntry->stateArray = g_array_new(FALSE, TRUE, sizeof(stateEntry_t*));
00515     
00516     stateEntry_t *stateEntry = NULL;
00517     stateEntry = g_new0(stateEntry_t, 1);
00518     stateEntry->image = icon;
00519     stateEntry->statename = g_strdup(statename);
00520     g_array_append_val(statusEntry->stateArray, stateEntry);
00521 
00522     // prepare rest of tool entry and add
00523     statusEntry->itemname = g_strdup(item);
00524     statusEntry->image = icon;
00525     statusEntry->item = toolitem;
00526     statusEntry->eventbox = eventbox;
00527     g_array_append_val(statusArray, statusEntry);
00528 
00529     return TRUE;    
00530 }

Here is the call graph for this function:

Here is the caller graph for this function:

static gboolean statusbar_add_item_state ( const char *  item,
const char *  statename 
) [static]

Add a state to a status bar item.

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

Name : statusbar_add_item_state

Parameters:
item Item name
statename Name of new state

NOTE: this function expects an icon image with the name _<statename>.png in the global icon directory; when <statename> is "normal", it loads .png

Returns:
Returns TRUE on success, FALSE otherwise

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

Definition at line 548 of file statusbar.c.

References get_status_item(), get_status_item_state(), stateEntry_t::image, LOGPRINTF, pixlist_icon_state(), statusEntry_t::stateArray, stateEntry_t::statename, and WARNPRINTF.

Referenced by add_system_status_items().

00549 {
00550     LOGPRINTF("entry");
00551     
00552     GtkWidget     *icon         = NULL;
00553     statusEntry_t *pStatusEntry = NULL;
00554     stateEntry_t  *pStateEntry  = NULL;
00555     
00556     pStatusEntry = get_status_item(item);
00557     if (pStatusEntry == NULL)
00558     {
00559         WARNPRINTF("item `%s` not defined", item);
00560         return FALSE;
00561     }
00562     
00563     pStateEntry = get_status_item_state(pStatusEntry, statename, NULL);
00564     if (pStateEntry != NULL)
00565     {
00566         WARNPRINTF("state `%s.%s` already defined", item, statename);
00567         return FALSE;
00568     }
00569     
00570     // create image widget
00571     icon = gtk_image_new_from_pixbuf(pixlist_icon_state(item, statename));
00572     
00573     // increase reference to avoid it being removed on state change
00574     g_object_ref(icon); 
00575     
00576     // add icon/state
00577     stateEntry_t *stateEntry = NULL;
00578     stateEntry = g_new0(stateEntry_t, 1);
00579     stateEntry->image = icon;
00580     stateEntry->statename = g_strdup(statename);
00581 
00582     // store array
00583     g_array_append_val(pStatusEntry->stateArray, stateEntry);
00584     
00585     return TRUE;    
00586 }

Here is the call graph for this function:

Here is the caller graph for this function:

void statusbar_create ( dialog_cb_t  cb  ) 

Definition at line 233 of file statusbar.c.

References add_system_status_items(), dialog_cb, g_icon_left_disabled, g_icon_left_enabled, g_icon_right_disabled, g_icon_right_enabled, g_leftbutton, g_menu_button, g_pagecounter, g_right_spacer, g_rightbutton, g_statusbar_window, LOGPRINTF, on_leftbutton_press(), on_popup_button_press(), on_rightbutton_press(), on_size_allocate(), PATH_IMG, statusbar, STATUSBAR_HEIGHT, statusbar_set_text(), TOOLBAR_MARGIN_LEFT, and TOOLBAR_MARGIN_RIGHT.

Referenced by main().

00234 {
00235     LOGPRINTF("entry");
00236     dialog_cb = cb;
00237     
00238     GdkColor color;
00239     gdk_color_parse ("#aaaaaa", &color);
00240     
00241     // window 
00242     //   |
00243     GtkWidget *widget = gtk_window_new(GTK_WINDOW_TOPLEVEL);
00244     gtk_widget_set_name(widget, "irex-statusbar");
00245     GtkWindow *window = GTK_WINDOW(widget);
00246     g_statusbar_window = window;
00247 
00248     // use hint DOCK so it is hidden for fullscreen windows
00249     gtk_window_set_type_hint(window, GDK_WINDOW_TYPE_HINT_DOCK);
00250     gtk_window_set_decorated(window, FALSE);
00251     gtk_window_set_accept_focus(window, FALSE);
00252     gtk_widget_modify_bg(widget, GTK_STATE_NORMAL, &color);
00253 
00254     // resize and move to dock at the botton of the screen
00255     gtk_window_set_default_size(window, -1, STATUSBAR_HEIGHT);
00256     int bar_width  = 0;
00257     int bar_height = 0;
00258     gtk_window_get_size(window, &bar_width, &bar_height);
00259     gtk_widget_set_size_request(widget, bar_width, bar_height);
00260     gtk_window_resize(window, bar_width, bar_height);   
00261     gtk_window_move(window, 0, gdk_screen_height());
00262     
00263     gtk_window_set_resizable(window, FALSE);
00264     gtk_widget_show(widget);
00265 
00266     //   |
00267     //   +-- alignment
00268     //         |
00269     GtkWidget *alignment = gtk_alignment_new(0, 0.0, 1.0, 1.0); 
00270     gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 5, 
00271                               TOOLBAR_MARGIN_LEFT, TOOLBAR_MARGIN_RIGHT);
00272     gtk_container_add(GTK_CONTAINER(window), alignment);    
00273     gtk_widget_show(alignment);
00274 
00275     //         |
00276     //         +-- gtktoolbar
00277     //               |
00278     widget = gtk_toolbar_new();
00279     gtk_toolbar_set_orientation(GTK_TOOLBAR(widget), GTK_ORIENTATION_HORIZONTAL);
00280     
00281     gtk_toolbar_set_tooltips(GTK_TOOLBAR(widget), FALSE);
00282     gtk_toolbar_set_show_arrow(GTK_TOOLBAR(widget), FALSE);
00283     gtk_toolbar_set_style(GTK_TOOLBAR(widget), GTK_TOOLBAR_ICONS);
00284     gtk_container_add(GTK_CONTAINER(alignment), widget);
00285     gtk_widget_show(widget);
00286     statusbar = widget;    
00287 
00288     // Add menu button
00289     //               |
00290     //               +-- toolitem 
00291     //               |     |
00292     widget = (GtkWidget *) gtk_tool_item_new();
00293     
00294     //               |     |
00295     //               |     +-- eventbox
00296     //               |
00297     GtkWidget *eventbox = (GtkWidget *) gtk_event_box_new();
00298     gtk_widget_modify_fg (eventbox, GTK_STATE_NORMAL, &color);
00299     gtk_container_add(GTK_CONTAINER(widget), eventbox);
00300     
00301     //               |           |  
00302     //               |           +-- icon
00303     //               |
00304     GtkWidget *icon = gtk_image_new_from_file(PATH_IMG"statusbar_menu_button.png");
00305     gtk_container_add(GTK_CONTAINER(eventbox), icon);
00306     gtk_toolbar_insert(GTK_TOOLBAR(statusbar), GTK_TOOL_ITEM(widget), -1);
00307     g_signal_connect(G_OBJECT(eventbox), "button-release-event", G_CALLBACK(on_popup_button_press), NULL);
00308     gtk_widget_show(icon);
00309     gtk_widget_show(widget);
00310     gtk_widget_show(eventbox);
00311     
00312     //               |
00313     //               +-- toolitem
00314     //               |     |
00315     //               |     +-- button with label
00316     //               |
00317     widget = (GtkWidget *) gtk_tool_item_new();
00318     GtkWidget *button = gtk_button_new_with_label("");
00319     gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
00320     gtk_container_add(GTK_CONTAINER(widget), button);
00321     gtk_toolbar_insert(GTK_TOOLBAR(statusbar), GTK_TOOL_ITEM(widget), -1);
00322     g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(on_popup_button_press), NULL);
00323     gtk_widget_show(button);
00324     gtk_widget_show(widget);
00325 
00326     g_menu_button = button;
00327 
00328 #if MACHINE_IS_DR1000S || MACHINE_IS_DR1000SW
00329     widget = (GtkWidget*) gtk_separator_tool_item_new();
00330     gtk_separator_tool_item_set_draw(GTK_SEPARATOR_TOOL_ITEM(widget), FALSE);
00331     gtk_tool_item_set_expand(GTK_TOOL_ITEM(widget), FALSE); 
00332     gtk_toolbar_insert(GTK_TOOLBAR(statusbar), GTK_TOOL_ITEM(widget), -1);
00333     gtk_widget_set_size_request(widget, MENUBUTTON_MARGIN, -1);
00334     gtk_widget_show(widget);
00335 
00336     int i;
00337     for (i=0; i<MENUSTORE_NUM_TOOLS; i++)
00338     {
00339         add_toolbar_item(i);
00340     }
00341 #endif
00342 
00343     // Add left separator
00344     //               |
00345     //               +-- separator
00346     //               |
00347     widget = (GtkWidget*) gtk_separator_tool_item_new();
00348     gtk_separator_tool_item_set_draw(GTK_SEPARATOR_TOOL_ITEM(widget), FALSE);
00349     gtk_tool_item_set_expand(GTK_TOOL_ITEM(widget), TRUE); 
00350     gtk_toolbar_insert(GTK_TOOLBAR(statusbar), GTK_TOOL_ITEM(widget), -1);
00351     gtk_widget_show(widget);
00352 
00353     // Add left button
00354     //               |
00355     //               +-- tool button
00356     //               |
00357     g_icon_left_enabled = gtk_image_new_from_file(PATH_IMG"statusbar_arrow_left.png");
00358     g_object_ref(G_OBJECT(g_icon_left_enabled));
00359     gtk_widget_show(g_icon_left_enabled);
00360 
00361     g_icon_left_disabled = gtk_image_new_from_file(PATH_IMG"statusbar_arrow_left_disabled.png");
00362     g_object_ref(G_OBJECT(g_icon_left_disabled));
00363     gtk_widget_show(g_icon_left_disabled);
00364 
00365     GtkToolItem *leftbutton = gtk_tool_button_new(g_icon_left_disabled, "");
00366     gtk_widget_show(GTK_WIDGET(leftbutton));
00367     gtk_toolbar_insert(GTK_TOOLBAR(statusbar), leftbutton, -1);
00368     g_signal_connect(G_OBJECT(leftbutton), "clicked", G_CALLBACK(on_leftbutton_press), NULL);
00369     g_leftbutton = GTK_WIDGET(leftbutton);
00370 
00371     // Add page counter
00372     //               |
00373     //               +-- toolitem
00374     //               |     |  
00375     //               |     +-- label
00376     //               |
00377     widget = (GtkWidget *) gtk_tool_item_new();
00378     GtkWidget* pageLabel = gtk_label_new("");
00379     gtk_widget_set_name(pageLabel, "irex-page-label");
00380     gtk_widget_show(pageLabel);
00381     gtk_container_add(GTK_CONTAINER(widget), pageLabel);
00382     gtk_toolbar_insert(GTK_TOOLBAR(statusbar), GTK_TOOL_ITEM(widget), -1);
00383     gtk_widget_show(widget);
00384     g_pagecounter = pageLabel;
00385 
00386     // Add right button
00387     //               |
00388     //               +-- tool button
00389     //               |
00390     g_icon_right_enabled = gtk_image_new_from_file(PATH_IMG"statusbar_arrow_right.png");
00391     g_object_ref(G_OBJECT(g_icon_right_enabled));
00392     gtk_widget_show(g_icon_right_enabled);
00393     
00394     g_icon_right_disabled = gtk_image_new_from_file(PATH_IMG"statusbar_arrow_right_disabled.png");
00395     g_object_ref(G_OBJECT(g_icon_right_disabled));
00396     gtk_widget_show(g_icon_right_disabled);
00397 
00398     GtkToolItem *rightbutton = gtk_tool_button_new(g_icon_right_disabled, "");
00399     gtk_widget_show(GTK_WIDGET(rightbutton));
00400     gtk_toolbar_insert(GTK_TOOLBAR(statusbar), rightbutton, -1);
00401     g_signal_connect(G_OBJECT(rightbutton), "clicked", G_CALLBACK(on_rightbutton_press), NULL);
00402     g_rightbutton = GTK_WIDGET(rightbutton);
00403 
00404     // Fill out with blank space
00405     //               |
00406     //               +-- separator
00407     //
00408     widget = (GtkWidget*) gtk_separator_tool_item_new();
00409     gtk_separator_tool_item_set_draw(GTK_SEPARATOR_TOOL_ITEM(widget), FALSE);
00410     gtk_tool_item_set_expand(GTK_TOOL_ITEM(widget), FALSE); 
00411     gtk_toolbar_insert(GTK_TOOLBAR(statusbar), GTK_TOOL_ITEM(widget), -1);
00412     gtk_widget_show(widget);
00413     g_right_spacer = widget;
00414     g_signal_connect(statusbar, "size-allocate", G_CALLBACK(on_size_allocate), NULL);
00415 
00416     // Add system icons here
00417     add_system_status_items();
00418 
00419     // Set defaults
00420     statusbar_set_text();
00421 }

Here is the call graph for this function:

Here is the caller graph for this function:

void statusbar_hide_pagecounter (  ) 

Definition at line 879 of file statusbar.c.

References g_leftbutton, g_pagecounter, g_pagecounter_shown, g_rightbutton, and LOGPRINTF.

Referenced by show_menu_cb(), and statusbar_update_pagecounter().

00880 {
00881     LOGPRINTF("entry");
00882 
00883     gtk_widget_hide(g_pagecounter);
00884     gtk_widget_hide(g_leftbutton);
00885     gtk_widget_hide(g_rightbutton);
00886     g_pagecounter_shown = FALSE;
00887 }

Here is the caller graph for this function:

gboolean statusbar_item_set_state ( const char *  item,
const char *  statename 
)

Set the state of a status bar item.

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

Name : statusbar_item_set_state

Parameters:
item Item name
statename Name of new state
Returns:
Returns TRUE on success, FALSE otherwise

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

Definition at line 589 of file statusbar.c.

References statusEntry_t::eventbox, get_status_item(), get_status_item_state(), stateEntry_t::image, statusEntry_t::image, statusEntry_t::state, TRACE, and WARNPRINTF.

Referenced by set_statusitem_state_cb(), statusbar_update_battery_state(), and statusbar_update_signal_strength().

00590 {
00591     TRACE("%s() item=%s  statename=%s\n", __func__, item, statename);
00592 
00593     statusEntry_t *pStatusEntry = get_status_item(item);
00594     if (pStatusEntry == NULL)
00595     {
00596         WARNPRINTF("item `%s` not defined", item);
00597         return FALSE;
00598     }
00599  
00600     gint state_index;
00601     stateEntry_t  *pStateEntry = get_status_item_state(pStatusEntry, statename, &state_index);
00602     if (pStateEntry == NULL)
00603     {
00604         WARNPRINTF("state `%s.%s` not defined", item, statename);
00605         return FALSE;
00606     }
00607 
00608     // remove old icon
00609     gtk_container_remove(GTK_CONTAINER(pStatusEntry->eventbox), pStatusEntry->image);
00610     
00611     // set new icon
00612     pStatusEntry->state = state_index;
00613     pStatusEntry->image = pStateEntry->image;
00614     gtk_widget_show(pStatusEntry->image);
00615     gtk_container_add(GTK_CONTAINER(pStatusEntry->eventbox), pStatusEntry->image);
00616     
00617     return TRUE;    
00618 }

Here is the call graph for this function:

Here is the caller graph for this function:

gboolean statusbar_item_show ( const char *  item,
const char *  mode 
)

Show a status bar item.

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

Name : statusbar_item_show

Parameters:
item Item name
mode New mode (show/hide)
Returns:
Returns TRUE on success, FALSE otherwise

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

Definition at line 621 of file statusbar.c.

References ERRORPRINTF, get_status_item(), statusEntry_t::item, TRACE, and WARNPRINTF.

Referenced by set_statusitem_show_cb().

00622 {
00623     TRACE("%s() item=%s  mode=%s\n", __func__, item, mode);
00624 
00625     statusEntry_t *pStatusEntry = get_status_item(item);
00626     if (pStatusEntry == NULL)
00627     {
00628         WARNPRINTF("item `%s` not defined", item);
00629         return FALSE;
00630     }
00631     
00632     if (g_ascii_strcasecmp(mode, "show") == 0)
00633     {
00634         gtk_widget_show(pStatusEntry->item);
00635     }
00636     else if (g_ascii_strcasecmp(mode, "hide") == 0)
00637     {
00638         gtk_widget_hide(pStatusEntry->item);
00639     }
00640     else
00641     {
00642         ERRORPRINTF("mode unknown: %s", mode);
00643         return FALSE;
00644     }
00645     
00646     return TRUE;
00647 }

Here is the call graph for this function:

Here is the caller graph for this function:

gboolean statusbar_remove_item ( const char *  item  ) 

Remove and free a status bar item.

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

Name : statusbar_remove_item

Parameters:
item Item name
Returns:
Returns TRUE on success, FALSE otherwise

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

Definition at line 650 of file statusbar.c.

References get_status_item(), statusEntry_t::item, statusEntry_t::itemname, statusEntry_t::stateArray, TRACE, and WARNPRINTF.

00651 {
00652     TRACE("%s() item=%s\n", __func__, item);
00653     
00654     statusEntry_t *pStatusEntry = get_status_item(item);
00655     if (pStatusEntry == NULL)
00656     {
00657         WARNPRINTF("item `%s` not defined", item);
00658         return FALSE;
00659     }
00660 
00661     // free state names
00662     guint i = 0;
00663     for (i=0; i < pStatusEntry->stateArray->len; i++)
00664     {
00665         g_free(g_array_index(pStatusEntry->stateArray, stateEntry_t*, i)->statename);
00666     }
00667     
00668     // free tool entry
00669     // icon will be freed automatically as it is toolitem container
00670     gtk_widget_destroy(pStatusEntry->item);
00671     g_array_free(pStatusEntry->stateArray, TRUE);
00672     g_free(pStatusEntry->itemname);
00673     
00674     return TRUE;
00675 }

Here is the call graph for this function:

void statusbar_set_text ( void   ) 

Definition at line 890 of file statusbar.c.

References fix_center_pagebar(), g_curpage, g_menu_button, g_numpages, statusbar, and update_pagecounter().

Referenced by cb_sys_changed_locale(), and statusbar_create().

00891 {
00892     update_pagecounter(g_curpage, g_numpages);
00893     gtk_button_set_label(GTK_BUTTON(g_menu_button), _("Menu"));
00894     
00895     GtkRequisition requisition;
00896     gtk_widget_size_request(statusbar, &requisition);
00897     fix_center_pagebar(requisition.width);
00898 }

Here is the call graph for this function:

Here is the caller graph for this function:

void statusbar_update_battery_state ( gint  level,
const char *  state 
)

Update battery state icon.

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

Name : statusbar_update_battery_state

Parameters:
level Battery level in percent
state Charge state string
Returns:
--

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

Definition at line 678 of file statusbar.c.

References ERRORPRINTF, and statusbar_item_set_state().

Referenced by cb_sys_battery_state(), main(), and on_check_low_battery().

00679 {
00680     g_return_if_fail(state!=NULL);
00681 
00682     gchar *item  = "statusbar_battery";
00683 
00684 #if MACHINE_IS_DR800SG || MACHINE_IS_DR800S || MACHINE_IS_DR800SW
00685     const gint four_bars_limit  = 88;
00686     const gint three_bars_limit = 63;
00687     const gint two_bars_limit   = 38;
00688     const gint one_bar_limit    = 13;
00689 #elif MACHINE_IS_DR1000S || MACHINE_IS_DR1000SW
00690     const gint four_bars_limit  = 75;
00691     const gint three_bars_limit = 50;
00692     const gint two_bars_limit   = 25;
00693     const gint one_bar_limit    = 10;
00694 #else
00695 #error "Unhandled machine type"
00696 #endif
00697     
00698     static const gchar *last_icon = NULL;
00699     const gchar *icon = NULL;
00700     
00701     if (strcmp(state, "charging") == 0)
00702     {
00703         // charging, show level
00704         if (level >= four_bars_limit)
00705         {
00706             icon = "100_charging";
00707         }
00708         else if (level >= three_bars_limit)
00709         {
00710             icon = "75_charging";
00711         }
00712         else if (level >= two_bars_limit)
00713         {
00714             icon = "50_charging";
00715         }
00716         else if (level >= one_bar_limit)
00717         {
00718             icon = "25_charging";
00719         }
00720         else 
00721         {
00722             icon = "charging";
00723         }
00724     }
00725     else if (strcmp(state, "discharging") == 0)
00726     {
00727         // discharging, show level
00728         if (level > four_bars_limit)
00729         {
00730             icon = "100";
00731         }
00732         else if (level > three_bars_limit)
00733         {
00734             icon = "75";
00735         }
00736         else if (level > two_bars_limit)
00737         {
00738             icon = "50";
00739         }
00740         else if (level > one_bar_limit)
00741         {
00742             icon = "25";
00743         }
00744         else
00745         {
00746             icon = "normal";
00747         }
00748     }
00749     else if (strcmp(state, "low") == 0)
00750     {
00751         icon = "verylow";
00752     }
00753     else if (strcmp(state, "full") == 0)
00754     {
00755         icon = "100";
00756     }
00757     else
00758     {
00759         ERRORPRINTF("unhandled state [%s] level [%d]", state, level);
00760     }
00761         
00762     if (icon && (icon != last_icon))
00763     {
00764         // update icon to reflect new state
00765         statusbar_item_set_state(item, icon);
00766         last_icon = icon;
00767     }
00768 }

Here is the call graph for this function:

Here is the caller graph for this function:

void statusbar_update_pagecounter ( gint  curpage,
gint  numpages,
gboolean  boundary_check 
)

Definition at line 821 of file statusbar.c.

References enable_left(), enable_right(), g_curpage, g_has_left, g_has_right, g_leftbutton, g_numpages, g_pagecounter, g_pagecounter_shown, g_rightbutton, LOGPRINTF, statusbar_hide_pagecounter(), and update_pagecounter().

Referenced by update_page_counter_cb().

00822 {
00823     LOGPRINTF("entry curpage [%d] numpages [%d] boundary_check [%d] has_left [%d] has_right [%d] g_pagecounter_shown [%d]", curpage, numpages, boundary_check, g_has_left, g_has_right, g_pagecounter_shown);
00824 
00825     if ((curpage == 0) && (numpages == 0))
00826     {
00827         if (g_pagecounter_shown)
00828         {
00829             statusbar_hide_pagecounter();
00830         }
00831     }
00832     else if ((curpage == -1) && (numpages == -1))   // magic value for Counting pages...
00833     {
00834         update_pagecounter(curpage, numpages);
00835         gtk_widget_show(g_pagecounter);
00836 
00837         // Ignore parameter boundary_check.
00838         // Enable previous-/next-page arrows.
00839         enable_left(TRUE);
00840         enable_right(TRUE);
00841         gtk_widget_show(g_leftbutton);
00842         gtk_widget_show(g_rightbutton);
00843     }
00844     else
00845     {
00846         update_pagecounter(curpage, numpages);
00847         
00848         if (curpage == 1 && boundary_check)
00849         {
00850             enable_left(FALSE);
00851         } else {
00852             enable_left(TRUE);
00853         }
00854         
00855         if (curpage == numpages && boundary_check)
00856         {
00857             enable_right(FALSE);
00858         } else {
00859             enable_right(TRUE);
00860         }
00861 
00862         if (!g_pagecounter_shown)
00863         {
00864             gtk_widget_show(g_pagecounter);
00865             gtk_widget_show(g_leftbutton);
00866             gtk_widget_show(g_rightbutton);
00867             g_pagecounter_shown = TRUE;
00868         }
00869     }
00870         
00871     // save for possible update on locale change
00872     g_curpage = curpage;
00873     g_numpages = numpages;
00874     
00875     LOGPRINTF("leave has_left [%d] has_right [%d] g_pagecounter_shown [%d]", g_has_left, g_has_right, g_pagecounter_shown);
00876 }

Here is the call graph for this function:

Here is the caller graph for this function:

void statusbar_update_signal_strength ( const char *  medium,
gint  strength 
)

Definition at line 771 of file statusbar.c.

References statusbar_item_set_state(), and WARNPRINTF.

Referenced by cb_sys_signal_strength().

00772 {
00773     gchar *item = NULL;
00774     const gchar *icon = NULL;
00775     if (strcmp(medium,"3g")==0) {
00776         item  = "statusbar_3g"; 
00777     } else {
00778         WARNPRINTF("Unhandled signal strength update on medium %s", medium);
00779         return;
00780     }
00781 
00782     if (strength>=90)
00783         icon = "connected_5b";
00784     else if (strength>=70)
00785         icon = "connected_4b";
00786     else if (strength>=50)
00787         icon = "connected_3b";
00788     else if (strength>=30)
00789         icon = "connected_2b";
00790     else if (strength>=10)
00791         icon = "connected_1b";
00792     else
00793         icon = "connected";
00794         
00795     statusbar_item_set_state(item, icon);
00796 }

Here is the call graph for this function:

Here is the caller graph for this function:

static void update_pagecounter ( int  curpage,
int  numpages 
) [static]

Definition at line 1099 of file statusbar.c.

References cp, and g_pagecounter.

01100 {
01101     if (curpage == -1 && numpages == -1) {
01102         // magic numbers for counting pages
01103         gtk_label_set_text(GTK_LABEL(g_pagecounter), _("Counting pages..."));
01104     } else {
01105         /* TRANSLATORS: %1$d is replaced by the current page
01106          *              %2$d is replaced by the total number of pages
01107          *              Example: 'page 9 of 40' */
01108         gchar *cp = g_strdup_printf( _("page %1$d of %2$d"), curpage, numpages);
01109         gtk_label_set_text(GTK_LABEL(g_pagecounter), cp);
01110         g_free(cp);
01111     }
01112 }

static void update_pagecounter ( gint  curpage,
gint  numpages 
) [static]

Referenced by statusbar_set_text(), and statusbar_update_pagecounter().

Here is the caller graph for this function:


Variable Documentation

dialog_cb_t dialog_cb = NULL [static]

Definition at line 107 of file statusbar.c.

Referenced by handle_status_item(), and statusbar_create().

gint g_curpage = 1 [static]

Definition at line 97 of file statusbar.c.

Referenced by statusbar_set_text(), and statusbar_update_pagecounter().

gboolean g_has_left = FALSE [static]

Definition at line 105 of file statusbar.c.

Referenced by enable_left(), on_leftbutton_press(), and statusbar_update_pagecounter().

gboolean g_has_right = FALSE [static]

Definition at line 106 of file statusbar.c.

Referenced by enable_right(), on_rightbutton_press(), and statusbar_update_pagecounter().

GtkWidget* g_icon_left_disabled = NULL [static]

Definition at line 102 of file statusbar.c.

Referenced by enable_left(), and statusbar_create().

GtkWidget* g_icon_left_enabled = NULL [static]

Definition at line 101 of file statusbar.c.

Referenced by enable_left(), and statusbar_create().

GtkWidget* g_icon_right_disabled = NULL [static]

Definition at line 104 of file statusbar.c.

Referenced by enable_right(), and statusbar_create().

GtkWidget* g_icon_right_enabled = NULL [static]

Definition at line 103 of file statusbar.c.

Referenced by enable_right(), and statusbar_create().

GtkWidget* g_leftbutton = NULL [static]
GtkWidget* g_menu_button = NULL [static]

Definition at line 87 of file statusbar.c.

Referenced by statusbar_create(), and statusbar_set_text().

gint g_numpages = 1 [static]

Definition at line 98 of file statusbar.c.

Referenced by statusbar_set_text(), and statusbar_update_pagecounter().

GtkWidget* g_pagecounter = NULL [static]
gboolean g_pagecounter_shown = FALSE [static]

Definition at line 99 of file statusbar.c.

Referenced by statusbar_hide_pagecounter(), and statusbar_update_pagecounter().

GtkWidget* g_right_spacer = NULL [static]

Definition at line 88 of file statusbar.c.

Referenced by fix_center_pagebar(), and statusbar_create().

GtkWidget* g_rightbutton = NULL [static]
int g_status_width = 0 [static]

Definition at line 89 of file statusbar.c.

Referenced by add_system_status_items(), and fix_center_pagebar().

GArray* statusArray = NULL [static]

Definition at line 93 of file statusbar.c.

Referenced by get_status_item(), status_pressed_event(), and statusbar_add_item().

GtkWidget* statusbar = NULL [static]

Definition at line 86 of file statusbar.c.

Referenced by statusbar_add_item(), statusbar_create(), and statusbar_set_text().

const int STATUSBAR_HEIGHT = 43 [static]

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

Definition at line 53 of file statusbar.c.

Referenced by statusbar_create().

const int TOOLBAR_MARGIN_LEFT = 4 [static]

Definition at line 54 of file statusbar.c.

Referenced by statusbar_create().

const int TOOLBAR_MARGIN_RIGHT = 6 [static]

Definition at line 55 of file statusbar.c.

Referenced by statusbar_create().

Generated by  doxygen 1.6.2-20100208