From 55924940c0e0199e0bd3c91cccf2cc9f868dde7d Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Tue, 17 Apr 2018 20:18:22 +0000 Subject: [PATCH] Delete Pixie 1 git-svn-id: svn://kolibrios.org@7240 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/pixie/Tupfile.lua | 6 - programs/cmm/pixie/check_default_player.h | 52 --- programs/cmm/pixie/compile_en.bat | 9 - programs/cmm/pixie/get_files_list.h | 53 --- programs/cmm/pixie/pixie.c | 388 ---------------------- programs/cmm/pixie/pixie.ini | 4 - programs/cmm/pixie/s_dark.png | Bin 2017 -> 0 bytes programs/cmm/pixie/s_light.png | Bin 2585 -> 0 bytes programs/cmm/pixie/settings.h | 98 ------ 9 files changed, 610 deletions(-) delete mode 100644 programs/cmm/pixie/Tupfile.lua delete mode 100644 programs/cmm/pixie/check_default_player.h delete mode 100644 programs/cmm/pixie/compile_en.bat delete mode 100644 programs/cmm/pixie/get_files_list.h delete mode 100644 programs/cmm/pixie/pixie.c delete mode 100644 programs/cmm/pixie/pixie.ini delete mode 100644 programs/cmm/pixie/s_dark.png delete mode 100644 programs/cmm/pixie/s_light.png delete mode 100644 programs/cmm/pixie/settings.h diff --git a/programs/cmm/pixie/Tupfile.lua b/programs/cmm/pixie/Tupfile.lua deleted file mode 100644 index 30782d51dc..0000000000 --- a/programs/cmm/pixie/Tupfile.lua +++ /dev/null @@ -1,6 +0,0 @@ -if tup.getconfig("NO_CMM") ~= "" then return end -if tup.getconfig("LANG") == "ru" -then C_LANG = "LANG_RUS" -else C_LANG = "LANG_ENG" -- this includes default case without config -end -tup.rule("pixie.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "pixie.com") diff --git a/programs/cmm/pixie/check_default_player.h b/programs/cmm/pixie/check_default_player.h deleted file mode 100644 index 44e75a0c20..0000000000 --- a/programs/cmm/pixie/check_default_player.h +++ /dev/null @@ -1,52 +0,0 @@ -char open_assoc_ini_path[] = "/sys/settings/assoc.ini"; -word program_path_len; - - -void CheckDefaultForTheFirstStart() -{ - ini_get_int stdcall (#open_assoc_ini_path, "Pixie", "icon", -1); - if (EAX!=-1) return; - - CreateThread(#ShowPopUp,#menu_stak+4092); -} - - -void ShowPopUp() -{ - byte button_id, key; - proc_info pop_up; - - ini_set_int stdcall (#open_assoc_ini_path, "Pixie", "icon", 65); - program_path_len = strlen(#program_path); - ini_set_str stdcall (#open_assoc_ini_path, "Pixie", "exec", #program_path, program_path_len); - - loop() switch(WaitEvent()) - { - case evButton: - button_id = GetButtonID(); - if (button_id==10) SetDefaultPlayer(); - if (button_id==11) ExitProcess(); - break; - case evKey: - key = GetKey(); - if (key==ASCII_KEY_ENTER) SetDefaultPlayer(); - if (key==ASCII_KEY_ESC) ExitProcess(); - break; - case evReDraw: - DefineAndDrawWindow(150, 200, 220, 90, 0x01,0,0,0); - GetProcessInfo(#pop_up, SelfInfo); - DrawBar(0, 0, pop_up.width, pop_up.height, theme.color_list_bg); - DrawRectangle(0, 0, pop_up.width, pop_up.height, theme.color_list_border); - WriteText(10, 20, 0x80, theme.color_list_text, "Hey! Pixie is not a default"); - WriteText(10, 32, 0x80, theme.color_list_text, "MP3 player. Make it default?"); - DrawCaptButton(10, pop_up.height - 30, 80, 20, 10, theme.color_list_active_bg, theme.color_list_active_text, "Yes"); - DrawCaptButton(pop_up.width-10-80, pop_up.height - 30, 80, 20, 11, theme.color_list_active_bg, theme.color_list_active_text, "No"); - } -} - -void SetDefaultPlayer() -{ - ini_set_str stdcall (#open_assoc_ini_path, "Assoc", "mp3", "$Pixie", 6); - ini_set_str stdcall ("/sys/File namagers/KFAR.ini", "Associations", "mp3", #program_path, program_path_len); - ExitProcess(); -} \ No newline at end of file diff --git a/programs/cmm/pixie/compile_en.bat b/programs/cmm/pixie/compile_en.bat deleted file mode 100644 index fc4e4ba8c2..0000000000 --- a/programs/cmm/pixie/compile_en.bat +++ /dev/null @@ -1,9 +0,0 @@ -@del lang.h-- -@echo #define LANG_ENG 1 >lang.h-- - -@C-- pixie.c -@del pixie -@rename pixie.com pixie -@del warning.txt -@del lang.h-- -@pause \ No newline at end of file diff --git a/programs/cmm/pixie/get_files_list.h b/programs/cmm/pixie/get_files_list.h deleted file mode 100644 index 19a774c814..0000000000 --- a/programs/cmm/pixie/get_files_list.h +++ /dev/null @@ -1,53 +0,0 @@ -int files_mas[2000]; -dword buf; - - -void OpenDirectory(dword folder_path) -{ - int cur; - char temp_filename[4096]; - dword j, filesnum, end_pointer; - - list.count = 0; - if (buf) free(buf); - if (GetDir(#buf, #filesnum, folder_path, DIRS_ONLYREAL)==0) - if (filesnum==0) - { - notify("'Error opening folder' -E"); - } - - for (j=0; j= b) return; - for (j = a; j <= b; j++) - if (strcmp(files_mas[j]*304 + buf+72, files_mas[b]*304 + buf+72)<=0) { files_mas[i] >< files_mas[j]; i++;} - SortByName(a, i-2); - SortByName(i, b); -} - -void SetOpenedFileFirst(dword in_name) -{ - int i; - dword opened_filename = in_name + strrchr(in_name, '/'); - for (i=0; i20000) z1=0; else if(z1>screen.width-Form.width-10)z1=screen.width-Form.width; - if(z2<=10) || (z2>20000) z2=0; else if(z2>screen.height-Form.height-10)z2=screen.height-Form.height; - MoveSize(z1 , z2, OLD, OLD); - draw_window(); - } - pause(1); - } while (mouse.lkm); - } - break; - case evButton: - id=GetButtonID(); - switch(id) { - case BUTTON_WINDOW_CLOSE: - StopPlayingMp3(); - SaveIniConfig(); - ExitProcess(); - break; - case BUTTON_WINDOW_MINIMIZE: - MinimizeWindow(); - break; - case BUTTON_WINDOW_REDUCE: - if (window_mode == WINDOW_MODE_NORMAL) - { - window_mode = WINDOW_MODE_SMALL; - win_x_normal = Form.left; - win_y_normal = Form.top; - MoveSize(OLD, OLD, 99, skin.h - 1); - MoveSize(OLD, win_y_small, OLD, OLD); - MoveSize(win_x_small, OLD, OLD, OLD); - } - else - { - window_mode = WINDOW_MODE_NORMAL; - win_x_small = Form.left; - win_y_small = Form.top; - MoveSize(win_x_normal, win_y_normal, skin.w -1 ,skin.h + list.h); - } - break; - case BUTTON_PLAYBACK_PREV: _PLAY_PREVIOUS: - current_playing_file_n--; - StartPlayingMp3(); - break; - case BUTTON_PLAYBACK_NEXT: _PLAY_NEXT: - current_playing_file_n++; - StartPlayingMp3(); - break; - case BUTTON_PLAYBACK_PLAY_PAUSE: - PlayAndPauseClick(); - break; - } - break; - case evKey: - GetKeys(); - if (key_modifier&KEY_LCTRL) || (key_modifier&KEY_RCTRL) { - if (key_scancode==SCAN_CODE_LEFT) goto _PLAY_PREVIOUS; - if (key_scancode==SCAN_CODE_RIGHT) goto _PLAY_NEXT; - break; - } - if (key_scancode==024) { OpenDialog_start stdcall (#o_dialog); if (o_dialog.status==1) OpenFolder(#openfile_path); } - if (key_scancode==059) SetColorThemeLight(); - if (key_scancode==060) SetColorThemeDark(); - if (key_scancode==SCAN_CODE_LEFT) RunProgram("@VOLUME", "-"); - if (key_scancode==SCAN_CODE_RIGHT) RunProgram("@VOLUME", "+"); - if (key_scancode==050) RunProgram("@VOLUME", "m"); - if (key_scancode==SCAN_CODE_ENTER) { current_playing_file_n=list.cur_y; StartPlayingMp3(); } - if (key_scancode==025) || (key_scancode==SCAN_CODE_SPACE) PlayAndPauseClick(); - if (list.ProcessKey(key_scancode)) DrawPlayList(); - break; - case evReDraw: - if (window_mode == WINDOW_MODE_NORMAL) DefineAndDrawWindow(win_x_normal, win_y_normal, skin.w - 1, skin.h + list.h, 0x41,0,0,0); - if (window_mode == WINDOW_MODE_SMALL) DefineAndDrawWindow(win_x_small, win_y_small, 99, skin.h - 1, 0x41,0,0,0); - draw_window(); - break; - default: - if (playback_mode == PLAYBACK_MODE_PLAYING) && (!GetProcessSlot(player_run_id)) - { - current_playing_file_n++; - StartPlayingMp3(); - } - } - } -} - -void PlayAndPauseClick() -{ - if (playback_mode == PLAYBACK_MODE_PLAYING) - { - playback_mode = PLAYBACK_MODE_STOPED; - StopPlayingMp3(); - } - else - { - playback_mode = PLAYBACK_MODE_PLAYING; - StartPlayingMp3(); - } -} - - -void DrawPlayList() -{ - int i; - int yyy; - char temp_filename[4096]; - for (i=0; i47) strcpy(#temp_filename+44, "..."); - - yyy = i*list.item_h+list.y; - - //this is selected file - if (list.cur_y - list.first == i) - { - if (i>=list.count) continue; - DrawBar(list.x, yyy, list.w, list.item_h, theme.color_list_active_bg); - WriteText(12,yyy+list.text_y,0x80, theme.color_list_active_text, #temp_filename); - } - //this is not selected file - else - { - if (i>=list.count) continue; - DrawBar(list.x,yyy,list.w, list.item_h, theme.color_list_bg); - WriteText(12,yyy+list.text_y,0x80, theme.color_list_text, #temp_filename); - } - //this is cur_y playing file - if (i + list.first == current_playing_file_n) && (playback_mode == PLAYBACK_MODE_PLAYING) - { - WriteText(3, yyy+list.text_y,0x80, theme.color_list_active_pointer, "\x10"); - WriteText(12,yyy+list.text_y,0x80, theme.color_list_active_text, #temp_filename); - } - } - DrawBar(list.x,list.visible * list.item_h + list.y, list.w, -list.visible * list.item_h + list.h, theme.color_list_bg); - DrawScroller(); -} - - -void StopPlayingMp3() -{ - if (player_run_id) player_run_id = KillProcess(player_run_id); - if (notify_run_id) notify_run_id = KillProcess(notify_run_id); - playback_mode = PLAYBACK_MODE_STOPED; - DrawTopPanel(); - DrawPlayList(); -} - - -int NotifyAndBackFocus(dword msg) -{ - int nid; - nid = notify(msg); - pause(5); - Form.num_slot = GetProcessSlot(Form.ID); - if (Form.ID) ActivateWindow(Form.num_slot); - return nid; -} - - -void StartPlayingMp3() -{ - word i; - char item_path[4096]; - char notify_message[512]; - StopPlayingMp3(); - if (!list.count) { NotifyAndBackFocus("'Pixie Player\nPress O key to open MP3 file' -St"); return; } - if (current_playing_file_n > list.count) { current_playing_file_n = list.count; return; } - if (current_playing_file_n < 0) { current_playing_file_n = 0; return; } - playback_mode = PLAYBACK_MODE_PLAYING; - strlcpy(#current_filename, Getcur_yItemName(), sizeof(current_filename)); - sprintf(#item_path,"-h %s/%s",#work_folder,#current_filename); - DrawPlayList(); - DrawTopPanel(); - if (strcmpi(#item_path+strlen(#item_path)-3,".mp3")) player_run_id = RunProgram("/sys/media/ac97snd", #item_path); - sprintf(#notify_message,"'Now playing:\n%s' -St",#current_filename); - for (i=2; i=2) return; - if (window_mode == WINDOW_MODE_NORMAL) - { - DrawListBorder(0, skin.h-1, skin.w-1, list.h+1, theme.color_list_border); - DrawPlayList(); - } -} - -void DrawTopPanel() -{ - char cur_y_playing_title[245]; - img_draw stdcall(skin.image, 0, 0, Form.width - 14, skin.h, 0, 0); - img_draw stdcall(skin.image, Form.width - 14, 0, 15, skin.h, skin.w - 15, 0); - if (playback_mode == PLAYBACK_MODE_STOPED) img_draw stdcall(skin.image, 13, 0, 22, skin.h, 300, 0); - //Playing control buttons - DefineButton(13, 1, 21, 21, BUTTON_PLAYBACK_PLAY_PAUSE + BT_HIDE, 0); - DefineButton(36, 1, 21, 21, BUTTON_PLAYBACK_PREV + BT_HIDE, 0); - DefineButton(60, 1, 21, 21, BUTTON_PLAYBACK_NEXT + BT_HIDE, 0); - //Window control buttons - DefineButton(Form.width - 14, 1, 11, 11, BUTTON_WINDOW_CLOSE + BT_HIDE, 0); - DefineButton(Form.width - 14, 12, 12, 11, BUTTON_WINDOW_REDUCE + BT_HIDE, 0); - //Mode depended - if (window_mode == WINDOW_MODE_NORMAL) - { - DefineButton(Form.width - 26, 1, 12, 11, BUTTON_WINDOW_MINIMIZE + BT_HIDE, 0); - strcpy(#cur_y_playing_title, #current_filename); - cur_y_playing_title[strlen(#cur_y_playing_title)-4] = '\0'; - if (strlen(#cur_y_playing_title) > 29) strcpy(#cur_y_playing_title + 26, "..."); - WriteText(90, 9, 0x80, theme.color_top_panel_text, #cur_y_playing_title); - } - else - { - DefineButton(0, 0, 12, skin.h, 99 + BT_HIDE + BT_NOFRAME, 0); - } -} - - -void DrawScroller() -{ - scroll1.max_area = list.count; - scroll1.cur_area = list.visible; - scroll1.position = list.first; - scroll1.all_redraw = 0; - scroll1.start_x = skin.w - scroll1.size_x - 1; - scroll1.start_y = list.y-1; - scroll1.size_y = list.h+2; - if (list.count > list.visible) scrollbar_v_draw(#scroll1); -} - -void DrawListBorder(dword x,y,w,h,color1) -{ - DrawBar(x,y+h,w,1,color1); - DrawBar(x,y,1,h,color1); - DrawBar(x+w,y,1,h+1,color1); -} - - -stop: - -char menu_stak[4096]; \ No newline at end of file diff --git a/programs/cmm/pixie/pixie.ini b/programs/cmm/pixie/pixie.ini deleted file mode 100644 index 23f794ce9a..0000000000 --- a/programs/cmm/pixie/pixie.ini +++ /dev/null @@ -1,4 +0,0 @@ -[Config] -current_theme=0 -window_mode=0 -last_folder= \ No newline at end of file diff --git a/programs/cmm/pixie/s_dark.png b/programs/cmm/pixie/s_dark.png deleted file mode 100644 index cecf4e35b3fd3f1626b53d36a5957cb8e4fddf77..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2017 zcmV<72Oju|P)zkXKr>CbzH?)iZ00%iq zL_t(o!|YV;Zrd;nbj8Su6%`W|SI+0U_kYUWiQc^07~o)kM?ofeykpu!oNo9Z{}|nH z`X4*vFIIKKRI<+&nsZ6H7KAUT5T(JDgVY{=E)0%e&}!_QvhB3toCqS8DNCOKqAwl{ z6D;joxMl2E{Ti3R%-qTbvj+qUf7=5K(_kkj$)1{m$feW*IktPrNqtiIY`C z)DD-hjVXK24VD5{_;0NW^zNo6trPi8jEmiTUo-k8X&{cU+ z&#+?iuYq_?4Mq*vlS`&0Jcu*dRJ`q6K<*cDMtrPOJvh>{Ao1C9~d)2Lp3!wJE{1oZz-ygj>dr)h}_ack_$f z2j`@379M*i5f(~YF&^l!S~q_SLzOC%9B84hb-I7n=`>BHB#lBiM2f`W1p6BdCgvOm zjSv>t9>%mp1`C@~<5zN$mUbgtG4`!~h3hy#zF3U!PTZr#@f~=x(81v!kMYdX7Is5% zA3XBm+`+zu)9HS@olfwudaMWRsAOF23Twi$fB{c~15xAjhB4V(it|}((sGLwF`WYuUGsQzF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vq zoQ2i9EF1-rc;KS#(n~BX+61z~-o_K%#!wj=LuLHathU)ys|{Fqe|}M+_|7ZLUtwQ~ z{Rfg5{tBsgSZf0c*F$ys{%f!NRojN5Fn(!hX{j#65f~4yM27s+V!PP11{+eGMT045 zP!^5$BlJx?`2j*kPhR{4eTuwFzfU^0b$uYcxLpkS-9#LnTn_v`j)<|={+1(z=@Jq0 z)^#(qHS#n&-(*?J+HGf>bF@+Bxg{#X{nk8mF9(CsP?VV=q3-=R@hvyz;o{;8gxw|d zn&>@H#yAn$zXQiA9(gxG5d4xO*yi;OZ~R=QVII^8voxG%AxpPC57Vq!>qvz9%M<18 z-oW`@pzU{laYOOt#;6_ioajH0W9ktGUND~Bi;3fSnJiA2tq+XYLZiclGEmFbMlq4Z$5 zWi-OuWp}3wUnT56(SM*DVRQ)oGvn8Zp<-8>*=&|p2i0dX>lATr^B{>jXdFc?Laj_^ zZce#7rS@e>m$uY>#n)%zaRVhnr84c4*JMrm>guVDgJ&BxX*0&zY_&oOq{|oQRkcwH z5}{J2^In?Efi*xS zsCG|K5h`!0(_O*tM`AqD6a5G32zw6n>XW+nf$rF}Zf~DkIC!>D6BLA{6sj+%>w-jh zQdAMP6n&y&*jHxVXcTK4JlCivlSyOCzSMo`m8HJU2tS-0jIg0dhzJs;YZi;eb9GRC v`cJ&PKT%$ekTqv#XDc~x9EExJ#y|20-y^vA1)Z|z00000NkvXXu0mjfZ#-9@ diff --git a/programs/cmm/pixie/settings.h b/programs/cmm/pixie/settings.h deleted file mode 100644 index 939f6e1a7d..0000000000 --- a/programs/cmm/pixie/settings.h +++ /dev/null @@ -1,98 +0,0 @@ -byte current_theme; -enum { - THEME_DARK, - THEME_LIGHT -}; - -char pathini[4096]; -_ini ini = { "/sys/media/pixie/pixie.ini", "Config" }; - -void LoadIniConfig() -{ - dword temp = abspath("pixie.ini"); - strcpy(#pathini, temp); - ini.path = #pathini; - current_theme = ini.GetInt("current_theme", THEME_DARK); - window_mode = ini.GetInt("window_mode", WINDOW_MODE_NORMAL); - win_x_normal = ini.GetInt("win_x_normal", 100); - win_y_normal = ini.GetInt("win_y_normal", 90); - win_x_small = ini.GetInt("win_x_small", -1); - win_y_small = ini.GetInt("win_y_small", -1); - ini.GetString("last_folder", #work_folder, sizeof(work_folder), 0); - - if (current_theme == THEME_DARK) SetColorThemeDark(); else SetColorThemeLight(); - if (win_x_small==-1) win_x_small = 2000; - if (win_y_small==-1) win_y_small = GetClientHeight() - skin.h + 1; -} - -void SaveIniConfig() -{ - if (window_mode == WINDOW_MODE_NORMAL) - { - win_x_normal = Form.left; - win_y_normal = Form.top; - } - if (window_mode == WINDOW_MODE_SMALL) - { - win_x_small = Form.left; - win_y_small = Form.top; - } - ini.SetInt("current_theme", current_theme); - ini.SetInt("window_mode", window_mode); - ini.SetInt("win_x_normal", win_x_normal); - ini.SetInt("win_y_normal", win_y_normal); - ini.SetInt("win_x_small", win_x_small); - ini.SetInt("win_y_small", win_y_small); - ini.SetString("last_folder", #work_folder, strlen(#work_folder)); -} - -struct struct_pixie_colors { - dword color_top_panel_text, - color_list_bg, - color_list_text, - color_list_active_bg, - color_list_active_text, - color_list_active_pointer, - color_list_scroller, - color_list_border; -} theme; - - -void SetColorThemeDark() -{ - current_theme = THEME_DARK; - Libimg_LoadImage(#skin, abspath("s_dark.png")); - skin.w = 300; - theme.color_top_panel_text = 0xFCFFBE; - theme.color_list_bg = 0x313031; - theme.color_list_text = 0xADAEAD; - theme.color_list_active_bg = 0x434343; - theme.color_list_active_text = 0xADAEAD; - theme.color_list_active_pointer = 0xD6D6D6; - theme.color_list_scroller = 0xBBBbbb; - theme.color_list_border = 0x121212; - scroll1.bckg_col = theme.color_list_bg; - scroll1.frnt_col = theme.color_list_border; - scroll1.line_col = theme.color_list_border; - draw_window(); -} - - -void SetColorThemeLight() -{ - current_theme = THEME_LIGHT; - Libimg_LoadImage(#skin, abspath("s_light.png")); - skin.w = 300; - theme.color_top_panel_text = 0x85663F; - theme.color_list_bg = 0xE2E2E2; - theme.color_list_text = 0x595959; - theme.color_list_active_bg = 0xFAF3AF; - theme.color_list_active_text = 0x85663F; - theme.color_list_active_pointer = 0x85663F; - theme.color_list_scroller = 0xBBBbbb; - theme.color_list_border = 0x736D65; - scroll1.bckg_col = theme.color_list_bg; - scroll1.frnt_col = theme.color_list_border; - scroll1.line_col = theme.color_list_border; - draw_window(); -} \ No newline at end of file