static gboolean plugin_unload(PurplePlugin *plugin) { bar_set(FALSE); /* Turn the led off */ purple_signal_disconnect(purple_conversations_get_handle(), "conversation-updated", plugin, PURPLE_CALLBACK(lednot_conversation_updated)); return TRUE; }
void gc_bar_set (const GComprisBarFlags flags) { if (custom_bar == NULL) bar_set (flags); else if (custom_bar->set_flags != NULL) custom_bar->set_flags (flags); }
static void lednot_conversation_updated(PurpleConversation *conv, PurpleConvUpdateType type) { GList *list; if( type != PURPLE_CONV_UPDATE_UNSEEN ) { return; } #if 0 purple_debug_info("bar-notification", "Change in unseen conversations\n"); #endif list=get_pending_list(1); if(list==NULL) { bar_set(FALSE); } else if(list!=NULL) { bar_set(TRUE); } g_list_free(list); }
void ram() { for(int x = 63; x >= 0; x--) { lcdFill(0); DoString(x, 0, "Setting Highscore"); lcdDisplay(); } highscore_set(23542, "Pentagon V1LLAG3"); delayms_queue(500); for(int x = 63; x >= 0; x--) { lcdFill(0); DoString(x, 0, "Setting ..."); lcdDisplay(); } foo_set("PwnedPwnedPwnedPwnedPwnedPwned "); bar_set("http://chaosbay.camp.ccc.de/ "); delayms_queue(500); time_set(1313803870); }
/* * Do all the bar display and register the events */ static void bar_start (GooCanvas *theCanvas) { GcomprisProperties *properties = gc_prop_get(); RsvgHandle *svg_handle; GooCanvasBounds bounds; _default_y = BOARDHEIGHT - BARHEIGHT; _default_zoom = 1.0; bar_reset_sound_id(); rootitem = goo_canvas_group_new (goo_canvas_get_root_item(theCanvas), NULL); svg_handle = gc_skin_rsvg_get(); bar_item = goo_canvas_svg_new (rootitem, svg_handle, "svg-id", "#BAR_BG", "pointer-events", GOO_CANVAS_EVENTS_NONE, NULL); SET_ITEM_LOCATION(bar_item, 0, 0); /* * The Order in which buttons are created represents * also the order in which they will be displayed */ // EXIT if(properties->disable_quit == 0) buttons = g_slist_append(buttons, new_button(rootitem, svg_handle, GC_BAR_EXIT, "#EXIT")); // ABOUT buttons = g_slist_append(buttons, new_button(rootitem, svg_handle, GC_BAR_ABOUT, "#ABOUT")); // CONFIG if(properties->disable_config == 0) buttons = g_slist_append(buttons, new_button(rootitem, svg_handle, GC_BAR_CONFIG, "#CONFIG")); // HELP buttons = g_slist_append(buttons, new_button(rootitem, svg_handle, GC_BAR_HELP, "#HELP")); // LEVEL (Multiple buttons for this one) GooCanvasItem *rootitem_level = goo_canvas_group_new (rootitem, NULL); g_object_set (rootitem_level, "visibility", GOO_CANVAS_ITEM_VISIBLE, NULL); g_object_set_data (G_OBJECT(rootitem_level), "flag", GUINT_TO_POINTER(GC_BAR_LEVEL)); buttons = g_slist_append(buttons, rootitem_level); GooCanvasItem *item = new_button(rootitem_level, svg_handle, GC_BAR_LEVEL_DOWN, "#LEVEL_DOWN"); g_object_set (item, "visibility", (properties->disable_level ? GOO_CANVAS_ITEM_INVISIBLE : GOO_CANVAS_ITEM_VISIBLE), NULL); item = new_button(rootitem_level, svg_handle, GC_BAR_LEVEL, "#LEVEL_UP"); goo_canvas_item_translate(item, 50, 0); g_object_set (item, "visibility", (properties->disable_level ? GOO_CANVAS_ITEM_INVISIBLE : GOO_CANVAS_ITEM_VISIBLE), NULL); goo_canvas_item_get_bounds(item, &bounds); level_item = goo_canvas_text_new (rootitem_level, "", bounds.x1 - 10, (bounds.y2 - bounds.y1) / 2 + 8, -1, GTK_ANCHOR_CENTER, "font", gc_skin_font_board_title_bold, "fill-color-rgba", gc_skin_color_text_button, NULL); current_level = 1; // REPEAT (Default) buttons = g_slist_append(buttons, new_button(rootitem, svg_handle, GC_BAR_REPEAT, "#REPEAT")); // REPEAT ICON buttons = g_slist_append(buttons, new_button(rootitem, svg_handle, GC_BAR_REPEAT_ICON, "#REPEAT")); // HOME buttons = g_slist_append(buttons, new_button(rootitem, svg_handle, GC_BAR_HOME, "#HOME")); update_exit_button(); bar_set(0); _hidden = FALSE; }